/* OpenIDA - Outil d'analyse de fichiers binaires * line-int.h - prototypes pour l'interface des représentations des lignes de rendu * * Copyright (C) 2008 Cyrille Bagard * * This file is part of OpenIDA. * * OpenIDA is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * OpenIDA is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Foobar. If not, see . */ #ifndef _ANALYSIS_LINE_INT_H #define _ANALYSIS_LINE_INT_H #include "line.h" #include "exporter-int.h" #include "../common/dllist.h" /* Méthode de mise à jour du nombre d'octets maximal par instruction. */ typedef void (* get_bin_len_fc) (GRenderingLine *, off_t *); /* Ligne de représentation générique (instance) */ struct _GRenderingLine { GContentExporter parent; /* A laisser en premier */ DL_LIST_ITEM(link); /* Maillon de liste chaînée */ vmpa_t offset; /* Position en mémoire/physique*/ off_t length; /* Nombre d'adresses associées */ RenderingLineType type; /* Type de représentation */ RenderingLineFlag flags; /* Extension d'informations */ GRenderingLine **from; /* Origines des références */ size_t from_count; /* Nombre de ces origines */ GRenderingLine **to; /* Eventuelles lignes visées */ InstructionLinkType *links_type; /* Type des liens de dest. */ size_t to_count; /* Nombre de ces destinations */ PangoLayout *layout[MRD_COUNT]; /* Moteur de rendu du code/txt */ get_bin_len_fc get_bin_len; /* Nbre d'octets représentés */ off_t max_bin_len[MRD_COUNT]; /* Nombre global maximal */ }; #define lines_list_next_iter(iter, head) dl_list_next_iter(iter, head, GRenderingLine, link) #define lines_list_add_tail(new, head) dl_list_add_tail(new, head, GRenderingLine, link) #define lines_list_splice_before(pos, head1, head2) dl_list_splice_before(pos, head1, head2, GRenderingLine, link) #define lines_list_for_each(pos, head) dl_list_for_each(pos, head, GRenderingLine, link) /* Ligne de représentation générique (classe) */ struct _GRenderingLineClass { GContentExporterClass parent; /* A laisser en premier */ GtkStyle *style; /* Style GTK commun aux lignes */ /* Signaux */ void (* rendering_line_flags_changed) (GRenderingLine *); }; /* Taille max d'une traduction */ #define CODE_BUFFER_LEN 128 #endif /* _ANALYSIS_LINE_INT_H */