giobjectinfo.h 5.92 KB
Newer Older
1 2
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
 * GObject introspection: Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 *
 * Copyright (C) 2005 Matthias Clasen
 * Copyright (C) 2008,2009 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GIOBJECTINFO_H__
#define __GIOBJECTINFO_H__

#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
#error "Only <girepository.h> can be included directly."
#endif

#include <gitypes.h>

G_BEGIN_DECLS

34
/**
35
 * GIObjectInfoRefFunction: (skip)
36 37 38 39
 * @object: object instance pointer
 *
 * Increases the reference count of an object instance.
 *
40
 * Returns: (transfer full): the object instance
41 42 43 44
 */
typedef void * (*GIObjectInfoRefFunction) (void *object);

/**
45
 * GIObjectInfoUnrefFunction: (skip)
46 47 48 49 50 51 52
 * @object: object instance pointer
 *
 * Decreases the reference count of an object instance.
 */
typedef void   (*GIObjectInfoUnrefFunction) (void *object);

/**
53
 * GIObjectInfoSetValueFunction: (skip)
54 55 56 57 58 59 60 61
 * @value: a #GValue
 * @object: object instance pointer
 *
 * Update @value and attach the object instance pointer @object to it.
 */
typedef void   (*GIObjectInfoSetValueFunction) (GValue *value, void *object);

/**
62
 * GIObjectInfoGetValueFunction: (skip)
63 64 65 66
 * @value: a #GValue
 *
 * Extract an object instance out of @value
 *
67
 * Returns: (transfer full): the object instance
68 69 70
 */
typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);

71 72 73 74 75 76
/**
 * GI_IS_OBJECT_INFO
 * @info: an info structure
 *
 * Checks if @info is a #GIObjectInfo.
 */
77 78 79
#define GI_IS_OBJECT_INFO(info) \
    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_OBJECT)

80 81

GI_AVAILABLE_IN_ALL
82
const gchar *     g_object_info_get_type_name	 (GIObjectInfo *info);
83 84

GI_AVAILABLE_IN_ALL
85
const gchar *     g_object_info_get_type_init	 (GIObjectInfo *info);
86 87

GI_AVAILABLE_IN_ALL
88
gboolean          g_object_info_get_abstract     (GIObjectInfo *info);
89 90

GI_AVAILABLE_IN_ALL
91
gboolean          g_object_info_get_fundamental  (GIObjectInfo *info);
92 93

GI_AVAILABLE_IN_ALL
94
GIObjectInfo *    g_object_info_get_parent       (GIObjectInfo *info);
95 96

GI_AVAILABLE_IN_ALL
97
gint              g_object_info_get_n_interfaces (GIObjectInfo *info);
98 99

GI_AVAILABLE_IN_ALL
100 101
GIInterfaceInfo * g_object_info_get_interface    (GIObjectInfo *info,
						  gint          n);
102 103

GI_AVAILABLE_IN_ALL
104
gint              g_object_info_get_n_fields     (GIObjectInfo *info);
105 106

GI_AVAILABLE_IN_ALL
107 108
GIFieldInfo *     g_object_info_get_field        (GIObjectInfo *info,
						  gint          n);
109 110

GI_AVAILABLE_IN_ALL
111
gint              g_object_info_get_n_properties (GIObjectInfo *info);
112 113

GI_AVAILABLE_IN_ALL
114 115
GIPropertyInfo *  g_object_info_get_property     (GIObjectInfo *info,
						  gint          n);
116 117

GI_AVAILABLE_IN_ALL
118
gint              g_object_info_get_n_methods    (GIObjectInfo *info);
119 120

GI_AVAILABLE_IN_ALL
121 122
GIFunctionInfo *  g_object_info_get_method       (GIObjectInfo *info,
						  gint          n);
123 124

GI_AVAILABLE_IN_ALL
125 126
GIFunctionInfo *  g_object_info_find_method      (GIObjectInfo *info,
						  const gchar  *name);
127

128 129

GI_AVAILABLE_IN_ALL
130 131 132 133
GIFunctionInfo *  g_object_info_find_method_using_interfaces (GIObjectInfo  *info,
							      const gchar   *name,
							      GIObjectInfo **implementor);

134 135

GI_AVAILABLE_IN_ALL
136
gint              g_object_info_get_n_signals    (GIObjectInfo *info);
137 138

GI_AVAILABLE_IN_ALL
139 140
GISignalInfo *    g_object_info_get_signal       (GIObjectInfo *info,
						  gint          n);
141

142 143

GI_AVAILABLE_IN_ALL
144 145 146
GISignalInfo *    g_object_info_find_signal      (GIObjectInfo *info,
						  const gchar  *name);

147 148

GI_AVAILABLE_IN_ALL
149
gint              g_object_info_get_n_vfuncs     (GIObjectInfo *info);
150 151

GI_AVAILABLE_IN_ALL
152 153
GIVFuncInfo *     g_object_info_get_vfunc        (GIObjectInfo *info,
						  gint          n);
154 155

GI_AVAILABLE_IN_ALL
156 157
GIVFuncInfo *     g_object_info_find_vfunc       (GIObjectInfo *info,
                                                  const gchar  *name);
158 159

GI_AVAILABLE_IN_1_32
160 161 162
GIVFuncInfo *     g_object_info_find_vfunc_using_interfaces (GIObjectInfo  *info,
								const gchar   *name,
								GIObjectInfo **implementor);
163 164

GI_AVAILABLE_IN_ALL
165
gint              g_object_info_get_n_constants  (GIObjectInfo *info);
166 167

GI_AVAILABLE_IN_ALL
168 169
GIConstantInfo *  g_object_info_get_constant     (GIObjectInfo *info,
						  gint          n);
170 171

GI_AVAILABLE_IN_ALL
172 173
GIStructInfo *    g_object_info_get_class_struct (GIObjectInfo *info);

174 175

GI_AVAILABLE_IN_ALL
176
const char *                 g_object_info_get_ref_function               (GIObjectInfo *info);
177 178

GI_AVAILABLE_IN_ALL
179 180
GIObjectInfoRefFunction      g_object_info_get_ref_function_pointer       (GIObjectInfo *info);

181 182

GI_AVAILABLE_IN_ALL
183
const char *                 g_object_info_get_unref_function             (GIObjectInfo *info);
184 185

GI_AVAILABLE_IN_ALL
186 187
GIObjectInfoUnrefFunction    g_object_info_get_unref_function_pointer     (GIObjectInfo *info);

188 189

GI_AVAILABLE_IN_ALL
190
const char *                 g_object_info_get_set_value_function         (GIObjectInfo *info);
191 192

GI_AVAILABLE_IN_ALL
193 194
GIObjectInfoSetValueFunction g_object_info_get_set_value_function_pointer (GIObjectInfo *info);

195 196

GI_AVAILABLE_IN_ALL
197
const char *                 g_object_info_get_get_value_function         (GIObjectInfo *info);
198 199

GI_AVAILABLE_IN_ALL
200 201
GIObjectInfoGetValueFunction g_object_info_get_get_value_function_pointer (GIObjectInfo *info);

202 203 204 205 206 207

G_END_DECLS


#endif  /* __GIOBJECTINFO_H__ */