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 "glplanetsapp.h"
24 _LIT( KParentQueueName, "zorder");
27 void CGLPlanetsAppUi::ConstructL()
29 // Create app framework
30 CEikAppUi::BaseConstructL(ENoAppResourceFile);
31 iAppView = new(ELeave) CGLPlanetsAppView(*this);
32 iAppView->ConstructL(ClientRect());
33 AddToStackL(iAppView);
34 iAppView->ActivateL();
37 CGLPlanetsAppUi::~CGLPlanetsAppUi()
42 RemoveFromStack(iAppView);
47 /** Process command parameters */
48 TBool CGLPlanetsAppUi::ProcessCommandParametersL(CApaCommandLine &aCommandLine)
50 TPtrC backgroundColor = aCommandLine.ExecutableName();
51 iGLPlanets = CGLPlanets::NewL(iAppView->Window(), backgroundColor, this, KParentQueueName());
53 return CEikAppUi::ProcessCommandParametersL(aCommandLine);
56 void CGLPlanetsAppUi::Terminate()
59 CActiveScheduler::Stop();
62 void CGLPlanetsAppUi::BringToFront()
64 RWindow window = iAppView->Window();
65 RWsSession wsSession = iAppView->ControlEnv()->WsSession();
66 wsSession.SetWindowGroupOrdinalPosition(window.WindowGroupId(), 0);
72 CGLPlanetsAppView::CGLPlanetsAppView(CGLPlanetsAppUi& aAppUi): iAppUi(aAppUi)
77 void CGLPlanetsAppView::ConstructL(const TRect& aRect)
83 CGLPlanetsAppView::~CGLPlanetsAppView()
89 CGLPlanetsAppDocument::CGLPlanetsAppDocument(CEikApplication& aApp) : CEikDocument(aApp)
94 CEikAppUi* CGLPlanetsAppDocument::CreateAppUiL()
96 return new(ELeave) CGLPlanetsAppUi;
100 TUid CGLPlanetsApp::AppDllUid() const
102 return TUid::Uid(0x101FCABE);
105 CApaDocument* CGLPlanetsApp::CreateDocumentL()
107 return new(ELeave) CGLPlanetsAppDocument(*this);
114 /** Application factory function */
115 LOCAL_C CApaApplication* NewApplication()
117 return new CGLPlanetsApp;
120 GLDEF_C TInt E32Main()
122 return EikStart::RunApplication(NewApplication);