From 22173fde15ecfe28004a81ae32cf1458682e0e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 9 Sep 2016 13:50:49 +0800 Subject: [PATCH] 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 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/wayland/meta-wayland-outputs.h b/src/wayland/meta-wayland-outputs.h index a31774a7d..9d9869b49 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 */