[gtk+] gdkdisplay: Remove get_screen() and get_n_screens() vfuncs
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdkdisplay: Remove get_screen() and get_n_screens() vfuncs
- Date: Tue, 2 Apr 2013 09:48:31 +0000 (UTC)
commit a6b29d73d7ebbbe17ca0e4d1fd267754efc8cabf
Author: Benjamin Otte <otte redhat com>
Date: Mon Apr 1 14:47:17 2013 +0200
gdkdisplay: Remove get_screen() and get_n_screens() vfuncs
gdk/broadway/gdkdisplay-broadway.c | 20 --------------------
gdk/gdkdisplay.c | 5 +++--
gdk/gdkdisplayprivate.h | 3 ---
gdk/quartz/gdkdisplay-quartz.c | 20 --------------------
gdk/wayland/gdkdisplay-wayland.c | 18 ------------------
gdk/x11/gdkdisplay-x11.c | 17 -----------------
6 files changed, 3 insertions(+), 80 deletions(-)
---
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index 8a3bf65..ed24fe0 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 f5b4ac2..20ea9b4 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 b4559eb..d8e2784 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 202a07f..f78479f 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 0e7ec08..b397df7 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 50a31fe..4bd2f2e 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]