javauis/lcdui_qt/src/com/nokia/mj/impl/nokialcdui/LCDUIInvoker.java
changeset 35 85266cc22c7f
parent 23 98ccebc37403
child 78 71ad690e91f5
equal deleted inserted replaced
26:dc7c549001d5 35:85266cc22c7f
    92     {
    92     {
    93         return invokerInstance.doGetEswtImage(img);
    93         return invokerInstance.doGetEswtImage(img);
    94     }
    94     }
    95 
    95 
    96     /**
    96     /**
       
    97      * Returns the WindowSurface where g will be drawing.
       
    98      * @param g The graphics object
       
    99      * @return WindowSurface where g will be drawing.
       
   100      */
       
   101     public static org.eclipse.swt.internal.qt.graphics.WindowSurface getWindowSurface(Graphics g)
       
   102     {
       
   103         return invokerInstance.doGetWindowSurface(g);
       
   104     }
       
   105     
       
   106     /**
    97      * Creates LCDUI Image from an eSWT Image. The returned object is a new
   107      * Creates LCDUI Image from an eSWT Image. The returned object is a new
    98      * LCDUI Image object created from the eSWT Image, so this method is not
   108      * LCDUI Image object created from the eSWT Image, so this method is not
    99      * as efficient as getEswtImage.
   109      * as efficient as getEswtImage.
   100      *
   110      *
   101      * @param img - eSWT Image object.
   111      * @param img - eSWT Image object.
   200     {
   210     {
   201         invokerInstance.doFlushGraphics(canvas, x, y, width, height);
   211         invokerInstance.doFlushGraphics(canvas, x, y, width, height);
   202     }
   212     }
   203 
   213 
   204     /**
   214     /**
       
   215      * Synchronizes any pending buffered draw commands to the target of the 
       
   216      * graphics object.
       
   217      *
       
   218      * Must be called from UI-thread.
       
   219      *
       
   220      * @param graphics The object to synchronize
       
   221      */
       
   222     public static void sync(Object graphics)
       
   223     {
       
   224     	invokerInstance.doSync(graphics);
       
   225     }
       
   226     
       
   227     /**
       
   228      * Begins an external renderer session to given Graphics. An external renderer
       
   229      * could be, for example,  M3G renderer. The opened rendering session must be
       
   230      * ended by calling the endExternalRendering().
       
   231      *
       
   232      * This function must be called from UI-thread only.
       
   233      *
       
   234      * @param g Graphics where the rendering session starts.
       
   235      */
       
   236     public static void startExternalRendering(Graphics g)
       
   237     {
       
   238         invokerInstance.doStartExternalRendering(g);
       
   239     }
       
   240     
       
   241     /**
       
   242      * Ends the external rendering session on given Graphics that was started
       
   243      * by calling startExternalRendering().
       
   244      *
       
   245      * This function must be called from UI-thread only.
       
   246      *
       
   247      * @param g The Graphics instance.
       
   248      */
       
   249     public static void endExternalRendering(Graphics g)
       
   250     {
       
   251         invokerInstance.doEndExternalRendering(g);
       
   252     }
       
   253      
       
   254     
       
   255     /**
   205      * Returns the dynamic property value.
   256      * Returns the dynamic property value.
   206      *
   257      *
   207      * @param key property key
   258      * @param key property key
   208      * @return property value
   259      * @return property value
   209      */
   260      */
   238 
   289 
   239     protected abstract Image doGetLcduiImage(org.eclipse.swt.graphics.Image img);
   290     protected abstract Image doGetLcduiImage(org.eclipse.swt.graphics.Image img);
   240 
   291 
   241     protected abstract void doSetItemControlStateChangeListener(ItemControlStateChangeListener listener,Item item);
   292     protected abstract void doSetItemControlStateChangeListener(ItemControlStateChangeListener listener,Item item);
   242 
   293 
       
   294     protected abstract org.eclipse.swt.internal.qt.graphics.WindowSurface doGetWindowSurface( Graphics g );
       
   295     
   243     // DirectGraphics support
   296     // DirectGraphics support
   244 
   297 
   245     protected abstract DirectGraphics doGetDirectGraphics(Graphics g);
   298     protected abstract DirectGraphics doGetDirectGraphics(Graphics g);
   246 
   299 
   247     protected abstract GraphicsContext doGetGc(Graphics g);
   300     protected abstract GraphicsContext doGetGc(Graphics g);
   262     protected abstract void doRenderGraphics(Object canvas, Object graphics);
   315     protected abstract void doRenderGraphics(Object canvas, Object graphics);
   263 
   316 
   264     protected abstract void doFlushGraphics(Object canvas,
   317     protected abstract void doFlushGraphics(Object canvas,
   265                                             int x, int y, int width, int height);
   318                                             int x, int y, int width, int height);
   266 
   319 
       
   320     protected abstract void doSync(Object graphics);
       
   321     
       
   322     protected abstract void doStartExternalRendering(Graphics g);
       
   323     
       
   324     protected abstract void doEndExternalRendering(Graphics g);
       
   325     
   267     protected abstract String doGetDynamicProperty(String key);
   326     protected abstract String doGetDynamicProperty(String key);
   268 
   327 
   269     protected abstract boolean doDetectCollision(Image image1, int transform1, int p1x, int p1y,
   328     protected abstract boolean doDetectCollision(Image image1, int transform1, int p1x, int p1y,
   270             int r1x1, int r1y1, int r1x2, int r1y2,
   329             int r1x1, int r1y1, int r1x2, int r1y2,
   271             Image image2, int transform2, int p2x, int p2y,
   330             Image image2, int transform2, int p2x, int p2y,