summaryrefslogtreecommitdiff
path: root/gi/pygflags.h
diff options
context:
space:
mode:
Diffstat (limited to 'gi/pygflags.h')
-rw-r--r--gi/pygflags.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gi/pygflags.h b/gi/pygflags.h
index 3c7b0e82..9555b945 100644
--- a/gi/pygflags.h
+++ b/gi/pygflags.h
@@ -20,6 +20,27 @@
#ifndef __PYGOBJECT_FLAGS_H__
#define __PYGOBJECT_FLAGS_H__
+extern GQuark pygflags_class_key;
+
+typedef struct {
+ PYGLIB_PyLongObject parent;
+ int zero_pad; /* must always be 0 */
+ GType gtype;
+} PyGFlags;
+
+extern PyTypeObject PyGFlags_Type;
+
+#define PyGFlags_Check(x) (PyObject_IsInstance((PyObject *)x, (PyObject *)&PyGFlags_Type) && g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_FLAGS))
+
+extern PyObject * pyg_flags_add (PyObject * module,
+ const char * type_name,
+ const char * strip_prefix,
+ GType gtype);
+extern PyObject * pyg_flags_from_gtype (GType gtype,
+ guint value);
+
+gint pyg_flags_get_value (GType flag_type, PyObject *obj, guint *val);
+
void pygobject_flags_register_types(PyObject *d);
#endif /* __PYGOBJECT_FLAGS_H__ */