Drop gdk_event_get_root_coords

This commit is contained in:
Matthias Clasen 2019-05-29 22:02:54 +00:00
parent 17cd6d7f44
commit 57175dd5b1
3 changed files with 0 additions and 80 deletions

View File

@ -591,7 +591,6 @@ gdk_event_get_click_count
gdk_event_get_coords
gdk_event_get_keycode
gdk_event_get_keyval
gdk_event_get_root_coords
gdk_event_get_scroll_direction
gdk_event_get_scroll_deltas
gdk_event_is_scroll_stop_event

View File

@ -960,81 +960,6 @@ gdk_event_get_coords (const GdkEvent *event,
return fetched;
}
/**
* gdk_event_get_root_coords:
* @event: a #GdkEvent
* @x_root: (out) (optional): location to put root window x coordinate
* @y_root: (out) (optional): location to put root window y coordinate
*
* Extract the root window relative x/y coordinates from an event.
*
* Returns: %TRUE if the event delivered root window coordinates
**/
gboolean
gdk_event_get_root_coords (const GdkEvent *event,
gdouble *x_root,
gdouble *y_root)
{
gdouble x = 0, y = 0;
gboolean fetched = TRUE;
g_return_val_if_fail (event != NULL, FALSE);
switch ((guint) event->any.type)
{
case GDK_MOTION_NOTIFY:
x = event->motion.x_root;
y = event->motion.y_root;
break;
case GDK_SCROLL:
x = event->scroll.x_root;
y = event->scroll.y_root;
break;
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
x = event->button.x_root;
y = event->button.y_root;
break;
case GDK_TOUCH_BEGIN:
case GDK_TOUCH_UPDATE:
case GDK_TOUCH_END:
case GDK_TOUCH_CANCEL:
x = event->touch.x_root;
y = event->touch.y_root;
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
x = event->crossing.x_root;
y = event->crossing.y_root;
break;
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DROP_START:
x = event->dnd.x_root;
y = event->dnd.y_root;
break;
case GDK_TOUCHPAD_SWIPE:
x = event->touchpad_swipe.x_root;
y = event->touchpad_swipe.y_root;
break;
case GDK_TOUCHPAD_PINCH:
x = event->touchpad_pinch.x_root;
y = event->touchpad_pinch.y_root;
break;
default:
fetched = FALSE;
break;
}
if (x_root)
*x_root = x;
if (y_root)
*y_root = y;
return fetched;
}
void
gdk_event_set_coords (GdkEvent *event,
gdouble x,

View File

@ -364,10 +364,6 @@ void gdk_event_set_coords (GdkEvent *event,
gdouble x,
gdouble y);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_root_coords (const GdkEvent *event,
gdouble *x_root,
gdouble *y_root);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_button (const GdkEvent *event,
guint *button);
GDK_AVAILABLE_IN_ALL