[mutter] MetaCursorRenderer: Use G_DECLARE_DERIVABLE_TYPE to declare the type



commit 975feb920298ff8defd32432f1fba95c3af9f6d4
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Jul 17 10:46:33 2015 +0800

    MetaCursorRenderer: Use G_DECLARE_DERIVABLE_TYPE to declare the type
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744932

 src/backends/meta-cursor-renderer.h |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/src/backends/meta-cursor-renderer.h b/src/backends/meta-cursor-renderer.h
index 7f86835..f92b4c7 100644
--- a/src/backends/meta-cursor-renderer.h
+++ b/src/backends/meta-cursor-renderer.h
@@ -30,20 +30,9 @@
 #include <meta/screen.h>
 #include "meta-cursor.h"
 
-#define META_TYPE_CURSOR_RENDERER            (meta_cursor_renderer_get_type ())
-#define META_CURSOR_RENDERER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CURSOR_RENDERER, 
MetaCursorRenderer))
-#define META_CURSOR_RENDERER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_CURSOR_RENDERER, 
MetaCursorRendererClass))
-#define META_IS_CURSOR_RENDERER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_CURSOR_RENDERER))
-#define META_IS_CURSOR_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  META_TYPE_CURSOR_RENDERER))
-#define META_CURSOR_RENDERER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  META_TYPE_CURSOR_RENDERER, 
MetaCursorRendererClass))
-
-typedef struct _MetaCursorRenderer        MetaCursorRenderer;
-typedef struct _MetaCursorRendererClass   MetaCursorRendererClass;
-
-struct _MetaCursorRenderer
-{
-  GObject parent;
-};
+#define META_TYPE_CURSOR_RENDERER (meta_cursor_renderer_get_type ())
+G_DECLARE_DERIVABLE_TYPE (MetaCursorRenderer, meta_cursor_renderer,
+                          META, CURSOR_RENDERER, GObject);
 
 struct _MetaCursorRendererClass
 {


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