Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 1997-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
32 Creates a FEP interface object.
37 typedef CCoeFep* (*TCoeFepFactoryFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll, const CCoeFepParameters& aFepParameters);
40 Calls the second ordinal function of the FEP for which the settings dialog is to be executed.
45 typedef void (*TCoeSynchronouslyExecuteFepSettingsDialogFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll);
47 /** Stack priority flags.
49 Controls with higher priorities get offered key events before controls
50 with lower priorities.
57 ECoeStackPriorityDefault=0,
59 ECoeStackPriorityMenu=10,
61 ECoeStackPriorityDialog=50,
63 ECoeStackPriorityCba=60,
65 ECoeStackPriorityAlert=200,
67 ECoeStackPrioritySoftkey=240,
69 ECoeStackPriorityFep=250,
71 ECoeStackPriorityEnvironmentFilter=300
75 /** Control stack flags.
77 Each control on the stack has a set of these flags which can be used
78 to refuse to accept key events and to refuse requests for focus.
84 /** The default value */
85 ECoeStackFlagStandard = 0,
86 /** The control does not accept key events. */
87 ECoeStackFlagRefusesAllKeys = 0x01,
88 /** The control does not accept keyboard focus. */
89 ECoeStackFlagRefusesFocus = 0x02,
90 /** The control is owned and deleted by the stack. */
91 ECoeStackFlagOwnershipTransfered= 0x04,
92 /** The control is also added to the stack of any embedded app UI. For
93 example, an alert dialog added through CEikonEnv will be
94 shared on the stack of all embedded app UIs that may appear in the
96 ECoeStackFlagSharable = 0x08
99 class CCoeControlStack;
100 class CCoeViewManager;
102 /** Application user interface (app UI) base class.
104 The app UI's responsibilities include owning the application's control stack and views,
105 handling user commands, (see the derived class CEikAppUi), and handling events sent by
106 the OS to the application, for instance being brought to the foreground.
108 The UI framework class CEikAppUi is derived from this class. UIs may derive
109 further to add their own UI-specific features to the app UI; each application must
110 derive its own concrete app UI class from this.
114 class CCoeAppUi : public CBase
117 // Construction and destruction
118 IMPORT_C CCoeAppUi();
119 IMPORT_C ~CCoeAppUi();
120 IMPORT_C void ConstructL(CCoeAppUi* aPrevious=NULL);
122 IMPORT_C void AddToStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard);
123 IMPORT_C void AddToStackL(CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard);
124 IMPORT_C void RemoveFromStack(CCoeControl* aControl);
125 IMPORT_C void HandleStackChanged();
126 IMPORT_C void HandleStackedControlsResourceChange(TInt aType);
127 IMPORT_C void UpdateStackedControlFlags(CCoeControl* aControl,TInt aFlags,TInt aMask);
129 IMPORT_C CArrayFix<TCoeHelpContext>* AppHelpContextL() const;
131 IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const;
133 IMPORT_C CCoeControl* TopFocusedControl() const;
135 IMPORT_C TBool IsDisplayingMenuOrDialog() const;
136 IMPORT_C TBool IsDisplayingDialog() const;
137 IMPORT_C TBool IsDisplayingControlBetweenPriorities(TInt aLowerPriority, TInt aHigherPriority) const;
139 IMPORT_C void RegisterViewL(MCoeView& aView);
140 IMPORT_C void DeregisterView(const MCoeView& aView);
141 IMPORT_C void SetDefaultViewL(const MCoeView& aView);
142 IMPORT_C TInt GetDefaultViewId(TVwsViewId& aViewId) const;
143 // Pseudo-view registration
144 IMPORT_C void CheckInitializeViewsL(TUid aAppUid);
145 IMPORT_C void RegisterApplicationViewL(TUid aAppUid);
146 IMPORT_C void DeregisterApplicationView();
148 IMPORT_C TBool IsViewConstructed(const TVwsViewId& aViewId) const;
150 IMPORT_C void ActivateViewL(const TVwsViewId& aViewId);
151 IMPORT_C void ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
152 IMPORT_C void ActivateTopViewL();
153 IMPORT_C void CreateActivateViewEventL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
154 IMPORT_C void DeactivateActiveViewIfOwnerMatchL();
155 IMPORT_C void DeactivateActiveViewL();
156 IMPORT_C TInt GetActiveViewId(TVwsViewId& aViewId) const;
158 IMPORT_C void AddViewObserverL(MCoeViewObserver* aViewObserver);
159 IMPORT_C void RemoveViewObserver(MCoeViewObserver* aViewObserver);
160 // View activation observer
161 IMPORT_C void AddViewActivationObserverL(MCoeViewActivationObserver* aViewActivationObserver);
162 IMPORT_C void RemoveViewActivationObserver(MCoeViewActivationObserver* aViewActivationObserver);
163 IMPORT_C void NotifyNextActivation(const TVwsViewId& aViewId, MCoeViewActivationObserver& aViewActivationObserver);
164 IMPORT_C void NotifyNextActivation(MCoeViewActivationObserver& aViewActivationObserver);
165 IMPORT_C TBool CheckSourceOfViewSwitchL(const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic=NULL) const;
166 // View decativation observer
167 IMPORT_C void AddViewDeactivationObserverL(MCoeViewDeactivationObserver* aViewDeactivationObserver);
168 IMPORT_C void RemoveViewDeactivationObserver(MCoeViewDeactivationObserver* aViewDeactivationObserver);
169 IMPORT_C void NotifyNextDeactivation(const TVwsViewId& aViewId, MCoeViewDeactivationObserver& aViewDeactivationObserver);
170 IMPORT_C void NotifyNextDeactivation(MCoeViewDeactivationObserver& aViewDeactivationObserver);
171 // View session configuration
172 IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable);
173 IMPORT_C void UpdateViewServerBackgroundColor(const TRgb& aBgColor);
176 IMPORT_C void SetCustomControl(TInt aCustomControl);
177 IMPORT_C TInt GetTopViewId(TVwsViewId& aViewId) const;
178 IMPORT_C void SetWindowGroupOrdinal(TInt aWindowGroupOrdinal);
181 IMPORT_C void SetApplicationViewAsDefaultL(); // internalTechnology
182 IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId,TInt aMode); // internalTechnology
183 IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId); // internalTechnology
184 IMPORT_C void GetSystemDefaultViewL(TVwsViewId& aViewId); // internalTechnology
185 IMPORT_C virtual void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);
186 IMPORT_C virtual void PrepareToExit();
187 protected: // Internal
188 IMPORT_C virtual void HandleScreenDeviceChangedL();
190 IMPORT_C virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
191 IMPORT_C virtual void HandleForegroundEventL(TBool aForeground);
192 IMPORT_C virtual void HandleSwitchOnEventL(CCoeControl* aDestination);
193 IMPORT_C virtual void HandleSystemEventL(const TWsEvent& aEvent);
194 IMPORT_C virtual void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent);
195 IMPORT_C virtual void SetAndDrawFocus(TBool aFocus);
196 IMPORT_C virtual CArrayFix<TCoeHelpContext>* HelpContextL() const;
198 IMPORT_C virtual TBool FrameworkCallsRendezvous() const;
200 IMPORT_C void WriteInternalStateOfStackedControlsL(RWriteStream& aWriteStream) const; // internalTechnology
201 public: // Deprecated. Do not use!
202 IMPORT_C void RegisterViewAndAddStackL(MCoeView& aView); // deprecated
203 IMPORT_C void DeregisterViewAndRemoveStack(const MCoeView& aView); // deprecated
204 IMPORT_C void RemoveFromViewStack(const MCoeView& aView,CCoeControl* aControl); // deprecated
205 IMPORT_C void UpdateViewStackedControlFlags(const MCoeView& aView,CCoeControl* aControl,TInt aFlags,TInt aMask); // deprecated
206 IMPORT_C void AddToViewStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); // deprecated
207 public: // not exported
208 TBool IsControlOnStack(CCoeControl* aControl) const;
209 void SetCurrentControlStackGroupId(TInt aGroupId);
210 void NotifyFontChange(const CCoeFontProvider& aFontProvider);
211 void RefetchPixelMappingL();
213 enum TRemoveCondition
215 ERemoveUnconditionally,
216 ERemoveOnlyIfSharable
219 IMPORT_C virtual void CCoeAppUi_Reserved_2();
221 CCoeControl* TopFocusableControl() const;
222 TInt FindPos(CCoeControlStack* aStack,CCoeControl* aControl) const;
223 void SetFocusToControl(CCoeControl* aControl,TBool aFocus);
224 void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags);
225 void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags, TInt aGroupId);
226 void DoRemoveFromStack(CCoeControlStack* aStack,CCoeControl* aControl,TRemoveCondition aRemoveCondition=ERemoveUnconditionally);
227 void DoUpdateStackedControlFlags(CCoeControlStack* aStack,CCoeControl* aControl,TInt aFlags,TInt aMask);
229 /**Monitor function for passing all windows events to registered monitor observers for optional inspection*/
230 void MonitorWsEvent(const TWsEvent& aEvent);
234 friend class CTestDriver;
238 CCoeViewManager* iViewManager;
239 CCoeControlStack* iStack;
241 TInt iCCoeAppUi_Reserved1;
245 #endif // __COEAUI_H__