Commit 6cb79658 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

Export _gdk_draw_pixbuf as gdk_draw_pixbuf(), rename the _draw_pixbuf

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.i
parent ed521b3c
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> Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add
......
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> Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add
......
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> Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add
......
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> Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add
......
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> Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add
......
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> Wed Oct 2 17:36:42 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add * gdk/gdkevents.[ch] gdk/x11/gdkevents-x11.c: Add
......
...@@ -42,7 +42,7 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) ...@@ -42,7 +42,7 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
interp_type, overall_alpha, interp_type, overall_alpha,
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555); event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest,
0, 0, event->area.x, event->area.y, 0, 0, event->area.x, event->area.y,
event->area.width, event->area.height, event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
......
...@@ -335,7 +335,7 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data) ...@@ -335,7 +335,7 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
GDK_INTERP_BILINEAR, 255, GDK_INTERP_BILINEAR, 255,
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555); 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], gdk_draw_pixbuf (drawing_area->window, drawing_area->style->fg_gc[GTK_STATE_NORMAL], dest,
0, 0, event->area.x, event->area.y, 0, 0, event->area.x, event->area.y,
event->area.width, event->area.height, event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
......
...@@ -96,7 +96,7 @@ gdk_drawable_class_init (GdkDrawableClass *klass) ...@@ -96,7 +96,7 @@ gdk_drawable_class_init (GdkDrawableClass *klass)
/* Default implementation for clip and visible region is the same */ /* Default implementation for clip and visible region is the same */
klass->get_clip_region = gdk_drawable_real_get_visible_region; klass->get_clip_region = gdk_drawable_real_get_visible_region;
klass->get_visible_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 /* Manipulation of drawables
...@@ -584,7 +584,7 @@ gdk_draw_image (GdkDrawable *drawable, ...@@ -584,7 +584,7 @@ gdk_draw_image (GdkDrawable *drawable,
} }
/** /**
* _gdk_draw_pixbuf: * gdk_draw_pixbuf:
* @drawable: Destination drawable. * @drawable: Destination drawable.
* @gc: a #GdkGC, used for clipping, or %NULL * @gc: a #GdkGC, used for clipping, or %NULL
* @pixbuf: a #GdkPixbuf * @pixbuf: a #GdkPixbuf
...@@ -607,7 +607,7 @@ gdk_draw_image (GdkDrawable *drawable, ...@@ -607,7 +607,7 @@ gdk_draw_image (GdkDrawable *drawable,
* to the X server, and may be somewhat slow. * to the X server, and may be somewhat slow.
**/ **/
void void
_gdk_draw_pixbuf (GdkDrawable *drawable, gdk_draw_pixbuf (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
GdkPixbuf *pixbuf, GdkPixbuf *pixbuf,
gint src_x, gint src_x,
...@@ -629,7 +629,7 @@ _gdk_draw_pixbuf (GdkDrawable *drawable, ...@@ -629,7 +629,7 @@ _gdk_draw_pixbuf (GdkDrawable *drawable,
if (height == -1) if (height == -1)
height = gdk_pixbuf_get_height (pixbuf); height = gdk_pixbuf_get_height (pixbuf);
GDK_DRAWABLE_GET_CLASS (drawable)->_draw_pixbuf (drawable, gc, pixbuf, GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc, pixbuf,
src_x, src_y, dest_x, dest_y, width, height, src_x, src_y, dest_x, dest_y, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
} }
......
...@@ -134,7 +134,7 @@ struct _GdkDrawableClass ...@@ -134,7 +134,7 @@ struct _GdkDrawableClass
gint *composite_x_offset, gint *composite_x_offset,
gint *composite_y_offset); gint *composite_y_offset);
void (*_draw_pixbuf) (GdkDrawable *drawable, void (*draw_pixbuf) (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
GdkPixbuf *pixbuf, GdkPixbuf *pixbuf,
gint src_x, gint src_x,
...@@ -288,6 +288,18 @@ void gdk_draw_lines (GdkDrawable *drawable, ...@@ -288,6 +288,18 @@ void gdk_draw_lines (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
GdkPoint *points, GdkPoint *points,
gint npoints); 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, void gdk_draw_glyphs (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
......
...@@ -286,6 +286,8 @@ gdk_event_is_allocated (GdkEvent *event) ...@@ -286,6 +286,8 @@ gdk_event_is_allocated (GdkEvent *event)
{ {
if (event_hash) if (event_hash)
return g_hash_table_lookup (event_hash, event) != NULL; return g_hash_table_lookup (event_hash, event) != NULL;
return FALSE;
} }
/** /**
...@@ -414,7 +416,7 @@ gdk_event_free (GdkEvent *event) ...@@ -414,7 +416,7 @@ gdk_event_free (GdkEvent *event)
break; break;
} }
g_hash_table_remove (event_chunk, event); g_hash_table_remove (event_hash, event);
g_mem_chunk_free (event_chunk, event); g_mem_chunk_free (event_chunk, event);
} }
......
...@@ -157,6 +157,7 @@ struct _GdkEventPrivate ...@@ -157,6 +157,7 @@ struct _GdkEventPrivate
{ {
GdkEvent event; GdkEvent event;
guint flags; guint flags;
GdkScreen *screen;
}; };
extern GdkEventFunc _gdk_event_func; /* Callback for events */ extern GdkEventFunc _gdk_event_func; /* Callback for events */
...@@ -202,20 +203,6 @@ GdkImage *_gdk_image_get_scratch (GdkScreen *screen, ...@@ -202,20 +203,6 @@ GdkImage *_gdk_image_get_scratch (GdkScreen *screen,
gint *x, gint *x,
gint *y); 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 *_gdk_drawable_copy_to_image (GdkDrawable *drawable,
GdkImage *image, GdkImage *image,
gint src_x, gint src_x,
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include "gdkinternals.h" /* _gdk_draw_pixbuf() */
#include "gdk-pixbuf-private.h" #include "gdk-pixbuf-private.h"
#include "gdkpixbuf.h" #include "gdkpixbuf.h"
#include "gdkscreen.h" #include "gdkscreen.h"
...@@ -164,6 +163,8 @@ gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf, ...@@ -164,6 +163,8 @@ gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf,
* base position change, as in scrolling. The dither matrix has to be shifted * 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 * for consistent visual results. If you do not have any of these cases, the
* dither offsets can be both zero. * dither offsets can be both zero.
*
* This function is obsolete. Use gdk_draw_pixbuf() instead.
**/ **/
void void
gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
...@@ -175,26 +176,7 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, ...@@ -175,26 +176,7 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
GdkRgbDither dither, GdkRgbDither dither,
int x_dither, int y_dither) int x_dither, int y_dither)
{ {
g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); gdk_draw_pixbuf (drawable, gc, 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, src_x, src_y, dest_x, dest_y, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
} }
...@@ -224,6 +206,8 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, ...@@ -224,6 +206,8 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
* *
* On older X servers, rendering pixbufs with an alpha channel involves round trips * On older X servers, rendering pixbufs with an alpha channel involves round trips
* to the X server, and may be somewhat slow. * to the X server, and may be somewhat slow.
*
* This function is obsolete. Use gdk_draw_pixbuf() instead.
**/ **/
void void
gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf,
...@@ -236,7 +220,7 @@ gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, ...@@ -236,7 +220,7 @@ gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf,
GdkRgbDither dither, GdkRgbDither dither,
int x_dither, int y_dither) int x_dither, int y_dither)
{ {
_gdk_draw_pixbuf (drawable, NULL, pixbuf, gdk_draw_pixbuf (drawable, NULL, pixbuf,
src_x, src_y, dest_x, dest_y, width, height, src_x, src_y, dest_x, dest_y, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
} }
......
...@@ -200,7 +200,7 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass) ...@@ -200,7 +200,7 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass)
drawable_class->draw_lines = gdk_pixmap_draw_lines; drawable_class->draw_lines = gdk_pixmap_draw_lines;
drawable_class->draw_glyphs = gdk_pixmap_draw_glyphs; drawable_class->draw_glyphs = gdk_pixmap_draw_glyphs;
drawable_class->draw_image = gdk_pixmap_draw_image; 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_depth = gdk_pixmap_real_get_depth;
drawable_class->get_screen = gdk_pixmap_real_get_screen; drawable_class->get_screen = gdk_pixmap_real_get_screen;
drawable_class->get_size = gdk_pixmap_real_get_size; drawable_class->get_size = gdk_pixmap_real_get_size;
...@@ -402,7 +402,7 @@ gdk_pixmap_draw_pixbuf (GdkDrawable *drawable, ...@@ -402,7 +402,7 @@ gdk_pixmap_draw_pixbuf (GdkDrawable *drawable,
{ {
GdkPixmapObject *private = (GdkPixmapObject *)drawable; GdkPixmapObject *private = (GdkPixmapObject *)drawable;
_gdk_draw_pixbuf (private->impl, gc, pixbuf, gdk_draw_pixbuf (private->impl, gc, pixbuf,
src_x, src_y, dest_x, dest_y, width, height, src_x, src_y, dest_x, dest_y, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
} }
...@@ -528,7 +528,7 @@ gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap, ...@@ -528,7 +528,7 @@ gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
render_pixbuf = pixbuf; render_pixbuf = pixbuf;
tmp_gc = gdk_gc_new (pixmap); tmp_gc = gdk_gc_new (pixmap);
gdk_pixbuf_render_to_drawable (render_pixbuf, pixmap, tmp_gc, 0, 0, 0, 0, gdk_draw_pixbuf (pixmap, tmp_gc, render_pixbuf, 0, 0, 0, 0,
gdk_pixbuf_get_width (render_pixbuf), gdk_pixbuf_get_width (render_pixbuf),
gdk_pixbuf_get_height (render_pixbuf), gdk_pixbuf_get_height (render_pixbuf),
GDK_RGB_DITHER_NORMAL, 0, 0); GDK_RGB_DITHER_NORMAL, 0, 0);
......
...@@ -240,7 +240,7 @@ gdk_window_class_init (GdkWindowObjectClass *klass) ...@@ -240,7 +240,7 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
drawable_class->draw_lines = gdk_window_draw_lines; drawable_class->draw_lines = gdk_window_draw_lines;
drawable_class->draw_glyphs = gdk_window_draw_glyphs; drawable_class->draw_glyphs = gdk_window_draw_glyphs;
drawable_class->draw_image = gdk_window_draw_image; 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_depth = gdk_window_real_get_depth;
drawable_class->get_screen = gdk_window_real_get_screen; drawable_class->get_screen = gdk_window_real_get_screen;
drawable_class->get_size = gdk_window_real_get_size; drawable_class->get_size = gdk_window_real_get_size;
...@@ -1945,13 +1945,13 @@ gdk_window_draw_pixbuf (GdkDrawable *drawable, ...@@ -1945,13 +1945,13 @@ gdk_window_draw_pixbuf (GdkDrawable *drawable,
if (private->paint_stack) if (private->paint_stack)
{ {
GdkWindowPaint *paint = private->paint_stack->data; GdkWindowPaint *paint = private->paint_stack->data;
_gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y, gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y,
dest_x - x_offset, dest_y - y_offset, dest_x - x_offset, dest_y - y_offset,
width, height, width, height,
dither, x_dither - x_offset, y_dither - y_offset); dither, x_dither - x_offset, y_dither - y_offset);
} }
else else
_gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y, gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y,
dest_x - x_offset, dest_y - y_offset, dest_x - x_offset, dest_y - y_offset,
width, height, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
...@@ -1966,13 +1966,13 @@ gdk_window_draw_pixbuf (GdkDrawable *drawable, ...@@ -1966,13 +1966,13 @@ gdk_window_draw_pixbuf (GdkDrawable *drawable,
if (private->paint_stack) if (private->paint_stack)
{ {
GdkWindowPaint *paint = private->paint_stack->data; GdkWindowPaint *paint = private->paint_stack->data;
_gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y, gdk_draw_pixbuf (paint->pixmap, gc, pixbuf, src_x, src_y,
dest_x - x_offset, dest_y - y_offset, dest_x - x_offset, dest_y - y_offset,
width, height, width, height,
dither, x_dither - x_offset, y_dither - y_offset); dither, x_dither - x_offset, y_dither - y_offset);
} }
else else
_gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y, gdk_draw_pixbuf (private->impl, gc, pixbuf, src_x, src_y,
dest_x - x_offset, dest_y - y_offset, dest_x - x_offset, dest_y - y_offset,
width, height, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
......
...@@ -202,7 +202,7 @@ gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass) ...@@ -202,7 +202,7 @@ gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass)
drawable_class->draw_glyphs = gdk_x11_draw_glyphs; drawable_class->draw_glyphs = gdk_x11_draw_glyphs;
drawable_class->draw_image = gdk_x11_draw_image; drawable_class->draw_image = gdk_x11_draw_image;
#ifdef HAVE_XFT #ifdef HAVE_XFT
drawable_class->_draw_pixbuf = gdk_x11_draw_pixbuf; drawable_class->draw_pixbuf = gdk_x11_draw_pixbuf;
#endif /* HAVE_XFT */ #endif /* HAVE_XFT */
drawable_class->set_colormap = gdk_x11_set_colormap; drawable_class->set_colormap = gdk_x11_set_colormap;
...@@ -1339,7 +1339,7 @@ gdk_x11_draw_pixbuf (GdkDrawable *drawable, ...@@ -1339,7 +1339,7 @@ gdk_x11_draw_pixbuf (GdkDrawable *drawable,
(dither == GDK_RGB_DITHER_MAX && gdk_drawable_get_depth (drawable) != 24)) (dither == GDK_RGB_DITHER_MAX && gdk_drawable_get_depth (drawable) != 24))
{ {
GdkDrawable *wrapper = GDK_DRAWABLE_IMPL_X11 (drawable)->wrapper; GdkDrawable *wrapper = GDK_DRAWABLE_IMPL_X11 (drawable)->wrapper;
GDK_DRAWABLE_CLASS (parent_class)->_draw_pixbuf (wrapper, gc, pixbuf, GDK_DRAWABLE_CLASS (parent_class)->draw_pixbuf (wrapper, gc, pixbuf,
src_x, src_y, dest_x, dest_y, src_x, src_y, dest_x, dest_y,
width, height, width, height,
dither, x_dither, y_dither); dither, x_dither, y_dither);
......
...@@ -446,8 +446,9 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell, ...@@ -446,8 +446,9 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
pix_rect.height -= cell->ypad * 2; pix_rect.height -= cell->ypad * 2;
if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
gdk_pixbuf_render_to_drawable_alpha (pixbuf, gdk_draw_pixbuf (window,
window, widget->style->black_gc,
pixbuf,
/* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */ /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
draw_rect.x - pix_rect.x, draw_rect.x - pix_rect.x,
draw_rect.y - pix_rect.y, draw_rect.y - pix_rect.y,
...@@ -455,8 +456,6 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell, ...@@ -455,8 +456,6 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
draw_rect.y, draw_rect.y,
draw_rect.width,