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/glibext/gbinportion.h | |
parent | c27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff) |
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'src/glibext/gbinportion.h')
-rw-r--r-- | src/glibext/gbinportion.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/glibext/gbinportion.h b/src/glibext/gbinportion.h index 3a960b7..7bc1ee6 100644 --- a/src/glibext/gbinportion.h +++ b/src/glibext/gbinportion.h @@ -27,7 +27,9 @@ #include <glib-object.h> #include <stdbool.h> -#include <gtk/gtk.h> +#ifdef HAVE_GTK_SUPPORT +# include <gtk/gtk.h> +#endif #include "../arch/vmpa.h" @@ -87,12 +89,16 @@ GBinPortion *g_binary_portion_new(const char *, const vmpa2t *, phys_t); /* Etablit la comparaison ascendante entre deux portions. */ int g_binary_portion_compare(const GBinPortion **, const GBinPortion **); +#ifdef HAVE_GTK_SUPPORT + /* Attribue à la portion une éventuelle image de représentation. */ void g_binary_portion_set_icon(GBinPortion *, cairo_surface_t *); /* Fournit une éventuelle image de représentation de portion. */ cairo_surface_t *g_binary_portion_get_icon(const GBinPortion *); +#endif + /* Attribue une description humaine à une partie de code. */ void g_binary_portion_set_desc(GBinPortion *, const char *); @@ -117,12 +123,16 @@ void g_binary_portion_set_rights(GBinPortion *, PortionAccessRights); /* Fournit les droits associés à une partie de code. */ PortionAccessRights g_binary_portion_get_rights(const GBinPortion *); +#ifdef HAVE_GTK_SUPPORT + /* Prépare une astuce concernant une portion pour son affichage. */ void g_binary_portion_query_tooltip(GBinPortion *, GtkTooltip *); /* Représente la portion sur une bande dédiée. */ void g_binary_portion_draw(const GBinPortion *, GtkStyleContext *, cairo_t *, const GdkRectangle *); +#endif + /* Procède à l'inclusion d'une portion dans une autre. */ void g_binary_portion_include(GBinPortion *, GBinPortion *); @@ -147,14 +157,20 @@ bool g_binary_portion_visit(GBinPortion *, visit_portion_fc, void *); /* ------------------------ PARCOURS D'ENSEMBLES DE PORTIONS ------------------------ */ +#ifdef HAVE_GTK_SUPPORT + /* Compte le nombre de portions présentes dans une arborescence. */ size_t g_binary_portion_count(const GBinPortion *); /* Recherche la portion présente à un point donné. */ GBinPortion *g_binary_portion_find_at_pos(GBinPortion *, gint, GdkRectangle *); +#endif + /* Recherche la portion présente à une adresse donnée. */ -GBinPortion *g_binary_portion_find_at_addr(GBinPortion *, const vmpa2t *, GdkRectangle *); +GBinPortion *g_binary_portion_find_at_addr(GBinPortion *, const vmpa2t *); + +#ifdef HAVE_GTK_SUPPORT /* Fournit la position correspondant à une adresse donnée. */ bool get_binary_portion_addr_from_pos(GBinPortion *, gint, const GdkRectangle *, vmpa2t *); @@ -165,6 +181,8 @@ bool get_binary_portion_pos_from_addr(GBinPortion *, const vmpa2t *, const GdkRe /* Prépare une astuce concernant une portion pour son affichage. */ gboolean query_tooltip_for_binary_portion(GBinPortion *, gint, gint, const GdkRectangle *, GtkTooltip *); +#endif + /* Fournit l'emplacement correspondant à une position physique. */ bool g_binary_portion_translate_offset_into_vmpa(const GBinPortion *, phys_t, vmpa2t *); |