~ubuntu-branches/debian/experimental/qtcurve/experimental

« back to all changes in this revision

Viewing changes to gtk2/style/helpers.h

  • Committer: Package Import Robot
  • Author(s): Boris Pek, Thanks to Scarlett Clark
  • Date: 2015-07-26 04:17:05 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150726041705-yuxbierbpely1fvp
Tags: 1.8.18+git20150711-a3fff13-1
* Upstream Git snapshot (1.8.18-242-ga3fff13) is taken from:
  http://quickgit.kde.org/?p=qtcurve.git
* Localization files are taken from last stable release (1.8.18).
* Fixed in upstream:
  - gtk2-engines-qtcurve: inkscape 0.91 crashes after palette mouse-over
    (Closes: #786831)
  - gtk2-engines-qtcurve: massive memory leak in mysql-workbench
    (Closes: #682162)
* Update debian/patches:
  - delete qt53-build-fix.diff (fixed in upstream)
  - add enable-translations.patch
* Update debian/control:
  - bump Standards-Version to 3.9.6 (was 3.9.5): no changes required
  - update Build-Depends for transition from KDE4 to KF5:
    + delete dependencies from: kdebase-workspace-dev and qtdeclarative5-dev
    + add dependencies from: extra-cmake-modules, kio-dev,
      libkf5archive-dev, libkf5config-dev, libkf5configwidgets-dev,
      libkf5i18n-dev, libkf5kdelibs4support-dev, libkf5widgetsaddons-dev,
      libkf5xmlgui-dev, libqt5x11extras5-dev, libxcb1-dev, pkg-config
      [Thanks to Scarlett Clark]
  - delete package kwin-style-qtcurve: it is not available for KF5 yet
    (LP: #1452218)
  - package kde-style-qtcurve now provides package kde-style-qtcurve-qt4
  - package kde-style-qtcurve is "Multi-Arch: same" now
  - metapackage qtcurve now depends on kde-style-qtcurve-qt5 and recommends
    kwin-decoration-oxygen, oxygen-icon-theme and oxygencursors
* Update debian/rules:
  - build using kf5 libraries instead of kde4
  - update configure flags
  - use xz compression in packages
* Update debian/kde-style-qtcurve.install:
  there are no KDE4 related files anymore.
* Update debian/kde-style-qtcurve-qt5.install.
* Update debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 *   Copyright 2003 - 2010 Craig Drummond <craig.p.drummond@gmail.com>       *
3
 
 *   Copyright 2013 - 2014 Yichao Yu <yyc1992@gmail.com>                     *
 
3
 *   Copyright 2013 - 2015 Yichao Yu <yyc1992@gmail.com>                     *
4
4
 *                                                                           *
5
5
 *   This program is free software; you can redistribute it and/or modify    *
6
6
 *   it under the terms of the GNU Lesser General Public License as          *
23
23
#ifndef __QTC_HELPERS_H__
24
24
#define __QTC_HELPERS_H__
25
25
 
26
 
#include <common/common.h>
27
26
#include "config.h"
28
27
#include "qt_settings.h"
 
28
#include <common/common.h>
29
29
#include <qtcurve-cairo/utils.h>
30
30
 
31
 
#define DETAIL(xx) ((detail) && (!strcmp(xx, detail)))
32
 
#define DETAILHAS(xx) ((detail) && (strstr(detail, xx)))
 
31
namespace QtCurve {
33
32
 
34
33
#ifndef GTK_IS_COMBO_BOX_ENTRY
35
34
#define GTK_IS_COMBO_BOX_ENTRY(x) 0
87
86
QTC_ALWAYS_INLINE static inline bool
88
87
isMozilla()
89
88
{
90
 
    return (qtcOneOf(qtSettings.app, GTK_APP_MOZILLA, GTK_APP_NEW_MOZILLA) &&
 
89
    return (oneOf(qtSettings.app, GTK_APP_MOZILLA, GTK_APP_NEW_MOZILLA) &&
91
90
            !getenv("QTCURVE_MOZ_TEST"));
92
91
}
93
92
QTC_ALWAYS_INLINE static inline bool
98
97
QTC_ALWAYS_INLINE static inline bool
99
98
isFakeGtk()
100
99
{
101
 
    return (isMozilla() || qtSettings.app == GTK_APP_OPEN_OFFICE ||
102
 
            qtSettings.app == GTK_APP_JAVA);
 
100
    return isMozilla() || oneOf(qtSettings.app, GTK_APP_OPEN_OFFICE,
 
101
                                GTK_APP_JAVA);
103
102
}
104
103
GdkColor *menuColors(bool active);
105
104
EBorder shadowToBorder(GtkShadowType shadow);
106
105
bool useButtonColor(const char *detail);
107
 
void qtcShadeColors(const GdkColor *base, GdkColor *vals);
 
106
void shadeColors(const GdkColor *base, GdkColor *vals);
108
107
bool isSortColumn(GtkWidget *button);
109
108
GdkColor *getCellCol(GdkColor *std, const char *detail);
110
109
bool reverseLayout(GtkWidget *widget);
137
136
bool isSpinButton(GtkWidget *widget);
138
137
bool isStatusBarFrame(GtkWidget *widget);
139
138
GtkMenuBar *isMenubar(GtkWidget *w, int level);
140
 
bool isMenuitem(GtkWidget *w, int level);
141
 
#define IS_MENU_ITEM(WIDGET) isMenuitem(WIDGET, 0)
 
139
bool isMenuitem(GtkWidget *w, int level=0);
142
140
bool isMenuWindow(GtkWidget *w);
143
 
#define IS_GROUP_BOX(W) ((W) && GTK_IS_FRAME((W)) && (NULL!=gtk_frame_get_label(GTK_FRAME((W))) || \
144
 
                                                      NULL!=gtk_frame_get_label_widget(GTK_FRAME((W)))))
 
141
#define IS_GROUP_BOX(W) ((W) && GTK_IS_FRAME(W) &&                    \
 
142
                         (gtk_frame_get_label(GTK_FRAME(W)) ||        \
 
143
                          gtk_frame_get_label_widget(GTK_FRAME(W))))
145
144
 
146
145
bool isInGroupBox(GtkWidget *w, int level);
147
146
bool isOnButton(GtkWidget *w, int level, bool *def);
164
163
#endif
165
164
EStepper getStepper(GtkWidget *widget, int x, int y, int width, int height);
166
165
 
167
 
int getFill(GtkStateType state, bool set, bool darker);
168
 
#define getFill(state, set, darker...)                  \
169
 
    getFill(state, set, QTC_DEFAULT(darker, false))
 
166
int getFill(GtkStateType state, bool set, bool darker=false);
170
167
bool isSbarDetail(const char *detail);
171
168
bool isHorizontalProgressbar(GtkWidget *widget);
172
169
bool isComboBoxPopupWindow(GtkWidget *widget, int level);
182
179
void setLowerEtchCol(cairo_t *cr, GtkWidget *widget);
183
180
GdkColor shadeColor(const GdkColor *orig, double mod);
184
181
gboolean windowEvent(GtkWidget *widget, GdkEvent *event, void *user_data);
185
 
void adjustToolbarButtons(GtkWidget *widget, int *x, int *y, int *width, int *height, int *round, bool horiz);
 
182
void adjustToolbarButtons(GtkWidget *widget, int *x, int *y, int *width,
 
183
                          int *height, ECornerBits *round, bool horiz);
186
184
void getEntryParentBgCol(GtkWidget *widget, GdkColor *color);
187
185
bool compositingActive(GtkWidget *widget);
188
186
bool isRgbaWidget(GtkWidget *widget);
190
188
void getTopLevelSize(GdkWindow *window, int *w, int *h);
191
189
void getTopLevelOrigin(GdkWindow *window, int *x, int *y);
192
190
bool mapToTopLevel(GdkWindow *window, GtkWidget *widget, int *x, int *y, int *w, int *h); //, bool frame)
193
 
int getRound(const char *detail, GtkWidget *widget, bool rev);
 
191
ECornerBits getRound(const char *detail, GtkWidget *widget, bool rev);
194
192
 
195
193
bool treeViewCellHasChildren(GtkTreeView *treeView, GtkTreePath *path);
196
194
bool treeViewCellIsLast(GtkTreeView *treeView, GtkTreePath *path);
197
195
GtkTreePath *treeViewPathParent(GtkTreeView *treeView, GtkTreePath *path);
198
196
void generateColors();
199
197
GdkColor *getCheckRadioCol(GtkStyle *style, GtkStateType state, bool mnu);
 
198
bool objectIsA(const GObject *object, const char *type_name);
 
199
 
 
200
}
200
201
 
201
202
#endif