diff options
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 26 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 26 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 26 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 26 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 26 | ||||
-rw-r--r-- | demos/testpixbuf-scale.c | 8 | ||||
-rw-r--r-- | demos/testpixbuf.c | 8 | ||||
-rw-r--r-- | gdk/gdkdraw.c | 12 | ||||
-rw-r--r-- | gdk/gdkdrawable.h | 36 | ||||
-rw-r--r-- | gdk/gdkevents.c | 4 | ||||
-rw-r--r-- | gdk/gdkinternals.h | 19 | ||||
-rw-r--r-- | gdk/gdkpixbuf-render.c | 36 | ||||
-rw-r--r-- | gdk/gdkpixmap.c | 16 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 32 | ||||
-rw-r--r-- | gdk/x11/gdkdrawable-x11.c | 10 | ||||
-rw-r--r-- | gtk/gtkcellrendererpixbuf.c | 25 | ||||
-rw-r--r-- | gtk/gtkimage.c | 22 | ||||
-rw-r--r-- | gtk/gtklabel.c | 4 | ||||
-rw-r--r-- | gtk/gtkpixmap.c | 16 | ||||
-rw-r--r-- | gtk/gtktextdisplay.c | 20 | ||||
-rw-r--r-- | tests/testrgb.c | 11 |
22 files changed, 287 insertions, 148 deletions
@@ -1,3 +1,29 @@ +Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c + gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf + as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual + function to draw_pixbuf. (#60582) + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]): + Note that these functions are obsolete in the docs. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): + Remove all the sanity checks now we make it clear + that it is obsolete name for gdk_draw_pixbuf(). + + * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c + gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c + tests/testrgb.c: Use gdk_draw_pixbuf() everywhere. + + * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix + some warnings. + + * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed + bit from last gdk_event_get_screen() change. + + * gdk/gdkevents.c: Couple of small fixes. + Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6452cc095d..d96d35ec38 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,29 @@ +Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c + gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf + as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual + function to draw_pixbuf. (#60582) + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]): + Note that these functions are obsolete in the docs. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): + Remove all the sanity checks now we make it clear + that it is obsolete name for gdk_draw_pixbuf(). + + * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c + gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c + tests/testrgb.c: Use gdk_draw_pixbuf() everywhere. + + * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix + some warnings. + + * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed + bit from last gdk_event_get_screen() change. + + * gdk/gdkevents.c: Couple of small fixes. + Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 6452cc095d..d96d35ec38 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,29 @@ +Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c + gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf + as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual + function to draw_pixbuf. (#60582) + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]): + Note that these functions are obsolete in the docs. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): + Remove all the sanity checks now we make it clear + that it is obsolete name for gdk_draw_pixbuf(). + + * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c + gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c + tests/testrgb.c: Use gdk_draw_pixbuf() everywhere. + + * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix + some warnings. + + * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed + bit from last gdk_event_get_screen() change. + + * gdk/gdkevents.c: Couple of small fixes. + Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6452cc095d..d96d35ec38 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,29 @@ +Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c + gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf + as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual + function to draw_pixbuf. (#60582) + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]): + Note that these functions are obsolete in the docs. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): + Remove all the sanity checks now we make it clear + that it is obsolete name for gdk_draw_pixbuf(). + + * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c + gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c + tests/testrgb.c: Use gdk_draw_pixbuf() everywhere. + + * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix + some warnings. + + * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed + bit from last gdk_event_get_screen() change. + + * gdk/gdkevents.c: Couple of small fixes. + Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6452cc095d..d96d35ec38 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,29 @@ +Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c + gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf + as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual + function to draw_pixbuf. (#60582) + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]): + Note that these functions are obsolete in the docs. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): + Remove all the sanity checks now we make it clear + that it is obsolete name for gdk_draw_pixbuf(). + + * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c + gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c + tests/testrgb.c: Use gdk_draw_pixbuf() everywhere. + + * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix + some warnings. + + * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed + bit from last gdk_event_get_screen() change. + + * gdk/gdkevents.c: Couple of small fixes. + Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6452cc095d..d96d35ec38 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,29 @@ +Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c + gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf + as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual + function to draw_pixbuf. (#60582) + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]): + Note that these functions are obsolete in the docs. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): + Remove all the sanity checks now we make it clear + that it is obsolete name for gdk_draw_pixbuf(). + + * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c + gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c + tests/testrgb.c: Use gdk_draw_pixbuf() everywhere. + + * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix + some warnings. + + * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed + bit from last gdk_event_get_screen() change. + + * gdk/gdkevents.c: Couple of small fixes. + Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add diff --git a/demos/testpixbuf-scale.c b/demos/testpixbuf-scale.c index 2f1fe441c2..1fb8339efd 100644 --- a/demos/testpixbuf-scale.c +++ b/demos/testpixbuf-scale.c @@ -42,10 +42,10 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) interp_type, overall_alpha, event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555); - gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], - 0, 0, event->area.x, event->area.y, - event->area.width, event->area.height, - GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); + gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest, + 0, 0, event->area.x, event->area.y, + event->area.width, event->area.height, + GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); g_object_unref (dest); diff --git a/demos/testpixbuf.c b/demos/testpixbuf.c index 00af96f7c8..26bcd1d02c 100644 --- a/demos/testpixbuf.c +++ b/demos/testpixbuf.c @@ -335,10 +335,10 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data) GDK_INTERP_BILINEAR, 255, event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555); - gdk_pixbuf_render_to_drawable (dest, drawing_area->window, drawing_area->style->fg_gc[GTK_STATE_NORMAL], - 0, 0, event->area.x, event->area.y, - event->area.width, event->area.height, - GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); + gdk_draw_pixbuf (drawing_area->window, drawing_area->style->fg_gc[GTK_STATE_NORMAL], dest, + 0, 0, event->area.x, event->area.y, + event->area.width, event->area.height, + GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); g_object_unref (dest); } else { diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index db8d11df99..fe7520263d 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -96,7 +96,7 @@ gdk_drawable_class_init (GdkDrawableClass *klass) /* Default implementation for clip and visible region is the same */ klass->get_clip_region = gdk_drawable_real_get_visible_region; klass->get_visible_region = gdk_drawable_real_get_visible_region; - klass->_draw_pixbuf = gdk_drawable_real_draw_pixbuf; + klass->draw_pixbuf = gdk_drawable_real_draw_pixbuf; } /* Manipulation of drawables @@ -584,7 +584,7 @@ gdk_draw_image (GdkDrawable *drawable, } /** - * _gdk_draw_pixbuf: + * gdk_draw_pixbuf: * @drawable: Destination drawable. * @gc: a #GdkGC, used for clipping, or %NULL * @pixbuf: a #GdkPixbuf @@ -607,7 +607,7 @@ gdk_draw_image (GdkDrawable *drawable, * to the X server, and may be somewhat slow. **/ void -_gdk_draw_pixbuf (GdkDrawable *drawable, +gdk_draw_pixbuf (GdkDrawable *drawable, GdkGC *gc, GdkPixbuf *pixbuf, gint src_x, @@ -629,9 +629,9 @@ _gdk_draw_pixbuf (GdkDrawable *drawable, if (height == -1) height = gdk_pixbuf_get_height (pixbuf); - GDK_DRAWABLE_GET_CLASS (drawable)->_draw_pixbuf (drawable, gc, pixbuf, - src_x, src_y, dest_x, dest_y, width, height, - dither, x_dither, y_dither); + GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc, pixbuf, + src_x, src_y, dest_x, dest_y, width, height, + dither, x_dither, y_dither); } void diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h index 32982ddfc0..6200dc7424 100644 --- a/gdk/gdkdrawable.h +++ b/gdk/gdkdrawable.h @@ -134,18 +134,18 @@ struct _GdkDrawableClass gint *composite_x_offset, gint *composite_y_offset); - void (*_draw_pixbuf) (GdkDrawable *drawable, - GdkGC *gc, - GdkPixbuf *pixbuf, - gint src_x, - gint src_y, - gint dest_x, - gint dest_y, - gint width, - gint height, - GdkRgbDither dither, - gint x_dither, - gint y_dither); + void (*draw_pixbuf) (GdkDrawable *drawable, + GdkGC *gc, + GdkPixbuf *pixbuf, + gint src_x, + gint src_y, + gint dest_x, + gint dest_y, + gint width, + gint height, + GdkRgbDither dither, + gint x_dither, + gint y_dither); GdkImage* (*_copy_to_image) (GdkDrawable *drawable, GdkImage *image, gint src_x, @@ -288,6 +288,18 @@ void gdk_draw_lines (GdkDrawable *drawable, GdkGC *gc, GdkPoint *points, gint npoints); +void gdk_draw_pixbuf (GdkDrawable *drawable, + GdkGC *gc, + GdkPixbuf *pixbuf, + gint src_x, + gint src_y, + gint dest_x, + gint dest_y, + gint width, + gint height, + GdkRgbDither dither, + gint x_dither, + gint y_dither); void gdk_draw_glyphs (GdkDrawable *drawable, GdkGC *gc, diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index ab93e69361..ca3088cad2 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -286,6 +286,8 @@ gdk_event_is_allocated (GdkEvent *event) { if (event_hash) return g_hash_table_lookup (event_hash, event) != NULL; + + return FALSE; } /** @@ -414,7 +416,7 @@ gdk_event_free (GdkEvent *event) break; } - g_hash_table_remove (event_chunk, event); + g_hash_table_remove (event_hash, event); g_mem_chunk_free (event_chunk, event); } diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index d322e10348..a0255ca07d 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -155,8 +155,9 @@ typedef enum struct _GdkEventPrivate { - GdkEvent event; - guint flags; + GdkEvent event; + guint flags; + GdkScreen *screen; }; extern GdkEventFunc _gdk_event_func; /* Callback for events */ @@ -202,20 +203,6 @@ GdkImage *_gdk_image_get_scratch (GdkScreen *screen, gint *x, gint *y); -/* Will most likely be exported in the future - */ -void _gdk_draw_pixbuf (GdkDrawable *drawable, - GdkGC *gc, - GdkPixbuf *pixbuf, - gint src_x, - gint src_y, - gint dest_x, - gint dest_y, - gint width, - gint height, - GdkRgbDither dither, - gint x_dither, - gint y_dither); GdkImage *_gdk_drawable_copy_to_image (GdkDrawable *drawable, GdkImage *image, gint src_x, diff --git a/gdk/gdkpixbuf-render.c b/gdk/gdkpixbuf-render.c index 08ef3c4f33..ef920b8b66 100644 --- a/gdk/gdkpixbuf-render.c +++ b/gdk/gdkpixbuf-render.c @@ -22,7 +22,6 @@ #include <config.h> #include <gdk/gdk.h> -#include "gdkinternals.h" /* _gdk_draw_pixbuf() */ #include "gdk-pixbuf-private.h" #include "gdkpixbuf.h" #include "gdkscreen.h" @@ -164,6 +163,8 @@ gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf, * base position change, as in scrolling. The dither matrix has to be shifted * for consistent visual results. If you do not have any of these cases, the * dither offsets can be both zero. + * + * This function is obsolete. Use gdk_draw_pixbuf() instead. **/ void gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, @@ -175,28 +176,9 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkRgbDither dither, int x_dither, int y_dither) { - g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); - g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB); - g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4); - g_return_if_fail (pixbuf->bits_per_sample == 8); - - g_return_if_fail (drawable != NULL); - - if (width == -1) - width = pixbuf->width; - if (height == -1) - height = pixbuf->height; - - g_return_if_fail (width >= 0 && height >= 0); - g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width); - g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height); - - if (width == 0 || height == 0) - return; - - _gdk_draw_pixbuf (drawable, gc, pixbuf, - src_x, src_y, dest_x, dest_y, width, height, - dither, x_dither, y_dither); + gdk_draw_pixbuf (drawable, gc, pixbuf, + src_x, src_y, dest_x, dest_y, width, height, + dither, x_dither, y_dither); } @@ -224,6 +206,8 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, * * On older X servers, rendering pixbufs with an alpha channel involves round trips * to the X server, and may be somewhat slow. + * + * This function is obsolete. Use gdk_draw_pixbuf() instead. **/ void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, @@ -236,9 +220,9 @@ gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkRgbDither dither, int x_dither, int y_dither) { - _gdk_draw_pixbuf (drawable, NULL, pixbuf, - src_x, src_y, dest_x, dest_y, width, height, - dither, x_dither, y_dither); + gdk_draw_pixbuf (drawable, NULL, pixbuf, + src_x, src_y, dest_x, dest_y, width, height, + dither, x_dither, y_dither); } /** diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c index a6004b55f7..af90a7546a 100644 --- a/gdk/gdkpixmap.c +++ b/gdk/gdkpixmap.c @@ -200,7 +200,7 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass) drawable_class->draw_lines = gdk_pixmap_draw_lines; drawable_class->draw_glyphs = gdk_pixmap_draw_glyphs; drawable_class->draw_image = gdk_pixmap_draw_image; - drawable_class->_draw_pixbuf = gdk_pixmap_draw_pixbuf; + drawable_class->draw_pixbuf = gdk_pixmap_draw_pixbuf; drawable_class->get_depth = gdk_pixmap_real_get_depth; drawable_class->get_screen = gdk_pixmap_real_get_screen; drawable_class->get_size = gdk_pixmap_real_get_size; @@ -402,9 +402,9 @@ gdk_pixmap_draw_pixbuf (GdkDrawable *drawable, { GdkPixmapObject *private = (GdkPixmapObject *)drawable; - _gdk_draw_pixbuf (private->impl, gc, pixbuf, - src_x, src_y, dest_x, dest_y, width, height, - dither, x_dither, y_dither); + gdk_draw_pixbuf (private->impl, gc, pixbuf, + src_x, src_y, dest_x, dest_y, width, height, + dither, x_dither, y_dither); } static void @@ -528,10 +528,10 @@ gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap, render_pixbuf = pixbuf; tmp_gc = gdk_gc_new (pixmap); - gdk_pixbuf_render_to_drawable (render_pixbuf, pixmap, tmp_gc, 0, 0, 0, 0, - gdk_pixbuf_get_width (render_pixbuf), - gdk_pixbuf_get_height (render_pixbuf), - GDK_RGB_DITHER_NORMAL, 0, 0); + gdk_draw_pixbuf (pixmap, tmp_gc, render_pixbuf, 0, 0, 0, 0, + gdk_pixbuf_get_width (render_pixbuf), + gdk_pixbuf_get_height (render_pixbuf), + GDK_RGB_DITHER_NORMAL, 0, 0); g_object_unref (tmp_gc); if (render_pixbuf != pixbuf) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 5ed1ac0658..320b5dff5f 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -240,7 +240,7 @@ gdk_window_class_init (GdkWindowObjectClass *klass) drawable_class->draw_lines = gdk_window_draw_lines; drawable_class->draw_glyphs = gdk_window_draw_glyphs; drawable_class->draw_image = gdk_window_draw_image; - drawable_class->_draw_pixbuf = gdk_window_draw_pixbuf; + drawable_class->draw_pixbuf = gdk_window_draw_pixbuf; drawable_class->get_depth = gdk_window_real_get_depth; drawable_class->get_screen = gdk_window_real_get_screen; drawable_class->get_size = gdk_window_real_get_size; @@ -1945,16 +1945,16 @@ gdk_window_draw_pixbuf (GdkDrawable *drawable, if (private->paint_stack) { GdkWindowPaint *paint = private->paint_stack->data; - _gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y, - dest_x - x_offset, dest_y - y_offset, - width, height, - dither, x_dither - x_offset, y_dither - y_offset); + gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y, + dest_x - x_offset, dest_y - y_offset, + width, height, + dither, x_dither - x_offset, y_dither - y_offset); } else - _gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y, - dest_x - x_offset, dest_y - y_offset, - width, height, - dither, x_dither, y_dither); + gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y, + dest_x - x_offset, dest_y - y_offset, + width, height, + dither, x_dither, y_dither); RESTORE_GC (gc); } @@ -1966,16 +1966,16 @@ gdk_window_draw_pixbuf (GdkDrawable *drawable, if (private->paint_stack) { GdkWindowPaint *paint = private->paint_stack->data; - _gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y, - dest_x - x_offset, dest_y - y_offset, - width, height, + gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y, + dest_x - x_offset, dest_y - y_offset, + width, height, dither, x_dither - x_offset, y_dither - y_offset); } else - _gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y, - dest_x - x_offset, dest_y - y_offset, - width, height, - dither, x_dither, y_dither); + gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y, + dest_x - x_offset, dest_y - y_offset, + width, height, + dither, x_dither, y_dither); } } diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index 868c348d0c..d6ec59332d 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -202,7 +202,7 @@ gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass) drawable_class->draw_glyphs = gdk_x11_draw_glyphs; drawable_class->draw_image = gdk_x11_draw_image; #ifdef HAVE_XFT - drawable_class->_draw_pixbuf = gdk_x11_draw_pixbuf; + drawable_class->draw_pixbuf = gdk_x11_draw_pixbuf; #endif /* HAVE_XFT */ drawable_class->set_colormap = gdk_x11_set_colormap; @@ -1339,10 +1339,10 @@ gdk_x11_draw_pixbuf (GdkDrawable *drawable, (dither == GDK_RGB_DITHER_MAX && gdk_drawable_get_depth (drawable) != 24)) { GdkDrawable *wrapper = GDK_DRAWABLE_IMPL_X11 (drawable)->wrapper; - GDK_DRAWABLE_CLASS (parent_class)->_draw_pixbuf (wrapper, gc, pixbuf, - src_x, src_y, dest_x, dest_y, - width, height, - dither, x_dither, y_dither); + GDK_DRAWABLE_CLASS (parent_class)->draw_pixbuf (wrapper, gc, pixbuf, + src_x, src_y, dest_x, dest_y, + width, height, + dither, x_dither, y_dither); return; } diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index 1252d2eef2..9a9dffa2a7 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -446,17 +446,16 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell, pix_rect.height -= cell->ypad * 2; if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) - gdk_pixbuf_render_to_drawable_alpha (pixbuf, - window, - /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */ - draw_rect.x - pix_rect.x, - draw_rect.y - pix_rect.y, - draw_rect.x, - draw_rect.y, - draw_rect.width, - draw_rect.height, - GDK_PIXBUF_ALPHA_FULL, - 0, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (window, + widget->style->black_gc, + pixbuf, + /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */ + draw_rect.x - pix_rect.x, + draw_rect.y - pix_rect.y, + draw_rect.x, + draw_rect.y, + draw_rect.width, + draw_rect.height, + GDK_RGB_DITHER_NORMAL, + 0, 0); } diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 3ca712b65a..e94a049a4e 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -1424,17 +1424,17 @@ gtk_image_expose (GtkWidget *widget, if (pixbuf) { - gdk_pixbuf_render_to_drawable (pixbuf, - widget->window, - widget->style->black_gc, - image_bound.x - x, - image_bound.y - y, - image_bound.x, - image_bound.y, - image_bound.width, - image_bound.height, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (widget->window, + widget->style->black_gc, + pixbuf, + image_bound.x - x, + image_bound.y - y, + image_bound.x, + image_bound.y, + image_bound.width, + image_bound.height, + GDK_RGB_DITHER_NORMAL, + 0, 0); g_object_unref (G_OBJECT (pixbuf)); pixbuf = NULL; diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 0ca6237c5c..a89d03f6f5 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -756,12 +756,12 @@ gtk_label_set_mnemonic_widget (GtkLabel *label, g_return_if_fail (GTK_IS_WIDGET (widget)); if (label->mnemonic_widget) - g_object_weak_unref (label->mnemonic_widget, + g_object_weak_unref (G_OBJECT (label->mnemonic_widget), label_mnemonic_widget_weak_notify, label); label->mnemonic_widget = widget; if (label->mnemonic_widget) - g_object_weak_ref (label->mnemonic_widget, + g_object_weak_ref (G_OBJECT (label->mnemonic_widget), label_mnemonic_widget_weak_notify, label); diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c index e37ae0bad7..d7f6a86190 100644 --- a/gtk/gtkpixmap.c +++ b/gtk/gtkpixmap.c @@ -287,14 +287,14 @@ build_insensitive_pixmap (GtkPixmap *gtkpixmap) insensitive = gdk_pixmap_new (GTK_WIDGET (gtkpixmap)->window, w, h, -1); - gdk_pixbuf_render_to_drawable (stated, - insensitive, - GTK_WIDGET (gtkpixmap)->style->white_gc, - 0, 0, - 0, 0, - w, h, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (insensitive, + GTK_WIDGET (gtkpixmap)->style->white_gc, + stated, + 0, 0, + 0, 0, + w, h, + GDK_RGB_DITHER_NORMAL, + 0, 0); gtkpixmap->pixmap_insensitive = insensitive; diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index 75b3fc932c..b1c4ceebe6 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -395,16 +395,16 @@ render_layout_line (GdkDrawable *drawable, pixbuf_rect.x, pixbuf_rect.y); } - gdk_pixbuf_render_to_drawable (pixbuf, - drawable, - render_state->fg_gc, - draw_rect.x - pixbuf_rect.x, - draw_rect.y - pixbuf_rect.y, - draw_rect.x, draw_rect.y, - draw_rect.width, - draw_rect.height, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (drawable, + render_state->fg_gc, + pixbuf, + draw_rect.x - pixbuf_rect.x, + draw_rect.y - pixbuf_rect.y, + draw_rect.x, draw_rect.y, + draw_rect.width, + draw_rect.height, + GDK_RGB_DITHER_NORMAL, + 0, 0); if (mask) { diff --git a/tests/testrgb.c b/tests/testrgb.c index 9a61f92f88..3b8d80ed7d 100644 --- a/tests/testrgb.c +++ b/tests/testrgb.c @@ -151,12 +151,11 @@ testrgb_rgb_test (GtkWidget *drawing_area) pixbuf = gdk_pixbuf_new_from_data (buf + offset, GDK_COLORSPACE_RGB, TRUE, 8, WIDTH, HEIGHT, WIDTH * 4, NULL, NULL); - gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawing_area->window, - 0, 0, 0, 0, WIDTH, HEIGHT, - GDK_PIXBUF_ALPHA_FULL, /* ignored */ - 0x80, /* ignored */ - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (drawing_area->window, drawing_area->style->black_gc, + pixbuf, + 0, 0, 0, 0, WIDTH, HEIGHT, + GDK_RGB_DITHER_NORMAL, + 0, 0); gdk_pixbuf_unref (pixbuf); } gdk_flush (); |