Merge branch 'issue-699' into 'master'
[glib.git] / gobject / gvaluearray.h
blobd8b6bb55c8eccb26bf589e9a8cf0ab880954eb67
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2 * Copyright (C) 2001 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General
15 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 * gvaluearray.h: GLib array type holding GValues
19 #ifndef __G_VALUE_ARRAY_H__
20 #define __G_VALUE_ARRAY_H__
22 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
23 #error "Only <glib-object.h> can be included directly."
24 #endif
26 #include <gobject/gvalue.h>
28 G_BEGIN_DECLS
30 /**
31 * G_TYPE_VALUE_ARRAY:
33 * The type ID of the "GValueArray" type which is a boxed type,
34 * used to pass around pointers to GValueArrays.
36 * Deprecated: 2.32: Use #GArray instead of #GValueArray
38 #define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
40 /* --- typedefs & structs --- */
41 typedef struct _GValueArray GValueArray;
42 /**
43 * GValueArray:
44 * @n_values: number of values contained in the array
45 * @values: array of values
47 * A #GValueArray contains an array of #GValue elements.
49 struct _GValueArray
51 guint n_values;
52 GValue *values;
54 /*< private >*/
55 guint n_prealloced;
58 /* --- prototypes --- */
59 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
60 GType g_value_array_get_type (void) G_GNUC_CONST;
62 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
63 GValue* g_value_array_get_nth (GValueArray *value_array,
64 guint index_);
66 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
67 GValueArray* g_value_array_new (guint n_prealloced);
69 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
70 void g_value_array_free (GValueArray *value_array);
72 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
73 GValueArray* g_value_array_copy (const GValueArray *value_array);
75 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
76 GValueArray* g_value_array_prepend (GValueArray *value_array,
77 const GValue *value);
79 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
80 GValueArray* g_value_array_append (GValueArray *value_array,
81 const GValue *value);
83 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
84 GValueArray* g_value_array_insert (GValueArray *value_array,
85 guint index_,
86 const GValue *value);
88 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
89 GValueArray* g_value_array_remove (GValueArray *value_array,
90 guint index_);
92 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
93 GValueArray* g_value_array_sort (GValueArray *value_array,
94 GCompareFunc compare_func);
96 GLIB_DEPRECATED_IN_2_32_FOR(GArray)
97 GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
98 GCompareDataFunc compare_func,
99 gpointer user_data);
102 G_END_DECLS
104 #endif /* __G_VALUE_ARRAY_H__ */