summaryrefslogtreecommitdiffstats
path: root/ganv/canvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'ganv/canvas.h')
-rw-r--r--ganv/canvas.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/ganv/canvas.h b/ganv/canvas.h
index e923f65..e2a9867 100644
--- a/ganv/canvas.h
+++ b/ganv/canvas.h
@@ -91,6 +91,8 @@ typedef void (*GanvEdgeFunc)(GanvEdge* edge, void* data);
*/
typedef void (*GanvNodeFunc)(GanvNode* node, void* data);
+typedef int (*GanvPortOrderFunc)(const GanvPort*, const GanvPort*, void* data);
+
/**
* ganv_canvas_new:
*
@@ -100,6 +102,22 @@ GanvCanvas*
ganv_canvas_new(double width, double height);
/**
+ * ganv_canvas_set_wrapper:
+ *
+ * Set the opaque wrapper object for the canvas.
+ */
+void
+ganv_canvas_set_wrapper(GanvCanvas* canvas, void* wrapper);
+
+/**
+ * ganv_canvas_get_wrapper:
+ *
+ * Return an opaque pointer to the wrapper for the canvas.
+ */
+void*
+ganv_canvas_get_wrapper(GanvCanvas* canvas);
+
+/**
* ganv_canvas_clear:
*
* Remove all items from the canvas.
@@ -592,6 +610,21 @@ ganv_canvas_get_move_cursor(const GanvCanvas* canvas);
void
ganv_canvas_move_contents_to(GanvCanvas* canvas, double x, double y);
+/**
+ * ganv_canvas_set_port_order:
+ * @canvas The canvas to set the default port order on.
+ * @port_cmp Port comparison function.
+ * @data Data to be passed to order.
+ *
+ * Set a comparator function to use as the default order for ports on modules.
+ * If left unset, ports are shown in the order they are added.
+ */
+void
+ganv_canvas_set_port_order(GanvCanvas* canvas,
+ GanvPortOrderFunc port_cmp,
+ void* data);
+
+
G_END_DECLS
#endif /* GANV_CANVAS_H */