BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
bstscrollgraph.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_SCROLLGRAPH_H__
3 #define __BST_SCROLLGRAPH_H__
4 
5 #include "bstutils.hh"
6 
7 G_BEGIN_DECLS
8 
9 /* --- type macros --- */
10 #define BST_TYPE_SCROLLGRAPH (bst_scrollgraph_get_type ())
11 #define BST_SCROLLGRAPH(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_SCROLLGRAPH, BstScrollgraph))
12 #define BST_SCROLLGRAPH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BST_TYPE_SCROLLGRAPH, BstScrollgraphClass))
13 #define BST_IS_SCROLLGRAPH(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_SCROLLGRAPH))
14 #define BST_IS_SCROLLGRAPH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BST_TYPE_SCROLLGRAPH))
15 #define BST_SCROLLGRAPH_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((obj), BST_TYPE_SCROLLGRAPH, BstScrollgraphClass))
16 
17 /* --- structures & typedefs --- */
18 typedef struct _BstScrollgraph BstScrollgraph;
19 typedef struct _BstScrollgraphClass BstScrollgraphClass;
21 {
22  GtkBin parent_instance;
23  Bst::Direction direction;
24  uint window_size;
25  guint flip : 1;
26  guint delete_toplevel : 1; /* upon proxy::release */
27  guint mix_freq;
28  gdouble boost;
29  guint n_points;
30  guint n_bars;
31  guint bar_offset; /* start of ring-buffer */
32  gfloat *values; /* [n_points * n_bars] */
33  GdkPixbuf *pixbuf; /* n_points wide or high */
34  GdkWindow *canvas;
35  SfiProxy source;
36  guint ochannel;
37 };
39 {
40  GtkBinClass parent_class;
41  void (*resize_values) (BstScrollgraph *self, Bst::Direction direction);
42 };
43 
44 /* --- public methods --- */
45 GType bst_scrollgraph_get_type (void);
46 void bst_scrollgraph_clear (BstScrollgraph *self);
47 void bst_scrollgraph_set_source (BstScrollgraph *self,
48  SfiProxy source,
49  guint ochannel);
50 GtkWidget* bst_scrollgraph_build_dialog (GtkWidget *alive_object,
51  SfiProxy source,
52  guint ochannel);
53 
54 G_END_DECLS
55 
56 #endif /* __BST_SCROLLGRAPH_H__ */
Definition: bstscrollgraph.hh:20
Definition: bstscrollgraph.hh:38