]> git.sesse.net Git - vlc/blobdiff - include/vlc_keys.h
ninput.h: added prototype of demux2_vaControlHelper.
[vlc] / include / vlc_keys.h
index 5f20d69ed7c0d59c2754f6241f098692058934cc..3938287b11e08c19e2cabcbb3f6df7cda54e7dab 100644 (file)
@@ -2,7 +2,7 @@
  * hotkeys.h: keycode defines
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: vlc_keys.h,v 1.5 2003/10/29 01:33:27 gbazin Exp $
+ * $Id: vlc_keys.h,v 1.13 2004/01/25 18:17:08 zorglub Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -67,7 +67,7 @@ typedef struct key_descriptor_s
 
 #define ADD_KEY(a) { a, *a }
 
-static const struct key_descriptor_s modifiers[] =
+static const struct key_descriptor_s vlc_modifiers[] =
 {
     { "Alt", KEY_MODIFIER_ALT },
     { "Shift", KEY_MODIFIER_SHIFT },
@@ -76,7 +76,7 @@ static const struct key_descriptor_s modifiers[] =
     { "Command", KEY_MODIFIER_COMMAND }
 };
 
-static const struct key_descriptor_s keys[] =
+static const struct key_descriptor_s vlc_keys[] =
 {
     { "Unset", KEY_UNSET },
     { "Left", KEY_LEFT },
@@ -146,22 +146,35 @@ static const struct key_descriptor_s keys[] =
     { "[", '[' },
     { "]", ']' },
     { "*", '*' }
-    
 };
 
 static inline char *KeyToString( int i_key )
 {
     unsigned int i = 0;
-    for ( i = 0; i < sizeof(keys) / sizeof(key_descriptor_t); i++ )
+    for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
     {
-        if ( keys[i].i_key_code == i_key )
+        if ( vlc_keys[i].i_key_code == i_key )
         {
-            return keys[i].psz_key_string;
+            return vlc_keys[i].psz_key_string;
         }
     }
     return NULL;
 }
 
+static inline int StringToKey( char *psz_key )
+{
+    unsigned int i = 0;
+    for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
+    {
+        if ( !strcmp( vlc_keys[i].psz_key_string, psz_key ))
+        {
+            return vlc_keys[i].i_key_code;
+        }
+    }
+    return 0;
+}
+
+
 #define ACTIONID_QUIT                  1
 #define ACTIONID_PLAY_PAUSE            2
 #define ACTIONID_PLAY                  3
@@ -179,3 +192,33 @@ static inline char *KeyToString( int i_key )
 #define ACTIONID_NAV_DOWN              15
 #define ACTIONID_NAV_LEFT              16
 #define ACTIONID_NAV_RIGHT             17
+#define ACTIONID_JUMP_BACKWARD_10SEC   18
+#define ACTIONID_JUMP_FORWARD_10SEC    19
+#define ACTIONID_JUMP_BACKWARD_1MIN    20
+#define ACTIONID_JUMP_FORWARD_1MIN     21
+#define ACTIONID_JUMP_BACKWARD_5MIN    22
+#define ACTIONID_JUMP_FORWARD_5MIN     23
+#define ACTIONID_POSITION              24
+#define ACTIONID_VOL_MUTE              25
+/* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
+#define ACTIONID_SET_BOOKMARK1         26
+#define ACTIONID_SET_BOOKMARK2         27
+#define ACTIONID_SET_BOOKMARK3         28
+#define ACTIONID_SET_BOOKMARK4         29
+#define ACTIONID_SET_BOOKMARK5         30
+#define ACTIONID_SET_BOOKMARK6         31
+#define ACTIONID_SET_BOOKMARK7         32
+#define ACTIONID_SET_BOOKMARK8         33
+#define ACTIONID_SET_BOOKMARK9         34
+#define ACTIONID_SET_BOOKMARK10        35
+#define ACTIONID_PLAY_BOOKMARK1        36
+#define ACTIONID_PLAY_BOOKMARK2        37
+#define ACTIONID_PLAY_BOOKMARK3        38
+#define ACTIONID_PLAY_BOOKMARK4        39
+#define ACTIONID_PLAY_BOOKMARK5        40
+#define ACTIONID_PLAY_BOOKMARK6        41
+#define ACTIONID_PLAY_BOOKMARK7        42
+#define ACTIONID_PLAY_BOOKMARK8        43
+#define ACTIONID_PLAY_BOOKMARK9        44
+#define ACTIONID_PLAY_BOOKMARK10       45
+/* end of contiguous zone */