[gtk/present-toplevel-2: 26/34] surface: document gdk_surface_translate_coordinates



commit ac61e77562b47d482131ce06ddaca0063d70f641
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 be36d77470..494efda70e 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -3159,6 +3159,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]