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.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/gtkext/graph/edge.h b/src/gtkext/graph/edge.h
index 64d9658..602c559 100644
--- a/src/gtkext/graph/edge.h
+++ b/src/gtkext/graph/edge.h
@@ -26,17 +26,16 @@
#include <glib-object.h>
-
-
-#include "ranks.h"
-#include "nodes/flow.h"
+#include <stdbool.h>
+#include <gtk/gtk.h>
#define G_TYPE_GRAPH_EDGE g_graph_edge_get_type()
-#define G_GRAPH_EDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_graph_edge_get_type(), GGraphEdge))
-#define G_IS_GRAPH_EDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_graph_edge_get_type()))
-#define G_GRAPH_EDGE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_graph_edge_get_type(), GGraphEdgeIface))
+#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))
@@ -65,19 +64,19 @@ typedef enum _EdgeColor
GType g_graph_edge_get_type(void);
/* Etablit un lien graphique entre deux noeuds graphiques. */
-GGraphEdge *g_graph_edge_new(GFlowNode *, node_slot_t *, GFlowNode *, node_slot_t *, EdgeColor);
+GGraphEdge *_g_graph_edge_new(const GdkPoint *, const GdkPoint **, size_t, const GdkPoint *, EdgeColor);
-/* Etablit la comparaison entre deux liens graphiques. */
-int g_graph_edge_compare(const GGraphEdge **, const GGraphEdge **);
+#define g_graph_edge_new(start, y, end) \
+ _g_graph_edge_new(start, (const GdkPoint *[]) { y }, 1, end, EGC_DEFAULT)
-/* Prend les dispositions nécessaires à l'insertion du lien. */
-void g_graph_edge_reserve_vertical_space(GGraphEdge *, GGraphNode *, GGraphRanks *);
+#define g_graph_edge_new_true(start, y, end) \
+ _g_graph_edge_new(start, (const GdkPoint *[]) { y }, 1, end, EGC_GREEN)
-/* Prend les dispositions nécessaires à l'insertion du lien. */
-void g_graph_edge_reserve_horizontal_space(GGraphEdge *, GGraphRanks *);
+#define g_graph_edge_new_false(start, y, end) \
+ _g_graph_edge_new(start, (const GdkPoint *[]) { y }, 1, end, EGC_RED)
-/* Etablit le tracé du lien graphique entre deux noeuds. */
-void g_graph_edge_compute(GGraphEdge *, GGraphRanks *);
+/* Détermine les positions finales d'un lien graphique. */
+void g_graph_edge_resolve(GGraphEdge *);
/* Dessine les liens graphiques enregistrés dans le moteur. */
void g_graph_edge_draw(const GGraphEdge *, cairo_t *, bool);