2 #ifndef __BST_QSAMPLER_H__
3 #define __BST_QSAMPLER_H__
10 #define BST_TYPE_QSAMPLER (bst_qsampler_get_type ())
11 #define BST_QSAMPLER(object) (GTK_CHECK_CAST ((object), BST_TYPE_QSAMPLER, BstQSampler))
12 #define BST_QSAMPLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), BST_TYPE_QSAMPLER, BstQSamplerClass))
13 #define BST_IS_QSAMPLER(object) (GTK_CHECK_TYPE ((object), BST_TYPE_QSAMPLER))
14 #define BST_IS_QSAMPLER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), BST_TYPE_QSAMPLER))
15 #define BST_QSAMPLER_GET_CLASS(obj) ((BstQSamplerClass*) ((GtkObject*) (obj))->klass)
24 typedef struct _BstQSamplerSource BstQSamplerSource;
25 typedef struct _BstQSamplerBlock BstQSamplerBlock;
28 typedef guint (*BstQSamplerFill) (gpointer data,
33 BstQSamplerPeak *values,
34 BstQSampler *qsampler);
38 BST_QSAMPLER_ACTIVE = 1 << 1,
39 BST_QSAMPLER_SELECTED = 1 << 2,
41 BST_QSAMPLER_PRELIGHT = 1 << 3,
44 BST_QSAMPLER_MARK_MASK = (BST_QSAMPLER_SELECTED | BST_QSAMPLER_ACTIVE | BST_QSAMPLER_PRELIGHT),
45 BST_QSAMPLER_REGION_MASK = (BST_QSAMPLER_SELECTED | BST_QSAMPLER_ACTIVE),
46 BST_QSAMPLER_MARK = 1 << 4,
47 BST_QSAMPLER_MASK = 0x1f,
48 BST_QSAMPLER_SKIP = 1 << 5,
49 BST_QSAMPLER_NEEDS_DRAW = 1 << 6,
50 BST_QSAMPLER_DIRTY = 1 << 7
53 constexpr BstQSamplerType operator& (BstQSamplerType s1, BstQSamplerType s2) {
return BstQSamplerType (s1 & (
long long unsigned) s2); }
54 inline BstQSamplerType& operator&= (BstQSamplerType &s1, BstQSamplerType s2) { s1 = s1 & s2;
return s1; }
55 constexpr BstQSamplerType operator| (BstQSamplerType s1, BstQSamplerType s2) {
return BstQSamplerType (s1 | (
long long unsigned) s2); }
56 inline BstQSamplerType& operator|= (BstQSamplerType &s1, BstQSamplerType s2) { s1 = s1 | s2;
return s1; }
57 constexpr BstQSamplerType operator~ (BstQSamplerType s1) {
return BstQSamplerType (~(
long long unsigned) s1); }
60 #define BST_QSAMPLER_RELOAD_PRIORITY (GTK_PRIORITY_REDRAW + 5)
66 GtkWidget parent_instance;
70 BstQSamplerTPeak *peaks;
77 BstQSamplerMark *marks;
79 BstQSamplerRegion *regions;
81 BstQSamplerFill src_filler;
83 GDestroyNotify src_destroy;
86 GtkAdjustment *adjustment;
87 gdouble vscale_factor;
90 GdkGC *red_gc, *green_gc;
92 Bst::QSamplerDrawMode draw_mode;
93 guint expose_frame : 1;
94 guint ignore_adjustment : 1;
95 guint refresh_queued : 1;
96 guint invalid_remains : 1;
113 GtkWidgetClass parent_class;
118 BstQSamplerType type;
124 BstQSamplerType type;
131 GType bst_qsampler_get_type (
void);
132 void bst_qsampler_set_source (BstQSampler *qsampler,
133 guint n_total_samples,
134 BstQSamplerFill fill_func,
136 GDestroyNotify destroy);
137 void bst_qsampler_get_bounds (BstQSampler *qsampler,
140 gboolean bst_qsampler_get_offset_at (BstQSampler *qsampler,
142 void bst_qsampler_scroll_show (BstQSampler *qsampler,
144 void bst_qsampler_scroll_rbounded (BstQSampler *qsampler,
146 gfloat boundary_padding,
148 void bst_qsampler_scroll_lbounded (BstQSampler *qsampler,
150 gfloat boundary_padding,
152 void bst_qsampler_scroll_bounded (BstQSampler *qsampler,
154 gfloat boundary_padding,
156 void bst_qsampler_scroll_to (BstQSampler *qsampler,
158 void bst_qsampler_force_refresh (BstQSampler *qsampler);
159 void bst_qsampler_set_mark (BstQSampler *qsampler,
162 BstQSamplerType type);
163 gint bst_qsampler_get_mark_offset (BstQSampler *qsampler,
165 void bst_qsampler_set_region (BstQSampler *qsampler,
169 BstQSamplerType type);
170 void bst_qsampler_set_zoom (BstQSampler *qsampler,
172 void bst_qsampler_set_vscale (BstQSampler *qsampler,
174 void bst_qsampler_set_draw_mode (BstQSampler *qsampler, Bst::QSamplerDrawMode dmode);
175 void bst_qsampler_set_adjustment (BstQSampler *qsampler,
176 GtkAdjustment *adjustment);
178 void bst_qsampler_set_source_from_esample (BstQSampler *qsampler,
Definition: bstqsampler.hh:107
Definition: bstqsampler.hh:121
Definition: bstqsampler.hh:111
Definition: bstqsampler.hh:115
Definition: bstqsampler.hh:64
Definition: bstqsampler.hh:102