BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bstscrollgraph.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_SCROLLGRAPH_H__
00003 #define __BST_SCROLLGRAPH_H__
00004 
00005 #include "bstutils.hh"
00006 
00007 G_BEGIN_DECLS
00008 
00009 /* --- type macros --- */
00010 #define BST_TYPE_SCROLLGRAPH              (bst_scrollgraph_get_type ())
00011 #define BST_SCROLLGRAPH(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_SCROLLGRAPH, BstScrollgraph))
00012 #define BST_SCROLLGRAPH_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), BST_TYPE_SCROLLGRAPH, BstScrollgraphClass))
00013 #define BST_IS_SCROLLGRAPH(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_SCROLLGRAPH))
00014 #define BST_IS_SCROLLGRAPH_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), BST_TYPE_SCROLLGRAPH))
00015 #define BST_SCROLLGRAPH_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((obj), BST_TYPE_SCROLLGRAPH, BstScrollgraphClass))
00016 
00017 /* --- structures & typedefs --- */
00018 typedef struct _BstScrollgraph      BstScrollgraph;
00019 typedef struct _BstScrollgraphClass BstScrollgraphClass;
00020 struct _BstScrollgraph
00021 {
00022   GtkBin          parent_instance;
00023   BstDirection    direction;
00024   guint           window_size : 24;
00025   guint           flip : 1;
00026   guint           delete_toplevel : 1;  /* upon proxy::release */
00027   guint           mix_freq;
00028   gdouble         boost;
00029   guint           n_points;
00030   guint           n_bars;
00031   guint           bar_offset; /* start of ring-buffer */
00032   gfloat         *values;     /* [n_points * n_bars] */
00033   GdkPixbuf      *pixbuf;     /* n_points wide or high */
00034   GdkWindow      *canvas;
00035   SfiProxy        source;
00036   guint           ochannel;
00037 };
00038 struct _BstScrollgraphClass
00039 {
00040   GtkBinClass parent_class;
00041   void  (*resize_values) (BstScrollgraph *self,
00042                           BstDirection    direction);
00043 };
00044 
00045 /* --- public methods --- */
00046 GType           bst_scrollgraph_get_type        (void);
00047 void            bst_scrollgraph_clear           (BstScrollgraph *self);
00048 void            bst_scrollgraph_set_source      (BstScrollgraph *self,
00049                                                  SfiProxy        source,
00050                                                  guint           ochannel);
00051 GtkWidget*      bst_scrollgraph_build_dialog    (GtkWidget      *alive_object,
00052                                                  SfiProxy        source,
00053                                                  guint           ochannel);
00054 
00055 G_END_DECLS
00056 
00057 #endif /* __BST_SCROLLGRAPH_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines