]> git.sesse.net Git - vlc/commitdiff
Rename vlc_key_t to vlc_action_t
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 4 May 2011 09:42:24 +0000 (12:42 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 4 May 2011 09:42:54 +0000 (12:42 +0300)
include/vlc_keys.h
modules/control/globalhotkeys/win32.c
modules/control/lirc.c
modules/lua/libs/misc.c
src/config/keys.c
src/control/media_player.c

index 01c59b06690954f78b4309c93f87739cfcbd50e5..c3a79daa7fb69d7f1cf672109fb7bbaae4800a3b 100644 (file)
@@ -89,7 +89,7 @@
 VLC_EXPORT( char *, vlc_keycode2str, (uint_fast32_t i_key) ) LIBVLC_USED;
 VLC_EXPORT( uint_fast32_t, vlc_str2keycode, (const char *str) ) LIBVLC_USED;
 
-typedef enum vlc_key {
+typedef enum vlc_action {
     ACTIONID_NONE = 0,
     ACTIONID_QUIT,
     ACTIONID_PLAY_PAUSE,
@@ -200,9 +200,9 @@ typedef enum vlc_key {
     ACTIONID_RATE_SLOWER_FINE,
     ACTIONID_RATE_FASTER_FINE,
 
-} vlc_key_t;
+} vlc_action_t;
 
-VLC_EXPORT( vlc_key_t, vlc_GetActionId, (const char *psz_key) ) LIBVLC_USED;
+VLC_EXPORT( vlc_action_t, vlc_GetActionId, (const char *psz_key) ) LIBVLC_USED;
 
 struct hotkey
 {
index fa458ed2352389d558818361953c58bfb8deb76c..a5f4a8683e96368a1392c9590c6b2c5e89cf2db0 100644 (file)
@@ -304,7 +304,7 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
                     return 0;
 
                 /* search for key associated with VLC */
-                vlc_key_t action = vlc_GetActionId( psz_atomName );
+                vlc_action_t action = vlc_GetActionId( psz_atomName );
                 if( action != ACTIONID_NONE )
                 {
                     var_SetInteger( p_intf->p_libvlc,
index e8c478035ff4d883f1466c0822b80902c9e51bb0..03e15aee2a59f33739c30e585ed66cfcf0dee49c 100644 (file)
@@ -186,7 +186,7 @@ static void Process( intf_thread_t *p_intf )
         {
             if( !strncmp( "key-", c, 4 ) )
             {
-                vlc_key_t i_key = vlc_GetActionId( c );
+                vlc_action_t i_key = vlc_GetActionId( c );
                 if( i_key )
                     var_SetInteger( p_intf->p_libvlc, "key-action", i_key );
                 else
index b0a66955a4478f74601b9eba0ac15349c64215fc..f98d28a8b4141628bdd5e7d1568dc183c65a5766 100644 (file)
@@ -237,7 +237,7 @@ static int vlclua_intf_should_die( lua_State *L )
 
 static int vlclua_action_id( lua_State *L )
 {
-    vlc_key_t i_key = vlc_GetActionId( luaL_checkstring( L, 1 ) );
+    vlc_action_t i_key = vlc_GetActionId( luaL_checkstring( L, 1 ) );
     if (i_key == 0)
         return 0;
     lua_pushnumber( L, i_key );
index 5c2f8d5d77db619fa35575907b1ef0e988d51331..a03ff4698b5bd0ed695962421025a2367ef7d869 100644 (file)
@@ -230,7 +230,7 @@ found:
 struct action
 {
     char name[MAXACTION];
-    vlc_key_t value;
+    vlc_action_t value;
 };
 
 static const struct action actions[] =
@@ -341,8 +341,8 @@ static const struct action actions[] =
 
 struct mapping
 {
-    uint32_t  key; ///< Key code
-    vlc_key_t action; ///< Action ID
+    uint32_t     key; ///< Key code
+    vlc_action_t action; ///< Action ID
 };
 
 static int keycmp (const void *a, const void *b)
@@ -379,9 +379,14 @@ static int vlc_key_to_action (vlc_object_t *obj, const char *varname,
     return var_SetInteger (obj, "key-action", (*pent)->action);
 }
 
-
+/**
+ * Sets up all key mappings for a given action.
+ * \param map tree (of struct mapping entries) to write mappings to
+ * \param confname VLC configuration item to read mappings from
+ * \param action action ID
+ */
 static void vlc_MapAction (vlc_object_t *obj, void **map,
-                           const char *confname, vlc_key_t action)
+                           const char *confname, vlc_action_t action)
 {
     char *keys = var_InheritString (obj, confname);
     if (keys == NULL)
@@ -496,7 +501,7 @@ static int actcmp(const void *key, const void *ent)
  * Get the action ID from the action name in the configuration subsystem.
  * @return the action ID or ACTIONID_NONE on error.
  */
-vlc_key_t vlc_GetActionId(const char *name)
+vlc_action_t vlc_GetActionId (const char *name)
 {
     const struct action *act;
 
index 333d32a6913b0ed6a99c89f80d06597b280cf222..ba1215c0d41c1017db2968ff3b30547df9b0692e 100644 (file)
@@ -43,9 +43,9 @@
 #include "media_player_internal.h"
 
 /*
- * mapping of libvlc_navigate_mode_t to vlc_key_t
+ * mapping of libvlc_navigate_mode_t to vlc_action_t
  */
-static const vlc_key_t libvlc_navigate_to_action[] =
+static const vlc_action_t libvlc_navigate_to_action[] =
   {
     ACTIONID_NAV_ACTIVATE,
     ACTIONID_NAV_UP,