On the road to pre4
[vlc/solaris.git] / include / vlc_keys.h
blobb647b56c61e8568a881cf3397cdeb12b035760a5
1 /*****************************************************************************
2 * vlc_keys.h: keycode defines
3 *****************************************************************************
4 * Copyright (C) 2003-2009 the VideoLAN team
5 * $Id$
7 * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef VLC_KEYS_H
25 #define VLC_KEYS_H 1
27 /**
28 * \file
29 * This file defines keys and functions
32 #define KEY_MODIFIER 0xFF000000
33 #define KEY_MODIFIER_ALT 0x01000000
34 #define KEY_MODIFIER_SHIFT 0x02000000
35 #define KEY_MODIFIER_CTRL 0x04000000
36 #define KEY_MODIFIER_META 0x08000000
37 #define KEY_MODIFIER_COMMAND 0x10000000
39 #define KEY_UNSET 0x00000000
40 #define KEY_BACKSPACE 0x08
41 #define KEY_TAB 0x09
42 #define KEY_ENTER 0x0D
43 #define KEY_ESC 0x1B
44 /* End of Unicode range: 0x0010FFFF */
45 #define KEY_LEFT 0x00210000
46 #define KEY_RIGHT 0x00220000
47 #define KEY_UP 0x00230000
48 #define KEY_DOWN 0x00240000
49 #define KEY_F1 0x00270000
50 #define KEY_F2 0x00280000
51 #define KEY_F3 0x00290000
52 #define KEY_F4 0x002A0000
53 #define KEY_F5 0x002B0000
54 #define KEY_F6 0x002C0000
55 #define KEY_F7 0x002D0000
56 #define KEY_F8 0x002E0000
57 #define KEY_F9 0x002F0000
58 #define KEY_F10 0x00300000
59 #define KEY_F11 0x00310000
60 #define KEY_F12 0x00320000
61 #define KEY_HOME 0x00330000
62 #define KEY_END 0x00340000
63 #define KEY_INSERT 0x00350000
64 #define KEY_DELETE 0x00360000
65 #define KEY_MENU 0x00370000
66 #define KEY_PAGEUP 0x00390000
67 #define KEY_PAGEDOWN 0x003A0000
69 #define KEY_BROWSER_BACK 0x003F0000
70 #define KEY_BROWSER_FORWARD 0x00400000
71 #define KEY_BROWSER_REFRESH 0x00410000
72 #define KEY_BROWSER_STOP 0x00420000
73 #define KEY_BROWSER_SEARCH 0x00430000
74 #define KEY_BROWSER_FAVORITES 0x00440000
75 #define KEY_BROWSER_HOME 0x00450000
76 #define KEY_VOLUME_MUTE 0x00460000
77 #define KEY_VOLUME_DOWN 0x00470000
78 #define KEY_VOLUME_UP 0x00480000
79 #define KEY_MEDIA_NEXT_TRACK 0x00490000
80 #define KEY_MEDIA_PREV_TRACK 0x004A0000
81 #define KEY_MEDIA_STOP 0x004B0000
82 #define KEY_MEDIA_PLAY_PAUSE 0x004C0000
84 #define KEY_MOUSEWHEELUP 0x00F00000
85 #define KEY_MOUSEWHEELDOWN 0x00F10000
86 #define KEY_MOUSEWHEELLEFT 0x00F20000
87 #define KEY_MOUSEWHEELRIGHT 0x00F30000
89 VLC_EXPORT( char *, KeyToString, (uint_fast32_t i_key) ) LIBVLC_USED;
90 VLC_EXPORT( uint_fast32_t, StringToKey, (char *psz_key) ) LIBVLC_USED;
92 typedef enum vlc_key {
93 ACTIONID_NONE = 0,
94 ACTIONID_QUIT,
95 ACTIONID_PLAY_PAUSE,
96 ACTIONID_PLAY,
97 ACTIONID_PAUSE,
98 ACTIONID_STOP,
99 ACTIONID_PREV,
100 ACTIONID_NEXT,
101 ACTIONID_SLOWER,
102 ACTIONID_FASTER,
103 ACTIONID_TOGGLE_FULLSCREEN,
104 ACTIONID_VOL_UP,
105 ACTIONID_VOL_DOWN,
106 ACTIONID_NAV_ACTIVATE,
107 ACTIONID_NAV_UP,
108 ACTIONID_NAV_DOWN,
109 ACTIONID_NAV_LEFT,
110 ACTIONID_NAV_RIGHT,
111 ACTIONID_JUMP_BACKWARD_EXTRASHORT,
112 ACTIONID_JUMP_FORWARD_EXTRASHORT,
113 ACTIONID_JUMP_BACKWARD_SHORT,
114 ACTIONID_JUMP_FORWARD_SHORT,
115 ACTIONID_JUMP_BACKWARD_MEDIUM,
116 ACTIONID_JUMP_FORWARD_MEDIUM,
117 ACTIONID_JUMP_BACKWARD_LONG,
118 ACTIONID_JUMP_FORWARD_LONG,
119 ACTIONID_FRAME_NEXT,
120 ACTIONID_POSITION,
121 ACTIONID_VOL_MUTE,
122 /* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
123 ACTIONID_SET_BOOKMARK1,
124 ACTIONID_SET_BOOKMARK2,
125 ACTIONID_SET_BOOKMARK3,
126 ACTIONID_SET_BOOKMARK4,
127 ACTIONID_SET_BOOKMARK5,
128 ACTIONID_SET_BOOKMARK6,
129 ACTIONID_SET_BOOKMARK7,
130 ACTIONID_SET_BOOKMARK8,
131 ACTIONID_SET_BOOKMARK9,
132 ACTIONID_SET_BOOKMARK10,
133 ACTIONID_PLAY_BOOKMARK1,
134 ACTIONID_PLAY_BOOKMARK2,
135 ACTIONID_PLAY_BOOKMARK3,
136 ACTIONID_PLAY_BOOKMARK4,
137 ACTIONID_PLAY_BOOKMARK5,
138 ACTIONID_PLAY_BOOKMARK6,
139 ACTIONID_PLAY_BOOKMARK7,
140 ACTIONID_PLAY_BOOKMARK8,
141 ACTIONID_PLAY_BOOKMARK9,
142 ACTIONID_PLAY_BOOKMARK10,
143 /* end of contiguous zone */
144 ACTIONID_SUBDELAY_UP,
145 ACTIONID_SUBDELAY_DOWN,
146 ACTIONID_SUBPOS_UP,
147 ACTIONID_SUBPOS_DOWN,
148 ACTIONID_HISTORY_BACK,
149 ACTIONID_HISTORY_FORWARD,
150 ACTIONID_AUDIO_TRACK,
151 ACTIONID_SUBTITLE_TRACK,
152 ACTIONID_CUBESPEED_UP,
153 ACTIONID_CUBESPEED_DOWN,
154 ACTIONID_INTF_SHOW,
155 ACTIONID_INTF_HIDE,
156 /* chapter and title navigation */
157 ACTIONID_TITLE_PREV,
158 ACTIONID_TITLE_NEXT,
159 ACTIONID_CHAPTER_PREV,
160 ACTIONID_CHAPTER_NEXT,
161 /* end of chapter and title navigation */
162 ACTIONID_AUDIODELAY_UP,
163 ACTIONID_AUDIODELAY_DOWN,
164 ACTIONID_SNAPSHOT,
165 ACTIONID_RECORD,
166 ACTIONID_DISC_MENU,
167 ACTIONID_ASPECT_RATIO,
168 ACTIONID_CROP,
169 ACTIONID_DEINTERLACE,
170 ACTIONID_ZOOM,
171 ACTIONID_UNZOOM,
172 ACTIONID_CROP_TOP,
173 ACTIONID_UNCROP_TOP,
174 ACTIONID_CROP_LEFT,
175 ACTIONID_UNCROP_LEFT,
176 ACTIONID_CROP_BOTTOM,
177 ACTIONID_UNCROP_BOTTOM,
178 ACTIONID_CROP_RIGHT,
179 ACTIONID_UNCROP_RIGHT,
180 ACTIONID_DUMP,
181 ACTIONID_RANDOM,
182 ACTIONID_LOOP,
183 ACTIONID_WALLPAPER,
184 ACTIONID_LEAVE_FULLSCREEN,
185 ACTIONID_MENU_ON,
186 ACTIONID_MENU_OFF,
187 ACTIONID_MENU_RIGHT,
188 ACTIONID_MENU_LEFT,
189 ACTIONID_MENU_UP,
190 ACTIONID_MENU_DOWN,
191 ACTIONID_MENU_SELECT,
192 /* Zoom */
193 ACTIONID_ZOOM_QUARTER,
194 ACTIONID_ZOOM_HALF,
195 ACTIONID_ZOOM_ORIGINAL,
196 ACTIONID_ZOOM_DOUBLE,
197 /* Cycle Through Audio Devices */
198 ACTIONID_AUDIODEVICE_CYCLE,
199 /* scaling */
200 ACTIONID_TOGGLE_AUTOSCALE,
201 ACTIONID_SCALE_UP,
202 ACTIONID_SCALE_DOWN,
203 /* */
204 ACTIONID_RATE_NORMAL,
205 ACTIONID_RATE_SLOWER_FINE,
206 ACTIONID_RATE_FASTER_FINE,
208 } vlc_key_t;
210 VLC_EXPORT( vlc_key_t, vlc_GetActionId, (const char *psz_key) ) LIBVLC_USED;
212 struct hotkey
214 const char *psz_action;
215 vlc_key_t i_action;
216 uint_fast32_t i_key;
219 #endif