summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/gui/panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/gui/panel.c')
-rw-r--r--plugins/pychrysalide/gui/panel.c90
1 files changed, 90 insertions, 0 deletions
diff --git a/plugins/pychrysalide/gui/panel.c b/plugins/pychrysalide/gui/panel.c
index 160a7a3..2afb2a1 100644
--- a/plugins/pychrysalide/gui/panel.c
+++ b/plugins/pychrysalide/gui/panel.c
@@ -82,6 +82,12 @@ static PyObject *py_panel_item_dock(PyObject *, PyObject *);
/* Supprime un panneau de l'ensemble affiché. */
static PyObject *py_panel_item_undock(PyObject *, PyObject *);
+/* Bascule l'affichage d'un panneau après sa mise à jour. */
+static PyObject *py_panel_item_switch_to_updated_content(PyObject *, PyObject *);
+
+/* Bascule l'affichage d'un panneau avant sa mise à jour. */
+static PyObject *py_panel_item_switch_to_updating_mask(PyObject *, PyObject *);
+
/* Fournit une indication sur la personnalité du panneau. */
static PyObject *py_panel_item_get_personality(PyObject *, void *);
@@ -670,6 +676,88 @@ static PyObject *py_panel_item_undock(PyObject *self, PyObject *args)
/******************************************************************************
* *
+* Paramètres : self = panneau ciblé par une mise à jour. *
+* args = arguments fournis à l'appel. *
+* *
+* Description : Bascule l'affichage d'un panneau avant sa mise à jour. *
+* *
+* Retour : Py_None. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_panel_item_switch_to_updating_mask(PyObject *self, PyObject *args)
+{
+ GPanelItem *item; /* Panneau à manipuler */
+
+#define PANEL_ITEM_SWITCH_TO_UPDATING_MASK_METHOD PYTHON_METHOD_DEF \
+( \
+ switch_to_updating_mask, "$self, /", \
+ METH_NOARGS, py_panel_item, \
+ "Switch the panel content display before its update." \
+ "\n" \
+ "The *Gtk.Builder* helper linked to the panel has to define the" \
+ " following widgets:\n" \
+ "* 'stack': a *Gtk.Stack* instance containing the other widget;\n" \
+ "* 'content': the main *Gtk.Widget* used to show the main panel" \
+ " content;\n" \
+ "* 'mask': a widget displayed during computing, like a" \
+ " *Gtk.Spinner* instance." \
+)
+
+ item = G_PANEL_ITEM(pygobject_get(self));
+
+ g_panel_item_switch_to_updating_mask(item);
+
+ Py_RETURN_NONE;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : self = panneau ciblé par une mise à jour. *
+* args = arguments fournis à l'appel. *
+* *
+* Description : Bascule l'affichage d'un panneau après sa mise à jour. *
+* *
+* Retour : Py_None. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_panel_item_switch_to_updated_content(PyObject *self, PyObject *args)
+{
+ GPanelItem *item; /* Panneau à manipuler */
+
+#define PANEL_ITEM_SWITCH_TO_UPDATED_CONTENT_METHOD PYTHON_METHOD_DEF \
+( \
+ switch_to_updated_content, "$self, /", \
+ METH_NOARGS, py_panel_item, \
+ "Switch the panel content display after its update." \
+ "\n" \
+ "The *Gtk.Builder* helper linked to the panel has to define the" \
+ " following widgets:\n" \
+ "* 'stack': a *Gtk.Stack* instance containing the other widget;\n" \
+ "* 'content': the main *Gtk.Widget* used to show the main panel" \
+ " content;\n" \
+ "* 'mask': a widget displayed during computing, like a" \
+ " *Gtk.Spinner* instance." \
+)
+
+ item = G_PANEL_ITEM(pygobject_get(self));
+
+ g_panel_item_switch_to_updated_content(item);
+
+ Py_RETURN_NONE;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : self = objet Python concerné par l'appel. *
* closure = non utilisé ici. *
* *
@@ -1023,6 +1111,8 @@ PyTypeObject *get_python_panel_item_type(void)
static PyMethodDef py_panel_item_methods[] = {
PANEL_ITEM_DOCK_METHOD,
PANEL_ITEM_UNDOCK_METHOD,
+ PANEL_ITEM_SWITCH_TO_UPDATING_MASK_METHOD,
+ PANEL_ITEM_SWITCH_TO_UPDATED_CONTENT_METHOD,
{ NULL }
};