summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/gui/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-08-15 12:52:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-08-15 12:52:38 (GMT)
commitab4d9d3afa6185275323a40729193102c99ea5c6 (patch)
tree06a6031560e53600dd0d959462e0b9b83b4c6ccd /plugins/pychrysalide/gui/core
parent16498486a454f6042b881b77e572f342decf5851 (diff)
Rebuilt the main interface using Glade.
Diffstat (limited to 'plugins/pychrysalide/gui/core')
-rw-r--r--plugins/pychrysalide/gui/core/global.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/pychrysalide/gui/core/global.c b/plugins/pychrysalide/gui/core/global.c
index 26d51cb..a3b62ee 100644
--- a/plugins/pychrysalide/gui/core/global.c
+++ b/plugins/pychrysalide/gui/core/global.c
@@ -25,6 +25,7 @@
#include "global.h"
+#include <assert.h>
#include <pygobject.h>
@@ -36,6 +37,9 @@
+/* Fournit l'adresse du constructeur principal de l'éditeur. */
+static PyObject *py_global_get_editor_builder(PyObject *, PyObject *);
+
/* Fournit l'adresse de la fenêtre principale de l'éditeur. */
static PyObject *py_global_get_editor_window(PyObject *, PyObject *);
@@ -49,6 +53,44 @@ static PyObject *py_global_get_current_content(PyObject *, PyObject *);
* Paramètres : self = objet Python concerné par l'appel. *
* args = non utilisé ici. *
* *
+* Description : Fournit l'adresse du constructeur principal de l'éditeur. *
+* *
+* Retour : Constructeur principal référencé. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_global_get_editor_builder(PyObject *self, PyObject *args)
+{
+ PyObject *result; /* Instance Python à retourner */
+ GtkBuilder *builder; /* Constructeur principal */
+
+#define GLOBAL_GET_EDITOR_BUILDER_METHOD PYTHON_METHOD_DEF \
+( \
+ get_editor_builder, "", \
+ METH_NOARGS, py_global, \
+ "Provide access to the Chrysalide main window builder.\n" \
+ "\n" \
+ "The result should be an instance of Gtk.Builder, never None." \
+)
+
+ builder = get_editor_builder();
+ assert(builder != NULL);
+
+ result = pygobject_new(G_OBJECT(builder));
+ g_object_unref(G_OBJECT(builder));
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : self = objet Python concerné par l'appel. *
+* args = non utilisé ici. *
+* *
* Description : Fournit l'adresse de la fenêtre principale de l'éditeur. *
* *
* Retour : Fenêtre principale référencée. *
@@ -150,6 +192,7 @@ bool populate_gui_core_module_with_global(void)
PyObject *module; /* Module à recompléter */
static PyMethodDef py_global_methods[] = {
+ GLOBAL_GET_EDITOR_BUILDER_METHOD,
GLOBAL_GET_EDITOR_WINDOW_METHOD,
GLOBAL_GET_CURRENT_CONTENT_METHOD,
{ NULL }