diff options
author | Benjamin Otte <otte@redhat.com> | 2010-08-27 17:05:48 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:11:30 +0200 |
commit | f74f9b276658b2c4cdcaca4b19e7c860e70e0491 (patch) | |
tree | e06b49e3d25fb3314a5390945b6633ea9c234829 /gdk/x11 | |
parent | cadcd029a1dad1d508fb0019d7e4697ac2513d51 (diff) | |
download | gtk+-f74f9b276658b2c4cdcaca4b19e7c860e70e0491.tar.gz |
gdk: Remove GdkPixmap
All iusers of it are gone, so it's now time to let go.
cairo_surface_t is a full replacement, combined with
gdk_window_create_similar_surface().
Diffstat (limited to 'gdk/x11')
-rw-r--r-- | gdk/x11/Makefile.am | 2 | ||||
-rw-r--r-- | gdk/x11/gdkcursor-x11.c | 2 | ||||
-rw-r--r-- | gdk/x11/gdkdrawable-x11.c | 23 | ||||
-rw-r--r-- | gdk/x11/gdkdrawable-x11.h | 1 | ||||
-rw-r--r-- | gdk/x11/gdkim-x11.c | 1 | ||||
-rw-r--r-- | gdk/x11/gdkpixmap-x11.c | 361 | ||||
-rw-r--r-- | gdk/x11/gdkpixmap-x11.h | 68 | ||||
-rw-r--r-- | gdk/x11/gdkprivate-x11.h | 10 | ||||
-rw-r--r-- | gdk/x11/gdkscreen-x11.c | 9 | ||||
-rw-r--r-- | gdk/x11/gdkx.h | 9 | ||||
-rw-r--r-- | gdk/x11/gdkxid.c | 10 |
11 files changed, 18 insertions, 478 deletions
diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am index c83b7cd49d..f0d45c2d9c 100644 --- a/gdk/x11/Makefile.am +++ b/gdk/x11/Makefile.am @@ -43,8 +43,6 @@ libgdk_x11_la_SOURCES = \ gdkinput.c \ gdkkeys-x11.c \ gdkmain-x11.c \ - gdkpixmap-x11.c \ - gdkpixmap-x11.h \ gdkproperty-x11.c \ gdkscreen-x11.c \ gdkscreen-x11.h \ diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 1ef1a5000b..67ce6d4a02 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -41,9 +41,7 @@ #include "gdkprivate-x11.h" #include "gdkcursor.h" #include "gdkdisplay-x11.h" -#include "gdkpixmap-x11.h" #include "gdkx.h" -#include <gdk/gdkpixmap.h> #include <gdk-pixbuf/gdk-pixbuf.h> static guint theme_serial = 0; diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index 2fff65e938..a715bd1246 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -35,7 +35,6 @@ #include "gdkprivate-x11.h" #include "gdkdrawable-x11.h" -#include "gdkpixmap-x11.h" #include "gdkscreen-x11.h" #include "gdkdisplay-x11.h" @@ -95,8 +94,7 @@ gdk_drawable_impl_x11_finalize (GObject *object) * _gdk_x11_drawable_finish: * @drawable: a #GdkDrawableImplX11. * - * Performs necessary cleanup prior to freeing a pixmap or - * destroying a window. + * Performs necessary cleanup prior to destroying a window. **/ void _gdk_x11_drawable_finish (GdkDrawable *drawable) @@ -177,11 +175,9 @@ get_impl_drawable (GdkDrawable *drawable) { if (GDK_IS_WINDOW (drawable)) return ((GdkWindowObject *)drawable)->impl; - else if (GDK_IS_PIXMAP (drawable)) - return ((GdkPixmapObject *)drawable)->impl; else { - g_warning (G_STRLOC " drawable is not a pixmap or window"); + g_warning (G_STRLOC " drawable is not a window"); return NULL; } } @@ -222,7 +218,7 @@ gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable) * gdk_x11_drawable_get_xid: * @drawable: a #GdkDrawable. * - * Returns the X resource (window or pixmap) belonging to a #GdkDrawable. + * Returns the X resource (window) belonging to a #GdkDrawable. * * Return value: the ID of @drawable's X resource. **/ @@ -255,11 +251,9 @@ gdk_x11_drawable_get_xid (GdkDrawable *drawable) impl = ((GdkWindowObject *)drawable)->impl; } - else if (GDK_IS_PIXMAP (drawable)) - impl = ((GdkPixmapObject *)drawable)->impl; else { - g_warning (G_STRLOC " drawable is not a pixmap or window"); + g_warning (G_STRLOC " drawable is not a window"); return None; } @@ -271,11 +265,6 @@ gdk_x11_window_get_drawable_impl (GdkWindow *window) { return ((GdkWindowObject *)window)->impl; } -GdkDrawable * -gdk_x11_pixmap_get_drawable_impl (GdkPixmap *pixmap) -{ - return ((GdkPixmapObject *)pixmap)->impl; -} static void gdk_x11_cairo_surface_destroy (void *data) @@ -317,9 +306,7 @@ gdk_x11_create_cairo_surface (GdkDrawable *drawable, { g_warning ("Using Cairo rendering requires the drawable argument to\n" "have a specified colormap. All windows have a colormap,\n" - "however, pixmaps only have colormap by default if they\n" - "were created with a non-NULL window argument. Otherwise\n" - "a colormap must be set on them with gdk_drawable_set_colormap"); + "so why is this code even reached?"); return NULL; } diff --git a/gdk/x11/gdkdrawable-x11.h b/gdk/x11/gdkdrawable-x11.h index 7d243dbd9d..f499455110 100644 --- a/gdk/x11/gdkdrawable-x11.h +++ b/gdk/x11/gdkdrawable-x11.h @@ -74,7 +74,6 @@ GType _gdk_drawable_impl_x11_get_type (void); void _gdk_x11_drawable_finish (GdkDrawable *drawable); void _gdk_x11_drawable_update_size (GdkDrawable *drawable); GdkDrawable *gdk_x11_window_get_drawable_impl (GdkWindow *window); -GdkDrawable *gdk_x11_pixmap_get_drawable_impl (GdkPixmap *pixmap); G_END_DECLS diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c index 9fabd77026..53c7aa6733 100644 --- a/gdk/x11/gdkim-x11.c +++ b/gdk/x11/gdkim-x11.c @@ -32,7 +32,6 @@ #include "gdkx.h" #include "gdk.h" /* For gdk_flush() */ -#include "gdkpixmap.h" #include "gdkinternals.h" #include "gdkdisplay-x11.h" diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c deleted file mode 100644 index d41552c229..0000000000 --- a/gdk/x11/gdkpixmap-x11.c +++ /dev/null @@ -1,361 +0,0 @@ -/* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include "config.h" -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -/* Needed for SEEK_END in SunOS */ -#include <unistd.h> -#include <X11/Xlib.h> - -#include "gdkx.h" - -#include "gdkpixmap-x11.h" -#include "gdkprivate-x11.h" -#include "gdkscreen-x11.h" -#include "gdkdisplay-x11.h" - -#include <gdk/gdkinternals.h> - - -typedef struct -{ - gchar *color_string; - GdkColor color; - gint transparent; -} _GdkPixmapColor; - -typedef struct -{ - guint ncolors; - GdkColormap *colormap; - gulong pixels[1]; -} _GdkPixmapInfo; - -static void gdk_pixmap_impl_x11_get_size (GdkDrawable *drawable, - gint *width, - gint *height); - -static void gdk_pixmap_impl_x11_dispose (GObject *object); -static void gdk_pixmap_impl_x11_finalize (GObject *object); - -G_DEFINE_TYPE (GdkPixmapImplX11, gdk_pixmap_impl_x11, GDK_TYPE_DRAWABLE_IMPL_X11) - -GType -_gdk_pixmap_impl_get_type (void) -{ - return gdk_pixmap_impl_x11_get_type (); -} - -static void -gdk_pixmap_impl_x11_init (GdkPixmapImplX11 *impl) -{ - impl->width = 1; - impl->height = 1; -} - -static void -gdk_pixmap_impl_x11_class_init (GdkPixmapImplX11Class *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass); - - object_class->dispose = gdk_pixmap_impl_x11_dispose; - object_class->finalize = gdk_pixmap_impl_x11_finalize; - - drawable_class->get_size = gdk_pixmap_impl_x11_get_size; -} - -static void -gdk_pixmap_impl_x11_dispose (GObject *object) -{ - GdkPixmapImplX11 *impl = GDK_PIXMAP_IMPL_X11 (object); - GdkPixmap *wrapper = GDK_PIXMAP (GDK_DRAWABLE_IMPL_X11 (impl)->wrapper); - GdkDisplay *display = GDK_PIXMAP_DISPLAY (wrapper); - - if (!display->closed) - { - if (!impl->is_foreign) - XFreePixmap (GDK_DISPLAY_XDISPLAY (display), GDK_PIXMAP_XID (wrapper)); - } - - _gdk_xid_table_remove (display, GDK_PIXMAP_XID (wrapper)); - - G_OBJECT_CLASS (gdk_pixmap_impl_x11_parent_class)->dispose (object); -} - -static void -gdk_pixmap_impl_x11_finalize (GObject *object) -{ - GdkPixmapImplX11 *impl = GDK_PIXMAP_IMPL_X11 (object); - GdkPixmap *wrapper = GDK_PIXMAP (GDK_DRAWABLE_IMPL_X11 (impl)->wrapper); - GdkDisplay *display = GDK_PIXMAP_DISPLAY (wrapper); - - if (!display->closed) - { - GdkDrawableImplX11 *draw_impl = GDK_DRAWABLE_IMPL_X11 (impl); - - _gdk_x11_drawable_finish (GDK_DRAWABLE (draw_impl)); - } - - G_OBJECT_CLASS (gdk_pixmap_impl_x11_parent_class)->finalize (object); -} - -static void -gdk_pixmap_impl_x11_get_size (GdkDrawable *drawable, - gint *width, - gint *height) -{ - if (width) - *width = GDK_PIXMAP_IMPL_X11 (drawable)->width; - if (height) - *height = GDK_PIXMAP_IMPL_X11 (drawable)->height; -} - -GdkPixmap* -_gdk_pixmap_new (GdkDrawable *drawable, - gint width, - gint height, - gint depth) -{ - GdkPixmap *pixmap; - GdkDrawableImplX11 *draw_impl; - GdkPixmapImplX11 *pix_impl; - GdkColormap *cmap; - gint window_depth; - - 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 (!drawable) - { - GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window " - "for gdk_pixmap_new() to be multihead safe")); - drawable = gdk_screen_get_root_window (gdk_screen_get_default ()); - } - - if (GDK_IS_WINDOW (drawable) && GDK_WINDOW_DESTROYED (drawable)) - return NULL; - - window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (drawable)); - if (depth == -1) - depth = window_depth; - - pixmap = g_object_new (gdk_pixmap_get_type (), NULL); - draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl); - pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl); - draw_impl->wrapper = GDK_DRAWABLE (pixmap); - - draw_impl->screen = GDK_WINDOW_SCREEN (drawable); - draw_impl->xid = XCreatePixmap (GDK_PIXMAP_XDISPLAY (pixmap), - GDK_WINDOW_XID (drawable), - width, height, depth); - - pix_impl->is_foreign = FALSE; - pix_impl->width = width; - pix_impl->height = height; - GDK_PIXMAP_OBJECT (pixmap)->depth = depth; - - if (depth == window_depth) - { - cmap = gdk_drawable_get_colormap (drawable); - if (cmap) - gdk_drawable_set_colormap (pixmap, cmap); - } - - _gdk_xid_table_insert (GDK_WINDOW_DISPLAY (drawable), - &GDK_PIXMAP_XID (pixmap), pixmap); - return pixmap; -} - -/** - * gdk_pixmap_foreign_new_for_display: - * @display: The #GdkDisplay where @anid is located. - * @anid: a native pixmap handle. - * - * Wraps a native pixmap in a #GdkPixmap. - * This may fail if the pixmap has been destroyed. - * - * For example in the X backend, a native pixmap handle is an Xlib - * <type>XID</type>. - * - * Return value: the newly-created #GdkPixmap wrapper for the - * native pixmap or %NULL if the pixmap has been destroyed. - * - * Since: 2.2 - **/ -GdkPixmap * -gdk_pixmap_foreign_new_for_display (GdkDisplay *display, - GdkNativeWindow anid) -{ - Pixmap xpixmap; - Window root_return; - GdkScreen *screen; - int x_ret, y_ret; - unsigned int w_ret, h_ret, bw_ret, depth_ret; - - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - - /* check to make sure we were passed something at - * least a little sane */ - g_return_val_if_fail ((anid != 0), NULL); - - /* set the pixmap to the passed in value */ - xpixmap = anid; - - /* get information about the Pixmap to fill in the structure for - the gdk window */ - if (!XGetGeometry (GDK_DISPLAY_XDISPLAY (display), - xpixmap, &root_return, - &x_ret, &y_ret, &w_ret, &h_ret, &bw_ret, &depth_ret)) - return NULL; - - screen = _gdk_x11_display_screen_for_xrootwin (display, root_return); - return gdk_pixmap_foreign_new_for_screen (screen, anid, w_ret, h_ret, depth_ret); -} - -/** - * gdk_pixmap_foreign_new_for_screen: - * @screen: a #GdkScreen - * @anid: a native pixmap handle - * @width: the width of the pixmap identified by @anid - * @height: the height of the pixmap identified by @anid - * @depth: the depth of the pixmap identified by @anid - * - * Wraps a native pixmap in a #GdkPixmap. - * This may fail if the pixmap has been destroyed. - * - * For example in the X backend, a native pixmap handle is an Xlib - * <type>XID</type>. - * - * This function is an alternative to gdk_pixmap_foreign_new_for_display() - * for cases where the dimensions of the pixmap are known. For the X - * backend, this avoids a roundtrip to the server. - * - * Return value: the newly-created #GdkPixmap wrapper for the - * native pixmap or %NULL if the pixmap has been destroyed. - * - * Since: 2.10 - */ -GdkPixmap * -gdk_pixmap_foreign_new_for_screen (GdkScreen *screen, - GdkNativeWindow anid, - gint width, - gint height, - gint depth) -{ - Pixmap xpixmap; - GdkPixmap *pixmap; - GdkDrawableImplX11 *draw_impl; - GdkPixmapImplX11 *pix_impl; - - g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); - g_return_val_if_fail (anid != 0, NULL); - g_return_val_if_fail (width > 0, NULL); - g_return_val_if_fail (height > 0, NULL); - g_return_val_if_fail (depth > 0, NULL); - - pixmap = g_object_new (gdk_pixmap_get_type (), NULL); - draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl); - pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl); - draw_impl->wrapper = GDK_DRAWABLE (pixmap); - - xpixmap = anid; - - draw_impl->screen = screen; - draw_impl->xid = xpixmap; - - pix_impl->is_foreign = TRUE; - pix_impl->width = width; - pix_impl->height = height; - GDK_PIXMAP_OBJECT (pixmap)->depth = depth; - - _gdk_xid_table_insert (gdk_screen_get_display (screen), - &GDK_PIXMAP_XID (pixmap), pixmap); - - return pixmap; -} - -/** - * gdk_pixmap_foreign_new: - * @anid: a native pixmap handle. - * - * Wraps a native window for the default display in a #GdkPixmap. - * This may fail if the pixmap has been destroyed. - * - * For example in the X backend, a native pixmap handle is an Xlib - * <type>XID</type>. - * - * Return value: the newly-created #GdkPixmap wrapper for the - * native pixmap or %NULL if the pixmap has been destroyed. - **/ -GdkPixmap* -gdk_pixmap_foreign_new (GdkNativeWindow anid) -{ - return gdk_pixmap_foreign_new_for_display (gdk_display_get_default (), anid); -} - -/** - * gdk_pixmap_lookup: - * @anid: a native pixmap handle. - * - * Looks up the #GdkPixmap that wraps the given native pixmap handle. - * - * For example in the X backend, a native pixmap handle is an Xlib - * <type>XID</type>. - * - * Return value: the #GdkPixmap wrapper for the native pixmap, - * or %NULL if there is none. - **/ -GdkPixmap* -gdk_pixmap_lookup (GdkNativeWindow anid) -{ - return (GdkPixmap*) gdk_xid_table_lookup_for_display (gdk_display_get_default (), anid); -} - -/** - * gdk_pixmap_lookup_for_display: - * @display: the #GdkDisplay associated with @anid - * @anid: a native pixmap handle. - * - * Looks up the #GdkPixmap that wraps the given native pixmap handle. - * - * For example in the X backend, a native pixmap handle is an Xlib - * <type>XID</type>. - * - * Return value: the #GdkPixmap wrapper for the native pixmap, - * or %NULL if there is none. - * - * Since: 2.2 - **/ -GdkPixmap* -gdk_pixmap_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid) -{ - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - return (GdkPixmap*) gdk_xid_table_lookup_for_display (display, anid); -} diff --git a/gdk/x11/gdkpixmap-x11.h b/gdk/x11/gdkpixmap-x11.h deleted file mode 100644 index 9da6911093..0000000000 --- a/gdk/x11/gdkpixmap-x11.h +++ /dev/null @@ -1,68 +0,0 @@ -/* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __GDK_PIXMAP_X11_H__ -#define __GDK_PIXMAP_X11_H__ - -#include <gdk/x11/gdkdrawable-x11.h> -#include <gdk/gdkpixmap.h> - -G_BEGIN_DECLS - -/* Pixmap implementation for X11 - */ - -typedef struct _GdkPixmapImplX11 GdkPixmapImplX11; -typedef struct _GdkPixmapImplX11Class GdkPixmapImplX11Class; - -#define GDK_TYPE_PIXMAP_IMPL_X11 (gdk_pixmap_impl_x11_get_type ()) -#define GDK_PIXMAP_IMPL_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP_IMPL_X11, GdkPixmapImplX11)) -#define GDK_PIXMAP_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXMAP_IMPL_X11, GdkPixmapImplX11Class)) -#define GDK_IS_PIXMAP_IMPL_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP_IMPL_X11)) -#define GDK_IS_PIXMAP_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXMAP_IMPL_X11)) -#define GDK_PIXMAP_IMPL_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXMAP_IMPL_X11, GdkPixmapImplX11Class)) - -struct _GdkPixmapImplX11 -{ - GdkDrawableImplX11 parent_instance; - - gint width; - gint height; - - guint is_foreign : 1; -}; - -struct _GdkPixmapImplX11Class -{ - GdkDrawableImplX11Class parent_class; - -}; - -GType gdk_pixmap_impl_x11_get_type (void); - -G_END_DECLS - -#endif /* __GDK_PIXMAP_X11_H__ */ diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index 0a0f505661..9194e4ca3c 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -36,7 +36,6 @@ #include <gdk/gdkcursor.h> #include <gdk/gdkprivate.h> #include <gdk/x11/gdkwindow-x11.h> -#include <gdk/x11/gdkpixmap-x11.h> #include <gdk/x11/gdkdisplay-x11.h> #include "gdkinternals.h" @@ -161,12 +160,9 @@ extern const int _gdk_event_mask_table[]; extern GdkAtom _gdk_selection_property; extern gboolean _gdk_synchronize; -#define GDK_PIXMAP_SCREEN(pix) (GDK_DRAWABLE_IMPL_X11 (((GdkPixmapObject *)pix)->impl)->screen) -#define GDK_PIXMAP_DISPLAY(pix) (GDK_SCREEN_X11 (GDK_PIXMAP_SCREEN (pix))->display) -#define GDK_PIXMAP_XROOTWIN(pix) (GDK_SCREEN_X11 (GDK_PIXMAP_SCREEN (pix))->xroot_window) -#define GDK_DRAWABLE_DISPLAY(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_DISPLAY (win) : GDK_PIXMAP_DISPLAY (win)) -#define GDK_DRAWABLE_SCREEN(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_SCREEN (win) : GDK_PIXMAP_SCREEN (win)) -#define GDK_DRAWABLE_XROOTWIN(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_XROOTWIN (win) : GDK_PIXMAP_XROOTWIN (win)) +#define GDK_DRAWABLE_DISPLAY(win) (GDK_WINDOW_DISPLAY (win)) +#define GDK_DRAWABLE_SCREEN(win) (GDK_WINDOW_SCREEN (win)) +#define GDK_DRAWABLE_XROOTWIN(win) (GDK_WINDOW_XROOTWIN (win)) #define GDK_SCREEN_DISPLAY(screen) (GDK_SCREEN_X11 (screen)->display) #define GDK_SCREEN_XROOTWIN(screen) (GDK_SCREEN_X11 (screen)->xroot_window) #define GDK_WINDOW_SCREEN(win) (GDK_DRAWABLE_IMPL_X11 (((GdkWindowObject *)win)->impl)->screen) diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 53177a4801..301b09905c 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -541,8 +541,8 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen, * gdk_screen_get_rgba_colormap: * @screen: a #GdkScreen. * - * Gets a colormap to use for creating windows or pixmaps with an - * alpha channel. The windowing system on which GTK+ is running + * Gets a colormap to use for creating windows with an alpha + * channel. The windowing system on which GTK+ is running * may not support this capability, in which case %NULL will * be returned. Even if a non-%NULL value is returned, its * possible that the window's alpha channel won't be honored @@ -583,9 +583,8 @@ gdk_screen_get_rgba_colormap (GdkScreen *screen) * gdk_screen_get_rgba_visual: * @screen: a #GdkScreen * - * Gets a visual to use for creating windows or pixmaps with an - * alpha channel. See the docs for gdk_screen_get_rgba_colormap() - * for caveats. + * Gets a visual to use for creating windows with an alpha channel. + * See the docs for gdk_screen_get_rgba_colormap() for caveats. * * Return value: (transfer none): a visual to use for windows with an * alpha channel or %NULL if the capability is not available. diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h index 074ec5fb20..e08449e4d4 100644 --- a/gdk/x11/gdkx.h +++ b/gdk/x11/gdkx.h @@ -37,7 +37,6 @@ G_BEGIN_DECLS Display *gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable); XID gdk_x11_drawable_get_xid (GdkDrawable *drawable); GdkDrawable *gdk_x11_window_get_drawable_impl (GdkWindow *window); -GdkDrawable *gdk_x11_pixmap_get_drawable_impl (GdkPixmap *pixmap); Display *gdk_x11_colormap_get_xdisplay (GdkColormap *colormap); Colormap gdk_x11_colormap_get_xcolormap (GdkColormap *colormap); Display *gdk_x11_cursor_get_xdisplay (GdkCursor *cursor); @@ -72,10 +71,8 @@ gint gdk_x11_get_default_screen (void); #define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay) #define GDK_WINDOW_XID(win) (GDK_DRAWABLE_IMPL_X11(((GdkWindowObject *)win)->impl)->xid) -#define GDK_PIXMAP_XDISPLAY(pix) (GDK_SCREEN_X11 (GDK_PIXMAP_SCREEN (pix))->xdisplay) -#define GDK_PIXMAP_XID(pix) (GDK_DRAWABLE_IMPL_X11(((GdkPixmapObject *)pix)->impl)->xid) -#define GDK_DRAWABLE_XDISPLAY(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_XDISPLAY (win) : GDK_PIXMAP_XDISPLAY (win)) -#define GDK_DRAWABLE_XID(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_XID (win) : GDK_PIXMAP_XID (win)) +#define GDK_DRAWABLE_XDISPLAY(win) (GDK_WINDOW_XDISPLAY (win)) +#define GDK_DRAWABLE_XID(win) (GDK_WINDOW_XID (win)) #define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay) #define GDK_SCREEN_XSCREEN(screen) (GDK_SCREEN_X11 (screen)->xscreen) #define GDK_SCREEN_XNUMBER(screen) (GDK_SCREEN_X11 (screen)->screen_num) @@ -93,8 +90,6 @@ gint gdk_x11_get_default_screen (void); #define GDK_WINDOW_XDISPLAY(win) (gdk_x11_drawable_get_xdisplay (gdk_x11_window_get_drawable_impl (win))) #define GDK_WINDOW_XID(win) (gdk_x11_drawable_get_xid (win)) #define GDK_WINDOW_XWINDOW(win) (gdk_x11_drawable_get_xid (win)) -#define GDK_PIXMAP_XDISPLAY(win) (gdk_x11_drawable_get_xdisplay (gdk_x11_pixmap_get_drawable_impl (win))) -#define GDK_PIXMAP_XID(win) (gdk_x11_drawable_get_xid (win)) #define GDK_DRAWABLE_XDISPLAY(win) (gdk_x11_drawable_get_xdisplay (win)) #define GDK_DRAWABLE_XID(win) (gdk_x11_drawable_get_xid (win)) #define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen))) diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c index 21d876c154..637068c785 100644 --- a/gdk/x11/gdkxid.c +++ b/gdk/x11/gdkxid.c @@ -78,9 +78,8 @@ _gdk_xid_table_remove (GdkDisplay *display, * * Returns the GDK object associated with the given X id. * - * Return value: the associated Gdk object, which may be a #GdkPixmap, - * a #GdkWindow or %NULL if no object is associated - * with the X id. + * Return value: the associated #GdkWindow or %NULL if no + * object is associated with the X id. * * Since: 2.2 */ @@ -109,9 +108,8 @@ gdk_xid_table_lookup_for_display (GdkDisplay *display, * Returns the Gdk object associated with the given X id for the default * display. * - * Return value: the associated Gdk object, which may be a #GdkPixmap, - * a #GdkWindow or %NULL if no object is associated - * with the X id. + * Return value: the associated #GdkWindow or %NULL if no + * object is associated with the X id. */ gpointer gdk_xid_table_lookup (XID xid) |