Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gitypeinfo.h
Go to the documentation of this file.
1/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * GObject introspection: Type
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
32
34
35#define GI_TYPE_TYPE_INFO (gi_type_info_get_type ())
36
37/**
38 * GI_TYPE_INFO:
39 * @info: Info object which is subject to casting.
40 *
41 * Casts a [type@GIRepository.TypeInfo] or derived pointer into a
42 * `(GITypeInfo*)` pointer.
43 *
44 * Depending on the current debugging level, this function may invoke
45 * certain runtime checks to identify invalid casts.
46 *
47 * Since: 2.80
48 */
49#define GI_TYPE_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_TYPE_INFO, GITypeInfo))
50
51/**
52 * GI_IS_TYPE_INFO:
53 * @info: an info structure
54 *
55 * Checks if @info is a [alias@GIRepository.TypeInfo] (or a derived type).
56 *
57 * Since: 2.80
58 */
59#define GI_IS_TYPE_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_TYPE_INFO))
60
61/**
62 * GI_TYPE_TAG_IS_BASIC:
63 * @tag: a type tag
64 *
65 * Checks if @tag is a basic type.
66 *
67 * Since: 2.80
68 */
69#define GI_TYPE_TAG_IS_BASIC(tag) ((tag) < GI_TYPE_TAG_ARRAY || (tag) == GI_TYPE_TAG_UNICHAR)
70
71/**
72 * GI_TYPE_TAG_IS_NUMERIC:
73 * @tag: a type tag
74 *
75 * Checks if @tag is a numeric type. That is, integer or floating point.
76 *
77 * Since: 2.80
78 */
79#define GI_TYPE_TAG_IS_NUMERIC(tag) ((tag) >= GI_TYPE_TAG_INT8 && (tag) <= GI_TYPE_TAG_DOUBLE)
80
81/**
82 * GI_TYPE_TAG_IS_CONTAINER:
83 * @tag: a type tag
84 *
85 * Checks if @tag is a container type. That is, a type which may have a nonnull
86 * return from [method@GIRepository.TypeInfo.get_param_type].
87 *
88 * Since: 2.80
89 */
90 #define GI_TYPE_TAG_IS_CONTAINER(tag) ((tag) == GI_TYPE_TAG_ARRAY || \
91 ((tag) >= GI_TYPE_TAG_GLIST && (tag) <= GI_TYPE_TAG_GHASH))
92
94const char * gi_type_tag_to_string (GITypeTag type);
95
98
101
104 unsigned int n);
105
108
111 unsigned int *out_length_index);
112
115 size_t *out_size);
116
119
122
125
128 void *hash_pointer,
129 GIArgument *arg);
130
133 GIArgument *arg);
134
137 void *hash_pointer,
138 GIArgument *arg);
139
142 GIArgument *arg);
143
CURL_EXTERN int void * arg
Definition curl.h:2622
#define GI_AVAILABLE_IN_ALL
GI_AVAILABLE_IN_ALL gboolean gi_type_info_get_array_length_index(GITypeInfo *info, unsigned int *out_length_index)
GI_AVAILABLE_IN_ALL gboolean gi_type_info_is_pointer(GITypeInfo *info)
GI_AVAILABLE_IN_ALL void * gi_type_tag_hash_pointer_from_argument(GITypeTag storage_type, GIArgument *arg)
GI_AVAILABLE_IN_ALL void * gi_type_info_hash_pointer_from_argument(GITypeInfo *info, GIArgument *arg)
GI_AVAILABLE_IN_ALL GITypeTag gi_type_info_get_storage_type(GITypeInfo *info)
GI_AVAILABLE_IN_ALL void gi_type_info_argument_from_hash_pointer(GITypeInfo *info, void *hash_pointer, GIArgument *arg)
GI_AVAILABLE_IN_ALL gboolean gi_type_info_get_array_fixed_size(GITypeInfo *info, size_t *out_size)
GI_AVAILABLE_IN_ALL void gi_type_tag_argument_from_hash_pointer(GITypeTag storage_type, void *hash_pointer, GIArgument *arg)
GI_AVAILABLE_IN_ALL GIBaseInfo * gi_type_info_get_interface(GITypeInfo *info)
GI_AVAILABLE_IN_ALL const char * gi_type_tag_to_string(GITypeTag type)
GI_AVAILABLE_IN_ALL gboolean gi_type_info_is_zero_terminated(GITypeInfo *info)
GI_AVAILABLE_IN_ALL GITypeTag gi_type_info_get_tag(GITypeInfo *info)
GI_AVAILABLE_IN_ALL GITypeInfo * gi_type_info_get_param_type(GITypeInfo *info, unsigned int n)
GI_AVAILABLE_IN_ALL GIArrayType gi_type_info_get_array_type(GITypeInfo *info)
typedefG_BEGIN_DECLS struct _GIBaseInfo GIBaseInfo
Definition gitypes.h:41
GITypeTag
Definition gitypes.h:311
GIArrayType
Definition gitypes.h:360
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
gint gboolean
Definition gtypes.h:56