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
30G_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 --- */
43typedef struct _GValueArray GValueArray;
44struct _GValueArray
45{
46 guint n_values;
47 GValue *values;
48
49 /*< private >*/
50 guint n_prealloced;
51};
52
53/* --- prototypes --- */
54GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
55GType g_value_array_get_type (void) G_GNUC_CONST;
56
57GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
58GValue* g_value_array_get_nth (GValueArray *value_array,
59 guint index_);
60
61GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
62GValueArray* g_value_array_new (guint n_prealloced);
63
64GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
65void g_value_array_free (GValueArray *value_array);
66
67GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
68GValueArray* g_value_array_copy (const GValueArray *value_array);
69
70GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
71GValueArray* g_value_array_prepend (GValueArray *value_array,
72 const GValue *value);
73
74GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
75GValueArray* g_value_array_append (GValueArray *value_array,
76 const GValue *value);
77
78GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
79GValueArray* g_value_array_insert (GValueArray *value_array,
80 guint index_,
81 const GValue *value);
82
83GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
84GValueArray* g_value_array_remove (GValueArray *value_array,
85 guint index_);
86
87GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
88GValueArray* g_value_array_sort (GValueArray *value_array,
89 GCompareFunc compare_func);
90
91GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
92GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
93 GCompareDataFunc compare_func,
94 gpointer user_data);
95
96
97G_END_DECLS
98
99#endif /* __G_VALUE_ARRAY_H__ */
100