Branch and submit for IVI panda
[profile/ivi/gobject-introspection.git] / girepository / giobjectinfo.h
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  * 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.
11  *
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.
16  *
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.
21  */
22
23 #ifndef __GIOBJECTINFO_H__
24 #define __GIOBJECTINFO_H__
25
26 #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
27 #error "Only <girepository.h> can be included directly."
28 #endif
29
30 #include <gitypes.h>
31
32 G_BEGIN_DECLS
33
34 /**
35  * GIObjectInfoRefFunction: (skip)
36  * @object: object instance pointer
37  *
38  * Increases the reference count of an object instance.
39  *
40  * Returns: (transfer full): the object instance
41  */
42 typedef void * (*GIObjectInfoRefFunction) (void *object);
43
44 /**
45  * GIObjectInfoUnrefFunction: (skip)
46  * @object: object instance pointer
47  *
48  * Decreases the reference count of an object instance.
49  *
50  */
51 typedef void   (*GIObjectInfoUnrefFunction) (void *object);
52
53 /**
54  * GIObjectInfoSetValueFunction: (skip)
55  * @value: a #GValue
56  * @object: object instance pointer
57  *
58  * Update @value and attach the object instance pointer @object to it.
59  *
60  */
61 typedef void   (*GIObjectInfoSetValueFunction) (GValue *value, void *object);
62
63 /**
64  * GIObjectInfoGetValueFunction: (skip)
65  * @value: a #GValue
66  *
67  * Extract an object instance out of @value
68  *
69  * Returns: (transfer full): the object instance
70  */
71 typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
72
73 #define GI_IS_OBJECT_INFO(info) \
74     (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_OBJECT)
75
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,
83                                                   gint          n);
84 gint              g_object_info_get_n_fields     (GIObjectInfo *info);
85 GIFieldInfo *     g_object_info_get_field        (GIObjectInfo *info,
86                                                   gint          n);
87 gint              g_object_info_get_n_properties (GIObjectInfo *info);
88 GIPropertyInfo *  g_object_info_get_property     (GIObjectInfo *info,
89                                                   gint          n);
90 gint              g_object_info_get_n_methods    (GIObjectInfo *info);
91 GIFunctionInfo *  g_object_info_get_method       (GIObjectInfo *info,
92                                                   gint          n);
93 GIFunctionInfo *  g_object_info_find_method      (GIObjectInfo *info,
94                                                   const gchar  *name);
95
96 GIFunctionInfo *  g_object_info_find_method_using_interfaces (GIObjectInfo  *info,
97                                                               const gchar   *name,
98                                                               GIObjectInfo **implementor);
99
100 gint              g_object_info_get_n_signals    (GIObjectInfo *info);
101 GISignalInfo *    g_object_info_get_signal       (GIObjectInfo *info,
102                                                   gint          n);
103
104 GISignalInfo *    g_object_info_find_signal      (GIObjectInfo *info,
105                                                   const gchar  *name);
106
107 gint              g_object_info_get_n_vfuncs     (GIObjectInfo *info);
108 GIVFuncInfo *     g_object_info_get_vfunc        (GIObjectInfo *info,
109                                                   gint          n);
110 GIVFuncInfo *     g_object_info_find_vfunc       (GIObjectInfo *info,
111                                                   const gchar  *name);
112 GIVFuncInfo *     g_object_info_find_vfunc_using_interfaces (GIObjectInfo  *info,
113                                                                 const gchar   *name,
114                                                                 GIObjectInfo **implementor);
115 gint              g_object_info_get_n_constants  (GIObjectInfo *info);
116 GIConstantInfo *  g_object_info_get_constant     (GIObjectInfo *info,
117                                                   gint          n);
118 GIStructInfo *    g_object_info_get_class_struct (GIObjectInfo *info);
119
120 const char *                 g_object_info_get_ref_function               (GIObjectInfo *info);
121 GIObjectInfoRefFunction      g_object_info_get_ref_function_pointer       (GIObjectInfo *info);
122
123 const char *                 g_object_info_get_unref_function             (GIObjectInfo *info);
124 GIObjectInfoUnrefFunction    g_object_info_get_unref_function_pointer     (GIObjectInfo *info);
125
126 const char *                 g_object_info_get_set_value_function         (GIObjectInfo *info);
127 GIObjectInfoSetValueFunction g_object_info_get_set_value_function_pointer (GIObjectInfo *info);
128
129 const char *                 g_object_info_get_get_value_function         (GIObjectInfo *info);
130 GIObjectInfoGetValueFunction g_object_info_get_get_value_function_pointer (GIObjectInfo *info);
131
132
133 G_END_DECLS
134
135
136 #endif  /* __GIOBJECTINFO_H__ */
137