diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-06-18 06:31:42 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-06-18 06:31:58 (GMT) |
commit | 53edb30496d1065019406de16f9f9d96ba61cd3c (patch) | |
tree | 162cad07e27a01990d721f69f3270581417c31e7 /src/glibext/widthtracker-int.h | |
parent | 334126eb659bc310a72a9f7f9238b7cd205a0770 (diff) |
Rebuild hex views for large contents.
Diffstat (limited to 'src/glibext/widthtracker-int.h')
-rw-r--r-- | src/glibext/widthtracker-int.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/glibext/widthtracker-int.h b/src/glibext/widthtracker-int.h new file mode 100644 index 0000000..50f5757 --- /dev/null +++ b/src/glibext/widthtracker-int.h @@ -0,0 +1,80 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * widthtracker-int.h - prototypes internes pour le suivi des largeurs associées à un ensemble de lignes + * + * Copyright (C) 2016-2024 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * Chrysalide is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Chrysalide is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef _GLIBEXT_WIDTHTRACKER_INT_H +#define _GLIBEXT_WIDTHTRACKER_INT_H + + +#include "widthtracker.h" + + + +/* Portions de largeurs communes */ +typedef struct _common_metrics_t +{ + size_t first; /* Premier indice de portion */ + size_t last; /* Dernier indice de portion */ + + size_t merging_index; /* Indice de colonne de fusion */ + + int *summary; /* Compilation de largeurs */ + bool cached; /* Mise en cache des calculs */ + +} common_metrics_t; + + +/* Gestionnaire de largeurs associées aux lignes (instance) */ +struct _GWidthTracker +{ + GObject parent; /* A laisser en premier */ + + GBufferCache *cache; /* Ensemble complet de lignes */ + size_t opt_count; /* Qté de colonnes en option */ + size_t reg_count; /* Nombre de colonnes normales */ +#ifndef NDEBUG + size_t col_count; /* Nombre maximum de colonnes */ +#endif + + common_metrics_t *locals; /* Portions représentées */ + size_t count; /* Quantité de ces portions */ + + int *min_widths; /* Largeurs requises suivies */ + bool *fixed; /* Indication d'impositions */ + bool cached; /* Mise en cache des calculs */ + +}; + +/* Gestionnaire de largeurs associées aux lignes (classe) */ +struct _GWidthTrackerClass +{ + GObjectClass parent; /* A laisser en premier */ + +}; + + +/* Met en place un nouveau suivi de largeurs au sein de lignes. */ +bool g_width_tracker_create(GWidthTracker *, GBufferCache *); + + + +#endif /* _GLIBEXT_WIDTHTRACKER_INT_H */ |