summaryrefslogtreecommitdiff
path: root/src/gtkext/gtkviewpanel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/gtkviewpanel.c')
-rw-r--r--src/gtkext/gtkviewpanel.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gtkext/gtkviewpanel.c b/src/gtkext/gtkviewpanel.c
index 40ae038..d434f1e 100644
--- a/src/gtkext/gtkviewpanel.c
+++ b/src/gtkext/gtkviewpanel.c
@@ -822,6 +822,43 @@ void gtk_view_panel_scroll_to_address(GtkViewPanel *panel, const vmpa2t *addr, S
/******************************************************************************
* *
+* 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_view_panel_get_position(const GtkViewPanel *panel, GBufferLine **line, GBufferSegment **segment)
+{
+ bool result; /* Bilan de l'opération */
+
+ if (GTK_VIEW_PANEL_GET_CLASS(panel)->get_position == NULL)
+ return false;
+
+ result = GTK_VIEW_PANEL_GET_CLASS(panel)->get_position(panel, line, segment);
+
+ if (result)
+ {
+ g_object_ref(G_OBJECT(*line));
+
+ if (segment != NULL && *segment != NULL)
+ g_object_ref(G_OBJECT(*segment));
+
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : panel = composant GTK à manipuler. *
* cairo = assistant pour la création de rendus. *
* area = taille de la surface réduite à disposition. *