|
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 #ifdef RD_JAVA_NGA_ENABLED |
|
62 /** |
|
63 * Called by appui when application gains or loses partial/full foreground. |
|
64 */ |
|
65 virtual void HandleFullOrPartialForegroundL(TBool aFullOrPartialFg)=0; |
|
66 |
|
67 /** |
|
68 * Called by appui when application needs to free all GPU memory immediately. |
|
69 */ |
|
70 virtual void HandleFreeGraphicsMemory()=0; |
|
71 #endif //RD_JAVA_NGA_ENABLED |
|
72 }; |
|
73 #endif |
|
74 |
|
75 class MLcduiPlugin |
|
76 { |
|
77 public: |
|
78 virtual MMIDComponentFactory* CreateComponentFactoryL() = 0; |
|
79 #ifdef LCDUI_TRANSITIONAL_API |
|
80 virtual void SetObserverL(MMIDObserver* aObserver) = 0; |
|
81 virtual void SetEnv(MMIDEnv* aEnv) = 0; |
|
82 #endif |
|
83 }; |
|
84 |
|
85 /** |
|
86 * Glue interface between VM and UI plugin. Allows UI plugin DLL to attach and detach |
|
87 * from JVM. Whilst attached the JVM may execute functions on the UI thread. |
|
88 */ |
|
89 class MLcdui |
|
90 { |
|
91 public: |
|
92 virtual void AttachL(MLcduiPlugin* aPlugin) = 0; |
|
93 virtual void Detach() = 0; |
|
94 virtual MLcduiPlugin* Plugin() = 0; |
|
95 }; |
|
96 |
|
97 #endif // LCDGLUE_H |