epoc32/include/mw/aknappui.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/aknappui.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/aknappui.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,852 @@
     1.4 -aknappui.h
     1.5 +/*
     1.6 +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +#ifndef __AKNAPPUI_H__
    1.23 +#define __AKNAPPUI_H__
    1.24 +
    1.25 +//  INCLUDES
    1.26 +#include <eikappui.h>
    1.27 +#include <Eikspane.h>
    1.28 +#include <eikcba.h>
    1.29 +#include <avkon.hrh>
    1.30 +#include <akndef.h>
    1.31 +#include <AknTouchPaneObserver.h>
    1.32 +
    1.33 +// FORWARD DECLARATIONS
    1.34 +class CEikButtonGroupContainer;
    1.35 +class CAknAppShutter;
    1.36 +class CAknAppUiExtension;
    1.37 +class CAknWsEventMonitor;
    1.38 +class CAknKeySoundSystem;
    1.39 +class CAknAppUiBaseExtension;
    1.40 +class CAknTouchPane;
    1.41 +class CAknToolbar;
    1.42 +class CAknPointerEventModifier;
    1.43 +
    1.44 +// MACROS
    1.45 +#define iAvkonAppUi ((CAknAppUi*)CEikonEnv::Static()->EikAppUi())
    1.46 +#define iAvkonAppUiBase ((CAknAppUiBase*)CEikonEnv::Static()->EikAppUi())
    1.47 +
    1.48 +/**
    1.49 +*  Avkon key resolver interface
    1.50 +*
    1.51 +*  @since S60 3.1
    1.52 +*/
    1.53 +class MAknAliasKeyCodeResolver
    1.54 +    {
    1.55 +public:
    1.56 +    /**
    1.57 +    * Resolves keyboard layout dependent keycode for the given event 
    1.58 +    *
    1.59 +    * @since S60 3.1
    1.60 +    * @param aCode reference to variable to contain new keycode 
    1.61 +    * @param aKeyEvent reference to original, complete, event
    1.62 +    * @param aType indicating original event type
    1.63 +    * @return KErrNone on success, otherwise system wide error codes
    1.64 +    */
    1.65 +    virtual TInt GetAliasKeyCode(TUint& aCode, const TKeyEvent& aKeyEvent,TEventCode aType)=0;        
    1.66 +    };
    1.67 +
    1.68 +// CLASS DECLARATION
    1.69 +
    1.70 +/**
    1.71 +*  Abstract Avkon application UI base class
    1.72 +*
    1.73 +*  @since S60 3.0
    1.74 +*/
    1.75 +class CAknAppUiBase : public CEikAppUi
    1.76 +    {
    1.77 +private:
    1.78 +    friend class CAknAppUi;
    1.79 +    enum
    1.80 +        {
    1.81 +        EAppOrientationSpecifiedFlag            = 0x00010000, // In area reserved for System Guis
    1.82 +        EAppOrientationLandscapeFlag            = 0x00020000,
    1.83 +        EAppOrientationAutomaticFlag            = 0x00040000,
    1.84 +        EAknEnableSkinFlag                      = 0x00080000,
    1.85 +        // Since 3.0
    1.86 +        EAknDisableHighlightAnimationFlag       = 0x00100000,
    1.87 +        EAknEnableMSKflag                       = 0x00200000,
    1.88 +        /**
    1.89 +         * When enabled, avkon does not complete startup effect
    1.90 +         * application has to do it by itself.
    1.91 +         *
    1.92 +         * @since S60 3.2
    1.93 +         *
    1.94 +         */
    1.95 +        EAknExplicitStartupEffectCompletionFlag     = 0x00400000,
    1.96 +
    1.97 +        /**
    1.98 +         * Application supports touch (doesn't need keyboard). If the flag
    1.99 +         * is missing and compatibility mode is enabled in a device,
   1.100 +         * application is run in a compatibility mode (QVGA window with a
   1.101 +         * virtual keypad.
   1.102 +         *
   1.103 +         * @since S60 5.0
   1.104 +         */
   1.105 +        EAknTouchCompatibleFlag                 = 0x00800000
   1.106 +        };
   1.107 +
   1.108 +    public:
   1.109 +
   1.110 +    enum TAppUiOrientation
   1.111 +        {
   1.112 +        /**
   1.113 +        * Use the default device screen rotation of the product for this 
   1.114 +        * application. This is the default rotation setting for an 
   1.115 +        * application, and it should be used by nearly all applications. 
   1.116 +        */
   1.117 +        EAppUiOrientationUnspecified,
   1.118 +        /**
   1.119 +        * Use a portrait screen rotation for this application.
   1.120 +        * This should only be used when an application specifically wants
   1.121 +        * portrait rotation. The device will select an appropriate portrait
   1.122 +        * rotation, if one is available.
   1.123 +        */
   1.124 +        EAppUiOrientationPortrait,
   1.125 +        /**
   1.126 +        * Use a landscape screen rotation for this application.
   1.127 +        * This should only be used when an application specifically wants
   1.128 +        * landscape rotation. The device will select an appropriate landscape
   1.129 +        * rotation, if one is available.
   1.130 +        */
   1.131 +        EAppUiOrientationLandscape,
   1.132 +        /**
   1.133 +        * Use the normal device screen rotation for this application.
   1.134 +        * Both portrait and landscape screen rotations are possible. The 
   1.135 +        * application rotation follows device screen rotation.
   1.136 +        */
   1.137 +        EAppUiOrientationAutomatic
   1.138 +        };
   1.139 +    enum
   1.140 +        {
   1.141 +        /**
   1.142 +        * Flag indicating that default skin parameters should be provided by
   1.143 +        * UI controls created within the scope of this AppUi instance.
   1.144 +        * This value (or binary combination with some other values) should
   1.145 +        * be given as a parameter to <code>BaseConstructL</code> in case
   1.146 +        * the application wants to enable default skin parameters for all
   1.147 +        * the Avkon controls supporting them.
   1.148 +        *
   1.149 +        * Note: The value can be queried by using 
   1.150 +        * <code>AknsUtils::AvkonSkinEnabled()</code> from AknSkins.lib.
   1.151 +        *
   1.152 +        * @since S60 2.0
   1.153 +        */
   1.154 +        EAknEnableSkin = EAknEnableSkinFlag,
   1.155 +        EAppOrientationPortrait     = EAppOrientationSpecifiedFlag,
   1.156 +        EAppOrientationLandscape    = EAppOrientationSpecifiedFlag 
   1.157 +                                      | EAppOrientationLandscapeFlag,
   1.158 +        EAppOrientationAutomatic    = EAppOrientationSpecifiedFlag
   1.159 +                                      | EAppOrientationAutomaticFlag,
   1.160 +        // Since 3.0
   1.161 +        EAknDisableHighlightAnimation = EAknDisableHighlightAnimationFlag,
   1.162 +        // Since 3.1
   1.163 +        EAknEnableMSK = EAknEnableMSKflag,
   1.164 +        // Since 3.2
   1.165 +        EAknExplicitStartupEffectCompletion = EAknExplicitStartupEffectCompletionFlag,
   1.166 +        // Since 5.0
   1.167 +        EAknTouchCompatible = EAknTouchCompatibleFlag
   1.168 +        };
   1.169 +    enum TKeyEventFlag
   1.170 +        {
   1.171 +        EDisableSendKeyShort = 0x01, // Short press of send key
   1.172 +        EDisableSendKeyLong  = 0x02  // Long press of send key
   1.173 +        };    
   1.174 +
   1.175 +public:
   1.176 +    /**
   1.177 +    * Destructor.
   1.178 +    */    
   1.179 +    IMPORT_C ~CAknAppUiBase();
   1.180 +    
   1.181 +    /**
   1.182 +    * C++ Default constructor.
   1.183 +    */
   1.184 +    IMPORT_C CAknAppUiBase();
   1.185 +public: 
   1.186 +    
   1.187 +    /**
   1.188 +    * Initialises this Avkon base app UI with standard values. 
   1.189 +    * @c aAppUiFlags values are common with 
   1.190 +    * @c CEikAppUi::BaseConstructL(aAppUiFlags).
   1.191 +    * @param aAppUiFlags Application user interface flags.
   1.192 +    */
   1.193 +    IMPORT_C void BaseConstructL( TInt aAppUiFlags );
   1.194 +    
   1.195 +    /**
   1.196 +    * Handles changes in keyboard focus when an application switches to,
   1.197 +    * or from, the foreground. This function calls 
   1.198 +    * @c CEikAppUi::HandleForegroundEventL.
   1.199 +    * @param aForeground @c ETrue if the application is in the foreground, 
   1.200 +    * otherwise @c EFalse.
   1.201 +    */ 
   1.202 +    IMPORT_C void HandleForegroundEventL(TBool aForeground);
   1.203 +
   1.204 +public: // From CEikAppUi
   1.205 +    
   1.206 +    /**
   1.207 +    * From @c CEikAppUi. Completes construction. The implementation of 
   1.208 +    * @c ConstructL() in @c CAknAppUiBase simply calls @c BaseConstructL().
   1.209 +    */
   1.210 +    IMPORT_C void ConstructL();  // virtual
   1.211 +    
   1.212 +    /** 
   1.213 +    * From @c CEikAppUi. Closes the app UI.
   1.214 +    */
   1.215 +    IMPORT_C void Exit(); //virtual
   1.216 +    
   1.217 +    /**
   1.218 +    * From @c CEikAppUi. Sets whether the windows are faded.
   1.219 +    * @param aFaded @c ETrue if windows are faded, otherwise windows are 
   1.220 +    * unfaded.
   1.221 +    */
   1.222 +    IMPORT_C void SetFadedL(TBool aFaded); // virtual
   1.223 +    
   1.224 +    /**
   1.225 +    * From @c CEikAppUi. Handles a change to the application's resources which
   1.226 +    * are shared across the environment. This function calls 
   1.227 +    * @c CEikAppUi::HandleResourceChangeL except when @c aType is 
   1.228 +    * @c KEikDynamicLayoutVariantSwitch.
   1.229 +    * @param aType The type of resources that have changed. 
   1.230 +    */
   1.231 +    IMPORT_C void HandleResourceChangeL(TInt aType); // virtual
   1.232 +    
   1.233 +    /**
   1.234 +    * From @c CEikAppUi. Gets the total area of the screen available to the
   1.235 +    * application. This includes the space that is available for a toolbar, 
   1.236 +    * toolband or title band, if the application requires them.
   1.237 +    * @return The total area of the screen available to the application.
   1.238 +    */
   1.239 +    IMPORT_C TRect ApplicationRect() const; //virtual
   1.240 +
   1.241 +public: // from CCoeAppUiBase
   1.242 +    
   1.243 +    /** 
   1.244 +    * From @c CCoeAppUiBase. Performs pre-exit processing by calling 
   1.245 +    * @c CEikAppUi::PrepareToExit() to ensure the application will exit
   1.246 +    * cleanly.
   1.247 +    */
   1.248 +    IMPORT_C void PrepareToExit();
   1.249 +public: // New Functions
   1.250 +    /**
   1.251 +    * Determines whether the system is faded.
   1.252 +    * @return @c ETrue if system is faded 
   1.253 +    */
   1.254 +    IMPORT_C TBool IsFaded() const;
   1.255 +
   1.256 +    /**
   1.257 +    * Returns the object which allows events to be spyed upon in addition to
   1.258 +    * normal event handling.
   1.259 +    * @return Pointer to window server event monitor object.
   1.260 +    */
   1.261 +    IMPORT_C CAknWsEventMonitor* EventMonitor() const;
   1.262 +    
   1.263 +    /**
   1.264 +    * Gets a pointer to KeySound API object.
   1.265 +    * @return Pointer to KeySound API object. 
   1.266 +    */
   1.267 +    IMPORT_C CAknKeySoundSystem* KeySounds() const;
   1.268 +
   1.269 +    /**
   1.270 +    * Determines whether the application is full screen application.
   1.271 +    * @return @c ETrue if the application is full screen application.
   1.272 +    */
   1.273 +    IMPORT_C TBool IsFullScreenApp() const;
   1.274 +    
   1.275 +    /**
   1.276 +    * Determines whether the application is layout aware.
   1.277 +    * @return @c ETrue if the application is layout aware.
   1.278 +    */
   1.279 +    IMPORT_C TBool IsLayoutAwareApp() const;
   1.280 +    
   1.281 +    /**
   1.282 +    * Determines whether the application has MSK enabled.
   1.283 +    * @return @c ETrue if the application has MSK enabled.
   1.284 +    *
   1.285 +    * @since 3.1 
   1.286 +    */
   1.287 +    TBool IsMSKEnabledApp() const;
   1.288 +
   1.289 +    /**
   1.290 +    * Determines whether the application is closing.
   1.291 +    * In practice this means that CEikonEnv has been destroyed.
   1.292 +    * @return @c ETrue if the application is closing.
   1.293 +    *
   1.294 +    * @since 3.2
   1.295 +    */
   1.296 +    TBool IsAppClosing() const;
   1.297 +    
   1.298 +    /**
   1.299 +    * Set application layout aware.
   1.300 +    * @param aLayoutAwareApp @c ETrue if the application is layout aware, 
   1.301 +    * @c EFlase otherwise.
   1.302 +    */
   1.303 +    IMPORT_C void SetLayoutAwareApp(TBool aLayoutAwareApp);
   1.304 +    
   1.305 +    /**
   1.306 +    * Determines whether the application is foreground.
   1.307 +    * @return @c ETrue if the application is foreground.
   1.308 +    */
   1.309 +    IMPORT_C TBool IsForeground() const;
   1.310 +    
   1.311 +    /**
   1.312 +    * Determines whether the application is partially foreground.
   1.313 +    * @return @c ETrue if the application is partially foreground.
   1.314 +    */
   1.315 +    IMPORT_C TBool IsPartialForeground() const;
   1.316 +
   1.317 +    /**
   1.318 +    * Gets the application screen orientation.
   1.319 +    * @return Application screen orientation.
   1.320 +    */
   1.321 +    IMPORT_C TAppUiOrientation Orientation() const;
   1.322 +    
   1.323 +    /**
   1.324 +    * Tests whether it is possible for this app to have a
   1.325 +    * practical effect on the screen orientation, through
   1.326 +    * SetOrientationL().
   1.327 +    * @since S60 3.2
   1.328 +    * @return ETrue if SetOrientationL can change the orientation, EFalse otherwise.
   1.329 +    */
   1.330 +    IMPORT_C TBool OrientationCanBeChanged() const;
   1.331 +    
   1.332 +    /**
   1.333 +    * Sets the application screen orientation.
   1.334 +    * Note: this API has no effect on non-full-screen app UIs.
   1.335 +    * @param aOrientation application screen orientation.
   1.336 +    */
   1.337 +    IMPORT_C void SetOrientationL(TAppUiOrientation aOrientation);
   1.338 +
   1.339 +    /**
   1.340 +    * Find the window group ID of the application below this application.
   1.341 +    * @return the window group ID of the application below this application.
   1.342 +    */
   1.343 +    TInt FindAppWgIdBelowMeL();
   1.344 +    
   1.345 +    /**
   1.346 +    * Simply return @c KEikPartialForeground if @c aPartialFg == @c ETrue, 
   1.347 +    * otherwise if @c aForeground == @c ETrue then return @c EEventFocusGained
   1.348 +    * else return @c EEventFocusLost.  
   1.349 +    * @return if @c aPartialFg then return KEikPartialForeground.
   1.350 +    */
   1.351 +    TInt EventForForegroundState(TBool aPartialFg, TBool aForeground);
   1.352 +    
   1.353 +    /**
   1.354 +    * Determines whether the thread owning this application window group is
   1.355 +    * foreground.    
   1.356 +    * @return @c ETrue if the thread owning this application window group is
   1.357 +    * foreground, @c EFlase otherwise.
   1.358 +    */
   1.359 +    TBool ThreadIsForeground() const;
   1.360 +
   1.361 +    /**
   1.362 +    * Simulates an event being received from wserv
   1.363 +    * @param aEvent the event id being simulated.
   1.364 +    */
   1.365 +    void SimulateWsEventL(TInt aEvent);
   1.366 +
   1.367 +    /** 
   1.368 +     * Gets the application local zoom
   1.369 +     * @return Application local zoom
   1.370 +     * @since 3.1 
   1.371 +     */
   1.372 +    IMPORT_C TAknUiZoom LocalUiZoom() const;
   1.373 +
   1.374 +    /**
   1.375 +    * Sets the application local zoom. However, in order to have any 
   1.376 +    * effect, it may be necessary to make a subsequent call to  
   1.377 +    * @c ApplyLayoutChangeL.
   1.378 +    *
   1.379 +    * @param aZoom application local zoom
   1.380 +    * @since 3.1 
   1.381 +    */
   1.382 +    IMPORT_C void SetLocalUiZoom(TAknUiZoom aZoom);
   1.383 +
   1.384 +    /*
   1.385 +    * Can be used to apply changes to settings that affect the current layout,
   1.386 +    * such as changes to the local zoom. Optionally reports the change
   1.387 +    * to the layout to all controls in the application. There are a number of 
   1.388 +    * different possible usages of this API:
   1.389 +    * <ul>
   1.390 +    * <li> Can be used to immediately change the local zoom, by passing in 
   1.391 +    * ETrue for the reporting parameter.</li>
   1.392 +    * <li> Can be called before BaseConstructL without leaving, the effect
   1.393 +    * is the same as passing EFalse for the reporting parameter, as 
   1.394 +    * the correct layout data is picked up later on during control layout.</li>
   1.395 +    * <li>Can be used by implementors of the 
   1.396 +    * @c MAknSettingCacheUpdatePlugin interface, in order to set the local 
   1.397 +    * zoom whilst updating the settings cache. By passing in EFalse for the 
   1.398 +    * reporting parameter, the layout switch is deferred to the usual 
   1.399 +    * processing in @c UpdateSettingCacheAndForwardEventL.</li>
   1.400 +    * <li> Can be used by controls that require a different local zoom to 
   1.401 +    * the underlying application, such as a dialog. By not 
   1.402 +    * reporting the change during construction, the dialog will lay itself out 
   1.403 +    * correctly. However, the dialog must then report the change back to the 
   1.404 +    * app zoom level when it closes, ignoring the resulting resource changed 
   1.405 +    * layout switch event.</li>
   1.406 +    * </ul>
   1.407 +    *
   1.408 +    * @param aReportChange if this is true, then the layout event will be 
   1.409 +    *               reported to controls on the control stack
   1.410 +    * @since 3.1 
   1.411 +    */    
   1.412 +    IMPORT_C void ApplyLayoutChangeL(TBool aReportChange);
   1.413 +    
   1.414 +    /**
   1.415 +    * Checks if application UI has full or partial foreground status.
   1.416 +    * @since 3.2
   1.417 +    * @return ETrue if application UI has full or partial foreground status.
   1.418 +    *         Otherwise EFalse.
   1.419 +    */
   1.420 +    TBool HasFullOrPartialForeground() const;    
   1.421 +
   1.422 +    /**
   1.423 +    * Sets the flags for default key event handling
   1.424 +    * @since 5.0
   1.425 +    * @param aFlags which can be a combination of flags 
   1.426 +    *        declared in enumeration TKeyEventFlag 
   1.427 +    */
   1.428 +    IMPORT_C void SetKeyEventFlags( const TInt aFlags );
   1.429 +    
   1.430 +    /**
   1.431 +    * Returns a pointer to appui's pointer event modifier. This method is
   1.432 +    * intended for internal usage only.
   1.433 +    *
   1.434 +    * @since S60 v5.0
   1.435 +    * @return pointer event modifier
   1.436 +    */
   1.437 +    IMPORT_C CAknPointerEventModifier* PointerEventModifier();
   1.438 +    
   1.439 +    /**
   1.440 +    * Checks if the application is touch compatible i.e. it has been
   1.441 +    * constructed with the flag EAknTouchCompatible.
   1.442 +    *
   1.443 +    * @since S60 v5.0
   1.444 +    * @return ETrue if the application is touch compatible
   1.445 +    */
   1.446 +    IMPORT_C TBool IsTouchCompatible() const;
   1.447 +    
   1.448 +protected: // From CCoeAppUiBase
   1.449 +    /**
   1.450 +    * From @c CCoeAppUiBase.   
   1.451 +    * Calls CCoeAppUi::HandleScreenDeviceChangedL().
   1.452 +    */
   1.453 +    IMPORT_C virtual void HandleScreenDeviceChangedL(); // was Reserved_1()
   1.454 +
   1.455 +protected: // From CCoeAppUi
   1.456 +     
   1.457 +    /**
   1.458 +    * From @c CCoeAppUi. Handles an application specific event.
   1.459 +    * @param aType The type of the event that occurred. This should be a 
   1.460 +    * unique identifier constant.
   1.461 +    * @param aEvent The window server event that occurred. 
   1.462 +    */
   1.463 +    IMPORT_C virtual void HandleApplicationSpecificEventL(TInt aType,
   1.464 +        const TWsEvent& aEvent);
   1.465 +
   1.466 +protected: // New functions
   1.467 +    /**
   1.468 +    * Set the application to be a full screen application.
   1.469 +    * @param aIsFullScreen is @c ETrue if the application is a full screen
   1.470 +    * application, @c EFlase otherwise.
   1.471 +    */
   1.472 +    IMPORT_C void SetFullScreenApp(TBool aIsFullScreen);
   1.473 +    
   1.474 +    /**
   1.475 +    * Replace current key sound server with new one.
   1.476 +    * @param aUid ID of the new key sound server.
   1.477 +    */
   1.478 +    IMPORT_C void ReplaceKeySoundsL( TInt aUid );
   1.479 +
   1.480 +protected: // from MObjectProvider
   1.481 +    IMPORT_C virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   1.482 +
   1.483 +public: // not exported
   1.484 +    void SetScreenModeL(TInt aModeNumber);
   1.485 +    TInt ScreenMode() const;
   1.486 +
   1.487 +private:
   1.488 +    void UpdateSettingCacheAndForwardEventL( TInt aEventId );
   1.489 +    // Method tests on aError. If < KErrNone, it calls CCoeEnv::SetAppUi in order to pass
   1.490 +    // ownership to the environment. CCoeEnv then will delete the AppUi at the usual point in the destruct order
   1.491 +    void SetAppUiAndLeaveIfErrorL( TInt aError );
   1.492 +    TBool AlwaysForwardEvent( TInt aEventId );
   1.493 +    void RelinquishPriorityToForegroundAppLC();
   1.494 +
   1.495 +private:
   1.496 +    // Avkon app ui class flags
   1.497 +    TBitFlags iAknFlags;
   1.498 +
   1.499 +    // Added for Avkon. Monitor events for emergency call support
   1.500 +    CAknWsEventMonitor* iEventMonitor;
   1.501 +
   1.502 +    // Added for Avkon. Provides access to keysound server.
   1.503 +    // Moved from CAknAppUi, because CEikSrvUi needs it as well
   1.504 +    CAknKeySoundSystem* iKeySounds; 
   1.505 +    
   1.506 +    CAknAppUiBaseExtension* iAppUiBaseExtension;
   1.507 +    };
   1.508 +
   1.509 +/**
   1.510 +*  Abstract Avkon application UI class
   1.511 +*
   1.512 +*  @since S60 0.9
   1.513 +*/
   1.514 +
   1.515 +class CAknAppUi : public CAknAppUiBase, MEikStatusPaneObserver,
   1.516 +            public MCoeViewDeactivationObserver,
   1.517 +            public MAknTouchPaneObserver
   1.518 +    {
   1.519 +public:
   1.520 +    
   1.521 +    /**
   1.522 +    * Initialises this Avkon app UI with standard values. @c aAppUiFlags
   1.523 +    * values are common with @c CEikAppUi::BaseConstructL(aAppUiFlags). 
   1.524 +    * Additionally those @c aAppUiFlags values can be bitwise ORed with
   1.525 +    * @c EAknEnableSkin flag to provide default skin parameters for this AppUi
   1.526 +    * instance.
   1.527 +    * @param aAppUiFlags Application user interface flags.
   1.528 +    */
   1.529 +    IMPORT_C void BaseConstructL(TInt aAppUiFlags=EStandardApp);
   1.530 +    
   1.531 +    /**
   1.532 +    * Destructor.
   1.533 +    */
   1.534 +    IMPORT_C ~CAknAppUi();
   1.535 +
   1.536 +public: // From CEikAppUi
   1.537 +     /**
   1.538 +     * From @c CEikAppUi. Completes construction. The implementation of
   1.539 +     * @c ConstructL() in @c CAknAppUi simply calls @c BaseConstructL().
   1.540 +     */
   1.541 +    IMPORT_C void ConstructL();  // virtual
   1.542 +
   1.543 +public:
   1.544 +    /**
   1.545 +    * Gets a pointer to the status pane.
   1.546 +    * @return Pointer to the status pane 
   1.547 +    */
   1.548 +    IMPORT_C CEikStatusPane* StatusPane();
   1.549 +    /**
   1.550 +    * Gets a pointer to the Command Button Area.
   1.551 +    * @return Pointer to the CBA 
   1.552 +    */
   1.553 +    IMPORT_C CEikButtonGroupContainer* Cba();
   1.554 +
   1.555 +    /**
   1.556 +    * Gets a pointer to the touch pane.
   1.557 +    * @return Pointer to the the touch pane
   1.558 +    * @since S60 5.0
   1.559 +    */
   1.560 +    IMPORT_C CAknTouchPane* TouchPane();
   1.561 +
   1.562 +    /**
   1.563 +    * Gets a pointer to the application toolbar.
   1.564 +    * @return Pointer to the applicaton toolbar or NULL
   1.565 +    * @since S60 3.1
   1.566 +    */
   1.567 +    IMPORT_C CAknToolbar* PopupToolbar() const; 
   1.568 +    
   1.569 +    /**
   1.570 +    * Gets a pointer to the current toolbar( view toolbar is priority ).
   1.571 +    * @return Pointer to the current toolbar or NULL
   1.572 +    * @since S60 3.1
   1.573 +    */
   1.574 +    IMPORT_C CAknToolbar* CurrentPopupToolbar() const;
   1.575 +    
   1.576 +    /**
   1.577 +    * Gets a pointer to the current fixed toolbar( view toolbar is priority ).
   1.578 +    * @return Pointer to the current fixed toolbar or NULL
   1.579 +    * @since S60 5.0
   1.580 +    */
   1.581 +    IMPORT_C CAknToolbar* CurrentFixedToolbar() const; 
   1.582 +
   1.583 +    
   1.584 +    /**
   1.585 +    * Hides popup toolbar if it is visible
   1.586 +    * @since S60 3.1
   1.587 +    */
   1.588 +    void StopDisplayingPopupToolbar(); 
   1.589 +        
   1.590 +      
   1.591 +    /**
   1.592 +    * Processes user commands.
   1.593 +    * This function passes @c aCommand (except values @c EAknSoftkeyOptions,
   1.594 +    * @c EAknCmdExit, @c EEikCmdCanceled) to user derived @c HandleCommandL.
   1.595 +    * @param aCommand A command ID.
   1.596 +    */
   1.597 +    IMPORT_C void ProcessCommandL(TInt aCommand);
   1.598 +
   1.599 +    
   1.600 +    /**
   1.601 +    * Handles errors.
   1.602 +    * @param aError The error code.
   1.603 +    * @param aExtErr For extended error messages. Not used.
   1.604 +    * @param aErrorText Error text. Not used.
   1.605 +    * @param aContextText Text describing the context of the error. Not used.
   1.606 +    * @return @c ENoDisplay if Error handled proper way, else 
   1.607 +    * @c EErrorNotHandled
   1.608 +    */
   1.609 +    IMPORT_C TErrorHandlerResponse HandleError (TInt aError,
   1.610 +        const SExtendedError& aExtErr, TDes& aErrorText, TDes& aContextText); 
   1.611 +
   1.612 +    /**
   1.613 +    * Run the application shutter if it exists.
   1.614 +    */
   1.615 +    IMPORT_C void RunAppShutter();
   1.616 +    
   1.617 +    /**
   1.618 +    * Determines whether the application shutter is active.
   1.619 +    * @return @c ETrue if application shutter is active.
   1.620 +    */
   1.621 +    IMPORT_C TBool IsAppShutterRunning() const;
   1.622 +
   1.623 +    /**
   1.624 +    * Determines whether the application is hidden in background.
   1.625 +    * (i.e. HideInBackground has been called and application has not
   1.626 +    *       yet been activated)
   1.627 +    * @return @c ETrue if application is hidden in background.
   1.628 +    */
   1.629 +    TBool IsAppHiddenInBackground() const;
   1.630 +    
   1.631 +public: // MCoeViewDeactivationObserver
   1.632 +
   1.633 +    /**
   1.634 +    * From @c MCoeViewDeactivationObserver.
   1.635 +    * Handles the deactivation of the view identified by
   1.636 +    * @c aViewIdToBeDeactivated before the newly activated view with id
   1.637 +    * @c aNewlyActivatedViewId is marked as current.
   1.638 +    * Default implementation calls @c iAvkonEnv->CloseAllIntermediateStates()
   1.639 +    * without using @c aViewIdToBeDeactivated and @c aNewlyActivatedViewId.
   1.640 +    * @param aViewIdToBeDeactivated
   1.641 +    * @param aNewlyActivatedViewId  
   1.642 +    */
   1.643 +    IMPORT_C virtual void HandleViewDeactivation(
   1.644 +        const TVwsViewId& aViewIdToBeDeactivated,
   1.645 +        const TVwsViewId &aNewlyActivatedViewId);
   1.646 +
   1.647 +public: // from CCoeAppUiBase
   1.648 +    
   1.649 +    /**
   1.650 +    * From @c CCoeAppUiBase. Performs pre-exit processing to ensure the
   1.651 +    * application will exit cleanly.
   1.652 +    */
   1.653 +    IMPORT_C void PrepareToExit();
   1.654 +
   1.655 +public: // from MAknTouchPaneObserver
   1.656 +
   1.657 +    /**
   1.658 +    * From @MAknTouchPaneObserver.
   1.659 +    * Handles a change in the size or position of touch pane.
   1.660 +    */
   1.661 +    IMPORT_C void HandleTouchPaneSizeChange();
   1.662 +
   1.663 +protected:
   1.664 +    // from MEikStatusPaneObserver
   1.665 +    /**
   1.666 +    * From @c MEikStatusPaneObserver. Handles a change in the position or size
   1.667 +    * of the screen area occupied by the status pane.
   1.668 +    */  
   1.669 +    IMPORT_C void HandleStatusPaneSizeChange();
   1.670 +
   1.671 +    // from CCoeAppUi
   1.672 +    /**
   1.673 +    * From @c CCoeAppUi. Handles system events generated by the window server.
   1.674 +    * @param aEvent The window server event that occurred.
   1.675 +    */
   1.676 +    IMPORT_C void HandleSystemEventL(const TWsEvent& aEvent);
   1.677 +
   1.678 +protected: // formerly from MTopSetMember<CEikMenuBar>, now reserved
   1.679 +    IMPORT_C virtual void Reserved_MtsmPosition();
   1.680 +    IMPORT_C virtual void Reserved_MtsmObject();
   1.681 +protected:
   1.682 +    
   1.683 +    /**
   1.684 +    * Handles changes in keyboard focus when an application switches to, 
   1.685 +    * or from, the foreground.
   1.686 +    * @param aForeground @c ETrue if the application is in the foreground,
   1.687 +    * otherwise @c EFalse.
   1.688 +    */
   1.689 +    IMPORT_C void HandleForegroundEventL(TBool aForeground);
   1.690 +    
   1.691 +    /**
   1.692 +    * Handles window server events.
   1.693 +    * @param aEvent The window server event that occurred.
   1.694 +    * @param aDestination The control associated with the event.
   1.695 +    */
   1.696 +    IMPORT_C void HandleWsEventL(const TWsEvent& aEvent,
   1.697 +        CCoeControl* aDestination);
   1.698 +
   1.699 +    /**
   1.700 +    * Set key block mode.
   1.701 +    * In default mode, the S60 Developer Platform blocks simultaneous key
   1.702 +    * presses.
   1.703 +    * @param aMode @c ENoKeyBlock if no key block, otherwise
   1.704 +    * @c EDefaultBlockMode
   1.705 +    */
   1.706 +    IMPORT_C void SetKeyBlockMode(TAknKeyBlockMode aMode);
   1.707 +    IMPORT_C void HandleErrorL(TInt aError, HBufC** aErrorDesc, TBool aShowNote = ETrue );
   1.708 +
   1.709 +#ifdef _DEBUG
   1.710 +    
   1.711 +    /**
   1.712 +    * Prints out information about the control and all its subcontrols to
   1.713 +    * RDebug console.
   1.714 +    * @param aControl object to be printed.
   1.715 +    * @param aLevel  positioning constant.
   1.716 +    * @param aDebug stream for printing.
   1.717 +    */
   1.718 +    void DumpControl(CCoeControl* aControl, TInt aLevel, RDebug& aDebug);
   1.719 +#endif
   1.720 +    /**
   1.721 +    * Try to set window server buffer size to @c KAknDefaultWsBufferSize.
   1.722 +    */
   1.723 +    void DecideWsClientBufferSizesL();
   1.724 +
   1.725 +private:
   1.726 +    void UpdateKeyBlockMode();
   1.727 +    TBool SimulateHashKeyMarkingEvent(const TWsEvent& aEvent);
   1.728 +
   1.729 +private:
   1.730 +    TBool iDumpNextControl;
   1.731 +    CAknAppShutter* iAppShutter;// May be set to NULL by the app shutter itself
   1.732 +    TAknKeyBlockMode iBlockMode;
   1.733 +    CAknAppUiExtension * iExtension;
   1.734 +
   1.735 +public:
   1.736 +    /**
   1.737 +    * Hide application from Fast-swap window.
   1.738 +    * @since S60 2.6
   1.739 +    * @param aHide @c ETrue if application is hided from Fast-swap window, otherwise
   1.740 +    * @c EFalse
   1.741 +    */
   1.742 +    IMPORT_C void HideApplicationFromFSW(TBool aHide=ETrue);
   1.743 +
   1.744 +    /**
   1.745 +    * Gets keyboard layout specific keycode. Uses given resolver
   1.746 +    * SetAliasKeyCodeResolverL() if set, by default
   1.747 +    * fetches alternative code from avkon server.
   1.748 +    *
   1.749 +    * @since S60 3.1
   1.750 +    * @param aCode reference to variable to contain new keycode 
   1.751 +    * @param aKeyEvent reference to original, complete, event
   1.752 +    * @param aType indicating original event type
   1.753 +    */
   1.754 +    IMPORT_C void GetAliasKeyCodeL(TUint& aCode, const TKeyEvent& aKeyEvent,TEventCode aType);
   1.755 +
   1.756 +    /**
   1.757 +    * Sets custom resolver for keycode aliases
   1.758 +    * Creates iExtension if it doesn't exist
   1.759 +    * @since S60 3.1
   1.760 +    * @param aHandler instance implementing MAknAliasKeyCodeResolver 
   1.761 +    */
   1.762 +    IMPORT_C void SetAliasKeyCodeResolverL(MAknAliasKeyCodeResolver* aResolver);
   1.763 +    
   1.764 +    /**
   1.765 +    * This is same as RWindowGroup::CaptureKey, except that this version takes
   1.766 +    * S60 keymappings into account and captures the key that produces requested
   1.767 +    * aKeyCode according to S60 keymappings. Standard RWindowgroup::CaptureKey
   1.768 +    * functionality takes place before S60 AppUi framework and has no knowledge
   1.769 +    * of S60 keymappings.
   1.770 +    * Note: This method requires same capabilites as RWindowGroup::CaptureKey()     
   1.771 +    *
   1.772 +    * @since S60 V3.2
   1.773 +    * @param aKeycode The key code for the key to be captured. Key codes for
   1.774 +    *                 special keys are defined in TKeyCode. 
   1.775 +    * @param aModifier Mask Only the modifier keys in this mask are tested against
   1.776 +    *                      the states specified in aModifier. 
   1.777 +    * @param aModifier The key is captured only when the modifier keys specified in
   1.778 +    *                  aModifierMask match these states, where 1=modifier set,
   1.779 +    *                  and 0=modifier not set. Modifier key states are defined
   1.780 +    *                  in TEventModifier. 
   1.781 +    * @return A handle identifying the capture key, or one of the system-wide error
   1.782 +    *                  codes (if <0). Handles should be kept in order to be passed to
   1.783 +    *                  CancelCaptureKey() later. 
   1.784 +    */
   1.785 +    IMPORT_C TInt32 CaptureKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);         
   1.786 +    
   1.787 +    /**
   1.788 +    * This is same as RWindowGroup::CaptureKey, except that this version takes
   1.789 +    * S60 keymappings into account and captures the key that produces requested
   1.790 +    * aKeyCode according to S60 keymappings. This version leaves instead of returning
   1.791 +    * an error code. Standard RWindowgroup::CaptureKey functionality takes place
   1.792 +    * before S60 AppUi framework and has no knowledge of S60 keymappings.
   1.793 +    * Note: This method requires same capabilites as RWindowGroup::CaptureKey() 
   1.794 +    *
   1.795 +    * @since S60 V3.2
   1.796 +    * @param aKeycode The key code for the key to be captured. Key codes for
   1.797 +    *                 special keys are defined in TKeyCode. 
   1.798 +    * @param aModifier Mask Only the modifier keys in this mask are tested against
   1.799 +    *                      the states specified in aModifier. 
   1.800 +    * @param aModifier The key is captured only when the modifier keys specified in
   1.801 +    *                  aModifierMask match these states, where 1=modifier set,
   1.802 +    *                  and 0=modifier not set. Modifier key states are defined
   1.803 +    *                  in TEventModifier. 
   1.804 +    * @param aHandle   identifying the capture key. Handles should be kept in order
   1.805 +    *                  to be passed to CancelCaptureKey() later. 
   1.806 +    */    
   1.807 +    IMPORT_C void CaptureKeyL(TUint aKeycode, TUint aModifierMask, TUint aModifier, TInt32& aHandle);
   1.808 +    
   1.809 +    /**
   1.810 +    * This tells the application if it is allowed to hide itself in the
   1.811 +    * background in response to a user (menu or softkey) exit command, 
   1.812 +    * instead of actually exiting.
   1.813 +    * If the application appears to exit, but actually leaves itself in
   1.814 +    * memory, it may appear to start faster next time the user activates it.
   1.815 +    *
   1.816 +    * @since S60 V5.0
   1.817 +    * @return ETrue if the application can hide itself in the background, 
   1.818 +    *		  EFalse if it must exit properly by calling Exit().
   1.819 +    */    
   1.820 +    IMPORT_C TBool ExitHidesInBackground() const;
   1.821 +    
   1.822 +    /**
   1.823 +    * Hide the running instance of this application from the user, which
   1.824 +    * makes it appear as if the application has exited.
   1.825 +    * This is done by placing the application in the background, behind 
   1.826 +    * all other apps, and removing the application from the Fast Swap Window.
   1.827 +    * When the application comes to the foreground again, it will be
   1.828 +    * restored to the Fast Swap Window (in HandleForegroundEventL). If the
   1.829 +    * application is not supposed to be in the Fast Swap Window, it will have
   1.830 +    * to remove itself again.
   1.831 +    * @since S60 V5.0
   1.832 +    */    
   1.833 +    IMPORT_C void HideInBackground();
   1.834 +    
   1.835 +    /**
   1.836 +    * Disables next key sound (and repeated key sounds until pointer up event).
   1.837 +    *
   1.838 +    * @since S60 V5.0
   1.839 +    * @param aScanCode Scan code of disabled key.
   1.840 +    */
   1.841 +    IMPORT_C void DisableNextKeySound( TInt aScanCode ); 
   1.842 +    
   1.843 +private:
   1.844 +    TBool ExitHidesInBackgroundL() const;
   1.845 +    };
   1.846 +
   1.847 +
   1.848 +
   1.849 +#endif
   1.850 +
   1.851 +
   1.852 +
   1.853 +
   1.854 +
   1.855 +
   1.856 +