[gtk+] Remove deprecated gdk_window_get_deskrelative_origin() and its implementations



commit bd277fad50704f6a39619cb418204bdfee112b98
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Sep 9 00:18:42 2010 +0200

    Remove deprecated gdk_window_get_deskrelative_origin() and its implementations

 gdk/gdk.symbols               |    1 -
 gdk/gdkoffscreenwindow.c      |   36 ---------------------------
 gdk/gdkwindow.c               |   44 ----------------------------------
 gdk/gdkwindow.h               |    7 -----
 gdk/gdkwindowimpl.h           |    3 --
 gdk/quartz/gdkwindow-quartz.c |    9 -------
 gdk/win32/gdkwindow-win32.c   |    9 -------
 gdk/x11/gdkwindow-x11.c       |   53 -----------------------------------------
 8 files changed, 0 insertions(+), 162 deletions(-)
---
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index b5e4439..4480da1 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -587,7 +587,6 @@ gdk_window_get_geometry
 gdk_window_get_modal_hint
 gdk_window_get_origin
 gdk_window_get_root_coords
-gdk_window_get_deskrelative_origin
 gdk_window_set_support_multidevice
 gdk_window_get_support_multidevice
 gdk_window_has_native
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 2c80808..f109e25 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -368,41 +368,6 @@ gdk_offscreen_window_get_root_coords (GdkWindow *window,
   return TRUE;
 }
 
-static gint
-gdk_offscreen_window_get_deskrelative_origin (GdkWindow *window,
-					      gint      *x,
-					      gint      *y)
-{
-  GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
-  GdkOffscreenWindow *offscreen;
-  int tmpx, tmpy;
-
-  tmpx = 0;
-  tmpy = 0;
-
-  offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
-  if (offscreen->embedder)
-    {
-      double dx, dy;
-      gdk_window_get_deskrelative_origin (offscreen->embedder,
-					  &tmpx, &tmpy);
-
-      to_embedder (window,
-		   0, 0,
-		   &dx, &dy);
-      tmpx = floor (tmpx + dx + 0.5);
-      tmpy = floor (tmpy + dy + 0.5);
-    }
-
-
-  if (x)
-    *x = tmpx;
-  if (y)
-    *y = tmpy;
-
-  return TRUE;
-}
-
 static gboolean
 gdk_offscreen_window_get_device_state (GdkWindow       *window,
                                        GdkDevice       *device,
@@ -876,7 +841,6 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
   iface->translate = gdk_offscreen_window_translate;
   iface->get_root_coords = gdk_offscreen_window_get_root_coords;
-  iface->get_deskrelative_origin = gdk_offscreen_window_get_deskrelative_origin;
   iface->get_device_state = gdk_offscreen_window_get_device_state;
   iface->destroy = gdk_offscreen_window_destroy;
 }
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 4ecb2cc..6e75e06 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7674,50 +7674,6 @@ gdk_window_coords_from_parent (GdkWindow *window,
 }
 
 /**
- * gdk_window_get_deskrelative_origin:
- * @window: a toplevel #GdkWindow
- * @x: return location for X coordinate
- * @y: return location for Y coordinate
- *
- * This gets the origin of a #GdkWindow relative to
- * an Enlightenment-window-manager desktop. As long as you don't
- * assume that the user's desktop/workspace covers the entire
- * root window (i.e. you don't assume that the desktop begins
- * at root window coordinate 0,0) this function is not necessary.
- * It's deprecated for that reason.
- *
- * Return value: not meaningful
- **/
-gboolean
-gdk_window_get_deskrelative_origin (GdkWindow *window,
-				    gint      *x,
-				    gint      *y)
-{
-  GdkWindowObject *private;
-  GdkWindowImplIface *impl_iface;
-  gboolean return_val = FALSE;
-  gint tx = 0;
-  gint ty = 0;
-
-  g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
-
-  private = (GdkWindowObject *) window;
-
-  if (!GDK_WINDOW_DESTROYED (window))
-    {
-      impl_iface = GDK_WINDOW_IMPL_GET_IFACE (private->impl);
-      return_val = impl_iface->get_deskrelative_origin (window, &tx, &ty);
-
-      if (x)
-	*x = tx + private->abs_x;
-      if (y)
-	*y = ty + private->abs_y;
-    }
-
-  return return_val;
-}
-
-/**
  * gdk_window_shape_combine_mask:
  * @window: a #GdkWindow
  * @mask: shape mask
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index b294095..a9e71e8 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -731,13 +731,6 @@ void       gdk_window_coords_from_parent (GdkWindow       *window,
                                           gdouble         *x,
                                           gdouble         *y);
 
-#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) || defined (GDK_COMPILATION)
-/* Used by gtk_handle_box_button_changed () */
-gboolean      gdk_window_get_deskrelative_origin (GdkWindow	  *window,
-					  gint		  *x,
-					  gint		  *y);
-#endif
-
 void	      gdk_window_get_root_origin (GdkWindow	  *window,
 					  gint		  *x,
 					  gint		  *y);
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index a01244e..0b9f507 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -93,9 +93,6 @@ struct _GdkWindowImplIface
 					 gint             y,
                                          gint            *root_x,
                                          gint            *root_y);
