[gtk+] win32: Make GdkWin32Screen a plain object
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Make GdkWin32Screen a plain object
- Date: Fri, 17 Nov 2017 18:54:42 +0000 (UTC)
commit d24ae9c032c09b76012e33c18debc5bf36b0fab4
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 17 13:26:41 2017 -0500
win32: Make GdkWin32Screen a plain object
No need to derive this from GdkScreen anymore.
gdk/win32/gdkscreen-win32.c | 13 +++----------
gdk/win32/gdkwin32screen.h | 4 ----
2 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index 546c367..9e8b21b 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -21,7 +21,6 @@
#include "gdk.h"
#include "gdkprivate-win32.h"
-#include "gdkscreenprivate.h"
#include "gdkwin32screen.h"
#include "gdkdisplayprivate.h"
#include "gdkdisplay-win32.h"
@@ -31,7 +30,7 @@
struct _GdkWin32Screen
{
- GdkScreen parent_instance;
+ GObject parent_instance;
int width, height;
int window_scale;
@@ -39,10 +38,10 @@ struct _GdkWin32Screen
struct _GdkWin32ScreenClass
{
- GdkScreenClass parent_class;
+ GObjectClass parent_class;
};
-G_DEFINE_TYPE (GdkWin32Screen, gdk_win32_screen, GDK_TYPE_SCREEN)
+G_DEFINE_TYPE (GdkWin32Screen, gdk_win32_screen, G_TYPE_OBJECT)
static void
init_root_window_size (GdkWin32Screen *screen)
@@ -74,11 +73,8 @@ init_root_window_size (GdkWin32Screen *screen)
static void
init_root_window (GdkWin32Screen *screen_win32)
{
- GdkScreen *screen;
GdkWin32Display *win32_display;
- screen = GDK_SCREEN (screen_win32);
-
init_root_window_size (screen_win32);
win32_display = GDK_WIN32_DISPLAY (_gdk_display);
@@ -95,8 +91,6 @@ init_root_window (GdkWin32Screen *screen_win32)
static void
gdk_win32_screen_init (GdkWin32Screen *win32_screen)
{
- GdkScreen *screen = GDK_SCREEN (win32_screen);
-
_gdk_win32_display_init_monitors (GDK_WIN32_DISPLAY (_gdk_display));
init_root_window (win32_screen);
}
@@ -105,7 +99,6 @@ void
_gdk_win32_screen_on_displaychange_event (GdkWin32Screen *screen)
{
_gdk_win32_display_init_monitors (GDK_WIN32_DISPLAY (_gdk_display));
-
init_root_window_size (screen);
}
diff --git a/gdk/win32/gdkwin32screen.h b/gdk/win32/gdkwin32screen.h
index 3db928c..eb12e2a 100644
--- a/gdk/win32/gdkwin32screen.h
+++ b/gdk/win32/gdkwin32screen.h
@@ -40,11 +40,7 @@ G_BEGIN_DECLS
#define GDK_IS_WIN32_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WIN32_SCREEN))
#define GDK_WIN32_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WIN32_SCREEN,
GdkWin32ScreenClass))
-#ifdef GDK_COMPILATION
typedef struct _GdkWin32Screen GdkWin32Screen;
-#else
-typedef GdkScreen GdkWin32Screen;
-#endif
typedef struct _GdkWin32ScreenClass GdkWin32ScreenClass;
GDK_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]