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