[gtk/wip/matthiasc/popup2: 103/103] Rename gdk_surface_get_device_position_double



commit fc40b5bb3d4044a6328890d99b53ea8101ff55b5
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 25 10:12:01 2019 -0400

    Rename gdk_surface_get_device_position_double
    
    Drop the _double suffix, now that the int version is gone.

 docs/reference/gdk/gdk4-sections.txt |  2 +-
 gdk/broadway/gdkdevice-broadway.c    |  2 +-
 gdk/gdksurface.c                     | 12 ++++++------
 gdk/gdksurface.h                     | 10 +++++-----
 gdk/quartz/gdkdevice-core-quartz.c   |  2 +-
 gdk/wayland/gdkdevice-wayland.c      |  8 ++++----
 gdk/wayland/gdksurface-wayland.c     |  4 ++--
 gdk/win32/gdkdevice-win32.c          |  2 +-
 gdk/x11/gdkdevice-core-x11.c         |  2 +-
 gtk/gtkdnd.c                         |  8 ++++----
 gtk/gtkmenu.c                        |  2 +-
 gtk/gtktooltip.c                     |  6 ++----
 gtk/gtkwidget.c                      | 10 +++++-----
 gtk/inspector/inspect-button.c       |  4 ++--
 14 files changed, 36 insertions(+), 38 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 1a87dffb65..d534c54a2f 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -266,7 +266,7 @@ gdk_surface_set_urgency_hint
 gdk_surface_get_position
 gdk_surface_get_frame_extents
 gdk_surface_get_origin
-gdk_surface_get_device_position_double
+gdk_surface_get_device_position
 GdkModifierType
 GdkModifierIntent
 gdk_surface_set_icon_name
diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c
index 2171ca90f6..a51ecc416d 100644
--- a/gdk/broadway/gdkdevice-broadway.c
+++ b/gdk/broadway/gdkdevice-broadway.c
@@ -106,7 +106,7 @@ gdk_broadway_device_get_state (GdkDevice       *device,
 {
   gdouble x, y;
 
-  gdk_surface_get_device_position_double (surface, device, &x, &y, mask);
+  gdk_surface_get_device_position (surface, device, &x, &y, mask);
 
   if (axes)
     {
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 098363f44b..6caf352f3a 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1453,7 +1453,7 @@ gdk_surface_constrain_size (GdkGeometry    *geometry,
 }
 
 /**
- * gdk_surface_get_device_position_double:
+ * gdk_surface_get_device_position:
  * @surface: a #GdkSurface.
  * @device: pointer #GdkDevice to query to.
  * @x: (out) (allow-none): return location for the X coordinate of @device, or %NULL.
@@ -1469,11 +1469,11 @@ gdk_surface_constrain_size (GdkGeometry    *geometry,
  * surface is not known to GDK.
  **/
 GdkSurface *
-gdk_surface_get_device_position_double (GdkSurface       *surface,
-                                        GdkDevice       *device,
-                                        double          *x,
-                                        double          *y,
-                                        GdkModifierType *mask)
+gdk_surface_get_device_position (GdkSurface       *surface,
+                                 GdkDevice       *device,
+                                 double          *x,
+                                 double          *y,
+                                 GdkModifierType *mask)
 {
   gdouble tmp_x, tmp_y;
   GdkModifierType tmp_mask;
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index 50720a51d4..f2d030d656 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -607,11 +607,11 @@ GDK_AVAILABLE_IN_ALL
 gint          gdk_surface_get_scale_factor  (GdkSurface     *surface);
 
 GDK_AVAILABLE_IN_ALL
-GdkSurface *   gdk_surface_get_device_position_double (GdkSurface       *surface,
-                                                       GdkDevice       *device,
-                                                       gdouble         *x,
-                                                       gdouble         *y,
-                                                       GdkModifierType *mask);
+GdkSurface *   gdk_surface_get_device_position (GdkSurface      *surface,
+                                                GdkDevice       *device,
+                                                double          *x,
+                                                double          *y,
+                                                GdkModifierType *mask);
 GDK_AVAILABLE_IN_ALL
 void          gdk_surface_set_icon_list   (GdkSurface       *surface,
                                            GList           *surfaces);
diff --git a/gdk/quartz/gdkdevice-core-quartz.c b/gdk/quartz/gdkdevice-core-quartz.c
index 246dd55933..2d6233e0ae 100644
--- a/gdk/quartz/gdkdevice-core-quartz.c
+++ b/gdk/quartz/gdkdevice-core-quartz.c
@@ -125,7 +125,7 @@ gdk_quartz_device_core_get_state (GdkDevice       *device,
 {
   gdouble x_pos, y_pos;
 
-  gdk_surface_get_device_position_double (window, device, &x_pos, &y_pos, mask);
+  gdk_surface_get_device_position (window, device, &x_pos, &y_pos, mask);
 
   if (axes)
     {
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 30e5a2d450..1403dff588 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -321,7 +321,7 @@ gdk_wayland_device_get_state (GdkDevice       *device,
 {
   gdouble x, y;
 
-  gdk_surface_get_device_position_double (surface, device, &x, &y, mask);
+  gdk_surface_get_device_position (surface, device, &x, &y, mask);
 
   if (axes)
     {
@@ -612,9 +612,9 @@ emulate_crossing (GdkSurface       *surface,
   gdk_event_set_device (event, device);
   gdk_event_set_source_device (event, device);
 
-  gdk_surface_get_device_position_double (surface, device,
-                                         &event->crossing.x, &event->crossing.y,
-                                         &event->crossing.state);
+  gdk_surface_get_device_position (surface, device,
+                                   &event->crossing.x, &event->crossing.y,
+                                   &event->crossing.state);
   event->crossing.x_root = event->crossing.x;
   event->crossing.y_root = event->crossing.y;
 
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 1f4cfbafb0..5751e4ddbe 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -2443,8 +2443,8 @@ gdk_wayland_surface_map (GdkSurface *surface)
           if (impl->position_method == POSITION_METHOD_NONE && grab_device)
             {
               double px, py;
-              gdk_surface_get_device_position_double (transient_for, grab_device,
-                                                      &px, &py, NULL);
+              gdk_surface_get_device_position (transient_for, grab_device,
+                                               &px, &py, NULL);
               surface->x = round (px);
               surface->y = round (py);
             }
diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c
index 3987e2c5df..8d42f5389e 100644
--- a/gdk/win32/gdkdevice-win32.c
+++ b/gdk/win32/gdkdevice-win32.c
@@ -47,7 +47,7 @@ gdk_device_win32_get_state (GdkDevice       *device,
 {
   double x, y;
 
-  gdk_surface_get_device_position_double (window, device, &x, &y, mask);
+  gdk_surface_get_device_position (window, device, &x, &y, mask);
 
   if (axes)
     {
diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c
index 87a8af731f..20318618ca 100644
--- a/gdk/x11/gdkdevice-core-x11.c
+++ b/gdk/x11/gdkdevice-core-x11.c
@@ -171,7 +171,7 @@ gdk_x11_device_core_get_state (GdkDevice       *device,
 {
   gdouble x, y;
 
-  gdk_surface_get_device_position_double (surface, device, &x, &y, mask);
+  gdk_surface_get_device_position (surface, device, &x, &y, mask);
 
   if (axes)
     {
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 23f6bd619a..44bd7d00c6 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -891,10 +891,10 @@ gtk_drag_begin_internal (GtkWidget          *widget,
 
   root = gtk_widget_get_root (widget);
   gtk_widget_translate_coordinates (widget, GTK_WIDGET (root), x, y, &x, &y);
-  gdk_surface_get_device_position_double (gtk_widget_get_surface (GTK_WIDGET (root)),
-                                          device,
-                                          &px, &py,
-                                          NULL);
+  gdk_surface_get_device_position (gtk_widget_get_surface (GTK_WIDGET (root)),
+                                   device,
+                                   &px, &py,
+                                   NULL);
   dx = round (px) - x;
   dy = round (py) - y;
 
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index c75ff03eb8..ae68e0c666 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1825,7 +1825,7 @@ gtk_menu_popup_at_pointer (GtkMenu        *menu,
           if (device)
             {
               double px, py;
-              gdk_surface_get_device_position_double (rect_surface, device, &px, &py, NULL);
+              gdk_surface_get_device_position (rect_surface, device, &px, &py, NULL);
               rect.x = round (px);
               rect.y = round (py);
             }
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 6b19b9b5d7..5337726985 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -634,9 +634,7 @@ gtk_tooltip_position (GtkTooltip *tooltip,
        * far away from the pointer position.
        */
       effective_toplevel = _gtk_widget_get_surface (toplevel);
-      gdk_surface_get_device_position_double (effective_toplevel,
-                                              device,
-                                              &px, &py, NULL);
+      gdk_surface_get_device_position (effective_toplevel, device, &px, &py, NULL);
       pointer_x = round (px);
       pointer_y = round (py);
 
@@ -695,7 +693,7 @@ gtk_tooltip_show_tooltip (GdkDisplay *display)
 
     device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
 
-    gdk_surface_get_device_position_double (surface, device, &px, &py, NULL);
+    gdk_surface_get_device_position (surface, device, &px, &py, NULL);
     x = round (px);
     y = round (py);
 
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8b7398c4d0..d4534ee91f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8575,11 +8575,11 @@ synth_crossing (GtkWidget       *widget,
   gdk_device_get_position_double (device,
                                   &event->crossing.x_root,
                                   &event->crossing.y_root);
-  gdk_surface_get_device_position_double (surface,
-                                         device,
-                                         &event->crossing.x,
-                                         &event->crossing.y,
-                                         NULL);
+  gdk_surface_get_device_position (surface,
+                                   device,
+                                   &event->crossing.x,
+                                   &event->crossing.y,
+                                   NULL);
   event->crossing.mode = mode;
   event->crossing.detail = detail;
   event->crossing.focus = FALSE;
diff --git a/gtk/inspector/inspect-button.c b/gtk/inspector/inspect-button.c
index d34629d163..76e52f4df1 100644
--- a/gtk/inspector/inspect-button.c
+++ b/gtk/inspector/inspect-button.c
@@ -52,8 +52,8 @@ find_widget_at_pointer (GdkDevice *device)
     {
       double x, y;
 
-      gdk_surface_get_device_position_double (gtk_widget_get_surface (widget),
-                                             device, &x, &y, NULL);
+      gdk_surface_get_device_position (gtk_widget_get_surface (widget),
+                                       device, &x, &y, NULL);
 
       widget = gtk_widget_pick (widget, x, y);
     }


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