summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/edge.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/graph/edge.h')
-rw-r--r--src/gtkext/graph/edge.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/gtkext/graph/edge.h b/src/gtkext/graph/edge.h
index e905685..ec33544 100644
--- a/src/gtkext/graph/edge.h
+++ b/src/gtkext/graph/edge.h
@@ -30,13 +30,16 @@
#include <gtk/gtk.h>
+#include "../../analysis/disass/block.h"
-#define G_TYPE_GRAPH_EDGE g_graph_edge_get_type()
-#define G_GRAPH_EDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_GRAPH_EDGE, GGraphEdge))
-#define G_IS_GRAPH_EDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_GRAPH_EDGE))
-#define G_GRAPH_EDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_GRAPH_EDGE, GGraphEdgeClass))
-#define G_IS_GRAPH_EDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_GRAPH_EDGE))
-#define G_GRAPH_EDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_GRAPH_EDGE, GGraphEdgeClass))
+
+
+#define G_TYPE_GRAPH_EDGE g_graph_edge_get_type()
+#define G_GRAPH_EDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_GRAPH_EDGE, GGraphEdge))
+#define G_IS_GRAPH_EDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_GRAPH_EDGE))
+#define G_GRAPH_EDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_GRAPH_EDGE, GGraphEdgeClass))
+#define G_IS_GRAPH_EDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_GRAPH_EDGE))
+#define G_GRAPH_EDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_GRAPH_EDGE, GGraphEdgeClass))
/* Lien graphique entre deux noeuds graphiques (instance) */
@@ -68,19 +71,22 @@ typedef enum _EdgeColor
GType g_graph_edge_get_type(void);
/* Etablit un lien graphique entre deux noeuds graphiques. */
-GGraphEdge *_g_graph_edge_new(const GdkPoint **, size_t, EdgeColor);
+GGraphEdge *_g_graph_edge_new(GCodeBlock *, GCodeBlock *, const GdkPoint **, size_t, EdgeColor);
+
+#define g_graph_edge_new(src, dst, pts0, pts1, pte0, pte1) \
+ _g_graph_edge_new(src, dst, (const GdkPoint *[]) { pts0, pts1, pte0, pte1 }, 4, EGC_DEFAULT)
-#define g_graph_edge_new(pts0, pts1, pte0, pte1) \
- _g_graph_edge_new((const GdkPoint *[]) { pts0, pts1, pte0, pte1 }, 4, EGC_DEFAULT)
+#define g_graph_edge_new_true(src, dst, pts0, pts1, pte0, pte1) \
+ _g_graph_edge_new(src, dst, (const GdkPoint *[]) { pts0, pts1, pte0, pte1 }, 4, EGC_GREEN)
-#define g_graph_edge_new_true(pts0, pts1, pte0, pte1) \
- _g_graph_edge_new((const GdkPoint *[]) { pts0, pts1, pte0, pte1 }, 4, EGC_GREEN)
+#define g_graph_edge_new_false(src, dst, pts0, pts1, pte0, pte1) \
+ _g_graph_edge_new(src, dst, (const GdkPoint *[]) { pts0, pts1, pte0, pte1 }, 4, EGC_RED)
-#define g_graph_edge_new_false(pts0, pts1, pte0, pte1) \
- _g_graph_edge_new((const GdkPoint *[]) { pts0, pts1, pte0, pte1 }, 4, EGC_RED)
+#define g_graph_edge_new_loop(src, dst, pts0, pts1, ptl0, ptl1, pte0, pte1) \
+ _g_graph_edge_new(src, dst, (const GdkPoint *[]) { pts0, pts1, ptl0, ptl1, pte0, pte1 }, 6, EGC_BLUE)
-#define g_graph_edge_new_loop(pts0, pts1, ptl0, ptl1, pte0, pte1) \
- _g_graph_edge_new((const GdkPoint *[]) { pts0, pts1, ptl0, ptl1, pte0, pte1 }, 6, EGC_BLUE)
+/* Fournit les deux blocs aux extrémités d'un lien. */
+void g_graph_edge_get_boundaries(const GGraphEdge *, GCodeBlock **, GCodeBlock **);
/* Fournit les abscisses des points extrèmes de la ligne. */
void g_graph_edge_get_x_borders(const GGraphEdge *, gint *, gint *);