summaryrefslogtreecommitdiff
path: root/src/ui/theme.h
diff options
context:
space:
mode:
authorDenis Gorodnichev <[email protected]>2014-07-24 10:37:41 +0400
committerinfirit <[email protected]>2014-11-25 18:06:24 +0100
commitb25395fab6fe9ee38bc0cd359941d0a825d88451 (patch)
treee7b6720a543a00495fae1dd1423d652056bedb03 /src/ui/theme.h
parentb8d8e52f0effbf76ff909f88932098d4daf4336e (diff)
downloadmarco-b25395fab6fe9ee38bc0cd359941d0a825d88451.tar.bz2
marco-b25395fab6fe9ee38bc0cd359941d0a825d88451.tar.xz
merge metacity(gtk3) changes
merge metacity(gtk3) changes fix warnings clean up unused variables replace UNUSED_VARIABLE by G_GNUC_UNUSED
Diffstat (limited to 'src/ui/theme.h')
-rw-r--r--src/ui/theme.h74
1 files changed, 58 insertions, 16 deletions
diff --git a/src/ui/theme.h b/src/ui/theme.h
index a4ddb5f6..66996d89 100644
--- a/src/ui/theme.h
+++ b/src/ui/theme.h
@@ -255,24 +255,40 @@ struct _MetaColorSpec
union
{
struct {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkRGBA color;
+#else
GdkColor color;
+#endif
} basic;
struct {
MetaGtkColorComponent component;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkStateFlags state;
+#else
GtkStateType state;
+#endif
} gtk;
struct {
MetaColorSpec *foreground;
MetaColorSpec *background;
double alpha;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkRGBA color;
+#else
GdkColor color;
+#endif
} blend;
struct {
MetaColorSpec *base;
double factor;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkRGBA color;
+#else
GdkColor color;
+#endif
} shade;
} data;
};
@@ -501,7 +517,11 @@ struct _MetaDrawOp
} image;
struct {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkStateFlags state;
+#else
GtkStateType state;
+#endif
GtkShadowType shadow;
GtkArrowType arrow;
gboolean filled;
@@ -513,7 +533,11 @@ struct _MetaDrawOp
} gtk_arrow;
struct {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkStateFlags state;
+#else
GtkStateType state;
+#endif
GtkShadowType shadow;
MetaDrawSpec *x;
MetaDrawSpec *y;
@@ -522,7 +546,11 @@ struct _MetaDrawOp
} gtk_box;
struct {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkStateFlags state;
+#else
GtkStateType state;
+#endif
MetaDrawSpec *x;
MetaDrawSpec *y1;
MetaDrawSpec *y2;
@@ -898,12 +926,23 @@ void meta_draw_spec_free (MetaDrawSpec *spec);
MetaColorSpec* meta_color_spec_new (MetaColorSpecType type);
MetaColorSpec* meta_color_spec_new_from_string (const char *str,
GError **err);
+#if GTK_CHECK_VERSION (3, 0, 0)
+MetaColorSpec* meta_color_spec_new_gtk (MetaGtkColorComponent component,
+ GtkStateFlags state);
+#else
MetaColorSpec* meta_color_spec_new_gtk (MetaGtkColorComponent component,
GtkStateType state);
+#endif
void meta_color_spec_free (MetaColorSpec *spec);
+#if GTK_CHECK_VERSION (3, 0, 0)
+void meta_color_spec_render (MetaColorSpec *spec,
+ GtkStyleContext *style_gtk,
+ GdkRGBA *color);
+#else
void meta_color_spec_render (MetaColorSpec *spec,
- GtkWidget *widget,
+ GtkStyle *style_gtk,
GdkColor *color);
+#endif
MetaDrawOp* meta_draw_op_new (MetaDrawType type);
@@ -921,11 +960,11 @@ void meta_draw_op_draw (const MetaDrawOp *op,
MetaRectangle logical_region);
void meta_draw_op_draw_with_style (const MetaDrawOp *op,
- GtkStyle *style_gtk,
- GtkWidget *widget,
#if GTK_CHECK_VERSION(3, 0, 0)
+ GtkStyleContext *style_gtk,
cairo_t *cr,
#else
+ GtkWidget *widget,
GdkDrawable *drawable,
const GdkRectangle *clip,
#endif
@@ -947,11 +986,11 @@ void meta_draw_op_list_draw (const MetaDrawOpList *op_list,
const MetaDrawInfo *info,
MetaRectangle rect);
void meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
- GtkStyle *style_gtk,
- GtkWidget *widget,
#if GTK_CHECK_VERSION(3, 0, 0)
+ GtkStyleContext *style_gtk,
cairo_t *cr,
#else
+ GtkWidget *widget,
GdkDrawable *drawable,
const GdkRectangle *clip,
#endif
@@ -966,10 +1005,17 @@ gboolean meta_draw_op_list_contains (MetaDrawOpList *op_list,
MetaGradientSpec* meta_gradient_spec_new (MetaGradientType type);
void meta_gradient_spec_free (MetaGradientSpec *desc);
+#if GTK_CHECK_VERSION (3, 0, 0)
GdkPixbuf* meta_gradient_spec_render (const MetaGradientSpec *desc,
- GtkWidget *widget,
+ GtkStyleContext *style_gtk,
int width,
int height);
+#else
+GdkPixbuf* meta_gradient_spec_render (const MetaGradientSpec *desc,
+ GtkStyle *style_gtk,
+ int width,
+ int height);
+#endif
gboolean meta_gradient_spec_validate (MetaGradientSpec *spec,
GError **error);
@@ -1005,13 +1051,9 @@ void meta_frame_style_draw (MetaFrameStyle *style,
void meta_frame_style_draw_with_style (MetaFrameStyle *style,
#if GTK_CHECK_VERSION(3, 0, 0)
GtkStyleContext *style_gtk,
- #else
- GtkStyle *style_gtk,
- #endif
- GtkWidget *widget,
- #if GTK_CHECK_VERSION(3, 0, 0)
cairo_t *cr,
#else
+ GtkWidget *widget,
GdkDrawable *drawable,
int x_offset,
int y_offset,
@@ -1104,13 +1146,9 @@ void meta_theme_draw_frame_by_name (MetaTheme *theme,
void meta_theme_draw_frame_with_style (MetaTheme *theme,
#if GTK_CHECK_VERSION(3, 0, 0)
GtkStyleContext *style_gtk,
- #else
- GtkStyle *style_gtk,
- #endif
- GtkWidget *widget,
- #if GTK_CHECK_VERSION(3, 0, 0)
cairo_t *cr,
#else
+ GtkWidget *widget,
GdkDrawable *drawable,
const GdkRectangle *clip,
int x_offset,
@@ -1221,8 +1259,12 @@ MetaFrameType meta_frame_type_from_string (const char *s
const char* meta_frame_type_to_string (MetaFrameType type);
MetaGradientType meta_gradient_type_from_string (const char *str);
const char* meta_gradient_type_to_string (MetaGradientType type);
+#if GTK_CHECK_VERSION (3, 0, 0)
+GtkStateFlags meta_gtk_state_from_string (const char *str);
+#else
GtkStateType meta_gtk_state_from_string (const char *str);
const char* meta_gtk_state_to_string (GtkStateType state);
+#endif
GtkShadowType meta_gtk_shadow_from_string (const char *str);
const char* meta_gtk_shadow_to_string (GtkShadowType shadow);
GtkArrowType meta_gtk_arrow_from_string (const char *str);