javauis/lcdui_akn/javalcdui/inc/lcdui.h
branchRCL_3
changeset 60 6c158198356e
parent 59 e5618cc85d74
equal deleted inserted replaced
59:e5618cc85d74 60:6c158198356e
    47 
    47 
    48 #include <e32def.h>
    48 #include <e32def.h>
    49 #include <badesca.h>
    49 #include <badesca.h>
    50 #include <gdi.h>
    50 #include <gdi.h>
    51 #include <w32std.h>
    51 #include <w32std.h>
    52 #include <aknsconstants.h>
       
    53 
    52 
    54 #ifdef RD_JAVA_NGA_ENABLED
    53 #ifdef RD_JAVA_NGA_ENABLED
    55 #include <EGL/egltypes.h>
    54 #include <EGL/egltypes.h>
    56 #include "monitor.h"
    55 #include "monitor.h"
    57 #endif // RD_JAVA_NGA_ENABLED
    56 #endif // RD_JAVA_NGA_ENABLED
    87 class MUiEventConsumer;
    86 class MUiEventConsumer;
    88 
    87 
    89 class MMIDTextEditor;
    88 class MMIDTextEditor;
    90 class MMIDCanvasGraphicsItem;
    89 class MMIDCanvasGraphicsItem;
    91 class MMIDCanvasGraphicsItemPainter;
    90 class MMIDCanvasGraphicsItemPainter;
       
    91 class MMIDLcduiEventConsumer;
    92 
    92 
    93 /**
    93 /**
    94  * @internalComponent
    94  * @internalComponent
    95  */
    95  */
    96 typedef TAny* TJavaPeer;
    96 typedef TAny* TJavaPeer;
   131 _LIT(KLandscapeValue,          "landscape");
   131 _LIT(KLandscapeValue,          "landscape");
   132 _LIT(KPositionBottom,          "bottom");
   132 _LIT(KPositionBottom,          "bottom");
   133 _LIT(KPositionRight,           "right");
   133 _LIT(KPositionRight,           "right");
   134 }
   134 }
   135 
   135 
   136 
       
   137 #ifdef RD_JAVA_S60_RELEASE_9_2
       
   138 const TInt KHighlightedItemTextColor    = EAknsCIQsnTextColorsCG6;
       
   139 #else
       
   140 const TInt KHighlightedItemTextColor    = EAknsCIQsnTextColorsCG8;
       
   141 #endif // RD_JAVA_S60_RELEASE_9_2
       
   142 const TInt KNonHighlightedItemTextColor = EAknsCIQsnTextColorsCG6;
       
   143 
   136 
   144 
   137 
   145 /**
   138 /**
   146  *
   139  *
   147  * Base class of all LCDUI objects. Concrete classes always implement a
   140  * Base class of all LCDUI objects. Concrete classes always implement a
   240     /**
   233     /**
   241      * Checks if EGL is available.
   234      * Checks if EGL is available.
   242      * @return <code>ETrue</code> if EGL exists.
   235      * @return <code>ETrue</code> if EGL exists.
   243      * @since S60 9.2
   236      * @since S60 9.2
   244      */
   237      */
   245     virtual TBool IsEglAvailable() = 0;
   238     virtual TBool IsEglAvailable() const = 0;
   246 
   239 
   247     /**
   240     /**
   248      * Gets and binds EGL surface.
   241      * Gets and binds EGL surface.
   249      * @return surface handle. <code>EGL_NO_SURFACE</code> is
   242      * @return surface handle. <code>EGL_NO_SURFACE</code> is
   250      * returned if binding is not possible.
   243      * returned if binding is not possible.
   828      * @param aRect
   821      * @param aRect
   829      *      - the area that has been updated in canvas coordinates.
   822      *      - the area that has been updated in canvas coordinates.
   830      * @since S60 9.2
   823      * @since S60 9.2
   831      */
   824      */
   832     virtual void UpdateRect(const TRect& aRect) = 0;
   825     virtual void UpdateRect(const TRect& aRect) = 0;
       
   826 
       
   827     /**
       
   828      * Notifies canvas about MIDlet exit. In exit Canvas must draw content to CWindowGc
       
   829      * to enable system transition effects.
       
   830      * @since S60 9.2
       
   831      */
       
   832     virtual void MidletExiting() = 0;
   833 #endif // RD_JAVA_NGA_ENABLED
   833 #endif // RD_JAVA_NGA_ENABLED
   834 
   834 
   835     virtual TBool ReadyToBlit() const = 0;
   835     virtual TBool ReadyToBlit() const = 0;
   836 };
   836 };
   837 
   837 
  2173     EDismiss = 0,           // Futuredev: value
  2173     EDismiss = 0,           // Futuredev: value
  2174     // Form/Item
  2174     // Form/Item
  2175     EItemChanged = 0,       // Futuredev: value
  2175     EItemChanged = 0,       // Futuredev: value
  2176     // EList
  2176     // EList
  2177     ESelect = 0,             // Futuredev: value
  2177     ESelect = 0,             // Futuredev: value
  2178     EM3GDraw = 32           // M3G content is drowned on canvas
  2178     EM3GDraw = 32,           // M3G content is drowned on canvas
       
  2179     EForcedPaint = 33,
       
  2180     EFreeGraphicsMemory = 34
  2179 };
  2181 };
  2180 
  2182 
  2181 /**
  2183 /**
  2182  * Reusable notify priority event used to unblock a Java thread
  2184  * Reusable notify priority event used to unblock a Java thread
  2183  * waiting for completion of a native async operation.
  2185  * waiting for completion of a native async operation.
  2253 
  2255 
  2254     /**
  2256     /**
  2255      * Handles a change to resources which are shared accross the environment.
  2257      * Handles a change to resources which are shared accross the environment.
  2256      */
  2258      */
  2257     virtual void HandleResourceChangeL(TInt aType) = 0;
  2259     virtual void HandleResourceChangeL(TInt aType) = 0;
       
  2260 
       
  2261 #ifdef RD_JAVA_NGA_ENABLED
       
  2262     /**
       
  2263      * Called when MIDlet gains or loses partial/full foreground.
       
  2264      * Application (CAknAppUi::HandleWsEventL()) gets AknFullOrPartialForegroundGained event
       
  2265      * when it becomes at least partially visible even if it would not be the foreground application.
       
  2266      * AknFullOrPartialForegroundLost is received when application is not all visible anymore.
       
  2267      */
       
  2268     virtual void HandleFullOrPartialForegroundL(TBool /*aFullOrPartialFg*/) {}
       
  2269 
       
  2270     /**
       
  2271      * Called when all graphics memory needs to be freed immediately.
       
  2272      */
       
  2273     virtual void HandleFreeGraphicsMemory() {}
       
  2274 #endif //RD_JAVA_NGA_ENABLED
  2258 };
  2275 };
  2259 
  2276 
  2260 /**
  2277 /**
  2261  *
  2278  *
  2262  * A MIDlet environment, one per MIDlet, providing utility methods for the MIDP implementation.
  2279  * A MIDlet environment, one per MIDlet, providing utility methods for the MIDP implementation.
  2481      * @return True if specified hw exists.
  2498      * @return True if specified hw exists.
  2482      * @since S60 9.2
  2499      * @since S60 9.2
  2483      */
  2500      */
  2484     virtual TBool IsHardwareAcceleratedL(
  2501     virtual TBool IsHardwareAcceleratedL(
  2485         MMIDEnv::THardwareType aHardwareType) = 0;
  2502         MMIDEnv::THardwareType aHardwareType) = 0;
       
  2503 
       
  2504     /**
       
  2505      * Called when MIDlet's partial/full foreground status is changed.
       
  2506      * @since S60 9.2
       
  2507      */
       
  2508     virtual void HandleFullOrPartialForegroundL(TBool aFullOrPartialFg) = 0;
       
  2509 
       
  2510     /**
       
  2511      * Called when graphics memory needs to be freed immediately.
       
  2512      * @since S60 9.2
       
  2513      */
       
  2514     virtual void HandleFreeGraphicsMemory() = 0;
       
  2515 
       
  2516     /**
       
  2517      * Checks if MIDlet is at least partially visible.
       
  2518      * @return ETrue if MIDlet has full or partial foreground.
       
  2519      * @since S60 9.2
       
  2520      */
       
  2521     virtual TBool HasFullOrPartialForeground() const = 0;
  2486 #endif // RD_JAVA_NGA_ENABLED
  2522 #endif // RD_JAVA_NGA_ENABLED
  2487 
  2523 
  2488     /**
  2524     /**
  2489      * Maps low level key event
  2525      * Maps low level key event
  2490      * @param    aMidKeyEvent key event output data
  2526      * @param    aMidKeyEvent key event output data
  2513      *
  2549      *
  2514      * @param displayable deleting displayble
  2550      * @param displayable deleting displayble
  2515      * @since Java 2.0
  2551      * @since Java 2.0
  2516      */
  2552      */
  2517     virtual void DisplayableIsDestructed(const MMIDDisplayable* aDisplayable) = 0;
  2553     virtual void DisplayableIsDestructed(const MMIDDisplayable* aDisplayable) = 0;
       
  2554 
       
  2555     /**
       
  2556      * Returns pointer to last fullscreen Displayble.
       
  2557      *
       
  2558      * @return Last fullscreen Displayable
       
  2559      * @since Java 2.1
       
  2560      */
       
  2561     virtual const MMIDDisplayable* LastFullscreenDisplayable() const = 0;
  2518 };
  2562 };
  2519 
  2563 
  2520 /**
  2564 /**
  2521  *
  2565  *
  2522  * Interface class for provider of asynchronous calls to lcdui
  2566  * Interface class for provider of asynchronous calls to lcdui
  2596      * @param aCallbackId Id which is provided to the callback
  2640      * @param aCallbackId Id which is provided to the callback
  2597      */
  2641      */
  2598     virtual void InvokeUICallback(
  2642     virtual void InvokeUICallback(
  2599         MUiEventConsumer& aConsumer,
  2643         MUiEventConsumer& aConsumer,
  2600         TInt aCallbackId) = 0;
  2644         TInt aCallbackId) = 0;
       
  2645 
       
  2646     virtual void InvokeLcduiEvent(MMIDLcduiEventConsumer& aConsumer, TInt aCallbackId) = 0;
  2601 };
  2647 };
  2602 
  2648 
  2603 /**
  2649 /**
  2604  *
  2650  *
  2605  * Interface class for constructing native peers to LCDUI objects
  2651  * Interface class for constructing native peers to LCDUI objects
  2878      * operation and clean up any resources.
  2924      * operation and clean up any resources.
  2879      */
  2925      */
  2880     virtual void  AbortAsync() = 0;
  2926     virtual void  AbortAsync() = 0;
  2881 };
  2927 };
  2882 
  2928 
       
  2929 class MMIDLcduiEventConsumer
       
  2930 {
       
  2931 public:
       
  2932     virtual void HandleLcduiEvent(int aType) = 0;
       
  2933 };
       
  2934 
  2883 #endif // LCDUI_H
  2935 #endif // LCDUI_H