Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
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 
8 /* --- structures & typedefs --- */
9 typedef enum {
10  BST_SEGMENT_LINE = 1,
11 } BstSegmentType;
12 typedef struct
13 {
14  BstSegmentType type;
15  GdkDrawable *drawable;
17 typedef struct
18 {
19  BstSegmentAny any;
20  gdouble x1, y1;
21  gdouble x2, y2;
23 typedef union
24 {
25  BstSegmentType type;
26  BstSegmentAny any;
27  BstSegmentLine line;
28 } BstSegment;
29 
30 
31 /* --- API --- */
32 void bst_segment_init (BstSegment *self,
33  BstSegmentType type,
34  GdkDrawable *drawable);
35 gint bst_segment_initialized (BstSegment *self);
36 void bst_segment_start (BstSegment *self,
37  gdouble x,
38  gdouble y);
39 void bst_segment_move_to (BstSegment *self,
40  gdouble x,
41  gdouble y);
42 void bst_segment_translate (BstSegment *self,
43  gdouble xdiff,
44  gdouble ydiff);
45 void bst_segment_xrange (BstSegment *self,
46  gdouble *x,
47  gdouble *width);
48 void bst_segment_yrange (BstSegment *self,
49  gdouble *x,
50  gdouble *height);
51 gdouble bst_segment_calcy (BstSegment *self,
52  gdouble x);
53 void bst_segment_bbox (BstSegment *self,
54  GdkRectangle *area);
55 void bst_segment_expose (BstSegment *self);
56 void bst_segment_draw (BstSegment *self,
57  GtkStyle *style);
58 void bst_segment_clear (BstSegment *self);
59 
60 #endif /* __BST_SEGMENT_H__ */
Definition: bstsegment.hh:23
int width() const
y1
int height() const
Definition: bstsegment.hh:17
Definition: bstsegment.hh:12