Update camera code
[apps/core/preloaded/camera.git] / edc / cam_recording_edje_vertical_inverse.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
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
7  *
8  *        http://www.tizenopensource.org/license
9  *
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.
15  */
16
17
18
19 #include "cam_recording_edje_vertical_inverse_inc.edc"
20
21 collections {
22         group {
23                 name: "recording_layout";
24                 min: MAIN_H MAIN_W;
25
26                 parts {
27                         part {
28                                 name: RECORDING_IMAGE;
29                                 type: IMAGE;
30                                 description {
31                                         state: "default" 0.0;
32                                         rel1 { relative: RECORDING_IMAGE_X/VER_MAIN_W RECORDING_IMAGE_Y/VER_MAIN_H; }
33                                         rel2 { relative: (RECORDING_IMAGE_X+RECORDING_IMAGE_W)/VER_MAIN_W (RECORDING_IMAGE_Y+RECORDING_IMAGE_H)/VER_MAIN_H; }
34                                 }
35                                 description {
36                                         state: "rec" 0.0;
37                                         inherit: "default" 0.0;
38                                         image { normal: RECORDING_IMAGE_REC_IMAGE; }
39                                 }
40                                 description {
41                                         state: "rec1" 0.0;
42                                         inherit: "default" 0.0;
43                                         image { normal: RECORDING_IMAGE_REC_IMAGE; }
44                                 }
45                                 description {
46                                         state: "invisible" 0.0;
47                                         inherit: "default" 0.0;
48                                         visible: 0;
49                                 }
50                         }
51
52                         part {
53                                 name: RECORDING_TEXT;
54                                 type: TEXT;
55                                 scale: 1;
56                                 description {
57                                         state: "default" 0.0;
58                                         rel1 { relative: RECORDING_TEXT_X/VER_MAIN_W RECORDING_TEXT_Y/VER_MAIN_H; }
59                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
60                                         color: FONT_COLOR;
61                                         text {
62                                                 font : FONT_NAME;
63                                                 size : 35;
64                                                 align: 0.0 0.0;
65                                         }
66                                 }
67                                 description {
68                                         state: "invisible" 0.0;
69                                         inherit: "default" 0.0;
70                                         visible: 0;
71                                 }
72                         }
73
74                         part {
75                                 name: RECORDING_LEFT_TEXT;
76                                 type: TEXT;
77                                 scale: 1;
78                                 description {
79                                         state: "default" 0.0;
80                                         rel1 { relative: 0.0 0.0; }
81                                         rel2 { relative: (1 - RECORDING_LEFT_TEXT_X/VER_MAIN_W) (1 - RECORDING_LEFT_TEXT_Y/VER_MAIN_H); offset: -1 -1; }
82                                         color: FONT_COLOR;
83                                         text {
84                                                 font : FONT_NAME;
85                                                 size : 35;
86                                                 align: 0.0 0.0;
87                                         }
88                                 }
89                                 description {
90                                         state: "invisible" 0.0;
91                                         inherit:  "default" 0.0;
92                                         visible : 0;
93                                 }
94                         }
95
96                         part { name: RECORDING_STOP_BUTTON;
97                                 type: IMAGE;
98                                 mouse_events: 1;
99                                 description {
100                                         state: "default" 0.0;
101                                         rel1 { relative: (1 - (RECBTN_X+RECBTN_W)/(VER_MAIN_W)) (1 - (RECBTN_Y+RECBTN_H)/(VER_MAIN_H)); offset: 0 0; }
102                                         rel2 { relative: (1 - (RECBTN_X)/(VER_MAIN_W)) (1 - (RECBTN_Y)/(VER_MAIN_H)); offset: -1 -1; }
103                                         image { normal: SHUTTER_REC_NORMAL_VERTICAL_IMAGE; }
104                                 }
105                                 description {
106                                         state: "rec" 0.0;
107                                         inherit:  "default" 0.0;
108                                         image { normal: SHUTTER_REC_NORMAL_VERTICAL_IMAGE; }
109                                 }
110                                 description {
111                                         state: "rec1" 0.0;
112                                         inherit:  "default" 0.0;
113                                         image { normal: RECORDING_PRESS_IMAGE_ANI_VER ; }
114                                 }
115                                 description {
116                                         state: "press" 0.0;
117                                         inherit:  "default" 0.0;
118                                         image { normal: SHUTTER_REC_PRESS_VERTICAL_IMAGE ; }
119                                 }
120                         }
121
122                         part { name: "progressbar";
123                                 type: SWALLOW;
124                                 description {
125                                         state: "default" 0.0;
126                                         fixed:1 1;
127                                         rel1 { relative: PROGRESS_BAR_X/VER_MAIN_W PROGRESS_BAR_Y/VER_MAIN_H; }
128                                         rel2 { relative: (PROGRESS_BAR_X+PROGRESS_BAR_W)/VER_MAIN_W (PROGRESS_BAR_Y+PROGRESS_BAR_H)/VER_MAIN_H; }
129                                 }
130                         }
131
132                         part {
133                                 name: "progressbar_text";
134                                 type: TEXT;
135                                 scale: 1;
136                                 description {
137                                          state: "default" 0.0;
138                                         rel1 { relative: 1.0 (-20)/PROGRESS_BAR_H; to: "progressbar"; }
139                                          rel2 { relative: (1.0+90/PROGRESS_BAR_W) (1.0+20/PROGRESS_BAR_H); to: "progressbar"; }
140                                          color: FONT_COLOR;
141                                         text {
142                                                   font : FONT_NAME;
143                                                   size : 28;
144                                                   align: 0.5 0.5;
145                                         }
146                                 }
147                         }
148
149                         part{
150                                 name: "file_size_text";
151                                 type: TEXT;
152                                 scale: 1;
153                                 description{
154                                         state: "default" 0.0;
155                                          rel1 { relative: (0.0-100/PROGRESS_BAR_W) (-20)/PROGRESS_BAR_H; to: "progressbar"; }
156                                          rel2 { relative: (0.0-10/PROGRESS_BAR_W) (1.0+20/PROGRESS_BAR_H); to: "progressbar"; }
157                                         color: FONT_COLOR;
158                                         text {
159                                                 font : FONT_NAME;
160                                                 size : 28;
161                                                 align : 1.0 0.5;
162                                         }
163                                 }
164                         }
165                 }
166
167                 programs {
168
169                         program {
170                                 name: "recording_stop_button,clicked";
171                                 signal: "mouse,clicked,1";
172                                 source: "recording_stop_button";
173                                 script {
174                                         emit( REC_STOP_SIG, REC_SIG_SRC );
175                                 }
176                         }
177
178 #ifdef NEW_RECORDING_LAYOUT
179
180                         program { name: "set_rec_state";
181                                 source: "program";
182                                 signal: "state,rec";
183                                 script {
184                                         set_state(PART:RECORDING_IMAGE, "rec", 0.0);
185                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
186                                         //set_state(PART:REC_REC, "invisible", 0.0);
187                                         //set_state(PART:REC_STOP, "default", 0.0);
188                                         //set_state(PART:REC_PAUSE, "default", 0.0);
189                                 }
190                         }
191                         program { name: "set_rec_state1";
192                                 source: "program";
193                                 signal: "state,rec1";
194                                 script {
195                                         set_state(PART:RECORDING_IMAGE, "rec1", 0.0);
196                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
197                                         //set_state(PART:REC_REC, "invisible", 0.0);
198                                         //set_state(PART:REC_STOP, "default", 0.0);
199                                         //set_state(PART:REC_PAUSE, "default", 0.0);
200                                 }
201                         }
202                         program { name: "set_pause_state";
203                                 source: "program";
204                                 signal: "state,pause";
205                                 script {
206                                         set_state(PART:RECORDING_IMAGE, "pause", 0.0);
207                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
208                                         //set_state(PART:REC_REC, "default", 0.0);
209                                         //set_state(PART:REC_STOP, "invisible", 0.0);
210                                         //set_state(PART:REC_PAUSE, "dim", 0.0);
211                                 }
212                         }
213
214 #else
215
216                         program { name: "set_rec_state";
217                                 source: "program";
218                                 signal: "state,rec";
219                                 script {
220                                         set_state(PART:RECORDING_IMAGE, "rec", 0.0);
221                                         set_state(PART:RECORDING_STOP_BUTTON, "rec",0.0);
222                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
223                                         //set_state(PART:REC_PAUSE, "default", 0.0);
224                                         //set_state(PART:REC_REC, "invisible", 0.0);
225                                 }
226                         }
227                         program { name: "set_rec_state1";
228                                 source: "program";
229                                 signal: "state,rec1";
230                                 script {
231                                         set_state(PART:RECORDING_IMAGE, "rec1", 0.0);
232                                         set_state(PART:RECORDING_STOP_BUTTON, "rec1",0.0);
233                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
234                                         //set_state(PART:REC_PAUSE, "default", 0.0);
235                                         //set_state(PART:REC_REC, "invisible", 0.0);
236                                 }
237                         }
238                         program { name: "set_pause_state";
239                                 source: "program";
240                                 signal: "state,pause";
241                                 script {
242                                         set_state(PART:RECORDING_IMAGE, "pause", 0.0);
243                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
244                                         //set_state(PART:REC_PAUSE, "invisible", 0.0);
245                                         //set_state(PART:REC_REC, "default", 0.0);
246                                 }
247                         }
248                         program{ name : "set_press";
249                                 signal : "mouse,down,1";
250                                 source: RECORDING_STOP_BUTTON;
251                                 action: STATE_SET "press" 0.0;
252                                 target: RECORDING_STOP_BUTTON;
253                         }
254 #endif
255
256                         program { name: "hide_indicator";
257                                 source: "program";
258                                 signal: "indicator,hide";
259                                 script {
260                                         set_state(PART:RECORDING_IMAGE, "invisible", 0.0);
261                                         set_state(PART:RECORDING_TEXT, "invisible", 0.0);
262                                 }
263                         }
264                         program { name: "show_indicator";
265                                 source: "program";
266                                 signal: "indicator,show";
267                                 script {
268                                         set_state(PART:RECORDING_IMAGE, "pause", 0.0);
269                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
270                                 }
271                         }
272                 }
273         }
274 }
275 //endfile
276