Commit 1fde8b5a authored by Laurent Aimar's avatar Laurent Aimar

Added 'Boss Key' support to the core.

The interfaces that want to implement it can now add a callback on
libvlc::intf-boss.
parent a99f2ab5
......@@ -149,6 +149,7 @@ typedef enum vlc_action {
ACTIONID_SUBTITLE_TRACK,
ACTIONID_INTF_SHOW,
ACTIONID_INTF_HIDE,
ACTIONID_INTF_BOSS,
/* chapter and title navigation */
ACTIONID_TITLE_PREV,
ACTIONID_TITLE_NEXT,
......
......@@ -226,6 +226,10 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
var_SetBool( p_intf->p_libvlc, "intf-show", false );
break;
case ACTIONID_INTF_BOSS:
var_TriggerCallback( p_intf->p_libvlc, "intf-boss" );
break;
/* Video Output actions */
case ACTIONID_SNAPSHOT:
if( p_vout )
......
......@@ -254,6 +254,7 @@ static const struct action actions[] =
{ "faster", ACTIONID_FASTER, },
{ "frame-next", ACTIONID_FRAME_NEXT, },
{ "incr-scalefactor", ACTIONID_SCALE_UP, },
{ "intf-boss", ACTIONID_INTF_BOSS, },
{ "intf-hide", ACTIONID_INTF_HIDE, },
{ "intf-show", ACTIONID_INTF_SHOW, },
{ "jump+extrashort", ACTIONID_JUMP_FORWARD_EXTRASHORT, },
......
......@@ -1474,6 +1474,8 @@ static const char *const ppsz_albumart_descriptions[] =
#define INTF_SHOW_KEY_LONGTEXT N_("Raise the interface above all other windows.")
#define INTF_HIDE_KEY_TEXT N_("Hide interface")
#define INTF_HIDE_KEY_LONGTEXT N_("Lower the interface below all other windows.")
#define INTF_BOSS_KEY_TEXT N_("Boss key")
#define INTF_BOSS_KEY_LONGTEXT N_("Hide the interface and pause playback.")
#define SNAP_KEY_TEXT N_("Take video snapshot")
#define SNAP_KEY_LONGTEXT N_("Takes a video snapshot and writes it to disk.")
......@@ -2277,6 +2279,7 @@ vlc_module_begin ()
# define KEY_DEINTERLACE "d"
# define KEY_INTF_SHOW "i"
# define KEY_INTF_HIDE "Shift+i"
# define KEY_INTF_BOSS NULL
# define KEY_DISC_MENU "Ctrl+m"
# define KEY_TITLE_PREV "Ctrl+p"
# define KEY_TITLE_NEXT "Ctrl+n"
......@@ -2394,6 +2397,7 @@ vlc_module_begin ()
# define KEY_DEINTERLACE "d"
# define KEY_INTF_SHOW "i"
# define KEY_INTF_HIDE "Shift+i"
# define KEY_INTF_BOSS NULL
# define KEY_DISC_MENU "Shift+m"
# define KEY_TITLE_PREV "Shift+o"
# define KEY_TITLE_NEXT "Shift+b"
......@@ -2567,6 +2571,8 @@ vlc_module_begin ()
INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, true )
add_key( "key-intf-hide", KEY_INTF_HIDE,
INTF_HIDE_KEY_TEXT, INTF_HIDE_KEY_LONGTEXT, true )
add_key( "key-intf-boss", KEY_INTF_BOSS,
INTF_BOSS_KEY_TEXT, INTF_BOSS_KEY_LONGTEXT, true )
add_key( "key-snapshot", KEY_SNAPSHOT,
SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, true )
add_key( "key-record", KEY_RECORD,
......
......@@ -533,6 +533,9 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );
var_SetBool( p_libvlc, "intf-show", true );
/* Create a variable for the Boss Key */
var_Create( p_libvlc, "intf-boss", VLC_VAR_VOID );
/* Create a variable for showing the right click menu */
var_Create( p_libvlc, "intf-popupmenu", VLC_VAR_BOOL );
......
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