glib (2.79.0)
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * GObject introspection: Object
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 <girepository/gitypes.h>
32
33 G_BEGIN_DECLS
34
35 /**
36 * GIObjectInfoRefFunction: (skip)
37 * @object: object instance pointer
38 *
39 * Increases the reference count of an object instance.
40 *
41 * Returns: (transfer full): the object instance
42 * Since: 2.80
43 */
44 typedef void * (*GIObjectInfoRefFunction) (void *object);
45
46 /**
47 * GIObjectInfoUnrefFunction: (skip)
48 * @object: (transfer full): object instance pointer
49 *
50 * Decreases the reference count of an object instance.
51 *
52 * Since: 2.80
53 */
54 typedef void (*GIObjectInfoUnrefFunction) (void *object);
55
56 /**
57 * GIObjectInfoSetValueFunction: (skip)
58 * @value: a [type@GObject.Value]
59 * @object: object instance pointer
60 *
61 * Update @value and attach the object instance pointer @object to it.
62 *
63 * Since: 2.80
64 */
65 typedef void (*GIObjectInfoSetValueFunction) (GValue *value, void *object);
66
67 /**
68 * GIObjectInfoGetValueFunction: (skip)
69 * @value: a [type@GObject.Value]
70 *
71 * Extract an object instance out of @value.
72 *
73 * Returns: (transfer full): the object instance
74 * Since: 2.80
75 */
76 typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
77
78 /**
79 * GI_IS_OBJECT_INFO:
80 * @info: an info structure
81 *
82 * Checks if @info is a [class@GIRepository.ObjectInfo].
83 *
84 * Since: 2.80
85 */
86 #define GI_IS_OBJECT_INFO(info) \
87 (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_OBJECT)
88
89
90 GI_AVAILABLE_IN_ALL
91 const gchar * gi_object_info_get_type_name (GIObjectInfo *info);
92
93 GI_AVAILABLE_IN_ALL
94 const gchar * gi_object_info_get_type_init_function_name (GIObjectInfo *info);
95
96 GI_AVAILABLE_IN_ALL
97 gboolean gi_object_info_get_abstract (GIObjectInfo *info);
98
99 GI_AVAILABLE_IN_ALL
100 gboolean gi_object_info_get_final (GIObjectInfo *info);
101
102 GI_AVAILABLE_IN_ALL
103 gboolean gi_object_info_get_fundamental (GIObjectInfo *info);
104
105 GI_AVAILABLE_IN_ALL
106 GIObjectInfo * gi_object_info_get_parent (GIObjectInfo *info);
107
108 GI_AVAILABLE_IN_ALL
109 guint gi_object_info_get_n_interfaces (GIObjectInfo *info);
110
111 GI_AVAILABLE_IN_ALL
112 GIInterfaceInfo * gi_object_info_get_interface (GIObjectInfo *info,
113 guint n);
114
115 GI_AVAILABLE_IN_ALL
116 guint gi_object_info_get_n_fields (GIObjectInfo *info);
117
118 GI_AVAILABLE_IN_ALL
119 GIFieldInfo * gi_object_info_get_field (GIObjectInfo *info,
120 guint n);
121
122 GI_AVAILABLE_IN_ALL
123 guint gi_object_info_get_n_properties (GIObjectInfo *info);
124
125 GI_AVAILABLE_IN_ALL
126 GIPropertyInfo * gi_object_info_get_property (GIObjectInfo *info,
127 guint n);
128
129 GI_AVAILABLE_IN_ALL
130 guint gi_object_info_get_n_methods (GIObjectInfo *info);
131
132 GI_AVAILABLE_IN_ALL
133 GIFunctionInfo * gi_object_info_get_method (GIObjectInfo *info,
134 guint n);
135
136 GI_AVAILABLE_IN_ALL
137 GIFunctionInfo * gi_object_info_find_method (GIObjectInfo *info,
138 const gchar *name);
139
140
141 GI_AVAILABLE_IN_ALL
142 GIFunctionInfo * gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
143 const gchar *name,
144 GIObjectInfo **implementor);
145
146
147 GI_AVAILABLE_IN_ALL
148 guint gi_object_info_get_n_signals (GIObjectInfo *info);
149
150 GI_AVAILABLE_IN_ALL
151 GISignalInfo * gi_object_info_get_signal (GIObjectInfo *info,
152 guint n);
153
154
155 GI_AVAILABLE_IN_ALL
156 GISignalInfo * gi_object_info_find_signal (GIObjectInfo *info,
157 const gchar *name);
158
159
160 GI_AVAILABLE_IN_ALL
161 guint gi_object_info_get_n_vfuncs (GIObjectInfo *info);
162
163 GI_AVAILABLE_IN_ALL
164 GIVFuncInfo * gi_object_info_get_vfunc (GIObjectInfo *info,
165 guint n);
166
167 GI_AVAILABLE_IN_ALL
168 GIVFuncInfo * gi_object_info_find_vfunc (GIObjectInfo *info,
169 const gchar *name);
170
171 GI_AVAILABLE_IN_ALL
172 GIVFuncInfo * gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
173 const gchar *name,
174 GIObjectInfo **implementor);
175
176 GI_AVAILABLE_IN_ALL
177 guint gi_object_info_get_n_constants (GIObjectInfo *info);
178
179 GI_AVAILABLE_IN_ALL
180 GIConstantInfo * gi_object_info_get_constant (GIObjectInfo *info,
181 guint n);
182
183 GI_AVAILABLE_IN_ALL
184 GIStructInfo * gi_object_info_get_class_struct (GIObjectInfo *info);
185
186
187 GI_AVAILABLE_IN_ALL
188 const char * gi_object_info_get_ref_function_name (GIObjectInfo *info);
189
190 GI_AVAILABLE_IN_ALL
191 GIObjectInfoRefFunction gi_object_info_get_ref_function_pointer (GIObjectInfo *info);
192
193
194 GI_AVAILABLE_IN_ALL
195 const char * gi_object_info_get_unref_function_name (GIObjectInfo *info);
196
197 GI_AVAILABLE_IN_ALL
198 GIObjectInfoUnrefFunction gi_object_info_get_unref_function_pointer (GIObjectInfo *info);
199
200
201 GI_AVAILABLE_IN_ALL
202 const char * gi_object_info_get_set_value_function_name (GIObjectInfo *info);
203
204 GI_AVAILABLE_IN_ALL
205 GIObjectInfoSetValueFunction gi_object_info_get_set_value_function_pointer (GIObjectInfo *info);
206
207
208 GI_AVAILABLE_IN_ALL
209 const char * gi_object_info_get_get_value_function_name (GIObjectInfo *info);
210
211 GI_AVAILABLE_IN_ALL
212 GIObjectInfoGetValueFunction gi_object_info_get_get_value_function_pointer (GIObjectInfo *info);
213
214
215 G_END_DECLS