[gtk/present-toplevel-2: 82/83] surface: document gdk_surface_translate_coordinates



commit 4e4ed070cbfe243a9ad5a4e609fcc7a3d842e1b4
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 9 13:46:42 2020 -0700

    surface: document gdk_surface_translate_coordinates

 gdk/gdksurface.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 63665e1877..a8621716f2 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2962,6 +2962,24 @@ gdk_surface_handle_event (GdkEvent *event)
   return handled;
 }
 
+/**
+ * gdk_surface_translate_coordinates:
+ * @from: the origin surface
+ * @to: the target surface
+ * @x: coordinates to translate
+ * @y: coordinates to translate
+ *
+ * Translates the given coordinates from being
+ * relative to the @from surface to being relative
+ * to the @to surface.
+ *
+ * Note that this only works if @to and @from are
+ * popups or transient-for to the same toplevel
+ * (directly or indirectly).
+ *
+ * Returns: %TRUE if the coordinates were successfully
+ *     translated
+ */
 gboolean
 gdk_surface_translate_coordinates (GdkSurface *from,
                                    GdkSurface *to,


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