Flora license update
[apps/core/preloaded/ug-camera-efl.git] / edc / cam_toolbar_layout_inverse.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (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 #include "cam_toolbar_layout_inverse_inc.edc"
21 #include "cam_setting_popup_layout_inc.edc"
22
23
24 collections {
25
26         group {
27                 name: "toolbar";
28                 min: MAIN_W MAIN_H;
29
30                 parts {
31                         part {
32                                 name: "bg";
33                                 type: RECT;
34                                 mouse_events: 0;
35                                 scale: 1;
36                                 description {
37                                         state: "default" 0.0;
38                                         visible: 0;
39                                         min: MAIN_W MAIN_H;
40                                         max: MAIN_W MAIN_H;
41                                         fixed: 1 1;
42                                         rel1 { relative: 0.0 0.0;}
43                                         rel2 { relative: 1.0 1.0;}
44                                 }
45                         }
46
47                         TOOLBAR_BACKGROUND_IMAGE("left_bg", 0, 0, TOOLBAR_W, MAIN_H, RIGHT_TOOLBAR_BG_IMAGE)
48                         TOOLBAR_BACKGROUND_IMAGE("right_bg", MAIN_W-TOOLBAR_W, 0, TOOLBAR_W, MAIN_H, LEFT_TOOLBAR_BG_IMAGE)
49
50                         part { name: "popup_area";
51                                 type: SWALLOW;
52                                 mouse_events: 0;
53                                 scale: 1;
54                                 description{
55                                         state:"default" 0.0;
56                                         rel1{ relative: (1 - (MAIN_W-TOOLBAR_W)/MAIN_W) 0.0; to: "bg";}
57                                         rel2{ relative: (1 - TOOLBAR_W/MAIN_W) 1.0; to: "bg";}
58                                 }
59                         }
60
61                         part { name: "setting_popup";
62                                 type: SWALLOW;
63                                 scale: 1;
64                                 description{
65                                         state:"default" 0.0;
66                                         rel1{ relative: (1 - (MAIN_W-TOOLBAR_W)/MAIN_W) 0.0; to: "bg";}
67                                         rel2{ relative: (1 - TOOLBAR_W/MAIN_W) 1.0; to: "bg";}
68                                 }
69                         }
70
71                         part { name: "shortcuts_popup";
72                                 type: SWALLOW;
73                                 scale: 1;
74                                 description{
75                                         state:"default" 0.0;
76                                         rel1{ relative: (1 - (TOOLBAR_W+720)/MAIN_W) 0.0; to: "bg";}
77                                         rel2{ relative: (1 - TOOLBAR_W/MAIN_W) (MAIN_H-120)/MAIN_H; to: "bg";}
78                                 }
79                         }
80
81                         part { name: "shortcuts_popup_description";
82                                 type: SWALLOW;
83                                 scale: 1;
84                                 description{
85                                         state:"default" 0.0;
86                                         rel1{ relative: (1 - (TOOLBAR_W+720)/MAIN_W) (MAIN_H-120)/MAIN_H; to: "bg";}
87                                         rel2{ relative: (1 - TOOLBAR_W/MAIN_W) 1.0; to: "bg";}
88                                 }
89                         }
90
91                         TOOLBAR_ITEM_BUTTON("toolbar_0_button", TOOLBAR_0_X, TOOLBAR_0_Y)
92                         TOOLBAR_ITEM_BUTTON("toolbar_1_button", TOOLBAR_1_X, TOOLBAR_1_Y)
93                         TOOLBAR_ITEM_BUTTON("toolbar_2_button", TOOLBAR_2_X, TOOLBAR_2_Y)
94                         TOOLBAR_ITEM_BUTTON("toolbar_3_button", TOOLBAR_3_X, TOOLBAR_3_Y)
95                         TOOLBAR_ITEM_BUTTON("toolbar_4_button", TOOLBAR_4_X, TOOLBAR_4_Y)
96
97                         TOOLBAR_ITEM_SWALLOW_ICON("toolbar_0_icon", TOOLBAR_0_X, TOOLBAR_0_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H)
98                         TOOLBAR_ITEM_SWALLOW_ICON("toolbar_1_icon", TOOLBAR_1_X, TOOLBAR_1_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H)
99                         TOOLBAR_ITEM_SWALLOW_ICON("toolbar_2_icon", TOOLBAR_2_X, TOOLBAR_2_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H)
100                         TOOLBAR_ITEM_SWALLOW_ICON("toolbar_3_icon", TOOLBAR_3_X, TOOLBAR_3_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H)
101                         TOOLBAR_ITEM_SWALLOW_ICON("toolbar_4_icon", TOOLBAR_4_X, TOOLBAR_4_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H)
102
103                         TOOLBAR_ITEM_SWALLOW_BUTTON("shutter_button",           SHUTTER_X,              SHUTTER_Y,              SHUTTER_W,              SHUTTER_H)
104                         TOOLBAR_ITEM_SWALLOW_BUTTON("recording_button",         RECORDINGBTN_X, RECORDINGBTN_Y, RECORDINGBTN_W, RECORDINGBTN_H)
105                         TOOLBAR_ITEM_SWALLOW_BUTTON("recording_stop_button",REC_STOP_BTN_X, REC_STOP_BTN_Y, REC_STOP_BTN_W, REC_STOP_BTN_H)
106                         TOOLBAR_ITEM_SWALLOW_BUTTON("quickview_item",           QUICKVIEW_X,    QUICKVIEW_Y,    QUICKVIEW_W,    QUICKVIEW_H)
107                         TOOLBAR_ITEM_SWALLOW_BUTTON("backbutton_item",          BACKBTN_X,              BACKBTN_Y,              BACKBTN_W,              BACKBTN_H)
108                         TOOLBAR_ITEM_SWALLOW_BUTTON("cafbutton_item",           CAF_BUTTON_X,   CAF_BUTTON_Y,   CAF_BUTTON_W,   CAF_BUTTON_H)
109                 }/*end parts*/
110
111                 programs {
112                         program {
113                                 name: "toolbar_bg,show";
114                                 source: "prog";
115                                 signal: "toolbar_bg,show";
116                                 script: {
117                                         set_state(PART:"left_bg", "default", 0.0);
118                                         set_state(PART:"right_bg", "default", 0.0);
119                                 }
120                         }
121                         program {
122                                 name: "toolbar_bg,hide";
123                                 source: "prog";
124                                 signal: "toolbar_bg,hide";
125                                 script: {
126                                         set_state(PART:"left_bg", "hide", 0.0);
127                                         set_state(PART:"right_bg", "hide", 0.0);
128                                 }
129                         }
130                         TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_0_button", "toolbar_0_icon", "toolbar_0_press_sig", "toolbar_0_release_sig", "toolbar_0_click_sig")
131                         TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_1_button", "toolbar_1_icon", "toolbar_1_press_sig", "toolbar_1_release_sig", "toolbar_1_click_sig")
132                         TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_2_button", "toolbar_2_icon", "toolbar_2_press_sig", "toolbar_2_release_sig", "toolbar_2_click_sig")
133                         TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_3_button", "toolbar_3_icon", "toolbar_3_press_sig", "toolbar_3_release_sig", "toolbar_3_click_sig")
134                         TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_4_button", "toolbar_4_icon", "toolbar_4_press_sig", "toolbar_4_release_sig", "toolbar_4_click_sig")
135                 }/*end programs*/
136         }/*end group :toolbar*/
137
138         group {
139                 name: "shutter_button";
140
141                 images {
142                         image: SHUTTER_NORMAL_INVERSE_IMAGE COMP;
143                         image: SHUTTER_PRESS_IMAGE COMP;
144                         image: SHUTTER_DIM_IMAGE COMP;
145                 }
146
147                 parts {
148                         part { name: "capture_button";
149                                 type: IMAGE;
150                                 mouse_events: 1;
151                                 scale: 1;
152                                 description {
153                                         state: "default" 0.0;
154                                         align: 0.5 0.5;
155                                         rel1 { relative: 0.0 0.0;}
156                                         rel2 { relative: 1.0 1.0;}
157                                         visible: 0;
158                                 }
159                                 description {
160                                         state: "normal" 0.0;
161                                         inherit: "default" 0.0;
162                                         visible: 1;
163                                         image { normal: SHUTTER_NORMAL_INVERSE_IMAGE; }
164                                 }
165                                 description {
166                                         state: "press" 0.0;
167                                         inherit: "default" 0.0;
168                                         visible: 1;
169                                         image { normal: SHUTTER_PRESS_IMAGE; }
170                                 }
171                                 description {
172                                         state: "dim" 0.0;
173                                         inherit: "default" 0.0;
174                                         visible: 1;
175                                         image { normal: SHUTTER_DIM_IMAGE; }
176                                 }
177                         }
178
179                         part { name: "camera_icon";
180                                 type: SWALLOW;
181                                 scale: 1;
182                                 mouse_events: 0;
183                                 description {
184                                         state: "default" 0.0;
185                                         aspect: 1.0 1.0;
186                                         align: 0.5 0.5;
187                                         max: 60 60;
188                                         min: 60 60;
189                                         fixed:1 1;
190                                         rel1 { relative: 0.0 0.0; to: "capture_button";}
191                                         rel2 { relative: 1.0 1.0; to: "capture_button";}
192                                         visible: 1;
193                                 }
194
195                                 description {
196                                         state: "normal" 0.0;
197                                         inherit: "default" 0.0;
198                                         visible: 1;
199                                 }
200                                 description {
201                                         state: "dim" 0.0;
202                                         inherit: "default" 0.0;
203                                         visible: 1;
204                                 }
205                         }
206                 }/*end parts*/
207
208                 programs {
209                         TOOLBAR_RIGHT_ITEM_PROGRAM("capture_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig")
210
211                         program {
212                                 name: "camera_icon,normal";
213                                 source: "prog";
214                                 signal: "camera_icon,normal";
215                                 script: { set_state(PART:"camera_icon", "normal", 0.0); }
216                         }
217                         program {
218                                 name: "camera_icon,invisible";
219                                 source: "prog";
220                                 signal: "camera_icon,invisible";
221                                 script: { set_state(PART:"camera_icon", "dim", 0.0); }
222                         }
223                 }/*end programs*/
224         }/*end group*/
225
226         group {
227                 name: "recording_button";
228
229                 images {
230                         image: CAMCORDER_SHUTTER_ICON_IMAGE COMP;
231                         image: CAMCORDER_SHUTTER_ICON_PRESS_IMAGE COMP;
232                         image: CAMCORDER_SHUTTER_ICON_DIM_IMAGE COMP;
233                         image: CAMCORDER_PAUSE_ICON_IMAGE COMP;
234                         image: CAMCORDER_PAUSE_ICON_PRESS_IMAGE COMP;
235                 }
236
237                 parts {
238                         part { name: "recording_button";
239                                 type: IMAGE;
240                                 mouse_events: 1;
241                                 scale: 1;
242                                 description {
243                                         state: "default" 0.0;
244                                         align: 0.5 0.5;
245                                         rel1 { relative: 0.0 0.0;}
246                                         rel2 { relative: 1.0 1.0;}
247                                         visible: 0;
248                                 }
249                                 description {
250                                         state: "normal" 0.0;
251                                         inherit: "default" 0.0;
252                                         visible: 1;
253                                         image { normal: CAMCORDER_SHUTTER_ICON_IMAGE; }
254                                 }
255                                 description {
256                                         state: "press" 0.0;
257                                         inherit: "default" 0.0;
258                                         visible: 1;
259                                         image { normal: CAMCORDER_SHUTTER_ICON_PRESS_IMAGE; }
260                                 }
261                                 description {
262                                         state: "dim" 0.0;
263                                         inherit: "default" 0.0;
264                                         visible: 1;
265                                         image { normal: CAMCORDER_SHUTTER_ICON_DIM_IMAGE; }
266                                 }
267                         }
268                         part { name: "recording_pause_button";
269                                 type: IMAGE;
270                                 mouse_events: 1;
271                                 scale: 1;
272                                 description {
273                                         state: "default" 0.0;
274                                         align: 0.5 0.5;
275                                         rel1 { relative: 0.0 0.0;}
276                                         rel2 { relative: 1.0 1.0;}
277                                         visible: 0;
278                                 }
279                                 description {
280                                         state: "normal" 0.0;
281                                         inherit: "default" 0.0;
282                                         visible: 1;
283                                         image { normal: CAMCORDER_PAUSE_ICON_IMAGE; }
284                                 }
285                                 description {
286                                         state: "press" 0.0;
287                                         inherit: "default" 0.0;
288                                         visible: 1;
289                                         image { normal: CAMCORDER_PAUSE_ICON_PRESS_IMAGE; }
290                                 }
291                         }
292                 }/*end parts*/
293
294                 programs {
295                         TOOLBAR_RIGHT_ITEM_PROGRAM("recording_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig")
296                         TOOLBAR_RIGHT_ITEM_PROGRAM("recording_pause_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig")
297                 }/*end programs*/
298         }/*end group*/
299
300         group {
301                 name: "recording_stop_button";
302
303                 images {
304                         image: CAMCORDER_STOP_ICON_IMAGE COMP;
305                         image: CAMCORDER_STOP_ICON_PRESS_IMAGE COMP;
306                 }
307
308                 parts {
309                         part { name: "recording_stop_button";
310                                 type: IMAGE;
311                                 mouse_events: 1;
312                                 scale: 1;
313                                 description {
314                                         state: "default" 0.0;
315                                         align: 0.5 0.5;
316                                         rel1 { relative: 0.0 0.0;}
317                                         rel2 { relative: 1.0 1.0;}
318                                         visible: 0;
319                                 }
320                                 description {
321                                         state: "normal" 0.0;
322                                         inherit: "default" 0.0;
323                                         visible: 1;
324                                         image { normal: CAMCORDER_STOP_ICON_IMAGE; }
325                                 }
326                                 description {
327                                         state: "press" 0.0;
328                                         inherit: "default" 0.0;
329                                         visible: 1;
330                                         image { normal: CAMCORDER_STOP_ICON_PRESS_IMAGE; }
331                                 }
332                         }
333                 }/*end parts*/
334
335                 programs {
336                         TOOLBAR_RIGHT_ITEM_PROGRAM("recording_stop_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig")
337                 }/*end programs*/
338         }/*end group*/
339
340         group {
341                 name: "toolbar_quickview_item";
342
343                 images {
344                         image: THUMBNAIL_BG_NORMAL_IMAGE COMP;
345                 }
346
347                 parts {
348                         part { name: "bg";
349                                 type: IMAGE;
350                                 mouse_events: 1;
351                                 scale: 1;
352                                 description {
353                                         state: "default" 0.0;
354                                         align: 0.5 0.5;
355                                         rel1 { relative: 0.0 0.0;}
356                                         rel2 { relative: 1.0 1.0;}
357                                         image {
358                                                 normal: THUMBNAIL_BG_NORMAL_IMAGE ;
359                                         }
360                                 }
361                                 description {
362                                         state: "invisible" 0.0;
363                                         inherit: "default" 0.0;
364                                         visible: 0;
365                                 }
366                         }
367                         part { name: "thumbnail";
368                                 type: SWALLOW;
369                                 mouse_events: 0;
370                                 scale: 1;
371                                 description {
372                                         state: "default" 0.0;
373                                         rel1 { relative: 1/9 1/9;to: "bg"; }
374                                         rel2 { relative: 8/9 8/9;to: "bg"; }
375                                 }
376                                 description {
377                                         state: "invisible" 0.0;
378                                         inherit: "default" 0.0;
379                                         visible: 0;
380                                 }
381                         }
382
383                         part { name: "thumbnail_area"; /*note: just for c codes get thumbnail x,y,w,h*/
384                                 type: RECT;
385                                 mouse_events: 0;
386                                 scale: 1;
387                                 description {
388                                         state: "default" 0.0;
389                                         rel1 { relative: 0.0 0.0; to: "thumbnail"; }
390                                         rel2 { relative: 1.0 1.0; to: "thumbnail"; }
391                                         color: 0 0 0 0;
392                                 }
393                         }
394
395                 }/*end parts*/
396
397                 programs {
398                         program {
399                                 name: "quickview_bg,mouse,down,1";
400                                 signal: "mouse,down,1";
401                                 source: "bg";
402                                 action: SIGNAL_EMIT "landscape,quickview,press"  "toolbar_signal";
403                         }
404                         program {
405                                 name: "quickview_bg,mouse,up,1";
406                                 signal: "mouse,up,1";
407                                 source: "bg";
408                                 action: SIGNAL_EMIT "landscape,quickview,release"  "toolbar_signal";
409                         }
410                         program {
411                                 name: "prog_set_default";
412                                 source: "prog";
413                                 signal: "SET_DEFAULT";
414                                 script: {
415                                         set_state(PART:"bg", "default", 0.0);
416                                         set_state(PART:"thumbnail", "default", 0.0);
417                                 }
418                         }
419                         program {
420                                 name: "prog_set_invisible";
421                                 source: "prog";
422                                 signal: "SET_INVISIBLE";
423                                 script: {
424                                         set_state(PART:"bg", "invisible", 0.0);
425                                         set_state(PART:"thumbnail", "invisible", 0.0);
426                                 }
427                         }
428                 }/*end programs*/
429         }/*end toolbar_quickview_item*/
430
431         group{
432                 name: "toolbar_backbutton_item";
433
434                 images{
435                         image: BACK_BUTTON_NORMAL_IMAGE COMP;
436                         image: BACK_BUTTON_PRESS_IMAGE COMP;
437                 }
438
439                 parts{
440                         part{
441                                 name: "back_button";
442                                 type: IMAGE;
443                                 mouse_events: 1;
444                                 scale: 1;
445                                 description{
446                                         state: "default" 0.0;
447                                         rel1 { relative: 0.0 0.0;}
448                                         rel2 { relative: 1.0 1.0;}
449                                         image {
450                                                 normal : BACK_BUTTON_NORMAL_IMAGE;
451                                         }
452                                 }
453                                 description{
454                                         state: "press" 0.0;
455                                         rel1 { relative: 0.0 0.0;}
456                                         rel2 { relative: 1.0 1.0;}
457                                         image {
458                                                 normal : BACK_BUTTON_PRESS_IMAGE;
459                                         }
460                                 }
461                         }
462                 }/*end parts*/
463
464                 programs {
465                         program {
466                                 name: "back_button_press";
467                                 signal: "mouse,down,1";
468                                 source: "back_button";
469                                 action: STATE_SET  "press" 0.0;
470                                 target:  "back_button";
471                         }
472                         program {
473                                 name: "back_button_release";
474                                 signal: "mouse,up,1";
475                                 source: "back_button";
476                                 action: STATE_SET  "default" 0.0;
477                                 target:  "back_button";
478                         }
479                         program {
480                                 name: "back_button_clicked";
481                                 signal: "mouse,clicked,1";
482                                 source: "back_button";
483                                 action: SIGNAL_EMIT "landscape,backbutton,clicked"  "toolbar_signal";
484                         }
485                 }/*end programs*/
486         }/*end toolbar_backbutton_item*/
487
488         group{
489                 name: "toolbar_cafbutton_item";
490
491                 parts{
492                         part{
493                                 name: "caf_button";
494                                 type: IMAGE;
495                                 scale: 1;
496                                 mouse_events: 1;
497                                 description{
498                                         state: "default" 0.0;
499                                         rel1 { relative: 0.0 0.0;}
500                                         rel2 { relative: 1.0 1.0;}
501                                         visible: 0;
502                                 }
503                                 description{
504                                         state: "normal" 0.0;
505                                         inherit: "default" 0.0;
506                                         visible: 1;
507                                         image {
508                                                 normal : CAF_BUTTON_NORMAL_IMAGE;
509                                         }
510                                 }
511                                 description{
512                                         state: "press" 0.0;
513                                         inherit: "default" 0.0;
514                                         visible: 1;
515                                         image {
516                                                 normal : CAF_BUTTON_PRESS_IMAGE;
517                                         }
518                                 }
519                         }
520                 }/*end parts*/
521
522                 programs {
523                         program {
524                                 name: "caf_button_press";
525                                 signal: "mouse,down,1";
526                                 source: "caf_button";
527                                 action: STATE_SET "press" 0.0;
528                                 target: "caf_button";
529                         }
530                         program {
531                                 name: "caf_button_release";
532                                 signal: "mouse,up,1";
533                                 source: "caf_button";
534                                 action: STATE_SET "normal" 0.0;
535                                 target: "caf_button";
536                         }
537                         program {
538                                 name: "caf_button_clicked";
539                                 signal: "mouse,clicked,1";
540                                 source: "caf_button";
541                                 action: SIGNAL_EMIT "caf_button,clicked" "toolbar_signal";
542                         }
543                         program {
544                                 name: "caf_button_normal";
545                                 source: "prog";
546                                 signal: "caf_button,normal";
547                                 script: {
548                                         set_state(PART:"caf_button", "normal", 0.0);
549                                 }
550                         }
551                         program {
552                                 name: "caf_button_default";
553                                 source: "prog";
554                                 signal: "caf_button,invisible";
555                                 script: {
556                                         set_state(PART:"caf_button", "default", 0.0);
557                                 }
558                         }
559                 }/*end programs*/
560         }/*end toolbar_cafbutton_item*/
561
562         group{
563                 name: "toolbar_capture_button_item";
564
565                 images{
566                         image: SNAPSHOT_PRESS_IMAGE COMP;
567                         image: SNAPSHOT_NORMAL_IMAGE COMP;
568                 }
569
570                 parts{
571                         part{
572                                 name: "capture_button";
573                                 type: IMAGE;
574                                 mouse_events: 1;
575                                 scale: 1;
576                                 description{
577                                         state: "default" 0.0;
578                                         rel1 { relative: 0.0 0.0;}
579                                         rel2 { relative: 1.0 1.0;}
580                                         image {
581                                                 normal : SNAPSHOT_NORMAL_IMAGE;
582                                         }
583                                 }
584                                 description{
585                                         state: "press" 0.0;
586                                         rel1 { relative: 0.0 0.0;}
587                                         rel2 { relative: 1.0 1.0;}
588                                         image {
589                                                 normal : SNAPSHOT_PRESS_IMAGE;
590                                         }
591                                 }
592                         }
593                 }/*end parts*/
594
595                 programs {
596                         program {
597                                 name: "capture_button_press";
598                                 signal: "mouse,down,1";
599                                 source: "capture_button";
600                                 action: STATE_SET  "press" 0.0;
601                                 target:  "capture_button";
602                         }
603                         program {
604                                 name: "capture_button_release";
605                                 signal: "mouse,up,1";
606                                 source: "capture_button";
607                                 action: STATE_SET  "default" 0.0;
608                                 target:  "capture_button";
609                         }
610                         program {
611                                 name: "capture_button_clicked";
612                                 signal: "mouse,clicked,1";
613                                 source: "capture_button";
614                                 action: SIGNAL_EMIT "capture_button_click"  "capture_button_click";
615                         }
616                 }/*end programs*/
617         }
618 }/*end collections*/
619 //end file