1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * GObject introspection: Object
4 * Copyright (C) 2005 Matthias Clasen
5 * Copyright (C) 2008,2009 Red Hat, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __GIOBJECTINFO_H__
24 #define __GIOBJECTINFO_H__
26 #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
27 #error "Only <girepository.h> can be included directly."
35 * GIObjectInfoRefFunction: (skip)
36 * @object: object instance pointer
38 * Increases the reference count of an object instance.
40 * Returns: (transfer full): the object instance
42 typedef void * (*GIObjectInfoRefFunction) (void *object);
45 * GIObjectInfoUnrefFunction: (skip)
46 * @object: object instance pointer
48 * Decreases the reference count of an object instance.
51 typedef void (*GIObjectInfoUnrefFunction) (void *object);
54 * GIObjectInfoSetValueFunction: (skip)
56 * @object: object instance pointer
58 * Update @value and attach the object instance pointer @object to it.
61 typedef void (*GIObjectInfoSetValueFunction) (GValue *value, void *object);
64 * GIObjectInfoGetValueFunction: (skip)
67 * Extract an object instance out of @value
69 * Returns: (transfer full): the object instance
71 typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
73 #define GI_IS_OBJECT_INFO(info) \
74 (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_OBJECT)
76 const gchar * g_object_info_get_type_name (GIObjectInfo *info);
77 const gchar * g_object_info_get_type_init (GIObjectInfo *info);
78 gboolean g_object_info_get_abstract (GIObjectInfo *info);
79 gboolean g_object_info_get_fundamental (GIObjectInfo *info);
80 GIObjectInfo * g_object_info_get_parent (GIObjectInfo *info);
81 gint g_object_info_get_n_interfaces (GIObjectInfo *info);
82 GIInterfaceInfo * g_object_info_get_interface (GIObjectInfo *info,
84 gint g_object_info_get_n_fields (GIObjectInfo *info);
85 GIFieldInfo * g_object_info_get_field (GIObjectInfo *info,
87 gint g_object_info_get_n_properties (GIObjectInfo *info);
88 GIPropertyInfo * g_object_info_get_property (GIObjectInfo *info,
90 gint g_object_info_get_n_methods (GIObjectInfo *info);
91 GIFunctionInfo * g_object_info_get_method (GIObjectInfo *info,
93 GIFunctionInfo * g_object_info_find_method (GIObjectInfo *info,
96 GIFunctionInfo * g_object_info_find_method_using_interfaces (GIObjectInfo *info,
98 GIObjectInfo **implementor);
100 gint g_object_info_get_n_signals (GIObjectInfo *info);
101 GISignalInfo * g_object_info_get_signal (GIObjectInfo *info,
104 GISignalInfo * g_object_info_find_signal (GIObjectInfo *info,
107 gint g_object_info_get_n_vfuncs (GIObjectInfo *info);
108 GIVFuncInfo * g_object_info_get_vfunc (GIObjectInfo *info,
110 GIVFuncInfo * g_object_info_find_vfunc (GIObjectInfo *info,
112 GIVFuncInfo * g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
114 GIObjectInfo **implementor);
115 gint g_object_info_get_n_constants (GIObjectInfo *info);
116 GIConstantInfo * g_object_info_get_constant (GIObjectInfo *info,
118 GIStructInfo * g_object_info_get_class_struct (GIObjectInfo *info);
120 const char * g_object_info_get_ref_function (GIObjectInfo *info);
121 GIObjectInfoRefFunction g_object_info_get_ref_function_pointer (GIObjectInfo *info);
123 const char * g_object_info_get_unref_function (GIObjectInfo *info);
124 GIObjectInfoUnrefFunction g_object_info_get_unref_function_pointer (GIObjectInfo *info);
126 const char * g_object_info_get_set_value_function (GIObjectInfo *info);
127 GIObjectInfoSetValueFunction g_object_info_get_set_value_function_pointer (GIObjectInfo *info);
129 const char * g_object_info_get_get_value_function (GIObjectInfo *info);
130 GIObjectInfoGetValueFunction g_object_info_get_get_value_function_pointer (GIObjectInfo *info);
136 #endif /* __GIOBJECTINFO_H__ */