Exemplo n.º 1
0
void App::onMessage(QString type, QVariantMap data)
{
    if (type == "quit") {
        stopFullScreen();
        qApp->quit();
    }


    else if (type == "startFS")
        startFullScreen();


    else if (type == "stopFS")
        stopFullScreen();


    else if(type == "allowUserInput") {
        allowUserInput = data.value("value", false).toBool();

        if (lockWin)
            lockWin->allowUserInput(allowUserInput);
    }


    else if (type == "GMoption")
        graphic->setOption(data.take("option").toString(), data);


    else if (type == "shutdown")
        shutdown();
}
Exemplo n.º 2
0
bool GPG_Application::startScreenSaverFullScreen(
		int width,
		int height,
		int bpp,int frequency,
		const bool stereoVisual,
		const int stereoMode,
		const GHOST_TUns16 samples)
{
	bool ret = startFullScreen(width, height, bpp, frequency, stereoVisual, stereoMode, samples);
	if (ret)
	{
		HWND ghost_hwnd = findGhostWindowHWND(m_mainWindow);
		if (ghost_hwnd != NULL)
		{
			GetCursorPos(&scr_save_mouse_pos);
			ghost_wnd_proc = (WNDPROC) GetWindowLongPtr(ghost_hwnd, GWLP_WNDPROC);
			SetWindowLongPtr(ghost_hwnd,GWLP_WNDPROC, (uintptr_t) screenSaverWindowProc);
		}
	}
	return ret;
}
Exemplo n.º 3
0
void App::restartFS()
{
    lockWin = NULL;
    startFullScreen();
}