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