[mutter] monitor-manager-dummy: Use GObject type declaration macro



commit 7603bb5fd59a6fe43439b62b0b0dd8d91c4c1062
Author: Jonas Ådahl <jadahl gmail com>
Date:   Mon Jul 10 17:32:33 2017 +0800

    monitor-manager-dummy: Use GObject type declaration macro
    
    Use G_DECLARE_FINAL_TYPE instead of old multiple macro definitions way.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785381

 src/backends/meta-monitor-manager-dummy.h |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager-dummy.h b/src/backends/meta-monitor-manager-dummy.h
index 0625590..a9e8391 100644
--- a/src/backends/meta-monitor-manager-dummy.h
+++ b/src/backends/meta-monitor-manager-dummy.h
@@ -25,16 +25,8 @@
 
 #include "meta-monitor-manager-private.h"
 
-#define META_TYPE_MONITOR_MANAGER_DUMMY            (meta_monitor_manager_dummy_get_type ())
-#define META_MONITOR_MANAGER_DUMMY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_MONITOR_MANAGER_DUMMY, MetaMonitorManagerDummy))
-#define META_MONITOR_MANAGER_DUMMY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_MONITOR_MANAGER_DUMMY, MetaMonitorManagerDummyClass))
-#define META_IS_MONITOR_MANAGER_DUMMY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_MONITOR_MANAGER_DUMMY))
-#define META_IS_MONITOR_MANAGER_DUMMY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_MONITOR_MANAGER_DUMMY))
-#define META_MONITOR_MANAGER_DUMMY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_MONITOR_MANAGER_DUMMY, MetaMonitorManagerDummyClass))
-
-typedef struct _MetaMonitorManagerDummyClass    MetaMonitorManagerDummyClass;
-typedef struct _MetaMonitorManagerDummy         MetaMonitorManagerDummy;
-
-GType meta_monitor_manager_dummy_get_type (void);
+#define META_TYPE_MONITOR_MANAGER_DUMMY (meta_monitor_manager_dummy_get_type ())
+G_DECLARE_FINAL_TYPE (MetaMonitorManagerDummy, meta_monitor_manager_dummy,
+                      META, MONITOR_MANAGER_DUMMY, MetaMonitorManager)
 
 #endif /* META_MONITOR_MANAGER_DUMMY_H */


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