mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
Remove deprecated gdk_window_get_deskrelative_origin() and its implementations
This commit is contained in:
parent
3dda0adf76
commit
bd277fad50
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -7673,50 +7673,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
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user