Commit 324c1770 authored by Thomas Guillem's avatar Thomas Guillem Committed by Hugo Beauzée-Luyssen

core: rename vlc_action_t to vlc_action_id_t

Since we'll need vlc_actions_t
Signed-off-by: 's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent dce2a45a
......@@ -109,7 +109,7 @@
VLC_API char *vlc_keycode2str(uint_fast32_t i_key, bool locale) VLC_USED;
VLC_API uint_fast32_t vlc_str2keycode(const char *str) VLC_USED;
typedef enum vlc_action {
typedef enum vlc_action_id {
ACTIONID_NONE = 0,
ACTIONID_QUIT,
ACTIONID_PLAY_PAUSE,
......@@ -237,9 +237,9 @@ typedef enum vlc_action {
ACTIONID_COMBO_VOL_FOV_UP,
ACTIONID_COMBO_VOL_FOV_DOWN,
} vlc_action_t;
} vlc_action_id_t;
VLC_API vlc_action_t vlc_GetActionId(const char *psz_key) VLC_USED;
VLC_API vlc_action_id_t vlc_GetActionId(const char *psz_key) VLC_USED;
struct hotkey
{
......
......@@ -1756,7 +1756,7 @@ int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi )
void libvlc_media_player_navigate( libvlc_media_player_t* p_mi,
unsigned navigate )
{
static const enum input_query_e map[] =
static const vlc_action_id_t map[] =
{
INPUT_NAV_ACTIVATE, INPUT_NAV_UP, INPUT_NAV_DOWN,
INPUT_NAV_LEFT, INPUT_NAV_RIGHT, INPUT_NAV_POPUP,
......
......@@ -308,7 +308,7 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
return 0;
/* search for key associated with VLC */
vlc_action_t action = vlc_GetActionId( psz_atomName );
vlc_action_id_t action = vlc_GetActionId( psz_atomName );
if( action != ACTIONID_NONE )
{
var_SetInteger( p_intf->obj.libvlc,
......
......@@ -195,7 +195,7 @@ static void Process( intf_thread_t *p_intf )
{
if( !strncmp( "key-", c, 4 ) )
{
vlc_action_t i_key = vlc_GetActionId( c );
vlc_action_id_t i_key = vlc_GetActionId( c );
if( i_key )
var_SetInteger( p_intf->obj.libvlc, "key-action", i_key );
else
......
......@@ -147,7 +147,7 @@ static int vlclua_mwait( lua_State *L )
static int vlclua_action_id( lua_State *L )
{
vlc_action_t i_key = vlc_GetActionId( luaL_checkstring( L, 1 ) );
vlc_action_id_t i_key = vlc_GetActionId( luaL_checkstring( L, 1 ) );
if (i_key == 0)
return 0;
lua_pushnumber( L, i_key );
......
......@@ -265,7 +265,7 @@ found:
struct action
{
char name[MAXACTION];
vlc_action_t value;
vlc_action_id_t value;
};
static const struct action actions[] =
......@@ -388,7 +388,7 @@ static const struct action actions[] =
struct mapping
{
uint32_t key; ///< Key code
vlc_action_t action; ///< Action ID
vlc_action_id_t action; ///< Action ID
};
static int keycmp (const void *a, const void *b)
......@@ -424,7 +424,7 @@ static int vlc_key_to_action (vlc_object_t *obj, const char *varname,
/**
* Adds a mapping from a certain key code to a certain action.
*/
static int vlc_AddMapping (void **map, uint32_t keycode, vlc_action_t action)
static int vlc_AddMapping (void **map, uint32_t keycode, vlc_action_id_t action)
{
struct mapping *entry = malloc (sizeof (*entry));
if (entry == NULL)
......@@ -446,7 +446,7 @@ static int vlc_AddMapping (void **map, uint32_t keycode, vlc_action_t action)
static void vlc_AddWheelMapping (void **map, uint32_t kmore, uint32_t kless,
int mode)
{
vlc_action_t amore = ACTIONID_NONE, aless = ACTIONID_NONE;
vlc_action_id_t amore = ACTIONID_NONE, aless = ACTIONID_NONE;
switch (mode)
{
......@@ -478,7 +478,7 @@ static void vlc_AddWheelMapping (void **map, uint32_t kmore, uint32_t kless,
* \param action action ID
*/
static void vlc_InitAction (vlc_object_t *obj, void **map,
const char *confname, vlc_action_t action)
const char *confname, vlc_action_id_t action)
{
char *keys = var_InheritString (obj, confname);
if (keys == NULL)
......@@ -585,7 +585,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_action_t vlc_GetActionId (const char *name)
vlc_action_id_t vlc_GetActionId (const char *name)
{
const struct action *act;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment