Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstcanvassource.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BST_CANVAS_SOURCE_H__
3 #define __BST_CANVAS_SOURCE_H__
4 
5 #include "bstutils.hh"
6 
7 /* --- Gtk+ type macros --- */
8 #define BST_TYPE_CANVAS_SOURCE (bst_canvas_source_get_type ())
9 #define BST_CANVAS_SOURCE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_CANVAS_SOURCE, BstCanvasSource))
10 #define BST_CANVAS_SOURCE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BST_TYPE_CANVAS_SOURCE, BstCanvasSourceClass))
11 #define BST_IS_CANVAS_SOURCE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_CANVAS_SOURCE))
12 #define BST_IS_CANVAS_SOURCE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BST_TYPE_CANVAS_SOURCE))
13 #define BST_CANVAS_SOURCE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BST_TYPE_CANVAS_SOURCE, BstCanvasSourceClass))
14 #define BST_CANVAS_SOURCE_PIXEL_SCALE ((SfiReal) 100) /* > total width/height */
15 
16 
17 /* --- structures & typedefs --- */
18 typedef struct _BstCanvasSource BstCanvasSource;
19 typedef struct _BstCanvasSourceClass BstCanvasSourceClass;
21 {
22  GnomeCanvasGroup parent_object;
23 
24  SfiProxy source;
25 
26  GtkWidget *params_dialog;
27  GtkWidget *source_info;
28 
29  GnomeCanvasItem *icon_item;
30  GnomeCanvasItem *text;
31  GSList *channel_items;
32  GSList *channel_hints;
33 
34  guint swap_channels : 1;
35  guint in_move : 1;
36  guint show_hints : 1;
37  guint idle_reposition : 1;
38  guint built_ichannels : 1;
39  guint built_ochannels : 1;
40  guint built_ihints : 1;
41  guint built_ohints : 1;
42  gdouble move_dx, move_dy;
43 };
45 {
46  GnomeCanvasGroupClass parent_class;
47 
48  void (*update_links) (BstCanvasSource *source);
49 };
50 
51 
52 /* --- prototypes --- */
53 GType bst_canvas_source_get_type (void);
54 GnomeCanvasItem* bst_canvas_source_new (GnomeCanvasGroup *group,
55  SfiProxy source);
56 void bst_canvas_source_update_links (BstCanvasSource *csource);
57 void bst_canvas_source_ochannel_pos (BstCanvasSource *csource,
58  guint ochannel,
59  gdouble *world_x,
60  gdouble *world_y);
61 void bst_canvas_source_ichannel_pos (BstCanvasSource *csource,
62  guint ichannel,
63  gdouble *world_x,
64  gdouble *world_y);
65 gboolean bst_canvas_source_is_jchannel (BstCanvasSource *csource,
66  guint ichannel);
67 gboolean bst_canvas_source_ichannel_free (BstCanvasSource *csource,
68  guint ichannel);
69 guint bst_canvas_source_ichannel_at (BstCanvasSource *csource,
70  gdouble world_x,
71  gdouble world_y);
72 guint bst_canvas_source_ochannel_at (BstCanvasSource *csource,
73  gdouble world_x,
74  gdouble world_y);
75 BstCanvasSource* bst_canvas_source_at (GnomeCanvas *csource,
76  gdouble world_x,
77  gdouble world_y);
78 void bst_canvas_source_reset_params (BstCanvasSource *csource);
79 void bst_canvas_source_popup_params (BstCanvasSource *csource);
80 void bst_canvas_source_toggle_params (BstCanvasSource *csource);
81 void bst_canvas_source_popup_info (BstCanvasSource *csource);
82 void bst_canvas_source_toggle_info (BstCanvasSource *csource);
83 void bst_canvas_source_set_channel_hints (BstCanvasSource *csource,
84  gboolean on_off);
85 
86 #endif /* __BST_CANVAS_SOURCE_H__ */
Definition: bstcanvassource.hh:20
Definition: bstcanvassource.hh:44