broadway: Move monitor to its own files
This commit is contained in:
@@ -28,6 +28,7 @@ libgdkbroadwayinclude_HEADERS = \
|
||||
gdkbroadwaydisplay.h \
|
||||
gdkbroadwaywindow.h \
|
||||
gdkbroadwaycursor.h \
|
||||
gdkbroadwaymonitor.h \
|
||||
gdkbroadwayvisual.h
|
||||
|
||||
EXTRA_DIST += toarray.pl
|
||||
@@ -64,6 +65,8 @@ libgdk_broadway_la_SOURCES = \
|
||||
gdkeventsource.h \
|
||||
gdkglobals-broadway.c \
|
||||
gdkkeys-broadway.c \
|
||||
gdkmonitor-broadway.c \
|
||||
gdkmonitor-broadway.h \
|
||||
gdkproperty-broadway.c \
|
||||
gdkscreen-broadway.c \
|
||||
gdkscreen-broadway.h \
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <gdk/broadway/gdkbroadwaydisplay.h>
|
||||
#include <gdk/broadway/gdkbroadwaywindow.h>
|
||||
#include <gdk/broadway/gdkbroadwaycursor.h>
|
||||
#include <gdk/broadway/gdkbroadwaymonitor.h>
|
||||
#include <gdk/broadway/gdkbroadwayvisual.h>
|
||||
|
||||
#undef __GDKBROADWAY_H_INSIDE__
|
||||
|
||||
46
gdk/broadway/gdkbroadwaymonitor.h
Normal file
46
gdk/broadway/gdkbroadwaymonitor.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* gdkbroadwaymonitor.h
|
||||
*
|
||||
* Copyright 2016 Red Hat, Inc.
|
||||
*
|
||||
* Matthias Clasen <mclasen@redhat.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_MONITOR_H__
|
||||
#define __GDK_BROADWAY_MONITOR_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkmonitor.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_MONITOR (gdk_broadway_monitor_get_type ())
|
||||
#define GDK_BROADWAY_MONITOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_MONITOR, GdkBroadwayMonitor))
|
||||
#define GDK_IS_BROADWAY_MONITOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_MONITOR))
|
||||
|
||||
typedef struct _GdkBroadwayMonitor GdkBroadwayMonitor;
|
||||
typedef struct _GdkBroadwayMonitorClass GdkBroadwayMonitorClass;
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GType gdk_broadway_monitor_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_MONITOR_H__ */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "gdkeventsource.h"
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkscreen-broadway.h"
|
||||
#include "gdkmonitor-broadway.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkdevicemanager-broadway.h"
|
||||
@@ -56,7 +57,9 @@ gdk_broadway_display_init (GdkBroadwayDisplay *display)
|
||||
{
|
||||
display->id_ht = g_hash_table_new (NULL, NULL);
|
||||
|
||||
display->monitor = g_object_new (gdk_monitor_get_type (), "display", display, NULL);
|
||||
display->monitor = g_object_new (GDK_TYPE_BROADWAY_MONITOR,
|
||||
"display", display,
|
||||
NULL);
|
||||
gdk_monitor_set_manufacturer (display->monitor, "browser");
|
||||
gdk_monitor_set_model (display->monitor, "0");
|
||||
}
|
||||
|
||||
37
gdk/broadway/gdkmonitor-broadway.c
Normal file
37
gdk/broadway/gdkmonitor-broadway.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright © 2016 Red Hat, Inc
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "gdkmonitor-broadway.h"
|
||||
#include "gdkscreen-broadway.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwayMonitor, gdk_broadway_monitor, GDK_TYPE_MONITOR)
|
||||
|
||||
static void
|
||||
gdk_broadway_monitor_init (GdkBroadwayMonitor *monitor)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_monitor_class_init (GdkBroadwayMonitorClass *class)
|
||||
{
|
||||
}
|
||||
38
gdk/broadway/gdkmonitor-broadway.h
Normal file
38
gdk/broadway/gdkmonitor-broadway.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright © 2016 Red Hat, Inc
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_MONITOR_PRIVATE_H__
|
||||
#define __GDK_BROADWAY_MONITOR_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "gdkmonitorprivate.h"
|
||||
|
||||
#include "gdkbroadwaymonitor.h"
|
||||
|
||||
|
||||
struct _GdkBroadwayMonitor
|
||||
{
|
||||
GdkMonitor parent;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayMonitorClass {
|
||||
GdkMonitorClass parent_class;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user