[gitg/cursor-surface: 6/6] Fix type on create cursor surface



commit 94b76c765ecff6332c29ea125107fde98019cf4d
Author: Alberto Fanjul <albertofanjul gmail com>
Date:   Tue Jan 1 19:00:38 2019 +0100

    Fix type on create cursor surface

 libgitg/gitg-platform-support-osx.c   | 12 ++++++------
 libgitg/gitg-platform-support-win32.c |  8 ++++----
 libgitg/gitg-platform-support.c       | 10 +++++-----
 libgitg/gitg-platform-support.h       |  8 ++++----
 vapi/gitg-platform-support.vapi       |  8 ++++----
 5 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/libgitg/gitg-platform-support-osx.c b/libgitg/gitg-platform-support-osx.c
index 2517991d..088170cf 100644
--- a/libgitg/gitg-platform-support-osx.c
+++ b/libgitg/gitg-platform-support-osx.c
@@ -94,10 +94,10 @@ gitg_platform_support_http_get_finish (GAsyncResult  *result,
 cairo_surface_t *
 gitg_platform_support_create_cursor_surface (GdkDisplay    *display,
                                              GdkCursorType  cursor_type,
-                                             gint          *hot_x,
-                                             gint          *hot_y,
-                                             gint          *width,
-                                             gint          *height)
+                                             gdouble       *hot_x,
+                                             gdouble       *hot_y,
+                                             gdouble       *width,
+                                             gdouble       *height)
 {
        NSCursor *cursor;
        NSImage *image;
@@ -134,12 +134,12 @@ gitg_platform_support_create_cursor_surface (GdkDisplay    *display,
 
                if (hot_x)
                {
-                       *hot_x = (gint)(hotspot.x);
+                       *hot_x = hotspot.x;
                }
 
                if (hot_y)
                {
-                       *hot_y = (gint)(hotspot.y);
+                       *hot_y = hotspot.y;
                }
 
                if (width)
diff --git a/libgitg/gitg-platform-support-win32.c b/libgitg/gitg-platform-support-win32.c
index 6fc80b75..2b9f250d 100644
--- a/libgitg/gitg-platform-support-win32.c
+++ b/libgitg/gitg-platform-support-win32.c
@@ -57,10 +57,10 @@ gitg_platform_support_http_get_finish (GAsyncResult  *result,
 cairo_surface_t *
 gitg_platform_support_create_cursor_surface (GdkDisplay    *display,
                                              GdkCursorType  cursor_type,
-                                             gint          *hot_x,
-                                             gint          *hot_y,
-                                             gint          *width,
-                                             gint          *height)
+                                             gdouble       *hot_x,
+                                             gdouble       *hot_y,
+                                             gdouble       *width,
+                                             gdouble       *height)
 {
        return NULL;
 }
diff --git a/libgitg/gitg-platform-support.c b/libgitg/gitg-platform-support.c
index c3993772..5d49fd16 100644
--- a/libgitg/gitg-platform-support.c
+++ b/libgitg/gitg-platform-support.c
@@ -56,14 +56,14 @@ gitg_platform_support_http_get_finish (GAsyncResult  *result,
 cairo_surface_t *
 gitg_platform_support_create_cursor_surface (GdkDisplay    *display,
                                              GdkCursorType  cursor_type,
-                                             gint          *hot_x,
-                                             gint          *hot_y,
-                                             gint          *width,
-                                             gint          *height)
+                                             gdouble       *hot_x,
+                                             gdouble       *hot_y,
+                                             gdouble       *width,
+                                             gdouble       *height)
 {
        GdkCursor *cursor;
        cairo_surface_t *surface;
-       gint w = 0, h = 0;
+       gdouble w = 0, h = 0;
 
        cursor = gdk_cursor_new_for_display (display, cursor_type);
        surface = gdk_cursor_get_surface (cursor, hot_x, hot_y);
diff --git a/libgitg/gitg-platform-support.h b/libgitg/gitg-platform-support.h
index 1e014c19..0c10256a 100644
--- a/libgitg/gitg-platform-support.h
+++ b/libgitg/gitg-platform-support.h
@@ -36,10 +36,10 @@ GInputStream *gitg_platform_support_http_get_finish (GAsyncResult         *resul
 
 cairo_surface_t *gitg_platform_support_create_cursor_surface (GdkDisplay    *display,
                                                               GdkCursorType  cursor_type,
-                                                              gint          *hot_x,
-                                                              gint          *hot_y,
-                                                              gint          *width,
-                                                              gint          *height);
+                                                              gdouble       *hot_x,
+                                                              gdouble       *hot_y,
+                                                              gdouble       *width,
+                                                              gdouble       *height);
 
 GInputStream *gitg_platform_support_new_input_stream_from_fd (gint     fd,
                                                               gboolean close_fd);
diff --git a/vapi/gitg-platform-support.vapi b/vapi/gitg-platform-support.vapi
index 44ee63a1..0171462a 100644
--- a/vapi/gitg-platform-support.vapi
+++ b/vapi/gitg-platform-support.vapi
@@ -8,10 +8,10 @@ namespace Gitg
 
                public static Cairo.Surface create_cursor_surface(Gdk.Display? display,
                                                                  Gdk.CursorType cursor_type,
-                                                                 out int hot_x = null,
-                                                                 out int hot_y = null,
-                                                                 out int width = null,
-                                                                 out int height = null);
+                                                                 out double hot_x = null,
+                                                                 out double hot_y = null,
+                                                                 out double width = null,
+                                                                 out double height = null);
 
                public static GLib.InputStream new_input_stream_from_fd(int fd, bool close_fd);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]