gdkdisplay: Remove get_screen() and get_n_screens() vfuncs

This commit is contained in:
Benjamin Otte 2013-04-01 14:47:17 +02:00
parent 88d59448ea
commit a6b29d73d7
6 changed files with 3 additions and 80 deletions

View File

@ -186,24 +186,6 @@ gdk_broadway_display_get_name (GdkDisplay *display)
return (gchar *) "Broadway";
}
static gint
gdk_broadway_display_get_n_screens (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
return 1;
}
static GdkScreen *
gdk_broadway_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num == 0, NULL);
return GDK_BROADWAY_DISPLAY (display)->screens[screen_num];
}
static GdkScreen *
gdk_broadway_display_get_default_screen (GdkDisplay *display)
{
@ -394,8 +376,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
display_class->window_type = GDK_TYPE_BROADWAY_WINDOW;
display_class->get_name = gdk_broadway_display_get_name;
display_class->get_n_screens = gdk_broadway_display_get_n_screens;
display_class->get_screen = gdk_broadway_display_get_screen;
display_class->get_default_screen = gdk_broadway_display_get_default_screen;
display_class->beep = gdk_broadway_display_beep;
display_class->sync = gdk_broadway_display_sync;

View File

@ -1430,7 +1430,7 @@ gdk_display_get_n_screens (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
return GDK_DISPLAY_GET_CLASS (display)->get_n_screens (display);
return 1;
}
/**
@ -1449,8 +1449,9 @@ gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num != 0, NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_screen (display, screen_num);
return gdk_display_get_default_screen (display);
}
/**

View File

@ -136,9 +136,6 @@ struct _GdkDisplayClass
GType window_type; /* type for native windows for this display, set in class_init */
const gchar * (*get_name) (GdkDisplay *display);
gint (*get_n_screens) (GdkDisplay *display);
GdkScreen * (*get_screen) (GdkDisplay *display,
gint screen_num);
GdkScreen * (*get_default_screen) (GdkDisplay *display);
void (*beep) (GdkDisplay *display);
void (*sync) (GdkDisplay *display);

View File

@ -155,24 +155,6 @@ gdk_quartz_display_get_name (GdkDisplay *display)
return display_name;
}
static gint
gdk_quartz_display_get_n_screens (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
return 1;
}
static GdkScreen *
gdk_quartz_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num == 0, NULL);
return _gdk_screen;
}
static GdkScreen *
gdk_quartz_display_get_default_screen (GdkDisplay *display)
{
@ -323,8 +305,6 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->window_type = GDK_TYPE_QUARTZ_WINDOW;
display_class->get_name = gdk_quartz_display_get_name;
display_class->get_n_screens = gdk_quartz_display_get_n_screens;
display_class->get_screen = gdk_quartz_display_get_screen;
display_class->get_default_screen = gdk_quartz_display_get_default_screen;
display_class->beep = gdk_quartz_display_beep;
display_class->sync = gdk_quartz_display_sync;

View File

@ -301,22 +301,6 @@ gdk_wayland_display_get_name (GdkDisplay *display)
return "Wayland";
}
static gint
gdk_wayland_display_get_n_screens (GdkDisplay *display)
{
return 1;
}
static GdkScreen *
gdk_wayland_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num == 0, NULL);
return GDK_WAYLAND_DISPLAY (display)->screen;
}
static GdkScreen *
gdk_wayland_display_get_default_screen (GdkDisplay *display)
{
@ -588,8 +572,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class)
display_class->window_type = gdk_wayland_window_get_type ();
display_class->get_name = gdk_wayland_display_get_name;
display_class->get_n_screens = gdk_wayland_display_get_n_screens;
display_class->get_screen = gdk_wayland_display_get_screen;
display_class->get_default_screen = gdk_wayland_display_get_default_screen;
display_class->beep = gdk_wayland_display_beep;
display_class->sync = gdk_wayland_display_sync;

View File

@ -1670,21 +1670,6 @@ gdk_x11_display_get_name (GdkDisplay *display)
return (gchar *) DisplayString (GDK_X11_DISPLAY (display)->xdisplay);
}
static gint
gdk_x11_display_get_n_screens (GdkDisplay *display)
{
return 1;
}
static GdkScreen *
gdk_x11_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (screen_num == 0, NULL);
return GDK_X11_DISPLAY (display)->screen;
}
static GdkScreen *
gdk_x11_display_get_default_screen (GdkDisplay *display)
{
@ -2798,8 +2783,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->window_type = GDK_TYPE_X11_WINDOW;
display_class->get_name = gdk_x11_display_get_name;
display_class->get_n_screens = gdk_x11_display_get_n_screens;
display_class->get_screen = gdk_x11_display_get_screen;
display_class->get_default_screen = gdk_x11_display_get_default_screen;
display_class->beep = gdk_x11_display_beep;
display_class->sync = gdk_x11_display_sync;