[Genlist] change edit mode style
[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       program { name: "show";
442          signal: "show";
443          source: "";
444          script {
445             new v;
446             emit("do-show-vbar", "");
447             set_int(sbvis_v, 1);
448             v = get_int(sbalways_v);
449             if (!v) {
450               v = get_int(sbvis_timer);
451               if (v > 0) cancel_timer(v);
452               v = timer(1.0, "timer0", 0);
453               set_int(sbvis_timer, v);
454             }
455             emit("do-show-hbar", "");
456             set_int(sbvis_h, 1);
457             v = get_int(sbalways_h);
458             if (!v) {
459               v = get_int(sbvis_timer);
460               if (v > 0) cancel_timer(v);
461               v = timer(1.0, "timer0", 0);
462               set_int(sbvis_timer, v);
463             }
464          }
465       }
466    }
467 }
468
469 group { name: "elm/scroller/base/handler";
470    alias: "elm/carousel/base/handler";
471
472    data {
473       item: "focus_highlight" "on";
474    }
475    script {
476       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
477       public sh_timer, edge_timer;
478       public timer0(val) {
479          new v;
480          v = get_int(sbvis_v);
481          if (v) {
482             v = get_int(sbalways_v);
483             if (!v) {
484                emit("do-hide-vbar", "");
485                set_int(sbvis_v, 0);
486             }
487          }
488          v = get_int(sbvis_h);
489          if (v) {
490             v = get_int(sbalways_h);
491             if (!v) {
492                emit("do-hide-hbar", "");
493                set_int(sbvis_h, 0);
494             }
495          }
496          set_int(sbvis_timer, 0);
497          return 0;
498       }
499       public timer1(val) {
500          emit("do-hide-vshadow", "");
501          emit("do-hide-hshadow", "");
502          set_int(sh_timer, 0);
503          return 0;
504       }
505       public timer2(val) {
506          emit("do-hide-vshadow", "");
507          emit("do-hide-hshadow", "");
508          set_int(edge_timer, 0);
509          return 0;
510       }
511    }
512    images {
513       image: "00_fast_scroll_handler_top.png" COMP;
514       image: "00_fast_scroll_handler_center.png" COMP;
515       image: "00_fast_scroll_handler_bottom.png" COMP;
516       image: "00_fast_scroll_handler_left_h.png" COMP;
517       image: "00_fast_scroll_handler_center_h.png" COMP;
518       image: "00_fast_scroll_handler_right_h.png" COMP;
519    }
520    parts {
521       part { name: "bg";
522          type: RECT;
523          scale: 1;
524          description { state: "default" 0.0;
525             rel1.offset: 0 0;
526             rel2.offset: -1 -1;
527             color: 255 255 255 0;
528          }
529       }
530       part { name: "clipper";
531          type: RECT;
532          mouse_events: 0;
533          scale: 1;
534          description { state: "default" 0.0;
535             rel1.to: "bg";
536             rel2.to: "bg";
537             rel1.offset: 0 0;
538             rel2.offset: -1 -1;
539          }
540       }
541       part { name: "elm.swallow.content";
542          clip_to: "clipper";
543          type: SWALLOW;
544          scale: 1;
545          description { state: "default" 0.0;
546             rel1.to: "bg";
547             rel2.to: "bg";
548             rel1.offset: 0 0;
549             rel2.offset: -1 -1;
550          }
551       }
552       part { name: "sb_vbar_clip_master";
553          type: RECT;
554          mouse_events: 0;
555          scale: 1;
556          description { state: "default" 0.0;
557          }
558          description { state: "hidden" 0.0;
559             visible: 0;
560             color: 255 255 255 0;
561          }
562       }
563       part { name: "sb_vbar_clip";
564          clip_to: "sb_vbar_clip_master";
565          type: RECT;
566          mouse_events: 0;
567          scale: 1;
568          description { state: "default" 0.0;
569          }
570          description { state: "hidden" 0.0;
571             visible: 0;
572             color: 255 255 255 0;
573          }
574       }
575       part { name: "sb_vbar";
576          type: RECT;
577          mouse_events: 0;
578          scale: 1;
579          description { state: "default" 0.0;
580             fixed: 1 1;
581             visible: 0;
582             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
583             align: 1.0 0.0;
584             rel1 {
585                relative: 1.0 0.0;
586                to_y:     "elm.swallow.content";
587                to_x:     "elm.swallow.content";
588             }
589             rel2 {
590                relative: 1.0 1.0;
591                to_y:     "sb_hbar";
592                to_x:     "elm.swallow.content";
593             }
594          }
595       }
596       part { name: "elm.dragable.vbar";
597          type: RECT;
598          clip_to: "sb_vbar_clip";
599          mouse_events: 1;
600          scale: 1;
601          dragable {
602             x: 0 0 0;
603             y: 1 1 0;
604             confine: "sb_vbar";
605          }
606          description { state: "default" 0.0;
607             fixed: 1 1;
608             color: 0 0 0 0;
609             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
610             max: 30 99999;
611             rel1 {
612                relative: 0.5  0.5;
613                offset:   0    0;
614                to: "sb_vbar";
615             }
616             rel2 {
617                relative: 0.5  0.5;
618                offset:   0    0;
619                to: "sb_vbar";
620             }
621          }
622       }
623       part { name: "scrollbar_handler_image_top";
624          clip_to: "sb_vbar_clip";
625          mouse_events: 0;
626          scale: 1;
627          description { state: "default" 0.0;
628             fixed: 1 1;
629             rel1.relative: 0.0 0.0;
630             rel1.to: "elm.dragable.vbar";
631             rel2.relative: 1.0 0.0;
632             rel2.to: "scrollbar_handler_image_middle";
633             visible: 1;
634             image {
635                normal: "00_fast_scroll_handler_top.png";
636                border: 36 0 31 0;
637                border_scale: 1;
638             }
639          }
640       }
641       part { name: "scrollbar_handler_image_middle";
642          clip_to: "sb_vbar_clip";
643          mouse_events: 0;
644          scale: 1;
645          description { state: "default" 0.0;
646             fixed: 1 1;
647             rel1.relative: 0.5 0.5;
648             rel1.to: "elm.dragable.vbar";
649             rel2.relative: 0.5 0.5;
650             rel2.to: "elm.dragable.vbar";
651             visible: 1;
652             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIDDLE_MIN_SIZE_INC;
653             image {
654                normal: "00_fast_scroll_handler_center.png";
655                border: 36 0 0 0;
656                border_scale: 1;
657             }
658          }
659       }
660       part { name: "scrollbar_handler_image_bottom";
661          clip_to: "sb_vbar_clip";
662          mouse_events: 0;
663          scale: 1;
664          description { state: "default" 0.0;
665             fixed: 1 1;
666             rel1.relative: 0.0 1.0;
667             rel1.to: "scrollbar_handler_image_middle";
668             rel2.relative: 1.0 1.0;
669             rel2.to: "elm.dragable.vbar";
670             visible: 1;
671             image {
672                normal: "00_fast_scroll_handler_bottom.png";
673                border: 36 0 0 36;
674                border_scale: 1;
675             }
676          }
677       }
678       part { name: "sb_hbar_clip_master";
679          type: RECT;
680          mouse_events: 0;
681          scale: 1;
682          description { state: "default" 0.0;
683          }
684          description { state: "hidden" 0.0;
685             visible: 0;
686             color: 255 255 255 0;
687          }
688       }
689       part { name: "sb_hbar_clip";
690          clip_to: "sb_hbar_clip_master";
691          type: RECT;
692          mouse_events: 0;
693          scale: 1;
694          description { state: "default" 0.0;
695          }
696          description { state: "hidden" 0.0;
697             visible: 0;
698             color: 255 255 255 0;
699          }
700       }
701       part { name: "sb_hbar";
702          type: RECT;
703          mouse_events: 0;
704          scale: 1;
705          description { state: "default" 0.0;
706             fixed: 1 1;
707             visible: 0;
708             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
709             align: 0.0 1.0;
710             rel1 {
711                relative: 0.0 1.0;
712                to_x:     "elm.swallow.content";
713                to_y:     "elm.swallow.content";
714             }
715             rel2 {
716                relative: 0.0 1.0;
717                offset: -1 -1;
718                to_x: "sb_vbar";
719                to_y:     "elm.swallow.content";
720             }
721          }
722       }
723       part { name: "elm.dragable.hbar";
724          type: RECT;
725          clip_to: "sb_hbar_clip";
726          mouse_events: 1;
727          scale: 1;
728          dragable {
729             x: 1 1 0;
730             y: 0 0 0;
731             confine: "sb_hbar";
732          }
733          description { state: "default" 0.0;
734             fixed: 1 1;
735             color: 0 0 0 0;
736             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
737             max: 99999 30;
738             rel1 {
739                relative: 0.5  0.5;
740                offset:   0    0;
741                to: "sb_hbar";
742             }
743             rel2 {
744                relative: 0.5  0.5;
745                offset:   0    0;
746                to: "sb_hbar";
747             }
748          }
749       }
750       part { name: "h_scrollbar_handler_image_left";
751          clip_to: "sb_hbar_clip";
752          mouse_events: 0;
753          scale: 1;
754          description { state: "default" 0.0;
755             fixed: 1 1;
756             rel1.relative: 0.0 0.0;
757             rel1.to: "elm.dragable.hbar";
758             rel2.relative: 0.0 1.0;
759             rel2.to: "scrollbar_handler_image_hor";
760             visible: 1;
761             image {
762                normal: "00_fast_scroll_handler_left_h.png";
763                border: 31 0 36 0;
764                border_scale: 1;
765             }
766          }
767       }
768       part { name: "scrollbar_handler_image_hor";
769          clip_to: "sb_hbar_clip";
770          mouse_events: 0;
771          scale: 1;
772          description { state: "default" 0.0;
773          fixed: 1 1;
774             rel1.relative: 0.5 0.5;
775             rel1.to: "elm.dragable.hbar";
776             rel2.relative: 0.5 0.5;
777             rel2.to: "elm.dragable.hbar";
778             visible: 1;
779             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIDDLE_MIN_SIZE_INC;
780             image {
781                normal: "00_fast_scroll_handler_center_h.png";
782                border: 0 0 36 0;
783                border_scale: 1;
784             }
785          }
786       }
787       part { name: "h_scrollbar_handler_image_right";
788          clip_to: "sb_hbar_clip";
789          mouse_events: 0;
790          scale: 1;
791          description { state: "default" 0.0;
792             fixed: 1 1;
793             rel1.relative: 1.0 0.0;
794             rel1.to: "scrollbar_handler_image_hor";
795             rel2.relative: 1.0 1.0;
796             rel2.to: "elm.dragable.hbar";
797             visible: 1;
798             image {
799                normal: "00_fast_scroll_handler_right_h.png";
800                border: 0 36 36 0;
801                border_scale: 1;
802             }
803          }
804       }
805       part { name: "disabler";
806          type: RECT;
807          scale: 1;
808          description { state: "default" 0.0;
809             rel1.to: "clipper";
810             rel2.to: "clipper";
811             color: 0 0 0 0;
812             visible: 0;
813          }
814          description { state: "disabled" 0.0;
815             inherit: "default" 0.0;
816             visible: 1;
817             color: 128 128 128 128;
818          }
819       }
820    }
821    programs {
822       program { name: "load";
823          signal: "load";
824          source: "";
825          script {
826             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
827             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
828             set_int(sbvis_h, 0);
829             set_int(sbvis_v, 0);
830             set_int(sbalways_v, 0);
831             set_int(sbalways_h, 0);
832             set_int(sbvis_timer, 0);
833             emit("reload", "elm");
834          }
835       }
836       program { name: "vbar_show";
837          signal: "elm,action,show,vbar";
838          source: "elm";
839          action: STATE_SET "default" 0.0;
840          target: "sb_vbar_clip_master";
841       }
842       program { name: "vbar_hide";
843          signal: "elm,action,hide,vbar";
844          source: "elm";
845          action: STATE_SET "hidden" 0.0;
846          target: "sb_vbar_clip_master";
847       }
848       program { name: "vbar_show_always";
849          signal: "elm,action,show_always,vbar";
850          source: "elm";
851          script {
852             new v;
853             v = get_int(sbvis_v);
854             v |= get_int(sbalways_v);
855             if (!v) {
856                set_int(sbalways_v, 1);
857                emit("do-show-vbar", "");
858                set_int(sbvis_v, 1);
859             }
860          }
861       }
862       program { name: "vbar_show_notalways";
863          signal: "elm,action,show_notalways,vbar";
864          source: "elm";
865          script {
866             new v;
867             v = get_int(sbalways_v);
868             if (v) {
869                set_int(sbalways_v, 0);
870                v = get_int(sbvis_v);
871                if (!v) {
872                   emit("do-hide-vbar", "");
873                   set_int(sbvis_v, 0);
874                }
875             }
876          }
877       }
878       program { name: "vbar_press";
879          signal: "mouse,down,1";
880          source: "elm.dragable.vbar";
881          action:  SIGNAL_EMIT "elm,vbar,press" "elm";
882       }
883       program { name: "vbar_unpress";
884          signal: "mouse,up,1";
885          source: "elm.dragable.vbar";
886          action:  SIGNAL_EMIT "elm,vbar,unpress" "elm";
887       }
888       program { name: "sb_vbar_show";
889          signal: "do-show-vbar";
890          source: "";
891          action: STATE_SET "default" 0.0;
892          transition: LINEAR 0.5;
893          target: "sb_vbar_clip";
894       }
895       program { name: "sb_vbar_hide";
896          signal: "do-hide-vbar";
897          source: "";
898          action: STATE_SET "hidden" 0.0;
899          transition: LINEAR 0.5;
900          target: "sb_vbar_clip";
901       }
902       program { name: "hbar_show";
903          signal: "elm,action,show,hbar";
904          source: "elm";
905          action: STATE_SET "default" 0.0;
906          target: "sb_hbar_clip_master";
907       }
908       program { name: "hbar_hide";
909          signal: "elm,action,hide,hbar";
910          source: "elm";
911          action:  STATE_SET "hidden" 0.0;
912          target: "sb_hbar_clip_master";
913       }
914       program { name: "hbar_show_always";
915          signal: "elm,action,show_always,hbar";
916          source: "elm";
917          script {
918             new v;
919             v = get_int(sbvis_h);
920             v |= get_int(sbalways_h);
921             if (!v) {
922                set_int(sbalways_h, 1);
923                emit("do-show-hbar", "");
924                set_int(sbvis_h, 1);
925             }
926          }
927       }
928       program { name: "hbar_show_notalways";
929          signal: "elm,action,show_notalways,hbar";
930          source: "elm";
931          script {
932             new v;
933             v = get_int(sbalways_h);
934             if (v) {
935                set_int(sbalways_h, 0);
936                v = get_int(sbvis_h);
937                if (!v) {
938                   emit("do-hide-hbar", "");
939                   set_int(sbvis_h, 0);
940                }
941             }
942          }
943       }
944       program { name: "hbar_press";
945          signal: "mouse,down,1";
946          source: "elm.dragable.hbar";
947          action:  SIGNAL_EMIT "elm,hbar,press" "elm";
948       }
949       program { name: "hbar_unpress";
950          signal: "mouse,up,1";
951          source: "elm.dragable.hbar";
952          action:  SIGNAL_EMIT "elm,hbar,unpress" "elm";
953       }
954       program { name: "sb_hbar_show";
955          signal: "do-show-hbar";
956          source: "";
957          action: STATE_SET "default" 0.0;
958          transition: LINEAR 0.5;
959          target: "sb_hbar_clip";
960       }
961       program { name: "sb_hbar_hide";
962          signal: "do-hide-hbar";
963          source: "";
964          action: STATE_SET "hidden" 0.0;
965          transition: LINEAR 0.5;
966          target: "sb_hbar_clip";
967       }
968
969       program { name: "scroll";
970          signal: "elm,action,scroll";
971          source: "elm";
972          script {
973             new v;
974             v = get_int(sbvis_v);
975             v |= get_int(sbalways_v);
976             if (!v) {
977                emit("do-show-vbar", "");
978                set_int(sbvis_v, 1);
979             }
980             v = get_int(sbvis_h);
981             v |= get_int(sbalways_h);
982             if (!v) {
983                emit("do-show-hbar", "");
984                set_int(sbvis_h, 1);
985             }
986             v = get_int(sbvis_timer);
987             if (v > 0) cancel_timer(v);
988             v = timer(1.0, "timer0", 0);
989             set_int(sbvis_timer, v);
990          }
991       }
992       program { name: "disable";
993          signal: "elm,state,disabled";
994          source: "elm";
995          action: STATE_SET "disabled" 0.0;
996          target: "disabler";
997       }
998       program { name: "enable";
999          signal: "elm,state,enabled";
1000          source: "elm";
1001          action: STATE_SET "default" 0.0;
1002          target: "disabler";
1003       }
1004       program { name: "show";
1005          signal: "show";
1006          source: "";
1007          script {
1008             new v;
1009             emit("do-show-vbar", "");
1010             set_int(sbvis_v, 1);
1011             v = get_int(sbalways_v);
1012             if (!v) {
1013               v = get_int(sbvis_timer);
1014               if (v > 0) cancel_timer(v);
1015               v = timer(1.0, "timer0", 0);
1016               set_int(sbvis_timer, v);
1017             }
1018             emit("do-show-hbar", "");
1019             set_int(sbvis_h, 1);
1020             v = get_int(sbalways_h);
1021             if (!v) {
1022               v = get_int(sbvis_timer);
1023               if (v > 0) cancel_timer(v);
1024               v = timer(1.0, "timer0", 0);
1025               set_int(sbvis_timer, v);
1026             }
1027          }
1028       }
1029    }
1030 }
1031
1032 group { name: "elm/genlist/base/default";
1033    alias: "elm/genscroller/base/default";
1034    alias: "elm/list/base/default";
1035    inherit: "elm/scroller/base/default";
1036
1037    images {
1038       image: "00_overscrolling_top.png" COMP;
1039       image: "00_overscrolling_bottom.png" COMP;
1040       image: "00_overscrolling_left.png" COMP;
1041       image: "00_overscrolling_right.png" COMP;
1042    }
1043
1044    parts {
1045       part { name: "vshadow_clip";
1046          type: RECT;
1047          mouse_events: 0;
1048          scale: 1;
1049          description { state: "default" 0.0;
1050          }
1051          description { state: "hidden" 0.0;
1052             visible: 0;
1053             color: 255 255 255 0;
1054          }
1055       }
1056       part { name: "hshadow_clip";
1057          type: RECT;
1058          mouse_events: 0;
1059          scale: 1;
1060          description { state: "default" 0.0;
1061          }
1062          description { state: "hidden" 0.0;
1063             visible: 0;
1064             color: 255 255 255 0;
1065          }
1066       }
1067       part { name: "shadow_top";
1068          clip_to: "vshadow_clip";
1069          type: IMAGE;
1070          scale: 1;
1071          mouse_events: 0;
1072          description { state: "default" 0.0;
1073             min: 0 30;
1074             fixed: 1 1;
1075             align: 0.5 0.0;
1076             color: 255 255 255 100;
1077             rel1.relative: 0.0 0.0;
1078             rel2.relative: 1.0 0.0;
1079             rel1.to: "elm.swallow.content";
1080             rel2.to: "elm.swallow.content";
1081             image.normal: "00_overscrolling_top.png";
1082          }
1083          description { state: "edge" 0.0;
1084             inherit: "default" 0.0;
1085             color: 255 255 255 255;
1086          }
1087          description { state: "edge_op" 0.0;
1088             inherit: "default" 0.0;
1089             color: 255 255 255 65;
1090          }
1091       }
1092       part { name: "shadow_bottom";
1093          clip_to: "vshadow_clip";
1094          type: IMAGE;
1095          scale: 1;
1096          mouse_events: 0;
1097          description { state: "default" 0.0;
1098             min: 0 30;
1099             fixed: 1 1;
1100             align: 0.5 1.0;
1101             color: 255 255 255 100;
1102             rel1.relative: 0.0 1.0;
1103             rel2.relative: 1.0 1.0;
1104             rel1.to: "elm.swallow.content";
1105             rel2.to: "elm.swallow.content";
1106             image.normal: "00_overscrolling_bottom.png";
1107          }
1108          description { state: "edge" 0.0;
1109             inherit: "default" 0.0;
1110             color: 255 255 255 255;
1111          }
1112          description { state: "edge_op" 0.0;
1113             inherit: "default" 0.0;
1114             color: 255 255 255 65;
1115          }
1116       }
1117       part { name: "shadow_left";
1118          clip_to: "hshadow_clip";
1119          type: IMAGE;
1120          scale: 1;
1121          mouse_events: 0;
1122          description { state: "default" 0.0;
1123             min: 30 0;
1124             fixed: 1 1;
1125             align: 0.0 0.5;
1126             color: 255 255 255 100;
1127             rel1.relative: 0.0 0.0;
1128             rel2.relative: 0.0 1.0;
1129             rel1.to: "elm.swallow.content";
1130             rel2.to: "elm.swallow.content";
1131             image.normal: "00_overscrolling_left.png";
1132          }
1133          description { state: "edge" 0.0;
1134             inherit: "default" 0.0;
1135             color: 255 255 255 255;
1136          }
1137          description { state: "edge_op" 0.0;
1138             inherit: "default" 0.0;
1139             color: 255 255 255 65;
1140          }
1141       }
1142       part { name: "shadow_right";
1143          clip_to: "hshadow_clip";
1144          type: IMAGE;
1145          scale: 1;
1146          mouse_events: 0;
1147          description { state: "default" 0.0;
1148             min: 30 0;
1149             fixed: 1 1;
1150             align: 1.0 0.5;
1151             color: 255 255 255 100;
1152             rel1.relative: 1.0 0.0;
1153             rel2.relative: 1.0 1.0;
1154             rel1.to: "elm.swallow.content";
1155             rel2.to: "elm.swallow.content";
1156             image.normal: "00_overscrolling_right.png";
1157          }
1158          description { state: "edge" 0.0;
1159             inherit: "default" 0.0;
1160             color: 255 255 255 255;
1161          }
1162          description { state: "edge_op" 0.0;
1163             inherit: "default" 0.0;
1164             color: 255 255 255 65;
1165          }
1166       }
1167       part { name: "padding_jump_to_top";
1168          type: SPACER;
1169          scale: 1;
1170          description { state: "default" 0.0;
1171             min: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
1172             max: BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC;
1173             rel1.relative: 1.0 0.0;
1174             rel2.relative: 1.0 0.0;
1175             rel1.to: "elm.swallow.content";
1176             rel2.to: "elm.swallow.content";
1177             fixed: 1 1;
1178             align: 1.0 0.0;
1179          }
1180       }
1181       part { name: "elm.swallow.jump_to_top";
1182          type: SWALLOW;
1183          scale: 1;
1184          description { state: "default" 0.0;
1185             rel1 {
1186                to: "padding_jump_to_top";
1187                relative: 0.0 1.0;
1188             }
1189             rel2 {
1190                to: "padding_jump_to_top";
1191                relative: 0.0 1.0;
1192             }
1193             fixed: 1 1;
1194             align: 1.0 0.0;
1195          }
1196       }
1197       part { name: "padding_jump_to_left";
1198          type: SPACER;
1199          scale: 1;
1200          description { state: "default" 0.0;
1201             min: BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC;
1202             max: BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC;
1203             rel1.relative: 0.0 1.0;
1204             rel2.relative: 0.0 1.0;
1205             rel1.to: "elm.swallow.content";
1206             rel2.to: "elm.swallow.content";
1207             fixed: 1 1;
1208             align: 0.0 1.0;
1209          }
1210       }
1211       part { name: "elm.swallow.jump_to_left";
1212          type: SWALLOW;
1213          scale: 1;
1214          description { state: "default" 0.0;
1215             rel1 {
1216                to: "padding_jump_to_left";
1217                relative: 1.0 0.0;
1218             }
1219             rel2 {
1220                to: "padding_jump_to_left";
1221                relative: 1.0 0.0;
1222             }
1223             fixed: 1 1;
1224             align: 0.0 1.0;
1225          }
1226       }
1227    }
1228    programs {
1229       program { name: "load";
1230          script {
1231             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
1232             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
1233             set_state(PART:"vshadow_clip", "hidden", 0.0);
1234             set_state(PART:"hshadow_clip", "hidden", 0.0);
1235             set_int(sbvis_h, 0);
1236             set_int(sbvis_v, 0);
1237             set_int(sbalways_v, 0);
1238             set_int(sbalways_h, 0);
1239             set_int(sbvis_timer, 0);
1240             set_int(sh_v, 0);
1241             set_int(sh_timer, 0);
1242             set_int(edge_timer, 0);
1243             emit("reload", "elm");
1244          }
1245       }
1246       program { name: "vshadow_show";
1247          signal: "do-show-vshadow";
1248          source: "";
1249          action:  STATE_SET "default" 0.0;
1250          transition: LINEAR 0.5;
1251          target: "vshadow_clip";
1252       }
1253       program { name: "vshadow_hide";
1254          signal: "do-hide-vshadow";
1255          source: "";
1256          action:  STATE_SET "hidden" 0.0;
1257          transition: LINEAR 0.2;
1258          target: "vshadow_clip";
1259       }
1260       program { name: "hshadow_show";
1261          signal: "do-show-hshadow";
1262          source: "";
1263          action:  STATE_SET "default" 0.0;
1264          transition: LINEAR 0.5;
1265          target: "hshadow_clip";
1266       }
1267       program { name: "hshadow_hide";
1268          signal: "do-hide-hshadow";
1269          source: "";
1270          action:  STATE_SET "hidden" 0.0;
1271          transition: LINEAR 0.2;
1272          target: "hshadow_clip";
1273       }
1274       program { name: "scroll";
1275          signal: "elm,action,scroll";
1276          source: "elm";
1277          script {
1278             new v;
1279             v = get_int(sbvis_v);
1280             v |= get_int(sbalways_v);
1281             if (!v) {
1282                emit("do-show-vbar", "");
1283                set_int(sbvis_v, 1);
1284             }
1285             v = get_int(sbvis_h);
1286             v |= get_int(sbalways_h);
1287             if (!v) {
1288                emit("do-show-hbar", "");
1289                set_int(sbvis_h, 1);
1290             }
1291             v = get_int(sbvis_timer);
1292             if (v > 0) cancel_timer(v);
1293             v = timer(1, "timer0", 0);
1294             set_int(sbvis_timer, v);
1295          }
1296       }
1297       program { name: "scroll_up";
1298          signal: "elm,action,scroll,up";
1299          source: "elm";
1300          after: "scroll_vertical";
1301       }
1302       program { name: "scroll_down";
1303          signal: "elm,action,scroll,down";
1304          source: "elm";
1305          after: "scroll_vertical";
1306       }
1307       program { name: "scroll_vertical";
1308          script {
1309             new v;
1310             v = get_int(edge_timer);
1311             if (!v) {
1312                set_state(PART:"shadow_top", "default", 0.0);
1313                set_state(PART:"shadow_bottom", "default", 0.0);
1314                emit("do-show-vshadow", "");
1315                v = get_int(sh_timer);
1316                if (v > 0) cancel_timer(v);
1317                v = timer(0.1, "timer1", 0);
1318                set_int(sh_timer, v);
1319             }
1320          }
1321       }
1322       program { name: "scroll_left";
1323          signal: "elm,action,scroll,left";
1324          source: "elm";
1325          after: "scroll_horizontal";
1326       }
1327       program { name: "scroll_right";
1328          signal: "elm,action,scroll,right";
1329          source: "elm";
1330          after: "scroll_horizontal";
1331       }
1332       program { name: "scroll_horizontal";
1333          script {
1334             new v;
1335             v = get_int(edge_timer);
1336             if (!v) {
1337                set_state(PART:"shadow_left", "default", 0.0);
1338                set_state(PART:"shadow_right", "default", 0.0);
1339                emit("do-show-hshadow", "");
1340                v = get_int(sh_timer);
1341                if (v > 0) cancel_timer(v);
1342                v = timer(0.1, "timer1", 0);
1343                set_int(sh_timer, v);
1344             }
1345          }
1346       }
1347       program { name: "edge_top";
1348          signal: "elm,edge,top";
1349          source: "elm";
1350          script {
1351             set_state(PART:"shadow_top", "edge", 0.0);
1352             set_state(PART:"shadow_bottom", "edge_op", 0.0);
1353          }
1354          after: "edge_vertical";
1355       }
1356       program { name: "edge_bottom";
1357          signal: "elm,edge,bottom";
1358          source: "elm";
1359          script {
1360             set_state(PART:"shadow_top", "edge_op", 0.0);
1361             set_state(PART:"shadow_bottom", "edge", 0.0);
1362          }
1363          after: "edge_vertical";
1364       }
1365       program { name: "edge_left";
1366          signal: "elm,edge,left";
1367          source: "elm";
1368          script {
1369             set_state(PART:"shadow_left", "edge", 0.0);
1370             set_state(PART:"shadow_right", "edge_op", 0.0);
1371          }
1372          after: "edge_horizontal";
1373       }
1374       program { name: "edge_right";
1375          signal: "elm,edge,right";
1376          source: "elm";
1377          script {
1378             set_state(PART:"shadow_left", "edge_op", 0.0);
1379             set_state(PART:"shadow_right", "edge", 0.0);
1380          }
1381          after: "edge_horizontal";
1382       }
1383       program { name: "edge_vertical";
1384          script {
1385             new v;
1386             v = get_int(sh_timer);
1387             if (v > 0) cancel_timer(v);
1388             v = get_int(edge_timer);
1389             if (!v) {
1390                 emit("do-show-vshadow", "");
1391             }
1392             if (v > 0) cancel_timer(v);
1393             v = timer(0.1, "timer2", 0);
1394             set_int(edge_timer, v);
1395          }
1396       }
1397       program { name: "edge_horizontal";
1398          script {
1399             new v;
1400             v = get_int(sh_timer);
1401             if (v > 0) cancel_timer(v);
1402             v = get_int(edge_timer);
1403             if (!v) {
1404                 emit("do-show-hshadow", "");
1405             }
1406             if (v > 0) cancel_timer(v);
1407             v = timer(0.1, "timer2", 0);
1408             set_int(edge_timer, v);
1409          }
1410       }
1411    }
1412 }
1413
1414 group { name: "elm/genlist/base/handler";
1415    alias: "elm/genscroller/base/handler";
1416    alias: "elm/list/base/handler";
1417    inherit: "elm/scroller/base/handler";
1418
1419    images {
1420       image: "00_overscrolling_top.png" COMP;
1421       image: "00_overscrolling_bottom.png" COMP;
1422       image: "00_overscrolling_left.png" COMP;
1423       image: "00_overscrolling_right.png" COMP;
1424    }
1425
1426    parts {
1427       part { name: "vshadow_clip";
1428          type: RECT;
1429          mouse_events: 0;
1430          scale: 1;
1431          description { state: "default" 0.0;
1432          }
1433          description { state: "hidden" 0.0;
1434             visible: 0;
1435             color: 255 255 255 0;
1436          }
1437       }
1438       part { name: "hshadow_clip";
1439          type: RECT;
1440          mouse_events: 0;
1441          scale: 1;
1442          description { state: "default" 0.0;
1443          }
1444          description { state: "hidden" 0.0;
1445             visible: 0;
1446             color: 255 255 255 0;
1447          }
1448       }
1449       part { name: "shadow_top";
1450          clip_to: "vshadow_clip";
1451          type: IMAGE;
1452          scale: 1;
1453          mouse_events: 0;
1454          description { state: "default" 0.0;
1455             min: 0 30;
1456             fixed: 1 1;
1457             align: 0.5 0.0;
1458             color: 255 255 255 100;
1459             rel1.relative: 0.0 0.0;
1460             rel2.relative: 1.0 0.0;
1461             rel1.to: "elm.swallow.content";
1462             rel2.to: "elm.swallow.content";
1463             image.normal: "00_overscrolling_top.png";
1464          }
1465          description { state: "edge" 0.0;
1466             inherit: "default" 0.0;
1467             color: 255 255 255 255;
1468          }
1469          description { state: "hidden" 0.0;
1470             inherit: "default" 0.0;
1471             visible: 0;
1472          }
1473       }
1474       part { name: "shadow_bottom";
1475          clip_to: "vshadow_clip";
1476          type: IMAGE;
1477          scale: 1;
1478          mouse_events: 0;
1479          description { state: "default" 0.0;
1480             min: 0 30;
1481             fixed: 1 1;
1482             align: 0.5 1.0;
1483             color: 255 255 255 100;
1484             rel1.relative: 0.0 1.0;
1485             rel2.relative: 1.0 1.0;
1486             rel1.to: "elm.swallow.content";
1487             rel2.to: "elm.swallow.content";
1488             image.normal: "00_overscrolling_bottom.png";
1489          }
1490          description { state: "edge" 0.0;
1491             inherit: "default" 0.0;
1492             color: 255 255 255 255;
1493          }
1494          description { state: "hidden" 0.0;
1495             inherit: "default" 0.0;
1496             visible: 0;
1497          }
1498       }
1499       part { name: "shadow_left";
1500          clip_to: "hshadow_clip";
1501          type: IMAGE;
1502          scale: 1;
1503          mouse_events: 0;
1504          description { state: "default" 0.0;
1505             min: 30 0;
1506             fixed: 1 1;
1507             align: 0.0 0.5;
1508             color: 255 255 255 100;
1509             rel1.relative: 0.0 0.0;
1510             rel2.relative: 0.0 1.0;
1511             rel1.to: "elm.swallow.content";
1512             rel2.to: "elm.swallow.content";
1513             image.normal: "00_overscrolling_left.png";
1514          }
1515          description { state: "edge" 0.0;
1516             inherit: "default" 0.0;
1517             color: 255 255 255 255;
1518          }
1519          description { state: "hidden" 0.0;
1520             inherit: "default" 0.0;
1521             visible: 0;
1522          }
1523       }
1524       part { name: "shadow_right";
1525          clip_to: "hshadow_clip";
1526          type: IMAGE;
1527          scale: 1;
1528          mouse_events: 0;
1529          description { state: "default" 0.0;
1530             min: 30 0;
1531             fixed: 1 1;
1532             align: 1.0 0.5;
1533             color: 255 255 255 100;
1534             rel1.relative: 1.0 0.0;
1535             rel2.relative: 1.0 1.0;
1536             rel1.to: "elm.swallow.content";
1537             rel2.to: "elm.swallow.content";
1538             image.normal: "00_overscrolling_right.png";
1539          }
1540          description { state: "edge" 0.0;
1541             inherit: "default" 0.0;
1542             color: 255 255 255 255;
1543          }
1544          description { state: "hidden" 0.0;
1545             inherit: "default" 0.0;
1546             visible: 0;
1547          }
1548       }
1549    }
1550    programs {
1551       program { name: "load";
1552          signal: "load";
1553          source: "";
1554          script {
1555             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
1556             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
1557             set_state(PART:"vshadow_clip", "hidden", 0.0);
1558             set_state(PART:"hshadow_clip", "hidden", 0.0);
1559             set_int(sbvis_h, 0);
1560             set_int(sbvis_v, 0);
1561             set_int(sbalways_v, 0);
1562             set_int(sbalways_h, 0);
1563             set_int(sbvis_timer, 0);
1564             set_int(sh_timer, 0);
1565             set_int(edge_timer, 0);
1566             emit("reload", "elm");
1567          }
1568       }
1569       program { name: "vbar_show_always";
1570          signal: "elm,action,show_always,vbar";
1571          source: "elm";
1572          script {
1573             new v;
1574             v = get_int(sbvis_v);
1575             v |= get_int(sbalways_v);
1576             if (!v) {
1577                set_int(sbalways_v, 1);
1578                emit("do-show-vbar", "");
1579                set_int(sbvis_v, 1);
1580             }
1581          }
1582       }
1583       program { name: "vbar_show_notalways";
1584          signal: "elm,action,show_notalways,vbar";
1585          source: "elm";
1586          script {
1587             new v;
1588             v = get_int(sbalways_v);
1589             if (v) {
1590                set_int(sbalways_v, 0);
1591                v = get_int(sbvis_v);
1592                if (!v) {
1593                   emit("do-hide-vbar", "");
1594                   set_int(sbvis_v, 0);
1595                }
1596             }
1597          }
1598       }
1599       program { name: "hbar_show_always";
1600          signal: "elm,action,show_always,hbar";
1601          source: "elm";
1602          script {
1603             new v;
1604             v = get_int(sbvis_h);
1605             v |= get_int(sbalways_h);
1606             if (!v) {
1607                set_int(sbalways_h, 1);
1608                emit("do-show-hbar", "");
1609                set_int(sbvis_h, 1);
1610             }
1611          }
1612       }
1613       program { name: "hbar_show_notalways";
1614          signal: "elm,action,show_notalways,hbar";
1615          source: "elm";
1616          script {
1617             new v;
1618             v = get_int(sbalways_h);
1619             if (v) {
1620                set_int(sbalways_h, 0);
1621                v = get_int(sbvis_h);
1622                if (!v) {
1623                   emit("do-hide-hbar", "");
1624                   set_int(sbvis_h, 0);
1625                }
1626             }
1627          }
1628       }
1629       program { name: "vshadow_show";
1630          signal: "do-show-vshadow";
1631          source: "";
1632          action:  STATE_SET "default" 0.0;
1633          transition: LINEAR 0.5;
1634          target: "vshadow_clip";
1635       }
1636       program { name: "vshadow_hide";
1637          signal: "do-hide-vshadow";
1638          source: "";
1639          action:  STATE_SET "hidden" 0.0;
1640          transition: LINEAR 0.2;
1641          target: "vshadow_clip";
1642       }
1643       program { name: "hshadow_show";
1644          signal: "do-show-hshadow";
1645          source: "";
1646          action:  STATE_SET "default" 0.0;
1647          transition: LINEAR 0.5;
1648          target: "hshadow_clip";
1649       }
1650       program { name: "hshadow_hide";
1651          signal: "do-hide-hshadow";
1652          source: "";
1653          action:  STATE_SET "hidden" 0.0;
1654          transition: LINEAR 0.2;
1655          target: "hshadow_clip";
1656       }
1657       program { name: "scroll";
1658          signal: "elm,action,scroll";
1659          source: "elm";
1660          script {
1661             new v;
1662             v = get_int(sbvis_v);
1663             v |= get_int(sbalways_v);
1664             if (!v) {
1665                emit("do-show-vbar", "");
1666                set_int(sbvis_v, 1);
1667             }
1668             v = get_int(sbvis_h);
1669             v |= get_int(sbalways_h);
1670             if (!v) {
1671                emit("do-show-hbar", "");
1672                set_int(sbvis_h, 1);
1673             }
1674             v = get_int(sbvis_timer);
1675             if (v > 0) cancel_timer(v);
1676             v = timer(1, "timer0", 0);
1677             set_int(sbvis_timer, v);
1678          }
1679       }
1680       program { name: "scroll_up";
1681          signal: "elm,action,scroll,up";
1682          source: "elm";
1683          after: "scroll_vertical";
1684       }
1685       program { name: "scroll_down";
1686          signal: "elm,action,scroll,down";
1687          source: "elm";
1688          after: "scroll_vertical";
1689       }
1690       program { name: "scroll_vertical";
1691          script {
1692             new v;
1693             v = get_int(edge_timer);
1694             if (!v) {
1695                set_state(PART:"shadow_top", "default", 0.0);
1696                set_state(PART:"shadow_bottom", "default", 0.0);
1697                emit("do-show-vshadow", "");
1698                v = get_int(sh_timer);
1699                if (v > 0) cancel_timer(v);
1700                v = timer(0.1, "timer1", 0);
1701                set_int(sh_timer, v);
1702             }
1703          }
1704       }
1705       program { name: "scroll_left";
1706          signal: "elm,action,scroll,left";
1707          source: "elm";
1708          after: "scroll_horizontal";
1709       }
1710       program { name: "scroll_right";
1711          signal: "elm,action,scroll,right";
1712          source: "elm";
1713          after: "scroll_horizontal";
1714       }
1715       program { name: "scroll_horizontal";
1716          script {
1717             new v;
1718             v = get_int(edge_timer);
1719             if (!v) {
1720                set_state(PART:"shadow_left", "default", 0.0);
1721                set_state(PART:"shadow_right", "default", 0.0);
1722                emit("do-show-hshadow", "");
1723                v = get_int(sh_timer);
1724                if (v > 0) cancel_timer(v);
1725                v = timer(0.1, "timer1", 0);
1726                set_int(sh_timer, v);
1727             }
1728          }
1729       }
1730       program { name: "edge_top";
1731          signal: "elm,edge,top";
1732          source: "elm";
1733          script {
1734             set_state(PART:"shadow_top", "edge", 0.0);
1735             set_state(PART:"shadow_bottom", "hidden", 0.0);
1736          }
1737          after: "edge_vertical";
1738       }
1739       program { name: "edge_bottom";
1740          signal: "elm,edge,bottom";
1741          source: "elm";
1742          script {
1743             set_state(PART:"shadow_top", "hidden", 0.0);
1744             set_state(PART:"shadow_bottom", "edge", 0.0);
1745          }
1746          after: "edge_vertical";
1747       }
1748       program { name: "edge_left";
1749          signal: "elm,edge,left";
1750          source: "elm";
1751          script {
1752             set_state(PART:"shadow_left", "edge", 0.0);
1753             set_state(PART:"shadow_right", "hidden", 0.0);
1754          }
1755          after: "edge_horizontal";
1756       }
1757       program { name: "edge_right";
1758          signal: "elm,edge,right";
1759          source: "elm";
1760          script {
1761             set_state(PART:"shadow_left", "hidden", 0.0);
1762             set_state(PART:"shadow_right", "edge", 0.0);
1763          }
1764          after: "edge_horizontal";
1765       }
1766       program { name: "edge_vertical";
1767          script {
1768             new v;
1769             v = get_int(sh_timer);
1770             if (v > 0) cancel_timer(v);
1771             v = get_int(edge_timer);
1772             if (!v) {
1773                 emit("do-show-vshadow", "");
1774             }
1775             if (v > 0) cancel_timer(v);
1776             v = timer(0.1, "timer2", 0);
1777             set_int(edge_timer, v);
1778          }
1779       }
1780       program { name: "edge_horizontal";
1781          script {
1782             new v;
1783             v = get_int(sh_timer);
1784             if (v > 0) cancel_timer(v);
1785             v = get_int(edge_timer);
1786             if (!v) {
1787                 emit("do-show-hshadow", "");
1788             }
1789             if (v > 0) cancel_timer(v);
1790             v = timer(0.1, "timer2", 0);
1791             set_int(edge_timer, v);
1792          }
1793       }
1794    }
1795 }
1796
1797 group { name: "elm/gengrid/base/default";
1798    inherit: "elm/genlist/base/default";
1799
1800    images {
1801        image: "00_grid_overscrolling_top.png" COMP;
1802        image: "00_grid_overscrolling_bottom.png" COMP;
1803        image: "00_grid_overscrolling_left.png" COMP;
1804        image: "00_grid_overscrolling_right.png" COMP;
1805    }
1806
1807    parts {
1808       part { name: "shadow_top";
1809          description { state: "default" 0.0;
1810             min: 0 405;
1811             image.normal: "00_grid_overscrolling_top.png";
1812          }
1813          description { state: "edge" 0.0;
1814             inherit: "default" 0.0;
1815             color: 255 255 255 255;
1816          }
1817       }
1818       part { name: "shadow_bottom";
1819          description { state: "default" 0.0;
1820             min: 0 405;
1821             image.normal: "00_grid_overscrolling_bottom.png";
1822          }
1823          description { state: "edge" 0.0;
1824             inherit: "default" 0.0;
1825             color: 255 255 255 255;
1826          }
1827       }
1828       part { name: "shadow_left";
1829          description { state: "default" 0.0;
1830             min: 405 0;
1831             image.normal: "00_grid_overscrolling_left.png";
1832          }
1833          description { state: "edge" 0.0;
1834             inherit: "default" 0.0;
1835             color: 255 255 255 255;
1836          }
1837       }
1838       part { name: "shadow_right";
1839          description { state: "default" 0.0;
1840             min: 405 0;
1841             image.normal: "00_grid_overscrolling_right.png";
1842          }
1843          description { state: "edge" 0.0;
1844             inherit: "default" 0.0;
1845             color: 255 255 255 255;
1846          }
1847       }
1848    }
1849 }
1850
1851 group { name: "elm/gengrid/base/handler";
1852    inherit: "elm/genlist/base/handler";
1853
1854    parts {
1855       part { name: "shadow_top";
1856          description { state: "default" 0.0;
1857             min: 0 405;
1858             image.normal: "00_grid_overscrolling_top.png";
1859          }
1860          description { state: "edge" 0.0;
1861             inherit: "default" 0.0;
1862             color: 255 255 255 255;
1863          }
1864       }
1865       part { name: "shadow_bottom";
1866          description { state: "default" 0.0;
1867             min: 0 405;
1868             image.normal: "00_grid_overscrolling_bottom.png";
1869          }
1870          description { state: "edge" 0.0;
1871             inherit: "default" 0.0;
1872             color: 255 255 255 255;
1873          }
1874       }
1875       part { name: "shadow_left";
1876          description { state: "default" 0.0;
1877             min: 405 0;
1878             image.normal: "00_grid_overscrolling_left.png";
1879          }
1880          description { state: "edge" 0.0;
1881             inherit: "default" 0.0;
1882             color: 255 255 255 255;
1883          }
1884       }
1885       part { name: "shadow_right";
1886          description { state: "default" 0.0;
1887             min: 405 0;
1888             image.normal: "00_grid_overscrolling_right.png";
1889          }
1890          description { state: "edge" 0.0;
1891             inherit: "default" 0.0;
1892             color: 255 255 255 255;
1893          }
1894       }
1895    }
1896 }
1897
1898 group { name: "elm/scroller/contents/default";
1899    parts {
1900       part { name: "elm.swallow.content";
1901          type: SWALLOW;
1902          description { state: "default" 0.0;
1903          }
1904       }
1905       part { name: "elm.swallow.content_r";
1906          type: SWALLOW;
1907          description { state: "default" 0.0;
1908             fixed: 1 1;
1909             rel1 {
1910                 relative: 1.0 0.0;
1911                 to: "elm.swallow.content";
1912             }
1913             rel2 {
1914                 relative: 2.0 1.0;
1915                 to: "elm.swallow.content";
1916             }
1917          }
1918       }
1919       part { name: "elm.swallow.content_b";
1920          type: SWALLOW;
1921          description { state: "default" 0.0;
1922             fixed: 1 1;
1923             rel1 {
1924                 relative: 0.0 1.0;
1925                 to: "elm.swallow.content";
1926             }
1927             rel2 {
1928                 relative: 1.0 2.0;
1929                 to: "elm.swallow.content";
1930             }
1931          }
1932       }
1933       part { name: "elm.swallow.content_rb";
1934          type: SWALLOW;
1935          description { state: "default" 0.0;
1936             fixed: 1 1;
1937             rel1 {
1938                 relative: 1.0 1.0;
1939                 to: "elm.swallow.content";
1940             }
1941             rel2 {
1942                 relative: 2.0 2.0;
1943                 to: "elm.swallow.content";
1944             }
1945          }
1946       }
1947    }
1948 }
1949