diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-03-24 21:04:34 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-03-26 19:18:40 -0400 |
commit | 387323de7a1caba70c53bcb686cd6739870cb3b2 (patch) | |
tree | 3a569f36007df9c6eeb2c56f5e007336d880b826 | |
parent | 9a8871a78915ac65b4ba869f0ad1e9f33f8693c3 (diff) | |
download | gtk+-387323de7a1caba70c53bcb686cd6739870cb3b2.tar.gz |
Remove gdk_surface_coords_to/from_parent
This api was unused, and surfaces have no parents anymore.
-rw-r--r-- | docs/reference/gdk/gdk4-sections.txt | 4 | ||||
-rw-r--r-- | gdk/gdksurface.c | 64 | ||||
-rw-r--r-- | gdk/gdksurface.h | 13 |
3 files changed, 0 insertions, 81 deletions
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 54c36fc3ea..570725e00c 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -291,10 +291,6 @@ gdk_surface_set_support_multidevice gdk_surface_get_device_cursor gdk_surface_set_device_cursor -<SUBSECTION> -gdk_surface_coords_from_parent -gdk_surface_coords_to_parent - <SUBSECTION Standard> GDK_SURFACE GDK_SURFACE_GET_CLASS diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 333001fff5..3edadd016d 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2271,70 +2271,6 @@ gdk_surface_get_root_coords (GdkSurface *surface, } /** - * gdk_surface_coords_to_parent: - * @surface: a child surface - * @x: X coordinate in child’s coordinate system - * @y: Y coordinate in child’s coordinate system - * @parent_x: (out) (allow-none): return location for X coordinate - * in parent’s coordinate system, or %NULL - * @parent_y: (out) (allow-none): return location for Y coordinate - * in parent’s coordinate system, or %NULL - * - * Transforms surface coordinates from a child surface to its parent - * surface. Calling this function is equivalent to adding the return - * values of gdk_surface_get_position() to the child coordinates. - * - * See also: gdk_surface_coords_from_parent() - **/ -void -gdk_surface_coords_to_parent (GdkSurface *surface, - gdouble x, - gdouble y, - gdouble *parent_x, - gdouble *parent_y) -{ - g_return_if_fail (GDK_IS_SURFACE (surface)); - - if (parent_x) - *parent_x = x + surface->x; - - if (parent_y) - *parent_y = y + surface->y; -} - -/** - * gdk_surface_coords_from_parent: - * @surface: a child surface - * @parent_x: X coordinate in parent’s coordinate system - * @parent_y: Y coordinate in parent’s coordinate system - * @x: (out) (allow-none): return location for X coordinate in child’s coordinate system - * @y: (out) (allow-none): return location for Y coordinate in child’s coordinate system - * - * Transforms surface coordinates from a parent surface to a child - * surface. - * - * Calling this function is equivalent to subtracting the return - * values of gdk_surface_get_position() from the parent coordinates. - * - * See also: gdk_surface_coords_to_parent() - **/ -void -gdk_surface_coords_from_parent (GdkSurface *surface, - gdouble parent_x, - gdouble parent_y, - gdouble *x, - gdouble *y) -{ - g_return_if_fail (GDK_IS_SURFACE (surface)); - - if (x) - *x = parent_x - surface->x; - - if (y) - *y = parent_y - surface->y; -} - -/** * gdk_surface_input_shape_combine_region: * @surface: a #GdkSurface * @shape_region: region of surface to be non-transparent diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h index 06271ceaca..ec5df30b66 100644 --- a/gdk/gdksurface.h +++ b/gdk/gdksurface.h @@ -612,19 +612,6 @@ void gdk_surface_get_root_coords (GdkSurface *surface, gint *root_x, gint *root_y); GDK_DEPRECATED -void gdk_surface_coords_to_parent (GdkSurface *surface, - gdouble x, - gdouble y, - gdouble *parent_x, - gdouble *parent_y); -GDK_DEPRECATED -void gdk_surface_coords_from_parent (GdkSurface *surface, - gdouble parent_x, - gdouble parent_y, - gdouble *x, - gdouble *y); - -GDK_DEPRECATED void gdk_surface_get_root_origin (GdkSurface *surface, gint *x, gint *y); |