diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-07-26 18:52:15 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-07-26 18:52:15 (GMT) |
commit | a6c46fc296db67321db3d4bb586346998de90422 (patch) | |
tree | 042cd0fd89fd1f1c8943b3aefd2b50585f461f58 /src/glibext/widthtracker.h | |
parent | 19516ffcca14abb082c5109125b7249bdc7fc199 (diff) |
Reduced the quantity of arguments used to deal with lines.
Diffstat (limited to 'src/glibext/widthtracker.h')
-rw-r--r-- | src/glibext/widthtracker.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/glibext/widthtracker.h b/src/glibext/widthtracker.h index b7bb8a4..82442ae 100644 --- a/src/glibext/widthtracker.h +++ b/src/glibext/widthtracker.h @@ -29,12 +29,23 @@ #include <stdbool.h> -#include "bufferline.h" +//#include "bufferline.h" #include "delayed.h" #include "gdisplayoptions.h" + +/* Mémorisation des largeurs pour un groupe de lignes */ +typedef struct _line_width_summary +{ + gint max_widths[10/*BLC_COUNT*/]; /* Taille cachée des colonnes */ + gint merged_width; /* Largeur cumulée avant fusion*/ + +} line_width_summary; + + + /* ---------------------------- RASSEMBLEMENT DE MESURES ---------------------------- */ @@ -61,11 +72,17 @@ typedef struct _GWidthTrackerClass GWidthTrackerClass; GType g_width_tracker_get_type(void); /* Crée un nouveau suivi de largeurs au sein de lignes. */ -GWidthTracker *g_width_tracker_new(GBufferCache *); +GWidthTracker *g_width_tracker_new(GBufferCache *, size_t); /* Crée un nouveau suivi de largeurs au sein de lignes. */ GWidthTracker *g_width_tracker_new_restricted(const GWidthTracker *, size_t, size_t); +/* Indique le nombre de colonnes prises en compte. */ +size_t g_width_tracker_count_columns(const GWidthTracker *); + +/* Impose une largeur minimale pour une colonne donnée. */ +void g_width_tracker_set_column_min_width(GWidthTracker *, size_t, gint); + /* Prend acte d'un changement sur une ligne pour les largeurs. */ void g_width_tracker_update(GWidthTracker *, size_t); @@ -78,9 +95,6 @@ void g_width_tracker_update_deleted(GWidthTracker *, size_t, size_t); /* Calcule les largeurs requises par un ensemble de lignes. */ void g_width_tracker_build_initial_cache(GWidthTracker *, wgroup_id_t, GtkStatusStack *); -/* Fournit un bon résumé des largeurs en vigueur. */ -const line_width_summary *g_width_tracker_get_width_summary(GWidthTracker *); - /* Fournit un résumé local des largeurs en vigueur. */ void g_width_tracker_get_local_width_summary(GWidthTracker *, size_t, line_width_summary *); @@ -90,6 +104,9 @@ gint g_width_tracker_get_width(GWidthTracker *, const GDisplayOptions *); /* Fournit la largeur requise pour dépasser les marges gauches. */ gint g_width_tracker_get_margin(GWidthTracker *, const GDisplayOptions *); +/* Indique la largeur locale d'une colonne donnée. */ +gint g_width_tracker_get_local_column_width(GWidthTracker *, size_t, size_t, size_t); + #endif /* _GLIBEXT_WIDTHTRACKER_H */ |