[gtk+] Remove some more deprecated display API
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove some more deprecated display API
- Date: Tue, 25 Oct 2016 23:51:58 +0000 (UTC)
commit 1396d6c92ac9735cd02efd99e937d4e4bb0cdbf8
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 25 19:31:24 2016 -0400
Remove some more deprecated display API
gdk_display_get_pointer, gdk_display_get_window_at_pointer and
gdk_display_warp_pointer have long been deprecated.
docs/reference/gdk/gdk4-sections.txt | 3 -
gdk/gdkdisplay.c | 128 ----------------------------------
gdk/gdkdisplay.h | 18 -----
3 files changed, 0 insertions(+), 149 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 6e547c7..fd542ed 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -114,9 +114,6 @@ gdk_display_put_event
gdk_display_has_pending
gdk_display_set_double_click_time
gdk_display_set_double_click_distance
-gdk_display_get_pointer
-gdk_display_get_window_at_pointer
-gdk_display_warp_pointer
gdk_display_supports_cursor_color
gdk_display_supports_cursor_alpha
gdk_display_get_default_cursor_size
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index c38014c..5609181 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -570,97 +570,6 @@ _gdk_display_enable_motion_hints (GdkDisplay *display,
}
}
-/**
- * gdk_display_get_pointer:
- * @display: a #GdkDisplay
- * @screen: (out) (allow-none) (transfer none): location to store the screen that the
- * cursor is on, or %NULL.
- * @x: (out) (allow-none): location to store root window X coordinate of pointer, or %NULL.
- * @y: (out) (allow-none): location to store root window Y coordinate of pointer, or %NULL.
- * @mask: (out) (allow-none): location to store current modifier mask, or %NULL
- *
- * Gets the current location of the pointer and the current modifier
- * mask for a given display.
- *
- * Since: 2.2
- *
- * Deprecated: 3.0: Use gdk_device_get_position() instead.
- **/
-void
-gdk_display_get_pointer (GdkDisplay *display,
- GdkScreen **screen,
- gint *x,
- gint *y,
- GdkModifierType *mask)
-{
- GdkScreen *default_screen;
- GdkSeat *default_seat;
- GdkWindow *root;
- gdouble tmp_x, tmp_y;
- GdkModifierType tmp_mask;
-
- g_return_if_fail (GDK_IS_DISPLAY (display));
-
- if (gdk_display_is_closed (display))
- return;
-
- default_screen = gdk_display_get_default_screen (display);
- default_seat = gdk_display_get_default_seat (display);
-
- /* We call _gdk_device_query_state() here manually instead of
- * gdk_device_get_position() because we care about the modifier mask */
-
- _gdk_device_query_state (gdk_seat_get_pointer (default_seat),
- gdk_screen_get_root_window (default_screen),
- &root, NULL,
- &tmp_x, &tmp_y,
- NULL, NULL,
- &tmp_mask);
-
- if (screen)
- *screen = gdk_window_get_screen (root);
- if (x)
- *x = round (tmp_x);
- if (y)
- *y = round (tmp_y);
- if (mask)
- *mask = tmp_mask;
-}
-
-/**
- * gdk_display_get_window_at_pointer:
- * @display: a #GdkDisplay
- * @win_x: (out) (allow-none): return location for x coordinate of the pointer location relative
- * to the window origin, or %NULL
- * @win_y: (out) (allow-none): return location for y coordinate of the pointer location relative
- & to the window origin, or %NULL
- *
- * Obtains the window underneath the mouse pointer, returning the location
- * of the pointer in that window in @win_x, @win_y for @screen. Returns %NULL
- * if the window under the mouse pointer is not known to GDK (for example,
- * belongs to another application).
- *
- * Returns: (nullable) (transfer none): the window under the mouse
- * pointer, or %NULL
- *
- * Since: 2.2
- *
- * Deprecated: 3.0: Use gdk_device_get_window_at_position() instead.
- **/
-GdkWindow *
-gdk_display_get_window_at_pointer (GdkDisplay *display,
- gint *win_x,
- gint *win_y)
-{
- GdkDevice *pointer;
-
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
-
- pointer = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
-
- return gdk_device_get_window_at_position (pointer, win_x, win_y);
-}
-
static void
generate_grab_broken_event (GdkDisplay *display,
GdkWindow *window,
@@ -1841,43 +1750,6 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
height);
}
-/**
- * gdk_display_warp_pointer:
- * @display: a #GdkDisplay
- * @screen: the screen of @display to warp the pointer to
- * @x: the x coordinate of the destination
- * @y: the y coordinate of the destination
- *
- * Warps the pointer of @display to the point @x,@y on
- * the screen @screen, unless the pointer is confined
- * to a window by a grab, in which case it will be moved
- * as far as allowed by the grab. Warping the pointer
- * creates events as if the user had moved the mouse
- * instantaneously to the destination.
- *
- * Note that the pointer should normally be under the
- * control of the user. This function was added to cover
- * some rare use cases like keyboard navigation support
- * for the color picker in the #GtkColorSelectionDialog.
- *
- * Since: 2.8
- *
- * Deprecated: 3.0: Use gdk_device_warp() instead.
- */
-void
-gdk_display_warp_pointer (GdkDisplay *display,
- GdkScreen *screen,
- gint x,
- gint y)
-{
- GdkDevice *pointer;
-
- g_return_if_fail (GDK_IS_DISPLAY (display));
-
- pointer = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
- gdk_device_warp (pointer, screen, x, y);
-}
-
gulong
_gdk_display_get_next_serial (GdkDisplay *display)
{
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index 1091584..a470294 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -85,24 +85,6 @@ void gdk_display_set_double_click_distance (GdkDisplay *display,
GDK_AVAILABLE_IN_ALL
GdkDisplay *gdk_display_get_default (void);
-#ifndef GDK_MULTIDEVICE_SAFE
-GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_position)
-void gdk_display_get_pointer (GdkDisplay *display,
- GdkScreen **screen,
- gint *x,
- gint *y,
- GdkModifierType *mask);
-GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_window_at_position)
-GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display,
- gint *win_x,
- gint *win_y);
-GDK_DEPRECATED_IN_3_0_FOR(gdk_device_warp)
-void gdk_display_warp_pointer (GdkDisplay *display,
- GdkScreen *screen,
- gint x,
- gint y);
-#endif /* GDK_MULTIDEVICE_SAFE */
-
GDK_DEPRECATED_IN_3_16
GdkDisplay *gdk_display_open_default_libgtk_only (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]