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