summaryrefslogtreecommitdiffstats
path: root/src/ganv-private.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-08 22:34:35 +0000
committerDavid Robillard <d@drobilla.net>2011-12-08 22:34:35 +0000
commitcf71d7ee9914de3936456eebe6d87948b46b2e57 (patch)
treef9a90d23a3e9e2f68adf329952de33b6e452f9b4 /src/ganv-private.h
parentf808fa7d26df3b42c0bb33c49894920b0f975ec9 (diff)
downloadganv-cf71d7ee9914de3936456eebe6d87948b46b2e57.tar.gz
ganv-cf71d7ee9914de3936456eebe6d87948b46b2e57.tar.bz2
ganv-cf71d7ee9914de3936456eebe6d87948b46b2e57.zip
Hide implementations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3837 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/ganv-private.h')
-rw-r--r--src/ganv-private.h130
1 files changed, 129 insertions, 1 deletions
diff --git a/src/ganv-private.h b/src/ganv-private.h
index b7e6eae..2f5b90b 100644
--- a/src/ganv-private.h
+++ b/src/ganv-private.h
@@ -19,9 +19,137 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
+#include <cairo.h>
+
+#include "ganv/types.h"
+
extern guint signal_moved;
+/* Box */
+
+typedef struct {
+ double x1, y1, x2, y2;
+ double border_width;
+ gboolean stacked;
+} GanvBoxCoords;
+
+struct _GanvBoxImpl {
+ GanvBoxCoords coords;
+ GanvBoxCoords old_coords;
+ double radius_tl;
+ double radius_tr;
+ double radius_br;
+ double radius_bl;
+};
+
+/* Circle */
+
+typedef struct {
+ double x, y, radius;
+ double width;
+} GanvCircleCoords;
+
+struct _GanvCircleImpl {
+ GanvCircleCoords coords;
+ GanvCircleCoords old_coords;
+};
+
+/* Edge */
+
+typedef struct {
+ double x1, y1, x2, y2;
+ double cx1, cy1, cx2, cy2;
+ double handle_x, handle_y, handle_radius;
+ double width;
+ gboolean curved;
+ gboolean arrowhead;
+} GanvEdgeCoords;
+
+struct _GanvEdgeImpl
+{
+ GanvNode* tail;
+ GanvNode* head;
+ GanvEdgeCoords coords;
+ GanvEdgeCoords old_coords;
+ double dash_length;
+ double dash_offset;
+ guint color;
+ gboolean selected;
+ gboolean highlighted;
+ gboolean ghost;
+};
+
+/* Module */
+
+struct _GanvModuleImpl
+{
+ GPtrArray* ports;
+ GnomeCanvasItem* icon_box;
+ GnomeCanvasItem* embed_item;
+ int embed_width;
+ int embed_height;
+ double widest_input;
+ double widest_output;
+ gboolean show_port_labels;
+ gboolean must_resize;
+ gboolean port_size_changed;
+};
+
+/* Node */
+
+struct _GanvNodeImpl {
+ struct _GanvNode* partner;
+ GanvText* label;
+ double dash_length;
+ double dash_offset;
+ double border_width;
+ guint fill_color;
+ guint border_color;
+ gboolean can_tail;
+ gboolean can_head;
+ gboolean selected;
+ gboolean highlighted;
+ gboolean draggable;
+};
+
+/* Port */
+
+typedef struct {
+ GanvBox* rect;
+ float value;
+ float min;
+ float max;
+ gboolean is_toggle;
+} GanvPortControl;
+
+struct _GanvPortImpl {
+ GanvPortControl* control;
+ gboolean is_input;
+};
+
+/* Text */
+
+typedef struct
+{
+ double x;
+ double y;
+ double width;
+ double height;
+} GanvTextCoords;
+
+struct _GanvTextImpl
+{
+ cairo_surface_t* surface;
+ char* text;
+ GanvTextCoords coords;
+ GanvTextCoords old_coords;
+ guint color;
+ gboolean needs_layout;
+};
+
+/* Canvas */
+
void
ganv_canvas_add_node(GanvCanvas* canvas,
GanvNode* node);