summaryrefslogtreecommitdiff
path: root/src/gui/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/core')
-rw-r--r--src/gui/core/Makefile.am10
-rw-r--r--src/gui/core/logs.c63
-rw-r--r--src/gui/core/logs.h37
3 files changed, 108 insertions, 2 deletions
diff --git a/src/gui/core/Makefile.am b/src/gui/core/Makefile.am
index 2077c4b..c219655 100644
--- a/src/gui/core/Makefile.am
+++ b/src/gui/core/Makefile.am
@@ -1,7 +1,7 @@
-BUILT_SOURCES = resources.h resources.c
+#BUILT_SOURCES = resources.h resources.c
-noinst_LTLIBRARIES = libguicore.la
+noinst_LTLIBRARIES = libguicore4.la # libguicore.la
RES_FILES = \
../../../pixmaps/palette.png \
@@ -23,6 +23,12 @@ libguicore_la_SOURCES = \
libguicore_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
+libguicore4_la_SOURCES = \
+ logs.h logs.c
+
+libguicore4_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
+
+
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libguicore_la_SOURCES:%c=)
diff --git a/src/gui/core/logs.c b/src/gui/core/logs.c
new file mode 100644
index 0000000..59910f1
--- /dev/null
+++ b/src/gui/core/logs.c
@@ -0,0 +1,63 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * logs.h - prototypes pour la diffusion graphique de messages d'alerte ou informatifs
+ *
+ * Copyright (C) 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/>.
+ */
+
+
+#include "logs.h"
+
+
+
+/******************************************************************************
+* *
+* Paramètres : type = espèce du message à ajouter. *
+* msg = message à faire apparaître à l'écran. *
+* *
+* Description : Affiche un message dans le terminal courant. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void do_log_message_alt2(LogMessageType type, const char *msg)
+{
+#if 0
+
+#ifdef INCLUDE_GTK_SUPPORT
+
+ GEditorItem *item; /* Eventuel affichage présent */
+
+ item = find_editor_item_by_type(G_TYPE_LOG_PANEL);
+
+ if (item != NULL)
+ {
+ g_log_panel_add_message(G_LOG_PANEL(item), type, msg);
+ g_object_unref(G_OBJECT(item));
+ }
+
+#endif
+
+#endif
+
+ printf("[log GUI] [%u] %s\n", type, msg);
+
+}
diff --git a/src/gui/core/logs.h b/src/gui/core/logs.h
new file mode 100644
index 0000000..b489339
--- /dev/null
+++ b/src/gui/core/logs.h
@@ -0,0 +1,37 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * logs.h - prototypes pour la diffusion graphique de messages d'alerte ou informatifs
+ *
+ * Copyright (C) 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 _GUI_CORE_LOGS_H
+#define _GUI_CORE_LOGS_H
+
+
+#include "../../core/logs.h"
+
+
+
+/* Affiche un message dans le terminal courant. */
+void do_log_message_alt(LogMessageType, const char *);
+
+
+
+#endif /* _GUI_CORE_LOGS_H */