summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject.h
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2000-10-26 12:48:17 +0000
committerJames Henstridge <jamesh@src.gnome.org>2000-10-26 12:48:17 +0000
commit05fe6d04db97488157bf618fda5cdd3cc107abce (patch)
tree2ec27044806d250dd26b5f64ca1bf73c10ede404 /gobject/pygobject.h
parent4e562b13acd6918c1fb9909ae95067b1b91702b4 (diff)
downloadpygobject-05fe6d04db97488157bf618fda5cdd3cc107abce.tar.gz
pygobject-05fe6d04db97488157bf618fda5cdd3cc107abce.tar.xz
pygobject-05fe6d04db97488157bf618fda5cdd3cc107abce.zip
new function for registering functions to marshal boxed GValues to/from
2000-10-26 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_boxed_register): new function for registering functions to marshal boxed GValues to/from their python wrappers. (pyg_value_from_pyobject): add boxed support. (pyg_value_as_pyobject): add boxed support. (pyg_closure_new): new function to create a python GClosure. (pyg_closure_destroy): cleanup function for a PyGClosure. (pyg_closure_marshal): marshaler for PyGClosure. (pyg_value_as_pyobject): add const to GValue argument. * pygobject.h: export a pyg_boxed_register function to register new boxed types for use with pyg_value_from_pyobject and pyg_value_as_pyobject.
Diffstat (limited to 'gobject/pygobject.h')
-rw-r--r--gobject/pygobject.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index 62b1922..8823514 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -19,15 +19,18 @@ typedef struct {
#define pygobject_check(v,base) (ExtensionClassSubclassInstance_Check(v,base))
struct _PyGObject_Functions {
- void (* register_class)(PyObject *dict, const gchar *class_name,
- PyExtensionClass *ec, PyExtensionClass *parent);
- void (* register_wrapper)(PyObject *self);
- PyExtensionClass *(* lookup_class)(GType type);
- PyObject *(* new)(GObject *obj);
- gint (* enum_get_value)(GType enum_type, PyObject *obj, gint *val);
- gint (* flags_get_value)(GType flag_type, PyObject *obj, gint *val);
- int (* value_from_pyobject)(GValue *value, PyObject *obj);
- PyObject *(* value_as_pyobject)(GValue *value);
+ void (* register_class)(PyObject *dict, const gchar *class_name,
+ PyExtensionClass *ec, PyExtensionClass *parent);
+ void (* register_wrapper)(PyObject *self);
+ PyExtensionClass *(* lookup_class)(GType type);
+ PyObject *(* new)(GObject *obj);
+ gint (* enum_get_value)(GType enum_type, PyObject *obj, gint *val);
+ gint (* flags_get_value)(GType flag_type, PyObject *obj, gint *val);
+ void (* boxed_register)(GType boxed_type,
+ PyObject *(* from_func)(const GValue *value),
+ int (* to_func)(GValue *value, PyObject *obj));
+ int (* value_from_pyobject)(GValue *value, PyObject *obj);
+ PyObject *(* value_as_pyobject)(const GValue *value);
};
#ifndef _INSIDE_PYGOBJECT_
@@ -44,6 +47,7 @@ struct _PyGObject_Functions *_PyGObject_API;
#define pygobject_new (_PyGObject_API->new)
#define pyg_enum_get_value (_PyGObject_API->enum_get_value)
#define pyg_flags_get_value (_PyGObject_API->flags_get_value)
+#define pyg_boxed_register (_PyGObject_API->boxed_register)
#define pyg_value_from_pyobject (_PyGObject_API->value_from_pyobject)
#define pyg_value_as_pyobject (_PyGObject_API->value_as_pyobject)