26
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 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 |
#ifndef AKNSGCC_H
|
|
19 |
#define AKNSGCC_H
|
|
20 |
|
|
21 |
#include <AknCapServerClient.h>
|
|
22 |
#include <eikenv.h>
|
|
23 |
#include <eikdef.h>
|
|
24 |
#include <AknSyncDraw.h>
|
|
25 |
#include <AknLayoutConfig.h>
|
|
26 |
class CAknAppUiBase;
|
|
27 |
class CEikStatusPane;
|
|
28 |
class CEikAppUi;
|
|
29 |
|
|
30 |
class MAknSgcStatusPaneRedrawCoordinator
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
virtual void BlockServerStatusPaneRedrawsL() = 0;
|
|
34 |
virtual void RedrawServerStatusPane() = 0;
|
|
35 |
private:
|
|
36 |
IMPORT_C virtual void MAknSgcStatusPaneRedrawCoordinator_Reserved_1();
|
|
37 |
IMPORT_C virtual void MAknSgcStatusPaneRedrawCoordinator_Reserved_2();
|
|
38 |
};
|
|
39 |
|
|
40 |
enum TSgcMoveAppToWhere
|
|
41 |
{
|
|
42 |
ESgcMoveAppToForeground,
|
|
43 |
ESgcMoveAppToBackground
|
|
44 |
};
|
|
45 |
|
|
46 |
class CAknSgcImpl : public CBase
|
|
47 |
{
|
|
48 |
public:
|
|
49 |
virtual void MoveApp(TInt aAppWindowGroupId, TSgcMoveAppToWhere aWhere) = 0;
|
|
50 |
};
|
|
51 |
|
|
52 |
|
|
53 |
NONSHARABLE_CLASS(CAknSgcClient) : public CCoeStatic
|
|
54 |
{
|
|
55 |
public:
|
|
56 |
enum EAppFlags
|
|
57 |
{
|
|
58 |
EFullScreen,
|
|
59 |
ELegacyLayout,
|
|
60 |
EOrientationSpecified,
|
|
61 |
EOrientationLandscape
|
|
62 |
};
|
|
63 |
|
|
64 |
public:
|
|
65 |
IMPORT_C static void CreateL();
|
|
66 |
|
|
67 |
IMPORT_C static void HandleChangeL(); // for change in foreground, partial foreground, full screen, status pane, app embedding
|
|
68 |
IMPORT_C static RAknUiServer* AknSrv();
|
|
69 |
|
|
70 |
IMPORT_C static void SetStatusPaneRedrawCoordinator(MAknSgcStatusPaneRedrawCoordinator* aSpRedrawCoord);
|
|
71 |
IMPORT_C static void BlockServerStatusPaneRedrawsL();
|
|
72 |
IMPORT_C static void RedrawServerStatusPane();
|
|
73 |
|
|
74 |
IMPORT_C static CAknDrawSynchronizer* DrawSynchronizer();
|
|
75 |
|
|
76 |
IMPORT_C static void PrepareForAppExit();
|
|
77 |
|
|
78 |
IMPORT_C static void SetSystemFaded(TBool aFade);
|
|
79 |
IMPORT_C static TBool IsSystemFaded();
|
|
80 |
|
|
81 |
IMPORT_C static TPixelsTwipsAndRotation PixelsAndRotation(); // for local app
|
|
82 |
IMPORT_C static TPixelsTwipsAndRotation CalculatePixelsAndRotation(TBool aFullScreen, TBool aLegacyApp, TBool aAppOrientationSpecified, TBool aAppOrientationLandscape);
|
|
83 |
IMPORT_C static CAknLayoutConfig::TScreenMode ScreenMode(); // for local app
|
|
84 |
IMPORT_C static CAknLayoutConfig::TScreenMode CalculateScreenMode(TBool aFullScreen, TBool aAppOrientationSpecified, TBool aAppOrientationLandscape);
|
|
85 |
IMPORT_C static CAknLayoutConfig::TScreenMode CalculateScreenMode(TBool aFullScreen, TBool aAppOrientationSpecified, TBool aAppOrientationLandscape, TInt aAppScreenMode);
|
|
86 |
|
|
87 |
IMPORT_C static void SetKeyBlockMode(TAknKeySoundOpcode aMode);
|
|
88 |
IMPORT_C static void SetKeyboardRepeatRate(TAknDefaultKeyboardRepeatRate aRate);
|
|
89 |
/**
|
|
90 |
* Returns resource id of currently active statuspane. If current environment does not contain
|
|
91 |
* statuspane, resource id is fecthed from akncapserver. Returns zero on error.
|
|
92 |
*/
|
|
93 |
IMPORT_C static TInt CurrentStatuspaneResource();
|
|
94 |
|
|
95 |
IMPORT_C static CAknLayoutConfig& LayoutConfig();
|
|
96 |
IMPORT_C static const TDesC8& LayoutConfigBuf();
|
|
97 |
|
|
98 |
IMPORT_C static void MoveApp(TInt aAppWindowGroupId, TSgcMoveAppToWhere aWhere);
|
|
99 |
IMPORT_C static void SetImpl(CAknSgcImpl* aImpl);
|
|
100 |
|
|
101 |
// internal
|
|
102 |
static void RelinquishPriorityToForegroundAppLC(TBool aIsForeground);
|
|
103 |
|
|
104 |
protected:
|
|
105 |
CAknSgcClient();
|
|
106 |
~CAknSgcClient();
|
|
107 |
void BaseConstructL();
|
|
108 |
|
|
109 |
private:
|
|
110 |
inline static CAknSgcClient* Static();
|
|
111 |
virtual void ConstructL();
|
|
112 |
|
|
113 |
void DoHandleChangeL();
|
|
114 |
|
|
115 |
CEikStatusPane* StatusPane(CEikAppUi* aAppUi);
|
|
116 |
void SetAppUiForegroundL(CAknAppUiBase* aAppUi, TBool aForeground);
|
|
117 |
void SetAppUiPartialFgL(CAknAppUiBase* aAppUi, TBool aPartialFg);
|
|
118 |
|
|
119 |
void SimulateWsEventL(CEikAppUi* aAppUi, TInt aEventId);
|
|
120 |
|
|
121 |
static void ClearHandlingChangeFlag(TAny* aThis);
|
|
122 |
|
|
123 |
void DoPrepareForAppExit();
|
|
124 |
|
|
125 |
void DoSetSystemFaded(TBool aFade);
|
|
126 |
TBool DoIsSystemFaded() const;
|
|
127 |
|
|
128 |
void SetLegacyOrientationAndScreenModeAppUiFlags(TBitFlags& aAppFlags, TInt& aScreenMode, CAknAppUiBase* aAppUi);
|
|
129 |
|
|
130 |
TPixelsTwipsAndRotation DoCalculatePixelsAndRotation(TBool aFullScreen, TBool aLegacyApp, TBool aAppOrientationSpecified, TBool aAppOrientationLandscape, TInt aAppScreenMode);
|
|
131 |
CAknLayoutConfig::TScreenMode DoCalculateScreenMode(TBool aFullScreen, TBool aAppOrientationSpecified, TBool aAppOrientationLandscape, TInt aAppScreenMode);
|
|
132 |
|
|
133 |
void DoSetKeyBlockMode(TAknKeySoundOpcode aMode);
|
|
134 |
void DoSetKeyboardRepeatRate(TAknDefaultKeyboardRepeatRate aRate);
|
|
135 |
TInt DoAskCurrentStatuspaneResource();
|
|
136 |
|
|
137 |
void DoRelinquishPriorityToForegroundAppLC(TBool aIsForeground);
|
|
138 |
virtual const TDesC8& DoLayoutConfigBuf();
|
|
139 |
|
|
140 |
void StartupBlankL();
|
|
141 |
static TInt StartupUnblank(TAny* aThis);
|
|
142 |
void DoStartupUnblank();
|
|
143 |
|
|
144 |
protected:
|
|
145 |
TBitFlags iFlags;
|
|
146 |
CAknLayoutConfig* iLayoutConfig;
|
|
147 |
private:
|
|
148 |
CCoeEnv* iCoeEnv;
|
|
149 |
RAknUiServer iAknSrv;
|
|
150 |
TInt iSpLayout;
|
|
151 |
TInt iSpFlags;
|
|
152 |
TBitFlags iAppFlags;
|
|
153 |
MAknSgcStatusPaneRedrawCoordinator* iSpRedrawCoord;
|
|
154 |
CAknDrawSynchronizer* iDrawSync;
|
|
155 |
CIdle *iStartupBlank;
|
|
156 |
TInt iAppScreenMode;
|
|
157 |
CAknSgcImpl* iImpl;
|
|
158 |
};
|
|
159 |
|
|
160 |
|
|
161 |
|
|
162 |
#endif
|
|
163 |
|
|
164 |
// End of File
|