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
This commit is contained in:
Owen Taylor 2002-10-02 22:30:37 +00:00 committed by Owen Taylor
parent ed521b3cfd
commit 6cb79658c2
22 changed files with 287 additions and 148 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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 {

View File

@ -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

View File

@ -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,

View File

@ -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);
}

View File

@ -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,

View File

@ -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);
}
/**

View File

@ -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)

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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)
{

View File

@ -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 ();