summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2013-04-01 14:47:17 +0200
committerBenjamin Otte <otte@redhat.com>2013-04-02 11:45:44 +0200
commita6b29d73d7ebbbe17ca0e4d1fd267754efc8cabf (patch)
tree4b5fadfca0035fca0fefaeffda0f70bae8b6137e /gdk
parent88d59448eab595f0f5461744c47b030d056561dc (diff)
downloadgtk+-a6b29d73d7ebbbe17ca0e4d1fd267754efc8cabf.tar.gz
gdkdisplay: Remove get_screen() and get_n_screens() vfuncs
Diffstat (limited to 'gdk')
-rw-r--r--gdk/broadway/gdkdisplay-broadway.c20
-rw-r--r--gdk/gdkdisplay.c5
-rw-r--r--gdk/gdkdisplayprivate.h3
-rw-r--r--gdk/quartz/gdkdisplay-quartz.c20
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c18
-rw-r--r--gdk/x11/gdkdisplay-x11.c17
6 files changed, 3 insertions, 80 deletions
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index 8a3bf6500a..ed24fe0c34 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -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;
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index f5b4ac2dd0..20ea9b4fad 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -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);
}
/**
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index b4559eb4cb..d8e27849ea 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -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);
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index 202a07f909..f78479f039 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -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;
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 0e7ec0867e..b397df7bc9 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -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;
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 50a31fe5b8..4bd2f2e6ed 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -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;