0, p_arg );
}
}
+
+void Dialogs::sendKey( int key )
+{
+ if( m_pProvider && m_pProvider->pf_show_dialog )
+ {
+ m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_SENDKEY,
+ key, NULL );
+ }
+}
/// Show an interaction dialog
void showInteraction( interaction_dialog_t * );
+ /// Send hotkeys (key accelerators)
+ void sendKey( int key );
+
private:
// Private because it's a singleton
Dialogs( intf_thread_t *pIntf );
return;
}
- var_SetInteger( getIntf()->p_libvlc, "key-pressed",
- rEvtKey.getModKey() );
+ getIntf()->p_sys->p_dialogs->sendKey( rEvtKey.getModKey() );
}
// Always store the modifier, which can be needed for scroll events.
int i = (rEvtScroll.getDirection() == EvtScroll::kUp ?
KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN) | m_currModifier;
- var_SetInteger( getIntf()->p_libvlc, "key-pressed", i );
+ getIntf()->p_sys->p_dialogs->sendKey( i );
}
}
{
// Only do the action when the key is down
if( rEvtKey.getKeyState() == EvtKey::kDown )
- var_SetInteger( getIntf()->p_libvlc, "key-pressed",
- rEvtKey.getModKey() );
+ getIntf()->p_sys->p_dialogs->sendKey( rEvtKey.getModKey() );
}
virtual void processEvent( EvtScroll &rEvtScroll )
i_vlck |= ( rEvtScroll.getDirection() == EvtScroll::kUp ) ?
KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN;
- var_SetInteger( getIntf()->p_libvlc, "key-pressed", i_vlck );
+ getIntf()->p_sys->p_dialogs->sendKey( i_vlck );
}
#endif
{
// Only do the action when the key is down
if( rEvtKey.getKeyState() == EvtKey::kDown )
- var_SetInteger( getIntf()->p_libvlc, "key-pressed",
- rEvtKey.getModKey() );
+ getIntf()->p_sys->p_dialogs->sendKey( rEvtKey.getModKey() );
}
#define VOUT_WINDOW_HPP
#include "generic_window.hpp"
+#include "dialogs.hpp"
#include <vlc_vout_window.h>
class OSGraphics;