[sapwood] dont't require a GtkWidget anymore
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sapwood] dont't require a GtkWidget anymore
- Date: Wed, 4 Aug 2010 11:10:12 +0000 (UTC)
commit c85a01311eef5fbd11ff51a085f84093808f749e
Author: Sven Herzberg <herzi gnome-de org>
Date: Wed Jul 28 16:41:20 2010 +0200
dont't require a GtkWidget anymore
As we only get the GType in the new theming API, we start to port our
internal API towards using only what we have.
* sapwood-pixmap.c,
* sapwood-pixmap.h: expect a GType instead of a GtkWidget now
* theme-pixbuf.c: update to the new SapwoodPixmap API
engine/sapwood-pixmap.c | 6 +++---
engine/sapwood-pixmap.h | 4 ++--
engine/theme-pixbuf.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/engine/sapwood-pixmap.c b/engine/sapwood-pixmap.c
index e1d9614..8b9418b 100644
--- a/engine/sapwood-pixmap.c
+++ b/engine/sapwood-pixmap.c
@@ -481,8 +481,8 @@ sapwood_crop_pixmap (GdkPixmap *pixmap,
}
void
-sapwood_pixmap_render_rects (SapwoodPixmap *self,
- GtkWidget *widget,
+sapwood_pixmap_render_rects (SapwoodPixmap* self,
+ GType widget_type,
GdkDrawable *draw,
gint draw_x,
gint draw_y,
@@ -573,7 +573,7 @@ sapwood_pixmap_render_rects (SapwoodPixmap *self,
if (sapwood_debug_scaling)
{
g_warning ("scaling pixmap for %s: requested %dx%d; real %dx%d",
- G_OBJECT_TYPE_NAME (widget),
+ g_type_name (widget_type),
width, height,
self->width, self->height);
cairo_save (tmp_cr);
diff --git a/engine/sapwood-pixmap.h b/engine/sapwood-pixmap.h
index a55759f..39abf5a 100644
--- a/engine/sapwood-pixmap.h
+++ b/engine/sapwood-pixmap.h
@@ -55,8 +55,8 @@ void sapwood_pixmap_get_pixmap (SapwoodPixmap *self,
GdkPixmap **ret_pixmap,
GdkBitmap **ret_pixmask) G_GNUC_INTERNAL;
-void sapwood_pixmap_render_rects (SapwoodPixmap *self,
- GtkWidget *widget,
+void sapwood_pixmap_render_rects (SapwoodPixmap* self,
+ GType widget_type,
GdkDrawable *draw,
gint draw_x,
gint draw_y,
diff --git a/engine/theme-pixbuf.c b/engine/theme-pixbuf.c
index ccc6783..b183a24 100644
--- a/engine/theme-pixbuf.c
+++ b/engine/theme-pixbuf.c
@@ -409,7 +409,7 @@ theme_pixbuf_render (ThemePixbuf *theme_pb,
mask_required = TRUE;
}
- sapwood_pixmap_render_rects (pixmap, widget,
+ sapwood_pixmap_render_rects (pixmap, G_OBJECT_TYPE (widget),
window, x, y, width, height,
mask, mask_x, mask_y, mask_required,
clip_rect, n_rect, rect);
@@ -444,7 +444,7 @@ theme_pixbuf_render (ThemePixbuf *theme_pb,
else if (mask)
g_object_ref (mask);
- sapwood_pixmap_render_rects (pixmap, widget,
+ sapwood_pixmap_render_rects (pixmap, G_OBJECT_TYPE (widget),
window, x, y, draw_width, draw_height,
mask, mask_x, mask_y, FALSE,
clip_rect, 1, rect);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]