86886849450b452f3134006fa6b340d75a8f600b
[apps/core/preloaded/ug-camera-efl.git] / edc / cam_main_layout.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://floralicense.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 #include "cam_funcs.edc"
19 #include "../include/edc_image_name.h"
20
21 collections {
22         group {
23                 name: "main_layout";
24                 parts {
25                         part { name: "transparent_layout";
26                                 type: SWALLOW;
27                                 scale: 1;
28                                 description { state: "default" 0.0; }
29                         }
30                         part { name: "guideline_layout";
31                                 type: SWALLOW;
32                                 scale: 1;
33                                 description { state: "default" 0.0; }
34                         }
35                         part { name: "shot_guide_popup_layout";
36                                 type: SWALLOW;
37                                 scale: 1;
38                                 description { state: "default" 0.0; }
39                         }
40                         part { name: "indicator_layout";
41                                 type: SWALLOW;
42                                 scale: 1;
43                                 description { state: "default" 0.0; }
44                         }
45                         part { name: "recording_layout";
46                                 type: SWALLOW;
47                                 scale: 1;
48                                 description { state: "default" 0.0; }
49                         }
50                         part { name: "mouse_event_layer";
51                                 type: RECT;
52                                 mouse_events: 1;
53                                 description {
54                                         state: "default" 0.0;
55                                         rel1 { relative: 0.0 0.0; offset: 0 0; }
56                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
57                                         color : 0 0 0 0;
58                                 }
59                         }
60                         part { name: "timer_layout";
61                                 type: SWALLOW;
62                                 scale: 1;
63                                 description { state: "default" 0.0; }
64                         }
65                         part { name: "best_photo_thumbnail_layout";
66                                 type: SWALLOW;
67                                 scale: 1;
68                                 description { state: "default" 0.0; }
69                         }
70                         part { name: "progressbar_layout";
71                                 type: SWALLOW;
72                                 scale: 1;
73                                 description { state: "default" 0.0; }
74                         }
75                         part { name: "progress_popup_layout";
76                                 type: SWALLOW;
77                                 scale: 1;
78                                 description { state: "default" 0.0; }
79                         }
80                         part { name: "tip_popup_layout";
81                                 type: SWALLOW;
82                                 scale: 1;
83                                 description { state: "default" 0.0; }
84                         }
85                         part { name: "pinch_layout";
86                                 type: SWALLOW;
87                                 scale: 1;
88                                 description { state: "default" 0.0; }
89                         }
90                         part { name: "zoom_layout";
91                                 type: SWALLOW;
92                                 scale: 1;
93                                 description { state: "default" 0.0; }
94                         }
95                         part { name: "ev_layout";
96                                 type: SWALLOW;
97                                 scale: 1;
98                                 description { state: "default" 0.0; }
99                         }
100                         part { name: "toolbar_layout";
101                                 type: SWALLOW;
102                                 scale: 1;
103                                 description { state: "default" 0.0; }
104                         }
105                 }
106         }
107
108 #include "cam_guideline_edje.edc"
109
110         group {
111                 name: "progressbar";
112                 min: MAIN_W MAIN_H;
113
114                 parts {
115
116 #define PROGRESS_BAR_X 320
117 #define PROGRESS_BAR_Y 657
118 #define PROGRESS_BAR_W 639
119 #define PROGRESS_BAR_H 20
120
121                         part {
122                                 name: "progressbar";
123                                 type: SWALLOW;
124                                 description {
125                                         state: "default" 0.0;
126                                         fixed:1 1;
127                                         visible: 0;
128                                         rel1 { relative: PROGRESS_BAR_X/MAIN_W PROGRESS_BAR_Y/MAIN_H; }
129                                         rel2 { relative: (PROGRESS_BAR_X+PROGRESS_BAR_W)/MAIN_W (PROGRESS_BAR_Y+PROGRESS_BAR_H)/MAIN_H; }
130                                 }
131
132                                 description {
133                                         state: "landscape" 0.0;
134                                         fixed:1 1;
135                                         visible: 1;
136                                         rel1 { relative: PROGRESS_BAR_X/MAIN_W PROGRESS_BAR_Y/MAIN_H; }
137                                         rel2 { relative: (PROGRESS_BAR_X+PROGRESS_BAR_W)/MAIN_W (PROGRESS_BAR_Y+PROGRESS_BAR_H)/MAIN_H; }
138                                 }
139
140                                 description {
141                                         state: "vertical" 0.0;
142                                         fixed:1 1;
143                                         visible: 1;
144                                         rel1 { relative: PROGRESS_BAR_X/MAIN_W (PROGRESS_BAR_Y - 60)/MAIN_H; }
145                                         rel2 { relative: (PROGRESS_BAR_X+PROGRESS_BAR_W)/MAIN_W (PROGRESS_BAR_Y+PROGRESS_BAR_H - 60)/MAIN_H; }
146                                 }
147                         }
148
149                         part {
150                                 name: "progressbar_text";
151                                 type: TEXT;
152                                 scale: 1;
153                                 description {
154                                         state: "default" 0.0;
155                                         rel1 { relative: 1.0 (-20)/PROGRESS_BAR_H; to: "progressbar"; }
156                                         rel2 { relative: (1.0+90/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: 0.5 0.5;
162                                         }
163                                 }
164                                 description {
165                                         state: "vertical" 0.0;
166                                         rel1 { relative: 1.0 (-20)/PROGRESS_BAR_H; to: "progressbar"; }
167                                         rel2 { relative: (1.0+90/PROGRESS_BAR_W*MAIN_W/MAIN_H) (1.0+20/PROGRESS_BAR_H); to: "progressbar"; }
168                                         color: FONT_COLOR;
169                                         text {
170                                                 font : FONT_NAME;
171                                                 size : 28;
172                                                 align: 0.5 0.5;
173                                         }
174                                 }
175                         }
176
177                 }
178                 programs {
179                         program {
180                                 name: "progressbar,default";
181                                 source: "prog";
182                                 signal: "progressbar,default";
183                                 script: {
184                                         set_state(PART:"progressbar", "landscape", 0.0);
185                                         set_state(PART:"progressbar_text", "default", 0.0);
186                                 }
187                         }
188                         program {
189                                 name: "progressbar,vertical";
190                                 source: "prog";
191                                 signal: "progressbar,vertical";
192                                 script: {
193                                         set_state(PART:"progressbar", "vertical", 0.0);
194                                         set_state(PART:"progressbar_text", "vertical", 0.0);
195                                 }
196                         }
197                 }
198         }
199
200         group {
201                 name: "shutter_image";
202                 min: MAIN_W MAIN_H;
203
204                 parts {
205                         part {
206                                 name: "camera_image_bg";
207                                 type: RECT;
208                                 description {
209                                         state: "default" 0.0;
210                                         rel1 { relative: 0.0 0.0; offset: 0 0; }
211                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
212                                         color : 0 0 0 0;
213                                 }
214                                 description {
215                                         state: "gray" 0.0;
216                                         rel1 { relative: 0.0 0.0; offset: 0 0; }
217                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
218                                         color : 0 0 0 180;
219                                 }
220                         }
221                         part {
222                                 name: "up_part";
223                                 type: RECT;
224                                 description {
225                                         state: "default" 0.0;
226                                         rel1 { relative: 0.0 0.0; offset: 0 0; to : "camera_image_bg"; }
227                                         rel2 { relative: 1.0 0.0; offset: -1 0; to : "camera_image_bg"; }
228                                         color : 0 0 0 255;
229 //                                      visible: 1;
230                                 }
231                                 description {
232                                         state: "middle" 0.0;
233                                         rel1 { relative: 0.0 0.0; offset: 0 0; to : "camera_image_bg"; }
234                                         rel2 { relative: 1.0 0.5; offset: -1 -1; to : "camera_image_bg"; }
235                                         color : 0 0 0 255;
236 //                                      visible: 0;
237                                 }
238                         }
239
240                         part { name: "down_part";
241                                 type: RECT;
242                                 description {
243                                         state: "default" 0.0;
244                                         rel1 { relative: 0.0 1.0; offset: 0 -1; to : "camera_image_bg"; }
245                                         rel2 { relative: 1.0 1.0; offset: -1 -1; to : "camera_image_bg"; }
246                                         color : 0 0 0 255;
247 //                                      visible: 1;
248                                 }
249                                 description {
250                                         state: "middle" 0.0;
251                                         rel1 { relative: 0.0 0.5; offset: 0 -1; to : "camera_image_bg"; }
252                                         rel2 { relative: 1.0 1.0; offset: -1 -1; to : "camera_image_bg"; }
253                                         color : 0 0 0 255;
254 //                                      visible: 0;
255                                 }
256                         }
257                 }
258
259                 programs {
260                         program {
261                                 name: "close";
262                                 signal: "start_animation";
263                                 source: "*";
264                                 action: STATE_SET "middle" 0.0;
265                                 target: "up_part" ;
266                                 target: "down_part" ;
267                                 transition: ACCELERATE 0.25;
268                                 after: "open";
269                         }
270                         program {
271                                 name: "open";
272                                 signal: "open";
273                                 source: "*";
274                                 action: STATE_SET "default" 0.0;
275                                 target: "up_part" ;
276                                 target: "down_part" ;
277                                 transition: DECELERATE 0.25;
278                         }
279                         program {
280                                 name: "dim";
281                                 signal: "dim";
282                                 source: "*";
283                                 action: STATE_SET "gray" 0.0;
284                                 target: "camera_image_bg" ;
285                         }
286
287                         program {
288                                 name: "bright";
289                                 signal: "bright";
290                                 source: "*";
291                                 action: STATE_SET "default" 0.0;
292                                 target: "camera_image_bg" ;
293                                 transition: DECELERATE 0.2;
294                                 after: "animation_finish";
295                         }
296                         program {
297                                 name: "animation_finish";
298                                 signal: "animation_finish";
299                                 source: "*";
300                                 action: SIGNAL_EMIT "animation_finish" "*";
301                         }
302                 }
303         }
304
305         group {
306                 name: "shutter_rect";
307                 min: MAIN_W MAIN_H;
308
309                 parts {
310                         part {
311                                 name: "shutter_rect_bg";
312                                 type: RECT;
313                                 scale: 1;
314                                 description {
315                                         state: "default" 0.0;
316                                         rel1 { relative: 0.0 0.0;}
317                                         rel2 { relative: 1.0 1.0;}
318                                         color : 0 0 0 0;
319                                 }
320                                 description {
321                                         state: "gray" 0.0;
322                                         rel1 { relative: 0.0 0.0;}
323                                         rel2 { relative: 1.0 1.0;}
324                                         color : 0 0 0 180;
325                                 }
326                         }
327
328                         part {
329                                 name: "point_0";
330                                 type: RECT;
331                                 scale: 1;
332                                 description {
333                                         state: "default" 0.0;
334                                         min: 1 1;
335                                         max: 1 1;
336                                         fixed: 1 1;
337                                         align: 0.0 0.0;
338                                         rel1 { relative: 0.0 0.0; to : "shutter_rect_bg"; }
339                                         rel2 { relative: 0.0 0.0; to : "shutter_rect_bg"; }
340                                         color : 255 255 255 0;
341                                         visible: 0;
342                                 }
343                                 description {
344                                         state: "end" 0.0;
345                                         inherit: "default" 0.0;
346                                         min: 15 15;
347                                         max: 15 15;
348                                         fixed: 1 1;
349                                 }
350                         }
351                         part {
352                                 name: "point_1";
353                                 type: RECT;
354                                 scale: 1;
355                                 description {
356                                         state: "default" 0.0;
357                                         min: 1 1;
358                                         max: 1 1;
359                                         fixed: 1 1;
360                                         align: 1.0 0.0;
361                                         rel1 { relative: 1.0 0.0; to : "shutter_rect_bg"; }
362                                         rel2 { relative: 1.0 0.0; to : "shutter_rect_bg"; }
363                                         color : 255 255 255 0;
364                                         visible: 0;
365                                 }
366                                 description {
367                                         state: "end" 0.0;
368                                         inherit: "default" 0.0;
369                                         min: 15 15;
370                                         max: 15 15;
371                                         fixed: 1 1;
372                                 }
373                         }
374                         part {
375                                 name: "point_2";
376                                 type: RECT;
377                                 scale: 1;
378                                 description {
379                                         state: "default" 0.0;
380                                         min: 1 1;
381                                         max: 1 1;
382                                         fixed: 1 1;
383                                         align: 1.0 1.0;
384                                         rel1 { relative: 1.0 1.0; to : "shutter_rect_bg"; }
385                                         rel2 { relative: 1.0 1.0; to : "shutter_rect_bg"; }
386                                         color : 255 255 255 0;
387                                         visible: 0;
388                                 }
389                                 description {
390                                         state: "end" 0.0;
391                                         inherit: "default" 0.0;
392                                         min: 15 15;
393                                         max: 15 15;
394                                         fixed: 1 1;
395                                 }
396                         }
397                         part {
398                                 name: "point_3";
399                                 type: RECT;
400                                 scale: 1;
401                                 description {
402                                         state: "default" 0.0;
403                                         min: 1 1;
404                                         max: 1 1;
405                                         fixed: 1 1;
406                                         align: 0.0 1.0;
407                                         rel1 { relative: 0.0 1.0; to : "shutter_rect_bg"; }
408                                         rel2 { relative: 0.0 1.0; to : "shutter_rect_bg"; }
409                                         color : 255 255 255 0;
410                                         visible: 0;
411                                 }
412                                 description {
413                                         state: "end" 0.0;
414                                         inherit: "default" 0.0;
415                                         min: 15 15;
416                                         max: 15 15;
417                                         fixed: 1 1;
418                                 }
419                         }
420
421                         part {
422                                 name: "top";
423                                 type: RECT;
424                                 scale: 1;
425                                 description {
426                                         state: "default" 0.0;
427                                         rel1 { relative: 0.0 0.0; offset: 0 0; to_x : "point_0"; to_y : "point_0";}
428                                         rel2 { relative: 0.0 1.0; offset: 0 0; to_x : "point_1"; to_y : "point_1";}
429                                         color : 255 255 255 200;
430                                         visible: 1;
431                                 }
432                         }
433
434                         part {
435                                 name: "right";
436                                 type: RECT;
437                                 scale: 1;
438                                 description {
439                                         state: "default" 0.0;
440                                         rel1 { relative: 0.0 0.0; offset: 1 0; to_x : "point_1"; to_y : "point_1";}
441                                         rel2 { relative: 1.0 1.0; offset: 0 0; to_x : "point_2"; to_y : "point_2";}
442                                         color : 255 255 255 200;
443                                         visible: 1;
444                                 }
445                         }
446
447                         part {
448                                 name: "bottom";
449                                 type: RECT;
450                                 scale: 1;
451                                 description {
452                                         state: "default" 0.0;
453                                         rel1 { relative: 0.0 0.0; offset: 0 0; to_x : "point_3"; to_y : "point_3";}
454                                         rel2 { relative: 0.0 1.0; offset: 0 0; to_x : "point_2"; to_y : "point_2";}
455                                         color : 255 255 255 200;
456                                         visible: 1;
457                                 }
458                         }
459                         part {
460                                 name: "left";
461                                 type: RECT;
462                                 scale: 1;
463                                 description {
464                                         state: "default" 0.0;
465                                         rel1 { relative: 0.0 1.0; offset: 0 1; to_x : "point_0"; to_y : "point_0";}
466                                         rel2 { relative: 1.0 0.0; offset: 0 -1; to_x : "point_3"; to_y : "point_3";}
467                                         color : 255 255 255 200;
468                                         visible: 1;
469                                 }
470                         }
471                 }
472
473                 programs {
474                         program {
475                                 name: "shutter_rect,start";
476                                 signal: "shutter_rect,start";
477                                 source: "prog";
478                                 action: STATE_SET "end" 0.0;
479                                 target: "point_0";
480                                 target: "point_1";
481                                 target: "point_2";
482                                 target: "point_3";
483                                 transition: DECELERATE 0.20;
484                                 after: "shutter_rect,finish";
485                         }
486                         program {
487                                 name: "shutter_rect,finish";
488                                 signal: "shutter_rect,finish";
489                                 source: "*";
490                                 action: SIGNAL_EMIT "shutter_rect,finish" "*";
491                         }
492                 }
493         }
494 }
495
496