BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bstsegment.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BST_SEGMENT_H__
00003 #define __BST_SEGMENT_H__
00004 
00005 #include "bstutils.hh"
00006 
00007 G_BEGIN_DECLS
00008 
00009 
00010 /* --- structures & typedefs --- */
00011 typedef enum {
00012   BST_SEGMENT_LINE = 1,
00013 } BstSegmentType;
00014 typedef struct
00015 {
00016   BstSegmentType type;
00017   GdkDrawable   *drawable;
00018 } BstSegmentAny;
00019 typedef struct
00020 {
00021   BstSegmentAny  any;
00022   gdouble        x1, y1;
00023   gdouble        x2, y2;
00024 } BstSegmentLine;
00025 typedef union
00026 {
00027   BstSegmentType   type;
00028   BstSegmentAny    any;
00029   BstSegmentLine   line;
00030 } BstSegment;
00031 
00032 
00033 /* --- API --- */
00034 void    bst_segment_init        (BstSegment     *self,
00035                                  BstSegmentType  type,
00036                                  GdkDrawable    *drawable);
00037 gint    bst_segment_initialized (BstSegment     *self);
00038 void    bst_segment_start       (BstSegment     *self,
00039                                  gdouble         x,
00040                                  gdouble         y);
00041 void    bst_segment_move_to     (BstSegment     *self,
00042                                  gdouble         x,
00043                                  gdouble         y);
00044 void    bst_segment_translate   (BstSegment     *self,
00045                                  gdouble         xdiff,
00046                                  gdouble         ydiff);
00047 void    bst_segment_xrange      (BstSegment     *self,
00048                                  gdouble        *x,
00049                                  gdouble        *width);
00050 void    bst_segment_yrange      (BstSegment     *self,
00051                                  gdouble        *x,
00052                                  gdouble        *height);
00053 gdouble bst_segment_calcy       (BstSegment     *self,
00054                                  gdouble         x);
00055 void    bst_segment_bbox        (BstSegment     *self,
00056                                  GdkRectangle   *area);
00057 void    bst_segment_expose      (BstSegment     *self);
00058 void    bst_segment_draw        (BstSegment     *self,
00059                                  GtkStyle       *style);
00060 void    bst_segment_clear       (BstSegment     *self);
00061 
00062 G_END_DECLS
00063 
00064 #endif /* __BST_SEGMENT_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines