[gtk+/wip/matthiasc/monitor] broadway: Move monitor to its own files



commit ec0b81e1eb8f9e153d6f6dc3532c26fbcdaf095f
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Apr 5 07:32:33 2016 -0400

    broadway: Move monitor to its own files

 gdk/broadway/Makefile.am           |    3 ++
 gdk/broadway/gdkbroadway.h         |    1 +
 gdk/broadway/gdkbroadwaymonitor.h  |   46 ++++++++++++++++++++++++++++++++++++
 gdk/broadway/gdkdisplay-broadway.c |    5 +++-
 gdk/broadway/gdkmonitor-broadway.c |   37 +++++++++++++++++++++++++++++
 gdk/broadway/gdkmonitor-broadway.h |   38 +++++++++++++++++++++++++++++
 6 files changed, 129 insertions(+), 1 deletions(-)
---
diff --git a/gdk/broadway/Makefile.am b/gdk/broadway/Makefile.am
index 2f8457e..59dc5d0 100644
--- a/gdk/broadway/Makefile.am
+++ b/gdk/broadway/Makefile.am
@@ -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    \
diff --git a/gdk/broadway/gdkbroadway.h b/gdk/broadway/gdkbroadway.h
index 6c64658..89086c4 100644
--- a/gdk/broadway/gdkbroadway.h
+++ b/gdk/broadway/gdkbroadway.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__
diff --git a/gdk/broadway/gdkbroadwaymonitor.h b/gdk/broadway/gdkbroadwaymonitor.h
new file mode 100644
index 0000000..2021c0c
--- /dev/null
+++ b/gdk/broadway/gdkbroadwaymonitor.h
@@ -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__ */
+
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index a56acaf..54a1fa8 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -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");
 }
diff --git a/gdk/broadway/gdkmonitor-broadway.c b/gdk/broadway/gdkmonitor-broadway.c
new file mode 100644
index 0000000..aebc280
--- /dev/null
+++ b/gdk/broadway/gdkmonitor-broadway.c
@@ -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)
+{
+}
diff --git a/gdk/broadway/gdkmonitor-broadway.h b/gdk/broadway/gdkmonitor-broadway.h
new file mode 100644
index 0000000..96b1751
--- /dev/null
+++ b/gdk/broadway/gdkmonitor-broadway.h
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]