update to allow a GdkDrawable instead of a GdkWindow.

Tue Dec 10 00:49:35 2002  Kristian Rietveld  <kris@gtk.org>

        * gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
        (gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
        (gdk_pixmap_create_from_xpm_d),
        (gdk_pixmap_colormap_create_from_xpm_d): update to allow a
        GdkDrawable instead of a GdkWindow.

        * gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
        (gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
        (gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
        instead of a GdkWindow.

        * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
        (gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
        to allow a GdkDrawable instead of a GdkWindow.

        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
        (gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
This commit is contained in:
Kristian Rietveld 2002-12-09 23:34:49 +00:00 committed by Kristian Rietveld
parent 7c2489e953
commit 00185e7ed1
10 changed files with 190 additions and 70 deletions

View File

@ -1,3 +1,23 @@
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 17:31:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (icon_size_lookup_intern): Remove

View File

@ -1,3 +1,23 @@
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 17:31:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (icon_size_lookup_intern): Remove

View File

@ -1,3 +1,23 @@
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 17:31:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (icon_size_lookup_intern): Remove

View File

@ -1,3 +1,23 @@
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 17:31:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (icon_size_lookup_intern): Remove

View File

@ -1,3 +1,23 @@
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 17:31:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (icon_size_lookup_intern): Remove

View File

@ -1,3 +1,23 @@
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 17:31:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (icon_size_lookup_intern): Remove

View File

@ -551,7 +551,7 @@ gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
}
GdkPixmap*
gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
GdkColormap *colormap,
GdkBitmap **mask,
GdkColor *transparent_color,
@ -560,12 +560,12 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
g_return_val_if_fail (window != NULL || colormap != NULL, NULL);
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (drawable != NULL || colormap != NULL, NULL);
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (colormap == NULL || GDK_IS_COLORMAP (colormap), NULL);
if (colormap == NULL)
colormap = gdk_drawable_get_colormap (window);
colormap = gdk_drawable_get_colormap (drawable);
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
if (!pixbuf)
@ -579,17 +579,17 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
}
GdkPixmap*
gdk_pixmap_create_from_xpm (GdkWindow *window,
GdkBitmap **mask,
GdkColor *transparent_color,
gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
GdkBitmap **mask,
GdkColor *transparent_color,
const gchar *filename)
{
return gdk_pixmap_colormap_create_from_xpm (window, NULL, mask,
return gdk_pixmap_colormap_create_from_xpm (drawable, NULL, mask,
transparent_color, filename);
}
GdkPixmap*
gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
GdkColormap *colormap,
GdkBitmap **mask,
GdkColor *transparent_color,
@ -598,12 +598,12 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
g_return_val_if_fail (window != NULL || colormap != NULL, NULL);
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (drawable != NULL || colormap != NULL, NULL);
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (colormap == NULL || GDK_IS_COLORMAP (colormap), NULL);
if (colormap == NULL)
colormap = gdk_drawable_get_colormap (window);
colormap = gdk_drawable_get_colormap (drawable);
pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)data);
if (!pixbuf)
@ -617,12 +617,12 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
}
GdkPixmap*
gdk_pixmap_create_from_xpm_d (GdkWindow *window,
GdkBitmap **mask,
GdkColor *transparent_color,
gchar **data)
gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
GdkBitmap **mask,
GdkColor *transparent_color,
gchar **data)
{
return gdk_pixmap_colormap_create_from_xpm_d (window, NULL, mask,
return gdk_pixmap_colormap_create_from_xpm_d (drawable, NULL, mask,
transparent_color, data);
}

View File

@ -38,15 +38,15 @@ GType gdk_pixmap_get_type (void) G_GNUC_CONST;
/* Pixmaps
*/
GdkPixmap* gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth);
GdkBitmap* gdk_bitmap_create_from_data (GdkWindow *window,
GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable,
gint width,
gint height,
gint depth);
GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height);
GdkPixmap* gdk_pixmap_create_from_data (GdkWindow *window,
GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height,
@ -54,20 +54,20 @@ GdkPixmap* gdk_pixmap_create_from_data (GdkWindow *window,
GdkColor *fg,
GdkColor *bg);
GdkPixmap* gdk_pixmap_create_from_xpm (GdkWindow *window,
GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
GdkBitmap **mask,
GdkColor *transparent_color,
const gchar *filename);
GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
GdkColormap *colormap,
GdkBitmap **mask,
GdkColor *transparent_color,
const gchar *filename);
GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkWindow *window,
GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
GdkBitmap **mask,
GdkColor *transparent_color,
gchar **data);
GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
GdkColormap *colormap,
GdkBitmap **mask,
GdkColor *transparent_color,

View File

