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