コード例 #1
0
ファイル: CServerApp.cpp プロジェクト: axelson/synergy-plus
CScreen* CServerApp::openServerScreen()
{
	CScreen* screen = createScreen();
	EVENTQUEUE->adoptHandler(IScreen::getErrorEvent(),
		screen->getEventTarget(),
		new TMethodEventJob<CServerApp>(
		this, &CServerApp::handleScreenError));
	EVENTQUEUE->adoptHandler(IScreen::getSuspendEvent(),
		screen->getEventTarget(),
		new TMethodEventJob<CServerApp>(
		this, &CServerApp::handleSuspend));
	EVENTQUEUE->adoptHandler(IScreen::getResumeEvent(),
		screen->getEventTarget(),
		new TMethodEventJob<CServerApp>(
		this, &CServerApp::handleResume));
	return screen;
}
コード例 #2
0
ファイル: CServerApp.cpp プロジェクト: rakete/synergy-foss
CScreen* CServerApp::openServerScreen()
{
	CScreen* screen = createScreen();
	m_events->adoptHandler(m_events->forIScreen().error(),
		screen->getEventTarget(),
		new TMethodEventJob<CServerApp>(
		this, &CServerApp::handleScreenError));
	m_events->adoptHandler(m_events->forIScreen().suspend(),
		screen->getEventTarget(),
		new TMethodEventJob<CServerApp>(
		this, &CServerApp::handleSuspend));
	m_events->adoptHandler(m_events->forIScreen().resume(),
		screen->getEventTarget(),
		new TMethodEventJob<CServerApp>(
		this, &CServerApp::handleResume));
	return screen;
}
コード例 #3
0
CScreen*
CClientApp::openClientScreen()
{
    CScreen* screen = createScreen();
    EVENTQUEUE->adoptHandler(IScreen::getErrorEvent(),
                             screen->getEventTarget(),
                             new TMethodEventJob<CClientApp>(
                                 this, &CClientApp::handleScreenError));
    return screen;
}
コード例 #4
0
ファイル: synergys.cpp プロジェクト: svn2github/synergy-plus
static
CScreen*
openServerScreen()
{
	CScreen* screen = createScreen();
	EVENTQUEUE->adoptHandler(IScreen::getErrorEvent(),
							screen->getEventTarget(),
							new CFunctionEventJob(
								&handleScreenError));
	return screen;
}