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; }
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; }
CScreen* CClientApp::openClientScreen() { CScreen* screen = createScreen(); EVENTQUEUE->adoptHandler(IScreen::getErrorEvent(), screen->getEventTarget(), new TMethodEventJob<CClientApp>( this, &CClientApp::handleScreenError)); return screen; }
static CScreen* openServerScreen() { CScreen* screen = createScreen(); EVENTQUEUE->adoptHandler(IScreen::getErrorEvent(), screen->getEventTarget(), new CFunctionEventJob( &handleScreenError)); return screen; }