66
|
1 |
/*
|
|
2 |
* Copyright (c) 1999-2001 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CMIDAPPUI_H
|
|
20 |
#define CMIDAPPUI_H
|
|
21 |
|
|
22 |
// CAknAppUi inheritance in class declaration
|
|
23 |
#include <lcdui.h>
|
|
24 |
// MLcduiPlugin in class declaration
|
|
25 |
// MMIDObserver used as parameter in SetObserver function
|
|
26 |
#include <Lcdglue.h>
|
|
27 |
|
|
28 |
#include "coreuiavkonlcdui.h"
|
|
29 |
#include "coreuiappuichild.h"
|
|
30 |
|
|
31 |
class CMIDDisplayable;
|
|
32 |
class CMIDApplication;
|
|
33 |
|
|
34 |
NONSHARABLE_CLASS(CMIDAppUi) : public CBase, public java::ui::CoreAppUiChild, private MLcduiPlugin
|
|
35 |
{
|
|
36 |
public:
|
|
37 |
CMIDAppUi();
|
|
38 |
~CMIDAppUi();
|
|
39 |
|
|
40 |
void ConstructL();
|
|
41 |
void SetCurrentDisplayable(CMIDDisplayable* aDisplayable);
|
|
42 |
void HandleCommandL(TInt aCommand);
|
|
43 |
void HandleSwitchOnEventL(CCoeControl* aDestination);
|
|
44 |
void HandleForegroundEventL(TBool aForeground);
|
|
45 |
void HandleResourceChangeL(TInt aType);
|
|
46 |
void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent);
|
|
47 |
TBool HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination);
|
|
48 |
void AddToStackL(CCoeControl *aControl, TInt aPriority=ECoeStackPriorityDefault, TInt aStackingFlags=ECoeStackFlagStandard);
|
|
49 |
TRect ApplicationRect() const;
|
|
50 |
TRect ClientRect() const;
|
|
51 |
CAknToolbar* CurrentFixedToolbar() const;
|
|
52 |
void RemoveFromStack(CCoeControl *aControl);
|
|
53 |
CEikStatusPane* StatusPane();
|
|
54 |
|
|
55 |
RPointerArray<CMIDDisplayable>& Displayables();
|
|
56 |
|
|
57 |
void SetEnv(MMIDEnv& aEnv);
|
|
58 |
void UnSetEnv();
|
|
59 |
void SetPauseAppState(TBool aState);
|
|
60 |
TBool GetPauseAppState();
|
|
61 |
|
|
62 |
|
|
63 |
private:
|
|
64 |
// MLcduiPlugin
|
|
65 |
void SetObserverL(MMIDObserver* aObserver);
|
|
66 |
MMIDComponentFactory* CreateComponentFactoryL();
|
|
67 |
// This will be called from Toolkit before it deletes CMIDEnv
|
|
68 |
void SetEnv(MMIDEnv* aEnv);
|
|
69 |
|
|
70 |
private: // data
|
|
71 |
MMIDObserver* iObserver;
|
|
72 |
RPointerArray<CMIDDisplayable> iDisplayables;
|
|
73 |
java::ui::CoreUiAvkonAppUi* mCoreAppUi;
|
|
74 |
CAknAppUi* mJavaAppUi;
|
|
75 |
|
|
76 |
MMIDEnv* iEnv;
|
|
77 |
CMIDDisplayable* iCurrentDisplayable;
|
|
78 |
// To store orientation change before Observer is set.
|
|
79 |
TBool iPendingOrientationChange;
|
|
80 |
TBool iPauseApp;
|
|
81 |
};
|
|
82 |
|
|
83 |
#endif // CMIDAPPUI_H
|
|
84 |
|