[mutter] monitor-config: Modernize type declaration



commit 06375373553b4fcc4dce097a4813b860474245da
Author: Jonas Ådahl <jadahl gmail com>
Date:   Thu Dec 15 17:03:39 2016 +0800

    monitor-config: Modernize type declaration
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777732

 src/backends/meta-monitor-config.c          |    4 ----
 src/backends/meta-monitor-config.h          |   11 +++--------
 src/backends/meta-monitor-manager-private.h |    1 -
 3 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/src/backends/meta-monitor-config.c b/src/backends/meta-monitor-config.c
index e0ee771..bfc1f6c 100644
--- a/src/backends/meta-monitor-config.c
+++ b/src/backends/meta-monitor-config.c
@@ -91,10 +91,6 @@ struct _MetaMonitorConfig {
   gboolean lid_is_closed;
 };
 
-struct _MetaMonitorConfigClass {
-  GObjectClass parent;
-};
-
 G_DEFINE_TYPE (MetaMonitorConfig, meta_monitor_config, G_TYPE_OBJECT);
 
 static gboolean meta_monitor_config_assign_crtcs (MetaConfiguration  *config,
diff --git a/src/backends/meta-monitor-config.h b/src/backends/meta-monitor-config.h
index f617649..ede6a93 100644
--- a/src/backends/meta-monitor-config.h
+++ b/src/backends/meta-monitor-config.h
@@ -25,14 +25,9 @@
 
 #include "meta-monitor-manager-private.h"
 
-#define META_TYPE_MONITOR_CONFIG            (meta_monitor_config_get_type ())
-#define META_MONITOR_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_CONFIG, 
MetaMonitorConfig))
-#define META_MONITOR_CONFIG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_MONITOR_CONFIG, 
MetaMonitorConfigClass))
-#define META_IS_MONITOR_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_MONITOR_CONFIG))
-#define META_IS_MONITOR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  META_TYPE_MONITOR_CONFIG))
-#define META_MONITOR_CONFIG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  META_TYPE_MONITOR_CONFIG, 
MetaMonitorConfigClass))
-
-GType meta_monitor_config_get_type (void) G_GNUC_CONST;
+#define META_TYPE_MONITOR_CONFIG (meta_monitor_config_get_type ())
+G_DECLARE_FINAL_TYPE (MetaMonitorConfig, meta_monitor_config,
+                      META, MONITOR_CONFIG, GObject)
 
 MetaMonitorConfig *meta_monitor_config_new (void);
 
diff --git a/src/backends/meta-monitor-manager-private.h b/src/backends/meta-monitor-manager-private.h
index bc902bc..0de68a0 100644
--- a/src/backends/meta-monitor-manager-private.h
+++ b/src/backends/meta-monitor-manager-private.h
@@ -47,7 +47,6 @@
 #include "meta-dbus-display-config.h"
 #include "meta-cursor.h"
 
-typedef struct _MetaMonitorConfigClass    MetaMonitorConfigClass;
 typedef struct _MetaMonitorConfig         MetaMonitorConfig;
 
 typedef struct _MetaMonitor MetaMonitor;


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