summaryrefslogtreecommitdiff
path: root/pygobject.h
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-06-22 12:37:54 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-06-22 12:37:54 +0000
commit0612a60ce2a068bebd5d28908aa9fb5959d7d410 (patch)
tree54a8a976799e3ba953aeab3b675ac1d8265bd824 /pygobject.h
parentc23e315656f340756cc44bdb5d43c2fcdc01f0ce (diff)
downloadpygtk-0612a60ce2a068bebd5d28908aa9fb5959d7d410.tar.gz
new arg type for GType and GtkType args that uses pyg_type_from_object.
2001-06-22 James Henstridge <james@daa.com.au> * codegen/argtypes.py (GTypeArg.write_param): new arg type for GType and GtkType args that uses pyg_type_from_object. * gobjectmodule.c (pyg_type_from_object): new function to get a type code from various types of python objects (currently, integer like objects, strings and other objects that have a __gtype__ attribute). (pygobject__init__): use pyg_type_from_object to get the object type. (pyg_signal_new): same here. 2001-06-21 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_boxed_getattro): allow getattr to work on PyGBoxed types (while not overloading tp_getattr). We fall back to tp_getattr if provided by the boxed type. (pyg_register_boxed): make sure tp_getattro is set correctly. * gtk/gtk-types.c (_pygtk_register_boxed_types): convert GtkAccelGroup to a PyGBoxed type.
Diffstat (limited to 'pygobject.h')
-rw-r--r--pygobject.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pygobject.h b/pygobject.h
index f2d15fe8..271ba4dc 100644
--- a/pygobject.h
+++ b/pygobject.h
@@ -35,6 +35,7 @@ struct _PyGObject_Functions {
void (* register_wrapper)(PyObject *self);
PyExtensionClass *(* lookup_class)(GType type);
PyObject *(* new)(GObject *obj);
+ GType (* type_from_object)(PyObject *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,
@@ -64,12 +65,15 @@ struct _PyGObject_Functions *_PyGObject_API;
#define pygobject_register_wrapper (_PyGObject_API->register_wrapper)
#define pygobject_lookup_class (_PyGObject_API->lookup_class)
#define pygobject_new (_PyGObject_API->new)
+#define pyg_type_from_object (_PyGObject_API->type_from_object)
#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)
#define pyg_register_interface (_PyGObject_API->register_interface)
+#define pyg_register_boxed (_PyGObject_API->register_boxed)
+#define pyg_boxed_new (_PyGObject_API->boxed_new)
#define init_pygobject() { \
PyObject *gobject = PyImport_ImportModule("gobject"); \