1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
3 * LADI Session Handler (ladish)
5 * Copyright (C) 2009, 2010 Nedko Arnaudov <nedko@arnaudov.name>
7 **************************************************************************
8 * This file contains the interface to the canvas functionality
9 **************************************************************************
11 * LADI Session Handler is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * LADI Session Handler is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
23 * or write to the Free Software Foundation, Inc.,
24 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27 #ifndef CANVAS_H__BE110B39_CB54_47C2_A5B2_FFB3BA7CDA6D__INCLUDED
28 #define CANVAS_H__BE110B39_CB54_47C2_A5B2_FFB3BA7CDA6D__INCLUDED
32 typedef struct canvas_tag
{ int unused
; } * canvas_handle
;
33 typedef struct canvas_module_tag
{ int unused
; } * canvas_module_handle
;
34 typedef struct canvas_port_tag
{ int unused
; } * canvas_port_handle
;
40 } /* Adjust editor indent */
51 void (* connect_request
)(void * port1_context
, void * port2_context
),
52 void (* disconnect_request
)(void * port1_context
, void * port2_context
),
53 void (* module_location_changed
)(void * module_context
, double x
, double y
),
54 void (* fill_canvas_menu
)(GtkMenu
* menu
),
55 void (* fill_module_menu
)(GtkMenu
* menu
, void * module_context
),
56 void (* fill_port_menu
)(GtkMenu
* menu
, void * port_context
),
57 canvas_handle
* canvas_handle_ptr
);
61 canvas_handle canvas
);
65 canvas_handle canvas
);
69 canvas_handle canvas
);
78 canvas_scroll_to_center(
79 canvas_handle canvas
);
88 canvas_handle canvas
);
97 bool show_port_labels
,
98 void * module_context
,
99 canvas_module_handle
* module_handle_ptr
);
102 canvas_destroy_module(
103 canvas_handle canvas
,
104 canvas_module_handle module
);
107 canvas_set_module_name(
108 canvas_module_handle module
,
113 canvas_handle canvas
,
114 canvas_module_handle module
,
119 canvas_port_handle
* port_handle_ptr
);
123 canvas_handle canvas
,
124 canvas_port_handle port
);
127 canvas_get_port_color(
128 canvas_port_handle port
);
131 canvas_set_port_name(
132 canvas_port_handle port
,
136 canvas_add_connection(
137 canvas_handle canvas
,
138 canvas_port_handle port1
,
139 canvas_port_handle port2
,
143 canvas_remove_connection(
144 canvas_handle canvas
,
145 canvas_port_handle port1
,
146 canvas_port_handle port2
);
150 canvas_handle canvas
,
151 void * callback_context
,
152 bool (* callback
)(void * context
, canvas_module_handle module
));
155 canvas_enum_module_ports(
156 canvas_handle canvas
,
157 canvas_module_handle module
,
158 void * callback_context
,
159 bool (* callback
)(void * context
, canvas_port_handle port
));
162 { /* Adjust editor indent */
168 #endif /* #ifndef CANVAS_H__BE110B39_CB54_47C2_A5B2_FFB3BA7CDA6D__INCLUDED */