javauis/lcdui_akn/lcdui/inc/CMIDAppUi.h
branchRCL_3
changeset 66 2455ef1f5bbc
child 83 26b2b12093af
equal deleted inserted replaced
65:ae942d28ec0e 66:2455ef1f5bbc
       
     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 #ifdef RD_JAVA_NGA_ENABLED
       
    70     /**
       
    71      * Handle graphics out of memory event sent by the GOOM module.
       
    72      * This method releases graphics memory and informs the GOOM about this.
       
    73      * @return <code>ETrue</code> if the event was handled properly.
       
    74      */
       
    75     TBool HandleGoomMemoryLowEventL();
       
    76 #endif // RD_JAVA_NGA_ENABLED
       
    77 
       
    78 private: // data
       
    79     MMIDObserver* iObserver;
       
    80     RPointerArray<CMIDDisplayable> iDisplayables;
       
    81     java::ui::CoreUiAvkonAppUi*    mCoreAppUi;
       
    82     CAknAppUi*                     mJavaAppUi;
       
    83 
       
    84     MMIDEnv* iEnv;
       
    85     CMIDDisplayable* iCurrentDisplayable;
       
    86     // To store orientation change before Observer is set.
       
    87     TBool iPendingOrientationChange;
       
    88     TBool iPauseApp;
       
    89 };
       
    90 
       
    91 #endif // CMIDAPPUI_H
       
    92