From: GiWoong Kim Date: Tue, 29 Oct 2013 08:38:12 +0000 (+0900) Subject: skin: no need to setRegion for entire pressed HW keys X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~673^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee534499c03e4f967e09e91701e7c386891f1ce9;p=sdk%2Femulator%2Fqemu.git skin: no need to setRegion for entire pressed HW keys Change-Id: I47785ef2c690dc6048c877813bbbc2d0362fb477 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RegionType.java b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RegionType.java index 8685466390..9a6cd3a271 100644 --- a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RegionType.java +++ b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RegionType.java @@ -1,4 +1,3 @@ -// /** * XML Binding * @@ -27,10 +26,11 @@ * */ +// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2013.07.11 at 12:12:25 PM KST +// Generated on: 2013.10.29 at 04:58:23 PM KST // @@ -55,6 +55,7 @@ import javax.xml.bind.annotation.XmlType; * <attribute name="top" type="{http://www.w3.org/2001/XMLSchema}int" /> * <attribute name="width" type="{http://www.w3.org/2001/XMLSchema}int" /> * <attribute name="height" type="{http://www.w3.org/2001/XMLSchema}int" /> + * <attribute name="update" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> * </restriction> * </complexContent> * </complexType> @@ -74,6 +75,8 @@ public class RegionType { protected Integer width; @XmlAttribute(name = "height") protected Integer height; + @XmlAttribute(name = "update") + protected Boolean update; /** * Gets the value of the left property. @@ -171,4 +174,32 @@ public class RegionType { this.height = value; } + /** + * Gets the value of the update property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isUpdate() { + if (update == null) { + return false; + } else { + return update; + } + } + + /** + * Sets the value of the update property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setUpdate(Boolean value) { + this.update = value; + } + } diff --git a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RgbType.java b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RgbType.java index 2225e786b4..3a6abf2539 100644 --- a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RgbType.java +++ b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RgbType.java @@ -1,4 +1,3 @@ -// /** * XML Binding * @@ -27,6 +26,7 @@ * */ +// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. diff --git a/tizen/src/skin/client/skins/mobile-320x480-1btn/default.dbi b/tizen/src/skin/client/skins/mobile-320x480-1btn/default.dbi index f1ce9ca4b4..834c690850 100644 --- a/tizen/src/skin/client/skins/mobile-320x480-1btn/default.dbi +++ b/tizen/src/skin/client/skins/mobile-320x480-1btn/default.dbi @@ -20,7 +20,7 @@ Home - + 116 Power @@ -28,7 +28,7 @@ Power - + 115 Volume + @@ -36,7 +36,7 @@ Volume + - + 114 Volume - @@ -63,7 +63,7 @@ Home - + 116 Power @@ -71,7 +71,7 @@ Power - + 115 Volume + @@ -79,7 +79,7 @@ Volume + - + 114 Volume - @@ -106,7 +106,7 @@ Home - + 116 Power @@ -114,7 +114,7 @@ Power - + 115 Volume + @@ -122,7 +122,7 @@ Volume + - + 114 Volume - @@ -149,7 +149,7 @@ Home - + 116 Power @@ -157,7 +157,7 @@ Power - + 115 Volume + @@ -165,7 +165,7 @@ Volume + - + 114 Volume - diff --git a/tizen/src/skin/client/skins/mobile-480x800-3btn/default.dbi b/tizen/src/skin/client/skins/mobile-480x800-3btn/default.dbi index 6b39a7b3af..2c560f95d2 100644 --- a/tizen/src/skin/client/skins/mobile-480x800-3btn/default.dbi +++ b/tizen/src/skin/client/skins/mobile-480x800-3btn/default.dbi @@ -36,7 +36,7 @@ Back - + 116 Power @@ -44,7 +44,7 @@ Power - + 115 Volume + @@ -52,7 +52,7 @@ Volume + - + 114 Volume - @@ -95,7 +95,7 @@ Back - + 116 Power @@ -103,7 +103,7 @@ Power - + 115 Volume + @@ -111,7 +111,7 @@ Volume + - + 114 Volume - @@ -154,7 +154,7 @@ Back - + 116 Power @@ -162,7 +162,7 @@ Power - + 115 Volume + @@ -170,7 +170,7 @@ Volume + - + 114 Volume - @@ -213,7 +213,7 @@ Back - + 116 Power @@ -221,7 +221,7 @@ Power - + 115 Volume + @@ -229,7 +229,7 @@ Volume + - + 114 Volume - diff --git a/tizen/src/skin/client/skins/mobile-540x960-3btn/default.dbi b/tizen/src/skin/client/skins/mobile-540x960-3btn/default.dbi index ba7af217be..1d1fe21090 100644 --- a/tizen/src/skin/client/skins/mobile-540x960-3btn/default.dbi +++ b/tizen/src/skin/client/skins/mobile-540x960-3btn/default.dbi @@ -1,6 +1,6 @@ - + @@ -36,7 +36,7 @@ Back - + 116 Power @@ -44,7 +44,7 @@ Power - + 115 Volume + @@ -52,7 +52,7 @@ Volume + - + 114 Volume - @@ -95,7 +95,7 @@ Back - + 116 Power @@ -103,7 +103,7 @@ Power - + 115 Volume + @@ -111,7 +111,7 @@ Volume + - + 114 Volume - @@ -154,7 +154,7 @@ Back - + 116 Power @@ -162,7 +162,7 @@ Power - + 115 Volume + @@ -170,7 +170,7 @@ Volume + - + 114 Volume - @@ -213,7 +213,7 @@ Back - + 116 Power @@ -221,7 +221,7 @@ Power - + 115 Volume + @@ -229,7 +229,7 @@ Volume + - + 114 Volume - diff --git a/tizen/src/skin/client/skins/mobile-600x1024-1btn/default.dbi b/tizen/src/skin/client/skins/mobile-600x1024-1btn/default.dbi index c012813758..2bf96a5fed 100644 --- a/tizen/src/skin/client/skins/mobile-600x1024-1btn/default.dbi +++ b/tizen/src/skin/client/skins/mobile-600x1024-1btn/default.dbi @@ -20,7 +20,7 @@ Home - + 116 Power @@ -28,7 +28,7 @@ Power - + 115 Volume + @@ -36,7 +36,7 @@ Volume + - + 114 Volume - @@ -63,7 +63,7 @@ Home - + 116 Power @@ -71,7 +71,7 @@ Power - + 115 Volume + @@ -79,7 +79,7 @@ Volume + - + 114 Volume - @@ -106,7 +106,7 @@ Home - + 116 Power @@ -114,7 +114,7 @@ Power - + 115 Volume + @@ -122,7 +122,7 @@ Volume + - + 114 Volume - @@ -149,7 +149,7 @@ Home - + 116 Power @@ -157,7 +157,7 @@ Power - + 115 Volume + @@ -165,7 +165,7 @@ Volume + - + 114 Volume - diff --git a/tizen/src/skin/client/skins/mobile-720x1280-3btn/default.dbi b/tizen/src/skin/client/skins/mobile-720x1280-3btn/default.dbi index 7c7187deae..e9d9a7ecf9 100644 --- a/tizen/src/skin/client/skins/mobile-720x1280-3btn/default.dbi +++ b/tizen/src/skin/client/skins/mobile-720x1280-3btn/default.dbi @@ -36,7 +36,7 @@ Back - + 116 Power @@ -44,7 +44,7 @@ Power - + 115 Volume + @@ -52,7 +52,7 @@ Volume + - + 114 Volume - @@ -95,7 +95,7 @@ Back - + 116 Power @@ -103,7 +103,7 @@ Power - + 115 Volume + @@ -111,7 +111,7 @@ Volume + - + 114 Volume - @@ -154,7 +154,7 @@ Back - + 116 Power @@ -162,7 +162,7 @@ Power - + 115 Volume + @@ -170,7 +170,7 @@ Volume + - + 114 Volume - @@ -213,7 +213,7 @@ Back - + 116 Power @@ -221,7 +221,7 @@ Power - + 115 Volume + @@ -229,7 +229,7 @@ Volume + - + 114 Volume - diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SpecialKeyWindow.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SpecialKeyWindow.java index 0cc657f8b0..40b9fca4d5 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SpecialKeyWindow.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SpecialKeyWindow.java @@ -69,7 +69,7 @@ import org.tizen.emulator.skin.keywindow.dbi.RegionType; import org.tizen.emulator.skin.layout.HWKey; import org.tizen.emulator.skin.util.IOUtil; import org.tizen.emulator.skin.util.JaxbUtil; -import org.tizen.emulator.skin.util.SkinRegion; +import org.tizen.emulator.skin.util.HWKeyRegion; import org.tizen.emulator.skin.util.SkinUtil; import org.tizen.emulator.skin.util.SwtUtil; @@ -194,7 +194,7 @@ public class SpecialKeyWindow extends SkinWindow { HWKey hwKey = new HWKey( eventInfo.getKeyName(), eventInfo.getKeyCode(), - new SkinRegion(scaledX, scaledY, scaledWidth, scaledHeight), + new HWKeyRegion(scaledX, scaledY, scaledWidth, scaledHeight), keyEntry.getTooltip()); return hwKey; diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/HWKey.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/HWKey.java index 257f476f0e..23ba4abcd2 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/HWKey.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/HWKey.java @@ -28,13 +28,13 @@ package org.tizen.emulator.skin.layout; -import org.tizen.emulator.skin.util.SkinRegion; +import org.tizen.emulator.skin.util.HWKeyRegion; import org.tizen.emulator.skin.util.SkinUtil; public class HWKey { private String name; private int keyCode; - private SkinRegion region; + private HWKeyRegion region; private String tooltip; /** @@ -45,7 +45,7 @@ public class HWKey { this.keyCode = SkinUtil.UNKNOWN_KEYCODE; } - public HWKey(String name, int keyCode, SkinRegion region, String tooltip) { + public HWKey(String name, int keyCode, HWKeyRegion region, String tooltip) { this.name = name; this.keyCode = keyCode; this.region = region; @@ -71,11 +71,11 @@ public class HWKey { } /* region */ - public SkinRegion getRegion() { + public HWKeyRegion getRegion() { return region; } - public void setRegion(SkinRegion region) { + public void setRegion(HWKeyRegion region) { this.region = region; } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java index 9abcc3f47d..afe649a9cd 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java @@ -485,7 +485,7 @@ public class ProfileSpecificSkinComposer implements ISkinComposer { pressedHWKey.getRegion().width, pressedHWKey.getRegion().height, false); /* roll back HW key region */ - if (pressedHWKey.getKeyCode() != 101) { // TODO: not necessary for home key + if (pressedHWKey.getRegion().isNeedUpdate() == true) { SkinUtil.trimShell(shell, currentState.getCurrentImage(), pressedHWKey.getRegion().x, pressedHWKey.getRegion().y, pressedHWKey.getRegion().width, pressedHWKey.getRegion().height); @@ -529,7 +529,7 @@ public class ProfileSpecificSkinComposer implements ISkinComposer { hwKey.getRegion().width, hwKey.getRegion().height, false); /* set pressed HW key region */ - if (hwKey.getKeyCode() != 101) { // TODO: not necessary for home key + if (hwKey.getRegion().isNeedUpdate() == true) { SkinUtil.trimShell(shell, currentState.getCurrentKeyPressedImage(), hwKey.getRegion().x, hwKey.getRegion().y, hwKey.getRegion().width, hwKey.getRegion().height); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/util/HWKeyRegion.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/util/HWKeyRegion.java new file mode 100644 index 0000000000..140d736077 --- /dev/null +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/util/HWKeyRegion.java @@ -0,0 +1,63 @@ +/** + * Hardware Key Region + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * YeongKyoon Lee + * HyunJun Son + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + +package org.tizen.emulator.skin.util; + +/** + * + * + */ +public class HWKeyRegion { + public int x; + public int y; + public int width; + public int height; + private boolean update; + + public HWKeyRegion(int x, int y, int width, int height) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.update = false; + } + + public HWKeyRegion(int x, int y, int width, int height, + boolean update) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.update = update; + } + + public boolean isNeedUpdate() { + return update; + } +} diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinRegion.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinRegion.java deleted file mode 100644 index 5c5d1dccc0..0000000000 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinRegion.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * YeongKyoon Lee - * HyunJun Son - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributors: - * - S-Core Co., Ltd - * - */ - -package org.tizen.emulator.skin.util; - -/** - * - * - */ -public class SkinRegion { - public int x; - public int y; - public int width; - public int height; - - public SkinRegion( int x, int y, int width, int height ) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } - -} diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinUtil.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinUtil.java index 308584cc59..1dc21707c0 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinUtil.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinUtil.java @@ -175,7 +175,8 @@ public class SkinUtil { HWKey hwKey = new HWKey( eventInfo.getKeyName(), eventInfo.getKeyCode(), - new SkinRegion(scaledX, scaledY, scaledWidth, scaledHeight), + new HWKeyRegion(scaledX, scaledY, scaledWidth, scaledHeight, + keyEntry.getRegion().isUpdate()), keyEntry.getTooltip()); return hwKey; diff --git a/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd b/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd index 0c88f58794..fdf541e3b6 100644 --- a/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd +++ b/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd @@ -78,6 +78,7 @@ xmlns:dbi="http://www.tizen.org/emulator/skin/dbi" elementFormDefault="qualified +