* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#if !defined( __LIBVLC__ )
- #error You are not libvlc or one of its plugins. You cannot include this file
-#endif
+#ifndef VLC_KEYS_H
+#define VLC_KEYS_H 1
-#ifndef _VLC_KEYS_H
-#define _VLC_KEYS_H 1
+/**
+ * \file
+ * This file defines keys, functions and structures for hotkey handling in vlc
+ *
+ */
#define KEY_MODIFIER 0xFF000000
#define KEY_MODIFIER_ALT 0x01000000
{ "Meta", KEY_MODIFIER_META },
{ "Command", KEY_MODIFIER_COMMAND }
};
+enum { vlc_num_modifiers=sizeof(vlc_modifiers)
+ /sizeof(struct key_descriptor_s) };
static const struct key_descriptor_s vlc_keys[] =
{
{ "x", 'x' },
{ "y", 'y' },
{ "z", 'z' },
+ { "!", '!' },
+ { "\"", '\"' },
+ { "#", '#' },
+ { "$", '$' },
+ { "%", '%' },
+ { "&", '&' },
+ { "'", '\'' },
+ { "(", ')' },
+ { ")", ')' },
+ { "*", '*' },
{ "+", '+' },
- { "=", '=' },
- { "-", '-' },
{ ",", ',' },
+ { "-", '-' },
{ ".", '.' },
- { "<", '<' },
- { ">", '>' },
- { "`", '`' },
{ "/", '/' },
+ { ":", ':' },
{ ";", ';' },
- { "'", '\'' },
- { "\\", '\\' },
+ { "<", '<' },
+ { "=", '=' },
+ { ">", '>' },
+ { "?", '?' },
+ { "@", '@' },
{ "[", '[' },
+ { "\\", '\\' },
{ "]", ']' },
- { "*", '*' },
+ { "^", '^' },
+ { "_", '_' },
+ { "`", '`' },
{ "Browser Back", KEY_BROWSER_BACK },
{ "Browser Forward", KEY_BROWSER_FORWARD },
{ "Browser Refresh", KEY_BROWSER_REFRESH },
{ "Media Stop", KEY_MEDIA_STOP },
{ "Media Play Pause", KEY_MEDIA_PLAY_PAUSE }
};
+enum { vlc_num_keys=sizeof(vlc_keys)/sizeof(struct key_descriptor_s) };
static inline const char *KeyToString( int i_key )
{
- unsigned int i = 0;
- for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
+ size_t i;
+ for ( i = 0; i < vlc_num_keys; ++i )
{
if ( vlc_keys[i].i_key_code == i_key )
{
static inline int StringToKey( char *psz_key )
{
- unsigned int i = 0;
- for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
+ size_t i;
+ for ( i = 0; i < vlc_num_keys; ++i )
{
if ( !strcmp( vlc_keys[i].psz_key_string, psz_key ))
{
return 0;
}
-enum {
+typedef enum vlc_key {
ACTIONID_QUIT = 1,
ACTIONID_PLAY_PAUSE,
ACTIONID_PLAY,
ACTIONID_JUMP_FORWARD_MEDIUM,
ACTIONID_JUMP_BACKWARD_LONG,
ACTIONID_JUMP_FORWARD_LONG,
+ ACTIONID_FRAME_NEXT,
ACTIONID_POSITION,
ACTIONID_VOL_MUTE,
/* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
ACTIONID_ZOOM_ORIGINAL,
ACTIONID_ZOOM_DOUBLE,
/* Cycle Through Audio Devices */
- ACTIONID_AUDIODEVICE_CYCLE
-};
+ ACTIONID_AUDIODEVICE_CYCLE,
+ /* scaling */
+ ACTIONID_TOGGLE_AUTOSCALE,
+ ACTIONID_SCALE_UP,
+ ACTIONID_SCALE_DOWN,
+ /* */
+ ACTIONID_RATE_NORMAL,
+ ACTIONID_RATE_SLOWER_FINE,
+ ACTIONID_RATE_FASTER_FINE,
+
+} vlc_key_t;
#endif