diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2022-12-29 11:02:46 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2022-12-29 11:02:46 (GMT) |
commit | 41db261acccf3494aa93b71a181cde9e8605a841 (patch) | |
tree | 07a00f88920a8e601268d415131630052ef85988 /src/analysis/binary.c | |
parent | c27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff) |
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r-- | src/analysis/binary.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 41f148a..0f0ff93 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -43,17 +43,18 @@ #include "../common/cpp.h" #include "../common/xdg.h" #include "../core/collections.h" +#include "../core/columns.h" #include "../core/logs.h" #include "../core/params.h" #include "../core/processors.h" #include "../format/known.h" #include "../glibext/gbinarycursor.h" -#include "../glibext/gloadedpanel.h" -#include "../gtkext/easygtk.h" -#include "../gtkext/gtkblockdisplay.h" -#include "../gtkext/gtkdisplaypanel.h" -#include "../gtkext/gtkgraphdisplay.h" -#include "../gtkext/hexdisplay.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gloadedpanel.h" +# include "../gtkext/easygtk.h" +# include "../gtkext/gtkdisplaypanel.h" +# include "../gtkext/gtkgraphdisplay.h" +#endif @@ -168,6 +169,8 @@ static void on_binary_processor_changed(GArchProcessor *, GArchInstruction *, gb /* Fournit le désignation associée à l'élément chargé. */ static char *g_loaded_binary_describe(const GLoadedBinary *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ static unsigned int g_loaded_binary_count_views(const GLoadedBinary *); @@ -186,6 +189,8 @@ static unsigned int g_loaded_binary_get_view_index(GLoadedBinary *, GtkWidget *) /* Fournit toutes les options d'affichage pour un contenu. */ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary *, unsigned int); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -231,6 +236,8 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) loaded->describe = (describe_loaded_fc)g_loaded_binary_describe; +#ifdef HAVE_GTK_SUPPORT + loaded->count_views = (count_loaded_views_fc)g_loaded_binary_count_views; loaded->get_view_name = (get_loaded_view_name_fc)g_loaded_binary_get_view_name; loaded->build_def_view = (build_loaded_def_view_fc)g_loaded_binary_build_default_view; @@ -239,6 +246,8 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) loaded->get_options = (get_loaded_options_fc)g_loaded_binary_get_display_options; +#endif + } @@ -1466,7 +1475,9 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca char *desc; /* Description humaine associée*/ bool has_virt; /* Présence de virtuel ? */ GProcContext *context; /* Contexte de suivi dédié */ +#ifdef HAVE_GTK_SUPPORT GWidthTracker *tracker; /* Gestionnaire de largeur */ +#endif /* Interprétation du format associé */ @@ -1512,12 +1523,16 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca { output_disassembly(binary, context, status, &binary->disass_cache); +#ifdef HAVE_GTK_SUPPORT + tracker = g_buffer_cache_get_width_tracker(binary->disass_cache); g_width_tracker_build_initial_cache(tracker, gid, status); g_object_unref(G_OBJECT(tracker)); +#endif + } g_object_unref(G_OBJECT(context)); @@ -1661,6 +1676,9 @@ static char *g_loaded_binary_describe(const GLoadedBinary *binary, bool full) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : binary = contenu chargé à consulter. * @@ -1872,3 +1890,6 @@ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary return result; } + + +#endif |