APPLY_RSA
[apps/home/calculator.git] / edc / Inc.calculator.main.edc
index ba7ecab..89a4e12 100644 (file)
@@ -1,93 +1,87 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-#define PADDING_TOP_POR         60
-#define PADDING_BOTTOM_POR       50
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#define PADDING_TOP_POR         24
+#define PADDING_BOTTOM_POR       12
 #define PADDING_LEFT_POR        24
 #define PADDING_RIGHT_POR       24
 
+#define PADDING_TOP_LAN         13
+#define PADDING_BOTTOM_LAN       3
+#define PADDING_LEFT_LAN        42
+#define PADDING_RIGHT_LAN       42
 
 group {
     name: "main";
 
     script {
+        public pannel_state;
         public result_show;
     }
 
     parts {
         /* background */
-        //EDC_PART_BG("bg")
-        part {
-               name: "head";
+           part {
+               name: "bg";
                type: RECT;
                mouse_events: 0;
                description {
                    state: "default" 0.0;
                    rel1 { relative: 0.0 0.0;}
-                   rel2 { relative: 1.0 50/1280;}
-                   color: 0 0 0 255;
+                   rel2 { relative: 1.0 (1.0+1.0/1280);}
+                   color:50 50 50 255;
                }
                description {
-                   state: "default" 0.0;
+                   state: "landscape" 0.0;
+                   inherit: "default" 0.0;
                    rel1 { relative: 0.0 0.0;}
-                   rel2 { relative: 0.0 0.0;}
-                   color: 0 0 0 255;
+                   rel2 { relative: 1.0 (1.0+1.0/720);}
+                  color:50 50 50 255;
                }
            }
-           part {
-               name: "bg";
-               type: RECT;
-               mouse_events: 0;
-               description {
-                   state: "default" 0.0;
-                   rel1 { relative: 0.0 50/1280;}
-                   rel2 { relative: 1.0 (1.0+1.0/1280);}
-                   color: 0 0 0 0;
-               }
-           }
-        //EDC_PART_IMAGE("bg_img", "bg", EDC_IMAGE("images/59_calculator_bg.png")) /* DON'T REMOVE */
-        EDC_PART_IMAGE("bg_img", "bg", EDC_IMAGE("images/P04_calculator_bg.png"))
-
-        EDC_PART_PADDING_BR("entry_img_pad_br_por", EDC_SIZE(PADDING_RIGHT_POR, 0), "bg")
 
         /* Input Entry */
         part {
             name: "entry/rect";
-            type: IMAGE;
+            type: RECT;
             mouse_events: 1;
             scale: 1;
 
             description {
                 state: "default" 0.0;
-                visible: 1;
-                min: 0 252;
-                fixed: 0 1;
-                align: 0.5 0;
-                rel1 {relative: 24/720 110/1280;}
-                rel2 {relative: (720-24)/720 (50+60+252)/1280;}
-                image {
-                    normal: "images/P04_calculator_input_bg.png";
-                    border: 24 24 79 24;
-                    border_scale: 1;
-                }
+                rel1 {relative: 0.0 0.0; to:"bg";}
+                rel2 {relative: 1.0 (24+300+13)/(1280-50-114); to:"bg";}
+                color:50 50 50 255;
+            }
+
+            description {
+                state: "landscape" 0.0;
+                inherit: "default" 0.0;
+                min: 0 144;
+                rel1 {relative: 0.0 0.0; to:"bg";}
+                rel2 {relative: 1.0 (0+187)/(720-95-50);  to:"bg";}
             }
         }
 
-        EDC_PART_PADDING_TL("entry_swl_pad_tl_por", EDC_SIZE(32, 38), "entry/rect")
-        EDC_PART_PADDING_BR("entry_swl_pad_br_por", EDC_SIZE(32, 46), "entry/rect")
+        EDC_PART_PADDING_TL("entry_swl_pad_tl_por", EDC_SIZE(32, 24), "entry/rect")
+        EDC_PART_PADDING_BR("entry_swl_pad_br_por", EDC_SIZE(0, 13), "entry/rect")
+        EDC_PART_PADDING_TL("entry_swl_pad_tl_lan", EDC_SIZE(52, 32), "entry/rect")
+        EDC_PART_PADDING_BR("entry_swl_pad_br_lan", EDC_SIZE(20, 47), "entry/rect")
 
         part {
             name: "input/entry";
@@ -99,96 +93,63 @@ group {
                 rel1 {relative: 1.0 1.0; to: "entry_swl_pad_tl_por";}
                 rel2 {relative: 0.0 0.0; to: "entry_swl_pad_br_por";}
             }
-        }
 
-        /* History Entry */
-        part {
-            name: "history_rect_padding_br";
-            type: RECT;
-            mouse_events: 0;
             description {
-                state: "default" 0.0;
-                rel1 {relative: 24/720 (1280-61)/1280;}
-                rel2 {relative: (720-24)/720 1.0;}
-                color: 0 0 0 0;
+                state: "landscape" 0.0;
+                rel1 {relative: 1.0 1.0; to: "entry_swl_pad_tl_lan";}
+                rel2 {relative: 0.0 0.0; to: "entry_swl_pad_br_lan";}
             }
         }
+
+
         part {
             name: "history/rect";
-            type: IMAGE;
+            type: RECT;
             mouse_events: 0;
             description {
                 state: "default" 0.0;
                 visible: 0;
-                rel1 { relative: 0.0 0.0; to: "entry/rect";}
-                rel2 {
-                    relative: 1.0 0.0;
-                    to_x: "entry/rect";
-                    to_y: "history_rect_padding_br";
-                }
-                image {
-                    normal: "images/P04_calculator_input_bg.png";
-                    border: 24 24 79 24;
-                    border_scale: 1;
-                }
+                rel1 {relative:1.0 1.0; to: "bg";}
+                rel2 {relative:1.0 1.0; to: "bg";}
             }
-           description {
+            description {
                 state: "show" 0.0;
-                inherit: "default" 0.0;
                 visible: 1;
-                image {
-                    normal: "images/P04_calculator_input_bg_02.png";
-                    border: 24 24 79 24;
-                    border_scale: 1;
-                }
+                rel1 {relative:0.0 0.0; to: "bg";}
+                rel2 {relative:1.0 1.0; to: "bg";}
+                color: 50 50 50 255;
             }
         }
 
-        EDC_PART_RECT_PADDING("history/rect2", "history/rect",
-           EDC_COOR(32, 32), EDC_COOR(32, 42))
-        EDC_PART_SWALLOW_HIDE_SHOW("history/scroll", "history/rect2")
 
-        /* Keypad */
-        EDC_PART_SWALLOW_SHOW_HIDE("por_pannel/rect", "bg")
-        EDC_PART_SWALLOW_SHOW_HIDE("lan_pannel/rect", "bg")
+        EDC_PART_PADDING_TL("entry_his_pad_tl_por", EDC_SIZE(32, 15), "history/rect")
+        EDC_PART_PADDING_BR("entry_his_pad_br_por", EDC_SIZE(32, 80), "history/rect")
+        EDC_PART_PADDING_TL("entry_his_pad_tl_lan", EDC_SIZE(52, 32), "history/rect")
+        EDC_PART_PADDING_BR("entry_his_pad_br_lan", EDC_SIZE(52, 0), "history/rect")
 
-        part {
-            name: "history/clear/image";
-            type: IMAGE;
+       // EDC_PART_SWALLOW_HIDE_SHOW("history/scroll", "history/rect2")
+        part {
+            name: "history/scroll";
+            type: SWALLOW;
             mouse_events: 1;
             description {
                 state: "default" 0.0;
-                visible: 0;
-
-                rel1 { relative: 0.0 0.0; to: "history/rect"; offset: 32 38;}
-                   rel2 { relative: 0.0 0.0; to: "history/rect"; offset: 96 102;}
-                image {
-                    normal: "images/P04_calculator_button_clear_dim.png";
-                   // border: 24 24 79 24;
-                   // border_scale: 1;
-                }
-            }
-            description {
-                state: "up" 0.0;
-                inherit: "default" 0.0;
                 visible: 1;
-                image {
-                    normal: "images/P04_calculator_button_clear_dim.png";
-
-                }
+                rel1 {relative: 1.0 1.0; to: "entry_his_pad_tl_por";}
+                rel2 {relative: 0.0 0.0; to: "entry_his_pad_br_por";}
             }
 
             description {
-                state: "press" 0.0;
-                inherit: "default" 0.0;
+                state: "landscape" 0.0;
                 visible: 1;
-                image {
-                    normal: "images/P04_calculator_button_clear_press.png";
-
-                }
+                rel1 {relative: 1.0 1.0; to: "entry_his_pad_tl_lan";}
+                rel2 {relative: 0.0 0.0; to: "entry_his_pad_br_lan";}
             }
         }
 
+        /* Keypad */
+        EDC_PART_SWALLOW_SHOW_HIDE("por_pannel/rect", "bg")
+        EDC_PART_SWALLOW_SHOW_HIDE("lan_pannel/rect", "bg")
     }
 
     programs {
@@ -196,6 +157,7 @@ group {
             name: "group_load";
             signal: "load";
             script {
+                set_int(pannel_state, 0);
                 set_int(result_show, 0);
             }
         }
@@ -205,10 +167,7 @@ group {
             signal: "show,hist";
             source: "";
             script {
-                set_state(PART:"history/scroll", "show", 0.0);
                 set_state(PART:"history/rect", "show", 0.0);
-                set_state(PART:"history/clear/image", "up", 0.0);
-
             }
         }
         program {
@@ -216,10 +175,22 @@ group {
             signal: "hide,hist";
             source: "";
             script {
-                set_state(PART:"history/scroll", "default", 0.0);
                 set_state(PART:"history/rect", "default", 0.0);
-                set_state(PART:"history/clear/image", "default", 0.0);
+            }
+        }
 
+        program {
+            name: "to_landscape";
+            signal: "landscape";
+            source: "";
+            script {
+                set_int(pannel_state, 1);
+                set_state(PART:"entry/rect", "landscape", 0.0);
+                set_state(PART:"input/entry", "landscape", 0.0);
+                set_state(PART:"history/scroll", "landscape", 0.0);
+                set_state(PART:"lan_pannel/rect", "default", 0.0);
+                set_state(PART:"por_pannel/rect", "hide", 0.0);
+                set_state(PART:"bg", "landscape", 0.0);
             }
         }
         program {
@@ -227,37 +198,15 @@ group {
             signal: "portrait";
             source: "";
             script {
+                set_int(pannel_state, 0);
                 set_state(PART:"entry/rect", "default", 0.0);
                 set_state(PART:"input/entry", "default", 0.0);
+                set_state(PART:"history/scroll", "default", 0.0);
                 set_state(PART:"lan_pannel/rect", "hide", 0.0);
                 set_state(PART:"por_pannel/rect", "default", 0.0);
-                set_state(PART:"bg_img", "default", 0.0);
                 set_state(PART:"bg", "default", 0.0);
-                set_state(PART:"head", "default", 0.0);
             }
         }
-
-        program {
-                       name: "clear_click";
-                       signal: "mouse,clicked,1";
-                       source: "history/clear/image";
-            action: SIGNAL_EMIT "clicked" "";
-               }
-               program {
-                       name: "clear_click1";
-                       signal: "mouse,down,1";
-                       source: "history/clear/image";
-            action: STATE_SET "press" 0.0;
-                       target: "history/clear/image";
-               }
-               program {
-                       name: "clear_click2";
-                       signal: "mouse,up,1";
-                       source: "history/clear/image";
-            action: STATE_SET "up" 0.0;
-                       target: "history/clear/image";
-               }
-
     }
 }