BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bstkeybindings.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_KEY_BINDINGS_H__
3 #define __BST_KEY_BINDINGS_H__
4 
5 #include "bstutils.hh"
6 
7 G_BEGIN_DECLS
8 
9 
10 /* --- typedefs & structures --- */
11 typedef enum /*< skip >*/
12 {
13  BST_KEY_BINDING_PARAM_NONE = 0,
14  BST_KEY_BINDING_PARAM_m1_p1, /* -1.0 - +1.0 */
15  BST_KEY_BINDING_PARAM_0_p1, /* +0.0 - +1.0 */
16  BST_KEY_BINDING_PARAM_m1_0, /* -1.0 - +0.0 */
17  BST_KEY_BINDING_PARAM_PERC, /* +0.0 - +100.0 */
18  BST_KEY_BINDING_PARAM_SHORT, /* -32 - +32 */
19  BST_KEY_BINDING_PARAM_USHORT, /* 0 - +32 */
20  BST_KEY_BINDING_PARAM_NOTE, /* midi note */
21 } BstKeyBindingParam;
22 typedef struct {
23  guint id;
24  const char *function_name;
25  BstKeyBindingParam ptype;
26  const char *function_blurb; /* translated */
27  guint collision_group;
29 typedef struct {
30  guint keyval;
31  GdkModifierType modifier;
32  guint func_index;
33  gdouble param;
36 {
37  gchar *binding_name;
38  guint n_funcs;
39  const BstKeyBindingFunction *funcs;
40  guint n_keys;
41  BstKeyBindingKey *keys;
42 };
43 
44 
45 /* --- prototypes --- */
46 GtkWidget* bst_key_binding_box (const gchar *binding_name,
47  guint n_funcs,
48  const BstKeyBindingFunction *funcs,
49  gboolean editable);
50 void bst_key_binding_box_set (GtkWidget *self,
51  BstKeyBindingItemSeq *kbseq);
52 BstKeyBindingItemSeq* bst_key_binding_box_get (GtkWidget *self);
53 BstKeyBindingKey* bst_key_binding_lookup_key (BstKeyBinding *kbinding,
54  guint keyval,
55  GdkModifierType modifier,
56  guint collision_group);
57 const BstKeyBindingFunction* bst_key_binding_lookup (BstKeyBinding *kbinding,
58  guint keyval,
59  GdkModifierType modifier,
60  guint collision_group,
61  gdouble *param);
62 guint bst_key_binding_lookup_id (BstKeyBinding *kbinding,
63  guint keyval,
64  GdkModifierType modifier,
65  guint collision_group,
66  gdouble *param);
67 void bst_key_binding_set_item_seq (BstKeyBinding *kbinding,
68  BstKeyBindingItemSeq *seq);
69 BstKeyBindingItemSeq* bst_key_binding_get_item_seq (BstKeyBinding *kbinding);
70 const gchar* bst_key_binding_rcfile (void);
71 BseErrorType bst_key_binding_dump (const gchar *file_name,
72  GSList *kbindings);
73 BseErrorType bst_key_binding_parse (const gchar *file_name,
74  GSList *kbindings);
75 GParamSpec* bst_key_binding_item_pspec (void);
76 
77 G_END_DECLS
78 
79 #endif /* __BST_KEY_BINDINGS_H__ */
Definition: bstkeybindings.hh:22
Definition: bstkeybindings.hh:29
Definition: bstkeybindings.hh:35