diff --git a/include/vlc_actions.h b/include/vlc_actions.h index 428a34944d566cd1c7ca4cd0e581422fbb34569f..62f0afae53dce72d625db8a5c9c4e745e72f488a 100644 --- a/include/vlc_actions.h +++ b/include/vlc_actions.h @@ -123,34 +123,19 @@ VLC_API uint_fast32_t vlc_str2keycode(const char *str) VLC_USED; typedef enum vlc_action_id { ACTIONID_NONE = 0, ACTIONID_QUIT, - ACTIONID_PLAY_PAUSE, - ACTIONID_PLAY, - ACTIONID_PAUSE, - ACTIONID_STOP, + /* intf actions */ + ACTIONID_INTF_TOGGLE_FSC, + ACTIONID_INTF_HIDE, + ACTIONID_INTF_BOSS, + ACTIONID_INTF_POPUP_MENU, + /* playlist interaction */ + ACTIONID_PLAY_CLEAR, ACTIONID_PREV, ACTIONID_NEXT, - ACTIONID_SLOWER, - ACTIONID_FASTER, - ACTIONID_TOGGLE_FULLSCREEN, - ACTIONID_VOL_UP, - ACTIONID_VOL_DOWN, - ACTIONID_NAV_ACTIVATE, - ACTIONID_NAV_UP, - ACTIONID_NAV_DOWN, - ACTIONID_NAV_LEFT, - ACTIONID_NAV_RIGHT, - ACTIONID_JUMP_BACKWARD_EXTRASHORT, - ACTIONID_JUMP_FORWARD_EXTRASHORT, - ACTIONID_JUMP_BACKWARD_SHORT, - ACTIONID_JUMP_FORWARD_SHORT, - ACTIONID_JUMP_BACKWARD_MEDIUM, - 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 */ + /* playback */ + ACTIONID_LOOP, + ACTIONID_RANDOM, + /* playlist bookmarks */ ACTIONID_SET_BOOKMARK1, ACTIONID_SET_BOOKMARK2, ACTIONID_SET_BOOKMARK3, @@ -171,43 +156,85 @@ typedef enum vlc_action_id { ACTIONID_PLAY_BOOKMARK8, ACTIONID_PLAY_BOOKMARK9, ACTIONID_PLAY_BOOKMARK10, - /* end of contiguous zone */ - ACTIONID_PLAY_CLEAR, - ACTIONID_SUBDELAY_UP, + /* player state */ + ACTIONID_PLAY_PAUSE, + ACTIONID_PLAY, + ACTIONID_PAUSE, + ACTIONID_STOP, + ACTIONID_FRAME_NEXT, + /* input seeking */ + ACTIONID_JUMP_BACKWARD_EXTRASHORT, + ACTIONID_JUMP_FORWARD_EXTRASHORT, + ACTIONID_JUMP_BACKWARD_SHORT, + ACTIONID_JUMP_FORWARD_SHORT, + ACTIONID_JUMP_BACKWARD_MEDIUM, + ACTIONID_JUMP_FORWARD_MEDIUM, + ACTIONID_JUMP_BACKWARD_LONG, + ACTIONID_JUMP_FORWARD_LONG, + ACTIONID_POSITION, + /* program SID, chapter and title navigation */ + ACTIONID_PROGRAM_SID_PREV, + ACTIONID_PROGRAM_SID_NEXT, + ACTIONID_TITLE_PREV, + ACTIONID_TITLE_NEXT, + ACTIONID_CHAPTER_PREV, + ACTIONID_CHAPTER_NEXT, + ACTIONID_DISC_MENU, + /* audio / subtitle track */ + ACTIONID_AUDIO_TRACK, + ACTIONID_SUBTITLE_REVERSE_TRACK, + ACTIONID_SUBTITLE_TRACK, + /* audio / subtitle delay */ + ACTIONID_AUDIODELAY_DOWN, + ACTIONID_AUDIODELAY_UP, ACTIONID_SUBDELAY_DOWN, + ACTIONID_SUBDELAY_UP, + /* subtitle toggle */ + ACTIONID_SUBTITLE_TOGGLE, + /* subtitle sync */ ACTIONID_SUBSYNC_MARKAUDIO, ACTIONID_SUBSYNC_MARKSUB, ACTIONID_SUBSYNC_APPLY, ACTIONID_SUBSYNC_RESET, - ACTIONID_SUBPOS_UP, + /* subtitle display */ ACTIONID_SUBPOS_DOWN, - ACTIONID_AUDIO_TRACK, - ACTIONID_SUBTITLE_REVERSE_TRACK, - ACTIONID_SUBTITLE_TRACK, - ACTIONID_SUBTITLE_TOGGLE, + ACTIONID_SUBPOS_UP, ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL, - ACTIONID_SUBTITLE_TEXT_SCALE_UP, ACTIONID_SUBTITLE_TEXT_SCALE_DOWN, - ACTIONID_INTF_TOGGLE_FSC, - ACTIONID_INTF_HIDE, - ACTIONID_INTF_BOSS, - /* chapter and title navigation */ - ACTIONID_TITLE_PREV, - ACTIONID_TITLE_NEXT, - ACTIONID_CHAPTER_PREV, - ACTIONID_CHAPTER_NEXT, - /* end of chapter and title navigation */ - ACTIONID_AUDIODELAY_UP, - ACTIONID_AUDIODELAY_DOWN, - ACTIONID_SNAPSHOT, + ACTIONID_SUBTITLE_TEXT_SCALE_UP, + /* input rate */ + ACTIONID_RATE_NORMAL, + ACTIONID_RATE_SLOWER, + ACTIONID_RATE_FASTER, + ACTIONID_RATE_SLOWER_FINE, + ACTIONID_RATE_FASTER_FINE, + /* input navigation */ + ACTIONID_NAV_ACTIVATE, + ACTIONID_NAV_UP, + ACTIONID_NAV_DOWN, + ACTIONID_NAV_LEFT, + ACTIONID_NAV_RIGHT, + /* input recording */ ACTIONID_RECORD, - ACTIONID_DISC_MENU, + /* viewpoint */ + ACTIONID_VIEWPOINT_FOV_IN, + ACTIONID_VIEWPOINT_FOV_OUT, + ACTIONID_VIEWPOINT_ROLL_CLOCK, + ACTIONID_VIEWPOINT_ROLL_ANTICLOCK, + /* aout actions */ + ACTIONID_VOL_DOWN, + ACTIONID_VOL_UP, + ACTIONID_VOL_MUTE, + ACTIONID_AUDIODEVICE_CYCLE, + /* all vouts actions */ + ACTIONID_TOGGLE_FULLSCREEN, + ACTIONID_LEAVE_FULLSCREEN, + ACTIONID_SNAPSHOT, + ACTIONID_WALLPAPER, + /* vout aspect ratio */ ACTIONID_ASPECT_RATIO, + /* vout cropping */ ACTIONID_CROP, - ACTIONID_DEINTERLACE, - ACTIONID_DEINTERLACE_MODE, - ACTIONID_ZOOM, - ACTIONID_UNZOOM, ACTIONID_CROP_TOP, ACTIONID_UNCROP_TOP, ACTIONID_CROP_LEFT, @@ -216,38 +243,22 @@ typedef enum vlc_action_id { ACTIONID_UNCROP_BOTTOM, ACTIONID_CROP_RIGHT, ACTIONID_UNCROP_RIGHT, - ACTIONID_RANDOM, - ACTIONID_LOOP, - ACTIONID_WALLPAPER, - ACTIONID_LEAVE_FULLSCREEN, - /* Zoom */ + /* vout deinterlacing */ + ACTIONID_DEINTERLACE, + ACTIONID_DEINTERLACE_MODE, + /* vout scaling / zooming */ + ACTIONID_TOGGLE_AUTOSCALE, + ACTIONID_SCALE_UP, + ACTIONID_SCALE_DOWN, + ACTIONID_ZOOM, + ACTIONID_UNZOOM, ACTIONID_ZOOM_QUARTER, ACTIONID_ZOOM_HALF, ACTIONID_ZOOM_ORIGINAL, ACTIONID_ZOOM_DOUBLE, - /* Cycle Through Audio Devices */ - ACTIONID_AUDIODEVICE_CYCLE, - /* scaling */ - ACTIONID_TOGGLE_AUTOSCALE, - ACTIONID_SCALE_UP, - ACTIONID_SCALE_DOWN, - /* */ - ACTIONID_RATE_NORMAL, - ACTIONID_RATE_SLOWER_FINE, - ACTIONID_RATE_FASTER_FINE, - /* Cycle Through Program Service IDs */ - ACTIONID_PROGRAM_SID_NEXT, - ACTIONID_PROGRAM_SID_PREV, - ACTIONID_INTF_POPUP_MENU, - /* Viewpoint */ - ACTIONID_VIEWPOINT_FOV_IN, - ACTIONID_VIEWPOINT_FOV_OUT, - ACTIONID_VIEWPOINT_ROLL_CLOCK, - ACTIONID_VIEWPOINT_ROLL_ANTICLOCK, /* Combo Actions */ - ACTIONID_COMBO_VOL_FOV_UP, ACTIONID_COMBO_VOL_FOV_DOWN, - + ACTIONID_COMBO_VOL_FOV_UP, } vlc_action_id_t; /** diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c index 8472c12771b5992819730f64cf8c23ef304572fb..2145e500a5b8112ee650a1ae7bce8a061704d669 100644 --- a/modules/control/hotkeys.c +++ b/modules/control/hotkeys.c @@ -459,11 +459,11 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input, var_SetFloat( p_playlist, "rate", 1.f ); DisplayRate( p_vout, 1.f ); break; - case ACTIONID_FASTER: + case ACTIONID_RATE_FASTER: var_TriggerCallback( p_playlist, "rate-faster" ); DisplayRate( p_vout, var_GetFloat( p_playlist, "rate" ) ); break; - case ACTIONID_SLOWER: + case ACTIONID_RATE_SLOWER: var_TriggerCallback( p_playlist, "rate-slower" ); DisplayRate( p_vout, var_GetFloat( p_playlist, "rate" ) ); break; diff --git a/src/misc/actions.c b/src/misc/actions.c index 9bf9a23abac185da23ca837ce54ab1d52299a5cd..e10eb94790ae72f85c0199720a41fd27bd48ab70 100644 --- a/src/misc/actions.c +++ b/src/misc/actions.c @@ -281,7 +281,7 @@ static const struct name2action { "deinterlace", ACTIONID_DEINTERLACE, }, { "deinterlace-mode", ACTIONID_DEINTERLACE_MODE, }, { "disc-menu", ACTIONID_DISC_MENU, }, - { "faster", ACTIONID_FASTER, }, + { "faster", ACTIONID_RATE_FASTER, }, { "frame-next", ACTIONID_FRAME_NEXT, }, { "incr-scalefactor", ACTIONID_SCALE_UP, }, { "intf-boss", ACTIONID_INTF_BOSS, }, @@ -336,7 +336,7 @@ static const struct name2action { "set-bookmark7", ACTIONID_SET_BOOKMARK7, }, { "set-bookmark8", ACTIONID_SET_BOOKMARK8, }, { "set-bookmark9", ACTIONID_SET_BOOKMARK9, }, - { "slower", ACTIONID_SLOWER, }, + { "slower", ACTIONID_RATE_SLOWER, }, { "snapshot", ACTIONID_SNAPSHOT, }, { "stop", ACTIONID_STOP, }, { "subdelay-down", ACTIONID_SUBDELAY_DOWN, },