summaryrefslogtreecommitdiff
path: root/src/analysis/roptions.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-07-04 12:21:26 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-07-04 12:21:26 (GMT)
commita60e81ac70b3d829f486ce7b6534005a9d025206 (patch)
tree0e3b284a12a1f8f4932f5cd05247a556cf8c5bf9 /src/analysis/roptions.h
parentb6893c7b85c34f7a3c65ac76bfd9d95b1c4ebf55 (diff)
Defined general rendering options using a GLib object.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@89 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/roptions.h')
-rw-r--r--src/analysis/roptions.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/analysis/roptions.h b/src/analysis/roptions.h
new file mode 100644
index 0000000..184f59a
--- /dev/null
+++ b/src/analysis/roptions.h
@@ -0,0 +1,88 @@
+
+/* OpenIDA - Outil d'analyse de fichiers binaires
+ * roptions.h - prototypes pour les options de rendus des lignes de code
+ *
+ * Copyright (C) 2009 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_ROPTIONS_H
+#define _ANALYSIS_ROPTIONS_H
+
+
+#include <glib-object.h>
+#include <stdbool.h>
+
+
+#include "../arch/processor.h"
+#include "../format/exe_format.h"
+
+
+
+/* Support principal de rendu */
+typedef enum _MainRendering
+{
+ MRD_BLOCK, /* Unique bloc de code */
+ MRD_GRAPH, /* Graphique de blocs de code */
+
+ MRD_COUNT
+
+} MainRendering;
+
+
+#define G_TYPE_RENDERING_OPTIONS g_rendering_options_get_type()
+#define G_RENDERING_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_rendering_options_get_type(), GRenderingOptions))
+#define G_IS_RENDERING_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_rendering_options_get_type()))
+#define G_RENDERING_OPTIONS_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_rendering_options_get_type(), GRenderingOptionsIface))
+#define G_RENDERING_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_RENDERING_OPTIONS, GRenderingOptionsClass))
+
+
+/* Options de représentation (instance) */
+typedef struct _GRenderingOptions GRenderingOptions;
+
+/* Options de représentation (classe) */
+typedef struct _GRenderingOptionsClass GRenderingOptionsClass;
+
+
+/* Indique le type défini pour des options de représentation. */
+GType g_rendering_options_get_type(void);
+
+/* Crée un un groupe d'options pour le rendu des lignes. */
+GRenderingOptions *g_rendering_options_new(exe_format *, GArchProcessor *);
+
+/* Fournit le format du contenu binaire représenté. */
+exe_format *g_rendering_options_get_format(const GRenderingOptions *);
+
+/* Fournit l'architecture du contenu binaire représenté. */
+GArchProcessor *g_rendering_options_get_processor(const GRenderingOptions *);
+
+/* Affiche (ou non) les adresses des instructions. */
+void g_rendering_options_show_address(GRenderingOptions *, MainRendering, bool);
+
+/* Indique si les adresses des instructions sont à afficher. */
+bool g_rendering_options_has_to_show_address(const GRenderingOptions *, MainRendering);
+
+/* Affiche (ou non) le code des instructions. */
+void g_rendering_options_show_code(GRenderingOptions *, MainRendering, bool);
+
+/* Indique si le code des instructions est à afficher. */
+bool g_rendering_options_has_to_show_code(const GRenderingOptions *, MainRendering);
+
+
+
+#endif /* _ANALYSIS_ROPTIONS_H */