summaryrefslogtreecommitdiff
path: root/src/glibext/gbinportion.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext/gbinportion.h')
-rw-r--r--src/glibext/gbinportion.h67
1 files changed, 20 insertions, 47 deletions
diff --git a/src/glibext/gbinportion.h b/src/glibext/gbinportion.h
index b91af05..2aa5e1a 100644
--- a/src/glibext/gbinportion.h
+++ b/src/glibext/gbinportion.h
@@ -80,7 +80,7 @@ typedef enum _PortionAccessRights
GType g_binary_portion_get_type(void);
/* Crée une description de partie de code vierge. */
-GBinPortion *g_binary_portion_new(const char *);
+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 **);
@@ -91,9 +91,6 @@ void g_binary_portion_set_desc(GBinPortion *, const char *);
/* Fournit la description attribuée à une partie de code. */
const char *g_binary_portion_get_desc(const GBinPortion *);
-/* Définit les valeurs utiles d'une partie de code. */
-void g_binary_portion_set_values(GBinPortion *, const vmpa2t *, phys_t);
-
/* Fournit l'emplacement d'une partie de code binaire. */
const mrange_t *g_binary_portion_get_range(const GBinPortion *);
@@ -112,68 +109,44 @@ 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 *);
+/* Procède à l'inclusion d'une portion dans une autre. */
+void g_binary_portion_include(GBinPortion *, GBinPortion *);
+/* Sens des visites */
+typedef enum _BinaryPortionVisit
+{
+ BPV_ENTER, /* Arrivée sur une branche */
+ BPV_SHOW, /* Visite d'une feuille */
+ BPV_EXIT /* Départ d'une branche */
-/* -------------------------- COUCHES DE PORTIONS BINAIRES -------------------------- */
-
-
-#define G_TYPE_PORTION_LAYER (g_portion_layer_get_type())
-#define G_PORTION_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_PORTION_LAYER, GPortionLayer))
-#define G_IS_PORTION_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_PORTION_LAYER))
-#define G_PORTION_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_PORTION_LAYER, GPortionLayerClass))
-#define G_IS_PORTION_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_PORTION_LAYER))
-#define G_PORTION_LAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_PORTION_LAYER, GPortionLayerClass))
-
-
-/* Couche de portions binaires quelconques (instance) */
-typedef struct _GPortionLayer GPortionLayer;
-
-/* Couche de portions binaires quelconques (classe) */
-typedef struct _GPortionLayerClass GPortionLayerClass;
-
+} BinaryPortionVisit;
-/* Taille à définir lors d'un rattachement */
-#define NO_LENGTH_YET VMPA_NO_PHYSICAL
+/* Fonction appelée à chaque visite de portion.*/
+typedef bool (* visit_portion_fc) (GBinPortion *, GBinPortion *, BinaryPortionVisit, void *);
-/* Indique le type défini par la GLib pour les couches de portions binaires. */
-GType g_portion_layer_get_type(void);
+/* Parcourt un ensemble de portions binaires. */
+bool g_binary_portion_visit(GBinPortion *, visit_portion_fc, void *);
-/* Crée une nouvelle couche de portions binaires. */
-GPortionLayer *g_portion_layer_new(phys_t, const char *);
-/* Attache une couche à une autre en tant que couche inférieure. */
-void g_portion_layer_attach_sub(GPortionLayer *, GPortionLayer *);
-/* Procède à l'inclusion d'une portion dans une couche. */
-void g_portion_layer_include(GPortionLayer *, GBinPortion *);
+/* ------------------------ PARCOURS D'ENSEMBLES DE PORTIONS ------------------------ */
-/* Fournit une liste triée de portions d'un binaire. */
-GBinPortion **g_portion_layer_collect_all_portions(const GPortionLayer *, size_t *);
/* Recherche la portion présente à un point donné. */
-GBinPortion *g_portion_layer_find_portion_at_pos(const GPortionLayer *, gint, GdkRectangle *);
+GBinPortion *g_binary_portion_find_at_pos(GBinPortion *, gint, GdkRectangle *);
/* Recherche la portion présente à une adresse donnée. */
-GBinPortion *g_portion_layer_find_portion_at_addr(const GPortionLayer *, const vmpa2t *, GdkRectangle *);
+GBinPortion *g_binary_portion_find_at_addr(GBinPortion *, const vmpa2t *, GdkRectangle *);
/* Fournit la position correspondant à une adresse donnée. */
-bool g_portion_layer_get_addr_from_pos(GPortionLayer *, gint, const GdkRectangle *, vmpa2t *);
+bool get_binary_portion_addr_from_pos(GBinPortion *, gint, const GdkRectangle *, vmpa2t *);
/* Fournit l'adresse correspondant à une position donnée. */
-bool g_portion_layer_get_pos_from_addr(GPortionLayer *, const vmpa2t *, const GdkRectangle *, gint *);
-
-/* Fonction appelée à chaque visite de portion.*/
-typedef bool (* visit_portion_fc) (GBinPortion *, void *);
-
-/* Parcours un ensemble de portions binaires. */
-bool g_portion_layer_visit(const GPortionLayer *, visit_portion_fc, void *);
+bool get_binary_portion_pos_from_addr(GBinPortion *, const vmpa2t *, const GdkRectangle *, gint *);
/* Prépare une astuce concernant une portion pour son affichage. */
-gboolean g_portion_layer_query_tooltip(const GPortionLayer *, gint, gint, const GdkRectangle *, GtkTooltip *);
-
-/* Représente une couche de portions sur une bande dédiée. */
-void g_portion_layer_draw(const GPortionLayer *, GtkStyleContext *, cairo_t *, const GdkRectangle *);
+gboolean query_tooltip_for_binary_portion(GBinPortion *, gint, gint, const GdkRectangle *, GtkTooltip *);