diff options
author | Benjamin Otte <otte@redhat.com> | 2017-11-03 22:49:04 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-11-04 00:07:13 +0100 |
commit | 4e7a0567772a96ef8adea7d5cebef693b38d7824 (patch) | |
tree | 6b8e762fff2c55d66f42fa2280e5e459ef149882 /gdk/gdkcursor.c | |
parent | ec824b9e505a5964808ef648fb78a6c8dc0f54d6 (diff) | |
download | gtk+-4e7a0567772a96ef8adea7d5cebef693b38d7824.tar.gz |
gdk: Cursors are created generically
There are no longer subclasses for cursors now.
Diffstat (limited to 'gdk/gdkcursor.c')
-rw-r--r-- | gdk/gdkcursor.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c index 7be365c48d..3d1c2d4e84 100644 --- a/gdk/gdkcursor.c +++ b/gdk/gdkcursor.c @@ -340,7 +340,10 @@ gdk_cursor_new_from_name (GdkDisplay *display, g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); g_return_val_if_fail (name != NULL, NULL); - return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_name (display, name); + return g_object_new (GDK_TYPE_CURSOR, + "display", display, + "name", name, + NULL); } /** @@ -455,9 +458,12 @@ gdk_cursor_new_from_texture (GdkDisplay *display, g_return_val_if_fail (0 <= hotspot_x && hotspot_x < gdk_texture_get_width (texture), NULL); g_return_val_if_fail (0 <= hotspot_y && hotspot_y < gdk_texture_get_height (texture), NULL); - return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_texture (display, - texture, - hotspot_x, hotspot_y); + return g_object_new (GDK_TYPE_CURSOR, + "display", display, + "texture", texture, + "hotspot-x", hotspot_x, + "hotspot-y", hotspot_y, + NULL); } /** |