BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bstdial.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_DIAL_H__
3 #define __BST_DIAL_H__
4 
5 #include <gtk/gtkadjustment.h>
6 #include <gtk/gtkwidget.h>
7 
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif /* __cplusplus */
12 
13 
14 #define BST_TYPE_DIAL (bst_dial_get_type ())
15 #define BST_DIAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_DIAL, BstDial))
16 #define BST_DIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BST_TYPE_DIAL, BstDialClass))
17 #define BST_IS_DIAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_DIAL))
18 #define BST_IS_DIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BST_TYPE_DIAL))
19 #define BST_DIAL_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((obj), BST_TYPE_DIAL, BstDialClass))
20 
21 
22 typedef struct _BstDial BstDial;
23 typedef struct _BstDialClass BstDialClass;
24 struct _BstDial
25 {
26  GtkWidget parent_object;
27 
28  /* The update policy: GTK_UPDATE_CONTINUOUS,
29  * GTK_UPDATE_DISCONTINUOUS or GTK_UPDATE_DELAYED
30  */
31  GtkUpdateType update_policy;
32 
33  GtkWidget *align_widget;
34  guint align_width : 1;
35 
36  /* The button currently pressed or 0 if none */
37  guint8 button;
38 
39  /* Dimensions of dial components */
40  gint radius;
41  gint pointer_width;
42 
43  /* ID of update timer for delayed updates, or 0 if none */
44  guint timer;
45 
46  /* Current angle of the pointer */
47  gdouble angle;
48 
49  /* Old values from GtkAdjustment, stored so we know when something changed */
50  gdouble old_value;
51  gdouble old_lower;
52  gdouble old_upper;
53  gdouble old_page_size;
54 
55  /* The adjustment object that stores the data for this dial */
56  GtkObject *adjustment;
57 };
59 {
60  GtkWidgetClass parent_class;
61 };
62 
63 
64 GtkType bst_dial_get_type (void);
65 GtkWidget* bst_dial_new (GtkAdjustment *adjustment);
66 void bst_dial_set_adjustment (BstDial *dial,
67  GtkAdjustment *adjustment);
68 GtkAdjustment* bst_dial_get_adjustment (BstDial *dial);
69 void bst_dial_set_update_policy (BstDial *dial,
70  GtkUpdateType policy);
71 void bst_dial_set_align_widget (BstDial *dial,
72  GtkWidget *widget,
73  gboolean width_align,
74  gboolean height_align);
75 
76 #ifdef __cplusplus
77 }
78 #endif /* __cplusplus */
79 
80 #endif /* __BST_DIAL_H__ */
81 
Definition: bstdial.hh:24
Definition: bstdial.hh:58