Update contrib.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #include "multiplesurfacesapp.h"
18 #include "cmultiplesurfaces.h"
25 void CMultipleSurfacesAppUi::ConstructL()
27 // Create app framework
28 CEikAppUi::BaseConstructL(ENoAppResourceFile);
29 iAppView = new(ELeave) CMultipleSurfacesAppView(*this);
30 iAppView->ConstructL(ClientRect());
31 AddToStackL(iAppView);
32 iAppView->ActivateL();
35 CMultipleSurfacesAppUi::~CMultipleSurfacesAppUi()
37 delete iMultipleSurfaces;
40 RemoveFromStack(iAppView);
45 /** Process command parameters */
46 TBool CMultipleSurfacesAppUi::ProcessCommandParametersL(CApaCommandLine &aCommandLine)
48 TPtrC childQueueName = aCommandLine.ExecutableName();
49 iMultipleSurfaces = CMultipleSurfaces::NewL(CCoeEnv::Static()->WsSession(),
50 CCoeEnv::Static()->RootWin(), childQueueName, this, KParentQueueName());
51 iMultipleSurfaces->Start();
52 return CEikAppUi::ProcessCommandParametersL(aCommandLine);
55 void CMultipleSurfacesAppUi::Terminate()
58 CActiveScheduler::Stop();
61 void CMultipleSurfacesAppUi::BringToFront()
63 RWindow window = iAppView->Window();
64 RWsSession wsSession = iAppView->ControlEnv()->WsSession();
65 wsSession.SetWindowGroupOrdinalPosition(window.WindowGroupId(), 0);
71 CMultipleSurfacesAppView::CMultipleSurfacesAppView(CMultipleSurfacesAppUi& aAppUi) :
72 CCoeControl(), iAppUi(aAppUi)
77 void CMultipleSurfacesAppView::ConstructL(const TRect& aRect)
83 CMultipleSurfacesAppView::~CMultipleSurfacesAppView()
89 CMultipleSurfacesAppDocument::CMultipleSurfacesAppDocument(CEikApplication& aApp) : CEikDocument(aApp)
94 CEikAppUi* CMultipleSurfacesAppDocument::CreateAppUiL()
96 return new(ELeave) CMultipleSurfacesAppUi;
100 TUid CMultipleSurfacesApp::AppDllUid() const
102 return TUid::Uid(0x101FCABE);
105 CApaDocument* CMultipleSurfacesApp::CreateDocumentL()
107 return new(ELeave) CMultipleSurfacesAppDocument(*this);
110 LOCAL_C CApaApplication* NewApplication()
112 return new CMultipleSurfacesApp;
115 GLDEF_C TInt E32Main()
117 return EikStart::RunApplication(NewApplication);