Deprecate ClutterModel

Now that we've deprecated the only concrete implementation of
ClutterModel, it's time we deprecate the base abstract class.
This commit is contained in:
Emmanuele Bassi 2015-06-28 10:31:19 +01:00
parent e1e6f7be48
commit 6376eebd9b
2 changed files with 158 additions and 44 deletions

View File

@ -22,8 +22,6 @@
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*
*
* NB: Inspiration for column storage taken from GtkListStore * NB: Inspiration for column storage taken from GtkListStore
*/ */
@ -150,9 +148,11 @@
* { "Name" : "Team 3", "Icon" : "team3-icon-script-id" } * { "Name" : "Team 3", "Icon" : "team3-icon-script-id" }
* ] * ]
* } * }
*
* Deprecated: 1.24: You should implement the #GListModel interface on your
* own storage data type instead.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
@ -161,6 +161,8 @@
#include <glib-object.h> #include <glib-object.h>
#include <gobject/gvaluecollector.h> #include <gobject/gvaluecollector.h>
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
#include "clutter-model.h" #include "clutter-model.h"
#include "clutter-model-private.h" #include "clutter-model-private.h"
@ -358,6 +360,8 @@ clutter_model_class_init (ClutterModelClass *klass)
* set using clutter_model_set_filter() * set using clutter_model_set_filter()
* *
* Since: 1.0 * Since: 1.0
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
pspec = g_param_spec_boolean ("filter-set", pspec = g_param_spec_boolean ("filter-set",
"Filter Set", "Filter Set",
@ -376,6 +380,8 @@ clutter_model_class_init (ClutterModelClass *klass)
* has been emitted. * has been emitted.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
model_signals[ROW_ADDED] = model_signals[ROW_ADDED] =
g_signal_new ("row-added", g_signal_new ("row-added",
@ -396,6 +402,8 @@ clutter_model_class_init (ClutterModelClass *klass)
* when the ::row-removed signal has been emitted. * when the ::row-removed signal has been emitted.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
model_signals[ROW_REMOVED] = model_signals[ROW_REMOVED] =
g_signal_new ("row-removed", g_signal_new ("row-removed",
@ -416,6 +424,8 @@ clutter_model_class_init (ClutterModelClass *klass)
* signal has been emitted. * signal has been emitted.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
model_signals[ROW_CHANGED] = model_signals[ROW_CHANGED] =
g_signal_new ("row-changed", g_signal_new ("row-changed",
@ -433,6 +443,8 @@ clutter_model_class_init (ClutterModelClass *klass)
* The ::sort-changed signal is emitted after the model has been sorted * The ::sort-changed signal is emitted after the model has been sorted
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
model_signals[SORT_CHANGED] = model_signals[SORT_CHANGED] =
g_signal_new ("sort-changed", g_signal_new ("sort-changed",
@ -449,6 +461,8 @@ clutter_model_class_init (ClutterModelClass *klass)
* The ::filter-changed signal is emitted when a new filter has been applied * The ::filter-changed signal is emitted when a new filter has been applied
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
model_signals[FILTER_CHANGED] = model_signals[FILTER_CHANGED] =
g_signal_new ("filter-changed", g_signal_new ("filter-changed",
@ -764,6 +778,8 @@ clutter_scriptable_iface_init (ClutterScriptableIface *iface)
* used by subclasses of #ClutterModel. * used by subclasses of #ClutterModel.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_resort (ClutterModel *model) clutter_model_resort (ClutterModel *model)
@ -794,6 +810,8 @@ clutter_model_resort (ClutterModel *model)
* %FALSE otherwise * %FALSE otherwise
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
gboolean gboolean
clutter_model_filter_row (ClutterModel *model, clutter_model_filter_row (ClutterModel *model,
@ -835,6 +853,8 @@ clutter_model_filter_row (ClutterModel *model,
* %FALSE otherwise * %FALSE otherwise
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
gboolean gboolean
clutter_model_filter_iter (ClutterModel *model, clutter_model_filter_iter (ClutterModel *model,
@ -865,6 +885,8 @@ clutter_model_filter_iter (ClutterModel *model,
* arrays as well. * arrays as well.
* *
* This function can only be called once. * This function can only be called once.
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
_clutter_model_set_n_columns (ClutterModel *model, _clutter_model_set_n_columns (ClutterModel *model,
@ -935,6 +957,8 @@ _clutter_model_set_column_name (ClutterModel *model,
* It will not work after the initial creation of the #ClutterModel. * It will not work after the initial creation of the #ClutterModel.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_set_types (ClutterModel *model, clutter_model_set_types (ClutterModel *model,
@ -979,6 +1003,8 @@ clutter_model_set_types (ClutterModel *model,
* It will not work after the initial creation of the #ClutterModel. * It will not work after the initial creation of the #ClutterModel.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_set_names (ClutterModel *model, clutter_model_set_names (ClutterModel *model,
@ -1011,6 +1037,8 @@ clutter_model_set_names (ClutterModel *model,
* Return value: the number of columns * Return value: the number of columns
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
guint guint
clutter_model_get_n_columns (ClutterModel *model) clutter_model_get_n_columns (ClutterModel *model)
@ -1031,6 +1059,8 @@ clutter_model_get_n_columns (ClutterModel *model)
* values for the given @columns upon creation. * values for the given @columns upon creation.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_appendv (ClutterModel *model, clutter_model_appendv (ClutterModel *model,
@ -1091,6 +1121,8 @@ static void clutter_model_iter_set_internal_valist (ClutterModelIter *iter,
* </programlisting></informalexample> * </programlisting></informalexample>
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_append (ClutterModel *model, clutter_model_append (ClutterModel *model,
@ -1125,6 +1157,8 @@ clutter_model_append (ClutterModel *model,
* values for the given @columns upon creation. * values for the given @columns upon creation.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_prependv (ClutterModel *model, clutter_model_prependv (ClutterModel *model,
@ -1181,6 +1215,8 @@ clutter_model_prependv (ClutterModel *model,
* </programlisting></informalexample> * </programlisting></informalexample>
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_prepend (ClutterModel *model, clutter_model_prepend (ClutterModel *model,
@ -1224,6 +1260,8 @@ clutter_model_prepend (ClutterModel *model,
* </programlisting></informalexample> * </programlisting></informalexample>
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_insert (ClutterModel *model, clutter_model_insert (ClutterModel *model,
@ -1262,6 +1300,8 @@ clutter_model_insert (ClutterModel *model,
* values for the given @columns upon creation. * values for the given @columns upon creation.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_insertv (ClutterModel *model, clutter_model_insertv (ClutterModel *model,
@ -1313,6 +1353,8 @@ clutter_model_insertv (ClutterModel *model,
* not exist then it is created. * not exist then it is created.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_insert_value (ClutterModel *model, clutter_model_insert_value (ClutterModel *model,
@ -1358,6 +1400,8 @@ clutter_model_insert_value (ClutterModel *model,
* Removes the row at the given position from the model. * Removes the row at the given position from the model.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_remove (ClutterModel *model, clutter_model_remove (ClutterModel *model,
@ -1383,6 +1427,8 @@ clutter_model_remove (ClutterModel *model,
* string, and it should not be modified or freed * string, and it should not be modified or freed
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
const gchar * const gchar *
clutter_model_get_column_name (ClutterModel *model, clutter_model_get_column_name (ClutterModel *model,
@ -1415,6 +1461,8 @@ clutter_model_get_column_name (ClutterModel *model,
* Return value: the type of the column. * Return value: the type of the column.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
GType GType
clutter_model_get_column_type (ClutterModel *model, clutter_model_get_column_type (ClutterModel *model,
@ -1453,6 +1501,8 @@ clutter_model_get_column_type (ClutterModel *model,
* to deallocate its resources * to deallocate its resources
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModelIter * ClutterModelIter *
clutter_model_get_iter_at_row (ClutterModel *model, clutter_model_get_iter_at_row (ClutterModel *model,
@ -1481,6 +1531,8 @@ clutter_model_get_iter_at_row (ClutterModel *model,
* Call g_object_unref() when done using it * Call g_object_unref() when done using it
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModelIter * ClutterModelIter *
clutter_model_get_first_iter (ClutterModel *model) clutter_model_get_first_iter (ClutterModel *model)
@ -1510,6 +1562,8 @@ clutter_model_get_first_iter (ClutterModel *model)
* Call g_object_unref() when done using it * Call g_object_unref() when done using it
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModelIter * ClutterModelIter *
clutter_model_get_last_iter (ClutterModel *model) clutter_model_get_last_iter (ClutterModel *model)
@ -1538,6 +1592,8 @@ clutter_model_get_last_iter (ClutterModel *model)
* the length of the filtered @model is returned. * the length of the filtered @model is returned.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
guint guint
clutter_model_get_n_rows (ClutterModel *model) clutter_model_get_n_rows (ClutterModel *model)
@ -1556,6 +1612,8 @@ clutter_model_get_n_rows (ClutterModel *model)
* the sorting column will be unset. * the sorting column will be unset.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_set_sorting_column (ClutterModel *model, clutter_model_set_sorting_column (ClutterModel *model,
@ -1591,6 +1649,8 @@ clutter_model_set_sorting_column (ClutterModel *model,
* Return value: a column number, or -1 if the model is not sorted * Return value: a column number, or -1 if the model is not sorted
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
gint gint
clutter_model_get_sorting_column (ClutterModel *model) clutter_model_get_sorting_column (ClutterModel *model)
@ -1609,6 +1669,8 @@ clutter_model_get_sorting_column (ClutterModel *model)
* Calls @func for each row in the model. * Calls @func for each row in the model.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_foreach (ClutterModel *model, clutter_model_foreach (ClutterModel *model,
@ -1648,6 +1710,8 @@ clutter_model_foreach (ClutterModel *model,
* Sorts @model using the given sorting function. * Sorts @model using the given sorting function.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_set_sort (ClutterModel *model, clutter_model_set_sort (ClutterModel *model,
@ -1685,6 +1749,8 @@ clutter_model_set_sort (ClutterModel *model,
* Filters the @model using the given filtering function. * Filters the @model using the given filtering function.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_set_filter (ClutterModel *model, clutter_model_set_filter (ClutterModel *model,
@ -1718,6 +1784,8 @@ clutter_model_set_filter (ClutterModel *model,
* Return value: %TRUE if a filter is set * Return value: %TRUE if a filter is set
* *
* Since: 1.0 * Since: 1.0
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
gboolean gboolean
clutter_model_get_filter_set (ClutterModel *model) clutter_model_get_filter_set (ClutterModel *model)
@ -1750,6 +1818,8 @@ clutter_model_get_filter_set (ClutterModel *model)
* and it is valid as long as the model does not change. * and it is valid as long as the model does not change.
* *
* #ClutterModelIter is available since Clutter 0.6 * #ClutterModelIter is available since Clutter 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
struct _ClutterModelIterPrivate struct _ClutterModelIterPrivate
@ -1934,6 +2004,8 @@ clutter_model_iter_class_init (ClutterModelIterClass *klass)
* A reference to the #ClutterModel that this iter belongs to. * A reference to the #ClutterModel that this iter belongs to.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
pspec = g_param_spec_object ("model", pspec = g_param_spec_object ("model",
"Model", "Model",
@ -1948,6 +2020,8 @@ clutter_model_iter_class_init (ClutterModelIterClass *klass)
* The row number to which this iter points to. * The row number to which this iter points to.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
pspec = g_param_spec_uint ("row", pspec = g_param_spec_uint ("row",
"Row", "Row",
@ -2048,6 +2122,8 @@ clutter_model_iter_emit_row_changed (ClutterModelIter *iter)
* bindings. * bindings.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_iter_set_valist (ClutterModelIter *iter, clutter_model_iter_set_valist (ClutterModelIter *iter,
@ -2078,6 +2154,8 @@ clutter_model_iter_set_valist (ClutterModelIter *iter,
* appropriate, the returned values have to be freed or unreferenced. * appropriate, the returned values have to be freed or unreferenced.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_iter_get (ClutterModelIter *iter, clutter_model_iter_get (ClutterModelIter *iter,
@ -2110,6 +2188,8 @@ clutter_model_iter_get_value_internal (ClutterModelIter *iter,
* g_value_unset() needs to be called to free any allocated memory. * g_value_unset() needs to be called to free any allocated memory.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_iter_get_value (ClutterModelIter *iter, clutter_model_iter_get_value (ClutterModelIter *iter,
@ -2137,6 +2217,8 @@ clutter_model_iter_get_value (ClutterModelIter *iter,
* bindings. * bindings.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_iter_get_valist (ClutterModelIter *iter, clutter_model_iter_get_valist (ClutterModelIter *iter,
@ -2205,6 +2287,8 @@ clutter_model_iter_get_valist (ClutterModelIter *iter,
* </programlisting></informalexample> * </programlisting></informalexample>
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_iter_set (ClutterModelIter *iter, clutter_model_iter_set (ClutterModelIter *iter,
@ -2230,6 +2314,8 @@ clutter_model_iter_set (ClutterModelIter *iter,
* @value must be convertable to the type of the column. * @value must be convertable to the type of the column.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
void void
clutter_model_iter_set_value (ClutterModelIter *iter, clutter_model_iter_set_value (ClutterModelIter *iter,
@ -2252,6 +2338,8 @@ clutter_model_iter_set_value (ClutterModelIter *iter,
* Return value: #TRUE if @iter is the first iter in the filtered model * Return value: #TRUE if @iter is the first iter in the filtered model
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
gboolean gboolean
clutter_model_iter_is_first (ClutterModelIter *iter) clutter_model_iter_is_first (ClutterModelIter *iter)
@ -2271,6 +2359,8 @@ clutter_model_iter_is_first (ClutterModelIter *iter)
* Return value: #TRUE if @iter is the last iter in the filtered model. * Return value: #TRUE if @iter is the last iter in the filtered model.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
gboolean gboolean
clutter_model_iter_is_last (ClutterModelIter *iter) clutter_model_iter_is_last (ClutterModelIter *iter)
@ -2292,6 +2382,8 @@ clutter_model_iter_is_last (ClutterModelIter *iter)
* row in the model. * row in the model.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModelIter * ClutterModelIter *
clutter_model_iter_next (ClutterModelIter *iter) clutter_model_iter_next (ClutterModelIter *iter)
@ -2313,6 +2405,8 @@ clutter_model_iter_next (ClutterModelIter *iter)
* row in the model. * row in the model.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModelIter * ClutterModelIter *
clutter_model_iter_prev (ClutterModelIter *iter) clutter_model_iter_prev (ClutterModelIter *iter)
@ -2331,6 +2425,8 @@ clutter_model_iter_prev (ClutterModelIter *iter)
* Return value: (transfer none): a pointer to a #ClutterModel. * Return value: (transfer none): a pointer to a #ClutterModel.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModel * ClutterModel *
clutter_model_iter_get_model (ClutterModelIter *iter) clutter_model_iter_get_model (ClutterModelIter *iter)
@ -2349,6 +2445,8 @@ clutter_model_iter_get_model (ClutterModelIter *iter)
* Return value: the position of the @iter in the model * Return value: the position of the @iter in the model
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
guint guint
clutter_model_iter_get_row (ClutterModelIter *iter) clutter_model_iter_get_row (ClutterModelIter *iter)
@ -2367,6 +2465,8 @@ clutter_model_iter_get_row (ClutterModelIter *iter)
* Return value: (transfer full): a copy of the iterator, or %NULL * Return value: (transfer full): a copy of the iterator, or %NULL
* *
* Since: 0.8 * Since: 0.8
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
ClutterModelIter * ClutterModelIter *
clutter_model_iter_copy (ClutterModelIter *iter) clutter_model_iter_copy (ClutterModelIter *iter)

View File

@ -60,6 +60,8 @@ typedef struct _ClutterModelIterPrivate ClutterModelIterPrivate;
* Return value: If the row should be displayed, return %TRUE * Return value: If the row should be displayed, return %TRUE
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Implement filters using a custom #GListModel instead
*/ */
typedef gboolean (*ClutterModelFilterFunc) (ClutterModel *model, typedef gboolean (*ClutterModelFilterFunc) (ClutterModel *model,
ClutterModelIter *iter, ClutterModelIter *iter,
@ -78,6 +80,8 @@ typedef gboolean (*ClutterModelFilterFunc) (ClutterModel *model,
* @a is before @b, or 0 if the rows are the same * @a is before @b, or 0 if the rows are the same
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Implement sorting using a custom #GListModel instead
*/ */
typedef gint (*ClutterModelSortFunc) (ClutterModel *model, typedef gint (*ClutterModelSortFunc) (ClutterModel *model,
const GValue *a, const GValue *a,
@ -95,6 +99,8 @@ typedef gint (*ClutterModelSortFunc) (ClutterModel *model,
* Return value: %TRUE if the iteration should continue, %FALSE otherwise * Return value: %TRUE if the iteration should continue, %FALSE otherwise
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel
*/ */
typedef gboolean (*ClutterModelForeachFunc) (ClutterModel *model, typedef gboolean (*ClutterModelForeachFunc) (ClutterModel *model,
ClutterModelIter *iter, ClutterModelIter *iter,
@ -108,6 +114,8 @@ typedef gboolean (*ClutterModelForeachFunc) (ClutterModel *model,
* API. * API.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
struct _ClutterModel struct _ClutterModel
{ {
@ -142,6 +150,8 @@ struct _ClutterModel
* Class for #ClutterModel instances. * Class for #ClutterModel instances.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use #GListModel instead
*/ */
struct _ClutterModelClass struct _ClutterModelClass
{ {
@ -188,102 +198,102 @@ struct _ClutterModelClass
void (*_clutter_model_8) (void); void (*_clutter_model_8) (void);
}; };
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(g_list_model_get_type)
GType clutter_model_get_type (void) G_GNUC_CONST; GType clutter_model_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_set_types (ClutterModel *model, void clutter_model_set_types (ClutterModel *model,
guint n_columns, guint n_columns,
GType *types); GType *types);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_set_names (ClutterModel *model, void clutter_model_set_names (ClutterModel *model,
guint n_columns, guint n_columns,
const gchar * const names[]); const gchar * const names[]);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_append (ClutterModel *model, void clutter_model_append (ClutterModel *model,
...); ...);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_appendv (ClutterModel *model, void clutter_model_appendv (ClutterModel *model,
guint n_columns, guint n_columns,
guint *columns, guint *columns,
GValue *values); GValue *values);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_prepend (ClutterModel *model, void clutter_model_prepend (ClutterModel *model,
...); ...);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_prependv (ClutterModel *model, void clutter_model_prependv (ClutterModel *model,
guint n_columns, guint n_columns,
guint *columns, guint *columns,
GValue *values); GValue *values);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_insert (ClutterModel *model, void clutter_model_insert (ClutterModel *model,
guint row, guint row,
...); ...);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_insertv (ClutterModel *model, void clutter_model_insertv (ClutterModel *model,
guint row, guint row,
guint n_columns, guint n_columns,
guint *columns, guint *columns,
GValue *values); GValue *values);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_insert_value (ClutterModel *model, void clutter_model_insert_value (ClutterModel *model,
guint row, guint row,
guint column, guint column,
const GValue *value); const GValue *value);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_remove (ClutterModel *model, void clutter_model_remove (ClutterModel *model,
guint row); guint row);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
guint clutter_model_get_n_rows (ClutterModel *model); guint clutter_model_get_n_rows (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
guint clutter_model_get_n_columns (ClutterModel *model); guint clutter_model_get_n_columns (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
const gchar * clutter_model_get_column_name (ClutterModel *model, const gchar * clutter_model_get_column_name (ClutterModel *model,
guint column); guint column);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
GType clutter_model_get_column_type (ClutterModel *model, GType clutter_model_get_column_type (ClutterModel *model,
guint column); guint column);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
ClutterModelIter * clutter_model_get_first_iter (ClutterModel *model); ClutterModelIter * clutter_model_get_first_iter (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
ClutterModelIter * clutter_model_get_last_iter (ClutterModel *model); ClutterModelIter * clutter_model_get_last_iter (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
ClutterModelIter * clutter_model_get_iter_at_row (ClutterModel *model, ClutterModelIter * clutter_model_get_iter_at_row (ClutterModel *model,
guint row); guint row);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_set_sorting_column (ClutterModel *model, void clutter_model_set_sorting_column (ClutterModel *model,
gint column); gint column);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
gint clutter_model_get_sorting_column (ClutterModel *model); gint clutter_model_get_sorting_column (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_foreach (ClutterModel *model, void clutter_model_foreach (ClutterModel *model,
ClutterModelForeachFunc func, ClutterModelForeachFunc func,
gpointer user_data); gpointer user_data);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_set_sort (ClutterModel *model, void clutter_model_set_sort (ClutterModel *model,
gint column, gint column,
ClutterModelSortFunc func, ClutterModelSortFunc func,
gpointer user_data, gpointer user_data,
GDestroyNotify notify); GDestroyNotify notify);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_set_filter (ClutterModel *model, void clutter_model_set_filter (ClutterModel *model,
ClutterModelFilterFunc func, ClutterModelFilterFunc func,
gpointer user_data, gpointer user_data,
GDestroyNotify notify); GDestroyNotify notify);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
gboolean clutter_model_get_filter_set (ClutterModel *model); gboolean clutter_model_get_filter_set (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
void clutter_model_resort (ClutterModel *model); void clutter_model_resort (ClutterModel *model);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
gboolean clutter_model_filter_row (ClutterModel *model, gboolean clutter_model_filter_row (ClutterModel *model,
guint row); guint row);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24_FOR(GListModel)
gboolean clutter_model_filter_iter (ClutterModel *model, gboolean clutter_model_filter_iter (ClutterModel *model,
ClutterModelIter *iter); ClutterModelIter *iter);
@ -306,6 +316,8 @@ gboolean clutter_model_filter_iter (ClutterModel *model,
* provided API. * provided API.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use custom iterators for #GListModel
*/ */
struct _ClutterModelIter struct _ClutterModelIter
{ {
@ -338,6 +350,8 @@ struct _ClutterModelIter
* Class for #ClutterModelIter instances. * Class for #ClutterModelIter instances.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.24: Use custom iterators for #GListModel
*/ */
struct _ClutterModelIterClass struct _ClutterModelIterClass
{ {
@ -376,45 +390,45 @@ struct _ClutterModelIterClass
void (*_clutter_model_iter_8) (void); void (*_clutter_model_iter_8) (void);
}; };
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
GType clutter_model_iter_get_type (void) G_GNUC_CONST; GType clutter_model_iter_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
void clutter_model_iter_get (ClutterModelIter *iter, void clutter_model_iter_get (ClutterModelIter *iter,
...); ...);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
void clutter_model_iter_get_valist (ClutterModelIter *iter, void clutter_model_iter_get_valist (ClutterModelIter *iter,
va_list args); va_list args);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
void clutter_model_iter_get_value (ClutterModelIter *iter, void clutter_model_iter_get_value (ClutterModelIter *iter,
guint column, guint column,
GValue *value); GValue *value);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
void clutter_model_iter_set (ClutterModelIter *iter, void clutter_model_iter_set (ClutterModelIter *iter,
...); ...);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
void clutter_model_iter_set_valist (ClutterModelIter *iter, void clutter_model_iter_set_valist (ClutterModelIter *iter,
va_list args); va_list args);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
void clutter_model_iter_set_value (ClutterModelIter *iter, void clutter_model_iter_set_value (ClutterModelIter *iter,
guint column, guint column,
const GValue *value); const GValue *value);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
gboolean clutter_model_iter_is_first (ClutterModelIter *iter); gboolean clutter_model_iter_is_first (ClutterModelIter *iter);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
gboolean clutter_model_iter_is_last (ClutterModelIter *iter); gboolean clutter_model_iter_is_last (ClutterModelIter *iter);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
ClutterModelIter *clutter_model_iter_next (ClutterModelIter *iter); ClutterModelIter *clutter_model_iter_next (ClutterModelIter *iter);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
ClutterModelIter *clutter_model_iter_prev (ClutterModelIter *iter); ClutterModelIter *clutter_model_iter_prev (ClutterModelIter *iter);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
ClutterModel * clutter_model_iter_get_model (ClutterModelIter *iter); ClutterModel * clutter_model_iter_get_model (ClutterModelIter *iter);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
guint clutter_model_iter_get_row (ClutterModelIter *iter); guint clutter_model_iter_get_row (ClutterModelIter *iter);
CLUTTER_AVAILABLE_IN_ALL CLUTTER_DEPRECATED_IN_1_24
ClutterModelIter *clutter_model_iter_copy (ClutterModelIter *iter); ClutterModelIter *clutter_model_iter_copy (ClutterModelIter *iter);
G_END_DECLS G_END_DECLS