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.
This commit is contained in:
Emmanuele Bassi 2015-06-28 10:21:22 +01:00
parent d09c204a26
commit e1e6f7be48
2 changed files with 17 additions and 4 deletions

View File

@ -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,

View File

@ -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[]);