[clutter] Deprecate ClutterListModel



commit e1e6f7be481f1abeb06ec1fca18cfd8e1c9730e5
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Jun 28 10:21:22 2015 +0100

    Deprecate ClutterListModel
    
    The model API was an ad hoc addition to Clutter, back in the 0.6 days,
    that was needed because GLib did not offer anything of sort, and the
    only model-like storage was inside GTK+. The API design was heavily
    based on GtkTreeModel and friends, with column-based collections of
    generic data.
    
    Since then, the model API inside Clutter has not really been integrated
    in the core API; on the other hand, GIO has grown a model API, and it's
    seeing more use in the platform.
    
    This means that the ClutterModel API should finally be deprecated, and
    we should move code to the GListModel API inside GIO.

 clutter/clutter-list-model.c |   11 ++++++++++-
 clutter/clutter-list-model.h |   10 +++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-list-model.c b/clutter/clutter-list-model.c
index b1dec9b..d717bf2 100644
--- a/clutter/clutter-list-model.c
+++ b/clutter/clutter-list-model.c
@@ -35,6 +35,9 @@
  * in sorted lists.
  *
  * #ClutterListModel is available since Clutter 0.6
+ *
+ * Deprecated: 1.24: Use a #GListStore instance containing a custom
+ *   object type with properties for each column instead.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -46,9 +49,11 @@
 
 #include <glib-object.h>
 
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
+#include "clutter-list-model.h"
+
 #include "clutter-model.h"
 #include "clutter-model-private.h"
-#include "clutter-list-model.h"
 #include "clutter-private.h"
 #include "clutter-debug.h"
 
@@ -746,6 +751,8 @@ clutter_list_model_init (ClutterListModel *model)
  * Return value: a new #ClutterListModel
  *
  * Since: 0.6
+ *
+ * Deprecated: 1.24: Use #GListStore instead
  */
 ClutterModel *
 clutter_list_model_new (guint n_columns,
@@ -796,6 +803,8 @@ clutter_list_model_new (guint n_columns,
  * Return value: (transfer full): a new default #ClutterModel
  *
  * Since: 0.6
+ *
+ * Deprecated: 1.24: Use #GListStore instead
  */
 ClutterModel *
 clutter_list_model_newv (guint                n_columns,
diff --git a/clutter/clutter-list-model.h b/clutter/clutter-list-model.h
index ed52823..e857989 100644
--- a/clutter/clutter-list-model.h
+++ b/clutter/clutter-list-model.h
@@ -53,6 +53,8 @@ typedef struct _ClutterListModelClass           ClutterListModelClass;
  * The #ClutterListModel struct contains only private data.
  *
  * Since: 0.6
+ *
+ * Deprecated: 1.24: Use #GListStore instead
  */
 struct _ClutterListModel
 {
@@ -68,6 +70,8 @@ struct _ClutterListModel
  * The #ClutterListModelClass struct contains only private data.
  *
  * Since: 0.6
+ *
+ * Deprecated: 1.24: Use #GListStore instead
  */
 struct _ClutterListModelClass
 {
@@ -75,13 +79,13 @@ struct _ClutterListModelClass
   ClutterModelClass parent_class;
 };
 
-CLUTTER_AVAILABLE_IN_ALL
+CLUTTER_DEPRECATED_IN_1_24_FOR(g_list_store_get_type)
 GType         clutter_list_model_get_type (void) G_GNUC_CONST;
 
-CLUTTER_AVAILABLE_IN_ALL
+CLUTTER_DEPRECATED_IN_1_24_FOR(g_list_store_new)
 ClutterModel *clutter_list_model_new      (guint                n_columns,
                                               ...);
-CLUTTER_AVAILABLE_IN_ALL
+CLUTTER_DEPRECATED_IN_1_24_FOR(g_list_store_new)
 ClutterModel *clutter_list_model_newv     (guint                n_columns,
                                            GType               *types,
                                            const gchar * const  names[]);


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