summaryrefslogtreecommitdiff
path: root/src/gui/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-06-18 06:31:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-06-18 06:31:58 (GMT)
commit53edb30496d1065019406de16f9f9d96ba61cd3c (patch)
tree162cad07e27a01990d721f69f3270581417c31e7 /src/gui/core
parent334126eb659bc310a72a9f7f9238b7cd205a0770 (diff)
Rebuild hex views for large contents.
Diffstat (limited to 'src/gui/core')
-rw-r--r--src/gui/core/Makefile.am4
-rw-r--r--src/gui/core/core.c76
-rw-r--r--src/gui/core/core.h29
3 files changed, 106 insertions, 3 deletions
diff --git a/src/gui/core/Makefile.am b/src/gui/core/Makefile.am
index c219655..96ef578 100644
--- a/src/gui/core/Makefile.am
+++ b/src/gui/core/Makefile.am
@@ -13,7 +13,6 @@ RES_FILES = \
../../../pixmaps/snapshot_current.png
libguicore_la_SOURCES = \
- core.h core.c \
global.h global.c \
items.h items.c \
panels.h panels.c \
@@ -23,7 +22,8 @@ libguicore_la_SOURCES = \
libguicore_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-libguicore4_la_SOURCES = \
+libguicore4_la_SOURCES = \
+ core.h core.c \
logs.h logs.c
libguicore4_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
diff --git a/src/gui/core/core.c b/src/gui/core/core.c
index 6bebfe2..2d47dc9 100644
--- a/src/gui/core/core.c
+++ b/src/gui/core/core.c
@@ -24,6 +24,80 @@
#include "core.h"
+#include "../../glibext/linetoken.h"
+
+
+
+/* Statuts de chargement */
+static AvailableGuiComponent __loaded = AGC_NONE;
+
+
+/******************************************************************************
+* *
+* Paramètres : flags = liste d'éléments à charger. *
+* *
+* Description : Charge les éléments graphiques de l'éditeur. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool load_gui_components(AvailableGuiComponent flags)
+{
+ bool result; /* Bilan à retourner */
+
+ result = true;
+
+ if ((flags & AGC_BUFFER_FEATURES) != 0 && (__loaded & AGC_BUFFER_FEATURES) == 0)
+ {
+ result = init_segment_content_hash_table();
+ if (!result) goto done;
+
+ __loaded |= AGC_BUFFER_FEATURES;
+
+ }
+
+ done:
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : flags = liste d'éléments à décharger. *
+* *
+* Description : Décharge les éléments graphiques de l'éditeur. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void unload_gui_components(AvailableGuiComponent flags)
+{
+ if ((flags & AGC_BUFFER_FEATURES) != 0 && (__loaded & AGC_BUFFER_FEATURES) == 0)
+ {
+ exit_segment_content_hash_table();
+
+ __loaded &= ~AGC_BUFFER_FEATURES;
+
+ }
+
+}
+
+
+
+
+
+
+
+#if 0
+
#include "global.h"
#include "items.h"
#include "panels.h"
@@ -201,3 +275,5 @@ void unload_all_gui_components(void)
unload_all_themes();
}
+
+#endif
diff --git a/src/gui/core/core.h b/src/gui/core/core.h
index c043434..bcb5433 100644
--- a/src/gui/core/core.h
+++ b/src/gui/core/core.h
@@ -25,10 +25,34 @@
#define _GUI_CORE_CORE_H
-#include <glib-object.h>
#include <stdbool.h>
+
+/* Eléments à (dé)charger disponibles */
+typedef enum _AvailableGuiComponent
+{
+ AGC_NONE = (0 << 0), /* Statut initial */
+ AGC_BUFFER_FEATURES = (1 << 0), /* Tampons de bribes de texte */
+
+} AvailableGuiComponent;
+
+/* Charge les éléments graphiques de l'éditeur. */
+bool load_gui_components(AvailableGuiComponent);
+
+/* Décharge les éléments graphiques de l'éditeur. */
+void unload_gui_components(AvailableGuiComponent);
+
+
+
+
+
+
+#if 0
+
+#include <glib-object.h>
+
+
#include "../../glibext/configuration.h"
@@ -43,5 +67,8 @@ bool complete_loading_of_all_gui_components(GGenConfig *);
void unload_all_gui_components(void);
+#endif
+
+
#endif /* _GUI_CORE_CORE_H */