glib-types.h 8.3 KB

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