API: gdk: Remove gdk_screen_get_number()

It's useless everywhere but in internal X11 code.
This commit is contained in:
Benjamin Otte 2016-09-09 16:34:21 +02:00
parent 0be88cc76e
commit 26f9b584be
12 changed files with 5 additions and 74 deletions

View File

@ -48,12 +48,6 @@ gdk_broadway_screen_get_display (GdkScreen *screen)
return GDK_BROADWAY_SCREEN (screen)->display;
}
static gint
gdk_broadway_screen_get_number (GdkScreen *screen)
{
return 0;
}
static GdkWindow *
gdk_broadway_screen_get_root_window (GdkScreen *screen)
{
@ -207,7 +201,6 @@ gdk_broadway_screen_class_init (GdkBroadwayScreenClass *klass)
object_class->finalize = gdk_broadway_screen_finalize;
screen_class->get_display = gdk_broadway_screen_get_display;
screen_class->get_number = gdk_broadway_screen_get_number;
screen_class->get_root_window = gdk_broadway_screen_get_root_window;
screen_class->is_composited = gdk_broadway_screen_is_composited;
screen_class->make_display_name = gdk_broadway_screen_make_display_name;

View File

@ -365,25 +365,6 @@ gdk_screen_get_display (GdkScreen *screen)
return GDK_SCREEN_GET_CLASS (screen)->get_display (screen);
}
/**
* gdk_screen_get_number:
* @screen: a #GdkScreen
*
* Gets the index of @screen among the screens in the display
* to which it belongs. (See gdk_screen_get_display())
*
* Returns: the index
*
* Since: 2.2
**/
gint
gdk_screen_get_number (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
return GDK_SCREEN_GET_CLASS (screen)->get_number (screen);
}
/**
* gdk_screen_get_root_window:
* @screen: a #GdkScreen

View File

@ -52,8 +52,6 @@ GDK_AVAILABLE_IN_ALL
GdkWindow * gdk_screen_get_root_window (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_screen_get_display (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
gint gdk_screen_get_number (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList * gdk_screen_list_visuals (GdkScreen *screen);

View File

@ -44,7 +44,6 @@ struct _GdkScreenClass
GObjectClass parent_class;
GdkDisplay * (* get_display) (GdkScreen *screen);
gint (* get_number) (GdkScreen *screen);
GdkWindow * (* get_root_window) (GdkScreen *screen);
gint (* get_n_monitors) (GdkScreen *screen);
gint (* get_primary_monitor) (GdkScreen *screen);

View File

@ -236,14 +236,6 @@ gdk_mir_screen_get_height_mm (GdkScreen *screen)
return height;
}
static gint
gdk_mir_screen_get_number (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_number\n");
/* There is only one screen... */
return 0;
}
static GdkWindow *
gdk_mir_screen_get_root_window (GdkScreen *screen)
{
@ -814,7 +806,6 @@ gdk_mir_screen_class_init (GdkMirScreenClass *klass)
screen_class->get_height = gdk_mir_screen_get_height;
screen_class->get_width_mm = gdk_mir_screen_get_width_mm;
screen_class->get_height_mm = gdk_mir_screen_get_height_mm;
screen_class->get_number = gdk_mir_screen_get_number;
screen_class->get_root_window = gdk_mir_screen_get_root_window;
screen_class->get_n_monitors = gdk_mir_screen_get_n_monitors;
screen_class->get_primary_monitor = gdk_mir_screen_get_primary_monitor;

View File

@ -297,12 +297,6 @@ gdk_quartz_screen_get_root_window (GdkScreen *screen)
return _gdk_root;
}
static gint
gdk_quartz_screen_get_number (GdkScreen *screen)
{
return 0;
}
static gint
gdk_quartz_screen_get_width (GdkScreen *screen)
{
@ -496,7 +490,6 @@ gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
screen_class->get_height = gdk_quartz_screen_get_height;
screen_class->get_width_mm = gdk_quartz_screen_get_width_mm;
screen_class->get_height_mm = gdk_quartz_screen_get_height_mm;
screen_class->get_number = gdk_quartz_screen_get_number;
screen_class->get_root_window = gdk_quartz_screen_get_root_window;
screen_class->get_n_monitors = gdk_quartz_screen_get_n_monitors;
screen_class->get_primary_monitor = gdk_quartz_screen_get_primary_monitor;

View File

@ -111,12 +111,6 @@ gdk_wayland_screen_get_display (GdkScreen *screen)
return GDK_WAYLAND_SCREEN (screen)->display;
}
static gint
gdk_wayland_screen_get_number (GdkScreen *screen)
{
return 0;
}
static GdkWindow *
gdk_wayland_screen_get_root_window (GdkScreen *screen)
{
@ -820,7 +814,6 @@ _gdk_wayland_screen_class_init (GdkWaylandScreenClass *klass)
object_class->finalize = gdk_wayland_screen_finalize;
screen_class->get_display = gdk_wayland_screen_get_display;
screen_class->get_number = gdk_wayland_screen_get_number;
screen_class->get_root_window = gdk_wayland_screen_get_root_window;
screen_class->get_system_visual = gdk_wayland_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_wayland_screen_get_rgba_visual;

View File

@ -386,14 +386,6 @@ gdk_win32_screen_get_root_window (GdkScreen *screen)
return GDK_WIN32_SCREEN (screen)->root_window;
}
static gint
gdk_win32_screen_get_number (GdkScreen *screen)
{
g_return_val_if_fail (screen == gdk_display_get_default_screen (gdk_display_get_default ()), 0);
return 0;
}
static gchar *
gdk_win32_screen_make_display_name (GdkScreen *screen)
{
@ -549,7 +541,6 @@ gdk_win32_screen_class_init (GdkWin32ScreenClass *klass)
object_class->finalize = gdk_win32_screen_finalize;
screen_class->get_display = gdk_win32_screen_get_display;
screen_class->get_number = gdk_win32_screen_get_number;
screen_class->get_root_window = gdk_win32_screen_get_root_window;
screen_class->is_composited = gdk_win32_screen_is_composited;
screen_class->make_display_name = gdk_win32_screen_make_display_name;

View File

@ -346,7 +346,7 @@ gdk_x11_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
if (timestamp == GDK_CURRENT_TIME)
timestamp = gdk_x11_display_get_user_time (display);
screen_str = g_strdup_printf ("%d", gdk_screen_get_number (screen));
screen_str = g_strdup_printf ("%d", gdk_x11_screen_get_screen_number (screen));
if (ctx->workspace > -1)
workspace_str = g_strdup_printf ("%d", ctx->workspace);
else

View File

@ -434,7 +434,7 @@ gdk_x11_ungrab_server (void)
gint
gdk_x11_get_default_screen (void)
{
return gdk_screen_get_number (gdk_screen_get_default ());
return gdk_x11_screen_get_screen_number (gdk_screen_get_default ());
}
/**

View File

@ -79,12 +79,6 @@ gdk_x11_screen_get_display (GdkScreen *screen)
return GDK_X11_SCREEN (screen)->display;
}
static gint
gdk_x11_screen_get_number (GdkScreen *screen)
{
return GDK_X11_SCREEN (screen)->screen_num;
}
static GdkWindow *
gdk_x11_screen_get_root_window (GdkScreen *screen)
{
@ -118,7 +112,6 @@ gdk_x11_screen_dispose (GObject *object)
x11_screen->xdisplay = NULL;
x11_screen->xscreen = NULL;
x11_screen->screen_num = -1;
x11_screen->xroot_window = None;
x11_screen->wmspec_check_window = None;
}
@ -1085,7 +1078,7 @@ gdk_x11_screen_make_display_name (GdkScreen *screen)
old_display = gdk_display_get_name (gdk_screen_get_display (screen));
return substitute_screen_number (old_display,
gdk_screen_get_number (screen));
gdk_x11_screen_get_screen_number (screen));
}
static GdkWindow *
@ -1476,7 +1469,6 @@ gdk_x11_screen_class_init (GdkX11ScreenClass *klass)
object_class->finalize = gdk_x11_screen_finalize;
screen_class->get_display = gdk_x11_screen_get_display;
screen_class->get_number = gdk_x11_screen_get_number;
screen_class->get_root_window = gdk_x11_screen_get_root_window;
screen_class->get_system_visual = _gdk_x11_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_x11_screen_get_rgba_visual;

View File

@ -2103,7 +2103,7 @@ gdk_window_x11_restack_toplevel (GdkWindow *window,
changes.stack_mode = above ? Above : Below;
XReconfigureWMWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
gdk_screen_get_number (GDK_WINDOW_SCREEN (window)),
gdk_x11_screen_get_screen_number (GDK_WINDOW_SCREEN (window)),
CWStackMode | CWSibling, &changes);
}
@ -4003,7 +4003,7 @@ gdk_x11_window_iconify (GdkWindow *window)
{
XIconifyWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
gdk_screen_get_number (GDK_WINDOW_SCREEN (window)));
gdk_x11_screen_get_screen_number (GDK_WINDOW_SCREEN (window)));
}
else
{