diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-06-17 19:27:04 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-06-17 19:27:04 +0000 |
commit | 3d6ed0595fe33849f3913eddd06fea93402fa333 (patch) | |
tree | 537ed72473bb4b87b8e2acabe1154220a0ed21fe /gdk | |
parent | c06b5609d2c418cff789e96139d71388f42086cd (diff) | |
download | gtk+-3d6ed0595fe33849f3913eddd06fea93402fa333.tar.gz |
Improve some return_if_fail checks, and add the missing non-Xcursor
2005-06-17 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcursor-x11.c:
* gdk/gdkcursor.c: Improve some return_if_fail checks,
and add the missing non-Xcursor fallback for
_gdk_x11_cursor_update_theme(), noticed by Jeroen
Zwartepoorte.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkcursor.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkcursor-x11.c | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c index 1038d73479..2902ff10e5 100644 --- a/gdk/gdkcursor.c +++ b/gdk/gdkcursor.c @@ -53,7 +53,7 @@ gdk_cursor_get_type (void) GdkCursor* gdk_cursor_ref (GdkCursor *cursor) { - g_return_val_if_fail (cursor != NULL, NULL); + g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL); g_return_val_if_fail (cursor->ref_count > 0, NULL); cursor->ref_count += 1; @@ -72,7 +72,7 @@ gdk_cursor_ref (GdkCursor *cursor) void gdk_cursor_unref (GdkCursor *cursor) { - g_return_if_fail (cursor != NULL); + g_return_if_fail (GDK_IS_CURSOR (cursor)); g_return_if_fail (cursor->ref_count > 0); cursor->ref_count -= 1; diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 4ebeb7be3c..c4b07d5e6b 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -255,7 +255,7 @@ _gdk_cursor_destroy (GdkCursor *cursor) { GdkCursorPrivate *private; - g_return_if_fail (cursor != NULL); + g_return_if_fail (GDK_IS_CURSOR (cursor)); g_return_if_fail (cursor->ref_count == 0); private = (GdkCursorPrivate *) cursor; @@ -277,7 +277,7 @@ _gdk_cursor_destroy (GdkCursor *cursor) Display * gdk_x11_cursor_get_xdisplay (GdkCursor *cursor) { - g_return_val_if_fail (cursor != NULL, NULL); + g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL); return GDK_DISPLAY_XDISPLAY(((GdkCursorPrivate *)cursor)->display); } @@ -293,7 +293,7 @@ gdk_x11_cursor_get_xdisplay (GdkCursor *cursor) Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor) { - g_return_val_if_fail (cursor != NULL, None); + g_return_val_if_fail (GDK_IS_CURSOR (cursor), None); return ((GdkCursorPrivate *)cursor)->xcursor; } @@ -312,7 +312,7 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor) GdkDisplay * gdk_cursor_get_display (GdkCursor *cursor) { - g_return_val_if_fail (cursor != NULL, NULL); + g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL); return ((GdkCursorPrivate *)cursor)->display; } @@ -346,7 +346,7 @@ gdk_cursor_get_image (GdkCursor *cursor) GdkPixbuf *pixbuf; gchar *theme; - g_return_val_if_fail (cursor != NULL, NULL); + g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL); private = (GdkCursorPrivate *) cursor; @@ -498,7 +498,7 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display, GdkPixbuf* gdk_cursor_get_image (GdkCursor *cursor) { - g_return_val_if_fail (cursor != NULL, NULL); + g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL); return NULL; } @@ -509,8 +509,12 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display, const gint size) { g_return_if_fail (GDK_IS_DISPLAY (display)); +} - /* nothing to do */ +void +_gdk_x11_cursor_update_theme (GdkCursor *cursor) +{ + g_return_if_fail (GDK_IS_CURSOR (cursor)); } #endif |