import org.tizen.emulator.skin.util.SkinRotation;
import org.tizen.emulator.skin.util.SkinUtil;
import org.tizen.emulator.skin.util.SwtUtil;
+ import org.tizen.emulator.skin.window.ControlPanel;
+ import org.tizen.emulator.skin.window.SkinWindow;
/**
- *
+ *
*
*/
public class EmulatorSkin {
private boolean isShutdownRequested;
private boolean isAboutToReopen;
private boolean isOnTop;
- private boolean isScreenShotOpened;
- private boolean isOnUsbKbd;
+ private boolean isOnKbd;
- private ScreenShotDialog screenShotDialog;
+ private SkinWindow controlPanel;
+ protected ScreenShotDialog screenShotDialog;
private Menu contextMenu;
- private SocketCommunicator communicator;
- private long windowHandleId;
+ protected SocketCommunicator communicator;
+ protected long windowHandleId;
private Listener shellCloseListener;
private PaintListener shellPaintListener;
// EmulatorConfig.DEFAULT_WINDOW_ROTATION );
// has to be portrait mode at first booting time
short rotationId = EmulatorConfig.DEFAULT_WINDOW_ROTATION;
-
- composeInternal( lcdCanvas, x, y, lcdWidth, lcdHeight, scale, rotationId, false );
- logger.info("lcdWidth : " + lcdWidth + ", lcdHeight : " + lcdHeight + ", scale : " + scale);
-
- // sdl uses this handle id.
- windowHandleId = getWindowHandleId();
- return windowHandleId;
+ composeInternal(lcdCanvas, x, y, resolutionW, resolutionH, scale, rotationId, false);
+ logger.info("resolution : " + resolutionW + "x" + resolutionH + ", scale : " + scale);
+ return 0;
}
- private void composeInternal( Canvas lcdCanvas, int x, int y, int lcdWidth, int lcdHeight, int scale,
- short rotationId, boolean isOnKbd ) {
+ private void composeInternal(Canvas lcdCanvas,
+ int x, int y, int resolutionW, int resolutionH,
- int scale, short rotationId, boolean isOnUsbKbd) {
++ int scale, short rotationId, boolean isOnKbd) {
- lcdCanvas.setBackground( shell.getDisplay().getSystemColor( SWT.COLOR_BLACK ) );
+ shell.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_BLACK));
+ shell.setLocation(x, y);
- imageRegistry = ImageRegistry.getInstance();
-
- shell.setBackground( shell.getDisplay().getSystemColor( SWT.COLOR_BLACK ) );
+ String emulatorName = SkinUtil.makeEmulatorName(config);
+ shell.setText(emulatorName);
- shell.setLocation( x, y );
+ lcdCanvas.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_BLACK));
- String emulatorName = SkinUtil.makeEmulatorName( config );
- shell.setText( emulatorName );
-
- if ( SwtUtil.isWindowsPlatform() ) {
- shell.setImage( imageRegistry.getIcon( IconName.EMULATOR_TITLE_ICO ) );
+ imageRegistry = ImageRegistry.getInstance();
+ if (SwtUtil.isWindowsPlatform()) {
+ shell.setImage(imageRegistry.getIcon(IconName.EMULATOR_TITLE_ICO));
} else {
- shell.setImage( imageRegistry.getIcon( IconName.EMULATOR_TITLE ) );
+ shell.setImage(imageRegistry.getIcon(IconName.EMULATOR_TITLE));
}
- arrangeSkin(lcdWidth, lcdHeight, scale, rotationId);
+ arrangeSkin(resolutionW, resolutionH, scale, rotationId);
- if (skinMode != SkinMode.NONE && null == currentImage) {
+ if (skinMode != SkinMode.GENERAL && null == currentImage) {
logger.severe("Failed to load initial skin image file. Kill this skin process.");
SkinUtil.openMessage(shell, null,
"Failed to load Skin image file.", SWT.ICON_ERROR, config);