summaryrefslogtreecommitdiff
path: root/modules/engines/pixbuf
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-08-16 15:13:26 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:02:59 +0200
commit81f15cf908efd7875051723d2618887c14720ce9 (patch)
tree2dd59cefec7fff03ef2c89fa43b2a29dbdd17ca1 /modules/engines/pixbuf
parentd80e2897b95e7a3a7d7ecb92177209a6d5a3fe5b (diff)
downloadgtk+-81f15cf908efd7875051723d2618887c14720ce9.tar.gz
style: Convert draw_resize_grip vfunc to Cairo version
Includes removal of now unused draw_simple_image_no_cairo() function from pixbuf engine.
Diffstat (limited to 'modules/engines/pixbuf')
-rw-r--r--modules/engines/pixbuf/pixbuf-draw.c65
1 files changed, 11 insertions, 54 deletions
diff --git a/modules/engines/pixbuf/pixbuf-draw.c b/modules/engines/pixbuf/pixbuf-draw.c
index 12ed496e7c..1f5e3b5145 100644
--- a/modules/engines/pixbuf/pixbuf-draw.c
+++ b/modules/engines/pixbuf/pixbuf-draw.c
@@ -141,45 +141,6 @@ draw_simple_image(GtkStyle *style,
}
static gboolean
-draw_simple_image_no_cairo(GtkStyle *style,
- GdkWindow *window,
- GdkRectangle *area,
- GtkWidget *widget,
- ThemeMatchData *match_data,
- gboolean draw_center,
- gboolean allow_setbg,
- gint x,
- gint y,
- gint width,
- gint height)
-{
- gboolean result;
- cairo_t *cr;
-
- if ((width == -1) && (height == -1))
- gdk_drawable_get_size(window, &width, &height);
- else if (width == -1)
- gdk_drawable_get_size(window, &width, NULL);
- else if (height == -1)
- gdk_drawable_get_size(window, NULL, &height);
-
- cr = gdk_cairo_create (window);
- if (area)
- {
- gdk_cairo_rectangle (cr, area);
- cairo_clip (cr);
- }
-
- result = draw_simple_image (style, cr, widget, match_data,
- draw_center, allow_setbg,
- x, y, width, height);
-
- cairo_destroy (cr);
-
- return result;
-}
-
-static gboolean
draw_gap_image(GtkStyle *style,
cairo_t *cr,
GtkWidget *widget,
@@ -944,22 +905,18 @@ draw_expander (GtkStyle *style,
static void
draw_resize_grip (GtkStyle *style,
- GdkWindow *window,
- GtkStateType state,
- GdkRectangle *area,
- GtkWidget *widget,
- const gchar *detail,
- GdkWindowEdge edge,
- gint x,
- gint y,
- gint width,
- gint height)
+ cairo_t *cr,
+ GtkStateType state,
+ GtkWidget *widget,
+ const gchar *detail,
+ GdkWindowEdge edge,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
ThemeMatchData match_data;
- g_return_if_fail (style != NULL);
- g_return_if_fail (window != NULL);
-
match_data.function = TOKEN_D_RESIZE_GRIP;
match_data.detail = (gchar *)detail;
match_data.flags = (THEME_MATCH_STATE |
@@ -967,9 +924,9 @@ draw_resize_grip (GtkStyle *style,
match_data.state = state;
match_data.window_edge = edge;
- if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
+ if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
x, y, width, height))
- parent_class->draw_resize_grip (style, window, state, area, widget, detail,
+ parent_class->draw_resize_grip (style, cr, state, widget, detail,
edge, x, y, width, height);
}