[gtk+] Wayland: trivial reshuffle
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Wayland: trivial reshuffle
- Date: Fri, 8 May 2015 17:34:33 +0000 (UTC)
commit b1e10f5312394c143bd4d09700c8522863b159ff
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 8 09:00:15 2015 -0400
Wayland: trivial reshuffle
Avoid a forward declaration by moving things around.
gdk/wayland/gdkcursor-wayland.c | 73 ++++++++++++++++++---------------------
1 files changed, 34 insertions(+), 39 deletions(-)
---
diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c
index 665c224..cdb799c 100644
--- a/gdk/wayland/gdkcursor-wayland.c
+++ b/gdk/wayland/gdkcursor-wayland.c
@@ -265,45 +265,6 @@ _gdk_wayland_cursor_init (GdkWaylandCursor *cursor)
static GdkCursor *
_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
const gchar *name,
- guint scale);
-
-GdkCursor *
-_gdk_wayland_display_get_cursor_for_type_with_scale (GdkDisplay *display,
- GdkCursorType cursor_type,
- guint scale)
-{
- GEnumClass *enum_class;
- GEnumValue *enum_value;
- gchar *cursor_name;
- GdkCursor *result;
-
- enum_class = g_type_class_ref (GDK_TYPE_CURSOR_TYPE);
- enum_value = g_enum_get_value (enum_class, cursor_type);
- cursor_name = g_strdup (enum_value->value_nick);
- g_strdelimit (cursor_name, "-", '_');
- g_type_class_unref (enum_class);
-
- result = _gdk_wayland_display_get_cursor_for_name_with_scale (display,
- cursor_name,
- scale);
-
- g_free (cursor_name);
-
- return result;
-}
-
-GdkCursor *
-_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
- GdkCursorType cursor_type)
-{
- return _gdk_wayland_display_get_cursor_for_type_with_scale (display,
- cursor_type,
- 1);
-}
-
-static GdkCursor *
-_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
- const gchar *name,
guint scale)
{
GdkWaylandCursor *private;
@@ -342,6 +303,40 @@ _gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
}
GdkCursor *
+_gdk_wayland_display_get_cursor_for_type_with_scale (GdkDisplay *display,
+ GdkCursorType cursor_type,
+ guint scale)
+{
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+ gchar *cursor_name;
+ GdkCursor *result;
+
+ enum_class = g_type_class_ref (GDK_TYPE_CURSOR_TYPE);
+ enum_value = g_enum_get_value (enum_class, cursor_type);
+ cursor_name = g_strdup (enum_value->value_nick);
+ g_strdelimit (cursor_name, "-", '_');
+ g_type_class_unref (enum_class);
+
+ result = _gdk_wayland_display_get_cursor_for_name_with_scale (display,
+ cursor_name,
+ scale);
+
+ g_free (cursor_name);
+
+ return result;
+}
+
+GdkCursor *
+_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
+ GdkCursorType cursor_type)
+{
+ return _gdk_wayland_display_get_cursor_for_type_with_scale (display,
+ cursor_type,
+ 1);
+}
+
+GdkCursor *
_gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
cairo_surface_t *surface,
gdouble x,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]