shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
- Point location = new Point(100, 100);
-
- if (skinInfo.isPhoneShape()) { /* TODO: */
- location = shell.getLocation();
- shell.setVisible(false);
- }
+// Point location = new Point(100, 100);
+//
+// if (skinInfo.isPhoneShape()) { /* TODO: */
+// location = shell.getLocation();
+// shell.setVisible(false);
+// }
skinComposer.arrangeSkin(currentState.getCurrentScale(), rotationId);
- if (skinInfo.isPhoneShape()) { /* TODO: */
- shell.setVisible(true);
- shell.setLocation(location);
- SkinUtil.setTopMost(shell, isOnTop);
- }
+// if (skinInfo.isPhoneShape()) { /* TODO: */
+// shell.setVisible(true);
+// shell.setLocation(location);
+// SkinUtil.setTopMost(shell, isOnTop);
+// }
}
});
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
- Point location = new Point(100, 100);
-
- if (skinInfo.isPhoneShape()) { /* TODO: */
- location = shell.getLocation();
- shell.setVisible(false);
- }
+// Point location = new Point(100, 100);
+//
+// if (skinInfo.isPhoneShape()) { /* TODO: */
+// location = shell.getLocation();
+// shell.setVisible(false);
+// }
skinComposer.arrangeSkin(scale, currentState.getCurrentRotationId());
- if (skinInfo.isPhoneShape()) { /* TODO: */
- shell.setVisible(true);
- shell.setLocation(location);
- SkinUtil.setTopMost(shell, isOnTop);
- }
+// if (skinInfo.isPhoneShape()) { /* TODO: */
+// shell.setVisible(true);
+// shell.setLocation(location);
+// SkinUtil.setTopMost(shell, isOnTop);
+// }
}
});
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
import org.tizen.emulator.skin.comm.ICommunicator.RotationInfo;
import org.tizen.emulator.skin.layout.HWKey;
private int currentScale;
private short currentRotationId;
private int currentAngle;
- private int maxtouchpoint;
+ private int maxTouchPoint;
+
+ private Rectangle displayBounds;
+ private boolean updateDisplayBounds;
private Image currentImage;
private Image currentKeyPressedImage;
this.currentScale = 50;
this.currentRotationId = RotationInfo.PORTRAIT.id();
this.currentAngle = 0;
+ this.maxTouchPoint = 0;
+
+ this.displayBounds = null;
+ this.updateDisplayBounds = false;
}
/* resolution */
this.currentAngle = angle;
}
+ /* display bounds */
+ public synchronized Rectangle getDisplayBounds() {
+ if (displayBounds == null) {
+ return new Rectangle(0, 0, 10, 10);
+ }
+
+ return displayBounds;
+ }
+
+ public synchronized void setDisplayBounds(Rectangle bounds) {
+ this.displayBounds = bounds;
+ }
+
+ public synchronized boolean isUpdateDisplayBounds() {
+ return updateDisplayBounds;
+ }
+
+ public synchronized void setUpdateDisplayBounds(boolean needUpdate) {
+ this.updateDisplayBounds = needUpdate;
+ }
+
/* skin image */
public synchronized Image getCurrentImage() {
return currentImage;
public synchronized void setCurrentHoveredHWKey(HWKey hwKey) {
this.currentHoveredHWKey = hwKey;
}
+
/* max touch point */
- public synchronized void setMaxTouchPoint(int maxtouchpoint) {
- this.maxtouchpoint = maxtouchpoint;
+ public synchronized void setMaxTouchPoint(int maxTouchPoint) {
+ this.maxTouchPoint = maxTouchPoint;
}
-
+
public synchronized int getMaxTouchPoint() {
- return this.maxtouchpoint;
+ return maxTouchPoint;
}
}
}
logger.info("lcd bounds : " + lcdBounds);
+ currentState.setDisplayBounds(lcdBounds);
lcdCanvas.setBounds(lcdBounds);
/* arrange the skin image */
}
logger.info("lcd bounds : " + lcdBounds);
- lcdCanvas.setBounds(lcdBounds);
+ currentState.setDisplayBounds(lcdBounds);
+ currentState.setUpdateDisplayBounds(true);
+ //lcdCanvas.setBounds(lcdBounds);
/* arrange the skin image */
Image tempImage = null;
shellPaintListener = new PaintListener() {
@Override
public void paintControl(final PaintEvent e) {
+ if (currentState.isUpdateDisplayBounds() == true) {
+ currentState.setUpdateDisplayBounds(false);
+ lcdCanvas.setBounds(currentState.getDisplayBounds());
+ }
+
/* general shell does not support native transparency,
* so draw image with GC. */
if (currentState.getCurrentImage() != null) {