Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gitypes.h
Go to the documentation of this file.
1/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * GObject introspection: types
3 *
4 * Copyright (C) 2005 Matthias Clasen
5 * Copyright (C) 2008,2009 Red Hat, Inc.
6 *
7 * SPDX-License-Identifier: LGPL-2.1-or-later
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
23 */
24
25#pragma once
26
27#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
28#error "Only <girepository.h> can be included directly."
29#endif
30
31#include <stdint.h>
32
33#include <glib.h>
34#include <glib-object.h>
35
36#include "gi-visibility.h"
37
39
40/* Documented in gibaseinfo.c */
41typedef struct _GIBaseInfo GIBaseInfo;
42typedef struct _GIBaseInfoClass GIBaseInfoClass;
43
44typedef struct
45{
46 /*< private >*/
48
49 int dummy0;
50 void *dummy1[3];
51 uint32_t dummy2[2];
52 void *dummy3[6];
54
55/* Documented in gicallableinfo.c */
56typedef struct _GICallableInfo GICallableInfo;
58
59/* Documented in gifunctioninfo.c */
60typedef struct _GIFunctionInfo GIFunctionInfo;
62
63/* Documented in gicallbackinfo.c */
64typedef struct _GICallbackInfo GICallbackInfo;
66
67/* Documented in giregisteredtypeinfo.c */
68typedef struct _GIRegisteredTypeInfo GIRegisteredTypeInfo;
70
71/* Documented in gistructinfo.c */
72typedef struct _GIStructInfo GIStructInfo;
74
75/* Documented in giunioninfo.c */
76typedef struct _GIUnionInfo GIUnionInfo;
78
79/* Documented in gienuminfo.c */
80typedef struct _GIEnumInfo GIEnumInfo;
82
83/* Documented in giflagsinfo.c */
84typedef struct _GIFlagsInfo GIFlagsInfo;
86
87/* Documented in giobjectinfo.c */
88typedef struct _GIObjectInfo GIObjectInfo;
90
91/* Documented in giinterfaceinfo.c */
92typedef struct _GIInterfaceInfo GIInterfaceInfo;
94
95/* Documented in giconstantinfo.c */
96typedef struct _GIConstantInfo GIConstantInfo;
98
99/* Documented in givalueinfo.c */
100typedef struct _GIValueInfo GIValueInfo;
102
103/* Documented in gisignalinfo.c */
104typedef struct _GISignalInfo GISignalInfo;
106
107/* Documented in givfuncinfo.c */
108typedef struct _GIVFuncInfo GIVFuncInfo;
110
111/* Documented in gipropertyinfo.c */
112typedef struct _GIPropertyInfo GIPropertyInfo;
114
115/* Documented in gifieldinfo.c */
116typedef struct _GIFieldInfo GIFieldInfo;
118
119/* Documented in giarginfo.c */
120typedef struct
121{
122 /*< private >*/
124
125 void *padding[6];
126} GIArgInfo;
128
129/* Documented in gitypeinfo.c */
130typedef struct
131{
132 /*< private >*/
134
135 void *padding[6];
136} GITypeInfo;
138
139/* Documented in giunresolvedinfo.c */
140typedef struct _GIUnresolvedInfo GIUnresolvedInfo;
142
144{
146 int8_t v_int8;
147 uint8_t v_uint8;
148 int16_t v_int16;
149 uint16_t v_uint16;
150 int32_t v_int32;
151 uint32_t v_uint32;
152 int64_t v_int64;
153 uint64_t v_uint64;
154 float v_float;
155 double v_double;
156 short v_short;
157 unsigned short v_ushort;
158 int v_int;
159 unsigned int v_uint;
160 long v_long;
161 unsigned long v_ulong;
163 size_t v_size;
164 char *v_string;
166};
167
168/**
169 * GIArgument:
170 * @v_boolean: boolean value
171 * @v_int8: 8-bit signed integer value
172 * @v_uint8: 8-bit unsigned integer value
173 * @v_int16: 16-bit signed integer value
174 * @v_uint16: 16-bit unsigned integer value
175 * @v_int32: 32-bit signed integer value
176 * @v_uint32: 32-bit unsigned integer value
177 * @v_int64: 64-bit signed integer value
178 * @v_uint64: 64-bit unsigned integer value
179 * @v_float: single float value
180 * @v_double: double float value
181 * @v_short: signed short integer value
182 * @v_ushort: unsigned short integer value
183 * @v_int: signed integer value
184 * @v_uint: unsigned integer value
185 * @v_long: signed long integer value
186 * @v_ulong: unsigned long integer value
187 * @v_ssize: sized `size_t` value
188 * @v_size: unsigned `size_t` value
189 * @v_string: nul-terminated string value
190 * @v_pointer: arbitrary pointer value
191 *
192 * Stores an argument of varying type.
193 *
194 * Since: 2.80
195 */
197
198/**
199 * GITransfer:
200 * @GI_TRANSFER_NOTHING: Transfer nothing from the callee (function or the type
201 * instance the property belongs to) to the caller. The callee retains the
202 * ownership of the transfer and the caller doesn’t need to do anything to
203 * free up the resources of this transfer.
204 * @GI_TRANSFER_CONTAINER: Transfer the container (list, array, hash table) from
205 * the callee to the caller. The callee retains the ownership of the
206 * individual items in the container and the caller has to free up the
207 * container resources ([func@GLib.List.free],
208 * [func@GLib.HashTable.destroy], etc) of this transfer.
209 * @GI_TRANSFER_EVERYTHING: Transfer everything, e.g. the container and its
210 * contents from the callee to the caller. This is the case when the callee
211 * creates a copy of all the data it returns. The caller is responsible for
212 * cleaning up the container and item resources of this transfer.
213 *
214 * `GITransfer` specifies who’s responsible for freeing the resources after an
215 * ownership transfer is complete.
216 *
217 * The transfer is the exchange of data between two parts, from the callee to
218 * the caller.
219 *
220 * The callee is either a function/method/signal or an object/interface where a
221 * property is defined. The caller is the side accessing a property or calling a
222 * function.
223 *
224 * In the case of a containing type such as a list, an array or a hash table the
225 * container itself is specified differently from the items within the
226 * container. Each container is freed differently, check the documentation for
227 * the types themselves for information on how to free them.
228 *
229 * Since: 2.80
230 */
236
237/**
238 * GIDirection:
239 * @GI_DIRECTION_IN: ‘in’ argument.
240 * @GI_DIRECTION_OUT: ‘out’ argument.
241 * @GI_DIRECTION_INOUT: ‘in and out’ argument.
242 *
243 * The direction of a [class@GIRepository.ArgInfo].
244 *
245 * Since: 2.80
246 */
252
253/**
254 * GIScopeType:
255 * @GI_SCOPE_TYPE_INVALID: The argument is not of callback type.
256 * @GI_SCOPE_TYPE_CALL: The callback and associated `user_data` is only
257 * used during the call to this function.
258 * @GI_SCOPE_TYPE_ASYNC: The callback and associated `user_data` is
259 * only used until the callback is invoked, and the callback.
260 * is invoked always exactly once.
261 * @GI_SCOPE_TYPE_NOTIFIED: The callback and associated
262 * `user_data` is used until the caller is notified via the
263 * [type@GLib.DestroyNotify].
264 * @GI_SCOPE_TYPE_FOREVER: The callback and associated `user_data` is
265 * used until the process terminates
266 *
267 * Scope type of a [class@GIRepository.ArgInfo] representing callback,
268 * determines how the callback is invoked and is used to decided when the invoke
269 * structs can be freed.
270 *
271 * Since: 2.80
272 */
280
281/**
282 * GITypeTag:
283 * @GI_TYPE_TAG_VOID: void
284 * @GI_TYPE_TAG_BOOLEAN: boolean
285 * @GI_TYPE_TAG_INT8: 8-bit signed integer
286 * @GI_TYPE_TAG_UINT8: 8-bit unsigned integer
287 * @GI_TYPE_TAG_INT16: 16-bit signed integer
288 * @GI_TYPE_TAG_UINT16: 16-bit unsigned integer
289 * @GI_TYPE_TAG_INT32: 32-bit signed integer
290 * @GI_TYPE_TAG_UINT32: 32-bit unsigned integer
291 * @GI_TYPE_TAG_INT64: 64-bit signed integer
292 * @GI_TYPE_TAG_UINT64: 64-bit unsigned integer
293 * @GI_TYPE_TAG_FLOAT: float
294 * @GI_TYPE_TAG_DOUBLE: double floating point
295 * @GI_TYPE_TAG_GTYPE: a [type@GObject.Type]
296 * @GI_TYPE_TAG_UTF8: a UTF-8 encoded string
297 * @GI_TYPE_TAG_FILENAME: a filename, encoded in the same encoding
298 * as the native filesystem is using.
299 * @GI_TYPE_TAG_ARRAY: an array
300 * @GI_TYPE_TAG_INTERFACE: an extended interface object
301 * @GI_TYPE_TAG_GLIST: a [type@GLib.List]
302 * @GI_TYPE_TAG_GSLIST: a [type@GLib.SList]
303 * @GI_TYPE_TAG_GHASH: a [type@GLib.HashTable]
304 * @GI_TYPE_TAG_ERROR: a [type@GLib.Error]
305 * @GI_TYPE_TAG_UNICHAR: Unicode character
306 *
307 * The type tag of a [class@GIRepository.TypeInfo].
308 *
309 * Since: 2.80
310 */
311typedef enum {
312 /* Basic types */
315 GI_TYPE_TAG_INT8 = 2, /* Start of GI_TYPE_TAG_IS_NUMERIC types */
324 GI_TYPE_TAG_DOUBLE = 11, /* End of numeric types */
328 /* Non-basic types; compare with GI_TYPE_TAG_IS_BASIC */
329 GI_TYPE_TAG_ARRAY = 15, /* container (see GI_TYPE_TAG_IS_CONTAINER) */
331 GI_TYPE_TAG_GLIST = 17, /* container */
332 GI_TYPE_TAG_GSLIST = 18, /* container */
333 GI_TYPE_TAG_GHASH = 19, /* container */
335 /* Another basic type */
337 /* Note - there is currently only room for 32 tags */
339
340/**
341 * GI_TYPE_TAG_N_TYPES:
342 *
343 * Number of entries in [enum@GIRepository.TypeTag].
344 *
345 * Since: 2.80
346 */
347#define GI_TYPE_TAG_N_TYPES (GI_TYPE_TAG_UNICHAR+1)
348
349/**
350 * GIArrayType:
351 * @GI_ARRAY_TYPE_C: a C array, `char[]` for instance
352 * @GI_ARRAY_TYPE_ARRAY: a [type@GLib.Array] array
353 * @GI_ARRAY_TYPE_PTR_ARRAY: a [type@GLib.PtrArray] array
354 * @GI_ARRAY_TYPE_BYTE_ARRAY: a [type@GLib.ByteArray] array
355 *
356 * The type of array in a [class@GIRepository.TypeInfo].
357 *
358 * Since: 2.80
359 */
366
367/**
368 * GIFieldInfoFlags:
369 * @GI_FIELD_IS_READABLE: field is readable.
370 * @GI_FIELD_IS_WRITABLE: field is writable.
371 *
372 * Flags for a [class@GIRepository.FieldInfo].
373 *
374 * Since: 2.80
375 */
376
377typedef enum
378{
380 GI_FIELD_IS_WRITABLE = 1 << 1
382
383/**
384 * GIVFuncInfoFlags:
385 * @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type
386 * @GI_VFUNC_MUST_OVERRIDE: overrides
387 * @GI_VFUNC_MUST_NOT_OVERRIDE: does not override
388 *
389 * Flags of a [class@GIRepository.VFuncInfo] struct.
390 *
391 * Since: 2.80
392 */
399
400/**
401 * GIFunctionInfoFlags:
402 * @GI_FUNCTION_IS_METHOD: is a method.
403 * @GI_FUNCTION_IS_CONSTRUCTOR: is a constructor.
404 * @GI_FUNCTION_IS_GETTER: is a getter of a [class@GIRepository.PropertyInfo].
405 * @GI_FUNCTION_IS_SETTER: is a setter of a [class@GIRepository.PropertyInfo].
406 * @GI_FUNCTION_WRAPS_VFUNC: represents a virtual function.
407 *
408 * Flags for a [class@GIRepository.FunctionInfo] struct.
409 *
410 * Since: 2.80
411 */
420
#define GI_AVAILABLE_IN_ALL
GI_AVAILABLE_IN_ALL GType gi_enum_info_get_type(void)
struct _GIStructInfo GIStructInfo
Definition gitypes.h:72
GI_AVAILABLE_IN_ALL GType gi_interface_info_get_type(void)
GIFunctionInfoFlags
Definition gitypes.h:413
@ GI_FUNCTION_IS_SETTER
Definition gitypes.h:417
@ GI_FUNCTION_IS_CONSTRUCTOR
Definition gitypes.h:415
@ GI_FUNCTION_IS_METHOD
Definition gitypes.h:414
@ GI_FUNCTION_IS_GETTER
Definition gitypes.h:416
@ GI_FUNCTION_WRAPS_VFUNC
Definition gitypes.h:418
typedefG_BEGIN_DECLS struct _GIBaseInfo GIBaseInfo
Definition gitypes.h:41
GI_AVAILABLE_IN_ALL GType gi_callback_info_get_type(void)
GITypeTag
Definition gitypes.h:311
@ GI_TYPE_TAG_INT32
Definition gitypes.h:319
@ GI_TYPE_TAG_UINT32
Definition gitypes.h:320
@ GI_TYPE_TAG_GTYPE
Definition gitypes.h:325
@ GI_TYPE_TAG_BOOLEAN
Definition gitypes.h:314
@ GI_TYPE_TAG_ARRAY
Definition gitypes.h:329
@ GI_TYPE_TAG_INT8
Definition gitypes.h:315
@ GI_TYPE_TAG_GSLIST
Definition gitypes.h:332
@ GI_TYPE_TAG_INT64
Definition gitypes.h:321
@ GI_TYPE_TAG_INTERFACE
Definition gitypes.h:330
@ GI_TYPE_TAG_GHASH
Definition gitypes.h:333
@ GI_TYPE_TAG_UTF8
Definition gitypes.h:326
@ GI_TYPE_TAG_DOUBLE
Definition gitypes.h:324
@ GI_TYPE_TAG_FLOAT
Definition gitypes.h:323
@ GI_TYPE_TAG_UINT64
Definition gitypes.h:322
@ GI_TYPE_TAG_FILENAME
Definition gitypes.h:327
@ GI_TYPE_TAG_INT16
Definition gitypes.h:317
@ GI_TYPE_TAG_ERROR
Definition gitypes.h:334
@ GI_TYPE_TAG_UINT8
Definition gitypes.h:316
@ GI_TYPE_TAG_UINT16
Definition gitypes.h:318
@ GI_TYPE_TAG_GLIST
Definition gitypes.h:331
@ GI_TYPE_TAG_VOID
Definition gitypes.h:313
@ GI_TYPE_TAG_UNICHAR
Definition gitypes.h:336
struct _GIRegisteredTypeInfo GIRegisteredTypeInfo
Definition gitypes.h:68
struct _GIUnresolvedInfo GIUnresolvedInfo
Definition gitypes.h:140
struct _GIObjectInfo GIObjectInfo
Definition gitypes.h:88
struct _GIPropertyInfo GIPropertyInfo
Definition gitypes.h:112
GI_AVAILABLE_IN_ALL GType gi_unresolved_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_constant_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_signal_info_get_type(void)
struct _GIFlagsInfo GIFlagsInfo
Definition gitypes.h:84
GI_AVAILABLE_IN_ALL GType gi_registered_type_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_function_info_get_type(void)
struct _GIValueInfo GIValueInfo
Definition gitypes.h:100
struct _GICallbackInfo GICallbackInfo
Definition gitypes.h:64
struct _GIEnumInfo GIEnumInfo
Definition gitypes.h:80
struct _GIBaseInfoClass GIBaseInfoClass
Definition gitypes.h:42
GIDirection
Definition gitypes.h:247
@ GI_DIRECTION_OUT
Definition gitypes.h:249
@ GI_DIRECTION_INOUT
Definition gitypes.h:250
@ GI_DIRECTION_IN
Definition gitypes.h:248
GI_AVAILABLE_IN_ALL GType gi_arg_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_field_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_property_info_get_type(void)
GIFieldInfoFlags
Definition gitypes.h:378
@ GI_FIELD_IS_WRITABLE
Definition gitypes.h:380
@ GI_FIELD_IS_READABLE
Definition gitypes.h:379
struct _GIInterfaceInfo GIInterfaceInfo
Definition gitypes.h:92
GI_AVAILABLE_IN_ALL GType gi_callable_info_get_type(void)
struct _GIFieldInfo GIFieldInfo
Definition gitypes.h:116
struct _GICallableInfo GICallableInfo
Definition gitypes.h:56
GI_AVAILABLE_IN_ALL GType gi_union_info_get_type(void)
struct _GIFunctionInfo GIFunctionInfo
Definition gitypes.h:60
GIScopeType
Definition gitypes.h:273
@ GI_SCOPE_TYPE_ASYNC
Definition gitypes.h:276
@ GI_SCOPE_TYPE_FOREVER
Definition gitypes.h:278
@ GI_SCOPE_TYPE_INVALID
Definition gitypes.h:274
@ GI_SCOPE_TYPE_CALL
Definition gitypes.h:275
@ GI_SCOPE_TYPE_NOTIFIED
Definition gitypes.h:277
GIArrayType
Definition gitypes.h:360
@ GI_ARRAY_TYPE_C
Definition gitypes.h:361
@ GI_ARRAY_TYPE_PTR_ARRAY
Definition gitypes.h:363
@ GI_ARRAY_TYPE_ARRAY
Definition gitypes.h:362
@ GI_ARRAY_TYPE_BYTE_ARRAY
Definition gitypes.h:364
struct _GIUnionInfo GIUnionInfo
Definition gitypes.h:76
struct _GISignalInfo GISignalInfo
Definition gitypes.h:104
GI_AVAILABLE_IN_ALL GType gi_value_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_vfunc_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_type_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_object_info_get_type(void)
struct _GIVFuncInfo GIVFuncInfo
Definition gitypes.h:108
struct _GIConstantInfo GIConstantInfo
Definition gitypes.h:96
GIVFuncInfoFlags
Definition gitypes.h:394
@ GI_VFUNC_MUST_NOT_OVERRIDE
Definition gitypes.h:397
@ GI_VFUNC_MUST_OVERRIDE
Definition gitypes.h:396
@ GI_VFUNC_MUST_CHAIN_UP
Definition gitypes.h:395
GI_AVAILABLE_IN_ALL GType gi_struct_info_get_type(void)
GI_AVAILABLE_IN_ALL GType gi_flags_info_get_type(void)
GITransfer
Definition gitypes.h:231
@ GI_TRANSFER_NOTHING
Definition gitypes.h:232
@ GI_TRANSFER_EVERYTHING
Definition gitypes.h:234
@ GI_TRANSFER_CONTAINER
Definition gitypes.h:233
signed long gssize
Definition glibconfig.h:82
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
GIBaseInfoStack parent
Definition gitypes.h:123
GTypeInstance parent_instance
Definition gitypes.h:47
GIBaseInfoStack parent
Definition gitypes.h:133
float v_float
Definition gitypes.h:154
unsigned short v_ushort
Definition gitypes.h:157
uint64_t v_uint64
Definition gitypes.h:153
uint8_t v_uint8
Definition gitypes.h:147
unsigned long v_ulong
Definition gitypes.h:161
size_t v_size
Definition gitypes.h:163
int16_t v_int16
Definition gitypes.h:148
uint16_t v_uint16
Definition gitypes.h:149
long v_long
Definition gitypes.h:160
int8_t v_int8
Definition gitypes.h:146
int64_t v_int64
Definition gitypes.h:152
gssize v_ssize
Definition gitypes.h:162
void * v_pointer
Definition gitypes.h:165
uint32_t v_uint32
Definition gitypes.h:151
char * v_string
Definition gitypes.h:164
short v_short
Definition gitypes.h:156
double v_double
Definition gitypes.h:155
gboolean v_boolean
Definition gitypes.h:145
unsigned int v_uint
Definition gitypes.h:159
int32_t v_int32
Definition gitypes.h:150