BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
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, Bst::KeyBindingItemSeq *kbseq);
51 Bst::KeyBindingItemSeq* bst_key_binding_box_get_new (GtkWidget *self);
52 BstKeyBindingKey* bst_key_binding_lookup_key (BstKeyBinding *kbinding,
53  guint keyval,
54  GdkModifierType modifier,
55  guint collision_group);
56 const BstKeyBindingFunction* bst_key_binding_lookup (BstKeyBinding *kbinding,
57  guint keyval,
58  GdkModifierType modifier,
59  guint collision_group,
60  gdouble *param);
61 guint bst_key_binding_lookup_id (BstKeyBinding *kbinding,
62  guint keyval,
63  GdkModifierType modifier,
64  guint collision_group,
65  gdouble *param);
66 void bst_key_binding_set_it3m_seq (BstKeyBinding *kbinding, const Bst::KeyBindingItemSeq &seq);
67 Bst::KeyBindingItemSeq* bst_key_binding_get_new_it3m_seq (BstKeyBinding *kbinding);
68 const gchar* bst_key_binding_rcfile (void);
69 Bse::Error bst_key_binding_dump (const gchar *file_name,
70  GSList *kbindings);
71 Bse::Error bst_key_binding_parse (const gchar *file_name,
72  GSList *kbindings);
73 GParamSpec* bst_key_binding_item_pspec (void);
74 
75 G_END_DECLS
76 
77 #endif /* __BST_KEY_BINDINGS_H__ */
Definition: bstkeybindings.hh:22
Definition: bstkeybindings.hh:29
Definition: bstapi.idl:183
Definition: bstkeybindings.hh:35