summaryrefslogtreecommitdiff
path: root/src/analysis/line-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-04-12 19:15:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-04-12 19:15:35 (GMT)
commit216a3d0121fabd678e50ea6b4fa2447ae9b921f0 (patch)
tree395fcd91b674ff5652e34b46207ba08cc9e7af68 /src/analysis/line-int.h
parentedac614a164d9cac345d914f4320d71bdb16ab79 (diff)
Created a debugging layout and introduced a heavier use of GLib.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@58 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/line-int.h')
-rw-r--r--src/analysis/line-int.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/analysis/line-int.h b/src/analysis/line-int.h
new file mode 100644
index 0000000..142230e
--- /dev/null
+++ b/src/analysis/line-int.h
@@ -0,0 +1,88 @@
+
+/* 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 <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ANALYSIS_LINE_INT_H
+#define _ANALYSIS_LINE_INT_H
+
+
+#include "line.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 *);
+
+/* Méthode de mise à jour d'une ligne de représentation. */
+typedef void (* refresh_markup_fc) (GRenderingLine *);
+
+
+/* Ligne de représentation générique (instance) */
+struct _GRenderingLine
+{
+ GObject parent; /* A laisser en premier */
+
+ DL_LIST_ITEM(link); /* Maillon de liste chaînée */
+
+ uint64_t offset; /* Position en mémoire/physique*/
+
+ RenderingLineType type; /* Type de représentation */
+ RenderingLineFlag flags; /* Extension d'informations */
+
+ PangoLayout *layout; /* Moteur de rendu du code/txt */
+
+ get_bin_len_fc get_bin_len; /* Nbre d'octets représentés */
+ off_t max_bin_len; /* Nombre global maximal */
+
+ refresh_markup_fc refresh_markup; /* Reconstruit la représentat° */
+
+};
+
+
+#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
+{
+ GObjectClass parent; /* A laisser en premier */
+
+ /* Signaux */
+
+ void (* rendering_line_flags_changed) (GRenderingLine *);
+
+};
+
+
+
+/* Taille max d'une traduction */
+#define CODE_BUFFER_LEN 128
+
+
+
+#endif /* _ANALYSIS_LINE_INT_H */