merge with master
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / photocam.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18
19
20 group { name: "elm/photocam/base/default";
21        script {
22            public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
23            public timer0(val) {
24                new v;
25                v = get_int(sbvis_v);
26                if (v) {
27                    v = get_int(sbalways_v);
28                    if (!v) {
29                        emit("do-hide-vbar", "");
30                        set_int(sbvis_v, 0);
31                    }
32                }
33                v = get_int(sbvis_h);
34                if (v) {
35                    v = get_int(sbalways_h);
36                    if (!v) {
37                        emit("do-hide-hbar", "");
38                        set_int(sbvis_h, 0);
39                    }
40                }
41                set_int(sbvis_timer, 0);
42                return 0;
43            }
44        }
45        images {
46            image: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_IMAGE COMP;
47            image: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_IMAGE COMP;
48            image: "bt_sm_shine.png" COMP;
49            image: "bt_sm_hilight.png" COMP;
50            image: "sb_runnerh.png" COMP;
51            image: "sb_runnerv.png" COMP;
52            image: "process/63x63/00_list_process_01.png" COMP;
53            image: "process/63x63/00_list_process_02.png" COMP;
54            image: "process/63x63/00_list_process_03.png" COMP;
55            image: "process/63x63/00_list_process_04.png" COMP;
56            image: "process/63x63/00_list_process_05.png" COMP;
57            image: "process/63x63/00_list_process_06.png" COMP;
58            image: "process/63x63/00_list_process_07.png" COMP;
59            image: "process/63x63/00_list_process_08.png" COMP;
60            image: "process/63x63/00_list_process_09.png" COMP;
61            image: "process/63x63/00_list_process_10.png" COMP;
62            image: "process/63x63/00_list_process_11.png" COMP;
63            image: "process/63x63/00_list_process_12.png" COMP;
64            image: "process/63x63/00_list_process_13.png" COMP;
65            image: "process/63x63/00_list_process_14.png" COMP;
66            image: "process/63x63/00_list_process_15.png" COMP;
67            image: "process/63x63/00_list_process_16.png" COMP;
68            image: "process/63x63/00_list_process_17.png" COMP;
69            image: "process/63x63/00_list_process_18.png" COMP;
70            image: "process/63x63/00_list_process_19.png" COMP;
71            image: "process/63x63/00_list_process_20.png" COMP;
72            image: "process/63x63/00_list_process_21.png" COMP;
73            image: "process/63x63/00_list_process_22.png" COMP;
74            image: "process/63x63/00_list_process_23.png" COMP;
75            image: "process/63x63/00_list_process_24.png" COMP;
76            image: "process/63x63/00_list_process_25.png" COMP;
77            image: "process/63x63/00_list_process_26.png" COMP;
78            image: "process/63x63/00_list_process_27.png" COMP;
79            image: "process/63x63/00_list_process_28.png" COMP;
80            image: "process/63x63/00_list_process_29.png" COMP;
81            image: "process/63x63/00_list_process_30.png" COMP;
82        }
83        parts {
84            part { name: "bg";
85                type: RECT;
86                    scale: 1;
87                description { state: "default" 0.0;
88                    rel1.offset: 0 0;
89                    rel2.offset: -1 -1;
90                    color: 255 255 255 0;
91                }
92            }
93            part { name: "clipper";
94                type: RECT;
95                mouse_events: 0;
96                scale: 1;
97                description { state: "default" 0.0;
98                    rel1.to: "bg";
99                    rel2.to: "bg";
100                }
101            }
102            part { name: "elm.swallow.content";
103                clip_to: "clipper";
104                type: SWALLOW;
105                scale: 1;
106                description { state: "default" 0.0;
107                    rel1.offset: 0 0;
108                    rel2.offset: -1 -1;
109                }
110            }
111            part { name: "conf_over";
112                mouse_events: 0;
113                scale: 1;
114                description { state: "default" 0.0;
115                   rel1.offset: 0 0;
116                   rel2.offset: -1 -1;
117                   visible: 0;
118                }
119            }
120            part { name: "busy_clip";
121                type: RECT;
122                mouse_events: 0;
123                description { state: "default" 0.0;
124                    visible: 0;
125                    color: 255 255 255 0;
126                }
127                description { state: "active" 0.0;
128                    visible: 1;
129                    color: 255 255 255 255;
130                }
131            }
132            part { name: "busy";
133                clip_to: "busy_clip";
134                mouse_events: 0;
135                description { state: "default" 0.0;
136                    fixed: 1 1;
137                    min: 32 32;
138                    aspect: 1.0 1.0;
139                    align: 1.0 1.0;
140                    aspect_preference: BOTH;
141                    rel1 {
142                        relative: 0.9 0.9;
143                        offset:   -9 -9;
144                    }
145                    rel2 {
146                        relative: 0.9 0.9;
147                        offset:   -9 -9;
148                    }
149                    image {
150                        normal: "process/63x63/00_list_process_30.png";
151                        tween:  "process/63x63/00_list_process_01.png";
152                        tween:  "process/63x63/00_list_process_02.png";
153                        tween:  "process/63x63/00_list_process_03.png";
154                        tween:  "process/63x63/00_list_process_04.png";
155                        tween:  "process/63x63/00_list_process_05.png";
156                        tween:  "process/63x63/00_list_process_06.png";
157                        tween:  "process/63x63/00_list_process_07.png";
158                        tween:  "process/63x63/00_list_process_08.png";
159                        tween:  "process/63x63/00_list_process_09.png";
160                        tween:  "process/63x63/00_list_process_10.png";
161                        tween:  "process/63x63/00_list_process_11.png";
162                        tween:  "process/63x63/00_list_process_12.png";
163                        tween:  "process/63x63/00_list_process_13.png";
164                        tween:  "process/63x63/00_list_process_14.png";
165                        tween:  "process/63x63/00_list_process_15.png";
166                        tween:  "process/63x63/00_list_process_16.png";
167                        tween:  "process/63x63/00_list_process_17.png";
168                        tween:  "process/63x63/00_list_process_18.png";
169                        tween:  "process/63x63/00_list_process_19.png";
170                        tween:  "process/63x63/00_list_process_20.png";
171                        tween:  "process/63x63/00_list_process_21.png";
172                        tween:  "process/63x63/00_list_process_22.png";
173                        tween:  "process/63x63/00_list_process_23.png";
174                        tween:  "process/63x63/00_list_process_24.png";
175                        tween:  "process/63x63/00_list_process_25.png";
176                        tween:  "process/63x63/00_list_process_26.png";
177                        tween:  "process/63x63/00_list_process_27.png";
178                        tween:  "process/63x63/00_list_process_28.png";
179                        tween:  "process/63x63/00_list_process_29.png";
180                    }
181                }
182            }
183          part { name: "sb_vbar_clip_master";
184             type: RECT;
185             mouse_events: 0;
186             scale: 1;
187             description { state: "default" 0.0;
188             }
189             description { state: "hidden" 0.0;
190                visible: 0;
191                color: 255 255 255 0;
192             }
193          }
194          part { name: "sb_vbar_clip";
195             clip_to: "sb_vbar_clip_master";
196             type: RECT;
197             mouse_events: 0;
198             scale: 1;
199             description { state: "default" 0.0;
200             }
201             description { state: "hidden" 0.0;
202                visible: 0;
203                color: 255 255 255 0;
204             }
205          }
206          part {name: "vbar.padding";
207             type: RECT;
208             mouse_events: 0;
209             description { state: "default" 0.0;
210                min: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_PADDING_SIZE 0;
211                max: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_PADDING_SIZE 0;
212                align: 1 0.5;
213                rel1 {
214                   relative: 0.0 0.0;
215                   to: "elm.swallow.content";
216                }
217                rel2 {
218                   relative: 1.0 1.0;
219                   to: "elm.swallow.content";
220                }
221             }
222          }
223          part { name: "sb_vbar";
224             type: RECT;
225             mouse_events: 0;
226             scale: 1;
227             description { state: "default" 0.0;
228                fixed: 1 1;
229                visible: 0;
230                min: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_MIN_SIZE_INC;
231                align: 1.0 0.0;
232                rel1 {
233                   relative: 1.0 0.0;
234                   offset: -1 0;
235                   to_y: "elm.swallow.content";
236                   to_x: "elm.swallow.content";
237                }
238                rel2 {
239                   relative: 0.0 1.0;
240                   offset: -1 -1;
241                   to_y: "elm.swallow.content";
242                   to_x: "vbar.padding";
243                }
244             }
245          }
246          part { name: "sb_vbar_runner";
247             clip_to: "sb_vbar_clip";
248             mouse_events: 0;
249             scale: 1;
250             description { state: "default" 0.0;
251                min: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_MIN_SIZE_INC;
252                max: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_MAX_SIZE_INC;
253                rel1.to: "sb_vbar";
254                rel2.to: "sb_vbar";
255                visible: 0;
256                image {
257                   normal: "sb_runnerv.png";
258                   border: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_RUNNER_BORDER;
259                   border_scale: 1;
260                }
261                fill.smooth: 0;
262             }
263          }
264          part { name: "elm.dragable.vbar";
265             clip_to: "sb_vbar_clip";
266             mouse_events: 0;
267             scale: 1;
268             dragable {
269                x: 0 0 0;
270                y: 1 1 0;
271                confine: "sb_vbar";
272             }
273             description { state: "default" 0.0;
274                fixed: 1 1;
275                min: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_MIN_SIZE_INC;
276                max: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_MAX_SIZE_INC;
277                rel1 {
278                   relative: 0.5  0.5;
279                   offset:   0    0;
280                   to: "sb_vbar";
281                }
282                rel2 {
283                   relative: 0.5  0.5;
284                   offset:   0    0;
285                   to: "sb_vbar";
286                }
287                image {
288                   normal: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_IMAGE;
289                   border: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_IMAGE_BORDER;
290                   border_scale: 1;
291                   middle: DEFAULT;
292                }
293             }
294          }
295          part { name: "sb_vbar_over1";
296             clip_to: "sb_vbar_clip";
297             mouse_events: 0;
298             scale: 1;
299             description { state: "default" 0.0;
300                rel1.to: "elm.dragable.vbar";
301                rel2.relative: 1.0 0.5;
302                rel2.to: "elm.dragable.vbar";
303                visible: 0;
304                image {
305                   normal: "bt_sm_hilight.png";
306                   border: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_OVER1;
307                   border_scale: 1;
308                }
309             }
310          }
311          part { name: "sb_vbar_over2";
312             clip_to: "sb_vbar_clip";
313             mouse_events: 0;
314             scale: 1;
315             description { state: "default" 0.0;
316                rel1.to: "elm.dragable.vbar";
317                rel2.to: "elm.dragable.vbar";
318                visible: 0;
319                image {
320                   normal: "bt_sm_shine.png";
321                   border: SCROLLER_PHOTOCAM_SCROLLBAR_VBAR_OVER2;
322                   border_scale: 1;
323                }
324             }
325          }
326          part { name: "sb_hbar_clip_master";
327             type: RECT;
328             mouse_events: 0;
329             description { state: "default" 0.0;
330             }
331             description { state: "hidden" 0.0;
332                visible: 0;
333                color: 255 255 255 0;
334             }
335          }
336          part { name: "sb_hbar_clip";
337             clip_to: "sb_hbar_clip_master";
338             type: RECT;
339             mouse_events: 0;
340             scale: 1;
341             description { state: "default" 0.0;
342             }
343             description { state: "hidden" 0.0;
344                visible: 0;
345                color: 255 255 255 0;
346             }
347          }
348          part {name: "hbar.padding";
349             type: RECT;
350             mouse_events: 0;
351             description { state: "default" 0.0;
352                min: 0 SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_PADDING_SIZE;
353                max: 0 SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_PADDING_SIZE;
354                align: 1 1;
355                rel1 {
356                   relative: 0.0 0.0;
357                   to: "elm.swallow.content";
358                }
359                rel2 {
360                   relative: 1.0 1.0;
361                   to: "elm.swallow.content";
362                }
363             }
364          }
365          part { name: "sb_hbar";
366             type: RECT;
367             mouse_events: 0;
368             scale: 1;
369             description { state: "default" 0.0;
370                fixed: 1 1;
371                visible: 0;
372                min: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_MIN_SIZE_INC;
373                align: 0.0 1.0;
374                rel1 {
375                   relative: 0.0 1.0;
376                   offset: 0 -1;
377                   to_y: "elm.swallow.content";
378                   to_x: "elm.swallow.content";
379                }
380                rel2 {
381                   relative: 0.0 1.0;
382                   offset: -1 -1;
383                   to_x: "sb_vbar";
384                   to_y: "hbar.padding";
385                }
386             }
387          }
388          part { name: "sb_hbar_runner";
389             clip_to: "sb_hbar_clip";
390             mouse_events: 0;
391             scale: 1;
392             description { state: "default" 0.0;
393                min: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_MIN_SIZE_INC;
394                max: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_MAX_SIZE_INC;
395                rel1.to: "sb_hbar";
396                rel2.to: "sb_hbar";
397                visible: 0;
398                image {
399                   normal: "sb_runnerh.png";
400                   border: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_RUNNER_BORDER;
401                   border_scale: 1;
402                }
403                fill.smooth: 0;
404             }
405          }
406          part { name: "elm.dragable.hbar";
407             clip_to: "sb_hbar_clip";
408             mouse_events: 0;
409             scale: 1;
410             dragable {
411                x: 1 1 0;
412                y: 0 0 0;
413                confine: "sb_hbar";
414             }
415             description { state: "default" 0.0;
416                fixed: 1 1;
417                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
418                max: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MAX_SIZE_INC;
419                rel1 {
420                   relative: 0.5  0.5;
421                   offset: 0 0;
422                   to: "sb_hbar";
423                }
424                rel2 {
425                   relative: 0.5  0.5;
426                   offset: 0 0;
427                   to: "sb_hbar";
428                }
429                color: 255 255 255 0;
430                image {
431                   normal: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_IMAGE;
432                   border: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_IMAGE_BORDER;
433                   border_scale: 1;
434                   middle: SOLID;
435                }
436             }
437          }
438          part { name: "sb_hbar_over1";
439             clip_to: "sb_hbar_clip";
440             mouse_events: 0;
441             scale: 1;
442             description { state: "default" 0.0;
443                rel1.to: "elm.dragable.hbar";
444                rel2.relative: 1.0 0.5;
445                rel2.to: "elm.dragable.hbar";
446                visible: 0;
447                image {
448                   normal: "bt_sm_hilight.png";
449                   border: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_OVER1;
450                   border_scale: 1;
451                }
452             }
453          }
454          part { name: "sb_hbar_over2";
455             clip_to: "sb_hbar_clip";
456             mouse_events: 0;
457             scale: 1;
458             description { state: "default" 0.0;
459                rel1.to: "elm.dragable.hbar";
460                rel2.to: "elm.dragable.hbar";
461                visible: 0;
462                image {
463                   normal: "bt_sm_shine.png";
464                   border: SCROLLER_PHOTOCAM_SCROLLBAR_HBAR_OVER2;
465                   border_scale: 1;
466                }
467             }
468          }
469        }
470        programs {
471            program { name: "load";
472                signal: "load";
473                source: "";
474                script {
475                    set_state(PART:"sb_hbar_clip", "hidden", 0.0);
476                    set_state(PART:"sb_vbar_clip", "hidden", 0.0);
477                    set_int(sbvis_h, 0);
478                    set_int(sbvis_v, 0);
479                    set_int(sbalways_v, 0);
480                    set_int(sbalways_h, 0);
481                    set_int(sbvis_timer, 0);
482                }
483            }
484
485            program { name: "vbar_show";
486                signal: "elm,action,show,vbar";
487                source: "elm";
488                action:  STATE_SET "default" 0.0;
489                target: "sb_vbar_clip_master";
490            }
491            program { name: "vbar_hide";
492                signal: "elm,action,hide,vbar";
493                source: "elm";
494                action:  STATE_SET "hidden" 0.0;
495                target: "sb_vbar_clip_master";
496            }
497            program { name: "vbar_show_always";
498                signal: "elm,action,show_always,vbar";
499                source: "elm";
500                script {
501                    new v;
502                    v = get_int(sbvis_v);
503                    v |= get_int(sbalways_v);
504                    if (!v) {
505                        set_int(sbalways_v, 1);
506                        emit("do-show-vbar", "");
507                        set_int(sbvis_v, 1);
508                    }
509                }
510            }
511            program { name: "vbar_show_notalways";
512                signal: "elm,action,show_notalways,vbar";
513                source: "elm";
514                script {
515                    new v;
516                    v = get_int(sbalways_v);
517                    if (v) {
518                        set_int(sbalways_v, 0);
519                        v = get_int(sbvis_v);
520                        if (!v) {
521                            emit("do-hide-vbar", "");
522                            set_int(sbvis_v, 0);
523                        }
524                    }
525                }
526            }
527            program { name: "sb_vbar_show";
528                signal: "do-show-vbar";
529                source: "";
530                action:  STATE_SET "default" 0.0;
531                transition: LINEAR 1.0;
532                target: "sb_vbar_clip";
533            }
534            program { name: "sb_vbar_hide";
535                signal: "do-hide-vbar";
536                source: "";
537                action:  STATE_SET "hidden" 0.0;
538                transition: LINEAR 1.0;
539                target: "sb_vbar_clip";
540            }
541
542            program { name: "hbar_show";
543                signal: "elm,action,show,hbar";
544                source: "elm";
545                action:  STATE_SET "default" 0.0;
546                target: "sb_hbar_clip_master";
547            }
548            program { name: "hbar_hide";
549                signal: "elm,action,hide,hbar";
550                source: "elm";
551                action:  STATE_SET "hidden" 0.0;
552                target: "sb_hbar_clip_master";
553            }
554            program { name: "hbar_show_always";
555                signal: "elm,action,show_always,hbar";
556                source: "elm";
557                script {
558                    new v;
559                    v = get_int(sbvis_h);
560                    v |= get_int(sbalways_h);
561                    if (!v) {
562                        set_int(sbalways_h, 1);
563                        emit("do-show-hbar", "");
564                        set_int(sbvis_h, 1);
565                    }
566                }
567            }
568            program { name: "hbar_show_notalways";
569                signal: "elm,action,show_notalways,hbar";
570                source: "elm";
571                script {
572                    new v;
573                    v = get_int(sbalways_h);
574                    if (v) {
575                        set_int(sbalways_h, 0);
576                        v = get_int(sbvis_h);
577                        if (!v) {
578                            emit("do-hide-hbar", "");
579                            set_int(sbvis_h, 0);
580                        }
581                    }
582                }
583            }
584            program { name: "sb_hbar_show";
585                signal: "do-show-hbar";
586                source: "";
587                action:  STATE_SET "default" 0.0;
588                transition: LINEAR 1.0;
589                target: "sb_hbar_clip";
590            }
591            program { name: "sb_hbar_hide";
592                signal: "do-hide-hbar";
593                source: "";
594                action:  STATE_SET "hidden" 0.0;
595                transition: LINEAR 1.0;
596                target: "sb_hbar_clip";
597            }
598
599            program { name: "scroll";
600                signal: "elm,action,scroll";
601                source: "elm";
602                script {
603                    new v;
604                    v = get_int(sbvis_v);
605                    v |= get_int(sbalways_v);
606                    if (!v) {
607                        emit("do-show-vbar", "");
608                        set_int(sbvis_v, 1);
609                    }
610                    v = get_int(sbvis_h);
611                    v |= get_int(sbalways_h);
612                    if (!v) {
613                        emit("do-show-hbar", "");
614                        set_int(sbvis_h, 1);
615                    }
616                    v = get_int(sbvis_timer);
617                    if (v > 0) cancel_timer(v);
618                    v = timer(2.0, "timer0", 0);
619                    set_int(sbvis_timer, v);
620                }
621            }
622            program { name: "go1";
623                signal: "elm,state,busy,start";
624                source: "elm";
625                action: STATE_SET "active" 0.0;
626                transition: SINUSOIDAL 1.0;
627                target:  "busy_clip";
628            }
629            program { name: "go2";
630                signal: "elm,state,busy,start";
631                source: "elm";
632                action: STATE_SET "default" 0.0;
633                transition: LINEAR 0.5;
634                target: "busy";
635                after:  "go2";
636            }
637            program { name: "stop1";
638                signal: "elm,state,busy,stop";
639                source: "elm";
640                action: STATE_SET "default" 0.0;
641                transition: SINUSOIDAL 1.0;
642                target: "busy_clip";
643                after: "stop2";
644            }
645          program { name: "stop2";
646             action: ACTION_STOP;
647             target: "go2";
648          }
649       }
650    }
651