javauis/lcdui_akn/javalcdui/inc/Lcdglue.h
branchRCL_3
changeset 19 04becd199f91
child 60 6c158198356e
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2005 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 LCDGLUE_H
       
    19 #define LCDGLUE_H
       
    20 
       
    21 #include <lcdui.h>
       
    22 #include <lcdgr.h>
       
    23 
       
    24 /**
       
    25  * MACRO determines whether transitional classes and methods are included
       
    26  * in this api. The transitional classes and methods work around the problem
       
    27  * of routing application level events though the MMIDEnv back to MMIDEnvObservers
       
    28  * without introducing a static dependency of the VM onto the ui plugin DLL.
       
    29  * Modifications to LCDUI.H and changes to the ui plugin would be required to
       
    30  * allow the plugin to cascade sytem level events itself without the assistance
       
    31  * of MMIDEnv.
       
    32  */
       
    33 #define LCDUI_TRANSITIONAL_API
       
    34 
       
    35 #ifdef LCDUI_TRANSITIONAL_API
       
    36 /**
       
    37  * Compatibility interface - appui observer allows appui to routes
       
    38  * application level events through MMIDEnv to MMIDEnvObservers.
       
    39  *@deprecated
       
    40  */
       
    41 class MMIDObserver
       
    42 {
       
    43 public:
       
    44     /**
       
    45      * Called by appui when system or user requests application exit.
       
    46      */
       
    47     virtual void HandleExitL()=0;
       
    48     /**
       
    49      * Called by appui when application gains or loses focus
       
    50      */
       
    51     virtual void HandleForegroundL(TBool aForeground)=0;
       
    52     /**
       
    53      * Called by appui in response to system event
       
    54      */
       
    55     virtual void HandleSwitchOnEventL()=0;
       
    56     /**
       
    57      * Called by appui in response to CONE resource change.
       
    58      */
       
    59     virtual void HandleResourceChangeL(TInt aType)=0;
       
    60 };
       
    61 #endif
       
    62 
       
    63 class MLcduiPlugin
       
    64 {
       
    65 public:
       
    66     virtual MMIDComponentFactory* CreateComponentFactoryL() = 0;
       
    67 #ifdef LCDUI_TRANSITIONAL_API
       
    68     virtual void SetObserver(MMIDObserver* aObserver) = 0;
       
    69 #endif
       
    70 };
       
    71 
       
    72 /**
       
    73  * Glue interface between VM and UI plugin. Allows UI plugin DLL to attach and detach
       
    74  * from JVM. Whilst attached the JVM may execute functions on the UI thread.
       
    75  */
       
    76 class MLcdui
       
    77 {
       
    78 public:
       
    79     virtual void AttachL(MLcduiPlugin* aPlugin) = 0;
       
    80     virtual void Detach() = 0;
       
    81     virtual MLcduiPlugin* Plugin() = 0;
       
    82 };
       
    83 
       
    84 #endif // LCDGLUE_H