1/* GObject - GLib Type, Object, Parameter and Signal Library
2 * Copyright (C) 2000-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#ifndef __GLIB_TYPES_H__
20#define __GLIB_TYPES_H__
21
22#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) && !defined(GLIB_COMPILATION)
23#error "Only <glib-object.h> can be included directly."
24#endif
25
26#include <glib.h>
27#include <gobject/gobject-visibility.h>
28
29G_BEGIN_DECLS
30
31/* A hack necesssary to preprocess this file with g-ir-scanner */
32#ifdef __GI_SCANNER__
33typedef gsize GType;
34#endif
35
36/* --- GLib boxed types --- */
37/**
38 * G_TYPE_DATE:
39 *
40 * The #GType for #GDate.
41 */
42#define G_TYPE_DATE (g_date_get_type ())
43
44/**
45 * G_TYPE_STRV:
46 *
47 * The #GType for a boxed type holding a %NULL-terminated array of strings.
48 *
49 * The code fragments in the following example show the use of a property of
50 * type %G_TYPE_STRV with g_object_class_install_property(), g_object_set()
51 * and g_object_get().
52 *
53 * |[
54 * g_object_class_install_property (object_class,
55 * PROP_AUTHORS,
56 * g_param_spec_boxed ("authors",
57 * _("Authors"),
58 * _("List of authors"),
59 * G_TYPE_STRV,
60 * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
61 *
62 * gchar *authors[] = { "Owen", "Tim", NULL };
63 * g_object_set (obj, "authors", authors, NULL);
64 *
65 * gchar *writers[];
66 * g_object_get (obj, "authors", &writers, NULL);
67 * /&ast; do something with writers &ast;/
68 * g_strfreev (writers);
69 * ]|
70 *
71 * Since: 2.4
72 */
73#define G_TYPE_STRV (g_strv_get_type ())
74
75/**
76 * G_TYPE_GSTRING:
77 *
78 * The #GType for #GString.
79 */
80#define G_TYPE_GSTRING (g_gstring_get_type ())
81
82/**
83 * G_TYPE_HASH_TABLE:
84 *
85 * The #GType for a boxed type holding a #GHashTable reference.
86 *
87 * Since: 2.10
88 */
89#define G_TYPE_HASH_TABLE (g_hash_table_get_type ())
90
91/**
92 * G_TYPE_REGEX:
93 *
94 * The #GType for a boxed type holding a #GRegex reference.
95 *
96 * Since: 2.14
97 */
98#define G_TYPE_REGEX (g_regex_get_type ())
99
100/**
101 * G_TYPE_MATCH_INFO:
102 *
103 * The #GType for a boxed type holding a #GMatchInfo reference.
104 *
105 * Since: 2.30
106 */
107#define G_TYPE_MATCH_INFO (g_match_info_get_type ())
108
109/**
110 * G_TYPE_ARRAY:
111 *
112 * The #GType for a boxed type holding a #GArray reference.
113 *
114 * Since: 2.22
115 */
116#define G_TYPE_ARRAY (g_array_get_type ())
117
118/**
119 * G_TYPE_BYTE_ARRAY:
120 *
121 * The #GType for a boxed type holding a #GByteArray reference.
122 *
123 * Since: 2.22
124 */
125#define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ())
126
127/**
128 * G_TYPE_PTR_ARRAY:
129 *
130 * The #GType for a boxed type holding a #GPtrArray reference.
131 *
132 * Since: 2.22
133 */
134#define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ())
135
136/**
137 * G_TYPE_BYTES:
138 *
139 * The #GType for #GBytes.
140 *
141 * Since: 2.32
142 */
143#define G_TYPE_BYTES (g_bytes_get_type ())
144
145/**
146 * G_TYPE_VARIANT_TYPE:
147 *
148 * The #GType for a boxed type holding a #GVariantType.
149 *
150 * Since: 2.24
151 */
152#define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ())
153
154/**
155 * G_TYPE_ERROR:
156 *
157 * The #GType for a boxed type holding a #GError.
158 *
159 * Since: 2.26
160 */
161#define G_TYPE_ERROR (g_error_get_type ())
162
163/**
164 * G_TYPE_DATE_TIME:
165 *
166 * The #GType for a boxed type holding a #GDateTime.
167 *
168 * Since: 2.26
169 */
170#define G_TYPE_DATE_TIME (g_date_time_get_type ())
171
172/**
173 * G_TYPE_TIME_ZONE:
174 *
175 * The #GType for a boxed type holding a #GTimeZone.
176 *
177 * Since: 2.34
178 */
179#define G_TYPE_TIME_ZONE (g_time_zone_get_type ())
180
181/**
182 * G_TYPE_IO_CHANNEL:
183 *
184 * The #GType for #GIOChannel.
185 */
186#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
187
188/**
189 * G_TYPE_IO_CONDITION:
190 *
191 * The #GType for #GIOCondition.
192 */
193#define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
194
195/**
196 * G_TYPE_VARIANT_BUILDER:
197 *
198 * The #GType for a boxed type holding a #GVariantBuilder.
199 *
200 * Since: 2.30
201 */
202#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
203
204/**
205 * G_TYPE_VARIANT_DICT:
206 *
207 * The #GType for a boxed type holding a #GVariantDict.
208 *
209 * Since: 2.40
210 */
211#define G_TYPE_VARIANT_DICT (g_variant_dict_get_type ())
212
213/**
214 * G_TYPE_MAIN_LOOP:
215 *
216 * The #GType for a boxed type holding a #GMainLoop.
217 *
218 * Since: 2.30
219 */
220#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
221
222/**
223 * G_TYPE_MAIN_CONTEXT:
224 *
225 * The #GType for a boxed type holding a #GMainContext.
226 *
227 * Since: 2.30
228 */
229#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
230
231/**
232 * G_TYPE_SOURCE:
233 *
234 * The #GType for a boxed type holding a #GSource.
235 *
236 * Since: 2.30
237 */
238#define G_TYPE_SOURCE (g_source_get_type ())
239
240/**
241 * G_TYPE_POLLFD:
242 *
243 * The #GType for a boxed type holding a #GPollFD.
244 *
245 * Since: 2.36
246 */
247#define G_TYPE_POLLFD (g_pollfd_get_type ())
248
249/**
250 * G_TYPE_MARKUP_PARSE_CONTEXT:
251 *
252 * The #GType for a boxed type holding a #GMarkupParseContext.
253 *
254 * Since: 2.36
255 */
256#define G_TYPE_MARKUP_PARSE_CONTEXT (g_markup_parse_context_get_type ())
257
258/**
259 * G_TYPE_KEY_FILE:
260 *
261 * The #GType for a boxed type holding a #GKeyFile.
262 *
263 * Since: 2.32
264 */
265#define G_TYPE_KEY_FILE (g_key_file_get_type ())
266
267/**
268 * G_TYPE_MAPPED_FILE:
269 *
270 * The #GType for a boxed type holding a #GMappedFile.
271 *
272 * Since: 2.40
273 */
274#define G_TYPE_MAPPED_FILE (g_mapped_file_get_type ())
275
276/**
277 * G_TYPE_THREAD:
278 *
279 * The #GType for a boxed type holding a #GThread.
280 *
281 * Since: 2.36
282 */
283#define G_TYPE_THREAD (g_thread_get_type ())
284
285/**
286 * G_TYPE_CHECKSUM:
287 *
288 * The #GType for a boxed type holding a #GChecksum.
289 *
290 * Since: 2.36
291 */
292#define G_TYPE_CHECKSUM (g_checksum_get_type ())
293
294/**
295 * G_TYPE_OPTION_GROUP:
296 *
297 * The #GType for a boxed type holding a #GOptionGroup.
298 *
299 * Since: 2.44
300 */
301#define G_TYPE_OPTION_GROUP (g_option_group_get_type ())
302
303/**
304 * G_TYPE_URI:
305 *
306 * The #GType for a boxed type holding a #GUri.
307 *
308 * Since: 2.66
309 */
310#define G_TYPE_URI (g_uri_get_type ())
311
312/**
313 * G_TYPE_TREE:
314 *
315 * The #GType for #GTree.
316 *
317 * Since: 2.68
318 */
319#define G_TYPE_TREE (g_tree_get_type ())
320
321/**
322 * G_TYPE_PATTERN_SPEC:
323 *
324 * The #GType for #GPatternSpec.
325 *
326 * Since: 2.70
327 */
328#define G_TYPE_PATTERN_SPEC (g_pattern_spec_get_type ())
329
330/**
331 * G_TYPE_BOOKMARK_FILE:
332 *
333 * The #GType for a boxed type holding a #GBookmarkFile.
334 *
335 * Since: 2.76
336 */
337#define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type ())
338
339/**
340 * G_TYPE_HMAC:
341 *
342 * The #GType for a boxed type holding a #GHmac.
343 *
344 * Since: 2.80
345 */
346#define G_TYPE_HMAC (g_hmac_get_type ())
347
348/**
349 * G_TYPE_DIR:
350 *
351 * The #GType for a boxed type holding a #GDir.
352 *
353 * Since: 2.80
354 */
355#define G_TYPE_DIR (g_dir_get_type ())
356
357/**
358 * G_TYPE_RAND:
359 *
360 * The #GType for a boxed type holding a #GRand.
361 *
362 * Since: 2.80
363 */
364#define G_TYPE_RAND (g_rand_get_type ())
365
366/**
367 * G_TYPE_STRV_BUILDER:
368 *
369 * The #GType for a boxed type holding a #GStrvBuilder.
370 *
371 * Since: 2.80
372 */
373#define G_TYPE_STRV_BUILDER (g_strv_builder_get_type ())
374
375GOBJECT_AVAILABLE_IN_ALL
376GType g_date_get_type (void) G_GNUC_CONST;
377GOBJECT_AVAILABLE_IN_ALL
378GType g_strv_get_type (void) G_GNUC_CONST;
379GOBJECT_AVAILABLE_IN_ALL
380GType g_gstring_get_type (void) G_GNUC_CONST;
381GOBJECT_AVAILABLE_IN_ALL
382GType g_hash_table_get_type (void) G_GNUC_CONST;
383GOBJECT_AVAILABLE_IN_ALL
384GType g_array_get_type (void) G_GNUC_CONST;
385GOBJECT_AVAILABLE_IN_ALL
386GType g_byte_array_get_type (void) G_GNUC_CONST;
387GOBJECT_AVAILABLE_IN_ALL
388GType g_ptr_array_get_type (void) G_GNUC_CONST;
389GOBJECT_AVAILABLE_IN_ALL
390GType g_bytes_get_type (void) G_GNUC_CONST;
391GOBJECT_AVAILABLE_IN_ALL
392GType g_variant_type_get_gtype (void) G_GNUC_CONST;
393GOBJECT_AVAILABLE_IN_ALL
394GType g_regex_get_type (void) G_GNUC_CONST;
395GOBJECT_AVAILABLE_IN_2_30
396GType g_match_info_get_type (void) G_GNUC_CONST;
397GOBJECT_AVAILABLE_IN_ALL
398GType g_error_get_type (void) G_GNUC_CONST;
399GOBJECT_AVAILABLE_IN_ALL
400GType g_date_time_get_type (void) G_GNUC_CONST;
401GOBJECT_AVAILABLE_IN_ALL
402GType g_time_zone_get_type (void) G_GNUC_CONST;
403GOBJECT_AVAILABLE_IN_ALL
404GType g_io_channel_get_type (void) G_GNUC_CONST;
405GOBJECT_AVAILABLE_IN_ALL
406GType g_io_condition_get_type (void) G_GNUC_CONST;
407GOBJECT_AVAILABLE_IN_ALL
408GType g_variant_builder_get_type (void) G_GNUC_CONST;
409GOBJECT_AVAILABLE_IN_2_40
410GType g_variant_dict_get_type (void) G_GNUC_CONST;
411GOBJECT_AVAILABLE_IN_ALL
412GType g_key_file_get_type (void) G_GNUC_CONST;
413GOBJECT_AVAILABLE_IN_2_30
414GType g_main_loop_get_type (void) G_GNUC_CONST;
415GOBJECT_AVAILABLE_IN_2_30
416GType g_main_context_get_type (void) G_GNUC_CONST;
417GOBJECT_AVAILABLE_IN_2_30
418GType g_source_get_type (void) G_GNUC_CONST;
419GOBJECT_AVAILABLE_IN_2_36
420GType g_pollfd_get_type (void) G_GNUC_CONST;
421GOBJECT_AVAILABLE_IN_2_36
422GType g_thread_get_type (void) G_GNUC_CONST;
423GOBJECT_AVAILABLE_IN_2_36
424GType g_checksum_get_type (void) G_GNUC_CONST;
425GOBJECT_AVAILABLE_IN_2_36
426GType g_markup_parse_context_get_type (void) G_GNUC_CONST;
427GOBJECT_AVAILABLE_IN_2_40
428GType g_mapped_file_get_type (void) G_GNUC_CONST;
429GOBJECT_AVAILABLE_IN_2_44
430GType g_option_group_get_type (void) G_GNUC_CONST;
431GOBJECT_AVAILABLE_IN_2_66
432GType g_uri_get_type (void) G_GNUC_CONST;
433GOBJECT_AVAILABLE_IN_2_68
434GType g_tree_get_type (void) G_GNUC_CONST;
435GOBJECT_AVAILABLE_IN_2_70
436GType g_pattern_spec_get_type (void) G_GNUC_CONST;
437GOBJECT_AVAILABLE_IN_2_76
438GType g_bookmark_file_get_type (void) G_GNUC_CONST;
439GOBJECT_AVAILABLE_IN_2_80
440GType g_hmac_get_type (void) G_GNUC_CONST;
441GOBJECT_AVAILABLE_IN_2_80
442GType g_dir_get_type (void) G_GNUC_CONST;
443GOBJECT_AVAILABLE_IN_2_80
444GType g_rand_get_type (void) G_GNUC_CONST;
445GOBJECT_AVAILABLE_IN_2_80
446GType g_strv_builder_get_type (void) G_GNUC_CONST;
447
448GOBJECT_DEPRECATED_FOR('G_TYPE_VARIANT')
449GType g_variant_get_gtype (void) G_GNUC_CONST;
450
451G_END_DECLS
452
453#endif /* __GLIB_TYPES_H__ */
454