From 621fb7466a984a45b5d2fc267eac0024d6218030 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 18 Jun 2002 20:59:44 +0000 Subject: Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display(). Tue Jun 18 14:41:48 2002 Owen Taylor * gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display(). (#85671) * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c: Adapt to above change. --- gdk/x11/gdkcursor-x11.c | 39 +++++++++++++++++++-------------------- gdk/x11/gdkprivate-x11.h | 3 ++- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'gdk/x11') diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 5b995ec689..813b9acec9 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -32,11 +32,10 @@ #include "gdkpixmap-x11.h" #include "gdkx.h" #include -#include "gdkscreen-x11.h" /** - * gdk_cursor_new_for_screen: - * @screen: the #GdkScreen where the cursor will be defined + * gdk_cursor_new_for_display: + * @display: the #GdkDisplay for which the cursor will be created * @cursor_type: cursor to create * * Creates a new cursor from the set of builtin cursors. @@ -101,18 +100,18 @@ * Return value: a new #GdkCursor **/ GdkCursor* -gdk_cursor_new_for_screen (GdkScreen *screen, - GdkCursorType cursor_type) +gdk_cursor_new_for_display (GdkDisplay *display, + GdkCursorType cursor_type) { GdkCursorPrivate *private; GdkCursor *cursor; Cursor xcursor; - g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); + g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - xcursor = XCreateFontCursor (GDK_SCREEN_XDISPLAY (screen), cursor_type); + xcursor = XCreateFontCursor (GDK_DISPLAY_XDISPLAY (display), cursor_type); private = g_new (GdkCursorPrivate, 1); - private->screen = screen; + private->display = display; private->xcursor = xcursor; cursor = (GdkCursor *) private; cursor->type = cursor_type; @@ -134,7 +133,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, Pixmap source_pixmap, mask_pixmap; Cursor xcursor; XColor xfg, xbg; - GdkScreen *screen; + GdkDisplay *display; g_return_val_if_fail (GDK_IS_PIXMAP (source), NULL); g_return_val_if_fail (GDK_IS_PIXMAP (mask), NULL); @@ -143,7 +142,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, source_pixmap = GDK_PIXMAP_XID (source); mask_pixmap = GDK_PIXMAP_XID (mask); - screen = GDK_PIXMAP_SCREEN (source); + display = GDK_PIXMAP_DISPLAY (source); xfg.pixel = fg->pixel; xfg.red = fg->red; @@ -154,10 +153,10 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, xbg.blue = bg->blue; xbg.green = bg->green; - xcursor = XCreatePixmapCursor (GDK_SCREEN_XDISPLAY (screen), + xcursor = XCreatePixmapCursor (GDK_DISPLAY_XDISPLAY (display), source_pixmap, mask_pixmap, &xfg, &xbg, x, y); private = g_new (GdkCursorPrivate, 1); - private->screen = screen; + private->display = display; private->xcursor = xcursor; cursor = (GdkCursor *) private; cursor->type = GDK_CURSOR_IS_PIXMAP; @@ -175,7 +174,7 @@ _gdk_cursor_destroy (GdkCursor *cursor) g_return_if_fail (cursor->ref_count == 0); private = (GdkCursorPrivate *) cursor; - XFreeCursor (GDK_SCREEN_XDISPLAY (private->screen), private->xcursor); + XFreeCursor (GDK_DISPLAY_XDISPLAY (private->display), private->xcursor); g_free (private); } @@ -185,7 +184,7 @@ gdk_x11_cursor_get_xdisplay (GdkCursor *cursor) { g_return_val_if_fail (cursor != NULL, NULL); - return GDK_SCREEN_XDISPLAY(((GdkCursorPrivate *)cursor)->screen); + return GDK_DISPLAY_XDISPLAY(((GdkCursorPrivate *)cursor)->display); } Cursor @@ -197,18 +196,18 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor) } /** - * gdk_cursor_get_screen: + * gdk_cursor_get_display: * @cursor : a #GdkCursor. * - * Returns the screen on which the GdkCursor is defined + * Returns the display on which the GdkCursor is defined * - * Returns : the #GdkScreen associated to @cursor + * Returns : the #GdkDisplay associated to @cursor */ -GdkScreen * -gdk_cursor_get_screen (GdkCursor *cursor) +GdkDisplay * +gdk_cursor_get_display (GdkCursor *cursor) { g_return_val_if_fail (cursor != NULL, NULL); - return ((GdkCursorPrivate *)cursor)->screen; + return ((GdkCursorPrivate *)cursor)->display; } diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index e67968938f..d458c281f6 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -35,6 +35,7 @@ #include #include #include +#include #include "gdkinternals.h" @@ -81,7 +82,7 @@ struct _GdkCursorPrivate { GdkCursor cursor; Cursor xcursor; - GdkScreen *screen; + GdkDisplay *display; }; struct _GdkVisualPrivate -- cgit v1.2.1