summaryrefslogtreecommitdiff
path: root/girepository/giobjectinfo.h
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-06-12 18:08:56 -0300
committerJohan Dahlin <johan@gnome.org>2010-07-09 10:15:45 -0300
commit1e9822c7817062a9b853269b9418fd78782090b5 (patch)
tree684a6bc8520db45c9d126d954d7b82921cb2a753 /girepository/giobjectinfo.h
parent017727630d09a854b1c1a4767066fb675b139de9 (diff)
downloadgobject-introspection-1e9822c7817062a9b853269b9418fd78782090b5.tar.gz
Add support for non-GObject fundamental objects
This patch adds support for instantiable fundamental object types, which are not GObject based. This is mostly interesting for being able to support GstMiniObject's which are extensivly used in GStreamer. Includes a big test case to the Everything module (inspired by GstMiniObject) which should be used by language bindings who wishes to test this functionallity. This patch increases the size of the typelib and breaks compatibility with older typelibs. https://bugzilla.gnome.org/show_bug.cgi?id=568913
Diffstat (limited to 'girepository/giobjectinfo.h')
-rw-r--r--girepository/giobjectinfo.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/girepository/giobjectinfo.h b/girepository/giobjectinfo.h
index 27ec7141..630def61 100644
--- a/girepository/giobjectinfo.h
+++ b/girepository/giobjectinfo.h
@@ -30,12 +30,52 @@
G_BEGIN_DECLS
+/**
+ * GIObjectInfoRefFunction:
+ * @object: object instance pointer
+ *
+ * Increases the reference count of an object instance.
+ *
+ * Returns: the object instance
+ */
+typedef void * (*GIObjectInfoRefFunction) (void *object);
+
+/**
+ * GIObjectInfoUnrefFunction:
+ * @object: object instance pointer
+ *
+ * Decreases the reference count of an object instance.
+ *
+ */
+typedef void (*GIObjectInfoUnrefFunction) (void *object);
+
+/**
+ * GIObjectInfoSetValueFunction:
+ * @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);
+
+/**
+ * GIObjectInfoGetValueFunction:
+ * @value: a #GValue
+ *
+ * Extract an object instance out of @value
+ *
+ * Returns: the object instance
+ */
+typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
+
#define GI_IS_OBJECT_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_OBJECT)
const gchar * g_object_info_get_type_name (GIObjectInfo *info);
const gchar * g_object_info_get_type_init (GIObjectInfo *info);
gboolean g_object_info_get_abstract (GIObjectInfo *info);
+gboolean g_object_info_get_fundamental (GIObjectInfo *info);
GIObjectInfo * g_object_info_get_parent (GIObjectInfo *info);
gint g_object_info_get_n_interfaces (GIObjectInfo *info);
GIInterfaceInfo * g_object_info_get_interface (GIObjectInfo *info,
@@ -64,6 +104,18 @@ GIConstantInfo * g_object_info_get_constant (GIObjectInfo *info,
gint n);
GIStructInfo * g_object_info_get_class_struct (GIObjectInfo *info);
+const char * g_object_info_get_ref_function (GIObjectInfo *info);
+GIObjectInfoRefFunction g_object_info_get_ref_function_pointer (GIObjectInfo *info);
+
+const char * g_object_info_get_unref_function (GIObjectInfo *info);
+GIObjectInfoUnrefFunction g_object_info_get_unref_function_pointer (GIObjectInfo *info);
+
+const char * g_object_info_get_set_value_function (GIObjectInfo *info);
+GIObjectInfoSetValueFunction g_object_info_get_set_value_function_pointer (GIObjectInfo *info);
+
+const char * g_object_info_get_get_value_function (GIObjectInfo *info);
+GIObjectInfoGetValueFunction g_object_info_get_get_value_function_pointer (GIObjectInfo *info);
+
G_END_DECLS