BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
bstsegment.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_SEGMENT_H__
3 #define __BST_SEGMENT_H__
4 
5 #include "bstutils.hh"
6 
7 G_BEGIN_DECLS
8 
9 
10 /* --- structures & typedefs --- */
11 typedef enum {
12  BST_SEGMENT_LINE = 1,
13 } BstSegmentType;
14 typedef struct
15 {
16  BstSegmentType type;
17  GdkDrawable *drawable;
19 typedef struct
20 {
21  BstSegmentAny any;
22  gdouble x1, y1;
23  gdouble x2, y2;
25 typedef union
26 {
27  BstSegmentType type;
28  BstSegmentAny any;
29  BstSegmentLine line;
30 } BstSegment;
31 
32 
33 /* --- API --- */
34 void bst_segment_init (BstSegment *self,
35  BstSegmentType type,
36  GdkDrawable *drawable);
37 gint bst_segment_initialized (BstSegment *self);
38 void bst_segment_start (BstSegment *self,
39  gdouble x,
40  gdouble y);
41 void bst_segment_move_to (BstSegment *self,
42  gdouble x,
43  gdouble y);
44 void bst_segment_translate (BstSegment *self,
45  gdouble xdiff,
46  gdouble ydiff);
47 void bst_segment_xrange (BstSegment *self,
48  gdouble *x,
49  gdouble *width);
50 void bst_segment_yrange (BstSegment *self,
51  gdouble *x,
52  gdouble *height);
53 gdouble bst_segment_calcy (BstSegment *self,
54  gdouble x);
55 void bst_segment_bbox (BstSegment *self,
56  GdkRectangle *area);
57 void bst_segment_expose (BstSegment *self);
58 void bst_segment_draw (BstSegment *self,
59  GtkStyle *style);
60 void bst_segment_clear (BstSegment *self);
61 
62 G_END_DECLS
63 
64 #endif /* __BST_SEGMENT_H__ */
Definition: bstsegment.hh:25
y1
Definition: bstsegment.hh:19
Definition: bstsegment.hh:14