[mutter] cursor-renderer-native: Cleanup type declaration
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cursor-renderer-native: Cleanup type declaration
- Date: Fri, 6 Oct 2017 18:24:06 +0000 (UTC)
commit 0f6b83e7df4f4f9558856f8643f20956d3f9d755
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Jul 7 16:06:22 2017 +0800
cursor-renderer-native: Cleanup type declaration
Use G_DECLARE_FINAL_TYPE instead of the old macros.
https://bugzilla.gnome.org/show_bug.cgi?id=785381
src/backends/native/meta-cursor-renderer-native.c | 5 ++++
src/backends/native/meta-cursor-renderer-native.h | 25 +++-----------------
2 files changed, 9 insertions(+), 21 deletions(-)
---
diff --git a/src/backends/native/meta-cursor-renderer-native.c
b/src/backends/native/meta-cursor-renderer-native.c
index dc10e2e..e538d3f 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -65,6 +65,11 @@
static GQuark quark_cursor_sprite = 0;
+struct _MetaCursorRendererNative
+{
+ MetaCursorRenderer parent;
+};
+
struct _MetaCursorRendererNativePrivate
{
gboolean hw_state_invalidated;
diff --git a/src/backends/native/meta-cursor-renderer-native.h
b/src/backends/native/meta-cursor-renderer-native.h
index e332ede..3b5596a 100644
--- a/src/backends/native/meta-cursor-renderer-native.h
+++ b/src/backends/native/meta-cursor-renderer-native.h
@@ -27,27 +27,10 @@
#include "meta-cursor-renderer.h"
-#define META_TYPE_CURSOR_RENDERER_NATIVE (meta_cursor_renderer_native_get_type ())
-#define META_CURSOR_RENDERER_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
META_TYPE_CURSOR_RENDERER_NATIVE, MetaCursorRendererNative))
-#define META_CURSOR_RENDERER_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
META_TYPE_CURSOR_RENDERER_NATIVE, MetaCursorRendererNativeClass))
-#define META_IS_CURSOR_RENDERER_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
META_TYPE_CURSOR_RENDERER_NATIVE))
-#define META_IS_CURSOR_RENDERER_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
META_TYPE_CURSOR_RENDERER_NATIVE))
-#define META_CURSOR_RENDERER_NATIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
META_TYPE_CURSOR_RENDERER_NATIVE, MetaCursorRendererNativeClass))
-
-typedef struct _MetaCursorRendererNative MetaCursorRendererNative;
-typedef struct _MetaCursorRendererNativeClass MetaCursorRendererNativeClass;
-
-struct _MetaCursorRendererNative
-{
- MetaCursorRenderer parent;
-};
-
-struct _MetaCursorRendererNativeClass
-{
- MetaCursorRendererClass parent_class;
-};
-
-GType meta_cursor_renderer_native_get_type (void) G_GNUC_CONST;
+#define META_TYPE_CURSOR_RENDERER_NATIVE (meta_cursor_renderer_native_get_type ())
+G_DECLARE_FINAL_TYPE (MetaCursorRendererNative, meta_cursor_renderer_native,
+ META, CURSOR_RENDERER_NATIVE,
+ MetaCursorRenderer)
struct gbm_device * meta_cursor_renderer_native_get_gbm_device (MetaCursorRendererNative *renderer);
void meta_cursor_renderer_native_get_cursor_size (MetaCursorRendererNative *native, uint64_t *width,
uint64_t *height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]