summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/helpers.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-05-11 21:33:36 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-05-11 21:33:36 (GMT)
commitd2861533cc53fbcc217048bafebf34b1f70ba3aa (patch)
tree28c847a8093761fcaa0916be54445328d843096d /plugins/pychrysalide/helpers.c
parent6c9e1b5f7ee0915036d47b83f1e34b87b44b1723 (diff)
Updated the API for buffer caches.
Diffstat (limited to 'plugins/pychrysalide/helpers.c')
-rw-r--r--plugins/pychrysalide/helpers.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/pychrysalide/helpers.c b/plugins/pychrysalide/helpers.c
index 47285f0..5e911ea 100644
--- a/plugins/pychrysalide/helpers.c
+++ b/plugins/pychrysalide/helpers.c
@@ -916,6 +916,51 @@ bool register_interface_for_pygobject(PyObject *dict, GType gtype, PyTypeObject
* Paramètres : dict = dictionnaire où conserver une référence au type créé.*
* gtype = type dans sa version GLib. *
* type = type dans sa version Python. *
+* *
+* Description : Enregistre correctement une interface GObject pour Python. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool register_interface_for_pygobject_2(PyObject *dict, GType gtype, PyTypeObject *type, const GInterfaceInfo *info)
+{
+ bool result; /* Bilan à retourner */
+ char *name; /* Désignation de la classe */
+
+ assert(gtype != G_TYPE_INVALID);
+
+ name = strrchr(type->tp_name, '.');
+ assert(name != NULL);
+
+ name++;
+
+ pyg_register_interface(dict, name, gtype, type);
+
+ pyg_register_interface_info(gtype, info);
+
+ if (startswith(type->tp_name, "pychrysalide."))
+ {
+ define_auto_documentation(type);
+
+ result = include_python_type_into_features(dict, type);
+
+ }
+ else
+ result = true;
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : dict = dictionnaire où conserver une référence au type créé.*
+* gtype = type dans sa version GLib. *
+* type = type dans sa version Python. *
* base = type de base de l'objet. *
* *
* Description : Enregistre un type Python dérivant d'un type GLib dynamique. *