summaryrefslogtreecommitdiff
path: root/src/glibext/bufferline.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-07-26 18:52:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-07-26 18:52:15 (GMT)
commita6c46fc296db67321db3d4bb586346998de90422 (patch)
tree042cd0fd89fd1f1c8943b3aefd2b50585f461f58 /src/glibext/bufferline.h
parent19516ffcca14abb082c5109125b7249bdc7fc199 (diff)
Reduced the quantity of arguments used to deal with lines.
Diffstat (limited to 'src/glibext/bufferline.h')
-rw-r--r--src/glibext/bufferline.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/glibext/bufferline.h b/src/glibext/bufferline.h
index 95db203..a7982d0 100644
--- a/src/glibext/bufferline.h
+++ b/src/glibext/bufferline.h
@@ -31,6 +31,7 @@
#include "gdisplayoptions.h"
#include "linesegment.h"
+#include "widthtracker.h"
#include "../analysis/content.h"
#include "../arch/vmpa.h"
@@ -172,14 +173,6 @@ void g_buffer_line_export(GBufferLine *, buffer_export_context *, BufferExportTy
/* ----------------------- MANIPULATION DES LARGEURS REQUISES ----------------------- */
-/* Mémorisation des largeurs pour un groupe de lignes */
-typedef struct _line_width_summary
-{
- gint max_widths[BLC_COUNT]; /* Taille cachée des colonnes */
- gint merged_width; /* Largeur cumulée avant fusion*/
-
-} line_width_summary;
-
/* Identification d'un contenu de colonne */
typedef struct _col_coord_t
{
@@ -192,26 +185,23 @@ typedef struct _col_coord_t
/* Fait remonter les largeurs requises par une ligne donnée. */
void g_buffer_line_collect_widths(GBufferLine *, line_width_summary *);
-/* Fournit la largeur d'une colonne finalement appliquée. */
-gint g_buffer_line_compute_max_width(const GBufferLine *, BufferLineColumn, const line_width_summary *, const line_width_summary *);
-
/* Fournit le segment présent à une position donnée. */
line_segment *g_buffer_line_get_segment_from_coord(const GBufferLine *, const col_coord_t *);
/* Fournit les coordonnées correspondant à une abscisse donnée. */
-bool g_buffer_line_get_coord_at(const GBufferLine *, const line_width_summary *, const GDisplayOptions *, const line_width_summary *, gint *, gint *, GdkScrollDirection, bool, col_coord_t *);
+bool g_buffer_line_get_coord_at(const GBufferLine *, size_t, GWidthTracker *, const GDisplayOptions *, gint *, gint *, GdkScrollDirection, bool, col_coord_t *);
/* Donne le segment présent à une abscisse donnée. */
-line_segment *g_buffer_line_get_segment_at(const GBufferLine *, const line_width_summary *, const GDisplayOptions *, const line_width_summary *, gint *, gint *, GdkScrollDirection, bool);
+line_segment *g_buffer_line_get_segment_at(const GBufferLine *, size_t, GWidthTracker *, const GDisplayOptions *, gint *, gint *, GdkScrollDirection, bool);
/* Donne le créateur présent à une abscisse donnée. */
-GObject *g_buffer_line_get_creator_at(const GBufferLine *, const line_width_summary *, const GDisplayOptions *, const line_width_summary *, gint *, gint *, GdkScrollDirection, bool);
+GObject *g_buffer_line_get_creator_at(const GBufferLine *, size_t, GWidthTracker *, const GDisplayOptions *, gint *, gint *, GdkScrollDirection, bool);
/* Fournit des coordonnées voisines selon une direction donnée. */
-bool g_buffer_line_find_near_coord(const GBufferLine *, col_coord_t *, const line_width_summary *, const GDisplayOptions *, const line_width_summary *, GdkScrollDirection, gint *);
+bool g_buffer_line_find_near_coord(const GBufferLine *, size_t, col_coord_t *, GWidthTracker *, const GDisplayOptions *, GdkScrollDirection, gint *);
/* Imprime la ligne de texte représentée. */
-void g_buffer_line_draw(GBufferLine *, cairo_t *, const line_width_summary *, gint, gint, const GDisplayOptions *, const line_width_summary *, const segcnt_list *);
+void g_buffer_line_draw(GBufferLine *, size_t, cairo_t *, gint, gint, GWidthTracker *, const GDisplayOptions *, const segcnt_list *);