equal
deleted
inserted
replaced
16 */ |
16 */ |
17 package javax.microedition.lcdui; |
17 package javax.microedition.lcdui; |
18 |
18 |
19 import org.eclipse.swt.graphics.Internal_GfxPackageSupport; |
19 import org.eclipse.swt.graphics.Internal_GfxPackageSupport; |
20 import org.eclipse.swt.internal.qt.graphics.GraphicsContext; |
20 import org.eclipse.swt.internal.qt.graphics.GraphicsContext; |
|
21 import org.eclipse.swt.internal.qt.graphics.WindowSurface; |
21 import org.eclipse.swt.widgets.Control; |
22 import org.eclipse.swt.widgets.Control; |
22 import org.eclipse.swt.widgets.Display; |
23 import org.eclipse.swt.widgets.Display; |
|
24 import org.eclipse.swt.graphics.Rectangle; |
23 import com.nokia.mid.ui.DirectGraphics; |
25 import com.nokia.mid.ui.DirectGraphics; |
24 import com.nokia.mj.impl.nokialcdui.LCDUIInvoker; |
26 import com.nokia.mj.impl.nokialcdui.LCDUIInvoker; |
25 import com.nokia.mj.impl.nokialcdui.ItemControlStateChangeListener; |
27 import com.nokia.mj.impl.nokialcdui.ItemControlStateChangeListener; |
26 |
28 |
27 final class LCDUIInvokerImpl extends LCDUIInvoker |
29 final class LCDUIInvokerImpl extends LCDUIInvoker |
150 protected Object doGetGraphics(Object canvas) |
152 protected Object doGetGraphics(Object canvas) |
151 { |
153 { |
152 return ((Canvas) canvas).getGameBufferGraphics(); |
154 return ((Canvas) canvas).getGameBufferGraphics(); |
153 } |
155 } |
154 |
156 |
155 protected org.eclipse.swt.internal.qt.graphics.WindowSurface doGetWindowSurface( Graphics g ) |
157 protected WindowSurface doGetWindowSurface( Graphics g ) |
156 { |
158 { |
157 if( g != null ) |
159 if( g != null ) |
158 { |
160 { |
159 return g.getGraphicsBuffer().getWindowSurface(); |
161 return g.getGraphicsBuffer().getWindowSurface(); |
160 } |
162 } |
186 protected void doSync(Object graphics) |
188 protected void doSync(Object graphics) |
187 { |
189 { |
188 ((Graphics)graphics).sync(); |
190 ((Graphics)graphics).sync(); |
189 } |
191 } |
190 |
192 |
191 protected void doStartExternalRendering(Graphics g) |
193 protected Rectangle doStartExternalRendering(Graphics g) |
192 { |
194 { |
193 // Flush any pending 2D graphics. |
195 // Flush any pending 2D graphics and open surface session |
194 g.sync(); |
196 g.startExternalRendering(); |
195 g.getGraphicsBuffer().startFrame( g.getClipX(), |
197 return g.getClipInWindowCoordinates(); |
196 g.getClipY(), |
|
197 g.getClipWidth(), |
|
198 g.getClipHeight() ); |
|
199 } |
198 } |
200 |
199 |
201 protected void doEndExternalRendering(Graphics g) |
200 protected void doEndExternalRendering(Graphics g) |
202 { |
201 { |
203 g.getGraphicsBuffer().endFrame(); |
202 g.endExternalRendering(); |
204 } |
203 } |
205 |
204 |
206 protected String doGetDynamicProperty(String key) |
205 protected String doGetDynamicProperty(String key) |
207 { |
206 { |
208 return SystemPropertyUtil.doGetDynamicProperty(key); |
207 return SystemPropertyUtil.doGetDynamicProperty(key); |