@ -112,15 +112,15 @@ _gdk_pixmap_impl_get_type (void)
}
GdkPixmap*
gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth)
gdk_pixmap_new (GdkDrawable *window,
gint width,
gint height,
gint depth)
{
GdkPixmap *pixmap;
GdkDrawableFBData *private;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
@ -148,7 +148,7 @@ gdk_pixmap_new (GdkWindow *window,
}
GdkPixmap *
gdk_bitmap_create_from_data (GdkWindow *window,
gdk_bitmap_create_from_data (GdkDrawable *window,
const gchar *data,
gint width,
gint height)
@ -157,7 +157,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
if (!window)
window = _gdk_parent_root;
@ -170,7 +170,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
}
GdkPixmap*
gdk_pixmap_create_from_data (GdkWindow *window,
gdk_pixmap_create_from_data (GdkDrawable *window,
const gchar *data,
gint width,
gint height,
@ -180,7 +180,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
{
GdkPixmap *pixmap;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);

View File

@ -164,10 +164,10 @@ gdk_pixmap_impl_x11_get_size (GdkDrawable *drawable,
}
GdkPixmap*
gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth)
gdk_pixmap_new (GdkDrawable *drawable,
gint width,
gint height,
gint depth)
{
GdkPixmap *pixmap;
GdkDrawableImplX11 *draw_impl;
@ -175,21 +175,21 @@ gdk_pixmap_new (GdkWindow *window,
GdkColormap *cmap;
gint window_depth;
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail ((drawable != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
if (!drawable)
{
GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window "
"for gdk_pixmap_new() to be multihead safe"));
window = gdk_screen_get_root_window (gdk_screen_get_default ());
drawable = gdk_screen_get_root_window (gdk_screen_get_default ());
}
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (drawable) && GDK_WINDOW_DESTROYED (drawable))
return NULL;
window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (window));
window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (drawable));
if (depth == -1)
depth = window_depth;
@ -198,9 +198,9 @@ gdk_pixmap_new (GdkWindow *window,
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
draw_impl->screen = GDK_WINDOW_SCREEN (window);
draw_impl->screen = GDK_WINDOW_SCREEN (drawable);
draw_impl->xid = XCreatePixmap (GDK_PIXMAP_XDISPLAY (pixmap),
GDK_WINDOW_XID (window),
GDK_WINDOW_XID (drawable),
width, height, depth);
pix_impl->is_foreign = FALSE;
@ -210,18 +210,18 @@ gdk_pixmap_new (GdkWindow *window,
if (depth == window_depth)
{
cmap = gdk_drawable_get_colormap (window);
cmap = gdk_drawable_get_colormap (drawable);
if (cmap)
gdk_drawable_set_colormap (pixmap, cmap);
}
_gdk_xid_table_insert (GDK_WINDOW_DISPLAY (window),
_gdk_xid_table_insert (GDK_WINDOW_DISPLAY (drawable),
&GDK_PIXMAP_XID (pixmap), pixmap);
return pixmap;
}
GdkPixmap *
gdk_bitmap_create_from_data (GdkWindow *window,
gdk_bitmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height)
@ -232,16 +232,16 @@ gdk_bitmap_create_from_data (GdkWindow *window,
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
if (!window)
if (!drawable)
{
GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window "
"for gdk_bitmap_create_from_data() to be multihead safe"));
window = gdk_screen_get_root_window (gdk_screen_get_default ());
drawable = gdk_screen_get_root_window (gdk_screen_get_default ());
}
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (drawable) && GDK_WINDOW_DESTROYED (drawable))
return NULL;
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
@ -254,18 +254,18 @@ gdk_bitmap_create_from_data (GdkWindow *window,
pix_impl->height = height;
GDK_PIXMAP_OBJECT (pixmap)->depth = 1;
draw_impl->screen = GDK_WINDOW_SCREEN (window);
draw_impl->xid = XCreateBitmapFromData (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
draw_impl->screen = GDK_WINDOW_SCREEN (drawable);
draw_impl->xid = XCreateBitmapFromData (GDK_WINDOW_XDISPLAY (drawable),
GDK_WINDOW_XID (drawable),
(char *)data, width, height);
_gdk_xid_table_insert (GDK_WINDOW_DISPLAY (window),
_gdk_xid_table_insert (GDK_WINDOW_DISPLAY (drawable),
&GDK_PIXMAP_XID (pixmap), pixmap);
return pixmap;
}
GdkPixmap*
gdk_pixmap_create_from_data (GdkWindow *window,
gdk_pixmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height,
@ -277,25 +277,25 @@ gdk_pixmap_create_from_data (GdkWindow *window,
GdkDrawableImplX11 *draw_impl;
GdkPixmapImplX11 *pix_impl;
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((drawable != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
if (!drawable)
{
GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window"
"for gdk_pixmap_create_from_data() to be multihead safe"));
window = gdk_screen_get_root_window (gdk_screen_get_default ());
drawable = gdk_screen_get_root_window (gdk_screen_get_default ());
}
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (drawable) && GDK_WINDOW_DESTROYED (drawable))
return NULL;
if (depth == -1)
depth = gdk_drawable_get_visual (window)->depth;
depth = gdk_drawable_get_visual (drawable)->depth;
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
@ -307,13 +307,13 @@ gdk_pixmap_create_from_data (GdkWindow *window,
pix_impl->height = height;
GDK_PIXMAP_OBJECT (pixmap)->depth = depth;
draw_impl->screen = GDK_DRAWABLE_SCREEN (window);
draw_impl->xid = XCreatePixmapFromBitmapData (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
draw_impl->screen = GDK_DRAWABLE_SCREEN (drawable);
draw_impl->xid = XCreatePixmapFromBitmapData (GDK_WINDOW_XDISPLAY (drawable),
GDK_WINDOW_XID (drawable),
(char *)data, width, height,
fg->pixel, bg->pixel, depth);
_gdk_xid_table_insert (GDK_WINDOW_DISPLAY (window),
_gdk_xid_table_insert (GDK_WINDOW_DISPLAY (drawable),
&GDK_PIXMAP_XID (pixmap), pixmap);
return pixmap;
}