b31264aa5787259176116e798fb714fa27cf1bd0
[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/fastscroll";
1391    alias: "elm/list/base/fastscroll";
1392    alias: "elm/scroller/base/fastscroll";
1393    inherit: "elm/genlist/base/default";
1394    parts {
1395       part {
1396          name: "elm.fastscroll";
1397          type: RECT;
1398          scale: 1;
1399          description {
1400             state: "default" 0.0;
1401             rel1 {
1402                to: "bg";
1403                relative: 1.0 0.0;
1404             }
1405             rel2 {
1406                to: "bg";
1407                relative: 1.0 1.0;
1408             }
1409             align: 1.0 0.5;
1410             min: INDEX_ITEM_WIDTH_INC 0;
1411             visible: 0;
1412          }
1413       }
1414       part {
1415          name: "elm.swallow.content";
1416          clip_to: "clipper";
1417          type: SWALLOW;
1418          scale: 1;
1419          description {
1420             state: "default" 0.0;
1421             rel1.to: "bg";
1422             rel2 {
1423                to: "elm.fastscroll";
1424                relative: 0.0 1.0;
1425             }
1426          }
1427       }
1428    }
1429 }
1430
1431 group { name: "elm/genlist/base/handler";
1432    alias: "elm/genscroller/base/handler";
1433    alias: "elm/list/base/handler";
1434    inherit: "elm/scroller/base/handler";
1435
1436    images {
1437       image: "00_overscrolling_top.png" COMP;
1438       image: "00_overscrolling_bottom.png" COMP;
1439       image: "00_overscrolling_left.png" COMP;
1440       image: "00_overscrolling_right.png" COMP;
1441    }
1442
1443    parts {
1444       part { name: "vshadow_clip";
1445          type: RECT;
1446          mouse_events: 0;
1447          scale: 1;
1448          description { state: "default" 0.0;
1449          }
1450          description { state: "hidden" 0.0;
1451             visible: 0;
1452             color: 255 255 255 0;
1453          }
1454       }
1455       part { name: "hshadow_clip";
1456          type: RECT;
1457          mouse_events: 0;
1458          scale: 1;
1459          description { state: "default" 0.0;
1460          }
1461          description { state: "hidden" 0.0;
1462             visible: 0;
1463             color: 255 255 255 0;
1464          }
1465       }
1466       part { name: "shadow_top";
1467          clip_to: "vshadow_clip";
1468          type: IMAGE;
1469          scale: 1;
1470          mouse_events: 0;
1471          description { state: "default" 0.0;
1472             min: 0 30;
1473             fixed: 1 1;
1474             align: 0.5 0.0;
1475             color: 255 255 255 100;
1476             rel1.relative: 0.0 0.0;
1477             rel2.relative: 1.0 0.0;
1478             rel1.to: "elm.swallow.content";
1479             rel2.to: "elm.swallow.content";
1480             image.normal: "00_overscrolling_top.png";
1481          }
1482          description { state: "edge" 0.0;
1483             inherit: "default" 0.0;
1484             color: 255 255 255 255;
1485          }
1486          description { state: "hidden" 0.0;
1487             inherit: "default" 0.0;
1488             visible: 0;
1489          }
1490       }
1491       part { name: "shadow_bottom";
1492          clip_to: "vshadow_clip";
1493          type: IMAGE;
1494          scale: 1;
1495          mouse_events: 0;
1496          description { state: "default" 0.0;
1497             min: 0 30;
1498             fixed: 1 1;
1499             align: 0.5 1.0;
1500             color: 255 255 255 100;
1501             rel1.relative: 0.0 1.0;
1502             rel2.relative: 1.0 1.0;
1503             rel1.to: "elm.swallow.content";
1504             rel2.to: "elm.swallow.content";
1505             image.normal: "00_overscrolling_bottom.png";
1506          }
1507          description { state: "edge" 0.0;
1508             inherit: "default" 0.0;
1509             color: 255 255 255 255;
1510          }
1511          description { state: "hidden" 0.0;
1512             inherit: "default" 0.0;
1513             visible: 0;
1514          }
1515       }
1516       part { name: "shadow_left";
1517          clip_to: "hshadow_clip";
1518          type: IMAGE;
1519          scale: 1;
1520          mouse_events: 0;
1521          description { state: "default" 0.0;
1522             min: 30 0;
1523             fixed: 1 1;
1524             align: 0.0 0.5;
1525             color: 255 255 255 100;
1526             rel1.relative: 0.0 0.0;
1527             rel2.relative: 0.0 1.0;
1528             rel1.to: "elm.swallow.content";
1529             rel2.to: "elm.swallow.content";
1530             image.normal: "00_overscrolling_left.png";
1531          }
1532          description { state: "edge" 0.0;
1533             inherit: "default" 0.0;
1534             color: 255 255 255 255;
1535          }
1536          description { state: "hidden" 0.0;
1537             inherit: "default" 0.0;
1538             visible: 0;
1539          }
1540       }
1541       part { name: "shadow_right";
1542          clip_to: "hshadow_clip";
1543          type: IMAGE;
1544          scale: 1;
1545          mouse_events: 0;
1546          description { state: "default" 0.0;
1547             min: 30 0;
1548             fixed: 1 1;
1549             align: 1.0 0.5;
1550             color: 255 255 255 100;
1551             rel1.relative: 1.0 0.0;
1552             rel2.relative: 1.0 1.0;
1553             rel1.to: "elm.swallow.content";
1554             rel2.to: "elm.swallow.content";
1555             image.normal: "00_overscrolling_right.png";
1556          }
1557          description { state: "edge" 0.0;
1558             inherit: "default" 0.0;
1559             color: 255 255 255 255;
1560          }
1561          description { state: "hidden" 0.0;
1562             inherit: "default" 0.0;
1563             visible: 0;
1564          }
1565       }
1566    }
1567    programs {
1568       program { name: "load";
1569          signal: "load";
1570          source: "";
1571          script {
1572             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
1573             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
1574             set_state(PART:"vshadow_clip", "hidden", 0.0);
1575             set_state(PART:"hshadow_clip", "hidden", 0.0);
1576             set_int(sbvis_h, 0);
1577             set_int(sbvis_v, 0);
1578             set_int(sbalways_v, 0);
1579             set_int(sbalways_h, 0);
1580             set_int(sbvis_timer, 0);
1581             set_int(sh_timer, 0);
1582             set_int(edge_timer, 0);
1583             emit("reload", "elm");
1584          }
1585       }
1586       program { name: "vbar_show_always";
1587          signal: "elm,action,show_always,vbar";
1588          source: "elm";
1589          script {
1590             new v;
1591             v = get_int(sbvis_v);
1592             v |= get_int(sbalways_v);
1593             if (!v) {
1594                set_int(sbalways_v, 1);
1595                emit("do-show-vbar", "");
1596                set_int(sbvis_v, 1);
1597             }
1598          }
1599       }
1600       program { name: "vbar_show_notalways";
1601          signal: "elm,action,show_notalways,vbar";
1602          source: "elm";
1603          script {
1604             new v;
1605             v = get_int(sbalways_v);
1606             if (v) {
1607                set_int(sbalways_v, 0);
1608                v = get_int(sbvis_v);
1609                if (!v) {
1610                   emit("do-hide-vbar", "");
1611                   set_int(sbvis_v, 0);
1612                }
1613             }
1614          }
1615       }
1616       program { name: "hbar_show_always";
1617          signal: "elm,action,show_always,hbar";
1618          source: "elm";
1619          script {
1620             new v;
1621             v = get_int(sbvis_h);
1622             v |= get_int(sbalways_h);
1623             if (!v) {
1624                set_int(sbalways_h, 1);
1625                emit("do-show-hbar", "");
1626                set_int(sbvis_h, 1);
1627             }
1628          }
1629       }
1630       program { name: "hbar_show_notalways";
1631          signal: "elm,action,show_notalways,hbar";
1632          source: "elm";
1633          script {
1634             new v;
1635             v = get_int(sbalways_h);
1636             if (v) {
1637                set_int(sbalways_h, 0);
1638                v = get_int(sbvis_h);
1639                if (!v) {
1640                   emit("do-hide-hbar", "");
1641                   set_int(sbvis_h, 0);
1642                }
1643             }
1644          }
1645       }
1646       program { name: "vshadow_show";
1647          signal: "do-show-vshadow";
1648          source: "";
1649          action:  STATE_SET "default" 0.0;
1650          transition: LINEAR 0.5;
1651          target: "vshadow_clip";
1652       }
1653       program { name: "vshadow_hide";
1654          signal: "do-hide-vshadow";
1655          source: "";
1656          action:  STATE_SET "hidden" 0.0;
1657          transition: LINEAR 0.2;
1658          target: "vshadow_clip";
1659       }
1660       program { name: "hshadow_show";
1661          signal: "do-show-hshadow";
1662          source: "";
1663          action:  STATE_SET "default" 0.0;
1664          transition: LINEAR 0.5;
1665          target: "hshadow_clip";
1666       }
1667       program { name: "hshadow_hide";
1668          signal: "do-hide-hshadow";
1669          source: "";
1670          action:  STATE_SET "hidden" 0.0;
1671          transition: LINEAR 0.2;
1672          target: "hshadow_clip";
1673       }
1674       program { name: "scroll";
1675          signal: "elm,action,scroll";
1676          source: "elm";
1677          script {
1678             new v;
1679             v = get_int(sbvis_v);
1680             v |= get_int(sbalways_v);
1681             if (!v) {
1682                emit("do-show-vbar", "");
1683                set_int(sbvis_v, 1);
1684             }
1685             v = get_int(sbvis_h);
1686             v |= get_int(sbalways_h);
1687             if (!v) {
1688                emit("do-show-hbar", "");
1689                set_int(sbvis_h, 1);
1690             }
1691             v = get_int(sbvis_timer);
1692             if (v > 0) cancel_timer(v);
1693             v = timer(1, "timer0", 0);
1694             set_int(sbvis_timer, v);
1695          }
1696       }
1697       program { name: "scroll_up";
1698          signal: "elm,action,scroll,up";
1699          source: "elm";
1700          after: "scroll_vertical";
1701       }
1702       program { name: "scroll_down";
1703          signal: "elm,action,scroll,down";
1704          source: "elm";
1705          after: "scroll_vertical";
1706       }
1707       program { name: "scroll_vertical";
1708          script {
1709             new v;
1710             v = get_int(edge_timer);
1711             if (!v) {
1712                set_state(PART:"shadow_top", "default", 0.0);
1713                set_state(PART:"shadow_bottom", "default", 0.0);
1714                emit("do-show-vshadow", "");
1715                v = get_int(sh_timer);
1716                if (v > 0) cancel_timer(v);
1717                v = timer(0.1, "timer1", 0);
1718                set_int(sh_timer, v);
1719             }
1720          }
1721       }
1722       program { name: "scroll_left";
1723          signal: "elm,action,scroll,left";
1724          source: "elm";
1725          after: "scroll_horizontal";
1726       }
1727       program { name: "scroll_right";
1728          signal: "elm,action,scroll,right";
1729          source: "elm";
1730          after: "scroll_horizontal";
1731       }
1732       program { name: "scroll_horizontal";
1733          script {
1734             new v;
1735             v = get_int(edge_timer);
1736             if (!v) {
1737                set_state(PART:"shadow_left", "default", 0.0);
1738                set_state(PART:"shadow_right", "default", 0.0);
1739                emit("do-show-hshadow", "");
1740                v = get_int(sh_timer);
1741                if (v > 0) cancel_timer(v);
1742                v = timer(0.1, "timer1", 0);
1743                set_int(sh_timer, v);
1744             }
1745          }
1746       }
1747       program { name: "edge_top";
1748          signal: "elm,edge,top";
1749          source: "elm";
1750          script {
1751             set_state(PART:"shadow_top", "edge", 0.0);
1752             set_state(PART:"shadow_bottom", "hidden", 0.0);
1753          }
1754          after: "edge_vertical";
1755       }
1756       program { name: "edge_bottom";
1757          signal: "elm,edge,bottom";
1758          source: "elm";
1759          script {
1760             set_state(PART:"shadow_top", "hidden", 0.0);
1761             set_state(PART:"shadow_bottom", "edge", 0.0);
1762          }
1763          after: "edge_vertical";
1764       }
1765       program { name: "edge_left";
1766          signal: "elm,edge,left";
1767          source: "elm";
1768          script {
1769             set_state(PART:"shadow_left", "edge", 0.0);
1770             set_state(PART:"shadow_right", "hidden", 0.0);
1771          }
1772          after: "edge_horizontal";
1773       }
1774       program { name: "edge_right";
1775          signal: "elm,edge,right";
1776          source: "elm";
1777          script {
1778             set_state(PART:"shadow_left", "hidden", 0.0);
1779             set_state(PART:"shadow_right", "edge", 0.0);
1780          }
1781          after: "edge_horizontal";
1782       }
1783       program { name: "edge_vertical";
1784          script {
1785             new v;
1786             v = get_int(sh_timer);
1787             if (v > 0) cancel_timer(v);
1788             v = get_int(edge_timer);
1789             if (!v) {
1790                 emit("do-show-vshadow", "");
1791             }
1792             if (v > 0) cancel_timer(v);
1793             v = timer(0.1, "timer2", 0);
1794             set_int(edge_timer, v);
1795          }
1796       }
1797       program { name: "edge_horizontal";
1798          script {
1799             new v;
1800             v = get_int(sh_timer);
1801             if (v > 0) cancel_timer(v);
1802             v = get_int(edge_timer);
1803             if (!v) {
1804                 emit("do-show-hshadow", "");
1805             }
1806             if (v > 0) cancel_timer(v);
1807             v = timer(0.1, "timer2", 0);
1808             set_int(edge_timer, v);
1809          }
1810       }
1811       program { name: "show";
1812          signal: "show";
1813          source: "";
1814          script {
1815             new v;
1816             emit("do-show-vbar", "");
1817             set_int(sbvis_v, 1);
1818             v = get_int(sbalways_v);
1819             if (!v) {
1820               v = get_int(sbvis_timer);
1821               if (v > 0) cancel_timer(v);
1822               v = timer(1.0, "timer0", 0);
1823               set_int(sbvis_timer, v);
1824             }
1825             emit("do-show-hbar", "");
1826             set_int(sbvis_h, 1);
1827             v = get_int(sbalways_h);
1828             if (!v) {
1829               v = get_int(sbvis_timer);
1830               if (v > 0) cancel_timer(v);
1831               v = timer(1.0, "timer0", 0);
1832               set_int(sbvis_timer, v);
1833             }
1834          }
1835       }
1836    }
1837 }
1838
1839 group { name: "elm/gengrid/base/default";
1840    inherit: "elm/genlist/base/default";
1841
1842    images {
1843        image: "00_grid_overscrolling_top.png" COMP;
1844        image: "00_grid_overscrolling_bottom.png" COMP;
1845        image: "00_grid_overscrolling_left.png" COMP;
1846        image: "00_grid_overscrolling_right.png" COMP;
1847    }
1848
1849    parts {
1850       part { name: "shadow_top";
1851          description { state: "default" 0.0;
1852             min: 0 405;
1853             image.normal: "00_grid_overscrolling_top.png";
1854          }
1855          description { state: "edge" 0.0;
1856             inherit: "default" 0.0;
1857             color: 255 255 255 255;
1858          }
1859       }
1860       part { name: "shadow_bottom";
1861          description { state: "default" 0.0;
1862             min: 0 405;
1863             image.normal: "00_grid_overscrolling_bottom.png";
1864          }
1865          description { state: "edge" 0.0;
1866             inherit: "default" 0.0;
1867             color: 255 255 255 255;
1868          }
1869       }
1870       part { name: "shadow_left";
1871          description { state: "default" 0.0;
1872             min: 405 0;
1873             image.normal: "00_grid_overscrolling_left.png";
1874          }
1875          description { state: "edge" 0.0;
1876             inherit: "default" 0.0;
1877             color: 255 255 255 255;
1878          }
1879       }
1880       part { name: "shadow_right";
1881          description { state: "default" 0.0;
1882             min: 405 0;
1883             image.normal: "00_grid_overscrolling_right.png";
1884          }
1885          description { state: "edge" 0.0;
1886             inherit: "default" 0.0;
1887             color: 255 255 255 255;
1888          }
1889       }
1890    }
1891 }
1892
1893 group { name: "elm/gengrid/base/fastscroll";
1894    inherit: "elm/gengrid/base/default";
1895    parts {
1896       part {
1897          name: "elm.fastscroll";
1898          type: RECT;
1899          scale: 1;
1900          description {
1901             state: "default" 0.0;
1902             rel1 {
1903                to: "bg";
1904                relative: 1.0 0.0;
1905             }
1906             rel2 {
1907                to: "bg";
1908                relative: 1.0 1.0;
1909             }
1910             align: 1.0 0.5;
1911             min: INDEX_ITEM_WIDTH_INC 0;
1912             visible: 0;
1913          }
1914       }
1915       part {
1916          name: "elm.swallow.content";
1917          clip_to: "clipper";
1918          type: SWALLOW;
1919          scale: 1;
1920          description {
1921             state: "default" 0.0;
1922             rel1.to: "bg";
1923             rel2 {
1924                to: "elm.fastscroll";
1925                relative: 0.0 1.0;
1926             }
1927          }
1928       }
1929    }
1930 }
1931
1932 group { name: "elm/gengrid/base/handler";
1933    inherit: "elm/genlist/base/handler";
1934
1935    parts {
1936       part { name: "shadow_top";
1937          description { state: "default" 0.0;
1938             min: 0 405;
1939             image.normal: "00_grid_overscrolling_top.png";
1940          }
1941          description { state: "edge" 0.0;
1942             inherit: "default" 0.0;
1943             color: 255 255 255 255;
1944          }
1945       }
1946       part { name: "shadow_bottom";
1947          description { state: "default" 0.0;
1948             min: 0 405;
1949             image.normal: "00_grid_overscrolling_bottom.png";
1950          }
1951          description { state: "edge" 0.0;
1952             inherit: "default" 0.0;
1953             color: 255 255 255 255;
1954          }
1955       }
1956       part { name: "shadow_left";
1957          description { state: "default" 0.0;
1958             min: 405 0;
1959             image.normal: "00_grid_overscrolling_left.png";
1960          }
1961          description { state: "edge" 0.0;
1962             inherit: "default" 0.0;
1963             color: 255 255 255 255;
1964          }
1965       }
1966       part { name: "shadow_right";
1967          description { state: "default" 0.0;
1968             min: 405 0;
1969             image.normal: "00_grid_overscrolling_right.png";
1970          }
1971          description { state: "edge" 0.0;
1972             inherit: "default" 0.0;
1973             color: 255 255 255 255;
1974          }
1975       }
1976    }
1977 }