summaryrefslogtreecommitdiff
path: root/girepository/gitypelib-internal.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/gitypelib-internal.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/gitypelib-internal.h')
-rw-r--r--girepository/gitypelib-internal.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/girepository/gitypelib-internal.h b/girepository/gitypelib-internal.h
index d4577acc..981f7b48 100644
--- a/girepository/gitypelib-internal.h
+++ b/girepository/gitypelib-internal.h
@@ -72,6 +72,11 @@ G_BEGIN_DECLS
/*
TYPELIB HISTORY
-----
+
+Version 1.1
+- Add ref/unref/set-value/get-value functions to Object, to be able
+ to support instantiatable fundamental types which are not GObject based.
+
Version 1.0
- Rename class_struct to gtype_struct, add to interfaces
@@ -918,6 +923,8 @@ typedef struct {
/**
* ObjectBlob:
* @blob_type: #BLOB_TYPE_OBJECT
+ * @fundamental: this object is not a GObject derived type, instead it's
+ * an additional fundamental type.
* @gtype_name: String name of the associated #GType
* @gtype_init: String naming the symbol which gets the runtime #GType
* @parent: The directory index of the parent type. This is only set for
@@ -938,12 +945,21 @@ typedef struct {
* @signals: Describes the signals.
* @vfuncs: Describes the virtual functions.
* @constants: Describes the constants.
+ * @ref_func: String pointing to a function which can be called to increase
+ * the reference count for an instance of this object type.
+ * @unref_func: String pointing to a function which can be called to decrease
+ * the reference count for an instance of this object type.
+ * @set_value_func: String pointing to a function which can be called to
+ * convert a pointer of this object to a GValue
+ * @get_value_func: String pointing to a function which can be called to
+ * convert extract a pointer to this object from a GValue
*/
typedef struct {
guint16 blob_type; /* 7 */
guint16 deprecated : 1;
guint16 abstract : 1;
- guint16 reserved :14;
+ guint16 fundamental : 1;
+ guint16 reserved :13;
guint32 name;
guint32 gtype_name;
@@ -961,6 +977,11 @@ typedef struct {
guint16 n_constants;
guint16 reserved2;
+ guint32 ref_func;
+ guint32 unref_func;
+ guint32 set_value_func;
+ guint32 get_value_func;
+
guint32 reserved3;
guint32 reserved4;