Mercurial > mplayer.hg
annotate input/input.h @ 27687:2f1ba3093d7d
synced with r27718
author | Gabrov |
---|---|
date | Sun, 05 Oct 2008 13:43:45 +0000 |
parents | d7e0e33c546f |
children | 9e739bdb049c |
rev | line source |
---|---|
26029 | 1 #ifndef MPLAYER_INPUT_H |
2 #define MPLAYER_INPUT_H | |
25553
6ac1ece1f9fe
Add multiple inclusion guards to all header files that lack them.
diego
parents:
25502
diff
changeset
|
3 |
10867 | 4 // All command IDs |
27066 | 5 typedef enum { |
6 MP_CMD_SEEK, | |
7 MP_CMD_AUDIO_DELAY, | |
8 MP_CMD_QUIT, | |
9 MP_CMD_PAUSE, | |
10 MP_CMD_GRAB_FRAMES, // deprecated: was a no-op command for years | |
11 MP_CMD_PLAY_TREE_STEP, | |
12 MP_CMD_PLAY_TREE_UP_STEP, | |
13 MP_CMD_PLAY_ALT_SRC_STEP, | |
14 MP_CMD_SUB_DELAY, | |
15 MP_CMD_OSD, | |
16 MP_CMD_VOLUME, | |
17 MP_CMD_MIXER_USEMASTER, | |
18 MP_CMD_CONTRAST, | |
19 MP_CMD_BRIGHTNESS, | |
20 MP_CMD_HUE, | |
21 MP_CMD_SATURATION, | |
22 MP_CMD_FRAMEDROPPING, | |
23 MP_CMD_TV_STEP_CHANNEL, | |
24 MP_CMD_TV_STEP_NORM, | |
25 MP_CMD_TV_STEP_CHANNEL_LIST, | |
26 MP_CMD_VO_FULLSCREEN, | |
27 MP_CMD_SUB_POS, | |
28 MP_CMD_DVDNAV, | |
29 MP_CMD_SCREENSHOT, | |
30 MP_CMD_PANSCAN, | |
31 MP_CMD_MUTE, | |
32 MP_CMD_LOADFILE, | |
33 MP_CMD_LOADLIST, | |
34 MP_CMD_VF_CHANGE_RECTANGLE, | |
35 MP_CMD_GAMMA, | |
36 MP_CMD_SUB_VISIBILITY, | |
37 MP_CMD_VOBSUB_LANG, // deprecated: combined with SUB_SELECT | |
38 MP_CMD_MENU, | |
39 MP_CMD_SET_MENU, | |
40 MP_CMD_GET_TIME_LENGTH, | |
41 MP_CMD_GET_PERCENT_POS, | |
42 MP_CMD_SUB_STEP, | |
43 MP_CMD_TV_SET_CHANNEL, | |
44 MP_CMD_EDL_MARK, | |
45 MP_CMD_SUB_ALIGNMENT, | |
46 MP_CMD_TV_LAST_CHANNEL, | |
47 MP_CMD_OSD_SHOW_TEXT, | |
48 MP_CMD_TV_SET_FREQ, | |
49 MP_CMD_TV_SET_NORM, | |
50 MP_CMD_TV_SET_BRIGHTNESS, | |
51 MP_CMD_TV_SET_CONTRAST, | |
52 MP_CMD_TV_SET_HUE, | |
53 MP_CMD_TV_SET_SATURATION, | |
54 MP_CMD_GET_VO_FULLSCREEN, | |
55 MP_CMD_GET_SUB_VISIBILITY, | |
56 MP_CMD_SUB_FORCED_ONLY, | |
57 MP_CMD_VO_ONTOP, | |
58 MP_CMD_SUB_SELECT, | |
59 MP_CMD_VO_ROOTWIN, | |
60 MP_CMD_SWITCH_VSYNC, | |
61 MP_CMD_SWITCH_RATIO, | |
62 MP_CMD_FRAME_STEP, | |
63 MP_CMD_SPEED_INCR, | |
64 MP_CMD_SPEED_MULT, | |
65 MP_CMD_SPEED_SET, | |
66 MP_CMD_RUN, | |
67 MP_CMD_SUB_LOG, | |
68 MP_CMD_SWITCH_AUDIO, | |
69 MP_CMD_GET_TIME_POS, | |
70 MP_CMD_SUB_LOAD, | |
71 MP_CMD_SUB_REMOVE, | |
72 MP_CMD_KEYDOWN_EVENTS, | |
73 MP_CMD_VO_BORDER, | |
74 MP_CMD_SET_PROPERTY, | |
75 MP_CMD_GET_PROPERTY, | |
76 MP_CMD_OSD_SHOW_PROPERTY_TEXT, | |
77 MP_CMD_SEEK_CHAPTER, | |
78 MP_CMD_FILE_FILTER, | |
79 MP_CMD_GET_FILENAME, | |
80 MP_CMD_GET_VIDEO_CODEC, | |
81 MP_CMD_GET_VIDEO_BITRATE, | |
82 MP_CMD_GET_VIDEO_RESOLUTION, | |
83 MP_CMD_GET_AUDIO_CODEC, | |
84 MP_CMD_GET_AUDIO_BITRATE, | |
85 MP_CMD_GET_AUDIO_SAMPLES, | |
86 MP_CMD_GET_META_TITLE, | |
87 MP_CMD_GET_META_ARTIST, | |
88 MP_CMD_GET_META_ALBUM, | |
89 MP_CMD_GET_META_YEAR, | |
90 MP_CMD_GET_META_COMMENT, | |
91 MP_CMD_GET_META_TRACK, | |
92 MP_CMD_GET_META_GENRE, | |
93 MP_CMD_RADIO_STEP_CHANNEL, | |
94 MP_CMD_RADIO_SET_CHANNEL, | |
95 MP_CMD_RADIO_SET_FREQ, | |
96 MP_CMD_SET_MOUSE_POS, | |
97 MP_CMD_STEP_PROPERTY, | |
98 MP_CMD_RADIO_STEP_FREQ, | |
99 MP_CMD_TV_STEP_FREQ, | |
100 MP_CMD_LOOP, | |
101 MP_CMD_BALANCE, | |
102 MP_CMD_SUB_SCALE, | |
103 MP_CMD_TV_TELETEXT_ADD_DEC, | |
104 MP_CMD_TV_TELETEXT_GO_LINK, | |
105 MP_CMD_TV_START_SCAN, | |
106 MP_CMD_SUB_SOURCE, | |
107 MP_CMD_SUB_FILE, | |
108 MP_CMD_SUB_VOB, | |
109 MP_CMD_SUB_DEMUX, | |
110 MP_CMD_SWITCH_ANGLE, | |
111 MP_CMD_ASS_USE_MARGINS, | |
112 MP_CMD_SWITCH_TITLE, | |
113 MP_CMD_STOP, | |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
114 |
27068 | 115 /// DVDNAV commands |
116 MP_CMD_DVDNAV_UP = 1000, | |
117 MP_CMD_DVDNAV_DOWN, | |
118 MP_CMD_DVDNAV_LEFT, | |
119 MP_CMD_DVDNAV_RIGHT, | |
120 MP_CMD_DVDNAV_MENU, | |
121 MP_CMD_DVDNAV_SELECT, | |
122 MP_CMD_DVDNAV_PREVMENU, | |
123 MP_CMD_DVDNAV_MOUSECLICK, | |
124 | |
27066 | 125 /// GUI commands |
126 MP_CMD_GUI_EVENTS = 5000, | |
127 MP_CMD_GUI_LOADFILE, | |
128 MP_CMD_GUI_LOADSUBTITLE, | |
129 MP_CMD_GUI_ABOUT, | |
130 MP_CMD_GUI_PLAY, | |
131 MP_CMD_GUI_STOP, | |
132 MP_CMD_GUI_PLAYLIST, | |
133 MP_CMD_GUI_PREFERENCES, | |
134 MP_CMD_GUI_FULLSCREEN, | |
135 MP_CMD_GUI_SKINBROWSER, | |
4858 | 136 |
27066 | 137 /// DVB commands |
138 MP_CMD_DVB_SET_CHANNEL = 5101, | |
139 | |
140 /// Console commands | |
141 MP_CMD_CHELP = 7000, | |
142 MP_CMD_CEXIT, | |
143 MP_CMD_CHIDE, | |
144 } mp_command_type; | |
10568 | 145 |
10867 | 146 // The arg types |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
147 #define MP_CMD_ARG_INT 0 |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
148 #define MP_CMD_ARG_FLOAT 1 |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
149 #define MP_CMD_ARG_STRING 2 |
5473
39dae98304af
dvdnav event added, queue size 10->100, added void* event arg type - dvdnav patch by Kees Cook <mplayer@outflux.net>
arpi
parents:
5380
diff
changeset
|
150 #define MP_CMD_ARG_VOID 3 |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
151 |
5197 | 152 #ifndef MP_CMD_MAX_ARGS |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
153 #define MP_CMD_MAX_ARGS 10 |
5197 | 154 #endif |
155 | |
156 // Error codes for the drivers | |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
157 |
11678
972d1998bde9
occured --> occurred typo patch by Clinton Roy <croy@dstc.edu.au>
diego
parents:
11542
diff
changeset
|
158 // An error occurred but we can continue |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
159 #define MP_INPUT_ERROR -1 |
11678
972d1998bde9
occured --> occurred typo patch by Clinton Roy <croy@dstc.edu.au>
diego
parents:
11542
diff
changeset
|
160 // A fatal error occurred, this driver should be removed |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
161 #define MP_INPUT_DEAD -2 |
10867 | 162 // No input was available |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
163 #define MP_INPUT_NOTHING -3 |
15825 | 164 //! Input will be available if you try again |
165 #define MP_INPUT_RETRY -4 | |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
166 |
10867 | 167 // For the key's drivers, if possible you can send key up and key down |
13634
9a270ee1682e
Comment clarified, patch by Sylvain Colinet <scolinet at gmail dot com>.
diego
parents:
13626
diff
changeset
|
168 // events. Key up is the default, to send a key down you must use the |
9a270ee1682e
Comment clarified, patch by Sylvain Colinet <scolinet at gmail dot com>.
diego
parents:
13626
diff
changeset
|
169 // OR operator between the key code and MP_KEY_DOWN. |
4657
610a11e4db36
Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents:
4589
diff
changeset
|
170 #define MP_KEY_DOWN (1<<29) |
5197 | 171 // Use this when the key shouldn't be auto-repeated (like mouse buttons) |
4657
610a11e4db36
Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents:
4589
diff
changeset
|
172 #define MP_NO_REPEAT_KEY (1<<28) |
4589
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
173 |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
174 #ifndef MP_MAX_KEY_DOWN |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
175 #define MP_MAX_KEY_DOWN 32 |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
176 #endif |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
177 |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
178 typedef union mp_cmd_arg_value { |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
179 int i; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
180 float f; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
181 char* s; |
5473
39dae98304af
dvdnav event added, queue size 10->100, added void* event arg type - dvdnav patch by Kees Cook <mplayer@outflux.net>
arpi
parents:
5380
diff
changeset
|
182 void* v; |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
183 } mp_cmd_arg_value_t; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
184 |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
185 typedef struct mp_cmd_arg { |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
186 int type; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
187 mp_cmd_arg_value_t v; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
188 } mp_cmd_arg_t; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
189 |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
190 typedef struct mp_cmd { |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
191 int id; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
192 char* name; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
193 int nargs; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
194 mp_cmd_arg_t args[MP_CMD_MAX_ARGS]; |
13991 | 195 int pausing; |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
196 } mp_cmd_t; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
197 |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
198 |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
199 typedef struct mp_cmd_bind { |
4589
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
200 int input[MP_MAX_KEY_DOWN+1]; |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
201 char* cmd; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
202 } mp_cmd_bind_t; |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
203 |
4589
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
204 typedef struct mp_key_name { |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
205 int key; |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
206 char* name; |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
207 } mp_key_name_t; |
4ce20c55a18a
Added support for key combination and mouse buttons key code
albeu
parents:
4431
diff
changeset
|
208 |
10867 | 209 // These typedefs are for the drivers. They are the functions used to retrieve |
5197 | 210 // the next key code or command. |
211 | |
10867 | 212 // These functions should return the key code or one of the error codes |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
213 typedef int (*mp_key_func_t)(int fd); |
7912
e15e76559bd5
Reverse Arpi's commit and put the right fix in place.
albeu
parents:
7862
diff
changeset
|
214 // These functions should act like read but they must use our error code (if needed ;-) |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
215 typedef int (*mp_cmd_func_t)(int fd,char* dest,int size); |
5197 | 216 // These are used to close the driver |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
217 typedef void (*mp_close_func_t)(int fd); |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
218 |
10867 | 219 // Set this to grab all incoming key codes |
25502
605d4e3e403f
From now on, libmenu does not steal all input keys from input modules.
ulion
parents:
25319
diff
changeset
|
220 extern int (*mp_input_key_cb)(int code); |
8196
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
221 // Should return 1 if the command was processed |
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
222 typedef int (*mp_input_cmd_filter)(mp_cmd_t* cmd, int paused, void* ctx); |
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
223 |
10867 | 224 // This function adds a new key driver. |
5197 | 225 // The first arg is a file descriptor (use a negative value if you don't use any fd) |
10867 | 226 // The second arg tells if we use select on the fd to know if something is available. |
227 // The third arg is optional. If null a default function wich reads an int from the | |
5197 | 228 // fd will be used. |
229 // The last arg can be NULL if nothing is needed to close the driver. The close | |
230 // function can be used | |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
231 int |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
232 mp_input_add_cmd_fd(int fd, int select, mp_cmd_func_t read_func, mp_close_func_t close_func); |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
233 |
10867 | 234 // This removes a cmd driver, you usually don't need to use it. |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
235 void |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
236 mp_input_rm_cmd_fd(int fd); |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
237 |
10867 | 238 // The args are the same as for the key's drivers. If you don't use any valid fd you MUST |
5197 | 239 // give a read_func. |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
240 int |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
241 mp_input_add_key_fd(int fd, int select, mp_key_func_t read_func, mp_close_func_t close_func); |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
242 |
10867 | 243 // As for the cmd one you usually don't need this function. |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
244 void |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
245 mp_input_rm_key_fd(int fd); |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
246 |
24132 | 247 int mp_input_add_event_fd(int fd, void (*read_func)(void)); |
248 | |
249 void mp_input_rm_event_fd(int fd); | |
250 | |
25263
96d0992c7920
Remove hardcoded key->cmd bindings in libmenu, support custom key bindings
ulion
parents:
25129
diff
changeset
|
251 /// Get input key from its name. |
96d0992c7920
Remove hardcoded key->cmd bindings in libmenu, support custom key bindings
ulion
parents:
25129
diff
changeset
|
252 int mp_input_get_key_from_name(const char *name); |
96d0992c7920
Remove hardcoded key->cmd bindings in libmenu, support custom key bindings
ulion
parents:
25129
diff
changeset
|
253 |
10867 | 254 // This function can be used to put a command in the system again. It's used by libmpdemux |
255 // when it performs a blocking operation to resend the command it received to the main | |
5197 | 256 // loop. |
4821 | 257 int |
258 mp_input_queue_cmd(mp_cmd_t* cmd); | |
259 | |
10867 | 260 // This function retrieves the next available command waiting no more than time msec. |
5197 | 261 // If pause is true, the next input will always return a pause command. |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
262 mp_cmd_t* |
13603 | 263 mp_input_get_cmd(int time, int paused, int peek_only); |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
264 |
8196
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
265 mp_cmd_t* |
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
266 mp_input_parse_cmd(char* str); |
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
267 |
25319
50a30be5300c
Add new function for parsing and queueing multi-commands separated by \n or \r.
ulion
parents:
25263
diff
changeset
|
268 /** |
50a30be5300c
Add new function for parsing and queueing multi-commands separated by \n or \r.
ulion
parents:
25263
diff
changeset
|
269 * Parse and queue commands separated by '\n'. |
50a30be5300c
Add new function for parsing and queueing multi-commands separated by \n or \r.
ulion
parents:
25263
diff
changeset
|
270 * @return count of commands new queued. |
50a30be5300c
Add new function for parsing and queueing multi-commands separated by \n or \r.
ulion
parents:
25263
diff
changeset
|
271 */ |
50a30be5300c
Add new function for parsing and queueing multi-commands separated by \n or \r.
ulion
parents:
25263
diff
changeset
|
272 int mp_input_parse_and_queue_cmds(const char *str); |
50a30be5300c
Add new function for parsing and queueing multi-commands separated by \n or \r.
ulion
parents:
25263
diff
changeset
|
273 |
10867 | 274 /// These filters allow you to process the command before MPlayer. |
275 /// If a filter returns a true value mp_input_get_cmd will return NULL. | |
8196
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
276 void |
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
277 mp_input_add_cmd_filter(mp_input_cmd_filter, void* ctx); |
419bdbfdb660
Add the possibilty to grab the keys and to filter the commands
albeu
parents:
7912
diff
changeset
|
278 |
5197 | 279 // After getting a command from mp_input_get_cmd you need to free it using this |
280 // function | |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
281 void |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
282 mp_cmd_free(mp_cmd_t* cmd); |
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
283 |
10867 | 284 // This creates a copy of a command (used by the auto repeat stuff). |
4657
610a11e4db36
Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents:
4589
diff
changeset
|
285 mp_cmd_t* |
610a11e4db36
Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents:
4589
diff
changeset
|
286 mp_cmd_clone(mp_cmd_t* cmd); |
610a11e4db36
Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents:
4589
diff
changeset
|
287 |
23477 | 288 // Set current input section |
289 void | |
290 mp_input_set_section(char *name); | |
291 | |
292 // Get current input section | |
293 char* | |
294 mp_input_get_section(void); | |
295 | |
10867 | 296 // When you create a new driver you should add it in these 2 functions. |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
297 void |
17890
633f3d0a621b
Enable gui key bindings only when running the gui. Fix enter and esc
albeu
parents:
16968
diff
changeset
|
298 mp_input_init(int use_gui); |
4418
8141d2c399e4
A new configurable input system and joystick support for this system
albeu
parents:
diff
changeset
|
299 |
4431 | 300 void |
301 mp_input_uninit(void); | |
7862
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7779
diff
changeset
|
302 |
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7779
diff
changeset
|
303 // Interruptible usleep: (used by libmpdemux) |
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7779
diff
changeset
|
304 int |
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7779
diff
changeset
|
305 mp_input_check_interrupt(int time); |
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7779
diff
changeset
|
306 |
25623
b955a135e3a8
Do not use exit_player in the signal handler, this code just can not
reimar
parents:
25576
diff
changeset
|
307 extern int async_quit_request; |
b955a135e3a8
Do not use exit_player in the signal handler, this code just can not
reimar
parents:
25576
diff
changeset
|
308 |
26029 | 309 #endif /* MPLAYER_INPUT_H */ |