Revert "[genlist/gengrid] add a theme for new fastscroll UX"
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / scroller.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18
19
20 /*
21  * vim:ts=3
22 */
23 group { name: "elm/scroller/base/default";
24    alias: "elm/carousel/base/default";
25    alias: "elm/scroller/base/map_bubble";
26    alias: "elm/gengrid/base/no_effect";
27    alias: "elm/genlist/base/no_effect";
28
29    data {
30       item: "focus_highlight" "on";
31    }
32
33    script {
34       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
35       public sh_v, sh_h, sh_timer, edge_timer;
36       public timer0(val) {
37          new v;
38          v = get_int(sbvis_v);
39          if (v) {
40             v = get_int(sbalways_v);
41             if (!v) {
42                emit("do-hide-vbar", "");
43                set_int(sbvis_v, 0);
44             }
45          }
46          v = get_int(sbvis_h);
47          if (v) {
48             v = get_int(sbalways_h);
49             if (!v) {
50                emit("do-hide-hbar", "");
51                set_int(sbvis_h, 0);
52             }
53          }
54          set_int(sbvis_timer, 0);
55          return 0;
56       }
57       public timer1(val) {
58          emit("do-hide-vshadow", "");
59          emit("do-hide-hshadow", "");
60          set_int(sh_timer, 0);
61          return 0;
62       }
63       public timer2(val) {
64          emit("do-hide-vshadow", "");
65          emit("do-hide-hshadow", "");
66          set_int(edge_timer, 0);
67          return 0;
68       }
69    }
70    images {
71       image: SCROLLER_DEFAULT_SCROLLBAR_VBAR_IMAGE COMP;
72       image: SCROLLER_DEFAULT_SCROLLBAR_HBAR_IMAGE COMP;
73    }
74    parts {
75       part { name: "bg";
76          type: RECT;
77          scale: 1;
78          description { state: "default" 0.0;
79             rel1.offset: 0 0;
80             rel2.offset: -1 -1;
81             color: 255 255 255 0;
82          }
83       }
84       part { name: "clipper";
85          type: RECT;
86          mouse_events: 0;
87          scale: 1;
88          description { state: "default" 0.0;
89             rel1.to: "bg";
90             rel2.to: "bg";
91             rel1.offset: 0 0;
92             rel2.offset: -1 -1;
93          }
94       }
95       part { name: "elm.swallow.content";
96          clip_to: "clipper";
97          type: SWALLOW;
98          scale: 1;
99          description { state: "default" 0.0;
100             rel1.to: "bg";
101             rel2.to: "bg";
102             rel1.offset: 0 0;
103             rel2.offset: -1 -1;
104          }
105       }
106       part { name: "sb_vbar_clip_master";
107          type: RECT;
108          mouse_events: 0;
109          scale: 1;
110          description { state: "default" 0.0;
111          }
112          description { state: "hidden" 0.0;
113             visible: 0;
114             color: 255 255 255 0;
115          }
116       }
117       part { name: "sb_vbar_clip";
118          clip_to: "sb_vbar_clip_master";
119          type: RECT;
120          mouse_events: 0;
121          scale: 1;
122          description { state: "default" 0.0;
123          }
124          description { state: "hidden" 0.0;
125             visible: 0;
126             color: 255 255 255 0;
127          }
128       }
129       part { name: "sb_vbar";
130          type: RECT;
131          mouse_events: 0;
132          scale: 1;
133          description { state: "default" 0.0;
134             fixed: 1 1;
135             visible: 0;
136             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MIN_SIZE_INC;
137             align: 1.0 0.0;
138             rel1 {
139                relative: 1.0 0.0;
140                offset:   0 0;
141                to_y:     "elm.swallow.content";
142                to_x:     "elm.swallow.content";
143             }
144             rel2 {
145                relative: 1.0 1.0;
146                offset:   -1 1;
147                to_y:     "elm.swallow.content";
148                to_x:     "elm.swallow.content";
149             }
150          }
151       }
152       part { name: "elm.dragable.vbar";
153          clip_to: "sb_vbar_clip";
154          mouse_events: 0;
155          scale: 1;
156          dragable {
157             x: 0 0 0;
158             y: 1 1 0;
159             confine: "sb_vbar";
160          }
161          description { state: "default" 0.0;
162             fixed: 1 1;
163             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MIN_SIZE_INC;
164             max: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MAX_SIZE_INC;
165             rel1 {
166                relative: 0.5  0.5;
167                offset:   0    0;
168                to: "sb_vbar";
169             }
170             rel2 {
171                relative: 0.5  0.5;
172                offset:   0    0;
173                to: "sb_vbar";
174             }
175             image {
176                normal: SCROLLER_DEFAULT_SCROLLBAR_VBAR_IMAGE;
177                border: SCROLLER_DEFAULT_SCROLLBAR_VBAR_IMAGE_BORDER;
178                border_scale: 1;
179                middle: DEFAULT;
180             }
181          }
182       }
183       part { name: "sb_hbar_clip_master";
184          type: RECT;
185          mouse_events: 0;
186          scale: 1;
187          description { state: "default" 0.0;
188          }
189          description { state: "hidden" 0.0;
190             visible: 0;
191             color: 255 255 255 0;
192          }
193       }
194       part { name: "sb_hbar_clip";
195          clip_to: "sb_hbar_clip_master";
196          type: RECT;
197          mouse_events: 0;
198          scale: 1;
199          description { state: "default" 0.0;
200          }
201          description { state: "hidden" 0.0;
202             visible: 0;
203             color: 255 255 255 0;
204          }
205       }
206       part { name: "sb_hbar";
207          type: RECT;
208          mouse_events: 0;
209          scale: 1;
210          description { state: "default" 0.0;
211             fixed: 1 1;
212             visible: 0;
213             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MIN_SIZE_INC;
214             align: 0.0 1.0;
215             rel1 {
216                relative: 0.0 1.0;
217                offset:   0 0;
218                to_x:     "elm.swallow.content";
219                to_y:     "elm.swallow.content";
220             }
221             rel2 {
222                relative: 1.0 1.0;
223                offset:   -1 -1;
224                to_x:     "elm.swallow.content";
225                to_y:     "elm.swallow.content";
226             }
227          }
228       }
229       part { name: "elm.dragable.hbar";
230          clip_to: "sb_hbar_clip";
231          mouse_events: 0;
232          scale: 1;
233          dragable {
234             x: 1 1 0;
235             y: 0 0 0;
236             confine: "sb_hbar";
237          }
238          description { state: "default" 0.0;
239             fixed: 1 1;
240             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MIN_SIZE_INC;
241             max: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MAX_SIZE_INC;
242             rel1 {
243                relative: 0.5  0.5;
244                offset:   0    0;
245                to: "sb_hbar";
246             }
247             rel2 {
248                relative: 0.5  0.5;
249                offset:   0    0;
250                to: "sb_hbar";
251             }
252             image {
253                normal: SCROLLER_DEFAULT_SCROLLBAR_HBAR_IMAGE;
254                border: SCROLLER_DEFAULT_SCROLLBAR_HBAR_IMAGE_BORDER;
255                border_scale: 1;
256                middle: DEFAULT;
257             }
258          }
259       }
260       part { name: "disabler";
261          type: RECT;
262          scale: 1;
263          description { state: "default" 0.0;
264             rel1.to: "clipper";
265             rel2.to: "clipper";
266             color: 0 0 0 0;
267             visible: 0;
268          }
269          description { state: "disabled" 0.0;
270             inherit: "default" 0.0;
271             visible: 1;
272             color: 128 128 128 128;
273          }
274       }
275    }
276    programs {
277       program { name: "load";
278          signal: "load";
279          source: "";
280          script {
281             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
282             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
283             set_int(sbvis_h, 0);
284             set_int(sbvis_v, 0);
285             set_int(sbalways_v, 0);
286             set_int(sbalways_h, 0);
287             set_int(sbvis_timer, 0);
288             emit("reload", "elm");
289          }
290       }
291
292       program { name: "vbar_show";
293          signal: "elm,action,show,vbar";
294          source: "elm";
295          action:  STATE_SET "default" 0.0;
296          target: "sb_vbar_clip_master";
297       }
298       program { name: "vbar_hide";
299          signal: "elm,action,hide,vbar";
300          source: "elm";
301          action:  STATE_SET "hidden" 0.0;
302          target: "sb_vbar_clip_master";
303       }
304       program { name: "vbar_show_always";
305          signal: "elm,action,show_always,vbar";
306          source: "elm";
307          script {
308             new v;
309             v = get_int(sbvis_v);
310             v |= get_int(sbalways_v);
311             if (!v) {
312                set_int(sbalways_v, 1);
313                emit("do-show-vbar", "");
314                set_int(sbvis_v, 1);
315             }
316          }
317       }
318       program { name: "vbar_show_notalways";
319          signal: "elm,action,show_notalways,vbar";
320          source: "elm";
321          script {
322             new v;
323             v = get_int(sbalways_v);
324             if (v) {
325                set_int(sbalways_v, 0);
326                v = get_int(sbvis_v);
327                if (!v) {
328                   emit("do-hide-vbar", "");
329                   set_int(sbvis_v, 0);
330                }
331             }
332          }
333       }
334       program { name: "sb_vbar_show";
335          signal: "do-show-vbar";
336          source: "";
337          action:  STATE_SET "default" 0.0;
338          transition: LINEAR 0.5;
339          target: "sb_vbar_clip";
340       }
341       program { name: "sb_vbar_hide";
342          signal: "do-hide-vbar";
343          source: "";
344          action:  STATE_SET "hidden" 0.0;
345          transition: LINEAR 0.5;
346          target: "sb_vbar_clip";
347       }
348
349       program { name: "hbar_show";
350          signal: "elm,action,show,hbar";
351          source: "elm";
352          action:  STATE_SET "default" 0.0;
353          target: "sb_hbar_clip_master";
354       }
355       program { name: "hbar_hide";
356          signal: "elm,action,hide,hbar";
357          source: "elm";
358          action:  STATE_SET "hidden" 0.0;
359          target: "sb_hbar_clip_master";
360       }
361       program { name: "hbar_show_always";
362          signal: "elm,action,show_always,hbar";
363          source: "elm";
364          script {
365             new v;
366             v = get_int(sbvis_h);
367             v |= get_int(sbalways_h);
368             if (!v) {
369                set_int(sbalways_h, 1);
370                emit("do-show-hbar", "");
371                set_int(sbvis_h, 1);
372             }
373          }
374       }
375       program { name: "hbar_show_notalways";
376          signal: "elm,action,show_notalways,hbar";
377          source: "elm";
378          script {
379             new v;
380             v = get_int(sbalways_h);
381             if (v) {
382                set_int(sbalways_h, 0);
383                v = get_int(sbvis_h);
384                if (!v) {
385                   emit("do-hide-hbar", "");
386                   set_int(sbvis_h, 0);
387                }
388             }
389          }
390       }
391       program { name: "sb_hbar_show";
392          signal: "do-show-hbar";
393          source: "";
394          action:  STATE_SET "default" 0.0;
395          transition: LINEAR 0.5;
396          target: "sb_hbar_clip";
397       }
398       program { name: "sb_hbar_hide";
399          signal: "do-hide-hbar";
400          source: "";
401          action:  STATE_SET "hidden" 0.0;
402          transition: LINEAR 0.5;
403          target: "sb_hbar_clip";
404       }
405
406       program { name: "scroll";
407          signal: "elm,action,scroll";
408          source: "elm";
409          script {
410             new v;
411             v = get_int(sbvis_v);
412             v |= get_int(sbalways_v);
413             if (!v) {
414                emit("do-show-vbar", "");
415                set_int(sbvis_v, 1);
416             }
417             v = get_int(sbvis_h);
418             v |= get_int(sbalways_h);
419             if (!v) {
420                emit("do-show-hbar", "");
421                set_int(sbvis_h, 1);
422             }
423             v = get_int(sbvis_timer);
424             if (v > 0) cancel_timer(v);
425             v = timer(1.0, "timer0", 0);
426             set_int(sbvis_timer, v);
427          }
428       }
429       program { name: "disable";
430          signal: "elm,state,disabled";
431          source: "elm";
432          action: STATE_SET "disabled" 0.0;
433          target: "disabler";
434       }
435       program { name: "enable";
436          signal: "elm,state,enabled";
437          source: "elm";
438          action: STATE_SET "default" 0.0;
439          target: "disabler";
440       }
441    }
442 }
443
444 group { name: "elm/scroller/base/handler";
445    alias: "elm/carousel/base/handler";
446
447    data {
448       item: "focus_highlight" "on";
449    }
450    script {
451       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
452       public sh_timer, edge_timer;
453       public timer0(val) {
454          new v;
455          v = get_int(sbvis_v);
456          if (v) {
457             v = get_int(sbalways_v);
458             if (!v) {
459                emit("do-hide-vbar", "");
460                set_int(sbvis_v, 0);
461             }
462          }
463          v = get_int(sbvis_h);
464          if (v) {
465             v = get_int(sbalways_h);
466             if (!v) {
467                emit("do-hide-hbar", "");
468                set_int(sbvis_h, 0);
469             }
470          }
471          set_int(sbvis_timer, 0);
472          return 0;
473       }
474       public timer1(val) {
475          emit("do-hide-vshadow", "");
476          emit("do-hide-hshadow", "");
477          set_int(sh_timer, 0);
478          return 0;
479       }
480       public timer2(val) {
481          emit("do-hide-vshadow", "");
482          emit("do-hide-hshadow", "");
483          set_int(edge_timer, 0);
484          return 0;
485       }
486    }
487    images {
488       image: "00_fast_scroll_handler_top.png" COMP;
489       image: "00_fast_scroll_handler_center.png" COMP;
490       image: "00_fast_scroll_handler_bottom.png" COMP;
491       image: "00_fast_scroll_handler_left_h.png" COMP;
492       image: "00_fast_scroll_handler_center_h.png" COMP;
493       image: "00_fast_scroll_handler_right_h.png" COMP;
494    }
495    parts {
496       part { name: "bg";
497          type: RECT;
498          scale: 1;
499          description { state: "default" 0.0;
500             rel1.offset: 0 0;
501             rel2.offset: -1 -1;
502             color: 255 255 255 0;
503          }
504       }
505       part { name: "clipper";
506          type: RECT;
507          mouse_events: 0;
508          scale: 1;
509          description { state: "default" 0.0;
510             rel1.to: "bg";
511             rel2.to: "bg";
512             rel1.offset: 0 0;
513             rel2.offset: -1 -1;
514          }
515       }
516       part { name: "elm.swallow.content";
517          clip_to: "clipper";
518          type: SWALLOW;
519          scale: 1;
520          description { state: "default" 0.0;
521             rel1.to: "bg";
522             rel2.to: "bg";
523             rel1.offset: 0 0;
524             rel2.offset: -1 -1;
525          }
526       }
527       part { name: "sb_vbar_clip_master";
528          type: RECT;
529          mouse_events: 0;
530          scale: 1;
531          description { state: "default" 0.0;
532          }
533          description { state: "hidden" 0.0;
534             visible: 0;
535             color: 255 255 255 0;
536          }
537       }
538       part { name: "sb_vbar_clip";
539          clip_to: "sb_vbar_clip_master";
540          type: RECT;
541          mouse_events: 0;
542          scale: 1;
543          description { state: "default" 0.0;
544          }
545          description { state: "hidden" 0.0;
546             visible: 0;
547             color: 255 255 255 0;
548          }
549       }
550       part { name: "sb_vbar";
551          type: RECT;
552          mouse_events: 0;
553          scale: 1;
554          description { state: "default" 0.0;
555             fixed: 1 1;
556             visible: 0;
557             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
558             align: 1.0 0.0;
559             rel1 {
560                relative: 1.0 0.0;
561                to_y:     "elm.swallow.content";
562                to_x:     "elm.swallow.content";
563             }
564             rel2 {
565                relative: 1.0 1.0;
566                to_y:     "sb_hbar";
567                to_x:     "elm.swallow.content";
568             }
569          }
570       }
571       part { name: "elm.dragable.vbar";
572          type: RECT;
573          clip_to: "sb_vbar_clip";
574          mouse_events: 1;
575          scale: 1;
576          dragable {
577             x: 0 0 0;
578             y: 1 1 0;
579             confine: "sb_vbar";
580          }
581          description { state: "default" 0.0;
582             fixed: 1 1;
583             color: 0 0 0 0;
584             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
585             max: 30 99999;
586             rel1 {
587                relative: 0.5  0.5;
588                offset:   0    0;
589                to: "sb_vbar";
590             }
591             rel2 {
592                relative: 0.5  0.5;
593                offset:   0    0;
594                to: "sb_vbar";
595             }
596          }
597       }
598       part { name: "scrollbar_handler_image_top";
599          clip_to: "sb_vbar_clip";
600          mouse_events: 0;
601          scale: 1;
602          description { state: "default" 0.0;
603             fixed: 1 1;
604             rel1.relative: 0.0 0.0;
605             rel1.to: "elm.dragable.vbar";
606             rel2.relative: 1.0 0.0;
607             rel2.to: "scrollbar_handler_image_middle";
608             visible: 1;
609             image {
610                normal: "00_fast_scroll_handler_top.png";
611                border: 36 0 31 0;
612                border_scale: 1;
613             }
614          }
615       }
616       part { name: "scrollbar_handler_image_middle";
617          clip_to: "sb_vbar_clip";
618          mouse_events: 0;
619          scale: 1;
620          description { state: "default" 0.0;
621             fixed: 1 1;
622             rel1.relative: 0.5 0.5;
623             rel1.to: "elm.dragable.vbar";
624             rel2.relative: 0.5 0.5;
625             rel2.to: "elm.dragable.vbar";
626             visible: 1;
627             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIDDLE_MIN_SIZE_INC;
628             image {
629                normal: "00_fast_scroll_handler_center.png";
630                border: 36 0 0 0;
631                border_scale: 1;
632             }
633          }
634       }
635       part { name: "scrollbar_handler_image_bottom";
636          clip_to: "sb_vbar_clip";
637          mouse_events: 0;
638          scale: 1;
639          description { state: "default" 0.0;
640             fixed: 1 1;
641             rel1.relative: 0.0 1.0;
642             rel1.to: "scrollbar_handler_image_middle";
643             rel2.relative: 1.0 1.0;
644             rel2.to: "elm.dragable.vbar";
645             visible: 1;
646             image {
647                normal: "00_fast_scroll_handler_bottom.png";
648                border: 36 0 0 36;
649                border_scale: 1;
650             }
651          }
652       }
653       part { name: "sb_hbar_clip_master";
654          type: RECT;
655          mouse_events: 0;
656          scale: 1;
657          description { state: "default" 0.0;
658          }
659          description { state: "hidden" 0.0;
660             visible: 0;
661             color: 255 255 255 0;
662          }
663       }
664       part { name: "sb_hbar_clip";
665          clip_to: "sb_hbar_clip_master";
666          type: RECT;
667          mouse_events: 0;
668          scale: 1;
669          description { state: "default" 0.0;
670          }
671          description { state: "hidden" 0.0;
672             visible: 0;
673             color: 255 255 255 0;
674          }
675       }
676       part { name: "sb_hbar";
677          type: RECT;
678          mouse_events: 0;
679          scale: 1;
680          description { state: "default" 0.0;
681             fixed: 1 1;
682             visible: 0;
683             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
684             align: 0.0 1.0;
685             rel1 {
686                relative: 0.0 1.0;
687                to_x:     "elm.swallow.content";
688                to_y:     "elm.swallow.content";
689             }
690             rel2 {
691                relative: 0.0 1.0;
692                offset: -1 -1;
693                to_x: "sb_vbar";
694                to_y:     "elm.swallow.content";
695             }
696          }
697       }
698       part { name: "elm.dragable.hbar";
699          type: RECT;
700          clip_to: "sb_hbar_clip";
701          mouse_events: 1;
702          scale: 1;
703          dragable {
704             x: 1 1 0;
705             y: 0 0 0;
706             confine: "sb_hbar";
707          }
708          description { state: "default" 0.0;
709             fixed: 1 1;
710             color: 0 0 0 0;
711             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
712             max: 99999 30;
713             rel1 {
714                relative: 0.5  0.5;
715                offset:   0    0;
716                to: "sb_hbar";
717             }
718             rel2 {
719                relative: 0.5  0.5;
720                offset:   0    0;
721                to: "sb_hbar";
722             }
723          }
724       }
725       part { name: "h_scrollbar_handler_image_left";
726          clip_to: "sb_hbar_clip";
727          mouse_events: 0;
728          scale: 1;
729          description { state: "default" 0.0;
730             fixed: 1 1;
731             rel1.relative: 0.0 0.0;
732             rel1.to: "elm.dragable.hbar";
733             rel2.relative: 0.0 1.0;
734             rel2.to: "scrollbar_handler_image_hor";
735             visible: 1;
736             image {
737                normal: "00_fast_scroll_handler_left_h.png";
738                border: 31 0 36 0;
739                border_scale: 1;
740             }
741          }
742       }
743       part { name: "scrollbar_handler_image_hor";
744          clip_to: "sb_hbar_clip";
745          mouse_events: 0;
746          scale: 1;
747          description { state: "default" 0.0;
748          fixed: 1 1;
749             rel1.relative: 0.5 0.5;
750             rel1.to: "elm.dragable.hbar";
751             rel2.relative: 0.5 0.5;
752             rel2.to: "elm.dragable.hbar";
753             visible: 1;
754             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIDDLE_MIN_SIZE_INC;
755             image {
756                normal: "00_fast_scroll_handler_center_h.png";
757                border: 0 0 36 0;
758                border_scale: 1;
759             }
760          }
761       }
762       part { name: "h_scrollbar_handler_image_right";
763          clip_to: "sb_hbar_clip";
764          mouse_events: 0;
765          scale: 1;
766          description { state: "default" 0.0;
767             fixed: 1 1;
768             rel1.relative: 1.0 0.0;
769             rel1.to: "scrollbar_handler_image_hor";
770             rel2.relative: 1.0 1.0;
771             rel2.to: "elm.dragable.hbar";
772             visible: 1;
773             image {
774                normal: "00_fast_scroll_handler_right_h.png";
775                border: 0 36 36 0;
776                border_scale: 1;
777             }
778          }
779       }
780       part { name: "disabler";
781          type: RECT;
782          scale: 1;
783          description { state: "default" 0.0;
784             rel1.to: "clipper";
785             rel2.to: "clipper";
786             color: 0 0 0 0;
787             visible: 0;
788          }
789          description { state: "disabled" 0.0;
790             inherit: "default" 0.0;
791             visible: 1;
792             color: 128 128 128 128;
793          }
794       }
795    }
796    programs {
797       program { name: "load";
798          signal: "load";
799          source: "";
800          script {
801             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
802             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
803             set_int(sbvis_h, 0);
804             set_int(sbvis_v, 0);
805             set_int(sbalways_v, 0);
806             set_int(sbalways_h, 0);
807             set_int(sbvis_timer, 0);
808             emit("reload", "elm");
809          }
810       }
811       program { name: "vbar_show";
812          signal: "elm,action,show,vbar";
813          source: "elm";
814          action: STATE_SET "default" 0.0;
815          target: "sb_vbar_clip_master";
816       }
817       program { name: "vbar_hide";
818          signal: "elm,action,hide,vbar";
819          source: "elm";
820          action: STATE_SET "hidden" 0.0;
821          target: "sb_vbar_clip_master";
822       }
823       program { name: "vbar_show_always";
824          signal: "elm,action,show_always,vbar";
825          source: "elm";
826          script {
827             new v;
828             v = get_int(sbvis_v);
829             v |= get_int(sbalways_v);
830             if (!v) {
831                set_int(sbalways_v, 1);
832                emit("do-show-vbar", "");
833                set_int(sbvis_v, 1);
834             }
835          }
836       }
837       program { name: "vbar_show_notalways";
838          signal: "elm,action,show_notalways,vbar";
839          source: "elm";
840          script {
841             new v;
842             v = get_int(sbalways_v);
843             if (v) {
844                set_int(sbalways_v, 0);
845                v = get_int(sbvis_v);
846                if (!v) {
847                   emit("do-hide-vbar", "");
848                   set_int(sbvis_v, 0);
849                }
850             }
851          }
852       }
853       program { name: "vbar_press";
854          signal: "mouse,down,1";
855          source: "elm.dragable.vbar";
856          action:  SIGNAL_EMIT "elm,vbar,press" "elm";
857       }
858       program { name: "vbar_unpress";
859          signal: "mouse,up,1";
860          source: "elm.dragable.vbar";
861          action:  SIGNAL_EMIT "elm,vbar,unpress" "elm";
862       }
863       program { name: "sb_vbar_show";
864          signal: "do-show-vbar";
865          source: "";
866          action: STATE_SET "default" 0.0;
867          transition: LINEAR 0.5;
868          target: "sb_vbar_clip";
869       }
870       program { name: "sb_vbar_hide";
871          signal: "do-hide-vbar";
872          source: "";
873          action: STATE_SET "hidden" 0.0;
874          transition: LINEAR 0.5;
875          target: "sb_vbar_clip";
876       }
877       program { name: "hbar_show";
878          signal: "elm,action,show,hbar";
879          source: "elm";
880          action: STATE_SET "default" 0.0;
881          target: "sb_hbar_clip_master";
882       }
883       program { name: "hbar_hide";
884          signal: "elm,action,hide,hbar";
885          source: "elm";
886          action:  STATE_SET "hidden" 0.0;
887          target: "sb_hbar_clip_master";
888       }
889       program { name: "hbar_show_always";
890          signal: "elm,action,show_always,hbar";
891          source: "elm";
892          script {
893             new v;
894             v = get_int(sbvis_h);
895             v |= get_int(sbalways_h);
896             if (!v) {
897                set_int(sbalways_h, 1);
898                emit("do-show-hbar", "");
899                set_int(sbvis_h, 1);
900             }
901          }
902       }
903       program { name: "hbar_show_notalways";
904          signal: "elm,action,show_notalways,hbar";
905          source: "elm";
906          script {
907             new v;
908             v = get_int(sbalways_h);
909             if (v) {
910                set_int(sbalways_h, 0);
911                v = get_int(sbvis_h);
912                if (!v) {
913                   emit("do-hide-hbar", "");
914                   set_int(sbvis_h, 0);
915                }
916             }
917          }
918       }
919       program { name: "hbar_press";
920          signal: "mouse,down,1";
921          source: "elm.dragable.hbar";
922          action:  SIGNAL_EMIT "elm,hbar,press" "elm";
923       }
924       program { name: "hbar_unpress";
925          signal: "mouse,up,1";
926          source: "elm.dragable.hbar";
927          action:  SIGNAL_EMIT "elm,hbar,unpress" "elm";
928       }
929       program { name: "sb_hbar_show";
930          signal: "do-show-hbar";
931          source: "";
932          action: STATE_SET "default" 0.0;
933          transition: LINEAR 0.5;
934          target: "sb_hbar_clip";
935       }
936       program { name: "sb_hbar_hide";
937          signal: "do-hide-hbar";
938          source: "";
939          action: STATE_SET "hidden" 0.0;
940          transition: LINEAR 0.5;
941          target: "sb_hbar_clip";
942       }
943
944       program { name: "scroll";
945          signal: "elm,action,scroll";
946          source: "elm";
947          script {
948             new v;
949             v = get_int(sbvis_v);
950             v |= get_int(sbalways_v);
951             if (!v) {
952                emit("do-show-vbar", "");
953                set_int(sbvis_v, 1);
954             }
955             v = get_int(sbvis_h);
956             v |= get_int(sbalways_h);
957             if (!v) {
958                emit("do-show-hbar", "");
959                set_int(sbvis_h, 1);
960             }
961             v = get_int(sbvis_timer);
962             if (v > 0) cancel_timer(v);
963             v = timer(1.0, "timer0", 0);
964             set_int(sbvis_timer, v);
965          }
966       }
967
968       program { name: "disable";
969          signal: "elm,state,disabled";
970          source: "elm";
971          action: STATE_SET "disabled" 0.0;
972          target: "disabler";
973       }
974       program { name: "enable";
975          signal: "elm,state,enabled";
976          source: "elm";
977          action: STATE_SET "default" 0.0;
978          target: "disabler";
979       }
980    }
981 }
982
983 group { name: "elm/genlist/base/default";
984    alias: "elm/genscroller/base/default";
985    alias: "elm/list/base/default";
986    inherit: "elm/scroller/base/default";
987
988    images {
989       image: "00_overscrolling_top.png" COMP;
990       image: "00_overscrolling_bottom.png" COMP;
991       image: "00_overscrolling_left.png" COMP;
992       image: "00_overscrolling_right.png" COMP;
993    }
994
995    parts {
996       part { name: "vshadow_clip";
997          type: RECT;
998          mouse_events: 0;
999          scale: 1;
1000          description { state: "default" 0.0;
1001          }
1002          description { state: "hidden" 0.0;
1003             visible: 0;
1004             color: 255 255 255 0;
1005          }
1006       }
1007       part { name: "hshadow_clip";
1008          type: RECT;
1009          mouse_events: 0;
1010          scale: 1;
1011          description { state: "default" 0.0;
1012          }
1013          description { state: "hidden" 0.0;
1014             visible: 0;
1015             color: 255 255 255 0;
1016          }
1017       }
1018       part { name: "shadow_top";
1019          clip_to: "vshadow_clip";
1020          type: IMAGE;
1021          scale: 1;
1022          mouse_events: 0;
1023          description { state: "default" 0.0;
1024             min: 0 30;
1025             fixed: 1 1;
1026             align: 0.5 0.0;
1027             color: 255 255 255 100;
1028             rel1.relative: 0.0 0.0;
1029             rel2.relative: 1.0 0.0;
1030             rel1.to: "elm.swallow.content";
1031             rel2.to: "elm.swallow.content";
1032             image.normal: "00_overscrolling_top.png";
1033          }
1034          description { state: "edge" 0.0;
1035             inherit: "default" 0.0;
1036             color: 255 255 255 255;
1037          }
1038          description { state: "edge_op" 0.0;
1039             inherit: "default" 0.0;
1040             color: 255 255 255 65;
1041          }
1042       }
1043       part { name: "shadow_bottom";
1044          clip_to: "vshadow_clip";
1045          type: IMAGE;
1046          scale: 1;
1047          mouse_events: 0;
1048          description { state: "default" 0.0;
1049             min: 0 30;
1050             fixed: 1 1;
1051             align: 0.5 1.0;
1052             color: 255 255 255 100;
1053             rel1.relative: 0.0 1.0;
1054             rel2.relative: 1.0 1.0;
1055             rel1.to: "elm.swallow.content";
1056             rel2.to: "elm.swallow.content";
1057             image.normal: "00_overscrolling_bottom.png";
1058          }
1059          description { state: "edge" 0.0;
1060             inherit: "default" 0.0;
1061             color: 255 255 255 255;
1062          }
1063          description { state: "edge_op" 0.0;
1064             inherit: "default" 0.0;
1065             color: 255 255 255 65;
1066          }
1067       }
1068       part { name: "shadow_left";
1069          clip_to: "hshadow_clip";
1070          type: IMAGE;
1071          scale: 1;
1072          mouse_events: 0;
1073          description { state: "default" 0.0;
1074             min: 30 0;
1075             fixed: 1 1;
1076             align: 0.0 0.5;
1077             color: 255 255 255 100;
1078             rel1.relative: 0.0 0.0;
1079             rel2.relative: 0.0 1.0;
1080             rel1.to: "elm.swallow.content";
1081             rel2.to: "elm.swallow.content";
1082             image.normal: "00_overscrolling_left.png";
1083          }
1084          description { state: "edge" 0.0;
1085             inherit: "default" 0.0;
1086             color: 255 255 255 255;
1087          }
1088          description { state: "edge_op" 0.0;
1089             inherit: "default" 0.0;
1090             color: 255 255 255 65;
1091          }
1092       }
1093       part { name: "shadow_right";
1094          clip_to: "hshadow_clip";
1095          type: IMAGE;
1096          scale: 1;
1097          mouse_events: 0;
1098          description { state: "default" 0.0;
1099             min: 30 0;
1100             fixed: 1 1;
1101             align: 1.0 0.5;
1102             color: 255 255 255 100;
1103             rel1.relative: 1.0 0.0;
1104             rel2.relative: 1.0 1.0;
1105             rel1.to: "elm.swallow.content";
1106             rel2.to: "elm.swallow.content";
1107             image.normal: "00_overscrolling_right.png";
1108          }
1109          description { state: "edge" 0.0;
1110             inherit: "default" 0.0;
1111             color: 255 255 255 255;
1112          }
1113          description { state: "edge_op" 0.0;
1114             inherit: "default" 0.0;
1115             color: 255 255 255 65;
1116          }
1117       }
1118       part { name: "padding_jump_to_top";
1119          type: SPACER;
1120          scale: 1;
1121          description { state: "default" 0.0;
1122             min: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
1123             max: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
1124             rel1.relative: 1.0 0.0;
1125             rel2.relative: 1.0 0.0;
1126             rel1.to: "elm.swallow.content";
1127             rel2.to: "elm.swallow.content";
1128             fixed: 1 1;
1129             align: 1.0 0.0;
1130          }
1131       }
1132       part { name: "elm.swallow.jump_to_top";
1133          type: SWALLOW;
1134          scale: 1;
1135          description { state: "default" 0.0;
1136             rel1 {
1137                to: "padding_jump_to_top";
1138                relative: 0.0 1.0;
1139             }
1140             rel2 {
1141                to: "padding_jump_to_top";
1142                relative: 0.0 1.0;
1143             }
1144             fixed: 1 1;
1145             align: 1.0 0.0;
1146          }
1147       }
1148       part { name: "padding_jump_to_left";
1149          type: SPACER;
1150          scale: 1;
1151          description { state: "default" 0.0;
1152             min: BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC;
1153             max: BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC;
1154             rel1.relative: 0.0 1.0;
1155             rel2.relative: 0.0 1.0;
1156             rel1.to: "elm.swallow.content";
1157             rel2.to: "elm.swallow.content";
1158             fixed: 1 1;
1159             align: 0.0 1.0;
1160          }
1161       }
1162       part { name: "elm.swallow.jump_to_left";
1163          type: SWALLOW;
1164          scale: 1;
1165          description { state: "default" 0.0;
1166             rel1 {
1167                to: "padding_jump_to_left";
1168                relative: 1.0 0.0;
1169             }
1170             rel2 {
1171                to: "padding_jump_to_left";
1172                relative: 1.0 0.0;
1173             }
1174             fixed: 1 1;
1175             align: 0.0 1.0;
1176          }
1177       }
1178    }
1179    programs {
1180       program { name: "load";
1181          script {
1182             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
1183             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
1184             set_state(PART:"vshadow_clip", "hidden", 0.0);
1185             set_state(PART:"hshadow_clip", "hidden", 0.0);
1186             set_int(sbvis_h, 0);
1187             set_int(sbvis_v, 0);
1188             set_int(sbalways_v, 0);
1189             set_int(sbalways_h, 0);
1190             set_int(sbvis_timer, 0);
1191             set_int(sh_v, 0);
1192             set_int(sh_timer, 0);
1193             set_int(edge_timer, 0);
1194             emit("reload", "elm");
1195          }
1196       }
1197       program { name: "vshadow_show";
1198          signal: "do-show-vshadow";
1199          source: "";
1200          action:  STATE_SET "default" 0.0;
1201          transition: LINEAR 0.5;
1202          target: "vshadow_clip";
1203       }
1204       program { name: "vshadow_hide";
1205          signal: "do-hide-vshadow";
1206          source: "";
1207          action:  STATE_SET "hidden" 0.0;
1208          transition: LINEAR 0.2;
1209          target: "vshadow_clip";
1210       }
1211       program { name: "hshadow_show";
1212          signal: "do-show-hshadow";
1213          source: "";
1214          action:  STATE_SET "default" 0.0;
1215          transition: LINEAR 0.5;
1216          target: "hshadow_clip";
1217       }
1218       program { name: "hshadow_hide";
1219          signal: "do-hide-hshadow";
1220          source: "";
1221          action:  STATE_SET "hidden" 0.0;
1222          transition: LINEAR 0.2;
1223          target: "hshadow_clip";
1224       }
1225       program { name: "scroll";
1226          signal: "elm,action,scroll";
1227          source: "elm";
1228          script {
1229             new v;
1230             v = get_int(sbvis_v);
1231             v |= get_int(sbalways_v);
1232             if (!v) {
1233                emit("do-show-vbar", "");
1234                set_int(sbvis_v, 1);
1235             }
1236             v = get_int(sbvis_h);
1237             v |= get_int(sbalways_h);
1238             if (!v) {
1239                emit("do-show-hbar", "");
1240                set_int(sbvis_h, 1);
1241             }
1242             v = get_int(sbvis_timer);
1243             if (v > 0) cancel_timer(v);
1244             v = timer(1, "timer0", 0);
1245             set_int(sbvis_timer, v);
1246          }
1247       }
1248       program { name: "scroll_up";
1249          signal: "elm,action,scroll,up";
1250          source: "elm";
1251          after: "scroll_vertical";
1252       }
1253       program { name: "scroll_down";
1254          signal: "elm,action,scroll,down";
1255          source: "elm";
1256          after: "scroll_vertical";
1257       }
1258       program { name: "scroll_vertical";
1259          script {
1260             new v;
1261             v = get_int(edge_timer);
1262             if (!v) {
1263                set_state(PART:"shadow_top", "default", 0.0);
1264                set_state(PART:"shadow_bottom", "default", 0.0);
1265                emit("do-show-vshadow", "");
1266                v = get_int(sh_timer);
1267                if (v > 0) cancel_timer(v);
1268                v = timer(0.1, "timer1", 0);
1269                set_int(sh_timer, v);
1270             }
1271          }
1272       }
1273       program { name: "scroll_left";
1274          signal: "elm,action,scroll,left";
1275          source: "elm";
1276          after: "scroll_horizontal";
1277       }
1278       program { name: "scroll_right";
1279          signal: "elm,action,scroll,right";
1280          source: "elm";
1281          after: "scroll_horizontal";
1282       }
1283       program { name: "scroll_horizontal";
1284          script {
1285             new v;
1286             v = get_int(edge_timer);
1287             if (!v) {
1288                set_state(PART:"shadow_left", "default", 0.0);
1289                set_state(PART:"shadow_right", "default", 0.0);
1290                emit("do-show-hshadow", "");
1291                v = get_int(sh_timer);
1292                if (v > 0) cancel_timer(v);
1293                v = timer(0.1, "timer1", 0);
1294                set_int(sh_timer, v);
1295             }
1296          }
1297       }
1298       program { name: "edge_top";
1299          signal: "elm,edge,top";
1300          source: "elm";
1301          script {
1302             set_state(PART:"shadow_top", "edge", 0.0);
1303             set_state(PART:"shadow_bottom", "edge_op", 0.0);
1304          }
1305          after: "edge_vertical";
1306       }
1307       program { name: "edge_bottom";
1308          signal: "elm,edge,bottom";
1309          source: "elm";
1310          script {
1311             set_state(PART:"shadow_top", "edge_op", 0.0);
1312             set_state(PART:"shadow_bottom", "edge", 0.0);
1313          }
1314          after: "edge_vertical";
1315       }
1316       program { name: "edge_left";
1317          signal: "elm,edge,left";
1318          source: "elm";
1319          script {
1320             set_state(PART:"shadow_left", "edge", 0.0);
1321             set_state(PART:"shadow_right", "edge_op", 0.0);
1322          }
1323          after: "edge_horizontal";
1324       }
1325       program { name: "edge_right";
1326          signal: "elm,edge,right";
1327          source: "elm";
1328          script {
1329             set_state(PART:"shadow_left", "edge_op", 0.0);
1330             set_state(PART:"shadow_right", "edge", 0.0);
1331          }
1332          after: "edge_horizontal";
1333       }
1334       program { name: "edge_vertical";
1335          script {
1336             new v;
1337             v = get_int(sh_timer);
1338             if (v > 0) cancel_timer(v);
1339             v = get_int(edge_timer);
1340             if (!v) {
1341                 emit("do-show-vshadow", "");
1342             }
1343             if (v > 0) cancel_timer(v);
1344             v = timer(0.1, "timer2", 0);
1345             set_int(edge_timer, v);
1346          }
1347       }
1348       program { name: "edge_horizontal";
1349          script {
1350             new v;
1351             v = get_int(sh_timer);
1352             if (v > 0) cancel_timer(v);
1353             v = get_int(edge_timer);
1354             if (!v) {
1355                 emit("do-show-hshadow", "");
1356             }
1357             if (v > 0) cancel_timer(v);
1358             v = timer(0.1, "timer2", 0);
1359             set_int(edge_timer, v);
1360          }
1361       }
1362       program { name: "show";
1363          signal: "show";
1364          source: "";
1365          script {
1366             new v;
1367             emit("do-show-vbar", "");
1368             set_int(sbvis_v, 1);
1369             v = get_int(sbalways_v);
1370             if (!v) {
1371               v = get_int(sbvis_timer);
1372               if (v > 0) cancel_timer(v);
1373               v = timer(1.0, "timer0", 0);
1374               set_int(sbvis_timer, v);
1375             }
1376             emit("do-show-hbar", "");
1377             set_int(sbvis_h, 1);
1378             v = get_int(sbalways_h);
1379             if (!v) {
1380               v = get_int(sbvis_timer);
1381               if (v > 0) cancel_timer(v);
1382               v = timer(1.0, "timer0", 0);
1383               set_int(sbvis_timer, v);
1384             }
1385          }
1386       }
1387    }
1388 }
1389
1390 group { name: "elm/genlist/base/handler";
1391    alias: "elm/genscroller/base/handler";
1392    alias: "elm/list/base/handler";
1393    inherit: "elm/scroller/base/handler";
1394
1395    images {
1396       image: "00_overscrolling_top.png" COMP;
1397       image: "00_overscrolling_bottom.png" COMP;
1398       image: "00_overscrolling_left.png" COMP;
1399       image: "00_overscrolling_right.png" COMP;
1400    }
1401
1402    parts {
1403       part { name: "vshadow_clip";
1404          type: RECT;
1405          mouse_events: 0;
1406          scale: 1;
1407          description { state: "default" 0.0;
1408          }
1409          description { state: "hidden" 0.0;
1410             visible: 0;
1411             color: 255 255 255 0;
1412          }
1413       }
1414       part { name: "hshadow_clip";
1415          type: RECT;
1416          mouse_events: 0;
1417          scale: 1;
1418          description { state: "default" 0.0;
1419          }
1420          description { state: "hidden" 0.0;
1421             visible: 0;
1422             color: 255 255 255 0;
1423          }
1424       }
1425       part { name: "shadow_top";
1426          clip_to: "vshadow_clip";
1427          type: IMAGE;
1428          scale: 1;
1429          mouse_events: 0;
1430          description { state: "default" 0.0;
1431             min: 0 30;
1432             fixed: 1 1;
1433             align: 0.5 0.0;
1434             color: 255 255 255 100;
1435             rel1.relative: 0.0 0.0;
1436             rel2.relative: 1.0 0.0;
1437             rel1.to: "elm.swallow.content";
1438             rel2.to: "elm.swallow.content";
1439             image.normal: "00_overscrolling_top.png";
1440          }
1441          description { state: "edge" 0.0;
1442             inherit: "default" 0.0;
1443             color: 255 255 255 255;
1444          }
1445          description { state: "hidden" 0.0;
1446             inherit: "default" 0.0;
1447             visible: 0;
1448          }
1449       }
1450       part { name: "shadow_bottom";
1451          clip_to: "vshadow_clip";
1452          type: IMAGE;
1453          scale: 1;
1454          mouse_events: 0;
1455          description { state: "default" 0.0;
1456             min: 0 30;
1457             fixed: 1 1;
1458             align: 0.5 1.0;
1459             color: 255 255 255 100;
1460             rel1.relative: 0.0 1.0;
1461             rel2.relative: 1.0 1.0;
1462             rel1.to: "elm.swallow.content";
1463             rel2.to: "elm.swallow.content";
1464             image.normal: "00_overscrolling_bottom.png";
1465          }
1466          description { state: "edge" 0.0;
1467             inherit: "default" 0.0;
1468             color: 255 255 255 255;
1469          }
1470          description { state: "hidden" 0.0;
1471             inherit: "default" 0.0;
1472             visible: 0;
1473          }
1474       }
1475       part { name: "shadow_left";
1476          clip_to: "hshadow_clip";
1477          type: IMAGE;
1478          scale: 1;
1479          mouse_events: 0;
1480          description { state: "default" 0.0;
1481             min: 30 0;
1482             fixed: 1 1;
1483             align: 0.0 0.5;
1484             color: 255 255 255 100;
1485             rel1.relative: 0.0 0.0;
1486             rel2.relative: 0.0 1.0;
1487             rel1.to: "elm.swallow.content";
1488             rel2.to: "elm.swallow.content";
1489             image.normal: "00_overscrolling_left.png";
1490          }
1491          description { state: "edge" 0.0;
1492             inherit: "default" 0.0;
1493             color: 255 255 255 255;
1494          }
1495          description { state: "hidden" 0.0;
1496             inherit: "default" 0.0;
1497             visible: 0;
1498          }
1499       }
1500       part { name: "shadow_right";
1501          clip_to: "hshadow_clip";
1502          type: IMAGE;
1503          scale: 1;
1504          mouse_events: 0;
1505          description { state: "default" 0.0;
1506             min: 30 0;
1507             fixed: 1 1;
1508             align: 1.0 0.5;
1509             color: 255 255 255 100;
1510             rel1.relative: 1.0 0.0;
1511             rel2.relative: 1.0 1.0;
1512             rel1.to: "elm.swallow.content";
1513             rel2.to: "elm.swallow.content";
1514             image.normal: "00_overscrolling_right.png";
1515          }
1516          description { state: "edge" 0.0;
1517             inherit: "default" 0.0;
1518             color: 255 255 255 255;
1519          }
1520          description { state: "hidden" 0.0;
1521             inherit: "default" 0.0;
1522             visible: 0;
1523          }
1524       }
1525    }
1526    programs {
1527       program { name: "load";
1528          signal: "load";
1529          source: "";
1530          script {
1531             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
1532             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
1533             set_state(PART:"vshadow_clip", "hidden", 0.0);
1534             set_state(PART:"hshadow_clip", "hidden", 0.0);
1535             set_int(sbvis_h, 0);
1536             set_int(sbvis_v, 0);
1537             set_int(sbalways_v, 0);
1538             set_int(sbalways_h, 0);
1539             set_int(sbvis_timer, 0);
1540             set_int(sh_timer, 0);
1541             set_int(edge_timer, 0);
1542             emit("reload", "elm");
1543          }
1544       }
1545       program { name: "vbar_show_always";
1546          signal: "elm,action,show_always,vbar";
1547          source: "elm";
1548          script {
1549             new v;
1550             v = get_int(sbvis_v);
1551             v |= get_int(sbalways_v);
1552             if (!v) {
1553                set_int(sbalways_v, 1);
1554                emit("do-show-vbar", "");
1555                set_int(sbvis_v, 1);
1556             }
1557          }
1558       }
1559       program { name: "vbar_show_notalways";
1560          signal: "elm,action,show_notalways,vbar";
1561          source: "elm";
1562          script {
1563             new v;
1564             v = get_int(sbalways_v);
1565             if (v) {
1566                set_int(sbalways_v, 0);
1567                v = get_int(sbvis_v);
1568                if (!v) {
1569                   emit("do-hide-vbar", "");
1570                   set_int(sbvis_v, 0);
1571                }
1572             }
1573          }
1574       }
1575       program { name: "hbar_show_always";
1576          signal: "elm,action,show_always,hbar";
1577          source: "elm";
1578          script {
1579             new v;
1580             v = get_int(sbvis_h);
1581             v |= get_int(sbalways_h);
1582             if (!v) {
1583                set_int(sbalways_h, 1);
1584                emit("do-show-hbar", "");
1585                set_int(sbvis_h, 1);
1586             }
1587          }
1588       }
1589       program { name: "hbar_show_notalways";
1590          signal: "elm,action,show_notalways,hbar";
1591          source: "elm";
1592          script {
1593             new v;
1594             v = get_int(sbalways_h);
1595             if (v) {
1596                set_int(sbalways_h, 0);
1597                v = get_int(sbvis_h);
1598                if (!v) {
1599                   emit("do-hide-hbar", "");
1600                   set_int(sbvis_h, 0);
1601                }
1602             }
1603          }
1604       }
1605       program { name: "vshadow_show";
1606          signal: "do-show-vshadow";
1607          source: "";
1608          action:  STATE_SET "default" 0.0;
1609          transition: LINEAR 0.5;
1610          target: "vshadow_clip";
1611       }
1612       program { name: "vshadow_hide";
1613          signal: "do-hide-vshadow";
1614          source: "";
1615          action:  STATE_SET "hidden" 0.0;
1616          transition: LINEAR 0.2;
1617          target: "vshadow_clip";
1618       }
1619       program { name: "hshadow_show";
1620          signal: "do-show-hshadow";
1621          source: "";
1622          action:  STATE_SET "default" 0.0;
1623          transition: LINEAR 0.5;
1624          target: "hshadow_clip";
1625       }
1626       program { name: "hshadow_hide";
1627          signal: "do-hide-hshadow";
1628          source: "";
1629          action:  STATE_SET "hidden" 0.0;
1630          transition: LINEAR 0.2;
1631          target: "hshadow_clip";
1632       }
1633       program { name: "scroll";
1634          signal: "elm,action,scroll";
1635          source: "elm";
1636          script {
1637             new v;
1638             v = get_int(sbvis_v);
1639             v |= get_int(sbalways_v);
1640             if (!v) {
1641                emit("do-show-vbar", "");
1642                set_int(sbvis_v, 1);
1643             }
1644             v = get_int(sbvis_h);
1645             v |= get_int(sbalways_h);
1646             if (!v) {
1647                emit("do-show-hbar", "");
1648                set_int(sbvis_h, 1);
1649             }
1650             v = get_int(sbvis_timer);
1651             if (v > 0) cancel_timer(v);
1652             v = timer(1, "timer0", 0);
1653             set_int(sbvis_timer, v);
1654          }
1655       }
1656       program { name: "scroll_up";
1657          signal: "elm,action,scroll,up";
1658          source: "elm";
1659          after: "scroll_vertical";
1660       }
1661       program { name: "scroll_down";
1662          signal: "elm,action,scroll,down";
1663          source: "elm";
1664          after: "scroll_vertical";
1665       }
1666       program { name: "scroll_vertical";
1667          script {
1668             new v;
1669             v = get_int(edge_timer);
1670             if (!v) {
1671                set_state(PART:"shadow_top", "default", 0.0);
1672                set_state(PART:"shadow_bottom", "default", 0.0);
1673                emit("do-show-vshadow", "");
1674                v = get_int(sh_timer);
1675                if (v > 0) cancel_timer(v);
1676                v = timer(0.1, "timer1", 0);
1677                set_int(sh_timer, v);
1678             }
1679          }
1680       }
1681       program { name: "scroll_left";
1682          signal: "elm,action,scroll,left";
1683          source: "elm";
1684          after: "scroll_horizontal";
1685       }
1686       program { name: "scroll_right";
1687          signal: "elm,action,scroll,right";
1688          source: "elm";
1689          after: "scroll_horizontal";
1690       }
1691       program { name: "scroll_horizontal";
1692          script {
1693             new v;
1694             v = get_int(edge_timer);
1695             if (!v) {
1696                set_state(PART:"shadow_left", "default", 0.0);
1697                set_state(PART:"shadow_right", "default", 0.0);
1698                emit("do-show-hshadow", "");
1699                v = get_int(sh_timer);
1700                if (v > 0) cancel_timer(v);
1701                v = timer(0.1, "timer1", 0);
1702                set_int(sh_timer, v);
1703             }
1704          }
1705       }
1706       program { name: "edge_top";
1707          signal: "elm,edge,top";
1708          source: "elm";
1709          script {
1710             set_state(PART:"shadow_top", "edge", 0.0);
1711             set_state(PART:"shadow_bottom", "hidden", 0.0);
1712          }
1713          after: "edge_vertical";
1714       }
1715       program { name: "edge_bottom";
1716          signal: "elm,edge,bottom";
1717          source: "elm";
1718          script {
1719             set_state(PART:"shadow_top", "hidden", 0.0);
1720             set_state(PART:"shadow_bottom", "edge", 0.0);
1721          }
1722          after: "edge_vertical";
1723       }
1724       program { name: "edge_left";
1725          signal: "elm,edge,left";
1726          source: "elm";
1727          script {
1728             set_state(PART:"shadow_left", "edge", 0.0);
1729             set_state(PART:"shadow_right", "hidden", 0.0);
1730          }
1731          after: "edge_horizontal";
1732       }
1733       program { name: "edge_right";
1734          signal: "elm,edge,right";
1735          source: "elm";
1736          script {
1737             set_state(PART:"shadow_left", "hidden", 0.0);
1738             set_state(PART:"shadow_right", "edge", 0.0);
1739          }
1740          after: "edge_horizontal";
1741       }
1742       program { name: "edge_vertical";
1743          script {
1744             new v;
1745             v = get_int(sh_timer);
1746             if (v > 0) cancel_timer(v);
1747             v = get_int(edge_timer);
1748             if (!v) {
1749                 emit("do-show-vshadow", "");
1750             }
1751             if (v > 0) cancel_timer(v);
1752             v = timer(0.1, "timer2", 0);
1753             set_int(edge_timer, v);
1754          }
1755       }
1756       program { name: "edge_horizontal";
1757          script {
1758             new v;
1759             v = get_int(sh_timer);
1760             if (v > 0) cancel_timer(v);
1761             v = get_int(edge_timer);
1762             if (!v) {
1763                 emit("do-show-hshadow", "");
1764             }
1765             if (v > 0) cancel_timer(v);
1766             v = timer(0.1, "timer2", 0);
1767             set_int(edge_timer, v);
1768          }
1769       }
1770       program { name: "show";
1771          signal: "show";
1772          source: "";
1773          script {
1774             new v;
1775             emit("do-show-vbar", "");
1776             set_int(sbvis_v, 1);
1777             v = get_int(sbalways_v);
1778             if (!v) {
1779               v = get_int(sbvis_timer);
1780               if (v > 0) cancel_timer(v);
1781               v = timer(1.0, "timer0", 0);
1782               set_int(sbvis_timer, v);
1783             }
1784             emit("do-show-hbar", "");
1785             set_int(sbvis_h, 1);
1786             v = get_int(sbalways_h);
1787             if (!v) {
1788               v = get_int(sbvis_timer);
1789               if (v > 0) cancel_timer(v);
1790               v = timer(1.0, "timer0", 0);
1791               set_int(sbvis_timer, v);
1792             }
1793          }
1794       }
1795    }
1796 }
1797
1798 group { name: "elm/gengrid/base/default";
1799    inherit: "elm/genlist/base/default";
1800
1801    images {
1802        image: "00_grid_overscrolling_top.png" COMP;
1803        image: "00_grid_overscrolling_bottom.png" COMP;
1804        image: "00_grid_overscrolling_left.png" COMP;
1805        image: "00_grid_overscrolling_right.png" COMP;
1806    }
1807
1808    parts {
1809       part { name: "shadow_top";
1810          description { state: "default" 0.0;
1811             min: 0 405;
1812             image.normal: "00_grid_overscrolling_top.png";
1813          }
1814          description { state: "edge" 0.0;
1815             inherit: "default" 0.0;
1816             color: 255 255 255 255;
1817          }
1818       }
1819       part { name: "shadow_bottom";
1820          description { state: "default" 0.0;
1821             min: 0 405;
1822             image.normal: "00_grid_overscrolling_bottom.png";
1823          }
1824          description { state: "edge" 0.0;
1825             inherit: "default" 0.0;
1826             color: 255 255 255 255;
1827          }
1828       }
1829       part { name: "shadow_left";
1830          description { state: "default" 0.0;
1831             min: 405 0;
1832             image.normal: "00_grid_overscrolling_left.png";
1833          }
1834          description { state: "edge" 0.0;
1835             inherit: "default" 0.0;
1836             color: 255 255 255 255;
1837          }
1838       }
1839       part { name: "shadow_right";
1840          description { state: "default" 0.0;
1841             min: 405 0;
1842             image.normal: "00_grid_overscrolling_right.png";
1843          }
1844          description { state: "edge" 0.0;
1845             inherit: "default" 0.0;
1846             color: 255 255 255 255;
1847          }
1848       }
1849    }
1850 }
1851
1852 group { name: "elm/gengrid/base/handler";
1853    inherit: "elm/genlist/base/handler";
1854
1855    parts {
1856       part { name: "shadow_top";
1857          description { state: "default" 0.0;
1858             min: 0 405;
1859             image.normal: "00_grid_overscrolling_top.png";
1860          }
1861          description { state: "edge" 0.0;
1862             inherit: "default" 0.0;
1863             color: 255 255 255 255;
1864          }
1865       }
1866       part { name: "shadow_bottom";
1867          description { state: "default" 0.0;
1868             min: 0 405;
1869             image.normal: "00_grid_overscrolling_bottom.png";
1870          }
1871          description { state: "edge" 0.0;
1872             inherit: "default" 0.0;
1873             color: 255 255 255 255;
1874          }
1875       }
1876       part { name: "shadow_left";
1877          description { state: "default" 0.0;
1878             min: 405 0;
1879             image.normal: "00_grid_overscrolling_left.png";
1880          }
1881          description { state: "edge" 0.0;
1882             inherit: "default" 0.0;
1883             color: 255 255 255 255;
1884          }
1885       }
1886       part { name: "shadow_right";
1887          description { state: "default" 0.0;
1888             min: 405 0;
1889             image.normal: "00_grid_overscrolling_right.png";
1890          }
1891          description { state: "edge" 0.0;
1892             inherit: "default" 0.0;
1893             color: 255 255 255 255;
1894          }
1895       }
1896    }
1897 }