summaryrefslogtreecommitdiff
path: root/src/gtkext/gtkdisplaypanel.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-01-31 22:50:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-01-31 22:50:42 (GMT)
commitf6eb49749d627de7d556139a392f73f0ca2862e8 (patch)
treedf84f4c54f9f4f59e9b392b66d4d3ee1ce8633c0 /src/gtkext/gtkdisplaypanel.c
parent7ba93e4d9e3e722d8771d665c5217510105375d2 (diff)
Provided the current active object in display panels.
Diffstat (limited to 'src/gtkext/gtkdisplaypanel.c')
-rw-r--r--src/gtkext/gtkdisplaypanel.c70
1 files changed, 30 insertions, 40 deletions
diff --git a/src/gtkext/gtkdisplaypanel.c b/src/gtkext/gtkdisplaypanel.c
index 989ca85..31b3b58 100644
--- a/src/gtkext/gtkdisplaypanel.c
+++ b/src/gtkext/gtkdisplaypanel.c
@@ -892,6 +892,36 @@ const vmpa2t *gtk_display_panel_get_caret_location(const GtkDisplayPanel *panel)
/******************************************************************************
* *
+* Paramètres : panel = composant GTK à consulter. *
+* *
+* Description : Fournit l'élément actif lié à la position courante. *
+* *
+* Retour : Objet actif courant ou NULL si aucun. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GObject *gtk_display_panel_get_active_object(const GtkDisplayPanel *panel)
+{
+ GObject *result; /* Trouvaille à retourner */
+
+ if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_active == NULL)
+ result = NULL;
+
+ else
+ result = GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_active(panel);
+
+ if (result != NULL)
+ g_object_ref(G_OBJECT(result));
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : panel = composant GTK à manipuler. *
* addr = adresse à présenter à l'écran. *
* tweak = adaptation finale à effectuer. *
@@ -994,46 +1024,6 @@ void gtk_display_panel_request_move(GtkDisplayPanel *panel, const vmpa2t *addr)
/******************************************************************************
* *
-* Paramètres : panel = composant GTK à consulter. *
-* line = ligne de tampon où se trouve le curseur. [OUT] *
-* segment = eventuel segment de ligne actif. [OUT] *
-* *
-* Description : Fournit des éléments liés à la position courante dans la vue.*
-* *
-* Retour : Bilan de l'opération. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool gtk_display_panel_get_position(const GtkDisplayPanel *panel, GBufferLine **line, GObject **creator)
-{
- bool result; /* Bilan de l'opération */
-
- *line = NULL;
- if (creator != NULL) *creator = NULL;
-
- if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_position == NULL)
- return false;
-
- result = GTK_DISPLAY_PANEL_GET_CLASS(panel)->get_position(panel, line, creator);
-
- if (result)
- {
- g_object_ref(G_OBJECT(*line));
-
- if (creator != NULL && *creator != NULL)
- g_object_ref(G_OBJECT(*creator));
-
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : panel = composant GTK à consulter. *
* event = informations liées à l'événement. *
* *