summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-08-08 21:37:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-08-08 21:37:21 (GMT)
commit4370d2d77d623f560c7df94a3bc15b1395e4878b (patch)
tree57cc6268f504c19aaac3b1adda4295ed3b1ddc7f /src/analysis
parent34d28c7418342d3c67be4747b13cdcb124edda32 (diff)
Updated all the code relative to GUI items.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/binary.c3
-rw-r--r--src/analysis/loaded.c23
-rw-r--r--src/analysis/loaded.h4
3 files changed, 28 insertions, 2 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index 7957f2e..2eafda9 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -205,7 +205,8 @@ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary
/* Indique le type défini pour une description de fichier binaire. */
G_DEFINE_TYPE_WITH_CODE(GLoadedBinary, g_loaded_binary, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE(G_TYPE_LOADED_CONTENT, g_loaded_binary_interface_init));
+ G_IMPLEMENT_INTERFACE(G_TYPE_LOADED_CONTENT, g_loaded_binary_interface_init)
+ G_IMPLEMENT_INTERFACE(G_TYPE_NAMED_WIDGET, g_loaded_content_named_interface_init));
/******************************************************************************
diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c
index 71b1838..c1f6e17 100644
--- a/src/analysis/loaded.c
+++ b/src/analysis/loaded.c
@@ -32,6 +32,7 @@
#include "../core/queue.h"
#include "../glibext/chrysamarshal.h"
#include "../glibext/gloadedpanel.h"
+#include "../glibext/named-int.h"
#include "../plugins/pglist.h"
@@ -113,7 +114,7 @@ static void g_loaded_analysis_process(GLoadedAnalysis *, GtkStatusStack *);
/* Détermine le type d'une interface pour l'intégration de contenu chargé. */
-G_DEFINE_INTERFACE(GLoadedContent, g_loaded_content, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(GLoadedContent, g_loaded_content, G_TYPE_OBJECT);
/******************************************************************************
@@ -143,6 +144,26 @@ static void g_loaded_content_default_init(GLoadedContentInterface *iface)
/******************************************************************************
* *
+* Paramètres : iface = interface GLib à initialiser. *
+* *
+* Description : Procède à l'initialisation de l'interface de composant nommé.*
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_loaded_content_named_interface_init(GNamedWidgetIface *iface)
+{
+ iface->get_name = (get_named_widget_name_fc)g_loaded_content_describe;
+ iface->get_widget = (get_named_widget_widget_fc)g_loaded_content_build_default_view;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : content = élément chargé à traiter. *
* xdoc = structure XML en cours d'édition. *
* context = contexte à utiliser pour les recherches. *
diff --git a/src/analysis/loaded.h b/src/analysis/loaded.h
index 9d446c4..46404e1 100644
--- a/src/analysis/loaded.h
+++ b/src/analysis/loaded.h
@@ -33,6 +33,7 @@
#include "content.h"
#include "../common/xml.h"
#include "../glibext/gdisplayoptions.h"
+#include "../glibext/named.h"
#include "../gtkext/gtkdockstation.h"
@@ -58,6 +59,9 @@ typedef struct _GLoadedContentIface GLoadedContentIface;
/* Détermine le type d'une interface pour l'intégration de contenu chargé. */
GType g_loaded_content_get_type(void) G_GNUC_CONST;
+/* Procède à l'initialisation de l'interface de composant nommé. */
+void g_loaded_content_named_interface_init(GNamedWidgetIface *);
+
/* Interprète un contenu chargé avec un appui XML. */
bool g_loaded_content_restore(GLoadedContent *, xmlDoc *, xmlXPathContext *, const char *);