void CSdlAppUi::ConstructL() { BaseConstructL(ENoScreenFurniture | EAppOrientationLandscape); iSDLWin = new (ELeave) CSDLWin; iSDLWin->ConstructL(ApplicationRect()); iSdl = CSDL::NewL(CSDL::EEnableFocusStop); iSdlObserver = new (ELeave) CSDLObserver(iSdl); iSdl->SetContainerWindowL( iSDLWin->GetWindow(), iEikonEnv->WsSession(), *iEikonEnv->ScreenDevice()); iSdl->SetObserver(iSdlObserver); iSdl->DisableKeyBlocking(*this); iWait = new (ELeave) CExitWait(*this); CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10); AddCmdLineParamsL(*args); iSdl->CallMainL(iWait->iStatus, *args, CSDL::ENoFlags, 81920); delete args; iWait->Start(); }
// ----------------------------------------------------------------------------- // CzxEmuleAppUi::ConstructL() // Symbian 2nd phase constructor can leave. // ----------------------------------------------------------------------------- // void CzxEmuleAppUi::ConstructL() { // Initialise app UI with standard value. BaseConstructL(CAknAppUi::EAknEnableSkin); // Create view object //iAppView = CzxEmuleAppView::NewL(ClientRect()); iAppView = CzxEmuleAppView::NewL(ApplicationRect()); AddToStackL( iAppView ); //ВАЖНО для вызова HandleResourceChange при смене настроек экрана // Create a file to write the text to TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName); if ((KErrNone != err) && (KErrAlreadyExists != err)) { return; } RFile file; err = file.Replace(CCoeEnv::Static()->FsSession(), KFileName, EFileWrite); CleanupClosePushL(file); if (KErrNone != err) { CleanupStack::PopAndDestroy(1); // file return; } RFileWriteStream outputFileStream(file); CleanupClosePushL(outputFileStream); outputFileStream << KText; CleanupStack::PopAndDestroy(2); // outputFileStream, file }
void CSdlAppUi::ConstructL() { BaseConstructL(CAknAppUi::EAknEnableSkin /* | ENoScreenFurniture*/); iSDLWin = new (ELeave) CSDLWin; iSDLWin->ConstructL(ApplicationRect()); iWait = new (ELeave) CExitWait(*this); StartTestL(0); }
void CSdlAppUi::HandleResourceChangeL(TInt aType) { CAknAppUi::HandleResourceChangeL(aType); if(aType == KEikDynamicLayoutVariantSwitch) { iSDLWin->SetRect(ApplicationRect()); if (iSdl) { iSdl->SetContainerWindowL( iSDLWin->GetWindow(), iEikonEnv->WsSession(), *iEikonEnv->ScreenDevice()); } } }