From d380cf114bb16eee08be167e484d2f2f79afaae5 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 1 Nov 2017 22:57:42 +0100 Subject: [PATCH] x11: Remove outdated functions from API We don't want generic APIs that do random stuff on the default X display. --- docs/reference/gdk/gdk4-sections.txt | 5 ---- gdk/gdkwindow.c | 3 -- gdk/x11/gdkmain-x11.c | 45 ---------------------------- gdk/x11/gdkx11screen.h | 3 -- gdk/x11/gdkx11utils.h | 12 -------- 5 files changed, 68 deletions(-) diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 324dcfcfe1..def93fbf89 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -797,7 +797,6 @@ GDK_TYPE_EVENT GDK_TYPE_NOTIFY_TYPE GDK_TYPE_PROPERTY_STATE GDK_TYPE_SCROLL_DIRECTION -GDK_TYPE_VISIBILITY_STATE GDK_TYPE_WINDOW_STATE GDK_TYPE_OWNER_CHANGE @@ -881,7 +880,6 @@ gdk_drag_context_get_type gdk/gdkx.h X Window System Interaction x_interaction -GDK_ROOT_WINDOW GDK_WINDOW_XID GDK_DISPLAY_XDISPLAY GDK_CURSOR_XCURSOR @@ -929,9 +927,6 @@ gdk_x11_window_get_desktop gdk_x11_window_set_utf8_property gdk_x11_window_set_frame_extents gdk_x11_window_set_frame_sync_enabled -gdk_x11_get_default_root_xwindow -gdk_x11_get_default_screen -gdk_x11_get_default_xdisplay gdk_x11_grab_server gdk_x11_ungrab_server gdk_x11_cursor_get_xcursor diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index fb382d4a3a..35de69a58c 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -92,9 +92,6 @@ * region of the window wrt parent windows, in window-relative coordinates (clip_region). */ -/* This adds a local value to the GdkVisibilityState enum */ -#define GDK_VISIBILITY_NOT_VIEWABLE 3 - enum { MOVED_TO_RECT, LAST_SIGNAL diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index c365940607..55b52232bf 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -415,48 +415,3 @@ gdk_x11_ungrab_server (void) gdk_x11_display_ungrab (gdk_display_get_default ()); } -/** - * gdk_x11_get_default_screen: - * - * Gets the default GTK+ screen number. - * - * Returns: returns the screen number specified by - * the --display command line option or the DISPLAY environment - * variable when gdk_init() calls XOpenDisplay(). - **/ -gint -gdk_x11_get_default_screen (void) -{ - GdkDisplay *display = gdk_display_get_default (); - return gdk_x11_screen_get_screen_number (GDK_X11_DISPLAY (display)->screen); -} - -/** - * gdk_x11_get_default_root_xwindow: - * - * Gets the root window of the default screen - * (see gdk_x11_get_default_screen()). - * - * Returns: an Xlib Window. - **/ -Window -gdk_x11_get_default_root_xwindow (void) -{ - GdkDisplay *display = gdk_display_get_default (); - return GDK_SCREEN_XROOTWIN (GDK_X11_DISPLAY (display)->screen); -} - -/** - * gdk_x11_get_default_xdisplay: - * - * Gets the default GTK+ display. - * - * Returns: (transfer none): the Xlib Display* for - * the display specified in the `--display` command - * line option or the `DISPLAY` environment variable. - **/ -Display * -gdk_x11_get_default_xdisplay (void) -{ - return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); -} diff --git a/gdk/x11/gdkx11screen.h b/gdk/x11/gdkx11screen.h index d843bada7a..167c7b5dd4 100644 --- a/gdk/x11/gdkx11screen.h +++ b/gdk/x11/gdkx11screen.h @@ -61,9 +61,6 @@ int gdk_x11_screen_get_screen_number (GdkScreen *screen); GDK_AVAILABLE_IN_ALL const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen); -GDK_AVAILABLE_IN_ALL -gint gdk_x11_get_default_screen (void); - GDK_AVAILABLE_IN_ALL gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom property); diff --git a/gdk/x11/gdkx11utils.h b/gdk/x11/gdkx11utils.h index 0fa34bcf6c..d23b13e9a9 100644 --- a/gdk/x11/gdkx11utils.h +++ b/gdk/x11/gdkx11utils.h @@ -36,18 +36,6 @@ G_BEGIN_DECLS -GDK_AVAILABLE_IN_ALL -Window gdk_x11_get_default_root_xwindow (void); -GDK_AVAILABLE_IN_ALL -Display *gdk_x11_get_default_xdisplay (void); - -/** - * GDK_ROOT_WINDOW: - * - * Obtains the Xlib window id of the root window of the current screen. - */ -#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ()) - /** * GDK_XID_TO_POINTER: * @xid: XID to stuff into the pointer