LiVES  3.0.2
keyboard.h
Go to the documentation of this file.
1 // keyboard.h
2 // LiVES
3 // (c) G. Finch 2004 - 2016 <salsaman+lives@gmail.com>
4 // see file ../COPYING for licensing details
5 
6 #define LIVES_XEVENT_TYPE_KEYPRESS 2
7 #define LIVES_XEVENT_TYPE_KEYRELEASE 3
8 
9 // repeating keys
10 uint16_t cached_key;
11 uint16_t cached_mod;
12 
13 // these keys should be cached on a key down and sent every time until a key up
14 #define key_left 100
15 #define key_left2 113
16 #define key_right 102
17 #define key_right2 114
18 #define key_up 98
19 #define key_up2 111
20 #define key_down 104
21 #define key_down2 116
22 
23 boolean key_press_or_release(LiVESWidget *, LiVESXEventKey *, livespointer);
24 
25 boolean ext_triggers_poll(livespointer);
26 
27 /* #if defined HAVE_X11 */
28 /* LiVESFilterReturn filter_func(LiVESXXEvent *xevent, LiVESXEvent *event, livespointer data); ///< unused ? */
29 /* #endif */
30 
31 void handle_cached_keys(void);
32 
33 boolean pl_key_function(boolean down, uint16_t unicode, uint16_t keymod);
34 
36 
37 boolean faster_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
38 
39 boolean slower_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
40 
41 boolean skip_back_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
42 
43 boolean skip_forward_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
44 
45 boolean stop_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
46 
47 boolean rec_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
48 
49 boolean loop_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
50 
51 boolean loop_cont_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
52 
53 boolean ping_pong_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
54 
55 boolean dblsize_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
56 
57 boolean showfct_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
58 
59 boolean showsubs_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
60 
61 boolean fullscreen_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
62 
63 boolean sepwin_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
64 
65 boolean fade_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data);
66 
67 #define KEY_RPT_INTERVAL 4
68 
70 /* can be over-ridden in prefs */
71 #define DEF_MIDI_CHECK_RATE 1000
72 
74 #define DEF_MIDI_RPT 1000
boolean skip_back_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:365
boolean fade_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:407
boolean loop_cont_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:395
boolean skip_forward_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:371
boolean ping_pong_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:401
boolean showsubs_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:419
boolean slower_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:353
boolean faster_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:359
boolean rec_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:437
boolean dblsize_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:431
boolean pl_key_function(boolean down, uint16_t unicode, uint16_t keymod)
all funky stuff with keys
Definition: keyboard.c:162
boolean stop_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:377
boolean key_press_or_release(LiVESWidget *, LiVESXEventKey *, livespointer)
wrapper for pl_key_function
Definition: keyboard.c:143
boolean ext_triggers_poll(livespointer)
poll for external playback start
Definition: keyboard.c:75
boolean showfct_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:413
boolean sepwin_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:389
boolean loop_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:425
uint16_t cached_key
Definition: keyboard.h:10
void handle_cached_keys(void)
smooth the key repeat for scratching
Definition: keyboard.c:148
uint16_t cached_mod
Definition: keyboard.h:11
boolean fullscreen_callback(LiVESAccelGroup *, LiVESObject *, uint32_t, LiVESXModifierType, livespointer user_data)
Definition: keyboard.c:383