javauis/lcdui_akn/lcdui/inc/CMIDCanvas.h
changeset 23 98ccebc37403
parent 21 2a9601315dfc
child 34 71c436fe3ce0
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
   380      * @return this as tactile feedback component.
   380      * @return this as tactile feedback component.
   381      */
   381      */
   382     MMIDTactileFeedbackComponent* TactileFeedbackComponent();
   382     MMIDTactileFeedbackComponent* TactileFeedbackComponent();
   383 #endif // RD_TACTILE_FEEDBACK
   383 #endif // RD_TACTILE_FEEDBACK
   384 
   384 
       
   385     TBool ReadyToBlit() const;
   385 
   386 
   386 // from base class MMIDBufferProcessor
   387 // from base class MMIDBufferProcessor
   387 
   388 
   388     /**
   389     /**
   389      * From MMIDBufferProcessor.
   390      * From MMIDBufferProcessor.
  1037      * @since   S60 3.2
  1038      * @since   S60 3.2
  1038      * @return  ETrue, if network indicator is shown in Canvas, otherwise
  1039      * @return  ETrue, if network indicator is shown in Canvas, otherwise
  1039      *          returns EFalse.
  1040      *          returns EFalse.
  1040      */
  1041      */
  1041     TBool IsNetworkIndicatorEnabledL() const;
  1042     TBool IsNetworkIndicatorEnabledL() const;
       
  1043     
       
  1044 public:
       
  1045     /**
       
  1046      * Handles switching from foreground to
       
  1047      * background and vice versa. Mainly rendering
       
  1048      * context and surfaces need to be relased.
       
  1049      */
       
  1050     void HandleForeground(TBool aForeground);
       
  1051     
       
  1052 private:
       
  1053     /** States of the first paint */
       
  1054     enum TFirstPainState {
       
  1055         EFirstPaintNeverOccurred = 0,
       
  1056         EFirstPaintInitiated,
       
  1057         EFirstPaintPrepared,
       
  1058         EFirstPaintOccurred
       
  1059     };
  1042 
  1060 
  1043 #ifdef RD_JAVA_NGA_ENABLED
  1061 #ifdef RD_JAVA_NGA_ENABLED
  1044 
  1062 
       
  1063 private:
  1045     /** EGL surface types */
  1064     /** EGL surface types */
  1046     typedef enum
  1065     typedef enum
  1047     {
  1066     {
  1048         EEglNone = 0,
  1067         EEglNone = 0,
  1049         EEglWindow,
  1068         EEglWindow,
  1050         EEglPbuffer
  1069         EEglPbuffer
  1051     }  TEglType;
  1070     }  TEglType;
  1052 
  1071     
  1053 
       
  1054 // from MAlfBufferProvider
  1072 // from MAlfBufferProvider
  1055 public:
  1073 public:
  1056     /**
  1074     /**
  1057      * Called by framework when the next buffer is ready and available for the client to draw.
  1075      * Called by framework when the next buffer is ready and available for the client to draw.
  1058      *
  1076      *
  1077      *
  1095      *
  1078      * @since  S60 v9.2
  1096      * @since  S60 v9.2
  1079      */
  1097      */
  1080     void ContextAboutToSuspend();
  1098     void ContextAboutToSuspend();
  1081     void OnActivation();
  1099     void OnActivation();
  1082 
       
  1083 public:
       
  1084     /**
       
  1085      * Handles switching from foreground to
       
  1086      * background and vice versa. Mainly rendering
       
  1087      * context and surfaces need to be relased.
       
  1088      */
       
  1089     void HandleForeground(TBool aForeground);
       
  1090 
  1100 
  1091 // From MMIDComponentNgaExtension
  1101 // From MMIDComponentNgaExtension
  1092 public:
  1102 public:
  1093     /**
  1103     /**
  1094      * @see MMIDComponentNgaExtension#UpdateEglContent()
  1104      * @see MMIDComponentNgaExtension#UpdateEglContent()
  1548     // The index of focused custom component
  1558     // The index of focused custom component
  1549     TInt iFocusedComponent;
  1559     TInt iFocusedComponent;
  1550 
  1560 
  1551     // Stores the control on which was press event generated
  1561     // Stores the control on which was press event generated
  1552     MMIDCustomComponent* iPressedComponent;
  1562     MMIDCustomComponent* iPressedComponent;
  1553 
  1563     
  1554 #ifdef RD_JAVA_NGA_ENABLED
       
  1555 
       
  1556     /**
  1564     /**
  1557      * Flag incdicating the foreground status of canvas.
  1565      * Flag incdicating the foreground status of canvas.
  1558      * Set to EFalse when some other displayable is made current
  1566      * Set to EFalse when some other displayable is made current
  1559      * or when MIDlet goes to background.
  1567      * or when MIDlet goes to background.
  1560      */
  1568      */
  1561     TBool iForeground;
  1569     TBool iForeground;
       
  1570 
       
  1571 #ifdef RD_JAVA_NGA_ENABLED
  1562 
  1572 
  1563     /**
  1573     /**
  1564      * CAlfCompositionPixelSource is used for drawing canvas
  1574      * CAlfCompositionPixelSource is used for drawing canvas
  1565      * content when only basic content is drawn
  1575      * content when only basic content is drawn
  1566      * (no M3G or direct content).
  1576      * (no M3G or direct content).
  1678      * all drag events and release event should go to canvas
  1688      * all drag events and release event should go to canvas
  1679      * even if it is outside of canvas.
  1689      * even if it is outside of canvas.
  1680      * All events, which started outside the canvas have to be ignored.
  1690      * All events, which started outside the canvas have to be ignored.
  1681      */
  1691      */
  1682     TBool iDragEventsStartedInside;
  1692     TBool iDragEventsStartedInside;
       
  1693     
       
  1694     /**
       
  1695      * Switched after any graphics have been sent to screen.
       
  1696      * Those graphics should be really drawn on the screen.
       
  1697      */
       
  1698     TInt iFirstPaintState;
  1683 };
  1699 };
  1684 
  1700 
  1685 #ifdef RD_JAVA_NGA_ENABLED
  1701 #ifdef RD_JAVA_NGA_ENABLED
  1686 // ------------------------------------
  1702 // ------------------------------------
  1687 // Converts pixels from ARGB to RGBA
  1703 // Converts pixels from ARGB to RGBA