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 | |
28 | G_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 ()) |
39 | |
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 |
46 | * |
47 | * A #GValueArray contains an array of #GValue elements. |
48 | */ |
49 | struct _GValueArray |
50 | { |
51 | guint n_values; |
52 | GValue *values; |
53 | |
54 | /*< private >*/ |
55 | guint n_prealloced; |
56 | }; |
57 | |
58 | /* --- prototypes --- */ |
59 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
60 | GType g_value_array_get_type (void) G_GNUC_CONST; |
61 | |
62 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
63 | GValue* g_value_array_get_nth (GValueArray *value_array, |
64 | guint index_); |
65 | |
66 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
67 | GValueArray* g_value_array_new (guint n_prealloced); |
68 | |
69 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
70 | void g_value_array_free (GValueArray *value_array); |
71 | |
72 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
73 | GValueArray* g_value_array_copy (const GValueArray *value_array); |
74 | |
75 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
76 | GValueArray* g_value_array_prepend (GValueArray *value_array, |
77 | const GValue *value); |
78 | |
79 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
80 | GValueArray* g_value_array_append (GValueArray *value_array, |
81 | const GValue *value); |
82 | |
83 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
84 | GValueArray* g_value_array_insert (GValueArray *value_array, |
85 | guint index_, |
86 | const GValue *value); |
87 | |
88 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
89 | GValueArray* g_value_array_remove (GValueArray *value_array, |
90 | guint index_); |
91 | |
92 | GLIB_DEPRECATED_IN_2_32_FOR(GArray) |
93 | GValueArray* g_value_array_sort (GValueArray *value_array, |
94 | GCompareFunc compare_func); |
95 | |
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); |
100 | |
101 | |
102 | G_END_DECLS |
103 | |
104 | #endif /* __G_VALUE_ARRAY_H__ */ |
105 | |