win32: Make GdkWin32Screen a plain object

No need to derive this from GdkScreen anymore.
This commit is contained in:
Matthias Clasen 2017-11-17 13:26:41 -05:00
parent 211d72e545
commit d24ae9c032
2 changed files with 3 additions and 14 deletions

View File

@ -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);
}

View File

@ -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