Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
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 
8 /* --- typedefs & structures --- */
9 typedef enum /*< skip >*/
10 {
11  BST_KEY_BINDING_PARAM_NONE = 0,
12  BST_KEY_BINDING_PARAM_m1_p1, /* -1.0 - +1.0 */
13  BST_KEY_BINDING_PARAM_0_p1, /* +0.0 - +1.0 */
14  BST_KEY_BINDING_PARAM_m1_0, /* -1.0 - +0.0 */
15  BST_KEY_BINDING_PARAM_PERC, /* +0.0 - +100.0 */
16  BST_KEY_BINDING_PARAM_SHORT, /* -32 - +32 */
17  BST_KEY_BINDING_PARAM_USHORT, /* 0 - +32 */
18  BST_KEY_BINDING_PARAM_NOTE, /* midi note */
19 } BstKeyBindingParam;
20 typedef struct {
21  guint id;
22  const char *function_name;
23  BstKeyBindingParam ptype;
24  const char *function_blurb; /* translated */
25  guint collision_group;
27 typedef struct {
28  guint keyval;
29  GdkModifierType modifier;
30  guint func_index;
31  gdouble param;
34 {
35  gchar *binding_name;
36  guint n_funcs;
37  const BstKeyBindingFunction *funcs;
38  guint n_keys;
39  BstKeyBindingKey *keys;
40 };
41 
42 
43 /* --- prototypes --- */
44 GtkWidget* bst_key_binding_box (const gchar *binding_name,
45  guint n_funcs,
46  const BstKeyBindingFunction *funcs,
47  gboolean editable);
48 void bst_key_binding_box_set (GtkWidget *self, Bst::KeyBindingItemSeq *kbseq);
49 Bst::KeyBindingItemSeq* bst_key_binding_box_get_new (GtkWidget *self);
50 BstKeyBindingKey* bst_key_binding_lookup_key (BstKeyBinding *kbinding,
51  guint keyval,
52  GdkModifierType modifier,
53  guint collision_group);
54 const BstKeyBindingFunction* bst_key_binding_lookup (BstKeyBinding *kbinding,
55  guint keyval,
56  GdkModifierType modifier,
57  guint collision_group,
58  gdouble *param);
59 guint bst_key_binding_lookup_id (BstKeyBinding *kbinding,
60  guint keyval,
61  GdkModifierType modifier,
62  guint collision_group,
63  gdouble *param);
64 void bst_key_binding_set_it3m_seq (BstKeyBinding *kbinding, const Bst::KeyBindingItemSeq &seq);
65 Bst::KeyBindingItemSeq* bst_key_binding_get_new_it3m_seq (BstKeyBinding *kbinding);
66 const gchar* bst_key_binding_rcfile (void);
67 Bse::Error bst_key_binding_dump (const gchar *file_name,
68  GSList *kbindings);
69 Bse::Error bst_key_binding_parse (const gchar *file_name,
70  GSList *kbindings);
71 GParamSpec* bst_key_binding_item_pspec (void);
72 
73 #endif /* __BST_KEY_BINDINGS_H__ */
Definition: bstkeybindings.hh:20
Definition: bstkeybindings.hh:27
Definition: bstkeybindings.hh:33