-  gint         (* get_deskrelative_origin) (GdkWindow       *window,
-                                         gint            *x,
-                                         gint            *y);
   gboolean     (* get_device_state)     (GdkWindow       *window,
                                          GdkDevice       *device,
                                          gint            *x,
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 2800420..083ce58 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -1830,14 +1830,6 @@ gdk_window_quartz_get_root_coords (GdkWindow *window,
   return TRUE;
 }
 
-static gboolean
-gdk_window_quartz_get_deskrelative_origin (GdkWindow *window,
-                                           gint      *x,
-                                           gint      *y)
-{
-  return gdk_window_get_origin (window, x, y);
-}
-
 void
 gdk_window_get_root_origin (GdkWindow *window,
 			    gint      *x,
@@ -3057,7 +3049,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->get_geometry = gdk_window_quartz_get_geometry;
   iface->get_root_coords = gdk_window_quartz_get_root_coords;
   iface->get_device_state = gdk_window_quartz_get_device_state;
-  iface->get_deskrelative_origin = gdk_window_quartz_get_deskrelative_origin;
   iface->shape_combine_region = gdk_window_quartz_shape_combine_region;
   iface->input_shape_combine_region = gdk_window_quartz_input_shape_combine_region;
   iface->set_static_gravities = gdk_window_quartz_set_static_gravities;
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 8680fb7..0733e0c 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -1959,14 +1959,6 @@ gdk_win32_window_get_root_coords (GdkWindow *window,
   return 1;
 }
 
-static gboolean
-gdk_win32_window_get_deskrelative_origin (GdkWindow *window,
-					  gint      *x,
-					  gint      *y)
-{
-  return gdk_win32_window_get_root_coords (window, 0, 0, x, y);
-}
-
 static void
 gdk_win32_window_restack_under (GdkWindow *window,
 				GList *native_siblings)
@@ -3527,7 +3519,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->get_root_coords = gdk_win32_window_get_root_coords;
   iface->shape_combine_region = gdk_win32_window_shape_combine_region;
   iface->input_shape_combine_region = gdk_win32_input_shape_combine_region;
-  iface->get_deskrelative_origin = gdk_win32_window_get_deskrelative_origin;
   iface->set_static_gravities = gdk_win32_window_set_static_gravities;
   iface->queue_antiexpose = _gdk_win32_window_queue_antiexpose;
   iface->translate = _gdk_win32_window_translate;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 7c3f89f..aff986a 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2762,58 +2762,6 @@ gdk_window_x11_get_root_coords (GdkWindow *window,
   return return_val;
 }
 
-static gboolean
-gdk_window_x11_get_deskrelative_origin (GdkWindow *window,
-					gint      *x,
-					gint      *y)
-{
-  gboolean return_val = FALSE;
-  gint num_children, format_return;
-  Window win, *child, parent, root;
-  Atom type_return;
-  Atom atom;
-  gulong number_return, bytes_after_return;
-  guchar *data_return;
-  
-  atom = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
-						"ENLIGHTENMENT_DESKTOP");
-  win = GDK_WINDOW_XID (window);
-  
-  while (XQueryTree (GDK_WINDOW_XDISPLAY (window), win, &root, &parent,
-		     &child, (unsigned int *)&num_children))
-    {
-      if ((child) && (num_children > 0))
-	XFree (child);
-      
-      if (!parent)
-	break;
-      else
-	win = parent;
-      
-      if (win == root)
-	break;
-      
-      data_return = NULL;
-      XGetWindowProperty (GDK_WINDOW_XDISPLAY (window), win, atom, 0, 0,
-			  False, XA_CARDINAL, &type_return, &format_return,
-			  &number_return, &bytes_after_return, &data_return);
-      
-      if (type_return == XA_CARDINAL)
-	{
-	  XFree (data_return);
-	  break;
-	}
-    }
-  
-  return_val = XTranslateCoordinates (GDK_WINDOW_XDISPLAY (window),
-				      GDK_WINDOW_XID (window),
-				      win,
-				      0, 0, x, y,
-				      &root);
-  
-  return return_val;
-}
-
 /**
  * gdk_window_get_root_origin:
  * @window: a toplevel #GdkWindow
@@ -5558,7 +5506,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->get_geometry = gdk_window_x11_get_geometry;
   iface->get_root_coords = gdk_window_x11_get_root_coords;
   iface->get_device_state = gdk_window_x11_get_device_state;
-  iface->get_deskrelative_origin = gdk_window_x11_get_deskrelative_origin;
   iface->shape_combine_region = gdk_window_x11_shape_combine_region;
   iface->input_shape_combine_region = gdk_window_x11_input_shape_combine_region;
   iface->set_static_gravities = gdk_window_x11_set_static_gravities;



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