summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/nodes/virtual.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-03-19 21:13:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-03-19 21:13:51 (GMT)
commitcf97db0ea4d1ea983db38df85984034b49fa4f77 (patch)
treeb6d69945b24ec8da93f0bef7ccf4dfdbe1d920a2 /src/gtkext/graph/nodes/virtual.h
parente7a85861ba8bcd00ceb7bf9e47f4eadccd48ce3f (diff)
Defined the first steps towards new graph renderings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@345 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/nodes/virtual.h')
-rw-r--r--src/gtkext/graph/nodes/virtual.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/gtkext/graph/nodes/virtual.h b/src/gtkext/graph/nodes/virtual.h
new file mode 100644
index 0000000..440c675
--- /dev/null
+++ b/src/gtkext/graph/nodes/virtual.h
@@ -0,0 +1,70 @@
+
+/* OpenIDA - Outil d'analyse de fichiers binaires
+ * virtual.h - prototypes pour l'encapsulation graphique des blocs virtuels
+ *
+ * Copyright (C) 2013 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 _GTKEXT_GRAPH_NODES_VIRTUAL_H
+#define _GTKEXT_GRAPH_NODES_VIRTUAL_H
+
+
+#include "../node.h"
+#include "../../../analysis/blocks/virtual.h"
+
+
+
+#define G_TYPE_VIRTUAL_NODE g_virtual_node_get_type()
+#define G_VIRTUAL_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_virtual_node_get_type(), GVirtualNode))
+#define G_IS_VIRTUAL_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_virtual_node_get_type()))
+#define G_VIRTUAL_NODE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_virtual_node_get_type(), GVirtualNodeIface))
+#define G_VIRTUAL_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_VIRTUAL_NODE, GVirtualNodeClass))
+
+
+/* Encapsulation graphique d'un bloc virtuel (instance) */
+typedef struct _GVirtualNode GVirtualNode;
+
+/* Encapsulation graphique d'un bloc virtuel (classe) */
+typedef struct _GVirtualNodeClass GVirtualNodeClass;
+
+
+/* Indique le type définit par la GLib pour l'encapsulation d'un bloc virtuel. */
+GType g_virtual_node_get_type(void);
+
+/* Encapsule graphiquement un bloc virtuel. */
+GGraphNode *g_virtual_node_new(GVirtualBlock *);
+
+/* Ajoute un noeud au groupe courant. */
+void g_virtual_node_add_child(GVirtualNode *, GGraphNode *);
+
+/* Compte le nombre de noeuds contenus dans le groupe courant. */
+size_t g_virtual_node_count_children(const GVirtualNode *);
+
+/* Renvoie un des noeuds contenus dans le groupe courant. */
+GGraphNode *g_virtual_node_get_child(const GVirtualNode *, size_t);
+
+/* Organise le contenu du noeud selon l'axe des abscisses. */
+void g_virtual_node_organize_x_line(GVirtualNode *);
+
+/* Procède à un décallage du contenu sur l'axe des abscisses. */
+void g_virtual_node_offset_x_line(GVirtualNode *, gint);
+
+
+
+#endif /* _GTKEXT_GRAPH_NODES_VIRTUAL_H */