summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/nodes/flow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/graph/nodes/flow.h')
-rw-r--r--src/gtkext/graph/nodes/flow.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/gtkext/graph/nodes/flow.h b/src/gtkext/graph/nodes/flow.h
new file mode 100644
index 0000000..5a6268e
--- /dev/null
+++ b/src/gtkext/graph/nodes/flow.h
@@ -0,0 +1,86 @@
+
+/* OpenIDA - Outil d'analyse de fichiers binaires
+ * flow.h - prototypes pour l'encapsulation graphique des blocs d'exécution
+ *
+ * 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_FLOW_H
+#define _GTKEXT_GRAPH_NODES_FLOW_H
+
+
+#include "../node.h"
+#include "../../../analysis/blocks/flow.h"
+
+
+
+/* Redéfinition depuis layout.h pour contourner une boucle. */
+typedef struct _GGraphLayout GGraphLayout;
+
+
+
+#define G_TYPE_FLOW_NODE g_flow_node_get_type()
+#define G_FLOW_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_flow_node_get_type(), GFlowNode))
+#define G_IS_FLOW_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_flow_node_get_type()))
+#define G_FLOW_NODE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_flow_node_get_type(), GFlowNodeIface))
+#define G_FLOW_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_FLOW_NODE, GFlowNodeClass))
+
+
+/* Type d'un accrochage pour lien */
+typedef struct _node_slot_t node_slot_t;
+
+/* Encapsulation graphique d'un bloc d'exécution (instance) */
+typedef struct _GFlowNode GFlowNode;
+
+/* Encapsulation graphique d'un bloc d'exécution (classe) */
+typedef struct _GFlowNodeClass GFlowNodeClass;
+
+
+/* Indique le type définit par la GLib pour l'encapsulation d'un bloc d'exécution. */
+GType g_flow_node_get_type(void);
+
+/* Encapsule graphiquement un bloc d'exécution. */
+GGraphNode *g_flow_node_new(GFlowBlock *, GtkBufferView *);
+
+/* Précise si le noeud a pour première instruction celle donnée. */
+bool g_flow_node_start_with(const GFlowNode *, GArchInstruction *);
+
+/* Précise la hauteur minimale requise pour un noeud. */
+void g_flow_node_register_rank(const GFlowNode *, GGraphRanks *);
+
+/* Définit l'ordonnée de l'espace attribué à un noeud. */
+void g_flow_node_apply_rank(GFlowNode *, GGraphRanks *);
+
+/* Etablit les liaison entre un noeud et ses suivants. */
+void g_flow_node_link(GFlowNode *, GGraphLayout *, GGraphNode *);
+
+/* Place un noeud sur son support final. */
+void g_flow_node_place(const GFlowNode *, GtkGraphView *);
+
+
+
+/* ------------------------ GESTION DES ACCROCHES D'UN NOEUD ------------------------ */
+
+
+/* Localise un point d'accroche à un noeud graphique. */
+GdkPoint g_flow_node_get_point_from_slot(const GFlowNode *, bool, const node_slot_t *);
+
+
+
+#endif /* _GTKEXT_GRAPH_NODES_FLOW_H */