1/* GObject - GLib Type, Object, Parameter and Signal Library
2 * Copyright (C) 2001 Red Hat, Inc.
3 *
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.
8 *
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.
13 *
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/>.
16 *
17 * gvaluearray.h: GLib array type holding GValues
18 */
19#ifndef __G_VALUE_ARRAY_H__
20#define __G_VALUE_ARRAY_H__
21
22#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
23#error "Only <glib-object.h> can be included directly."
24#endif
25
26#include <gobject/gvalue.h>
27
28G_BEGIN_DECLS
29
30/**
31 * G_TYPE_VALUE_ARRAY:
32 *
33 * The type ID of the "GValueArray" type which is a boxed type,
34 * used to pass around pointers to GValueArrays.
35 *
36 * Deprecated: 2.32: Use #GArray instead of #GValueArray
37 */
38#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(G_TYPE_ARRAY)
39
40/* --- typedefs & structs --- */
41typedef struct _GValueArray GValueArray;
42/**
43 * GValueArray:
44 * @n_values: number of values contained in the array
45 * @values: array of values
46 *
47 * A #GValueArray contains an array of #GValue elements.
48 */
49struct _GValueArray
50{
51 guint n_values;
52 GValue *values;
53
54 /*< private >*/
55 guint n_prealloced;
56};
57
58/* --- prototypes --- */
59GLIB_DEPRECATED_IN_2_32_FOR(GArray)
60GType g_value_array_get_type (void) G_GNUC_CONST;
61
62GLIB_DEPRECATED_IN_2_32_FOR(GArray)
63GValue* g_value_array_get_nth (GValueArray *value_array,
64 guint index_);
65
66GLIB_DEPRECATED_IN_2_32_FOR(GArray)
67GValueArray* g_value_array_new (guint n_prealloced);
68
69GLIB_DEPRECATED_IN_2_32_FOR(GArray)
70void g_value_array_free (GValueArray *value_array);
71
72GLIB_DEPRECATED_IN_2_32_FOR(GArray)
73GValueArray* g_value_array_copy (const GValueArray *value_array);
74
75GLIB_DEPRECATED_IN_2_32_FOR(GArray)
76GValueArray* g_value_array_prepend (GValueArray *value_array,
77 const GValue *value);
78
79GLIB_DEPRECATED_IN_2_32_FOR(GArray)
80GValueArray* g_value_array_append (GValueArray *value_array,
81 const GValue *value);
82
83GLIB_DEPRECATED_IN_2_32_FOR(GArray)
84GValueArray* g_value_array_insert (GValueArray *value_array,
85 guint index_,
86 const GValue *value);
87
88GLIB_DEPRECATED_IN_2_32_FOR(GArray)
89GValueArray* g_value_array_remove (GValueArray *value_array,
90 guint index_);
91
92GLIB_DEPRECATED_IN_2_32_FOR(GArray)
93GValueArray* g_value_array_sort (GValueArray *value_array,
94 GCompareFunc compare_func);
95
96GLIB_DEPRECATED_IN_2_32_FOR(GArray)
97GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
98 GCompareDataFunc compare_func,
99 gpointer user_data);
100
101
102G_END_DECLS
103
104#endif /* __G_VALUE_ARRAY_H__ */
105

source code of gtk/subprojects/glib/gobject/gvaluearray.h