* G_TYPE_PARAM_VALUE_ARRAY:
*
* The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18])
/**
* Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
*
* Returns: %TRUE on success.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
/**
* @pspec: a valid #GParamSpec instance
*
* Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
* object property that holds an array of values. A #GValueArray wraps
* an array of #GValue elements in order for it to be used as a boxed
* type through %G_TYPE_VALUE_ARRAY.
+ *
+ * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
+ * is possible to create a #GArray that behaves like a #GValueArray by
+ * using the size of #GValue as the element size, and by setting
+ * g_value_unset() as the clear function using g_array_set_clear_func(),
+ * for instance, the following code:
+ *
+ * |[
+ * GValueArray *array = g_value_array_new (10);
+ * |]
+ *
+ * can be replaced by:
+ *
+ * |[
+ * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
+ * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
+ * ]|
*/
* Return a pointer to the value at @index_ containd in @value_array.
*
* Returns: (transfer none): pointer to a value at @index_ in @value_array
+ *
+ * Deprecated: 2.32: Use g_array_index() instead.
*/
GValue*
g_value_array_get_nth (GValueArray *value_array,
* regardless of the value of @n_prealloced.
*
* Returns: a newly allocated #GValueArray with 0 values
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
*/
GValueArray*
g_value_array_new (guint n_prealloced)
* @value_array: #GValueArray to free
*
* Free a #GValueArray including its contents.
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
*/
void
g_value_array_free (GValueArray *value_array)
* contents.
*
* Returns: (transfer full): Newly allocated copy of #GValueArray
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
*/
GValueArray*
g_value_array_copy (const GValueArray *value_array)
*
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
*/
GValueArray*
g_value_array_prepend (GValueArray *value_array,
* %NULL, an uninitialized value is appended.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
*/
GValueArray*
g_value_array_append (GValueArray *value_array,
* is %NULL, an uninitialized value is inserted.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
*/
GValueArray*
g_value_array_insert (GValueArray *value_array,
* Remove the value at position @index_ from @value_array.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
*/
GValueArray*
g_value_array_remove (GValueArray *value_array,
* The current implementation uses Quick-Sort as sorting algorithm.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_sort().
*/
GValueArray*
g_value_array_sort (GValueArray *value_array,
*
* Rename to: g_value_array_sort
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
*/
GValueArray*
g_value_array_sort_with_data (GValueArray *value_array,
#include <gobject/gvalue.h>
-
G_BEGIN_DECLS
/* --- prototypes --- */
+GLIB_DEPRECATED_FOR(g_array_index)
GValue* g_value_array_get_nth (GValueArray *value_array,
guint index_);
+
+GLIB_DEPRECATED_FOR(g_array_new)
GValueArray* g_value_array_new (guint n_prealloced);
+
+GLIB_DEPRECATED_FOR(g_array_unref)
void g_value_array_free (GValueArray *value_array);
+
+GLIB_DEPRECATED_FOR(g_array_ref)
GValueArray* g_value_array_copy (const GValueArray *value_array);
+
+GLIB_DEPRECATED_FOR(g_array_prepend_vals)
GValueArray* g_value_array_prepend (GValueArray *value_array,
const GValue *value);
+
+GLIB_DEPRECATED_FOR(g_array_append_vals)
GValueArray* g_value_array_append (GValueArray *value_array,
const GValue *value);
+
+GLIB_DEPRECATED_FOR(g_array_insert_vals)
GValueArray* g_value_array_insert (GValueArray *value_array,
guint index_,
const GValue *value);
+
+GLIB_DEPRECATED_FOR(g_array_remove_index)
GValueArray* g_value_array_remove (GValueArray *value_array,
guint index_);
+
+GLIB_DEPRECATED_FOR(g_array_sort)
GValueArray* g_value_array_sort (GValueArray *value_array,
GCompareFunc compare_func);
+
+GLIB_DEPRECATED_FOR(g_array_sort_with_data)
GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
GCompareDataFunc compare_func,
gpointer user_data);