[mutter] MetaWaylandOutput: Cleanup type declaration



commit 22173fde15ecfe28004a81ae32cf1458682e0e8c
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Sep 9 13:50:49 2016 +0800

    MetaWaylandOutput: Cleanup type declaration
    
    Use G_DECLARE_FINAL_TYPE instead of the set of macros.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770672

 src/wayland/meta-wayland-outputs.h |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/src/wayland/meta-wayland-outputs.h b/src/wayland/meta-wayland-outputs.h
index a31774a..9d9869b 100644
--- a/src/wayland/meta-wayland-outputs.h
+++ b/src/wayland/meta-wayland-outputs.h
@@ -28,14 +28,9 @@
 #include "backends/meta-monitor-manager-private.h"
 #include "meta-wayland-private.h"
 
-#define META_TYPE_WAYLAND_OUTPUT            (meta_wayland_output_get_type ())
-#define META_WAYLAND_OUTPUT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WAYLAND_OUTPUT, 
MetaWaylandOutput))
-#define META_WAYLAND_OUTPUT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_WAYLAND_OUTPUT, 
MetaWaylandOutputClass))
-#define META_IS_WAYLAND_OUTPUT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_WAYLAND_OUTPUT))
-#define META_IS_WAYLAND_OUTPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  META_TYPE_WAYLAND_OUTPUT))
-#define META_WAYLAND_OUTPUT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  META_TYPE_WAYLAND_OUTPUT, 
MetaWaylandOutputClass))
-
-typedef struct _MetaWaylandOutputClass  MetaWaylandOutputClass;
+#define META_TYPE_WAYLAND_OUTPUT (meta_wayland_output_get_type ())
+G_DECLARE_FINAL_TYPE (MetaWaylandOutput, meta_wayland_output,
+                      META, WAYLAND_OUTPUT, GObject)
 
 struct _MetaWaylandOutput
 {
@@ -49,13 +44,6 @@ struct _MetaWaylandOutput
   GList                    *resources;
 };
 
-struct _MetaWaylandOutputClass
-{
-  GObjectClass parent_class;
-};
-
-GType meta_wayland_output_get_type (void) G_GNUC_CONST;
-
 void meta_wayland_outputs_init (MetaWaylandCompositor *compositor);
 
 #endif /* META_WAYLAND_OUTPUTS_H */


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