2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "image_res.edc"
19 #include "vp_font.edc"
21 #define CONTROL_BUTTON_PRESS_PART(_name_ , _w_ , _h_ , _align_x_ , _align_y_ , _rel_x1_ , _rel_x2_ , _rel_y1_, _rel_y2_ , _img_def_ , _img_press_ ) \
28 state: "default" 0.0; \
32 align: _align_x_ _align_y_; \
33 rel1 { relative: _rel_x1_ _rel_y1_; } \
34 rel2 { relative: _rel_x2_ _rel_y2_; } \
35 image { normal: _img_def_; border: 4 4 0 0;} \
36 color: 255 255 255 255; \
39 state: "pressed" 0.0; \
43 align: _align_x_ _align_y_; \
44 rel1 { relative: _rel_x1_ _rel_y1_; } \
45 rel2 { relative: _rel_x2_ _rel_y2_; } \
46 image { normal: _img_press_; border: 4 4 0 0;} \
47 color: 255 255 255 255; \
51 inherit: "default" 0.0; \
54 } /* CONTROL_BUTTON_PRESS_PART */
57 #define CONTROL_BUTTON_PROG(_item_name_) \
59 name: _item_name_".pressed"; \
60 source: _item_name_; \
61 signal: "mouse,down,1"; \
62 action: STATE_SET "pressed" 0.0; \
63 target: _item_name_; \
64 after: "send."_item_name_".down.signal"; \
67 name: _item_name_".clicked"; \
68 source: _item_name_; \
69 signal: "mouse,up,1"; \
70 action: STATE_SET "default" 0.0; \
71 target: _item_name_; \
72 after: "send."_item_name_".up.signal"; \
75 name: "send."_item_name_".down.signal"; \
76 action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_; \
79 name: "send."_item_name_".up.signal"; \
80 action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_; \
81 } /* CONTROL_BUTTON_PROG */
89 public val_screensize_check = 0; /* 0: reduce, 1: full */
91 public change_screensize() {
92 if(get_int(val_screensize_check) == 0) {
93 set_int(val_screensize_check, 1);
94 set_state(PART:"option.screensize", "reduce", 0.0);
95 run_program(PROGRAM:"send.screensize.expand");
97 set_int(val_screensize_check, 0);
98 set_state(PART:"option.screensize", "default", 0.0);
99 run_program(PROGRAM:"send.screensize.normal");
112 state: "default" 0.0;
113 rel1 { relative: 0.0 0.0;}
114 rel2 { relative: 1.0 1.0;}
115 color: 255 255 255 0;
119 CONTROL_BUTTON_PRESS_PART("option.screensize.button.bg", 74 ,74, 0.0, 0.0, 0.05, 0.05, 0.114, 0.114, "T01_controller_btn.png" , "T01_controller_btn_press.png");
121 name: "option.screensize";
126 state: "default" 0.0;
131 rel1 { relative: 0.05 0.114; }
132 rel2 { relative: 0.05 0.114; }
133 image { normal: "T01_control_icon_fullscreen.png"; }
134 color: 255 255 255 255;
138 inherit: "default" 0.0;
140 image { normal: "T01_control_icon_reduce.png"; }
144 inherit: "default" 0.0;
149 CONTROL_BUTTON_PRESS_PART("option.detail.button.bg", 74 ,74, 1.0, 0.0, 0.95, 0.95, 0.114, 0.114, "T01_controller_btn.png" , "T01_controller_btn_press.png");
151 name: "option.detail";
156 state: "default" 0.0;
161 rel1 { relative: 0.95 0.114; }
162 rel2 { relative: 0.95 0.114; }
163 image { normal: "T01_control_icon_detail.png"; }
164 color: 255 255 255 255;
168 inherit: "default" 0.0;
174 CONTROL_BUTTON_PROG("option.screensize");
175 CONTROL_BUTTON_PROG("option.detail");
178 signal: "signal.option.screensize.down";
180 action: STATE_SET "pressed" 0.0;
181 target: "option.screensize.button.bg";
185 signal: "signal.option.screensize.up";
187 action: STATE_SET "hide" 0.0;
188 target: "option.screensize.button.bg";
189 after: "option.screensize.change";
193 name: "option.screensize.change";
194 script: { change_screensize(); }
198 name: "send.screensize.normal";
199 action: SIGNAL_EMIT "signal.option.screensize.normal" "option.screensize";
203 name: "send.screensize.expand";
204 action: SIGNAL_EMIT "signal.option.screensize.expand" "option.screensize";
208 signal: "signal.option.detail.down";
210 action: STATE_SET "pressed" 0.0;
211 target: "option.detail.button.bg";
215 signal: "signal.option.detail.up";
217 action: STATE_SET "hide" 0.0;
218 target: "option.detail.button.bg";
222 signal: "signal.option.mode.streaming";
224 action: STATE_SET "hide" 0.0;
225 target: "option.detail";
226 target: "option.detail.button.bg";