1.1 --- a/epoc32/include/coeaui.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,245 +0,0 @@
1.4 -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#ifndef __COEAUI_H__
1.20 -#define __COEAUI_H__
1.21 -
1.22 -#include <e32std.h>
1.23 -#include <e32base.h>
1.24 -#include <w32std.h>
1.25 -#include <vwsdef.h>
1.26 -#include <coedef.h>
1.27 -#include <coehelp.h>
1.28 -#include <coeview.h>
1.29 -#include <coeinput.h>
1.30 -
1.31 -class CCoeEnv;
1.32 -class CCoeControl;
1.33 -
1.34 -/**
1.35 -Creates a FEP interface object.
1.36 -
1.37 -@publishedAll
1.38 -@released
1.39 -*/
1.40 -typedef CCoeFep* (*TCoeFepFactoryFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll, const CCoeFepParameters& aFepParameters);
1.41 -
1.42 -/**
1.43 -Calls the second ordinal function of the FEP for which the settings dialog is to be executed.
1.44 -
1.45 -@publishedAll
1.46 -@released
1.47 -*/
1.48 -typedef void (*TCoeSynchronouslyExecuteFepSettingsDialogFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll);
1.49 -
1.50 -/** Stack priority flags.
1.51 -
1.52 -Controls with higher priorities get offered key events before controls
1.53 -with lower priorities.
1.54 -
1.55 -@publishedAll
1.56 -@released */
1.57 -enum
1.58 - {
1.59 - /** 0 */
1.60 - ECoeStackPriorityDefault=0,
1.61 - /** 10 */
1.62 - ECoeStackPriorityMenu=10,
1.63 - /** 50 */
1.64 - ECoeStackPriorityDialog=50,
1.65 - /** 60 */
1.66 - ECoeStackPriorityCba=60,
1.67 - /** 200 */
1.68 - ECoeStackPriorityAlert=200,
1.69 - /** 240 */
1.70 - ECoeStackPrioritySoftkey=240,
1.71 - /** 250 */
1.72 - ECoeStackPriorityFep=250,
1.73 - /** 300 */
1.74 - ECoeStackPriorityEnvironmentFilter=300
1.75 - };
1.76 -
1.77 -
1.78 -/** Control stack flags.
1.79 -
1.80 -Each control on the stack has a set of these flags which can be used
1.81 -to refuse to accept key events and to refuse requests for focus.
1.82 -
1.83 -@publishedAll
1.84 -@released */
1.85 -enum
1.86 - {
1.87 - /** The default value */
1.88 - ECoeStackFlagStandard = 0,
1.89 - /** The control does not accept key events. */
1.90 - ECoeStackFlagRefusesAllKeys = 0x01,
1.91 - /** The control does not accept keyboard focus. */
1.92 - ECoeStackFlagRefusesFocus = 0x02,
1.93 - /** The control is owned and deleted by the stack. */
1.94 - ECoeStackFlagOwnershipTransfered= 0x04,
1.95 - /** The control is also added to the stack of any embedded app UI. For
1.96 - example, an alert dialog added through CEikonEnv will be
1.97 - shared on the stack of all embedded app UIs that may appear in the
1.98 - application. */
1.99 - ECoeStackFlagSharable = 0x08
1.100 - };
1.101 -
1.102 -class CCoeControlStack;
1.103 -class CCoeViewManager;
1.104 -
1.105 -/** Application user interface (app UI) base class.
1.106 -
1.107 -The app UI's responsibilities include owning the application's control stack and views,
1.108 -handling user commands, (see the derived class CEikAppUi), and handling events sent by
1.109 -the OS to the application, for instance being brought to the foreground.
1.110 -
1.111 -The UI framework class CEikAppUi is derived from this class. UIs may derive
1.112 -further to add their own UI-specific features to the app UI; each application must
1.113 -derive its own concrete app UI class from this.
1.114 -
1.115 -@publishedAll
1.116 -@released */
1.117 -class CCoeAppUi : public CBase
1.118 - {
1.119 -public:
1.120 - // Construction and destruction
1.121 - IMPORT_C CCoeAppUi();
1.122 - IMPORT_C ~CCoeAppUi();
1.123 - IMPORT_C void ConstructL(CCoeAppUi* aPrevious=NULL);
1.124 - // Control stack
1.125 - IMPORT_C void AddToStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard);
1.126 - IMPORT_C void AddToStackL(CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard);
1.127 - IMPORT_C void RemoveFromStack(CCoeControl* aControl);
1.128 - IMPORT_C void HandleStackChanged();
1.129 - IMPORT_C void HandleStackedControlsResourceChange(TInt aType);
1.130 - IMPORT_C void UpdateStackedControlFlags(CCoeControl* aControl,TInt aFlags,TInt aMask);
1.131 - // Help context
1.132 - IMPORT_C CArrayFix<TCoeHelpContext>* AppHelpContextL() const;
1.133 - // Text input
1.134 - IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const;
1.135 - // Control focus
1.136 - IMPORT_C CCoeControl* TopFocusedControl() const;
1.137 - // Utility
1.138 - IMPORT_C TBool IsDisplayingMenuOrDialog() const;
1.139 - IMPORT_C TBool IsDisplayingDialog() const;
1.140 - IMPORT_C TBool IsDisplayingControlBetweenPriorities(TInt aLowerPriority, TInt aHigherPriority) const;
1.141 - // View registration
1.142 - IMPORT_C void RegisterViewL(MCoeView& aView);
1.143 - IMPORT_C void DeregisterView(const MCoeView& aView);
1.144 - IMPORT_C void SetDefaultViewL(const MCoeView& aView);
1.145 - IMPORT_C TInt GetDefaultViewId(TVwsViewId& aViewId) const;
1.146 - // Pseudo-view registration
1.147 - IMPORT_C void CheckInitializeViewsL(TUid aAppUid);
1.148 - IMPORT_C void RegisterApplicationViewL(TUid aAppUid);
1.149 - IMPORT_C void DeregisterApplicationView();
1.150 - // View construction
1.151 - IMPORT_C TBool IsViewConstructed(const TVwsViewId& aViewId) const;
1.152 - // View activation
1.153 - IMPORT_C void ActivateViewL(const TVwsViewId& aViewId);
1.154 - IMPORT_C void ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
1.155 - IMPORT_C void ActivateTopViewL();
1.156 - IMPORT_C void CreateActivateViewEventL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
1.157 - IMPORT_C void DeactivateActiveViewIfOwnerMatchL();
1.158 - IMPORT_C void DeactivateActiveViewL();
1.159 - IMPORT_C TInt GetActiveViewId(TVwsViewId& aViewId) const;
1.160 - // View registration
1.161 - IMPORT_C void AddViewObserverL(MCoeViewObserver* aViewObserver);
1.162 - IMPORT_C void RemoveViewObserver(MCoeViewObserver* aViewObserver);
1.163 - // View activation observer
1.164 - IMPORT_C void AddViewActivationObserverL(MCoeViewActivationObserver* aViewActivationObserver);
1.165 - IMPORT_C void RemoveViewActivationObserver(MCoeViewActivationObserver* aViewActivationObserver);
1.166 - IMPORT_C void NotifyNextActivation(const TVwsViewId& aViewId, MCoeViewActivationObserver& aViewActivationObserver);
1.167 - IMPORT_C void NotifyNextActivation(MCoeViewActivationObserver& aViewActivationObserver);
1.168 - IMPORT_C TBool CheckSourceOfViewSwitchL(const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic=NULL) const;
1.169 - // View decativation observer
1.170 - IMPORT_C void AddViewDeactivationObserverL(MCoeViewDeactivationObserver* aViewDeactivationObserver);
1.171 - IMPORT_C void RemoveViewDeactivationObserver(MCoeViewDeactivationObserver* aViewDeactivationObserver);
1.172 - IMPORT_C void NotifyNextDeactivation(const TVwsViewId& aViewId, MCoeViewDeactivationObserver& aViewDeactivationObserver);
1.173 - IMPORT_C void NotifyNextDeactivation(MCoeViewDeactivationObserver& aViewDeactivationObserver);
1.174 - // View session configuration
1.175 - IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable);
1.176 - IMPORT_C void UpdateViewServerBackgroundColor(const TRgb& aBgColor);
1.177 -
1.178 - // New APIs
1.179 - IMPORT_C void SetCustomControl(TInt aCustomControl);
1.180 - IMPORT_C TInt GetTopViewId(TVwsViewId& aViewId) const;
1.181 - IMPORT_C void SetWindowGroupOrdinal(TInt aWindowGroupOrdinal);
1.182 -
1.183 -public: // Internal
1.184 - IMPORT_C void SetApplicationViewAsDefaultL(); // internalTechnology
1.185 - IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId,TInt aMode); // internalTechnology
1.186 - IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId); // internalTechnology
1.187 - IMPORT_C void GetSystemDefaultViewL(TVwsViewId& aViewId); // internalTechnology
1.188 - IMPORT_C virtual void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);
1.189 - IMPORT_C virtual void PrepareToExit();
1.190 -protected: // Internal
1.191 - IMPORT_C virtual void HandleScreenDeviceChangedL();
1.192 -private: // Internal
1.193 - IMPORT_C virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
1.194 - IMPORT_C virtual void HandleForegroundEventL(TBool aForeground);
1.195 - IMPORT_C virtual void HandleSwitchOnEventL(CCoeControl* aDestination);
1.196 - IMPORT_C virtual void HandleSystemEventL(const TWsEvent& aEvent);
1.197 - IMPORT_C virtual void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent);
1.198 - IMPORT_C virtual void SetAndDrawFocus(TBool aFocus);
1.199 - IMPORT_C virtual CArrayFix<TCoeHelpContext>* HelpContextL() const;
1.200 -public: // Internal
1.201 - IMPORT_C virtual TBool FrameworkCallsRendezvous() const;
1.202 -public: // Internal
1.203 - IMPORT_C void WriteInternalStateOfStackedControlsL(RWriteStream& aWriteStream) const; // internalTechnology
1.204 -public: // Deprecated. Do not use!
1.205 - IMPORT_C void RegisterViewAndAddStackL(MCoeView& aView); // deprecated
1.206 - IMPORT_C void DeregisterViewAndRemoveStack(const MCoeView& aView); // deprecated
1.207 - IMPORT_C void RemoveFromViewStack(const MCoeView& aView,CCoeControl* aControl); // deprecated
1.208 - IMPORT_C void UpdateViewStackedControlFlags(const MCoeView& aView,CCoeControl* aControl,TInt aFlags,TInt aMask); // deprecated
1.209 - IMPORT_C void AddToViewStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); // deprecated
1.210 -public: // not exported
1.211 - TBool IsControlOnStack(CCoeControl* aControl) const;
1.212 - void SetCurrentControlStackGroupId(TInt aGroupId);
1.213 - void NotifyFontChange(const CCoeFontProvider& aFontProvider);
1.214 - void RefetchPixelMappingL();
1.215 -private:
1.216 - enum TRemoveCondition
1.217 - {
1.218 - ERemoveUnconditionally,
1.219 - ERemoveOnlyIfSharable
1.220 - };
1.221 -private:// Internal
1.222 - IMPORT_C virtual void CCoeAppUi_Reserved_2();
1.223 -private:
1.224 - CCoeControl* TopFocusableControl() const;
1.225 - TInt FindPos(CCoeControlStack* aStack,CCoeControl* aControl) const;
1.226 - void SetFocusToControl(CCoeControl* aControl,TBool aFocus);
1.227 - void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags);
1.228 - void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags, TInt aGroupId);
1.229 - void DoRemoveFromStack(CCoeControlStack* aStack,CCoeControl* aControl,TRemoveCondition aRemoveCondition=ERemoveUnconditionally);
1.230 - void DoUpdateStackedControlFlags(CCoeControlStack* aStack,CCoeControl* aControl,TInt aFlags,TInt aMask);
1.231 -public:
1.232 -/**Monitor function for passing all windows events to registered monitor observers for optional inspection*/
1.233 - void MonitorWsEvent(const TWsEvent& aEvent);
1.234 -private:
1.235 - class CExtra;
1.236 - friend class CExtra;
1.237 - friend class CTestDriver;
1.238 -protected:
1.239 - CCoeEnv* iCoeEnv;
1.240 -private:
1.241 - CCoeViewManager* iViewManager;
1.242 - CCoeControlStack* iStack;
1.243 - CExtra* iExtra;
1.244 - TInt iCCoeAppUi_Reserved1;
1.245 - };
1.246 -
1.247 -
1.248 -#endif // __COEAUI_H__