Ejemplo n.º 1
0
CMouse::CMouse(CMainFrame* pMainFrm, bool bD3DFS/* = false*/)
    : m_bD3DFS(bD3DFS)
    , m_pMainFrame(pMainFrm)
    , m_dwMouseHiderStartTick(0)
    , m_bLeftDoubleStarted(false)
    , m_leftDoubleStartTime(0)
    , m_popupMenuUninitTime(0)
{
    m_cursors[Cursor::NONE] = nullptr;
    m_cursors[Cursor::ARROW] = LoadCursor(nullptr, IDC_ARROW);
    m_cursors[Cursor::HAND] = LoadCursor(nullptr, IDC_HAND);
    ResetToBlankState();

    EventRouter::EventSelection evs;
    evs.insert(MpcEvent::SWITCHING_TO_FULLSCREEN);
    evs.insert(MpcEvent::SWITCHED_TO_FULLSCREEN);
    evs.insert(MpcEvent::SWITCHING_TO_FULLSCREEN_D3D);
    evs.insert(MpcEvent::SWITCHED_TO_FULLSCREEN_D3D);
    evs.insert(MpcEvent::MEDIA_LOADED);
    evs.insert(MpcEvent::CONTEXT_MENU_POPUP_UNINITIALIZED);
    GetEventd().Connect(m_eventc, evs, std::bind(&CMouse::EventCallback, this, std::placeholders::_1));
}
Ejemplo n.º 2
0
void CMouse::InternalOnDestroy()
{
    ResetToBlankState();
}