GDataList: don't hold the bitlock over callbacks
[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 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  * /&ast; do something with writers &ast;/
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_ARRAY:
99  *
100  * The #GType for a boxed type holding a #GArray reference.
101  *
102  * Since: 2.22
103  */
104 #define G_TYPE_ARRAY (g_array_get_type ())
105
106 /**
107  * G_TYPE_BYTE_ARRAY:
108  *
109  * The #GType for a boxed type holding a #GByteArray reference.
110  *
111  * Since: 2.22
112  */
113 #define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ())
114
115 /**
116  * G_TYPE_PTR_ARRAY:
117  *
118  * The #GType for a boxed type holding a #GPtrArray reference.
119  *
120  * Since: 2.22
121  */
122 #define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ())
123
124 /**
125  * G_TYPE_VARIANT_TYPE:
126  *
127  * The #GType for a boxed type holding a #GVariantType.
128  *
129  * Since: 2.24
130  */
131 #define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ())
132
133 /**
134  * G_TYPE_ERROR:
135  *
136  * The #GType for a boxed type holding a #GError.
137  *
138  * Since: 2.26
139  */
140 #define G_TYPE_ERROR (g_error_get_type ())
141
142 /**
143  * G_TYPE_DATE_TIME:
144  *
145  * The #GType for a boxed type holding a #GDateTime.
146  *
147  * Since: 2.26
148  */
149 #define G_TYPE_DATE_TIME (g_date_time_get_type ())
150
151 /**
152  * G_TYPE_IO_CHANNEL:
153  *
154  * The #GType for #GIOChannel.
155  */
156 #define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
157
158 /**
159  * G_TYPE_IO_CONDITION:
160  *
161  * The #GType for #GIOCondition.
162  */
163 #define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
164
165 /**
166  * G_TYPE_VARIANT_BUILDER:
167  *
168  * The #GType for a boxed type holding a #GVariantBuilder.
169  *
170  * Since: 2.30
171  */
172 #define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
173
174 GType   g_date_get_type            (void) G_GNUC_CONST;
175 GType   g_strv_get_type            (void) G_GNUC_CONST;
176 GType   g_gstring_get_type         (void) G_GNUC_CONST;
177 GType   g_hash_table_get_type      (void) G_GNUC_CONST;
178 GType   g_array_get_type           (void) G_GNUC_CONST;
179 GType   g_byte_array_get_type      (void) G_GNUC_CONST;
180 GType   g_ptr_array_get_type       (void) G_GNUC_CONST;
181 GType   g_variant_type_get_gtype   (void) G_GNUC_CONST;
182 GType   g_regex_get_type           (void) G_GNUC_CONST;
183 GType   g_error_get_type           (void) G_GNUC_CONST;
184 GType   g_date_time_get_type       (void) G_GNUC_CONST;
185 GType   g_io_channel_get_type      (void) G_GNUC_CONST;
186 GType   g_io_condition_get_type    (void) G_GNUC_CONST;
187 GType   g_variant_builder_get_type (void) G_GNUC_CONST;
188
189 #if !defined(G_DISABLE_DEPRECATED) || defined(__GI_SCANNER__)
190 GType   g_variant_get_gtype        (void) G_GNUC_CONST;
191 #endif
192
193 /**
194  * GStrv:
195  *
196  * A C representable type name for #G_TYPE_STRV.
197  */
198 typedef gchar** GStrv;
199
200 G_END_DECLS
201
202 #endif  /* __GLIB_TYPES_H__ */