GLib 2.39.3
[glib.git] / gobject / glib-types.h
blob34d5d1a5909a4ac7778f6cd4b2a56bbad7d1040c
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2 * Copyright (C) 2000-2001 Red Hat, Inc.
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 of the License, or (at your option) any later version.
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.
14 * You should have received a copy of the GNU Lesser General
15 * Public License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #ifndef __GLIB_TYPES_H__
20 #define __GLIB_TYPES_H__
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
26 #include <glib.h>
28 G_BEGIN_DECLS
30 /* A hack necesssary to preprocess this file with g-ir-scanner */
31 #ifdef __GI_SCANNER__
32 typedef gsize GType;
33 #endif
35 /* --- GLib boxed types --- */
36 /**
37 * G_TYPE_DATE:
39 * The #GType for #GDate.
41 #define G_TYPE_DATE (g_date_get_type ())
43 /**
44 * G_TYPE_STRV:
46 * The #GType for a boxed type holding a %NULL-terminated array of strings.
48 * The code fragments in the following example show the use of a property of
49 * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
50 * and g_object_get().
52 * |[
53 * g_object_class_install_property (object_class,
54 * PROP_AUTHORS,
55 * g_param_spec_boxed ("authors",
56 * _("Authors"),
57 * _("List of authors"),
58 * G_TYPE_STRV,
59 * G_PARAM_READWRITE));
61 * gchar *authors[] = { "Owen", "Tim", NULL };
62 * g_object_set (obj, "authors", authors, NULL);
64 * gchar *writers[];
65 * g_object_get (obj, "authors", &writers, NULL);
66 * /&ast; do something with writers &ast;/
67 * g_strfreev (writers);
68 * ]|
70 * Since: 2.4
72 #define G_TYPE_STRV (g_strv_get_type ())
74 /**
75 * G_TYPE_GSTRING:
77 * The #GType for #GString.
79 #define G_TYPE_GSTRING (g_gstring_get_type ())
81 /**
82 * G_TYPE_HASH_TABLE:
84 * The #GType for a boxed type holding a #GHashTable reference.
86 * Since: 2.10
88 #define G_TYPE_HASH_TABLE (g_hash_table_get_type ())
90 /**
91 * G_TYPE_REGEX:
93 * The #GType for a boxed type holding a #GRegex reference.
95 * Since: 2.14
97 #define G_TYPE_REGEX (g_regex_get_type ())
99 /**
100 * G_TYPE_MATCH_INFO:
102 * The #GType for a boxed type holding a #GMatchInfo reference.
104 * Since: 2.30
106 #define G_TYPE_MATCH_INFO (g_match_info_get_type ())
109 * G_TYPE_ARRAY:
111 * The #GType for a boxed type holding a #GArray reference.
113 * Since: 2.22
115 #define G_TYPE_ARRAY (g_array_get_type ())
118 * G_TYPE_BYTE_ARRAY:
120 * The #GType for a boxed type holding a #GByteArray reference.
122 * Since: 2.22
124 #define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ())
127 * G_TYPE_PTR_ARRAY:
129 * The #GType for a boxed type holding a #GPtrArray reference.
131 * Since: 2.22
133 #define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ())
136 * G_TYPE_BYTES:
138 * The #GType for #GBytes.
140 * Since: 2.32
142 #define G_TYPE_BYTES (g_bytes_get_type ())
145 * G_TYPE_VARIANT_TYPE:
147 * The #GType for a boxed type holding a #GVariantType.
149 * Since: 2.24
151 #define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ())
154 * G_TYPE_ERROR:
156 * The #GType for a boxed type holding a #GError.
158 * Since: 2.26
160 #define G_TYPE_ERROR (g_error_get_type ())
163 * G_TYPE_DATE_TIME:
165 * The #GType for a boxed type holding a #GDateTime.
167 * Since: 2.26
169 #define G_TYPE_DATE_TIME (g_date_time_get_type ())
172 * G_TYPE_TIME_ZONE:
174 * The #GType for a boxed type holding a #GTimeZone.
176 * Since: 2.34
178 #define G_TYPE_TIME_ZONE (g_time_zone_get_type ())
181 * G_TYPE_IO_CHANNEL:
183 * The #GType for #GIOChannel.
185 #define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
188 * G_TYPE_IO_CONDITION:
190 * The #GType for #GIOCondition.
192 #define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
195 * G_TYPE_VARIANT_BUILDER:
197 * The #GType for a boxed type holding a #GVariantBuilder.
199 * Since: 2.30
201 #define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
204 * G_TYPE_MAIN_LOOP:
206 * The #GType for a boxed type holding a #GMainLoop.
208 * Since: 2.30
210 #define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
213 * G_TYPE_MAIN_CONTEXT:
215 * The #GType for a boxed type holding a #GMainContext.
217 * Since: 2.30
219 #define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
222 * G_TYPE_SOURCE:
224 * The #GType for a boxed type holding a #GSource.
226 * Since: 2.30
228 #define G_TYPE_SOURCE (g_source_get_type ())
231 * G_TYPE_POLLFD:
233 * The #GType for a boxed type holding a #GPollFD.
235 * Since: 2.36
237 #define G_TYPE_POLLFD (g_pollfd_get_type ())
240 * G_TYPE_MARKUP_PARSE_CONTEXT:
242 * The #GType for a boxed type holding a #GMarkupParseContext.
244 * Since: 2.36
246 #define G_TYPE_MARKUP_PARSE_CONTEXT (g_markup_parse_context_get_type ())
249 * G_TYPE_KEY_FILE:
251 * The #GType for a boxed type holding a #GKeyFile.
253 * Since: 2.32
255 #define G_TYPE_KEY_FILE (g_key_file_get_type ())
258 * G_TYPE_MAPPED_FILE:
260 * The #GType for a boxed type holding a #GMappedFile.
262 * Since: 2.40
264 #define G_TYPE_MAPPED_FILE (g_mapped_file_get_type ())
267 * G_TYPE_THREAD:
269 * The #GType for a boxed type holding a #GThread.
271 * Since: 2.36
273 #define G_TYPE_THREAD (g_thread_get_type ())
276 * G_TYPE_CHECKSUM:
278 * The #GType for a boxed type holding a #GChecksum.
280 * Since: 2.36
282 #define G_TYPE_CHECKSUM (g_checksum_get_type ())
284 GLIB_AVAILABLE_IN_ALL
285 GType g_date_get_type (void) G_GNUC_CONST;
286 GLIB_AVAILABLE_IN_ALL
287 GType g_strv_get_type (void) G_GNUC_CONST;
288 GLIB_AVAILABLE_IN_ALL
289 GType g_gstring_get_type (void) G_GNUC_CONST;
290 GLIB_AVAILABLE_IN_ALL
291 GType g_hash_table_get_type (void) G_GNUC_CONST;
292 GLIB_AVAILABLE_IN_ALL
293 GType g_array_get_type (void) G_GNUC_CONST;
294 GLIB_AVAILABLE_IN_ALL
295 GType g_byte_array_get_type (void) G_GNUC_CONST;
296 GLIB_AVAILABLE_IN_ALL
297 GType g_ptr_array_get_type (void) G_GNUC_CONST;
298 GLIB_AVAILABLE_IN_ALL
299 GType g_bytes_get_type (void) G_GNUC_CONST;
300 GLIB_AVAILABLE_IN_ALL
301 GType g_variant_type_get_gtype (void) G_GNUC_CONST;
302 GLIB_AVAILABLE_IN_ALL
303 GType g_regex_get_type (void) G_GNUC_CONST;
304 GLIB_AVAILABLE_IN_2_30
305 GType g_match_info_get_type (void) G_GNUC_CONST;
306 GLIB_AVAILABLE_IN_ALL
307 GType g_error_get_type (void) G_GNUC_CONST;
308 GLIB_AVAILABLE_IN_ALL
309 GType g_date_time_get_type (void) G_GNUC_CONST;
310 GLIB_AVAILABLE_IN_ALL
311 GType g_time_zone_get_type (void) G_GNUC_CONST;
312 GLIB_AVAILABLE_IN_ALL
313 GType g_io_channel_get_type (void) G_GNUC_CONST;
314 GLIB_AVAILABLE_IN_ALL
315 GType g_io_condition_get_type (void) G_GNUC_CONST;
316 GLIB_AVAILABLE_IN_ALL
317 GType g_variant_builder_get_type (void) G_GNUC_CONST;
318 GLIB_AVAILABLE_IN_ALL
319 GType g_key_file_get_type (void) G_GNUC_CONST;
320 GLIB_AVAILABLE_IN_2_30
321 GType g_main_loop_get_type (void) G_GNUC_CONST;
322 GLIB_AVAILABLE_IN_2_30
323 GType g_main_context_get_type (void) G_GNUC_CONST;
324 GLIB_AVAILABLE_IN_2_30
325 GType g_source_get_type (void) G_GNUC_CONST;
326 GLIB_AVAILABLE_IN_2_36
327 GType g_pollfd_get_type (void) G_GNUC_CONST;
328 GLIB_AVAILABLE_IN_2_36
329 GType g_thread_get_type (void) G_GNUC_CONST;
330 GLIB_AVAILABLE_IN_2_36
331 GType g_checksum_get_type (void) G_GNUC_CONST;
332 GLIB_AVAILABLE_IN_2_36
333 GType g_markup_parse_context_get_type (void) G_GNUC_CONST;
334 GLIB_AVAILABLE_IN_2_40
335 GType g_mapped_file_get_type (void) G_GNUC_CONST;
337 GLIB_DEPRECATED_FOR('G_TYPE_VARIANT')
338 GType g_variant_get_gtype (void) G_GNUC_CONST;
341 * GStrv:
343 * A C representable type name for #G_TYPE_STRV.
345 typedef gchar** GStrv;
347 G_END_DECLS
349 #endif /* __GLIB_TYPES_H__ */