Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gxklogadjustment.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 __GXK_LOG_ADJUSTMENT_H__
3 #define __GXK_LOG_ADJUSTMENT_H__
4 
5 #include <gxk/gxkutils.hh>
6 
7 /* --- type macros --- */
8 #define GXK_TYPE_ADAPTER_ADJUSTMENT (gxk_adapter_adjustment_get_type ())
9 #define GXK_ADAPTER_ADJUSTMENT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GXK_TYPE_ADAPTER_ADJUSTMENT, GxkAdapterAdjustment))
10 #define GXK_ADAPTER_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXK_TYPE_ADAPTER_ADJUSTMENT, GxkAdapterAdjustmentClass))
11 #define GXK_IS_ADAPTER_ADJUSTMENT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GXK_TYPE_ADAPTER_ADJUSTMENT))
12 #define GXK_IS_ADAPTER_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXK_TYPE_ADAPTER_ADJUSTMENT))
13 #define GXK_ADAPTER_ADJUSTMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GXK_TYPE_ADAPTER_ADJUSTMENT, GxkAdapterAdjustmentClass))
14 
15 /* --- structures & typedefs --- */
16 typedef struct _GxkAdapterAdjustment GxkAdapterAdjustment;
17 typedef struct _GxkAdapterAdjustmentClass GxkAdapterAdjustmentClass;
18 typedef enum {
19  GXK_ADAPTER_ADJUSTMENT_CONVERT_TO_CLIENT,
20  GXK_ADAPTER_ADJUSTMENT_CONVERT_FROM_CLIENT,
21  GXK_ADAPTER_ADJUSTMENT_CONVERT_STEP_INCREMENT, /* from client */
22  GXK_ADAPTER_ADJUSTMENT_CONVERT_PAGE_INCREMENT, /* from client */
23  GXK_ADAPTER_ADJUSTMENT_CONVERT_PAGE_SIZE, /* from client */
24 } GxkAdapterAdjustmentConvertType;
25 typedef gdouble (*GxkAdapterAdjustmentFunc) (GxkAdapterAdjustment *self,
26  GxkAdapterAdjustmentConvertType convert_type,
27  gdouble value,
28  gpointer data);
30 {
31  GtkAdjustment parent_instance;
32 
33  guint block_client;
34  GtkAdjustment *client;
35 
36  GxkAdapterAdjustmentFunc conv_func;
37  gpointer data;
38  GDestroyNotify destroy;
39 };
41 {
42  GtkAdjustmentClass parent_class;
43 };
44 
45 /* --- prototypes --- */
46 GType gxk_adapter_adjustment_get_type (void);
47 void gxk_adapter_adjustment_set_client (GxkAdapterAdjustment *self,
48  GtkAdjustment *client);
49 void gxk_adapter_adjustment_setup (GxkAdapterAdjustment *self,
50  GxkAdapterAdjustmentFunc conv_func,
51  gpointer data,
52  GDestroyNotify destroy);
53 GtkAdjustment* gxk_adapter_adjustment_from_adj (GtkAdjustment *client,
54  GxkAdapterAdjustmentFunc conv_func,
55  gpointer data,
56  GDestroyNotify destroy);
57 
58 /* --- type macros --- */
59 #define GXK_TYPE_LOG_ADJUSTMENT (gxk_log_adjustment_get_type ())
60 #define GXK_LOG_ADJUSTMENT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GXK_TYPE_LOG_ADJUSTMENT, GxkLogAdjustment))
61 #define GXK_LOG_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXK_TYPE_LOG_ADJUSTMENT, GxkLogAdjustmentClass))
62 #define GXK_IS_LOG_ADJUSTMENT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GXK_TYPE_LOG_ADJUSTMENT))
63 #define GXK_IS_LOG_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXK_TYPE_LOG_ADJUSTMENT))
64 #define GXK_LOG_ADJUSTMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GXK_TYPE_LOG_ADJUSTMENT, GxkLogAdjustmentClass))
65 
66 /* --- structures & typedefs --- */
67 typedef struct _GxkLogAdjustment GxkLogAdjustment;
68 typedef struct _GxkLogAdjustmentClass GxkLogAdjustmentClass;
70 {
71  GtkAdjustment parent_instance;
72 
73  /* settings */
74  gdouble center;
75  gdouble n_steps;
76  gdouble base;
77  GtkAdjustment *client;
78 
79  guint block_client;
80  gdouble base_ln;
81  gdouble llimit;
82  gdouble ulimit;
83 };
85 {
86  GtkAdjustmentClass parent_class;
87 };
88 
89 /* --- prototypes --- */
90 GType gxk_log_adjustment_get_type (void);
91 void gxk_log_adjustment_set_client (GxkLogAdjustment *self,
92  GtkAdjustment *client);
93 GtkAdjustment* gxk_log_adjustment_from_adj (GtkAdjustment *client);
94 void gxk_log_adjustment_setup (GxkLogAdjustment *self,
95  gdouble center,
96  gdouble base,
97  gdouble n_steps);
98 #endif /* __GXK_LOG_ADJUSTMENT_H__ */
Definition: gxklogadjustment.hh:84
Definition: gxklogadjustment.hh:29
Definition: gxklogadjustment.hh:69
ulimit
Definition: gxklogadjustment.hh:40