tizen 2.3.1 release
[framework/uifw/efl-theme-tizen.git] / 2.2 / widgets / scroller.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  *   1. Redistributions of source code must retain the above copyright notice, this
10  *      list of conditions and the following disclaimer.
11  *   2. Redistributions in binary form must reproduce the above copyright notice,
12  *      this list of conditions and the following disclaimer in the documentation
13  *      and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26
27 /*
28  * vim:ts=3
29 */
30
31 group { name: "elm/scroller/base/default";
32    alias: "elm/carousel/base/default";
33    alias: "elm/scroller/base/map_bubble";
34    alias: "elm/gengrid/base/no_effect";
35    alias: "elm/genlist/base/no_effect";
36
37    data {
38       item: "focus_highlight" "on";
39    }
40
41    script {
42       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
43       public sh_v, sh_h;
44       public top_down_x = 0, top_down_y = 0
45       public top_move_x = 0, top_move_y = 0
46       public top_diff = 0, top_prev_diff = 0
47       public effect_top_down = 0, effect_top_start = 0, effect_top_reset = 0, effect_top_anim = 0;
48       public effect_top_end = 0, effect_top_move = 0, effect_top_max = 0;
49       public bottom_down_x = 0, bottom_down_y = 0
50       public bottom_move_x = 0, bottom_move_y = 0
51       public bottom_diff = 0, bottom_prev_diff = 0
52       public effect_bottom_down = 0, effect_bottom_start = 0, effect_bottom_reset = 0, effect_bottom_anim = 0;
53       public effect_bottom_end = 0, effect_bottom_move = 0, effect_bottom_max = 0;
54       public left_down_x = 0, left_down_y = 0
55       public left_move_x = 0, left_move_y = 0
56       public left_diff = 0, left_prev_diff = 0
57       public effect_left_down = 0, effect_left_start = 0, effect_left_reset = 0, effect_left_anim = 0;
58       public effect_left_end = 0, effect_left_move = 0, effect_left_max = 0;
59       public right_down_x = 0, right_down_y = 0
60       public right_move_x = 0, right_move_y = 0
61       public right_diff = 0, right_prev_diff = 0
62       public effect_right_down = 0, effect_right_start = 0, effect_right_reset = 0, effect_right_anim = 0;
63       public effect_right_end = 0, effect_right_move = 0, effect_right_max = 0;
64
65       public timer0(val) {
66          new v;
67          v = get_int(sbvis_v);
68          if (v) {
69             v = get_int(sbalways_v);
70             if (!v) {
71                emit("do-hide-vbar", "");
72                set_int(sbvis_v, 0);
73             }
74          }
75          v = get_int(sbvis_h);
76          if (v) {
77             v = get_int(sbalways_h);
78             if (!v) {
79                emit("do-hide-hbar", "");
80                set_int(sbvis_h, 0);
81             }
82          }
83          set_int(sbvis_timer, 0);
84          return 0;
85       }
86    }
87    images {
88       image: "00_scroll_bar_v.#.png" COMP;
89       image: "00_scroll_bar_h.#.png" COMP;
90    }
91    parts {
92       part { name: "bg";
93          type: RECT;
94          scale: 1;
95          description { state: "default" 0.0;
96             rel1.offset: 0 0;
97             rel2.offset: -1 -1;
98             color: 255 255 255 0;
99          }
100       }
101       part { name: "clipper";
102          type: RECT;
103          mouse_events: 0;
104          scale: 1;
105          description { state: "default" 0.0;
106             rel1.to: "bg";
107             rel2.to: "bg";
108             rel1.offset: 0 0;
109             rel2.offset: -1 -1;
110          }
111       }
112       part { name: "elm.swallow.content";
113          clip_to: "clipper";
114          type: SWALLOW;
115          scale: 1;
116          description { state: "default" 0.0;
117             rel1.to: "bg";
118             rel2.to: "bg";
119             rel1.offset: 0 0;
120             rel2.offset: -1 -1;
121          }
122       }
123       part { name: "sb_vbar_clip_master";
124          type: RECT;
125          mouse_events: 0;
126          scale: 1;
127          description { state: "default" 0.0;
128          }
129          description { state: "hidden" 0.0;
130             visible: 0;
131             color: 255 255 255 0;
132          }
133       }
134       part { name: "sb_vbar_clip";
135          clip_to: "sb_vbar_clip_master";
136          type: RECT;
137          mouse_events: 0;
138          scale: 1;
139          description { state: "default" 0.0;
140          }
141          description { state: "hidden" 0.0;
142             visible: 0;
143             color: 255 255 255 0;
144          }
145       }
146       part { name: "sb_vbar_top_padding";
147          type: SPACER;
148          scale: 1;
149          description { state: "default" 0.0;
150             min: 0 SCROLLER_DEFAULT_SCROLLBAR_VBAR_PADDING_SIZE;
151             max: 0 SCROLLER_DEFAULT_SCROLLBAR_VBAR_PADDING_SIZE;
152             rel1.relative: 1.0 0.0;
153             rel2.relative: 1.0 0.0;
154             rel1.to: "elm.swallow.content";
155             rel2.to: "elm.swallow.content";
156             fixed: 1 1;
157             align: 1.0 0.0;
158          }
159       }
160       part { name: "sb_vbar_bottom_padding";
161          type: SPACER;
162          scale: 1;
163          description { state: "default" 0.0;
164             min: 0 SCROLLER_DEFAULT_SCROLLBAR_VBAR_PADDING_SIZE;
165             max: 0 SCROLLER_DEFAULT_SCROLLBAR_VBAR_PADDING_SIZE;
166             rel1.relative: 1.0 1.0;
167             rel2.relative: 1.0 1.0;
168             rel1.to: "elm.swallow.content";
169             rel2.to: "elm.swallow.content";
170             fixed: 1 1;
171             align: 1.0 1.0;
172          }
173       }
174       part { name: "sb_vbar_right_padding";
175          type: SPACER;
176          scale: 1;
177          description { state: "default" 0.0;
178             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_PADDING_SIZE 0;
179             max: SCROLLER_DEFAULT_SCROLLBAR_VBAR_PADDING_SIZE 0;
180             rel1.relative: 1.0 1.0;
181             rel2.relative: 1.0 1.0;
182             rel1.to: "elm.swallow.content";
183             rel2.to: "elm.swallow.content";
184             fixed: 1 1;
185             align: 1.0 1.0;
186          }
187       }
188       part { name: "sb_vbar";
189          type: RECT;
190          mouse_events: 0;
191          scale: 1;
192          description { state: "default" 0.0;
193             fixed: 1 1;
194             visible: 0;
195             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MIN_SIZE_INC;
196             align: 1.0 0.0;
197             rel1 {
198                relative: 0.0 1.0;
199                offset:   0 0;
200                to_x:     "sb_vbar_right_padding";
201                to_y:     "sb_vbar_top_padding";
202             }
203             rel2 {
204                relative: 0.0 0.0;
205                offset:   -1 1;
206                to_x:     "sb_vbar_right_padding";
207                to_y:     "sb_vbar_bottom_padding";
208             }
209          }
210       }
211       part { name: "elm.dragable.vbar";
212          clip_to: "sb_vbar_clip";
213          mouse_events: 0;
214          scale: 1;
215          dragable {
216             x: 0 0 0;
217             y: 1 1 0;
218             confine: "sb_vbar";
219          }
220          description { state: "default" 0.0;
221             fixed: 1 1;
222             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MIN_SIZE_INC;
223             max: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MAX_SIZE_INC;
224             rel1 {
225                relative: 0.5 0.5;
226                offset:   0 0;
227                to: "sb_vbar";
228             }
229             rel2 {
230                relative: 0.5 0.5;
231                offset:   0 0;
232                to: "sb_vbar";
233             }
234             image {
235                normal: "00_scroll_bar_v.#.png";
236                middle: DEFAULT;
237             }
238             color_class: "B071";
239          }
240       }
241       part { name: "sb_hbar_clip_master";
242          type: RECT;
243          mouse_events: 0;
244          scale: 1;
245          description { state: "default" 0.0;
246          }
247          description { state: "hidden" 0.0;
248             visible: 0;
249             color: 255 255 255 0;
250          }
251       }
252       part { name: "sb_hbar_clip";
253          clip_to: "sb_hbar_clip_master";
254          type: RECT;
255          mouse_events: 0;
256          scale: 1;
257          description { state: "default" 0.0;
258          }
259          description { state: "hidden" 0.0;
260             visible: 0;
261             color: 255 255 255 0;
262          }
263       }
264       part { name: "sb_hbar_bottom_padding";
265          type: SPACER;
266          scale: 1;
267          description { state: "default" 0.0;
268             min: 0 SCROLLER_DEFAULT_SCROLLBAR_HBAR_PADDING_SIZE;
269             max: 0 SCROLLER_DEFAULT_SCROLLBAR_HBAR_PADDING_SIZE;
270             rel1.relative: 1.0 1.0;
271             rel2.relative: 1.0 1.0;
272             rel1.to: "elm.swallow.content";
273             rel2.to: "elm.swallow.content";
274             fixed: 1 1;
275             align: 1.0 1.0;
276          }
277       }
278       part { name: "sb_hbar_left_padding";
279          type: SPACER;
280          scale: 1;
281          description { state: "default" 0.0;
282             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_PADDING_SIZE 0;
283             max: SCROLLER_DEFAULT_SCROLLBAR_HBAR_PADDING_SIZE 0;
284             rel1.relative: 0.0 1.0;
285             rel2.relative: 0.0 1.0;
286             rel1.to: "elm.swallow.content";
287             rel2.to: "elm.swallow.content";
288             fixed: 1 1;
289             align: 0.0 1.0;
290          }
291       }
292       part { name: "sb_hbar_right_padding";
293          type: SPACER;
294          scale: 1;
295          description { state: "default" 0.0;
296             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_PADDING_SIZE 0;
297             max: SCROLLER_DEFAULT_SCROLLBAR_HBAR_PADDING_SIZE 0;
298             rel1.relative: 1.0 1.0;
299             rel2.relative: 1.0 1.0;
300             rel1.to: "elm.swallow.content";
301             rel2.to: "elm.swallow.content";
302             fixed: 1 1;
303             align: 1.0 1.0;
304          }
305       }
306       part { name: "sb_hbar";
307          type: RECT;
308          mouse_events: 0;
309          scale: 1;
310          description { state: "default" 0.0;
311             fixed: 1 1;
312             visible: 0;
313             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MIN_SIZE_INC;
314             align: 0.0 1.0;
315             rel1 {
316                relative: 1.0 0.0;
317                offset:   0 0;
318                to_x:     "sb_hbar_left_padding";
319                to_y:     "sb_hbar_bottom_padding";
320             }
321             rel2 {
322                relative: 0.0 0.0;
323                offset:   -1 -1;
324                to_x:     "sb_hbar_right_padding";
325                to_y:     "sb_hbar_bottom_padding";
326             }
327          }
328       }
329       part { name: "elm.dragable.hbar";
330          clip_to: "sb_hbar_clip";
331          mouse_events: 0;
332          scale: 1;
333          dragable {
334             x: 1 1 0;
335             y: 0 0 0;
336             confine: "sb_hbar";
337          }
338          description { state: "default" 0.0;
339             fixed: 1 1;
340             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MIN_SIZE_INC;
341             max: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MAX_SIZE_INC;
342             rel1 {
343                relative: 0.5  0.0;
344                offset:   0    0;
345                to: "sb_hbar";
346             }
347             rel2 {
348                relative: 0.5  0.0;
349                offset:   0    0;
350                to: "sb_hbar";
351             }
352             image {
353                normal: "00_scroll_bar_h.#.png";
354                middle: DEFAULT;
355             }
356             color_class: "B071";
357          }
358       }
359       part { name: "disabler";
360          type: RECT;
361          scale: 1;
362          description { state: "default" 0.0;
363             rel1.to: "clipper";
364             rel2.to: "clipper";
365             color: 0 0 0 0;
366             visible: 0;
367          }
368          description { state: "disabled" 0.0;
369             inherit: "default" 0.0;
370             visible: 1;
371          }
372       }
373    }
374    programs {
375       program { name: "load";
376          signal: "load";
377          source: "";
378          script {
379             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
380             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
381             set_int(sbvis_h, 0);
382             set_int(sbvis_v, 0);
383             set_int(sbalways_v, 0);
384             set_int(sbalways_h, 0);
385             set_int(sbvis_timer, 0);
386             emit("reload", "elm");
387          }
388       }
389
390       program { name: "vbar_show";
391          signal: "elm,action,show,vbar";
392          source: "elm";
393          action:  STATE_SET "default" 0.0;
394          target: "sb_vbar_clip_master";
395       }
396       program { name: "vbar_hide";
397          signal: "elm,action,hide,vbar";
398          source: "elm";
399          action:  STATE_SET "hidden" 0.0;
400          target: "sb_vbar_clip_master";
401       }
402       program { name: "vbar_show_always";
403          signal: "elm,action,show_always,vbar";
404          source: "elm";
405          script {
406             new v;
407             v = get_int(sbalways_v);
408             if (!v) {
409                set_int(sbalways_v, 1);
410                v = get_int(sbvis_v);
411                if (!v) {
412                   emit("do-show-vbar", "");
413                   set_int(sbvis_v, 1);
414                }
415             }
416          }
417       }
418       program { name: "vbar_show_notalways";
419          signal: "elm,action,show_notalways,vbar";
420          source: "elm";
421          script {
422             new v;
423             v = get_int(sbalways_v);
424             if (v) {
425                set_int(sbalways_v, 0);
426                v = get_int(sbvis_v);
427                if (!v) {
428                   emit("do-hide-vbar", "");
429                   set_int(sbvis_v, 0);
430                }
431             }
432          }
433       }
434       program { name: "sb_vbar_show";
435          signal: "do-show-vbar";
436          source: "";
437          action:  STATE_SET "default" 0.0;
438          transition: LINEAR 0.1;
439          target: "sb_vbar_clip";
440       }
441       program { name: "sb_vbar_hide";
442          signal: "do-hide-vbar";
443          source: "";
444          action:  STATE_SET "hidden" 0.0;
445          transition: LINEAR 0.1;
446          target: "sb_vbar_clip";
447       }
448
449       program { name: "hbar_show";
450          signal: "elm,action,show,hbar";
451          source: "elm";
452          action:  STATE_SET "default" 0.0;
453          target: "sb_hbar_clip_master";
454       }
455       program { name: "hbar_hide";
456          signal: "elm,action,hide,hbar";
457          source: "elm";
458          action:  STATE_SET "hidden" 0.0;
459          target: "sb_hbar_clip_master";
460       }
461       program { name: "hbar_show_always";
462          signal: "elm,action,show_always,hbar";
463          source: "elm";
464          script {
465             new v;
466             v = get_int(sbalways_h);
467             if (!v) {
468                set_int(sbalways_h, 1);
469                v = get_int(sbvis_h);
470                if (!v) {
471                   emit("do-show-hbar", "");
472                   set_int(sbvis_h, 1);
473                }
474             }
475          }
476       }
477       program { name: "hbar_show_notalways";
478          signal: "elm,action,show_notalways,hbar";
479          source: "elm";
480          script {
481             new v;
482             v = get_int(sbalways_h);
483             if (v) {
484                set_int(sbalways_h, 0);
485                v = get_int(sbvis_h);
486                if (!v) {
487                   emit("do-hide-hbar", "");
488                   set_int(sbvis_h, 0);
489                }
490             }
491          }
492       }
493       program { name: "sb_hbar_show";
494          signal: "do-show-hbar";
495          source: "";
496          action:  STATE_SET "default" 0.0;
497          transition: LINEAR 0.1;
498          target: "sb_hbar_clip";
499       }
500       program { name: "sb_hbar_hide";
501          signal: "do-hide-hbar";
502          source: "";
503          action:  STATE_SET "hidden" 0.0;
504          transition: LINEAR 0.1;
505          target: "sb_hbar_clip";
506       }
507
508       program { name: "scroll";
509          signal: "elm,action,scroll";
510          source: "elm";
511          script {
512             new v;
513             v = get_int(sbvis_v);
514             v |= get_int(sbalways_v);
515             if (!v) {
516                emit("do-show-vbar", "");
517                set_int(sbvis_v, 1);
518             }
519             v = get_int(sbvis_h);
520             v |= get_int(sbalways_h);
521             if (!v) {
522                emit("do-show-hbar", "");
523                set_int(sbvis_h, 1);
524             }
525             v = get_int(sbvis_timer);
526             if (v > 0) cancel_timer(v);
527             v = timer(1.0, "timer0", 0);
528             set_int(sbvis_timer, v);
529          }
530       }
531       program { name: "disable";
532          signal: "elm,state,disabled";
533          source: "elm";
534          action: STATE_SET "disabled" 0.0;
535          target: "disabler";
536       }
537       program { name: "enable";
538          signal: "elm,state,enabled";
539          source: "elm";
540          action: STATE_SET "default" 0.0;
541          target: "disabler";
542       }
543       program { name: "show";
544          signal: "show";
545          source: "";
546          script {
547             new v;
548             emit("do-show-vbar", "");
549             set_int(sbvis_v, 1);
550             v = get_int(sbalways_v);
551             if (!v) {
552               v = get_int(sbvis_timer);
553               if (v > 0) cancel_timer(v);
554               v = timer(1.0, "timer0", 0);
555               set_int(sbvis_timer, v);
556             }
557             emit("do-show-hbar", "");
558             set_int(sbvis_h, 1);
559             v = get_int(sbalways_h);
560             if (!v) {
561               v = get_int(sbvis_timer);
562               if (v > 0) cancel_timer(v);
563               v = timer(1.0, "timer0", 0);
564               set_int(sbvis_timer, v);
565             }
566          }
567       }
568    }
569 }
570
571 group { name: "elm/scroller/base/handler";
572    alias: "elm/carousel/base/handler";
573
574    data {
575       item: "focus_highlight" "on";
576    }
577    script {
578       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
579       public top_down_x = 0, top_down_y = 0
580       public top_move_x = 0, top_move_y = 0
581       public top_diff = 0, top_prev_diff = 0
582       public effect_top_down = 0, effect_top_start = 0, effect_top_reset = 0, effect_top_anim = 0;
583       public effect_top_end = 0, effect_top_move = 0, effect_top_max = 0;
584       public bottom_down_x = 0, bottom_down_y = 0
585       public bottom_move_x = 0, bottom_move_y = 0
586       public bottom_diff = 0, bottom_prev_diff = 0
587       public effect_bottom_down = 0, effect_bottom_start = 0, effect_bottom_reset = 0, effect_bottom_anim = 0;
588       public effect_bottom_end = 0, effect_bottom_move = 0, effect_bottom_max = 0;
589       public left_down_x = 0, left_down_y = 0
590       public left_move_x = 0, left_move_y = 0
591       public left_diff = 0, left_prev_diff = 0
592       public effect_left_down = 0, effect_left_start = 0, effect_left_reset = 0, effect_left_anim = 0;
593       public effect_left_end = 0, effect_left_move = 0, effect_left_max = 0;
594       public right_down_x = 0, right_down_y = 0
595       public right_move_x = 0, right_move_y = 0
596       public right_diff = 0, right_prev_diff = 0
597       public effect_right_down = 0, effect_right_start = 0, effect_right_reset = 0, effect_right_anim = 0;
598       public effect_right_end = 0, effect_right_move = 0, effect_right_max = 0;
599
600       public timer0(val) {
601          new v;
602          v = get_int(sbvis_v);
603          if (v) {
604             v = get_int(sbalways_v);
605             if (!v) {
606                emit("do-hide-vbar", "");
607                set_int(sbvis_v, 0);
608             }
609          }
610          v = get_int(sbvis_h);
611          if (v) {
612             v = get_int(sbalways_h);
613             if (!v) {
614                emit("do-hide-hbar", "");
615                set_int(sbvis_h, 0);
616             }
617          }
618          set_int(sbvis_timer, 0);
619          return 0;
620       }
621    }
622    images {
623       image: "00_fast_scroll_handler_bg.#.png" COMP;
624       image: "00_fast_scroll_handler_center.png" COMP;
625       image: "00_fast_scroll_handler_center_h.png" COMP;
626    }
627    parts {
628       part { name: "bg";
629          type: RECT;
630          scale: 1;
631          description { state: "default" 0.0;
632             rel1.offset: 0 0;
633             rel2.offset: -1 -1;
634             color: 255 255 255 0;
635          }
636       }
637       part { name: "clipper";
638          type: RECT;
639          mouse_events: 0;
640          scale: 1;
641          description { state: "default" 0.0;
642             rel1.to: "bg";
643             rel2.to: "bg";
644             rel1.offset: 0 0;
645             rel2.offset: -1 -1;
646          }
647       }
648       part { name: "elm.swallow.content";
649          clip_to: "clipper";
650          type: SWALLOW;
651          scale: 1;
652          description { state: "default" 0.0;
653             rel1.to: "bg";
654             rel2.to: "bg";
655             rel1.offset: 0 0;
656             rel2.offset: -1 -1;
657          }
658       }
659       part { name: "sb_vbar_top_padding";
660          type: SPACER;
661          scale: 1;
662          description { state: "default" 0.0;
663             min: 0 0;
664             max: 0 0;
665             rel1.relative: 1.0 0.0;
666             rel2.relative: 1.0 0.0;
667             rel1.to: "elm.swallow.content";
668             rel2.to: "elm.swallow.content";
669             fixed: 1 1;
670             align: 1.0 0.0;
671          }
672       }
673       part { name: "sb_vbar_bottom_padding";
674          type: SPACER;
675          scale: 1;
676          description { state: "default" 0.0;
677             min: 0 0;
678             max: 0 0;
679             rel1.relative: 1.0 1.0;
680             rel2.relative: 1.0 1.0;
681             rel1.to: "elm.swallow.content";
682             rel2.to: "elm.swallow.content";
683             fixed: 1 1;
684             align: 1.0 1.0;
685          }
686       }
687       part { name: "sb_vbar_right_padding";
688          type: SPACER;
689          scale: 1;
690          description { state: "default" 0.0;
691             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_PADDING_SIZE 0;
692             max: SCROLLER_HANDLER_SCROLLBAR_VBAR_PADDING_SIZE 0;
693             rel1.relative: 1.0 1.0;
694             rel2.relative: 1.0 1.0;
695             rel1.to: "elm.swallow.content";
696             rel2.to: "elm.swallow.content";
697             fixed: 1 1;
698             align: 1.0 1.0;
699          }
700       }
701       part { name: "sb_vbar_clip_master";
702          type: RECT;
703          mouse_events: 0;
704          scale: 1;
705          description { state: "default" 0.0;
706          }
707          description { state: "hidden" 0.0;
708             visible: 0;
709             color: 255 255 255 0;
710          }
711       }
712       part { name: "sb_vbar_clip";
713          clip_to: "sb_vbar_clip_master";
714          type: RECT;
715          mouse_events: 0;
716          scale: 1;
717          description { state: "default" 0.0;
718          }
719          description { state: "hidden" 0.0;
720             visible: 0;
721             color: 255 255 255 0;
722          }
723       }
724       part { name: "sb_vbar";
725          type: RECT;
726          mouse_events: 0;
727          scale: 1;
728          description { state: "default" 0.0;
729             fixed: 1 1;
730             visible: 0;
731             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
732             align: 1.0 0.0;
733             rel1 {
734                relative: 0.0 1.0;
735                to_y: "sb_vbar_top_padding";
736                to_x: "sb_vbar_right_padding";
737             }
738             rel2 {
739                relative: 0.0 0.0;
740                to_y: "sb_vbar_bottom_padding";
741                to_x: "sb_vbar_right_padding";
742             }
743          }
744       }
745       part { name: "elm.dragable.vbar";
746          type: RECT;
747          clip_to: "sb_vbar_clip";
748          mouse_events: 1;
749          scale: 1;
750          dragable {
751             x: 0 0 0;
752             y: 1 1 0;
753             confine: "sb_vbar";
754          }
755          description { state: "default" 0.0;
756             fixed: 1 1;
757             color: 0 0 0 0;
758             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
759             max: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
760             rel1 {
761                relative: 0.5 0.5;
762                offset: 0 0;
763                to: "sb_vbar";
764             }
765             rel2 {
766                relative: 0.5 0.5;
767                offset: 0 0;
768                to: "sb_vbar";
769             }
770          }
771       }
772       part { name: "scrollbar_handler_image";
773          clip_to: "sb_vbar_clip";
774          mouse_events: 0;
775          scale: 1;
776          description { state: "default" 0.0;
777             fixed: 1 1;
778             rel1.relative: 0.0 0.0;
779             rel1.to: "elm.dragable.vbar";
780             rel2.relative: 1.0 1.0;
781             rel2.to: "elm.dragable.vbar";
782             visible: 1;
783             image.normal: "00_fast_scroll_handler_bg.#.png";
784             color_class: "B0731L3";
785          }
786       }
787       part { name: "scrollbar_handler_image_middle";
788          clip_to: "sb_vbar_clip";
789          mouse_events: 0;
790          scale: 1;
791          description { state: "default" 0.0;
792             fixed: 1 1;
793             rel1.relative: 0.5 0.5;
794             rel1.to: "elm.dragable.vbar";
795             rel2.relative: 0.5 0.5;
796             rel2.to: "elm.dragable.vbar";
797             visible: 1;
798             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIDDLE_MIN_SIZE_INC;
799             image.normal: "00_fast_scroll_handler_center.png";
800          }
801       }
802       part { name: "sb_hbar_bottom_padding";
803          type: SPACER;
804          scale: 1;
805          description { state: "default" 0.0;
806             min: 0 SCROLLER_HANDLER_SCROLLBAR_VBAR_PADDING_SIZE;
807             max: 0 SCROLLER_HANDLER_SCROLLBAR_VBAR_PADDING_SIZE;
808             rel1.relative: 1.0 1.0;
809             rel2.relative: 1.0 1.0;
810             rel1.to: "elm.swallow.content";
811             rel2.to: "elm.swallow.content";
812             fixed: 1 1;
813             align: 1.0 1.0;
814          }
815       }
816       part { name: "sb_hbar_left_padding";
817          type: SPACER;
818          scale: 1;
819          description { state: "default" 0.0;
820             min: 0 0;
821             max: 0 0;
822             rel1.relative: 0.0 1.0;
823             rel2.relative: 0.0 1.0;
824             rel1.to: "elm.swallow.content";
825             rel2.to: "elm.swallow.content";
826             fixed: 1 1;
827             align: 0.0 1.0;
828          }
829       }
830       part { name: "sb_hbar_right_padding";
831          type: SPACER;
832          scale: 1;
833          description { state: "default" 0.0;
834             min: 0 0;
835             max: 0 0;
836             rel1.relative: 1.0 1.0;
837             rel2.relative: 1.0 1.0;
838             rel1.to: "elm.swallow.content";
839             rel2.to: "elm.swallow.content";
840             fixed: 1 1;
841             align: 1.0 1.0;
842          }
843       }
844       part { name: "sb_hbar_clip_master";
845          type: RECT;
846          mouse_events: 0;
847          scale: 1;
848          description { state: "default" 0.0;
849          }
850          description { state: "hidden" 0.0;
851             visible: 0;
852             color: 255 255 255 0;
853          }
854       }
855       part { name: "sb_hbar_clip";
856          clip_to: "sb_hbar_clip_master";
857          type: RECT;
858          mouse_events: 0;
859          scale: 1;
860          description { state: "default" 0.0;
861          }
862          description { state: "hidden" 0.0;
863             visible: 0;
864             color: 255 255 255 0;
865          }
866       }
867       part { name: "sb_hbar";
868          type: RECT;
869          mouse_events: 0;
870          scale: 1;
871          description { state: "default" 0.0;
872             fixed: 1 1;
873             visible: 0;
874             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
875             align: 0.0 1.0;
876             rel1 {
877                relative: 1.0 0.0;
878                to_x: "sb_hbar_left_padding";
879                to_y: "sb_hbar_bottom_padding";
880             }
881             rel2 {
882                relative: 0.0 0.0;
883                offset: -1 -1;
884                to_x: "sb_hbar_right_padding";
885                to_y: "sb_hbar_bottom_padding";
886             }
887          }
888       }
889       part { name: "elm.dragable.hbar";
890          type: RECT;
891          clip_to: "sb_hbar_clip";
892          mouse_events: 1;
893          scale: 1;
894          dragable {
895             x: 1 1 0;
896             y: 0 0 0;
897             confine: "sb_hbar";
898          }
899          description { state: "default" 0.0;
900             fixed: 1 1;
901             color: 0 0 0 0;
902             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
903             max: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
904             rel1 {
905                relative: 0.5 0.5;
906                offset: 0 0;
907                to: "sb_hbar";
908             }
909             rel2 {
910                relative: 0.5 0.5;
911                offset: 0 0;
912                to: "sb_hbar";
913             }
914          }
915       }
916       part { name: "h_scrollbar_handler_image";
917          clip_to: "sb_hbar_clip";
918          mouse_events: 0;
919          scale: 1;
920          description { state: "default" 0.0;
921             fixed: 1 1;
922             rel1.relative: 0.0 0.0;
923             rel1.to: "elm.dragable.hbar";
924             rel2.relative: 1.0 1.0;
925             rel2.to: "elm.dragable.hbar";
926             visible: 1;
927             image.normal: "00_fast_scroll_handler_bg.#.png";
928             color_class: "B0731L3";
929          }
930       }
931       part { name: "scrollbar_handler_image_hor";
932          clip_to: "sb_hbar_clip";
933          mouse_events: 0;
934          scale: 1;
935          description { state: "default" 0.0;
936          fixed: 1 1;
937             rel1.relative: 0.5 0.5;
938             rel1.to: "elm.dragable.hbar";
939             rel2.relative: 0.5 0.5;
940             rel2.to: "elm.dragable.hbar";
941             visible: 1;
942             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIDDLE_MIN_SIZE_INC;
943             image.normal: "00_fast_scroll_handler_center_h.png";
944          }
945       }
946       part { name: "disabler";
947          type: RECT;
948          scale: 1;
949          description { state: "default" 0.0;
950             rel1.to: "clipper";
951             rel2.to: "clipper";
952             color: 0 0 0 0;
953             visible: 0;
954          }
955          description { state: "disabled" 0.0;
956             inherit: "default" 0.0;
957             visible: 1;
958          }
959       }
960    }
961    programs {
962       program { name: "load";
963          signal: "load";
964          source: "";
965          script {
966             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
967             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
968             set_int(sbvis_h, 0);
969             set_int(sbvis_v, 0);
970             set_int(sbalways_v, 0);
971             set_int(sbalways_h, 0);
972             set_int(sbvis_timer, 0);
973             emit("reload", "elm");
974          }
975       }
976       program { name: "vbar_show";
977          signal: "elm,action,show,vbar";
978          source: "elm";
979          action: STATE_SET "default" 0.0;
980          target: "sb_vbar_clip_master";
981       }
982       program { name: "vbar_hide";
983          signal: "elm,action,hide,vbar";
984          source: "elm";
985          action: STATE_SET "hidden" 0.0;
986          target: "sb_vbar_clip_master";
987       }
988       program { name: "vbar_show_always";
989          signal: "elm,action,show_always,vbar";
990          source: "elm";
991          script {
992             new v;
993             v = get_int(sbalways_v);
994             if (!v) {
995                set_int(sbalways_v, 1);
996                v = get_int(sbvis_v);
997                if (!v) {
998                   emit("do-show-vbar", "");
999                   set_int(sbvis_v, 1);
1000                }
1001             }
1002          }
1003       }
1004       program { name: "vbar_show_notalways";
1005          signal: "elm,action,show_notalways,vbar";
1006          source: "elm";
1007          script {
1008             new v;
1009             v = get_int(sbalways_v);
1010             if (v) {
1011                set_int(sbalways_v, 0);
1012                v = get_int(sbvis_v);
1013                if (!v) {
1014                   emit("do-hide-vbar", "");
1015                   set_int(sbvis_v, 0);
1016                }
1017             }
1018          }
1019       }
1020       program { name: "vbar_press";
1021          signal: "mouse,down,1";
1022          source: "elm.dragable.vbar";
1023          action:  SIGNAL_EMIT "elm,vbar,press" "elm";
1024       }
1025       program { name: "vbar_unpress";
1026          signal: "mouse,up,1";
1027          source: "elm.dragable.vbar";
1028          action:  SIGNAL_EMIT "elm,vbar,unpress" "elm";
1029       }
1030       program { name: "sb_vbar_show";
1031          signal: "do-show-vbar";
1032          source: "";
1033          action: STATE_SET "default" 0.0;
1034          transition: LINEAR 0.1;
1035          target: "sb_vbar_clip";
1036       }
1037       program { name: "sb_vbar_hide";
1038          signal: "do-hide-vbar";
1039          source: "";
1040          action: STATE_SET "hidden" 0.0;
1041          transition: LINEAR 0.1;
1042          target: "sb_vbar_clip";
1043       }
1044       program { name: "hbar_show";
1045          signal: "elm,action,show,hbar";
1046          source: "elm";
1047          action: STATE_SET "default" 0.0;
1048          target: "sb_hbar_clip_master";
1049       }
1050       program { name: "hbar_hide";
1051          signal: "elm,action,hide,hbar";
1052          source: "elm";
1053          action:  STATE_SET "hidden" 0.0;
1054          target: "sb_hbar_clip_master";
1055       }
1056       program { name: "hbar_show_always";
1057          signal: "elm,action,show_always,hbar";
1058          source: "elm";
1059          script {
1060             new v;
1061             v = get_int(sbalways_h);
1062             if (!v) {
1063                set_int(sbalways_h, 1);
1064                v = get_int(sbvis_h);
1065                if (!v) {
1066                   emit("do-show-hbar", "");
1067                   set_int(sbvis_h, 1);
1068                }
1069             }
1070          }
1071       }
1072       program { name: "hbar_show_notalways";
1073          signal: "elm,action,show_notalways,hbar";
1074          source: "elm";
1075          script {
1076             new v;
1077             v = get_int(sbalways_h);
1078             if (v) {
1079                set_int(sbalways_h, 0);
1080                v = get_int(sbvis_h);
1081                if (!v) {
1082                   emit("do-hide-hbar", "");
1083                   set_int(sbvis_h, 0);
1084                }
1085             }
1086          }
1087       }
1088       program { name: "hbar_press";
1089          signal: "mouse,down,1";
1090          source: "elm.dragable.hbar";
1091          action:  SIGNAL_EMIT "elm,hbar,press" "elm";
1092       }
1093       program { name: "hbar_unpress";
1094          signal: "mouse,up,1";
1095          source: "elm.dragable.hbar";
1096          action:  SIGNAL_EMIT "elm,hbar,unpress" "elm";
1097       }
1098       program { name: "sb_hbar_show";
1099          signal: "do-show-hbar";
1100          source: "";
1101          action: STATE_SET "default" 0.0;
1102          transition: LINEAR 0.1;
1103          target: "sb_hbar_clip";
1104       }
1105       program { name: "sb_hbar_hide";
1106          signal: "do-hide-hbar";
1107          source: "";
1108          action: STATE_SET "hidden" 0.0;
1109          transition: LINEAR 0.1;
1110          target: "sb_hbar_clip";
1111       }
1112
1113       program { name: "scroll";
1114          signal: "elm,action,scroll";
1115          source: "elm";
1116          script {
1117             new v;
1118             v = get_int(sbvis_v);
1119             v |= get_int(sbalways_v);
1120             if (!v) {
1121                emit("do-show-vbar", "");
1122                set_int(sbvis_v, 1);
1123             }
1124             v = get_int(sbvis_h);
1125             v |= get_int(sbalways_h);
1126             if (!v) {
1127                emit("do-show-hbar", "");
1128                set_int(sbvis_h, 1);
1129             }
1130             v = get_int(sbvis_timer);
1131             if (v > 0) cancel_timer(v);
1132             v = timer(1.0, "timer0", 0);
1133             set_int(sbvis_timer, v);
1134          }
1135       }
1136       program { name: "disable";
1137          signal: "elm,state,disabled";
1138          source: "elm";
1139          action: STATE_SET "disabled" 0.0;
1140          target: "disabler";
1141       }
1142       program { name: "enable";
1143          signal: "elm,state,enabled";
1144          source: "elm";
1145          action: STATE_SET "default" 0.0;
1146          target: "disabler";
1147       }
1148       program { name: "show";
1149          signal: "show";
1150          source: "";
1151          script {
1152             new v;
1153             emit("do-show-vbar", "");
1154             set_int(sbvis_v, 1);
1155             v = get_int(sbalways_v);
1156             if (!v) {
1157               v = get_int(sbvis_timer);
1158               if (v > 0) cancel_timer(v);
1159               v = timer(1.0, "timer0", 0);
1160               set_int(sbvis_timer, v);
1161             }
1162             emit("do-show-hbar", "");
1163             set_int(sbvis_h, 1);
1164             v = get_int(sbalways_h);
1165             if (!v) {
1166               v = get_int(sbvis_timer);
1167               if (v > 0) cancel_timer(v);
1168               v = timer(1.0, "timer0", 0);
1169               set_int(sbvis_timer, v);
1170             }
1171          }
1172       }
1173    }
1174 }
1175
1176 group { name: "elm/scroller/base/list_effect";
1177    alias: "elm/genlist/base/default";
1178    alias: "elm/genscroller/base/default";
1179    alias: "elm/list/base/default";
1180    alias: "elm/gengrid/base/default";
1181    inherit: "elm/scroller/base/default";
1182
1183    parts {
1184       part { name: "shadow_top1";
1185          clip_to: "clipper";
1186          type: RECT;
1187          scale: 1;
1188          description { state: "default" 0.0;
1189             rel1.relative: 0.0 0.0;
1190             rel1.to: "bg";
1191             rel2.relative: 1.0 0.0;
1192             rel2.to: "bg";
1193             rel2.offset: -1 -1;
1194             align: 0.5 1.0;
1195             min: 0 42;
1196             max: -1 42;
1197             color_class: "B018";
1198             fixed: 0 1;
1199          }
1200          description { state: "start" 0.0;
1201             inherit: "default" 0.0;
1202             rel1.offset: 0 26;
1203             rel2.offset: -1 25;
1204          }
1205       }
1206       part { name: "shadow_top2";
1207          clip_to: "clipper";
1208          type: RECT;
1209          scale: 1;
1210          description { state: "default" 0.0;
1211             rel1.relative: 0.0 0.0;
1212             rel1.to: "bg";
1213             rel2.relative: 1.0 0.0;
1214             rel2.to: "bg";
1215             rel2.offset: -1 -1;
1216             align: 0.5 1.0;
1217             min: 0 27;
1218             max: -1 27;
1219             color_class: "B018";
1220             fixed: 0 1;
1221          }
1222          description { state: "start" 0.0;
1223             inherit: "default" 0.0;
1224             rel1.offset: 0 17;
1225             rel2.offset: -1 16;
1226          }
1227       }
1228       part { name: "shadow_top3";
1229          clip_to: "clipper";
1230          type: RECT;
1231          scale: 1;
1232          description { state: "default" 0.0;
1233             rel1.relative: 0.0 0.0;
1234             rel1.to: "bg";
1235             rel2.relative: 1.0 0.0;
1236             rel2.to: "bg";
1237             rel2.offset: -1 -1;
1238             align: 0.5 1.0;
1239             min: 0 13;
1240             max: -1 13;
1241             color_class: "B018";
1242             fixed: 0 1;
1243          }
1244          description { state: "start" 0.0;
1245             inherit: "default" 0.0;
1246             rel1.offset: 0 8;
1247             rel2.offset: -1 7;
1248          }
1249       }
1250       part { name: "shadow_bottom1";
1251          clip_to: "clipper";
1252          type: RECT;
1253          scale: 1;
1254          description { state: "default" 0.0;
1255             rel1.relative: 0.0 1.0;
1256             rel1.to: "bg";
1257             rel2.relative: 1.0 1.0;
1258             rel2.to: "bg";
1259             rel2.offset: -1 -1;
1260             align: 0.5 0.0;
1261             min: 0 42;
1262             max: -1 42;
1263             color_class: "B018";
1264             fixed: 0 1;
1265          }
1266          description { state: "start" 0.0;
1267             inherit: "default" 0.0;
1268             rel1.offset: 0 -26;
1269             rel2.offset: -1 -25;
1270          }
1271       }
1272       part { name: "shadow_bottom2";
1273          clip_to: "clipper";
1274          type: RECT;
1275          scale: 1;
1276          description { state: "default" 0.0;
1277             rel1.relative: 0.0 1.0;
1278             rel1.to: "bg";
1279             rel2.relative: 1.0 1.0;
1280             rel2.to: "bg";
1281             rel2.offset: -1 -1;
1282             align: 0.5 0.0;
1283             min: 0 27;
1284             max: -1 27;
1285             color_class: "B018";
1286             fixed: 0 1;
1287          }
1288          description { state: "start" 0.0;
1289             inherit: "default" 0.0;
1290             rel1.offset: 0 -17;
1291             rel2.offset: -1 -16;
1292          }
1293       }
1294       part { name: "shadow_bottom3";
1295          clip_to: "clipper";
1296          type: RECT;
1297          scale: 1;
1298          description { state: "default" 0.0;
1299             rel1.relative: 0.0 1.0;
1300             rel1.to: "bg";
1301             rel2.relative: 1.0 1.0;
1302             rel2.to: "bg";
1303             rel2.offset: -1 -1;
1304             align: 0.5 0.0;
1305             min: 0 13;
1306             max: -1 13;
1307             color_class: "B018";
1308             fixed: 0 1;
1309          }
1310          description { state: "start" 0.0;
1311             inherit: "default" 0.0;
1312             rel1.offset: 0 -8;
1313             rel2.offset: -1 -7;
1314          }
1315       }
1316       part { name: "shadow_left1";
1317          clip_to: "clipper";
1318          type: RECT;
1319          scale: 1;
1320          description { state: "default" 0.0;
1321             rel1.relative: 0.0 0.0;
1322             rel1.to: "bg";
1323             rel2.relative: 0.0 1.0;
1324             rel2.to: "bg";
1325             rel2.offset: -1 -1;
1326             align: 1.0 0.5;
1327             min: 42 0;
1328             max: 42 -1;
1329             color_class: "B018";
1330             fixed: 1 0;
1331          }
1332          description { state: "start" 0.0;
1333             inherit: "default" 0.0;
1334             rel1.offset: 26 0;
1335             rel2.offset: 25 -1;
1336          }
1337       }
1338       part { name: "shadow_left2";
1339          clip_to: "clipper";
1340          type: RECT;
1341          scale: 1;
1342          description { state: "default" 0.0;
1343             rel1.relative: 0.0 0.0;
1344             rel1.to: "bg";
1345             rel2.relative: 0.0 1.0;
1346             rel2.to: "bg";
1347             rel2.offset: -1 -1;
1348             align: 1.0 0.5;
1349             min: 27 0;
1350             max: 27 -1;
1351             color_class: "B018";
1352             fixed: 1 0;
1353          }
1354          description { state: "start" 0.0;
1355             inherit: "default" 0.0;
1356             rel1.offset: 17 0;
1357             rel2.offset: 16 -1;
1358          }
1359       }
1360       part { name: "shadow_left3";
1361          clip_to: "clipper";
1362          type: RECT;
1363          scale: 1;
1364          description { state: "default" 0.0;
1365             rel1.relative: 0.0 0.0;
1366             rel1.to: "bg";
1367             rel2.relative: 0.0 1.0;
1368             rel2.to: "bg";
1369             rel2.offset: -1 -1;
1370             align: 1.0 0.5;
1371             min: 13 0;
1372             max: 13 -1;
1373             color_class: "B018";
1374             fixed: 1 0;
1375          }
1376          description { state: "start" 0.0;
1377             inherit: "default" 0.0;
1378             rel1.offset: 8 0;
1379             rel2.offset: 7 -1;
1380          }
1381       }
1382     part { name: "shadow_right1";
1383          clip_to: "clipper";
1384          type: RECT;
1385          scale: 1;
1386          description { state: "default" 0.0;
1387             rel1.relative: 1.0 0.0;
1388             rel1.to: "bg";
1389             rel2.relative: 1.0 1.0;
1390             rel2.to: "bg";
1391             rel2.offset: -1 -1;
1392             align: 0.0 0.5;
1393             min: 42 0;
1394             max: 42 -1;
1395             color_class: "B018";
1396             fixed: 1 0;
1397          }
1398          description { state: "start" 0.0;
1399             inherit: "default" 0.0;
1400             rel1.offset: -26 0;
1401             rel2.offset: -25 -1;
1402          }
1403       }
1404       part { name: "shadow_right2";
1405          clip_to: "clipper";
1406          type: RECT;
1407          scale: 1;
1408          description { state: "default" 0.0;
1409             rel1.relative: 1.0 0.0;
1410             rel1.to: "bg";
1411             rel2.relative: 1.0 1.0;
1412             rel2.to: "bg";
1413             rel2.offset: -1 -1;
1414             align: 0.0 0.5;
1415             min: 27 0;
1416             max: 27 -1;
1417             color_class: "B018";
1418             fixed: 1 0;
1419          }
1420          description { state: "start" 0.0;
1421             inherit: "default" 0.0;
1422             rel1.offset: -17 0;
1423             rel2.offset: -16 -1;
1424          }
1425       }
1426       part { name: "shadow_right3";
1427          clip_to: "clipper";
1428          type: RECT;
1429          scale: 1;
1430          description { state: "default" 0.0;
1431             rel1.relative: 1.0 0.0;
1432             rel1.to: "bg";
1433             rel2.relative: 1.0 1.0;
1434             rel2.to: "bg";
1435             rel2.offset: -1 -1;
1436             align: 0.0 0.5;
1437             min: 13 0;
1438             max: 13 -1;
1439             color_class: "B018";
1440             fixed: 1 0;
1441          }
1442          description { state: "start" 0.0;
1443             inherit: "default" 0.0;
1444             rel1.offset: -8 0;
1445             rel2.offset: -7 -1;
1446          }
1447       }
1448       part { name: "padding_jump_to_top";
1449          type: SPACER;
1450          scale: 1;
1451          description { state: "default" 0.0;
1452             min: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
1453             max: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
1454             rel1.relative: 1.0 0.0;
1455             rel2.relative: 1.0 0.0;
1456             rel1.to: "bg";
1457             rel2.to: "bg";
1458             fixed: 1 1;
1459             align: 1.0 0.0;
1460          }
1461       }
1462       part { name: "elm.swallow.jump_to_top";
1463          type: SWALLOW;
1464          scale: 1;
1465          description { state: "default" 0.0;
1466             rel1 {
1467                to: "padding_jump_to_top";
1468                relative: 0.0 1.0;
1469             }
1470             rel2 {
1471                to: "padding_jump_to_top";
1472                relative: 0.0 1.0;
1473             }
1474             fixed: 1 1;
1475             align: 1.0 0.0;
1476          }
1477       }
1478       part { name: "padding_jump_to_left";
1479          type: SPACER;
1480          scale: 1;
1481          description { state: "default" 0.0;
1482             min: BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC;
1483             max: BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC;
1484             rel1.relative: 0.0 1.0;
1485             rel2.relative: 0.0 1.0;
1486             rel1.to: "bg";
1487             rel2.to: "bg";
1488             fixed: 1 1;
1489             align: 0.0 1.0;
1490          }
1491       }
1492       part { name: "elm.swallow.jump_to_left";
1493          type: SWALLOW;
1494          scale: 1;
1495          description { state: "default" 0.0;
1496             rel1 {
1497                to: "padding_jump_to_left";
1498                relative: 1.0 0.0;
1499             }
1500             rel2 {
1501                to: "padding_jump_to_left";
1502                relative: 1.0 0.0;
1503             }
1504             fixed: 1 1;
1505             align: 0.0 1.0;
1506          }
1507       }
1508       part { name: "event";
1509          type: RECT;
1510          mouse_events: 1;
1511          repeat_events: 1;
1512          description { state: "default" 0.0;
1513             color: 0 0 0 0;
1514          }
1515       }
1516    }
1517    programs {
1518       program { name: "load";
1519          script {
1520             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
1521             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
1522             set_int(sbvis_h, 0);
1523             set_int(sbvis_v, 0);
1524             set_int(sbalways_v, 0);
1525             set_int(sbalways_h, 0);
1526             set_int(sbvis_timer, 0);
1527             set_int(sh_v, 0);
1528             emit("reload", "elm");
1529          }
1530       }
1531       program { name: "scroll";
1532          signal: "elm,action,scroll";
1533          source: "elm";
1534          script {
1535             new v;
1536             v = get_int(sbvis_v);
1537             v |= get_int(sbalways_v);
1538             if (!v) {
1539                emit("do-show-vbar", "");
1540                set_int(sbvis_v, 1);
1541             }
1542             v = get_int(sbvis_h);
1543             v |= get_int(sbalways_h);
1544             if (!v) {
1545                emit("do-show-hbar", "");
1546                set_int(sbvis_h, 1);
1547             }
1548             v = get_int(sbvis_timer);
1549             if (v > 0) cancel_timer(v);
1550             v = timer(1, "timer0", 0);
1551             set_int(sbvis_timer, v);
1552          }
1553       }
1554       program { name: "edge_top_mouse_down";
1555          signal: "elm,state,mouse,down";
1556          source: "elm";
1557          script {
1558             set_int(effect_top_down, 1);
1559          }
1560       }
1561       /* Effect Hide */
1562       program { name: "edge_top_mouse_up";
1563          signal: "elm,state,mouse,up";
1564          source: "elm";
1565          script {
1566             set_int(effect_top_down, 0);
1567             if (get_int(effect_top_start))
1568               {
1569                  set_int(effect_top_reset, 0);
1570                  if (!get_int(effect_top_anim))
1571                    {
1572                       if (!get_int(effect_top_end))
1573                         {
1574                            set_int(effect_top_end, 1);
1575                            run_program(PROGRAM:"edge_top_end");
1576                         }
1577                    }
1578               }
1579          }
1580       }
1581       program { name: "edge_top_scroll";
1582          signal: "elm,action,scroll";
1583          source: "elm";
1584          script {
1585             if (get_int(effect_top_start))
1586             {
1587                set_state(PART:"shadow_top1", "default", 0.0);
1588                set_state(PART:"shadow_top2", "default", 0.0);
1589                set_state(PART:"shadow_top3", "default", 0.0);
1590                set_int(effect_top_reset, 0);
1591                run_program(PROGRAM:"edge_top_init");
1592             }
1593          }
1594       }
1595       program { name: "edge_top_end";
1596          action: STATE_SET "default" 0.0;
1597          target: "shadow_top1";
1598          target: "shadow_top2";
1599          target: "shadow_top3";
1600          transition: SINUSOIDAL 0.3;
1601          after: "edge_top_init";
1602       }
1603       program { name: "edge_top_init";
1604          script {
1605             set_int(effect_top_move, 0);
1606             if (!get_int(effect_top_reset))
1607               set_int(effect_top_start, 0);
1608             set_int(effect_top_max, 0);
1609             set_int(top_prev_diff, 0);
1610             set_int(effect_top_end, 0);
1611          }
1612       }
1613       /* Effect Show */
1614       program { name: "edge_top";
1615          signal: "elm,edge,top";
1616          source: "elm";
1617          script {
1618              if (!get_int(effect_top_start))
1619                {
1620                   set_int(effect_top_start, 1);
1621                   set_int(effect_top_anim, 1);
1622                   run_program(PROGRAM:"edge_top_start");
1623                }
1624          }
1625       }
1626       program { name: "edge_top_start";
1627          action: STATE_SET "start" 0.0;
1628          target: "shadow_top1";
1629          target: "shadow_top2";
1630          target: "shadow_top3";
1631          transition: SINUSOIDAL 0.2;
1632          after: "edge_top_after";
1633       }
1634       program { name: "edge_top_after";
1635          script {
1636             new xx, yy;
1637             get_mouse(xx, yy);
1638             set_int(top_down_y, yy);
1639             set_int(effect_top_anim, 0);
1640             /* mouse down */
1641             if (get_int(effect_top_down))
1642               {
1643                  set_int(effect_top_move, 1);
1644               }
1645             /* mouse up */
1646             else
1647               {
1648                  set_int(effect_top_reset, 0);
1649                  if (!get_int(effect_top_end))
1650                    {
1651                       set_int(effect_top_end, 1);
1652                       run_program(PROGRAM:"edge_top_end");
1653                    }
1654               }
1655          }
1656       }
1657       program { name: "edge_top_mouse_move";
1658          signal: "elm,state,mouse,move";
1659          source: "elm";
1660          script {
1661             if (get_int(effect_top_move))
1662               {
1663                  new xx, yy;
1664                  new Float:fx1, Float:fx2, Float:fx3;
1665                  get_mouse(xx, yy);
1666                  set_int(top_move_y, yy);
1667                  set_int(top_diff, (get_int(top_move_y) - get_int(top_down_y)));
1668                  if (get_int(top_diff) < get_int(top_prev_diff))
1669                    {
1670                       set_int(top_prev_diff, 0);
1671                       set_int(effect_top_move, 0);
1672                       set_int(effect_top_reset, 1);
1673                       if (!get_int(effect_top_end))
1674                         {
1675                            set_int(effect_top_end, 1);
1676                            run_program(PROGRAM:"edge_top_end");
1677                         }
1678                    }
1679                  else
1680                    {
1681                       if (!get_int(effect_top_end))
1682                         {
1683                           if (get_int(top_diff) <= 90 && !get_int(effect_top_max))
1684                             {
1685                                fx1 = fx2 = fx3 = sin(get_int(top_diff), DEGREES);
1686                                fx1 = fx1 * 16.0 + 26;
1687                                fx2 = fx2 * 10.0 + 17;
1688                                fx3 = fx3 * 5.0 + 8;
1689                             }
1690                           else
1691                             {
1692                                set_int(effect_top_max, 1);
1693                                fx1 = 42.0;
1694                                fx2 = 27.0;
1695                                fx3 = 13.0;
1696                             }
1697                           custom_state(PART:"shadow_top1", "default", 0.0);
1698                           set_state_val(PART:"shadow_top1", STATE_REL1_OFFSET, 0, round(fx1));
1699                           set_state_val(PART:"shadow_top1", STATE_REL2_OFFSET, -1, round(fx1) - 1);
1700                           set_state(PART:"shadow_top1", "custom", 0.0);
1701
1702                           custom_state(PART:"shadow_top2", "default", 0.0);
1703                           set_state_val(PART:"shadow_top2", STATE_REL1_OFFSET, 0, round(fx2));
1704                           set_state_val(PART:"shadow_top2", STATE_REL2_OFFSET, -1, round(fx2) - 1);
1705                           set_state(PART:"shadow_top2", "custom", 0.0);
1706
1707                           custom_state(PART:"shadow_top3", "default", 0.0);
1708                           set_state_val(PART:"shadow_top3", STATE_REL1_OFFSET, 0, round(fx3));
1709                           set_state_val(PART:"shadow_top3", STATE_REL2_OFFSET, -1, round(fx3) - 1);
1710                           set_state(PART:"shadow_top3", "custom", 0.0);
1711                           set_int(top_prev_diff, get_int(top_diff));
1712                         }
1713                    }
1714              }
1715          }
1716       }
1717       program { name: "edge_bottom_mouse_down";
1718          signal: "elm,state,mouse,down";
1719          source: "elm";
1720          script {
1721             set_int(effect_bottom_down, 1);
1722          }
1723       }
1724       /* Effect Hide */
1725       program { name: "edge_bottom_mouse_up";
1726          signal: "elm,state,mouse,up";
1727          source: "elm";
1728          script {
1729             set_int(effect_bottom_down, 0);
1730             if (get_int(effect_bottom_start))
1731               {
1732                  set_int(effect_bottom_reset, 0);
1733                  if (!get_int(effect_bottom_anim))
1734                    {
1735                       if (!get_int(effect_bottom_end))
1736                         {
1737                            set_int(effect_bottom_end, 1);
1738                            run_program(PROGRAM:"edge_bottom_end");
1739                         }
1740                    }
1741               }
1742          }
1743       }
1744       program { name: "edge_bottom_scroll";
1745          signal: "elm,action,scroll";
1746          source: "elm";
1747          script {
1748             if (get_int(effect_bottom_start))
1749             {
1750                set_state(PART:"shadow_bottom1", "default", 0.0);
1751                set_state(PART:"shadow_bottom2", "default", 0.0);
1752                set_state(PART:"shadow_bottom3", "default", 0.0);
1753                set_int(effect_bottom_reset, 0);
1754                run_program(PROGRAM:"edge_bottom_init");
1755             }
1756          }
1757       }
1758       program { name: "edge_bottom_end";
1759          action: STATE_SET "default" 0.0;
1760          target: "shadow_bottom1";
1761          target: "shadow_bottom2";
1762          target: "shadow_bottom3";
1763          transition: SINUSOIDAL 0.3;
1764          after: "edge_bottom_init";
1765       }
1766       program { name: "edge_bottom_init";
1767          script {
1768             set_int(effect_bottom_move, 0);
1769             if (!get_int(effect_bottom_reset))
1770               set_int(effect_bottom_start, 0);
1771             set_int(effect_bottom_max, 0);
1772             set_int(bottom_prev_diff, 0);
1773             set_int(effect_bottom_end, 0);
1774          }
1775       }
1776       /* Effect Show */
1777       program { name: "edge_bottom";
1778          signal: "elm,edge,bottom";
1779          source: "elm";
1780          script {
1781              if (!get_int(effect_bottom_start))
1782                {
1783                   set_int(effect_bottom_start, 1);
1784                   set_int(effect_bottom_anim, 1);
1785                   run_program(PROGRAM:"edge_bottom_start");
1786                }
1787          }
1788       }
1789       program { name: "edge_bottom_start";
1790          action: STATE_SET "start" 0.0;
1791          target: "shadow_bottom1";
1792          target: "shadow_bottom2";
1793          target: "shadow_bottom3";
1794          transition: SINUSOIDAL 0.2;
1795          after: "edge_bottom_after";
1796       }
1797       program { name: "edge_bottom_after";
1798          script {
1799             new xx, yy;
1800             get_mouse(xx, yy);
1801             set_int(effect_bottom_anim, 0);
1802             set_int(bottom_down_y, yy);
1803             /* mouse down */
1804             if (get_int(effect_bottom_down))
1805               {
1806                  set_int(effect_bottom_move, 1);
1807               }
1808             /* mouse up */
1809             else
1810               {
1811                  set_int(effect_bottom_reset, 0);
1812                  if (!get_int(effect_bottom_end))
1813                    {
1814                       set_int(effect_bottom_end, 1);
1815                       run_program(PROGRAM:"edge_bottom_end");
1816                    }
1817               }
1818          }
1819       }
1820       program { name: "edge_bottom_mouse_move";
1821          signal: "elm,state,mouse,move";
1822          source: "elm";
1823          script {
1824             if (get_int(effect_bottom_move))
1825               {
1826                  new xx, yy;
1827                  new Float:fx1, Float:fx2, Float:fx3;
1828                  get_mouse(xx, yy);
1829                  set_int(bottom_move_y, yy);
1830                  set_int(bottom_diff, (get_int(bottom_down_y) - get_int(bottom_move_y)));
1831                  if (get_int(bottom_diff) < get_int(bottom_prev_diff))
1832                    {
1833                       set_int(bottom_prev_diff, 0);
1834                       set_int(effect_bottom_move, 0);
1835                       set_int(effect_bottom_reset, 1);
1836                       if (!get_int(effect_bottom_end))
1837                         {
1838                            set_int(effect_bottom_end, 1);
1839                            run_program(PROGRAM:"edge_bottom_end");
1840                         }
1841                    }
1842                  else
1843                    {
1844                       if (!get_int(effect_bottom_end))
1845                         {
1846                            if (get_int(bottom_diff) <= 90 && !get_int(effect_bottom_max))
1847                              {
1848                                 fx1 = fx2 = fx3 = sin(get_int(bottom_diff), DEGREES);
1849                                 fx1 = fx1 * 16.0 + 26;
1850                                 fx2 = fx2 * 10.0 + 17;
1851                                 fx3 = fx3 * 5.0 + 8;
1852                              }
1853                            else
1854                              {
1855                                 set_int(effect_bottom_max, 1);
1856                                 fx1 = 42.0;
1857                                 fx2 = 27.0;
1858                                 fx3 = 13.0;
1859                              }
1860                            custom_state(PART:"shadow_bottom1", "default", 0.0);
1861                            set_state_val(PART:"shadow_bottom1", STATE_REL1_OFFSET, 0, round(fx1) * -1);
1862                            set_state_val(PART:"shadow_bottom1", STATE_REL2_OFFSET, -1, (round(fx1) - 1) * -1);
1863                            set_state(PART:"shadow_bottom1", "custom", 0.0);
1864
1865                            custom_state(PART:"shadow_bottom2", "default", 0.0);
1866                            set_state_val(PART:"shadow_bottom2", STATE_REL1_OFFSET, 0, round(fx2) * -1);
1867                            set_state_val(PART:"shadow_bottom2", STATE_REL2_OFFSET, -1, (round(fx2) - 1) * -1);
1868                            set_state(PART:"shadow_bottom2", "custom", 0.0);
1869
1870                            custom_state(PART:"shadow_bottom3", "default", 0.0);
1871                            set_state_val(PART:"shadow_bottom3", STATE_REL1_OFFSET, 0, round(fx3) * -1);
1872                            set_state_val(PART:"shadow_bottom3", STATE_REL2_OFFSET, -1, (round(fx3) - 1) * -1 );
1873                            set_state(PART:"shadow_bottom3", "custom", 0.0);
1874                            set_int(bottom_prev_diff, get_int(bottom_diff));
1875                         }
1876                    }
1877              }
1878          }
1879       }
1880       program { name: "edge_left_mouse_down";
1881          signal: "elm,state,mouse,down";
1882          source: "elm";
1883          script {
1884             set_int(effect_left_down, 1);
1885          }
1886       }
1887       /* Effect Hide */
1888       program { name: "edge_left_mouse_up";
1889          signal: "elm,state,mouse,up";
1890          source: "elm";
1891          script {
1892             set_int(effect_left_down, 0);
1893             if (get_int(effect_left_start))
1894               {
1895                  set_int(effect_left_reset, 0);
1896                  if (!get_int(effect_left_anim))
1897                    {
1898                       if (!get_int(effect_left_end))
1899                         {
1900                            set_int(effect_left_end, 1);
1901                            run_program(PROGRAM:"edge_left_end");
1902                         }
1903                    }
1904               }
1905          }
1906       }
1907       program { name: "edge_left_scroll";
1908          signal: "elm,action,scroll";
1909          source: "elm";
1910          script {
1911             if (get_int(effect_left_start))
1912             {
1913                set_state(PART:"shadow_left1", "default", 0.0);
1914                set_state(PART:"shadow_left2", "default", 0.0);
1915                set_state(PART:"shadow_left3", "default", 0.0);
1916                set_int(effect_left_reset, 0);
1917                run_program(PROGRAM:"edge_left_init");
1918             }
1919          }
1920       }
1921       program { name: "edge_left_end";
1922          action: STATE_SET "default" 0.0;
1923          target: "shadow_left1";
1924          target: "shadow_left2";
1925          target: "shadow_left3";
1926          transition: SINUSOIDAL 0.3;
1927          after: "edge_left_init";
1928       }
1929       program { name: "edge_left_init";
1930          script {
1931             set_int(effect_left_move, 0);
1932             if (!get_int(effect_left_reset))
1933               set_int(effect_left_start, 0);
1934             set_int(effect_left_max, 0);
1935             set_int(left_prev_diff, 0);
1936             set_int(effect_left_end, 0);
1937          }
1938       }
1939       /* Effect Show */
1940       program { name: "edge_left";
1941          signal: "elm,edge,left";
1942          source: "elm";
1943          script {
1944              if (!get_int(effect_left_start))
1945                {
1946                   set_int(effect_left_start, 1);
1947                   set_int(effect_left_anim, 1);
1948                   run_program(PROGRAM:"edge_left_start");
1949                }
1950          }
1951       }
1952       program { name: "edge_left_start";
1953          action: STATE_SET "start" 0.0;
1954          target: "shadow_left1";
1955          target: "shadow_left2";
1956          target: "shadow_left3";
1957          transition: SINUSOIDAL 0.2;
1958          after: "edge_left_after";
1959       }
1960       program { name: "edge_left_after";
1961          script {
1962             new xx, yy;
1963             get_mouse(xx, yy);
1964             set_int(left_down_x, xx);
1965             set_int(effect_left_anim, 0);
1966             /* mouse down */
1967             if (get_int(effect_left_down))
1968               {
1969                  set_int(effect_left_move, 1);
1970               }
1971             /* mouse up */
1972             else
1973               {
1974                  set_int(effect_left_reset, 0);
1975                  if (!get_int(effect_left_end))
1976                    {
1977                       set_int(effect_left_end, 1);
1978                       run_program(PROGRAM:"edge_left_end");
1979                    }
1980               }
1981          }
1982       }
1983       program { name: "edge_left_mouse_move";
1984          signal: "elm,state,mouse,move";
1985          source: "elm";
1986          script {
1987             if (get_int(effect_left_move))
1988               {
1989                  new xx, yy;
1990                  new Float:fx1, Float:fx2, Float:fx3;
1991                  get_mouse(xx, yy);
1992                  set_int(left_move_x, xx);
1993                  set_int(left_diff, (get_int(left_move_x) - get_int(left_down_x)));
1994                  if (get_int(left_diff) < get_int(left_prev_diff))
1995                    {
1996                       set_int(left_prev_diff, 0);
1997                       set_int(effect_left_move, 0);
1998                       set_int(effect_left_reset, 1);
1999                       if (!get_int(effect_left_end))
2000                         {
2001                            set_int(effect_left_end, 1);
2002                            run_program(PROGRAM:"edge_left_end");
2003                         }
2004                    }
2005                  else
2006                    {
2007                       if (!get_int(effect_left_end))
2008                         {
2009                            if (get_int(left_diff) <= 90 && !get_int(effect_left_max))
2010                              {
2011                                 fx1 = fx2 = fx3 = sin(get_int(left_diff), DEGREES);
2012                                 fx1 = fx1 * 16.0 + 26;
2013                                 fx2 = fx2 * 10.0 + 17;
2014                                 fx3 = fx3 * 5.0 + 8;
2015                              }
2016                            else
2017                              {
2018                                 set_int(effect_left_max, 1);
2019                                 fx1 = 42.0;
2020                                 fx2 = 27.0;
2021                                 fx3 = 13.0;
2022                              }
2023                            custom_state(PART:"shadow_left1", "default", 0.0);
2024                            set_state_val(PART:"shadow_left1", STATE_REL1_OFFSET, round(fx1), 0);
2025                            set_state_val(PART:"shadow_left1", STATE_REL2_OFFSET, round(fx1) - 1, -1);
2026                            set_state(PART:"shadow_left1", "custom", 0.0);
2027
2028                            custom_state(PART:"shadow_left2", "default", 0.0);
2029                            set_state_val(PART:"shadow_left2", STATE_REL1_OFFSET, round(fx2), 0);
2030                            set_state_val(PART:"shadow_left2", STATE_REL2_OFFSET, round(fx2) - 1, - 1);
2031                            set_state(PART:"shadow_left2", "custom", 0.0);
2032
2033                            custom_state(PART:"shadow_left3", "default", 0.0);
2034                            set_state_val(PART:"shadow_left3", STATE_REL1_OFFSET, round(fx3), 0);
2035                            set_state_val(PART:"shadow_left3", STATE_REL2_OFFSET, round(fx3) - 1, - 1);
2036                            set_state(PART:"shadow_left3", "custom", 0.0);
2037                            set_int(left_prev_diff, get_int(left_diff));
2038                         }
2039                    }
2040              }
2041          }
2042       }
2043       program { name: "edge_right_mouse_down";
2044          signal: "elm,state,mouse,down";
2045          source: "elm";
2046          script {
2047             set_int(effect_right_down, 1);
2048          }
2049       }
2050       /* Effect Hide */
2051       program { name: "edge_right_mouse_up";
2052          signal: "elm,state,mouse,up";
2053          source: "elm";
2054          script {
2055             set_int(effect_right_down, 0);
2056             if (get_int(effect_right_start))
2057               {
2058                  set_int(effect_right_reset, 0);
2059                  if (!get_int(effect_right_anim))
2060                    {
2061                       if (!get_int(effect_right_end))
2062                         {
2063                            set_int(effect_right_end, 1);
2064                            run_program(PROGRAM:"edge_right_end");
2065                         }
2066                    }
2067               }
2068          }
2069       }
2070       program { name: "edge_right_scroll";
2071          signal: "elm,action,scroll";
2072          source: "elm";
2073          script {
2074             if (get_int(effect_right_start))
2075             {
2076                set_state(PART:"shadow_right1", "default", 0.0);
2077                set_state(PART:"shadow_right2", "default", 0.0);
2078                set_state(PART:"shadow_right3", "default", 0.0);
2079                set_int(effect_right_reset, 0);
2080                run_program(PROGRAM:"edge_right_init");
2081             }
2082          }
2083       }
2084       program { name: "edge_right_end";
2085          action: STATE_SET "default" 0.0;
2086          target: "shadow_right1";
2087          target: "shadow_right2";
2088          target: "shadow_right3";
2089          transition: SINUSOIDAL 0.3;
2090          after: "edge_right_init";
2091       }
2092       program { name: "edge_right_init";
2093          script {
2094             set_int(effect_right_move, 0);
2095             if (!get_int(effect_right_reset))
2096               set_int(effect_right_start, 0);
2097             set_int(effect_right_max, 0);
2098             set_int(right_prev_diff, 0);
2099             set_int(effect_right_end, 0);
2100          }
2101       }
2102       /* Effect Show */
2103       program { name: "edge_right";
2104          signal: "elm,edge,right";
2105          source: "elm";
2106          script {
2107              if (!get_int(effect_right_start))
2108                {
2109                   set_int(effect_right_start, 1);
2110                   set_int(effect_right_anim, 1);
2111                   run_program(PROGRAM:"edge_right_start");
2112                }
2113          }
2114       }
2115       program { name: "edge_right_start";
2116          action: STATE_SET "start" 0.0;
2117          target: "shadow_right1";
2118          target: "shadow_right2";
2119          target: "shadow_right3";
2120          transition: SINUSOIDAL 0.2;
2121          after: "edge_right_after";
2122       }
2123       program { name: "edge_right_after";
2124          script {
2125             new xx, yy;
2126             get_mouse(xx, yy);
2127             set_int(right_down_x, xx);
2128             set_int(effect_right_anim, 0);
2129             /* mouse down */
2130             if (get_int(effect_right_down))
2131               {
2132                  set_int(effect_right_move, 1);
2133               }
2134             /* mouse up */
2135             else
2136               {
2137                  set_int(effect_right_reset, 0);
2138                  if (!get_int(effect_right_end))
2139                    {
2140                       set_int(effect_right_end, 1);
2141                       run_program(PROGRAM:"edge_right_end");
2142                    }
2143               }
2144          }
2145       }
2146       program { name: "edge_right_mouse_move";
2147          signal: "elm,state,mouse,move";
2148          source: "elm";
2149          script {
2150             if (get_int(effect_right_move))
2151               {
2152                  new xx, yy;
2153                  new Float:fx1, Float:fx2, Float:fx3;
2154                  get_mouse(xx, yy);
2155                  set_int(right_move_x, xx);
2156                  set_int(right_diff, (get_int(right_down_x) - get_int(right_move_x)));
2157                  if (get_int(right_diff) < get_int(right_prev_diff))
2158                    {
2159                       set_int(right_prev_diff, 0);
2160                       set_int(effect_right_move, 0);
2161                       set_int(effect_right_reset, 1);
2162                       if (!get_int(effect_right_end))
2163                         {
2164                            set_int(effect_right_end, 1);
2165                            run_program(PROGRAM:"edge_right_end");
2166                         }
2167                    }
2168                  else
2169                    {
2170                       if (!get_int(effect_right_end))
2171                         {
2172                            if (get_int(right_diff) <= 90 && !get_int(effect_right_max))
2173                              {
2174                                 fx1 = fx2 = fx3 = sin(get_int(right_diff), DEGREES);
2175                                 fx1 = fx1 * 10.0 + 32;
2176                                 fx2 = fx2 * 7.0 + 20;
2177                                 fx3 = fx3 * 3.0 + 10;
2178                              }
2179                            else
2180                              {
2181                                 set_int(effect_right_max, 1);
2182                                 fx1 = 42.0;
2183                                 fx2 = 27.0;
2184                                 fx3 = 13.0;
2185                              }
2186                            custom_state(PART:"shadow_right1", "default", 0.0);
2187                            set_state_val(PART:"shadow_right1", STATE_REL1_OFFSET, round(fx1) * -1, 0);
2188                            set_state_val(PART:"shadow_right1", STATE_REL2_OFFSET, (round(fx1) - 1) * -1, -1);
2189                            set_state(PART:"shadow_right1", "custom", 0.0);
2190
2191                            custom_state(PART:"shadow_right2", "default", 0.0);
2192                            set_state_val(PART:"shadow_right2", STATE_REL1_OFFSET, round(fx2) * -1, 0);
2193                            set_state_val(PART:"shadow_right2", STATE_REL2_OFFSET, (round(fx2) - 1) * -1, - 1);
2194                            set_state(PART:"shadow_right2", "custom", 0.0);
2195
2196                            custom_state(PART:"shadow_right3", "default", 0.0);
2197                            set_state_val(PART:"shadow_right3", STATE_REL1_OFFSET, round(fx3) * -1, 0);
2198                            set_state_val(PART:"shadow_right3", STATE_REL2_OFFSET, (round(fx3) - 1) * -1, - 1);
2199                            set_state(PART:"shadow_right3", "custom", 0.0);
2200                            set_int(right_prev_diff, get_int(right_diff));
2201                         }
2202                    }
2203              }
2204          }
2205       }
2206    }
2207 }
2208
2209 group { name: "elm/scroller/base/handler/list_effect";
2210    alias: "elm/genlist/base/handler";
2211    alias: "elm/genscroller/base/handler";
2212    alias: "elm/list/base/handler";
2213    alias: "elm/gengrid/base/handler";
2214    inherit: "elm/scroller/base/handler";
2215
2216    parts {
2217       part { name: "shadow_top1";
2218          clip_to: "clipper";
2219          type: RECT;
2220          scale: 1;
2221          description { state: "default" 0.0;
2222             rel1.relative: 0.0 0.0;
2223             rel1.to: "bg";
2224             rel2.relative: 1.0 0.0;
2225             rel2.to: "bg";
2226             rel2.offset: -1 -1;
2227             align: 0.5 1.0;
2228             min: 0 42;
2229             max: -1 42;
2230             color_class: "B018";
2231             fixed: 0 1;
2232          }
2233          description { state: "start" 0.0;
2234             inherit: "default" 0.0;
2235             rel1.offset: 0 26;
2236             rel2.offset: -1 25;
2237          }
2238       }
2239       part { name: "shadow_top2";
2240          clip_to: "clipper";
2241          type: RECT;
2242          scale: 1;
2243          description { state: "default" 0.0;
2244             rel1.relative: 0.0 0.0;
2245             rel1.to: "bg";
2246             rel2.relative: 1.0 0.0;
2247             rel2.to: "bg";
2248             rel2.offset: -1 -1;
2249             align: 0.5 1.0;
2250             min: 0 27;
2251             max: -1 27;
2252             color_class: "B018";
2253             fixed: 0 1;
2254          }
2255          description { state: "start" 0.0;
2256             inherit: "default" 0.0;
2257             rel1.offset: 0 17;
2258             rel2.offset: -1 16;
2259          }
2260       }
2261       part { name: "shadow_top3";
2262          clip_to: "clipper";
2263          type: RECT;
2264          scale: 1;
2265          description { state: "default" 0.0;
2266             rel1.relative: 0.0 0.0;
2267             rel1.to: "bg";
2268             rel2.relative: 1.0 0.0;
2269             rel2.to: "bg";
2270             rel2.offset: -1 -1;
2271             align: 0.5 1.0;
2272             min: 0 13;
2273             max: -1 13;
2274             color_class: "B018";
2275             fixed: 0 1;
2276          }
2277          description { state: "start" 0.0;
2278             inherit: "default" 0.0;
2279             rel1.offset: 0 8;
2280             rel2.offset: -1 7;
2281          }
2282       }
2283       part { name: "shadow_bottom1";
2284          clip_to: "clipper";
2285          type: RECT;
2286          scale: 1;
2287          description { state: "default" 0.0;
2288             rel1.relative: 0.0 1.0;
2289             rel1.to: "bg";
2290             rel2.relative: 1.0 1.0;
2291             rel2.to: "bg";
2292             rel2.offset: -1 -1;
2293             align: 0.5 0.0;
2294             min: 0 42;
2295             max: -1 42;
2296             color_class: "B018";
2297             fixed: 0 1;
2298          }
2299          description { state: "start" 0.0;
2300             inherit: "default" 0.0;
2301             rel1.offset: 0 -26;
2302             rel2.offset: -1 -25;
2303          }
2304       }
2305       part { name: "shadow_bottom2";
2306          clip_to: "clipper";
2307          type: RECT;
2308          scale: 1;
2309          description { state: "default" 0.0;
2310             rel1.relative: 0.0 1.0;
2311             rel1.to: "bg";
2312             rel2.relative: 1.0 1.0;
2313             rel2.to: "bg";
2314             rel2.offset: -1 -1;
2315             align: 0.5 0.0;
2316             min: 0 27;
2317             max: -1 27;
2318             color_class: "B018";
2319             fixed: 0 1;
2320          }
2321          description { state: "start" 0.0;
2322             inherit: "default" 0.0;
2323             rel1.offset: 0 -17;
2324             rel2.offset: -1 -16;
2325          }
2326       }
2327       part { name: "shadow_bottom3";
2328          clip_to: "clipper";
2329          type: RECT;
2330          scale: 1;
2331          description { state: "default" 0.0;
2332             rel1.relative: 0.0 1.0;
2333             rel1.to: "bg";
2334             rel2.relative: 1.0 1.0;
2335             rel2.to: "bg";
2336             rel2.offset: -1 -1;
2337             align: 0.5 0.0;
2338             min: 0 13;
2339             max: -1 13;
2340             color_class: "B018";
2341             fixed: 0 1;
2342          }
2343          description { state: "start" 0.0;
2344             inherit: "default" 0.0;
2345             rel1.offset: 0 -8;
2346             rel2.offset: -1 -7;
2347          }
2348       }
2349       part { name: "shadow_left1";
2350          clip_to: "clipper";
2351          type: RECT;
2352          scale: 1;
2353          description { state: "default" 0.0;
2354             rel1.relative: 0.0 0.0;
2355             rel1.to: "bg";
2356             rel2.relative: 0.0 1.0;
2357             rel2.to: "bg";
2358             rel2.offset: -1 -1;
2359             align: 1.0 0.5;
2360             min: 42 0;
2361             max: 42 -1;
2362             color_class: "B018";
2363             fixed: 1 0;
2364          }
2365          description { state: "start" 0.0;
2366             inherit: "default" 0.0;
2367             rel1.offset: 26 0;
2368             rel2.offset: 25 -1;
2369          }
2370       }
2371       part { name: "shadow_left2";
2372          clip_to: "clipper";
2373          type: RECT;
2374          scale: 1;
2375          description { state: "default" 0.0;
2376             rel1.relative: 0.0 0.0;
2377             rel1.to: "bg";
2378             rel2.relative: 0.0 1.0;
2379             rel2.to: "bg";
2380             rel2.offset: -1 -1;
2381             align: 1.0 0.5;
2382             min: 27 0;
2383             max: 27 -1;
2384             color_class: "B018";
2385             fixed: 1 0;
2386          }
2387          description { state: "start" 0.0;
2388             inherit: "default" 0.0;
2389             rel1.offset: 17 0;
2390             rel2.offset: 16 -1;
2391          }
2392       }
2393       part { name: "shadow_left3";
2394          clip_to: "clipper";
2395          type: RECT;
2396          scale: 1;
2397          description { state: "default" 0.0;
2398             rel1.relative: 0.0 0.0;
2399             rel1.to: "bg";
2400             rel2.relative: 0.0 1.0;
2401             rel2.to: "bg";
2402             rel2.offset: -1 -1;
2403             align: 1.0 0.5;
2404             min: 13 0;
2405             max: 13 -1;
2406             color_class: "B018";
2407             fixed: 1 0;
2408          }
2409          description { state: "start" 0.0;
2410             inherit: "default" 0.0;
2411             rel1.offset: 8 0;
2412             rel2.offset: 7 -1;
2413          }
2414       }
2415     part { name: "shadow_right1";
2416          clip_to: "clipper";
2417          type: RECT;
2418          scale: 1;
2419          description { state: "default" 0.0;
2420             rel1.relative: 1.0 0.0;
2421             rel1.to: "bg";
2422             rel2.relative: 1.0 1.0;
2423             rel2.to: "bg";
2424             rel2.offset: -1 -1;
2425             align: 0.0 0.5;
2426             min: 42 0;
2427             max: 42 -1;
2428             color_class: "B018";
2429             fixed: 1 0;
2430          }
2431          description { state: "start" 0.0;
2432             inherit: "default" 0.0;
2433             rel1.offset: -26 0;
2434             rel2.offset: -25 -1;
2435          }
2436       }
2437       part { name: "shadow_right2";
2438          clip_to: "clipper";
2439          type: RECT;
2440          scale: 1;
2441          description { state: "default" 0.0;
2442             rel1.relative: 1.0 0.0;
2443             rel1.to: "bg";
2444             rel2.relative: 1.0 1.0;
2445             rel2.to: "bg";
2446             rel2.offset: -1 -1;
2447             align: 0.0 0.5;
2448             min: 27 0;
2449             max: 27 -1;
2450             color_class: "B018";
2451             fixed: 1 0;
2452          }
2453          description { state: "start" 0.0;
2454             inherit: "default" 0.0;
2455             rel1.offset: -17 0;
2456             rel2.offset: -16 -1;
2457          }
2458       }
2459       part { name: "shadow_right3";
2460          clip_to: "clipper";
2461          type: RECT;
2462          scale: 1;
2463          description { state: "default" 0.0;
2464             rel1.relative: 1.0 0.0;
2465             rel1.to: "bg";
2466             rel2.relative: 1.0 1.0;
2467             rel2.to: "bg";
2468             rel2.offset: -1 -1;
2469             align: 0.0 0.5;
2470             min: 13 0;
2471             max: 13 -1;
2472             color_class: "B018";
2473             fixed: 1 0;
2474          }
2475          description { state: "start" 0.0;
2476             inherit: "default" 0.0;
2477             rel1.offset: -8 0;
2478             rel2.offset: -7 -1;
2479          }
2480       }
2481       part { name: "padding_jump_to_top";
2482          type: SPACER;
2483          scale: 1;
2484          description { state: "default" 0.0;
2485             min: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
2486             max: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
2487             rel1.relative: 1.0 0.0;
2488             rel2.relative: 1.0 0.0;
2489             rel1.to: "bg";
2490             rel2.to: "bg";
2491             fixed: 1 1;
2492             align: 1.0 0.0;
2493          }
2494       }
2495       part { name: "elm.swallow.jump_to_top";
2496          type: SWALLOW;
2497          scale: 1;
2498          description { state: "default" 0.0;
2499             rel1 {
2500                to: "padding_jump_to_top";
2501                relative: 0.0 1.0;
2502             }
2503             rel2 {
2504                to: "padding_jump_to_top";
2505                relative: 0.0 1.0;
2506             }
2507             fixed: 1 1;
2508             align: 1.0 0.0;
2509          }
2510       }
2511       part { name: "event";
2512          type: RECT;
2513          mouse_events: 1;
2514          repeat_events: 1;
2515          description { state: "default" 0.0;
2516             color: 0 0 0 0;
2517          }
2518       }
2519    }
2520    programs {
2521       program { name: "load";
2522          signal: "load";
2523          source: "";
2524          script {
2525             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
2526             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
2527             set_int(sbvis_h, 0);
2528             set_int(sbvis_v, 0);
2529             set_int(sbalways_v, 0);
2530             set_int(sbalways_h, 0);
2531             set_int(sbvis_timer, 0);
2532             emit("reload", "elm");
2533          }
2534       }
2535       program { name: "vbar_show_always";
2536          signal: "elm,action,show_always,vbar";
2537          source: "elm";
2538          script {
2539             new v;
2540             v = get_int(sbalways_v);
2541             if (!v) {
2542                set_int(sbalways_v, 1);
2543                v = get_int(sbvis_v);
2544                if (!v) {
2545                   emit("do-show-vbar", "");
2546                   set_int(sbvis_v, 1);
2547                }
2548             }
2549          }
2550       }
2551       program { name: "vbar_show_notalways";
2552          signal: "elm,action,show_notalways,vbar";
2553          source: "elm";
2554          script {
2555             new v;
2556             v = get_int(sbalways_v);
2557             if (v) {
2558                set_int(sbalways_v, 0);
2559                v = get_int(sbvis_v);
2560                if (!v) {
2561                   emit("do-hide-vbar", "");
2562                   set_int(sbvis_v, 0);
2563                }
2564             }
2565          }
2566       }
2567       program { name: "hbar_show_always";
2568          signal: "elm,action,show_always,hbar";
2569          source: "elm";
2570          script {
2571             new v;
2572             v = get_int(sbalways_h);
2573             if (!v) {
2574                set_int(sbalways_h, 1);
2575                v = get_int(sbvis_h);
2576                if (!v) {
2577                   emit("do-show-hbar", "");
2578                   set_int(sbvis_h, 1);
2579                }
2580             }
2581          }
2582       }
2583       program { name: "hbar_show_notalways";
2584          signal: "elm,action,show_notalways,hbar";
2585          source: "elm";
2586          script {
2587             new v;
2588             v = get_int(sbalways_h);
2589             if (v) {
2590                set_int(sbalways_h, 0);
2591                v = get_int(sbvis_h);
2592                if (!v) {
2593                   emit("do-hide-hbar", "");
2594                   set_int(sbvis_h, 0);
2595                }
2596             }
2597          }
2598       }
2599       program { name: "scroll";
2600          signal: "elm,action,scroll";
2601          source: "elm";
2602          script {
2603             new v;
2604             v = get_int(sbvis_v);
2605             v |= get_int(sbalways_v);
2606             if (!v) {
2607                emit("do-show-vbar", "");
2608                set_int(sbvis_v, 1);
2609             }
2610             v = get_int(sbvis_h);
2611             v |= get_int(sbalways_h);
2612             if (!v) {
2613                emit("do-show-hbar", "");
2614                set_int(sbvis_h, 1);
2615             }
2616             v = get_int(sbvis_timer);
2617             if (v > 0) cancel_timer(v);
2618             v = timer(1, "timer0", 0);
2619             set_int(sbvis_timer, v);
2620          }
2621       }
2622       program { name: "edge_top_mouse_down";
2623          signal: "elm,state,mouse,down";
2624          source: "elm";
2625          script {
2626             set_int(effect_top_down, 1);
2627          }
2628       }
2629       /* Effect Hide */
2630       program { name: "edge_top_mouse_up";
2631          signal: "elm,state,mouse,up";
2632          source: "elm";
2633          script {
2634             set_int(effect_top_down, 0);
2635             if (get_int(effect_top_start))
2636               {
2637                  set_int(effect_top_reset, 0);
2638                  if (!get_int(effect_top_anim))
2639                    {
2640                       if (!get_int(effect_top_end))
2641                         {
2642                            set_int(effect_top_end, 1);
2643                            run_program(PROGRAM:"edge_top_end");
2644                         }
2645                    }
2646               }
2647          }
2648       }
2649       program { name: "edge_top_scroll";
2650          signal: "elm,action,scroll";
2651          source: "elm";
2652          script {
2653             if (get_int(effect_top_start))
2654             {
2655                set_state(PART:"shadow_top1", "default", 0.0);
2656                set_state(PART:"shadow_top2", "default", 0.0);
2657                set_state(PART:"shadow_top3", "default", 0.0);
2658                set_int(effect_top_reset, 0);
2659                run_program(PROGRAM:"edge_top_init");
2660             }
2661          }
2662       }
2663       program { name: "edge_top_end";
2664          action: STATE_SET "default" 0.0;
2665          target: "shadow_top1";
2666          target: "shadow_top2";
2667          target: "shadow_top3";
2668          transition: SINUSOIDAL 0.3;
2669          after: "edge_top_init";
2670       }
2671       program { name: "edge_top_init";
2672          script {
2673             set_int(effect_top_move, 0);
2674             if (!get_int(effect_top_reset))
2675               set_int(effect_top_start, 0);
2676             set_int(effect_top_max, 0);
2677             set_int(top_prev_diff, 0);
2678             set_int(effect_top_end, 0);
2679          }
2680       }
2681       /* Effect Show */
2682       program { name: "edge_top";
2683          signal: "elm,edge,top";
2684          source: "elm";
2685          script {
2686              if (!get_int(effect_top_start))
2687                {
2688                   set_int(effect_top_start, 1);
2689                   set_int(effect_top_anim, 1);
2690                   run_program(PROGRAM:"edge_top_start");
2691                }
2692          }
2693       }
2694       program { name: "edge_top_start";
2695          action: STATE_SET "start" 0.0;
2696          target: "shadow_top1";
2697          target: "shadow_top2";
2698          target: "shadow_top3";
2699          transition: SINUSOIDAL 0.2;
2700          after: "edge_top_after";
2701       }
2702       program { name: "edge_top_after";
2703          script {
2704             new xx, yy;
2705             get_mouse(xx, yy);
2706             set_int(top_down_y, yy);
2707             set_int(effect_top_anim, 0);
2708             /* mouse down */
2709             if (get_int(effect_top_down))
2710               {
2711                  set_int(effect_top_move, 1);
2712               }
2713             /* mouse up */
2714             else
2715               {
2716                  set_int(effect_top_reset, 0);
2717                  if (!get_int(effect_top_end))
2718                    {
2719                       set_int(effect_top_end, 1);
2720                       run_program(PROGRAM:"edge_top_end");
2721                    }
2722               }
2723          }
2724       }
2725       program { name: "edge_top_mouse_move";
2726          signal: "elm,state,mouse,move";
2727          source: "elm";
2728          script {
2729             if (get_int(effect_top_move))
2730               {
2731                  new xx, yy;
2732                  new Float:fx1, Float:fx2, Float:fx3;
2733                  get_mouse(xx, yy);
2734                  set_int(top_move_y, yy);
2735                  set_int(top_diff, (get_int(top_move_y) - get_int(top_down_y)));
2736                  if (get_int(top_diff) < get_int(top_prev_diff))
2737                    {
2738                       set_int(top_prev_diff, 0);
2739                       set_int(effect_top_move, 0);
2740                       set_int(effect_top_reset, 1);
2741                       if (!get_int(effect_top_end))
2742                         {
2743                            set_int(effect_top_end, 1);
2744                            run_program(PROGRAM:"edge_top_end");
2745                         }
2746                    }
2747                  else
2748                    {
2749                       if (!get_int(effect_top_end))
2750                         {
2751                            if (get_int(top_diff) <= 90 && !get_int(effect_top_max))
2752                              {
2753                                 fx1 = fx2 = fx3 = sin(get_int(top_diff), DEGREES);
2754                                 fx1 = fx1 * 16.0 + 26;
2755                                 fx2 = fx2 * 10.0 + 17;
2756                                 fx3 = fx3 * 5.0 + 8;
2757                              }
2758                            else
2759                              {
2760                                 set_int(effect_top_max, 1);
2761                                 fx1 = 42.0;
2762                                 fx2 = 27.0;
2763                                 fx3 = 13.0;
2764                              }
2765                            custom_state(PART:"shadow_top1", "default", 0.0);
2766                            set_state_val(PART:"shadow_top1", STATE_REL1_OFFSET, 0, round(fx1));
2767                            set_state_val(PART:"shadow_top1", STATE_REL2_OFFSET, -1, round(fx1) - 1);
2768                            set_state(PART:"shadow_top1", "custom", 0.0);
2769
2770                            custom_state(PART:"shadow_top2", "default", 0.0);
2771                            set_state_val(PART:"shadow_top2", STATE_REL1_OFFSET, 0, round(fx2));
2772                            set_state_val(PART:"shadow_top2", STATE_REL2_OFFSET, -1, round(fx2) - 1);
2773                            set_state(PART:"shadow_top2", "custom", 0.0);
2774
2775                            custom_state(PART:"shadow_top3", "default", 0.0);
2776                            set_state_val(PART:"shadow_top3", STATE_REL1_OFFSET, 0, round(fx3));
2777                            set_state_val(PART:"shadow_top3", STATE_REL2_OFFSET, -1, round(fx3) - 1);
2778                            set_state(PART:"shadow_top3", "custom", 0.0);
2779                            set_int(top_prev_diff, get_int(top_diff));
2780                         }
2781                    }
2782              }
2783          }
2784       }
2785       program { name: "edge_bottom_mouse_down";
2786          signal: "elm,state,mouse,down";
2787          source: "elm";
2788          script {
2789             set_int(effect_bottom_down, 1);
2790          }
2791       }
2792       /* Effect Hide */
2793       program { name: "edge_bottom_mouse_up";
2794          signal: "elm,state,mouse,up";
2795          source: "elm";
2796          script {
2797             set_int(effect_bottom_down, 0);
2798             if (get_int(effect_bottom_start))
2799               {
2800                  set_int(effect_bottom_reset, 0);
2801                  if (!get_int(effect_bottom_anim))
2802                    {
2803                       if (!get_int(effect_bottom_end))
2804                         {
2805                            set_int(effect_bottom_end, 1);
2806                            run_program(PROGRAM:"edge_bottom_end");
2807                         }
2808                    }
2809               }
2810          }
2811       }
2812       program { name: "edge_bottom_scroll";
2813          signal: "elm,action,scroll";
2814          source: "elm";
2815          script {
2816             if (get_int(effect_bottom_start))
2817             {
2818                set_state(PART:"shadow_bottom1", "default", 0.0);
2819                set_state(PART:"shadow_bottom2", "default", 0.0);
2820                set_state(PART:"shadow_bottom3", "default", 0.0);
2821                set_int(effect_bottom_reset, 0);
2822                run_program(PROGRAM:"edge_bottom_init");
2823             }
2824          }
2825       }
2826       program { name: "edge_bottom_end";
2827          action: STATE_SET "default" 0.0;
2828          target: "shadow_bottom1";
2829          target: "shadow_bottom2";
2830          target: "shadow_bottom3";
2831          transition: SINUSOIDAL 0.3;
2832          after: "edge_bottom_init";
2833       }
2834       program { name: "edge_bottom_init";
2835          script {
2836             set_int(effect_bottom_move, 0);
2837             if (!get_int(effect_bottom_reset))
2838               set_int(effect_bottom_start, 0);
2839             set_int(effect_bottom_max, 0);
2840             set_int(bottom_prev_diff, 0);
2841             set_int(effect_bottom_end, 0);
2842          }
2843       }
2844       /* Effect Show */
2845       program { name: "edge_bottom";
2846          signal: "elm,edge,bottom";
2847          source: "elm";
2848          script {
2849              if (!get_int(effect_bottom_start))
2850                {
2851                   set_int(effect_bottom_start, 1);
2852                   set_int(effect_bottom_anim, 1);
2853                   run_program(PROGRAM:"edge_bottom_start");
2854                }
2855          }
2856       }
2857       program { name: "edge_bottom_start";
2858          action: STATE_SET "start" 0.0;
2859          target: "shadow_bottom1";
2860          target: "shadow_bottom2";
2861          target: "shadow_bottom3";
2862          transition: SINUSOIDAL 0.2;
2863          after: "edge_bottom_after";
2864       }
2865       program { name: "edge_bottom_after";
2866          script {
2867             new xx, yy;
2868             get_mouse(xx, yy);
2869             set_int(effect_bottom_anim, 0);
2870             set_int(bottom_down_y, yy);
2871             /* mouse down */
2872             if (get_int(effect_bottom_down))
2873               {
2874                  set_int(effect_bottom_move, 1);
2875               }
2876             /* mouse up */
2877             else
2878               {
2879                  set_int(effect_bottom_reset, 0);
2880                  if (!get_int(effect_bottom_end))
2881                    {
2882                       set_int(effect_bottom_end, 1);
2883                       run_program(PROGRAM:"edge_bottom_end");
2884                    }
2885               }
2886          }
2887       }
2888       program { name: "edge_bottom_mouse_move";
2889          signal: "elm,state,mouse,move";
2890          source: "elm";
2891          script {
2892             if (get_int(effect_bottom_move))
2893               {
2894                  new xx, yy;
2895                  new Float:fx1, Float:fx2, Float:fx3;
2896                  get_mouse(xx, yy);
2897                  set_int(bottom_move_y, yy);
2898                  set_int(bottom_diff, (get_int(bottom_down_y) - get_int(bottom_move_y)));
2899                  if (get_int(bottom_diff) < get_int(bottom_prev_diff))
2900                    {
2901                       set_int(bottom_prev_diff, 0);
2902                       set_int(effect_bottom_move, 0);
2903                       set_int(effect_bottom_reset, 1);
2904                       if (!get_int(effect_bottom_end))
2905                         {
2906                            set_int(effect_bottom_end, 1);
2907                            run_program(PROGRAM:"edge_bottom_end");
2908                         }
2909                    }
2910                  else
2911                    {
2912                       if (!get_int(effect_bottom_end))
2913                         {
2914                            if (get_int(bottom_diff) <= 90 && !get_int(effect_bottom_max))
2915                              {
2916                                 fx1 = fx2 = fx3 = sin(get_int(bottom_diff), DEGREES);
2917                                 fx1 = fx1 * 16.0 + 26;
2918                                 fx2 = fx2 * 10.0 + 17;
2919                                 fx3 = fx3 * 5.0 + 8;
2920                              }
2921                            else
2922                              {
2923                                 set_int(effect_bottom_max, 1);
2924                                 fx1 = 42.0;
2925                                 fx2 = 27.0;
2926                                 fx3 = 13.0;
2927                              }
2928                            custom_state(PART:"shadow_bottom1", "default", 0.0);
2929                           set_state_val(PART:"shadow_bottom1", STATE_REL1_OFFSET, 0, round(fx1) * -1);
2930                            set_state_val(PART:"shadow_bottom1", STATE_REL2_OFFSET, -1, (round(fx1) - 1) * -1);
2931                            set_state(PART:"shadow_bottom1", "custom", 0.0);
2932
2933                            custom_state(PART:"shadow_bottom2", "default", 0.0);
2934                            set_state_val(PART:"shadow_bottom2", STATE_REL1_OFFSET, 0, round(fx2) * -1);
2935                            set_state_val(PART:"shadow_bottom2", STATE_REL2_OFFSET, -1, (round(fx2) - 1) * -1);
2936                            set_state(PART:"shadow_bottom2", "custom", 0.0);
2937
2938                            custom_state(PART:"shadow_bottom3", "default", 0.0);
2939                            set_state_val(PART:"shadow_bottom3", STATE_REL1_OFFSET, 0, round(fx3) * -1);
2940                            set_state_val(PART:"shadow_bottom3", STATE_REL2_OFFSET, -1, (round(fx3) - 1) * -1 );
2941                            set_state(PART:"shadow_bottom3", "custom", 0.0);
2942                            set_int(bottom_prev_diff, get_int(bottom_diff));
2943                         }
2944                    }
2945              }
2946          }
2947       }
2948       program { name: "edge_left_mouse_down";
2949          signal: "elm,state,mouse,down";
2950          source: "elm";
2951          script {
2952             set_int(effect_left_down, 1);
2953          }
2954       }
2955       /* Effect Hide */
2956       program { name: "edge_left_mouse_up";
2957          signal: "elm,state,mouse,up";
2958          source: "elm";
2959          script {
2960             set_int(effect_left_down, 0);
2961             if (get_int(effect_left_start))
2962               {
2963                  set_int(effect_left_reset, 0);
2964                  if (!get_int(effect_left_anim))
2965                    {
2966                       if (!get_int(effect_left_end))
2967                         {
2968                            set_int(effect_left_end, 1);
2969                            run_program(PROGRAM:"edge_left_end");
2970                         }
2971                    }
2972               }
2973          }
2974       }
2975       program { name: "edge_left_scroll";
2976          signal: "elm,action,scroll";
2977          source: "elm";
2978          script {
2979             if (get_int(effect_left_start))
2980             {
2981                set_state(PART:"shadow_left1", "default", 0.0);
2982                set_state(PART:"shadow_left2", "default", 0.0);
2983                set_state(PART:"shadow_left3", "default", 0.0);
2984                set_int(effect_left_reset, 0);
2985                run_program(PROGRAM:"edge_left_init");
2986             }
2987          }
2988       }
2989       program { name: "edge_left_end";
2990          action: STATE_SET "default" 0.0;
2991          target: "shadow_left1";
2992          target: "shadow_left2";
2993          target: "shadow_left3";
2994          transition: SINUSOIDAL 0.3;
2995          after: "edge_left_init";
2996       }
2997       program { name: "edge_left_init";
2998          script {
2999             set_int(effect_left_move, 0);
3000             if (!get_int(effect_left_reset))
3001               set_int(effect_left_start, 0);
3002             set_int(effect_left_max, 0);
3003             set_int(left_prev_diff, 0);
3004             set_int(effect_left_end, 0);
3005          }
3006       }
3007       /* Effect Show */
3008       program { name: "edge_left";
3009          signal: "elm,edge,left";
3010          source: "elm";
3011          script {
3012              if (!get_int(effect_left_start))
3013                {
3014                   set_int(effect_left_start, 1);
3015                   set_int(effect_left_anim, 1);
3016                   run_program(PROGRAM:"edge_left_start");
3017                }
3018          }
3019       }
3020       program { name: "edge_left_start";
3021          action: STATE_SET "start" 0.0;
3022          target: "shadow_left1";
3023          target: "shadow_left2";
3024          target: "shadow_left3";
3025          transition: SINUSOIDAL 0.2;
3026          after: "edge_left_after";
3027       }
3028       program { name: "edge_left_after";
3029          script {
3030             new xx, yy;
3031             get_mouse(xx, yy);
3032             set_int(left_down_x, xx);
3033             set_int(effect_left_anim, 0);
3034             /* mouse down */
3035             if (get_int(effect_left_down))
3036               {
3037                  set_int(effect_left_move, 1);
3038               }
3039             /* mouse up */
3040             else
3041               {
3042                  set_int(effect_left_reset, 0);
3043                  if (!get_int(effect_left_end))
3044                    {
3045                       set_int(effect_left_end, 1);
3046                       run_program(PROGRAM:"edge_left_end");
3047                    }
3048               }
3049          }
3050       }
3051       program { name: "edge_left_mouse_move";
3052          signal: "elm,state,mouse,move";
3053          source: "elm";
3054          script {
3055             if (get_int(effect_left_move))
3056               {
3057                  new xx, yy;
3058                  new Float:fx1, Float:fx2, Float:fx3;
3059                  get_mouse(xx, yy);
3060                  set_int(left_move_x, xx);
3061                  set_int(left_diff, (get_int(left_move_x) - get_int(left_down_x)));
3062                  if (get_int(left_diff) < get_int(left_prev_diff))
3063                    {
3064                       set_int(left_prev_diff, 0);
3065                       set_int(effect_left_move, 0);
3066                       set_int(effect_left_reset, 1);
3067                       if (!get_int(effect_left_end))
3068                         {
3069                            set_int(effect_left_end, 1);
3070                            run_program(PROGRAM:"edge_left_end");
3071                         }
3072                    }
3073                  else
3074                    {
3075                       if (!get_int(effect_left_end))
3076                         {
3077                            if (get_int(left_diff) <= 90 && !get_int(effect_left_max))
3078                              {
3079                                 fx1 = fx2 = fx3 = sin(get_int(left_diff), DEGREES);
3080                                 fx1 = fx1 * 16.0 + 26;
3081                                 fx2 = fx2 * 10.0 + 17;
3082                                 fx3 = fx3 * 5.0 + 8;
3083                              }
3084                            else
3085                              {
3086                                 set_int(effect_left_max, 1);
3087                                 fx1 = 42.0;
3088                                 fx2 = 27.0;
3089                                 fx3 = 13.0;
3090                              }
3091                            custom_state(PART:"shadow_left1", "default", 0.0);
3092                            set_state_val(PART:"shadow_left1", STATE_REL1_OFFSET, round(fx1), 0);
3093                            set_state_val(PART:"shadow_left1", STATE_REL2_OFFSET, round(fx1) - 1, -1);
3094                            set_state(PART:"shadow_left1", "custom", 0.0);
3095
3096                            custom_state(PART:"shadow_left2", "default", 0.0);
3097                            set_state_val(PART:"shadow_left2", STATE_REL1_OFFSET, round(fx2), 0);
3098                            set_state_val(PART:"shadow_left2", STATE_REL2_OFFSET, round(fx2) - 1, - 1);
3099                            set_state(PART:"shadow_left2", "custom", 0.0);
3100
3101                            custom_state(PART:"shadow_left3", "default", 0.0);
3102                            set_state_val(PART:"shadow_left3", STATE_REL1_OFFSET, round(fx3), 0);
3103                            set_state_val(PART:"shadow_left3", STATE_REL2_OFFSET, round(fx3) - 1, - 1);
3104                            set_state(PART:"shadow_left3", "custom", 0.0);
3105                            set_int(left_prev_diff, get_int(left_diff));
3106                         }
3107                    }
3108              }
3109          }
3110       }
3111       program { name: "edge_right_mouse_down";
3112          signal: "elm,state,mouse,down";
3113          source: "elm";
3114          script {
3115             set_int(effect_right_down, 1);
3116          }
3117       }
3118       /* Effect Hide */
3119       program { name: "edge_right_mouse_up";
3120          signal: "elm,state,mouse,up";
3121          source: "elm";
3122          script {
3123             set_int(effect_right_down, 0);
3124             if (get_int(effect_right_start))
3125               {
3126                  set_int(effect_right_reset, 0);
3127                  if (!get_int(effect_right_anim))
3128                    {
3129                       if (!get_int(effect_right_end))
3130                         {
3131                            set_int(effect_right_end, 1);
3132                            run_program(PROGRAM:"edge_right_end");
3133                         }
3134                    }
3135               }
3136          }
3137       }
3138       program { name: "edge_right_scroll";
3139          signal: "elm,action,scroll";
3140          source: "elm";
3141          script {
3142             if (get_int(effect_right_start))
3143             {
3144                set_state(PART:"shadow_right1", "default", 0.0);
3145                set_state(PART:"shadow_right2", "default", 0.0);
3146                set_state(PART:"shadow_right3", "default", 0.0);
3147                set_int(effect_right_reset, 0);
3148                run_program(PROGRAM:"edge_right_init");
3149             }
3150          }
3151       }
3152       program { name: "edge_right_end";
3153          action: STATE_SET "default" 0.0;
3154          target: "shadow_right1";
3155          target: "shadow_right2";
3156          target: "shadow_right3";
3157          transition: SINUSOIDAL 0.3;
3158          after: "edge_right_init";
3159       }
3160       program { name: "edge_right_init";
3161          script {
3162             set_int(effect_right_move, 0);
3163             if (!get_int(effect_right_reset))
3164               set_int(effect_right_start, 0);
3165             set_int(effect_right_max, 0);
3166             set_int(right_prev_diff, 0);
3167             set_int(effect_right_end, 0);
3168          }
3169       }
3170       /* Effect Show */
3171       program { name: "edge_right";
3172          signal: "elm,edge,right";
3173          source: "elm";
3174          script {
3175              if (!get_int(effect_right_start))
3176                {
3177                   set_int(effect_right_start, 1);
3178                   set_int(effect_right_anim, 1);
3179                   run_program(PROGRAM:"edge_right_start");
3180                }
3181          }
3182       }
3183       program { name: "edge_right_start";
3184          action: STATE_SET "start" 0.0;
3185          target: "shadow_right1";
3186          target: "shadow_right2";
3187          target: "shadow_right3";
3188          transition: SINUSOIDAL 0.2;
3189          after: "edge_right_after";
3190       }
3191       program { name: "edge_right_after";
3192          script {
3193             new xx, yy;
3194             get_mouse(xx, yy);
3195             set_int(right_down_x, xx);
3196             set_int(effect_right_anim, 0);
3197             /* mouse down */
3198             if (get_int(effect_right_down))
3199               {
3200                  set_int(effect_right_move, 1);
3201               }
3202             /* mouse up */
3203             else
3204               {
3205                  set_int(effect_right_reset, 0);
3206                  if (!get_int(effect_right_end))
3207                    {
3208                       set_int(effect_right_end, 1);
3209                       run_program(PROGRAM:"edge_right_end");
3210                    }
3211               }
3212          }
3213       }
3214       program { name: "edge_right_mouse_move";
3215          signal: "elm,state,mouse,move";
3216          source: "elm";
3217          script {
3218             if (get_int(effect_right_move))
3219               {
3220                  new xx, yy;
3221                  new Float:fx1, Float:fx2, Float:fx3;
3222                  get_mouse(xx, yy);
3223                  set_int(right_move_x, xx);
3224                  set_int(right_diff, (get_int(right_down_x) - get_int(right_move_x)));
3225                  if (get_int(right_diff) < get_int(right_prev_diff))
3226                    {
3227                       set_int(right_prev_diff, 0);
3228                       set_int(effect_right_move, 0);
3229                       set_int(effect_right_reset, 1);
3230                       if (!get_int(effect_right_end))
3231                         {
3232                            set_int(effect_right_end, 1);
3233                            run_program(PROGRAM:"edge_right_end");
3234                         }
3235                    }
3236                  else
3237                    {
3238                       if (!get_int(effect_right_end))
3239                         {
3240                            if (get_int(right_diff) <= 90 && !get_int(effect_right_max))
3241                              {
3242                                 fx1 = fx2 = fx3 = sin(get_int(right_diff), DEGREES);
3243                                 fx1 = fx1 * 10.0 + 32;
3244                                 fx2 = fx2 * 7.0 + 20;
3245                                 fx3 = fx3 * 3.0 + 10;
3246                              }
3247                            else
3248                              {
3249                                 set_int(effect_right_max, 1);
3250                                 fx1 = 42.0;
3251                                 fx2 = 27.0;
3252                                 fx3 = 13.0;
3253                              }
3254                            custom_state(PART:"shadow_right1", "default", 0.0);
3255                            set_state_val(PART:"shadow_right1", STATE_REL1_OFFSET, round(fx1) * -1, 0);
3256                            set_state_val(PART:"shadow_right1", STATE_REL2_OFFSET, (round(fx1) - 1) * -1, -1);
3257                            set_state(PART:"shadow_right1", "custom", 0.0);
3258
3259                            custom_state(PART:"shadow_right2", "default", 0.0);
3260                            set_state_val(PART:"shadow_right2", STATE_REL1_OFFSET, round(fx2) * -1, 0);
3261                            set_state_val(PART:"shadow_right2", STATE_REL2_OFFSET, (round(fx2) - 1) * -1, - 1);
3262                            set_state(PART:"shadow_right2", "custom", 0.0);
3263
3264                            custom_state(PART:"shadow_right3", "default", 0.0);
3265                            set_state_val(PART:"shadow_right3", STATE_REL1_OFFSET, round(fx3) * -1, 0);
3266                            set_state_val(PART:"shadow_right3", STATE_REL2_OFFSET, (round(fx3) - 1) * -1, - 1);
3267                            set_state(PART:"shadow_right3", "custom", 0.0);
3268                            set_int(right_prev_diff, get_int(right_diff));
3269                         }
3270                    }
3271              }
3272          }
3273       }
3274    }
3275 }
3276
3277 group { name: "elm/scroller/contents/default";
3278    parts {
3279       part { name: "elm.swallow.content";
3280          type: SWALLOW;
3281          description { state: "default" 0.0;
3282          }
3283       }
3284       part { name: "elm.swallow.content_r";
3285          type: SWALLOW;
3286          description { state: "default" 0.0;
3287             fixed: 1 0;
3288             align: 0.0 0.0;
3289             rel1 {
3290                 relative: 1.0 0.0;
3291                 to: "elm.swallow.content";
3292             }
3293             rel2 {
3294                 relative: 1.0 1.0;
3295                 to: "elm.swallow.content";
3296             }
3297          }
3298       }
3299       part { name: "elm.swallow.content_b";
3300          type: SWALLOW;
3301          description { state: "default" 0.0;
3302             fixed: 0 1;
3303             align: 0.0 0.0;
3304             rel1 {
3305                 relative: 0.0 1.0;
3306                 to: "elm.swallow.content";
3307             }
3308             rel2 {
3309                 relative: 1.0 1.0;
3310                 to: "elm.swallow.content";
3311             }
3312          }
3313       }
3314       part { name: "elm.swallow.content_rb";
3315          type: SWALLOW;
3316          description { state: "default" 0.0;
3317             fixed: 1 1;
3318             align: 0.0 0.0;
3319             rel1 {
3320                 relative: 1.0 1.0;
3321                 to: "elm.swallow.content";
3322             }
3323             rel2 {
3324                 relative: 1.0 1.0;
3325                 to: "elm.swallow.content";
3326             }
3327          }
3328       }
3329    }
3330 }
3331
3332 group { name: "elm/gengrid/base/popup";
3333    inherit: "elm/scroller/base/list_effect";
3334
3335    parts {
3336       part { name: "elm.swallow.content.LT_padding";
3337          type: SPACER;
3338          scale: 1;
3339          description { state: "default" 0.0;
3340             rel2.relative: 0 0;
3341             align: 0 0;
3342             min: 0 GENGRID_POPUP_CONTENT_TOP_PADDING;
3343             max: -1 GENGRID_POPUP_CONTENT_TOP_PADDING;
3344             fixed: 0 1;
3345          }
3346       }
3347       part { name: "elm.swallow.content.RB_padding";
3348          type: SPACER;
3349          scale: 1;
3350          description { state: "default" 0.0;
3351             rel1.relative: 1 1;
3352             align: 1 1;
3353             min: 0 GENGRID_POPUP_CONTENT_BOTTOM_PADDING;
3354             max: -1 GENGRID_POPUP_CONTENT_BOTTOM_PADDING;
3355             fixed: 0 1;
3356          }
3357       }
3358       part { name: "elm.swallow.content";
3359          description { state: "default" 0.0;
3360             rel1.to: "elm.swallow.content.LT_padding";
3361             rel1.relative: 1 1;
3362             rel2.to: "elm.swallow.content.RB_padding";
3363             rel2.relative: 0 0;
3364          }
3365       }
3366    }
3367 }