Box GPollFD to make it introspectable
[platform/upstream/glib.git] / gobject / glib-types.h
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2  * Copyright (C) 2000-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 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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) && !defined(GLIB_COMPILATION)
20 #error "Only <glib-object.h> can be included directly."
21 #endif
22
23 #ifndef __GLIB_TYPES_H__
24 #define __GLIB_TYPES_H__
25
26 #include <glib.h>
27
28 G_BEGIN_DECLS
29
30 /* A hack necesssary to preprocess this file with g-ir-scanner */
31 #ifdef __GI_SCANNER__
32 typedef gsize GType;
33 #endif
34
35 /* --- GLib boxed types --- */
36 /**
37  * G_TYPE_DATE:
38  *
39  * The #GType for #GDate.
40  */
41 #define G_TYPE_DATE (g_date_get_type ())
42
43 /**
44  * G_TYPE_STRV:
45  *
46  * The #GType for a boxed type holding a %NULL-terminated array of strings.
47  *
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().
51  *
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));
60  *
61  * gchar *authors[] = { "Owen", "Tim", NULL };
62  * g_object_set (obj, "authors", authors, NULL);
63  *
64  * gchar *writers[];
65  * g_object_get (obj, "authors", &writers, NULL);
66  * /&ast; do something with writers &ast;/
67  * g_strfreev (writers);
68  * ]|
69  *
70  * Since: 2.4
71  */
72 #define G_TYPE_STRV (g_strv_get_type ())
73
74 /**
75  * G_TYPE_GSTRING:
76  *
77  * The #GType for #GString.
78  */
79 #define G_TYPE_GSTRING (g_gstring_get_type ())
80
81 /**
82  * G_TYPE_HASH_TABLE:
83  *
84  * The #GType for a boxed type holding a #GHashTable reference.
85  *
86  * Since: 2.10
87  */
88 #define G_TYPE_HASH_TABLE (g_hash_table_get_type ())
89
90 /**
91  * G_TYPE_REGEX:
92  *
93  * The #GType for a boxed type holding a #GRegex reference.
94  *
95  * Since: 2.14
96  */
97 #define G_TYPE_REGEX (g_regex_get_type ())
98
99 /**
100  * G_TYPE_MATCH_INFO:
101  *
102  * The #GType for a boxed type holding a #GMatchInfo reference.
103  *
104  * Since: 2.30
105  */
106 #define G_TYPE_MATCH_INFO (g_match_info_get_type ())
107
108 /**
109  * G_TYPE_ARRAY:
110  *
111  * The #GType for a boxed type holding a #GArray reference.
112  *
113  * Since: 2.22
114  */
115 #define G_TYPE_ARRAY (g_array_get_type ())
116
117 /**
118  * G_TYPE_BYTE_ARRAY:
119  *
120  * The #GType for a boxed type holding a #GByteArray reference.
121  *
122  * Since: 2.22
123  */
124 #define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ())
125
126 /**
127  * G_TYPE_PTR_ARRAY:
128  *
129  * The #GType for a boxed type holding a #GPtrArray reference.
130  *
131  * Since: 2.22
132  */
133 #define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ())
134
135 /**
136  * G_TYPE_BYTES:
137  *
138  * The #GType for #GBytes.
139  *
140  * Since: 2.32
141  */
142 #define G_TYPE_BYTES (g_bytes_get_type ())
143
144 /**
145  * G_TYPE_VARIANT_TYPE:
146  *
147  * The #GType for a boxed type holding a #GVariantType.
148  *
149  * Since: 2.24
150  */
151 #define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ())
152
153 /**
154  * G_TYPE_ERROR:
155  *
156  * The #GType for a boxed type holding a #GError.
157  *
158  * Since: 2.26
159  */
160 #define G_TYPE_ERROR (g_error_get_type ())
161
162 /**
163  * G_TYPE_DATE_TIME:
164  *
165  * The #GType for a boxed type holding a #GDateTime.
166  *
167  * Since: 2.26
168  */
169 #define G_TYPE_DATE_TIME (g_date_time_get_type ())
170
171 /**
172  * G_TYPE_TIME_ZONE:
173  *
174  * The #GType for a boxed type holding a #GTimeZone.
175  *
176  * Since: 2.34
177  */
178 #define G_TYPE_TIME_ZONE (g_time_zone_get_type ())
179
180 /**
181  * G_TYPE_IO_CHANNEL:
182  *
183  * The #GType for #GIOChannel.
184  */
185 #define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
186
187 /**
188  * G_TYPE_IO_CONDITION:
189  *
190  * The #GType for #GIOCondition.
191  */
192 #define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
193
194 /**
195  * G_TYPE_VARIANT_BUILDER:
196  *
197  * The #GType for a boxed type holding a #GVariantBuilder.
198  *
199  * Since: 2.30
200  */
201 #define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
202
203 /**
204  * G_TYPE_MAIN_LOOP:
205  *
206  * The #GType for a boxed type holding a #GMainLoop.
207  *
208  * Since: 2.30
209  */
210 #define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
211
212 /**
213  * G_TYPE_MAIN_CONTEXT:
214  *
215  * The #GType for a boxed type holding a #GMainContext.
216  *
217  * Since: 2.30
218  */
219 #define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
220
221 /**
222  * G_TYPE_SOURCE:
223  *
224  * The #GType for a boxed type holding a #GSource.
225  *
226  * Since: 2.30
227  */
228 #define G_TYPE_SOURCE (g_source_get_type ())
229
230 /**
231  * G_TYPE_POLLFD:
232  *
233  * The #GType for a boxed type holding a #GPollFD.
234  *
235  * Since: 2.36
236  */
237 #define G_TYPE_POLLFD (g_pollfd_get_type ())
238
239 /**
240  * G_TYPE_KEY_FILE:
241  *
242  * The #GType for a boxed type holding a #GKeyFile.
243  *
244  * Since: 2.32
245  */
246 #define G_TYPE_KEY_FILE (g_key_file_get_type ())
247
248 GType   g_date_get_type            (void) G_GNUC_CONST;
249 GType   g_strv_get_type            (void) G_GNUC_CONST;
250 GType   g_gstring_get_type         (void) G_GNUC_CONST;
251 GType   g_hash_table_get_type      (void) G_GNUC_CONST;
252 GType   g_array_get_type           (void) G_GNUC_CONST;
253 GType   g_byte_array_get_type      (void) G_GNUC_CONST;
254 GType   g_ptr_array_get_type       (void) G_GNUC_CONST;
255 GType   g_bytes_get_type           (void) G_GNUC_CONST;
256 GType   g_variant_type_get_gtype   (void) G_GNUC_CONST;
257 GType   g_regex_get_type           (void) G_GNUC_CONST;
258 GLIB_AVAILABLE_IN_2_30
259 GType   g_match_info_get_type      (void) G_GNUC_CONST;
260 GType   g_error_get_type           (void) G_GNUC_CONST;
261 GType   g_date_time_get_type       (void) G_GNUC_CONST;
262 GType   g_time_zone_get_type       (void) G_GNUC_CONST;
263 GType   g_io_channel_get_type      (void) G_GNUC_CONST;
264 GType   g_io_condition_get_type    (void) G_GNUC_CONST;
265 GType   g_variant_builder_get_type (void) G_GNUC_CONST;
266 GType   g_key_file_get_type        (void) G_GNUC_CONST;
267 GLIB_AVAILABLE_IN_2_30
268 GType   g_main_loop_get_type       (void) G_GNUC_CONST;
269 GLIB_AVAILABLE_IN_2_30
270 GType   g_main_context_get_type    (void) G_GNUC_CONST;
271 GLIB_AVAILABLE_IN_2_30
272 GType   g_source_get_type          (void) G_GNUC_CONST;
273 GLIB_AVAILABLE_IN_2_36
274 GType   g_pollfd_get_type          (void) G_GNUC_CONST;
275
276 GLIB_DEPRECATED_FOR('G_TYPE_VARIANT')
277 GType   g_variant_get_gtype        (void) G_GNUC_CONST;
278
279 /**
280  * GStrv:
281  *
282  * A C representable type name for #G_TYPE_STRV.
283  */
284 typedef gchar** GStrv;
285
286 G_END_DECLS
287
288 #endif  /* __GLIB_TYPES_H__ */