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/format/symbol.c | |
parent | c27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff) |
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'src/format/symbol.c')
-rw-r--r-- | src/format/symbol.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c index b20426d..934eee3 100644 --- a/src/format/symbol.c +++ b/src/format/symbol.c @@ -31,9 +31,11 @@ #include "symbol-int.h" #include "../analysis/db/misc/rlestr.h" -#include "../glibext/gbinarycursor.h" +#include "../core/columns.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gbinarycursor.h" +#endif #include "../glibext/linegen-int.h" -#include "../gtkext/gtkblockdisplay.h" @@ -66,12 +68,16 @@ static void g_binary_symbol_finalize(GBinSymbol *); /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_binary_symbol_count_lines(const GBinSymbol *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_binary_symbol_compute_cursor(const GBinSymbol *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_binary_symbol_contain_cursor(const GBinSymbol *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_binary_symbol_get_line_flags(const GBinSymbol *, size_t, size_t); @@ -177,8 +183,10 @@ static void g_binary_symbol_init(GBinSymbol *symbol) static void g_binary_symbol_interface_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_binary_symbol_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_binary_symbol_compute_cursor; iface->contain = (linegen_contain_fc)g_binary_symbol_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_binary_symbol_get_line_flags; iface->print = (linegen_print_fc)g_binary_symbol_print; @@ -784,6 +792,9 @@ static size_t g_binary_symbol_count_lines(const GBinSymbol *symbol) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : symbol = générateur à consulter. * @@ -851,6 +862,9 @@ static int g_binary_symbol_contain_cursor(const GBinSymbol *symbol, size_t index } +#endif + + /****************************************************************************** * * * Paramètres : symbol = générateur à consulter. * |