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