GListModel: Use G_DECLARE_INTERFACE
authorXavier Claessens <xavier.claessens@collabora.com>
Tue, 3 Feb 2015 15:40:15 +0000 (10:40 -0500)
committerRyan Lortie <desrt@desrt.ca>
Fri, 6 Feb 2015 11:18:44 +0000 (12:18 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=743939

gio/gio-autocleanups.h
gio/glistmodel.h

index c3883830bfe32db90070a9f961393c834b599635..a3c0e043e29de9c6abc76245deac55abe33132b9 100644 (file)
@@ -79,7 +79,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitable, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInputStream, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOModule, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOStream, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GListModel, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GLoadableIcon, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryInputStream, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryOutputStream, g_object_unref)
index 8c011608862ac26a37e9b0f67dfc73fd328c406d..bfd000199f74dfadd9f3be3fefd0ae3d385fd042 100644 (file)
 
 G_BEGIN_DECLS
 
-#define G_TYPE_LIST_MODEL            (g_list_model_get_type ())
-#define G_LIST_MODEL(inst)           (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_LIST_MODEL, GListModel))
-#define G_IS_LIST_MODEL(inst)        (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_LIST_MODEL))
-#define G_LIST_MODEL_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_LIST_MODEL, GListModelInterface))
-
-typedef struct _GListModelInterface GListModelInterface;
+#define G_TYPE_LIST_MODEL g_list_model_get_type ()
+GLIB_AVAILABLE_IN_2_44
+G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)
 
 struct _GListModelInterface
 {
@@ -50,9 +47,6 @@ struct _GListModelInterface
                                  guint       position);
 };
 
-GLIB_AVAILABLE_IN_2_44
-GType                   g_list_model_get_type                           (void) G_GNUC_CONST;
-
 GLIB_AVAILABLE_IN_2_44
 GType                   g_list_model_get_item_type                      (GListModel *list);