summaryrefslogtreecommitdiff
path: root/gdk/broadway
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-08-06 16:21:05 +0200
committerAlexander Larsson <alexl@redhat.com>2013-08-07 13:34:10 +0200
commit71fe43543c765f12b22e7c6508ed4d58ea5075a6 (patch)
tree5024e369e507f4e9031ed5333b39c695a3b9b16c /gdk/broadway
parent54f5e4af53f520fa621218e02110c40286975513 (diff)
downloadgtk+-71fe43543c765f12b22e7c6508ed4d58ea5075a6.tar.gz
gdk: Add gdk_cursor_get_surface()
We want a surface so we can properly represent the scale factor for it. All backends are converted to use surfaces and we reimplement the backwards compat code in the generic code.
Diffstat (limited to 'gdk/broadway')
-rw-r--r--gdk/broadway/gdkcursor-broadway.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdk/broadway/gdkcursor-broadway.c b/gdk/broadway/gdkcursor-broadway.c
index 92acbdaee6..72fc84e1e2 100644
--- a/gdk/broadway/gdkcursor-broadway.c
+++ b/gdk/broadway/gdkcursor-broadway.c
@@ -51,7 +51,9 @@ struct _GdkBroadwayCursorClass
G_DEFINE_TYPE (GdkBroadwayCursor, gdk_broadway_cursor, GDK_TYPE_CURSOR)
-static GdkPixbuf* gdk_broadway_cursor_get_image (GdkCursor *cursor);
+static cairo_surface_t * gdk_broadway_cursor_get_surface (GdkCursor *cursor,
+ gdouble *x_hot,
+ gdouble *y_hot);
static void
gdk_broadway_cursor_finalize (GObject *object)
@@ -67,7 +69,7 @@ gdk_broadway_cursor_class_init (GdkBroadwayCursorClass *xcursor_class)
object_class->finalize = gdk_broadway_cursor_finalize;
- cursor_class->get_image = gdk_broadway_cursor_get_image;
+ cursor_class->get_surface = gdk_broadway_cursor_get_surface;
}
static void
@@ -99,8 +101,10 @@ _gdk_broadway_display_get_cursor_for_type (GdkDisplay *display,
return GDK_CURSOR (private);
}
-static GdkPixbuf*
-gdk_broadway_cursor_get_image (GdkCursor *cursor)
+static cairo_surface_t *
+gdk_broadway_cursor_get_surface (GdkCursor *cursor,
+ gdouble *x_hot,
+ gdouble *y_hot)
{
g_return_val_if_fail (cursor != NULL, NULL);