javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Canvas.java
branchRCL_3
changeset 21 4376525cdefb
parent 18 9ac0a0a7da70
child 24 6c158198356e
equal deleted inserted replaced
19:71c436fe3ce0 21:4376525cdefb
    86     Graphics        iFrameGraphics;     // frame buffer graphics - always from iFrameBuffer
    86     Graphics        iFrameGraphics;     // frame buffer graphics - always from iFrameBuffer
    87     final boolean   iNativeFrameBuffer; // true if native canvas peer has native framebuffer
    87     final boolean   iNativeFrameBuffer; // true if native canvas peer has native framebuffer
    88 
    88 
    89     // This flag is valid only in NGA
    89     // This flag is valid only in NGA
    90     private boolean iM3GContent;
    90     private boolean iM3GContent;
    91 
    91     private boolean iM3GDraw = false;
    92     /**
    92     /**
    93      * This member variable is set <code>true</code> if the <code>Nokia-UI-Enhancement</code>
    93      * This member variable is set <code>true</code> if the <code>Nokia-UI-Enhancement</code>
    94      * attribute is "CanvasHasBackground". The attribute may be placed in the JAD or the manifest.
    94      * attribute is "CanvasHasBackground". The attribute may be placed in the JAD or the manifest.
    95      */
    95      */
    96     private boolean iHasBackgroundImage;
    96     private boolean iHasBackgroundImage;
   635                 }
   635                 }
   636             }
   636             }
   637             break;
   637             break;
   638         case Toolkit.EVENT_M3G_DRAW:
   638         case Toolkit.EVENT_M3G_DRAW:
   639             if (shown)
   639             if (shown)
   640              {
   640             {
   641                 synchronized (iCallbackLock)
   641                 synchronized (iCallbackLock)
   642                 {
   642                 {
   643                    Graphics graphics = GetPaintGraphics();
   643                     Graphics graphics = GetPaintGraphics();
   644                    graphics.M3Gdraw(aData0);
   644                     iM3GDraw = aData0 != 0;
   645                 }
   645                 }
   646              }
   646             }
   647              break;    
   647             break;
   648         default:
   648         default:
   649             super.handleEvent(aEvent, aData0, aData1);
   649             super.handleEvent(aEvent, aData0, aData1);
   650             break;
   650             break;
   651         }
   651         }
   652     }
   652     }
   909      * Informs canvas about M3G content.
   909      * Informs canvas about M3G content.
   910      */
   910      */
   911     void setM3GContent(boolean aValue)
   911     void setM3GContent(boolean aValue)
   912     {
   912     {
   913         iM3GContent = aValue;
   913         iM3GContent = aValue;
       
   914     }
       
   915 
       
   916     /*
       
   917      * This function blocking downscaled when M3G drawing some content
       
   918      */
       
   919     boolean m3gDraw()
       
   920     {
       
   921         return iM3GDraw;
   914     }
   922     }
   915 
   923 
   916     private native int _create(
   924     private native int _create(
   917         int aToolkit, int aDisplayable, boolean aIsGameCanvas, int[] aCanvasAttribArray);
   925         int aToolkit, int aDisplayable, boolean aIsGameCanvas, int[] aCanvasAttribArray);
   918     static native int _getGameAction(int aToolkit, int aKeyCode);
   926     static native int _getGameAction(int aToolkit, int aKeyCode);