summaryrefslogtreecommitdiff
path: root/pygobject.h
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-09-14 17:14:11 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-09-14 17:14:11 +0000
commitcc1f40213f8c52d4640dc95c3ec4b2e102eee23a (patch)
tree6e6cb0353af5e7f704a602bfe33042235cd089b7 /pygobject.h
parent788ebea96387228f75f40474b0102ba3adc29a33 (diff)
downloadpygtk-cc1f40213f8c52d4640dc95c3ec4b2e102eee23a.tar.gz
add test use of add_constants.
2001-09-15 James Henstridge <james@daa.com.au> * gtk/gtkmodule.c (init_gtk): add test use of add_constants. * pygobject.h (_PyGObject_Functions): add new functions to header. * gobjectmodule.c (pyg_enum_add_constants): new function for adding constants to a module dictionary from a particular GType. (pyg_flags_add_constants): similar for flag types. (functions): add to export function vtable.
Diffstat (limited to 'pygobject.h')
-rw-r--r--pygobject.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pygobject.h b/pygobject.h
index 61d579fe..db8e2848 100644
--- a/pygobject.h
+++ b/pygobject.h
@@ -55,6 +55,11 @@ struct _PyGObject_Functions {
GType boxed_type, PyExtensionClass *ec);
PyObject *(* boxed_new)(GType boxed_type, gpointer boxed,
gboolean copy_boxed, gboolean own_ref);
+
+ void (* enum_add_constants)(PyObject *module, GType enum_type,
+ const gchar *strip_prefix);
+ void (* flags_add_constants)(PyObject *module, GType flags_type,
+ const gchar *strip_prefix);
};
#ifndef _INSIDE_PYGOBJECT_
@@ -80,6 +85,8 @@ struct _PyGObject_Functions *_PyGObject_API;
#define PyGBoxed_Type (*_PyGObject_API->boxed_type)
#define pyg_register_boxed (_PyGObject_API->register_boxed)
#define pyg_boxed_new (_PyGObject_API->boxed_new)
+#define pyg_enum_add_constants (_PyGObject_API->enum_add_constants)
+#define pyg_flags_add_constants (_PyGObject_API->flags_add_constants)
#define init_pygobject() { \
PyObject *gobject = PyImport_ImportModule("gobject"); \