annotate input/input.h @ 5163:566c4db606aa

Add a (more or less dummy) reference to vo_format_name(), to pull the img_format.o object from libvo.a on solaris. The typical set of libvo video drivers on solaris didn't reference this symbol, but a library at the end of the link command for mplayer requires this function.
author jkeil
date Sun, 17 Mar 2002 15:11:44 +0000
parents 9842148f6053
children f0e3dcefb7af
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
1
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
2 #ifdef HAVE_NEW_INPUT
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
3
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
4 #define MP_CMD_SEEK 0
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
5 #define MP_CMD_AUDIO_DELAY 1
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
6 #define MP_CMD_QUIT 2
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
7 #define MP_CMD_PAUSE 3
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
8 #define MP_CMD_GRAB_FRAMES 4
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
9 #define MP_CMD_PLAY_TREE_STEP 5
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
10 #define MP_CMD_PLAY_TREE_UP_STEP 6
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
11 #define MP_CMD_PLAY_ALT_SRC_STEP 7
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
12 #define MP_CMD_SUB_DELAY 8
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
13 #define MP_CMD_OSD 9
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
14 #define MP_CMD_VOLUME 10
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
15 #define MP_CMD_MIXER_USEMASTER 11
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
16 #define MP_CMD_CONTRAST 12
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
17 #define MP_CMD_BRIGHTNESS 13
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
18 #define MP_CMD_HUE 14
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
19 #define MP_CMD_SATURATION 15
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
20 #define MP_CMD_FRAMEDROPPING 16
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
21 #define MP_CMD_TV_STEP_CHANNEL 17
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
22 #define MP_CMD_TV_STEP_NORM 18
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
23 #define MP_CMD_TV_STEP_CHANNEL_LIST 19
4732
876f0ea71526 vo_fullscreen added
alex
parents: 4657
diff changeset
24 #define MP_CMD_VO_FULLSCREEN 20
5015
9842148f6053 -subpos key bindings with new input layer - patch by Tomas Konir <moje@molly.vabo.cz>
arpi
parents: 4858
diff changeset
25 #define MP_CMD_SUB_POS 21
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
26
4858
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
27 #define MP_CMD_GUI_EVENTS 5000
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
28 #define MP_CMD_GUI_LOADFILE 5001
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
29 #define MP_CMD_GUI_LOADSUBTITLE 5002
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
30 #define MP_CMD_GUI_ABOUT 5003
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
31 #define MP_CMD_GUI_PLAY 5004
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
32 #define MP_CMD_GUI_STOP 5005
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
33 #define MP_CMD_GUI_PLAYLIST 5006
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
34 #define MP_CMD_GUI_PREFERENCES 5007
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
35 #define MP_CMD_GUI_FULLSCREEN 5008
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
36 #define MP_CMD_GUI_SKINBROWSER 5009
65730cea02e7 add half new input support for gui
pontscho
parents: 4821
diff changeset
37
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
38 #define MP_CMD_ARG_INT 0
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
39 #define MP_CMD_ARG_FLOAT 1
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
40 #define MP_CMD_ARG_STRING 2
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
41
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
42 #define MP_CMD_MAX_ARGS 10
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
43
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
44 #define MP_INPUT_ERROR -1
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
45 #define MP_INPUT_DEAD -2
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
46 #define MP_INPUT_NOTHING -3
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
47
4657
610a11e4db36 Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents: 4589
diff changeset
48 #define MP_KEY_DOWN (1<<29)
4589
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
49 // Key up is the default
4657
610a11e4db36 Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents: 4589
diff changeset
50 #define MP_NO_REPEAT_KEY (1<<28)
4589
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
51
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
52 #ifndef MP_MAX_KEY_DOWN
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
53 #define MP_MAX_KEY_DOWN 32
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
54 #endif
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
55
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
56 typedef union mp_cmd_arg_value {
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
57 int i;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
58 float f;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
59 char* s;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
60 } mp_cmd_arg_value_t;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
61
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
62 typedef struct mp_cmd_arg {
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
63 int type;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
64 mp_cmd_arg_value_t v;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
65 } mp_cmd_arg_t;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
66
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
67 typedef struct mp_cmd {
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
68 int id;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
69 char* name;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
70 int nargs;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
71 mp_cmd_arg_t args[MP_CMD_MAX_ARGS];
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
72 } mp_cmd_t;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
73
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
74
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
75 typedef struct mp_cmd_bind {
4589
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
76 int input[MP_MAX_KEY_DOWN+1];
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
77 char* cmd;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
78 } mp_cmd_bind_t;
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
79
4589
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
80 typedef struct mp_key_name {
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
81 int key;
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
82 char* name;
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
83 } mp_key_name_t;
4ce20c55a18a Added support for key combination and mouse buttons key code
albeu
parents: 4431
diff changeset
84
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
85 typedef int (*mp_key_func_t)(int fd);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
86 typedef int (*mp_cmd_func_t)(int fd,char* dest,int size);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
87 typedef void (*mp_close_func_t)(int fd);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
88
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
89 int
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
90 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
91
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
92 void
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
93 mp_input_rm_cmd_fd(int fd);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
94
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
95 int
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
96 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
97
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
98 void
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
99 mp_input_rm_key_fd(int fd);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
100
4821
5a71377d2759 Fixed bug with comments in input.conf parser
albeu
parents: 4732
diff changeset
101 int
5a71377d2759 Fixed bug with comments in input.conf parser
albeu
parents: 4732
diff changeset
102 mp_input_queue_cmd(mp_cmd_t* cmd);
5a71377d2759 Fixed bug with comments in input.conf parser
albeu
parents: 4732
diff changeset
103
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
104 mp_cmd_t*
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
105 mp_input_get_cmd(int time, int paused);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
106
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
107 void
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
108 mp_cmd_free(mp_cmd_t* cmd);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
109
4657
610a11e4db36 Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents: 4589
diff changeset
110 mp_cmd_t*
610a11e4db36 Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents: 4589
diff changeset
111 mp_cmd_clone(mp_cmd_t* cmd);
610a11e4db36 Added key autorepeat support. Options to enable/disable joystick and lirc
albeu
parents: 4589
diff changeset
112
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
113 void
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
114 mp_input_init(void);
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
115
4431
44c23fd75005 Added uninit to input
albeu
parents: 4418
diff changeset
116 void
44c23fd75005 Added uninit to input
albeu
parents: 4418
diff changeset
117 mp_input_uninit(void);
44c23fd75005 Added uninit to input
albeu
parents: 4418
diff changeset
118
4418
8141d2c399e4 A new configurable input system and joystick support for this system
albeu
parents:
diff changeset
119 #endif /* HAVE_NEW_INPUT */