[genlist] Fix for touch sound is not playing on item text touch.
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / genlist / genlist.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
24 #include "genlist_macro.edc"
25 #include "genlist_textblock_style.edc"
26 #include "genlist_normal.edc"
27 #include "genlist_sweep.edc"
28 #include "genlist_groupindex.edc"
29 #include "genlist_expandable.edc"
30 #include "genlist_decorate.edc"
31 #include "genlist_email.edc"
32
33 #if 0
34    group { name: "elm/genlist/base/dialogue";
35       alias: "elm/scroller/base/dialogue";
36       inherit: "elm/genlist/base/default";
37       parts {
38          part { name: "bg";
39             description { state: "default" 0.0;
40                color: GENLIST_LIST_BG_COLOR;
41             }
42          }
43          part { name: "elm.padding.left";
44             type: RECT;
45             scale: 1;
46             description { state: "default" 0.0;
47                min: DIALOGUE_PADDING_SCROLLER 0;
48                fixed: 1 0;
49                visible: 0;
50                align: 0.0 0.0;
51                rel2.relative: 0.0  1.0;
52                color: GENLIST_PART_DIALOGUE_GROUP_BG_COLOR;
53             }
54          }
55          part { name: "elm.padding.right";
56             type: RECT;
57             scale: 1;
58             description { state: "default" 0.0;
59                min: DIALOGUE_PADDING_SCROLLER 0;
60                fixed: 1 0;
61                visible: 0;
62                align: 1.0 0.0;
63                rel1.relative: 1.0  0.0;
64                color: GENLIST_PART_DIALOGUE_GROUP_BG_COLOR;
65             }
66          }
67          part { name: "elm.swallow.content";
68             clip_to: "clipper";
69             type: SWALLOW;
70             scale: 1;
71             description { state: "default" 0.0;
72                rel1 {
73                   relative: 1.0 0.0;
74                   to_x: "elm.padding.left";
75                }
76                rel2 {
77                   relative: 0.0 1.0;
78                   to_x: "elm.padding.right";
79                }
80                color: 0 0 0 0;
81             }
82          }
83          part { name: "sb_vbar";
84             type: RECT;
85             mouse_events: 0;
86             scale: 1;
87             description { state: "default" 0.0;
88                fixed: 1 1;
89                visible: 0;
90                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
91                align: 1.0 0.0;
92                rel1 {
93                   relative: 1.0 0.0;
94                   offset:   0 0;
95                   to_y:     "bg";
96                   to_x:     "bg";
97                }
98                rel2 {
99                   relative: 1.0 1.0;
100                   offset:   -1 -1;
101                   to_y:     "sb_hbar";
102                   to_x:     "bg";
103                }
104             }
105          }
106       }
107    }
108    group { name: "elm/list/base/matchlist";
109       script {
110          public sbvis_v, sbvis_h, sbnever_v, sbalways_v, sbalways_h, sbvis_timer;
111          public timer0(val) {
112             new v;
113             v = get_int(sbvis_v);
114             if (v) {
115                v = get_int(sbalways_v);
116                if (!v) {
117                   emit("do-hide-vbar", "");
118                   set_int(sbvis_v, 0);
119                }
120             }
121             v = get_int(sbvis_h);
122             if (v) {
123                v = get_int(sbalways_h);
124                if (!v) {
125                   emit("do-hide-hbar", "");
126                   set_int(sbvis_h, 0);
127                }
128             }
129             set_int(sbvis_timer, 0);
130             return 0;
131          }
132       }
133       images {
134          image: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_IMAGE COMP;
135          image: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_IMAGE COMP;
136          image: "bt_sm_shine.png" COMP;
137          image: "bt_sm_hilight.png" COMP;
138          image: "sb_runnerh.png" COMP;
139          image: "sb_runnerv.png" COMP;
140          image: "01_dialoguegroup_bg_default.png" COMP;
141       }
142       parts {
143          part { name: "bg";
144             type: RECT;
145             scale: 1;
146             description { state: "default" 0.0;
147                rel1.offset: 0 0;
148                rel2.offset: -1 -1;
149                color: 255 255 255 0;
150             }
151          }
152          part { name: "bg";
153             mouse_events: 0;
154             scale: 1;
155             description { state: "default" 0.0;
156                rel1.to: "bg";
157                rel2.to: "bg";
158                rel1.offset: -5 -3;
159                rel2.offset: 4 10;
160                image {
161                   normal: "01_dialoguegroup_bg_default.png";
162                   border: SCROLLER_MATCHLIST_SCROLLBAR_BG_IMAGE_BORDER;
163                   border_scale: 1;
164                }
165                fill.smooth: 0;
166             }
167          }
168          part { name: "clipper";
169             type: RECT;
170             mouse_events: 0;
171             scale: 1;
172             description { state: "default" 0.0;
173                rel1.to: "bg";
174                rel2.to: "bg";
175             }
176          }
177          part { name: "elm.swallow.content";
178             clip_to: "clipper";
179             type: SWALLOW;
180             scale: 1;
181             description { state: "default" 0.0;
182                rel1.offset: 0 0;
183                rel2.offset: -1 -1;
184             }
185          }
186          part { name: "conf_over";
187             mouse_events: 0;
188             scale: 1;
189             description { state: "default" 0.0;
190                rel1.offset: 0 0;
191                rel2.offset: -1 -1;
192                visible: 0;
193             }
194          }
195          part { name: "sb_vbar_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_vbar_clip";
207             clip_to: "sb_vbar_clip_master";
208             type: RECT;
209             mouse_events: 0;
210             scale: 1;
211             description { state: "default" 0.0;
212             }
213             description { state: "hidden" 0.0;
214                visible: 0;
215                color: 255 255 255 0;
216             }
217          }
218          part {name: "vbar.padding";
219             type: RECT;
220             mouse_events: 0;
221             description { state: "default" 0.0;
222                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_PADDING_SIZE 0;
223                max: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_PADDING_SIZE 0;
224                align: 1 0.5;
225                rel1 {
226                   relative: 0.0 0.0;
227                   to: "elm.swallow.content";
228                }
229                rel2 {
230                   relative: 1.0 1.0;
231                   to: "elm.swallow.content";
232                }
233             }
234          }
235          part { name: "sb_vbar";
236             type: RECT;
237             mouse_events: 0;
238             scale: 1;
239             description { state: "default" 0.0;
240                fixed: 1 1;
241                visible: 0;
242                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
243                align: 1.0 0.0;
244                rel1 {
245                   relative: 1.0 0.0;
246                   offset: 0 0;
247                   to_y: "elm.swallow.content";
248                   to_x: "elm.swallow.content";
249                }
250                rel2 {
251                   relative: 0.0 1.0;
252                   offset: -1 -1;
253                   to_y: "elm.swallow.content";
254                   to_x: "vbar.padding";
255                }
256             }
257          }
258          part { name: "sb_vbar_runner";
259             clip_to: "sb_vbar_clip";
260             mouse_events: 0;
261             scale: 1;
262             description { state: "default" 0.0;
263                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
264                max: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MAX_SIZE_INC;
265                rel1.to: "sb_vbar";
266                rel2.to: "sb_vbar";
267                visible: 0;
268                image {
269                   normal: "sb_runnerv.png";
270                   border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_RUNNER_BORDER;
271                   border_scale: 1;
272                }
273                fill.smooth: 0;
274             }
275          }
276          part { name: "elm.dragable.vbar";
277             clip_to: "sb_vbar_clip";
278             mouse_events: 0;
279             scale: 1;
280             dragable {
281                x: 0 0 0;
282                y: 1 1 0;
283                confine: "sb_vbar";
284             }
285             description { state: "default" 0.0;
286                fixed: 1 1;
287                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
288                max: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MAX_SIZE_INC;
289                rel1 {
290                   relative: 0.5  0.5;
291                   offset:   0    0;
292                   to: "sb_vbar";
293                }
294                rel2 {
295                   relative: 0.5  0.5;
296                   offset:   0    0;
297                   to: "sb_vbar";
298                }
299                image {
300                                    normal: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_IMAGE;
301                                    border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_IMAGE_BORDER;
302                                    border_scale: 1;
303                                    middle: DEFAULT;
304                }
305             }
306          }
307          part { name: "sb_vbar_over1";
308             clip_to: "sb_vbar_clip";
309             mouse_events: 0;
310             scale: 1;
311             description { state: "default" 0.0;
312                rel1.to: "elm.dragable.vbar";
313                rel2.relative: 1.0 0.5;
314                rel2.to: "elm.dragable.vbar";
315                visible: 0;
316                image {
317                   normal: "bt_sm_hilight.png";
318                   border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_OVER1;
319                   border_scale: 1;
320                }
321             }
322          }
323          part { name: "sb_vbar_over2";
324             clip_to: "sb_vbar_clip";
325             mouse_events: 0;
326             scale: 1;
327             description { state: "default" 0.0;
328                rel1.to: "elm.dragable.vbar";
329                rel2.to: "elm.dragable.vbar";
330                visible: 0;
331                image {
332                   normal: "bt_sm_shine.png";
333                   border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_OVER2;
334                   border_scale: 1;
335                }
336             }
337          }
338          part { name: "sb_hbar_clip_master";
339             type: RECT;
340             mouse_events: 0;
341             description { state: "default" 0.0;
342             }
343             description { state: "hidden" 0.0;
344                visible: 0;
345                color: 255 255 255 0;
346             }
347          }
348          part { name: "sb_hbar_clip";
349             clip_to: "sb_hbar_clip_master";
350             type: RECT;
351             mouse_events: 0;
352             scale: 1;
353             description { state: "default" 0.0;
354             }
355             description { state: "hidden" 0.0;
356                visible: 0;
357                color: 255 255 255 0;
358             }
359          }
360          part {name: "hbar.padding";
361             type: RECT;
362             mouse_events: 0;
363             description { state: "default" 0.0;
364                min: 0 SCROLLER_MATCHLIST_SCROLLBAR_HBAR_PADDING_SIZE;
365                max: 0 SCROLLER_MATCHLIST_SCROLLBAR_HBAR_PADDING_SIZE;
366                align: 1 1;
367                rel1 {
368                   relative: 0.0 0.0;
369                   to: "elm.swallow.content";
370                }
371                rel2 {
372                   relative: 1.0 1.0;
373                   to: "elm.swallow.content";
374                }
375             }
376          }
377          part { name: "sb_hbar";
378             type: RECT;
379             mouse_events: 0;
380             scale: 1;
381             description { state: "default" 0.0;
382                fixed: 1 1;
383                visible: 0;
384                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
385                align: 0.0 1.0;
386                rel1 {
387                   relative: 0.0 1.0;
388                   offset: 0 0;
389                   to_y: "elm.swallow.content";
390                   to_x: "elm.swallow.content";
391                }
392                rel2 {
393                   relative: 0.0 1.0;
394                   offset: -1 -1;
395                   to_x: "sb_vbar";
396                   to_y: "hbar.padding";
397                }
398             }
399          }
400          part { name: "sb_hbar_runner";
401             clip_to: "sb_hbar_clip";
402             mouse_events: 0;
403             scale: 1;
404             description { state: "default" 0.0;
405                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
406                max: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MAX_SIZE_INC;
407                rel1.to: "sb_hbar";
408                rel2.to: "sb_hbar";
409                visible: 0;
410                image {
411                   normal: "sb_runnerh.png";
412                   border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_RUNNER_BORDER;
413                   border_scale: 1;
414                }
415                fill.smooth: 0;
416             }
417          }
418          part { name: "elm.dragable.hbar";
419             clip_to: "sb_hbar_clip";
420             mouse_events: 0;
421             scale: 1;
422             dragable {
423                x: 1 1 0;
424                y: 0 0 0;
425                confine: "sb_hbar";
426             }
427             description { state: "default" 0.0;
428                fixed: 1 1;
429                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
430                max: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MAX_SIZE_INC;
431                rel1 {
432                   relative: 0.5  0.5;
433                   offset: 0 0;
434                   to: "sb_hbar";
435                }
436                rel2 {
437                   relative: 0.5  0.5;
438                   offset: 0 0;
439                   to: "sb_hbar";
440                }
441                color: 255 255 255 0;
442                image {
443                                    normal: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_IMAGE;
444                                    border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_IMAGE_BORDER;
445                                    border_scale: 1;
446                }
447                image.middle: SOLID;
448             }
449          }
450          part { name: "sb_hbar_over1";
451             clip_to: "sb_hbar_clip";
452             mouse_events: 0;
453             scale: 1;
454             description { state: "default" 0.0;
455                rel1.to: "elm.dragable.hbar";
456                rel2.relative: 1.0 0.5;
457                rel2.to: "elm.dragable.hbar";
458                visible: 0;
459                image {
460                   normal: "bt_sm_hilight.png";
461                   border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_OVER1;
462                   border_scale: 1;
463                }
464             }
465          }
466          part { name: "sb_hbar_over2";
467             clip_to: "sb_hbar_clip";
468             mouse_events: 0;
469             scale: 1;
470             description { state: "default" 0.0;
471                rel1.to: "elm.dragable.hbar";
472                rel2.to: "elm.dragable.hbar";
473                visible: 0;
474                image {
475                   normal: "bt_sm_shine.png";
476                   border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_OVER2;
477                   border_scale: 1;
478                }
479             }
480          }
481       }
482       programs {
483          program { name: "load";
484             signal: "load";
485             source: "";
486             script {
487                set_state(PART:"sb_hbar_clip", "hidden", 0.0);
488                set_state(PART:"sb_vbar_clip", "hidden", 0.0);
489                set_int(sbvis_h, 0);
490                set_int(sbvis_v, 0);
491                set_int(sbalways_v, 0);
492                set_int(sbalways_h, 0);
493                set_int(sbvis_timer, 0);
494                set_int(sbnever_v, 0);
495             }
496          }
497          program { name: "vbar_show";
498             signal: "elm,action,show,vbar";
499             source: "elm";
500             action: STATE_SET "default" 0.0;
501             target: "sb_vbar_clip_master";
502          }
503          program { name: "vbar_hide";
504             signal: "elm,action,hide,vbar";
505             source: "elm";
506             action: STATE_SET "hidden" 0.0;
507             target: "sb_vbar_clip_master";
508          }
509          program { name: "vbar_show_always";
510             signal: "elm,action,show_always,vbar";
511             source: "elm";
512             script {
513                new v;
514                v = get_int(sbvis_v);
515                v |= get_int(sbalways_v);
516                if (!v) {
517                   set_int(sbalways_v, 1);
518                   emit("do-show-vbar", "");
519                   set_int(sbvis_v, 1);
520                }
521                set_int(sbnever_v, 0);
522             }
523          }
524          program { name: "vbar_show_notalways";
525             signal: "elm,action,show_notalways,vbar";
526             source: "elm";
527             script {
528                new v;
529                v = get_int(sbalways_v);
530                if (v) {
531                   set_int(sbalways_v, 0);
532                   v = get_int(sbvis_v);
533                   if (!v) {
534                      emit("do-hide-vbar", "");
535                      set_int(sbvis_v, 0);
536                   }
537                }
538                set_int(sbnever_v, 0);
539             }
540          }
541          program { name: "vbar_hide_always";
542             signal: "elm,action,hide_always,vbar";
543             source: "elm";
544             script {
545                new v1, v2;
546                v1 = get_int(sbnever_v);
547                if (!v1) {
548                   set_int(sbnever_v, 1);
549                   set_int(sbalways_v, 0);
550                   v2 = get_int(sbvis_v);
551                   if (!v2) {
552                      emit("do-hide-vbar", "");
553                      set_int(sbvis_v, 0);
554                   }
555                }
556             }
557          }
558          program { name: "sb_vbar_show";
559             signal: "do-show-vbar";
560             source: "";
561             action: STATE_SET "default" 0.0;
562             transition: LINEAR 1.0;
563             target: "sb_vbar_clip";
564          }
565          program { name: "sb_vbar_hide";
566             signal: "do-hide-vbar";
567             source: "";
568             action: STATE_SET "hidden" 0.0;
569             transition: LINEAR 1.0;
570             target: "sb_vbar_clip";
571          }
572          program { name: "hbar_show";
573             signal: "elm,action,show,hbar";
574             source: "elm";
575             action: STATE_SET "default" 0.0;
576             target: "sb_hbar_clip_master";
577          }
578          program { name: "hbar_hide";
579             signal: "elm,action,hide,hbar";
580             source: "elm";
581             action:  STATE_SET "hidden" 0.0;
582             target: "sb_hbar_clip_master";
583          }
584          program { name: "hbar_show_always";
585             signal: "elm,action,show_always,hbar";
586             source: "elm";
587             script {
588                new v;
589                v = get_int(sbvis_h);
590                v |= get_int(sbalways_h);
591                if (!v) {
592                   set_int(sbalways_h, 1);
593                   emit("do-show-hbar", "");
594                   set_int(sbvis_h, 1);
595                }
596             }
597          }
598          program { name: "hbar_show_notalways";
599             signal: "elm,action,show_notalways,hbar";
600             source: "elm";
601             script {
602                new v;
603                v = get_int(sbalways_h);
604                if (v) {
605                   set_int(sbalways_h, 0);
606                   v = get_int(sbvis_h);
607                   if (!v) {
608                      emit("do-hide-hbar", "");
609                      set_int(sbvis_h, 0);
610                   }
611                }
612             }
613          }
614          program { name: "sb_hbar_show";
615             signal: "do-show-hbar";
616             source: "";
617             action: STATE_SET "default" 0.0;
618             transition: LINEAR 1.0;
619             target: "sb_hbar_clip";
620          }
621          program { name: "sb_hbar_hide";
622             signal: "do-hide-hbar";
623             source: "";
624             action: STATE_SET "hidden" 0.0;
625             transition: LINEAR 1.0;
626             target: "sb_hbar_clip";
627          }
628          program { name: "scroll";
629             signal: "elm,action,scroll";
630             source: "elm";
631             action:  STATE_SET "default" 0.0;
632             script {
633                new v, v1;
634                v = get_int(sbvis_v);
635                v |= get_int(sbalways_v);
636                v1 = get_int(sbnever_v);
637                if (!v && !v1) {
638                   emit("do-show-vbar", "");
639                   set_int(sbvis_v, 1);
640                }
641                v = get_int(sbvis_h);
642                v |= get_int(sbalways_h);
643                if (!v) {
644                   emit("do-show-hbar", "");
645                   set_int(sbvis_h, 1);
646                }
647                v = get_int(sbvis_timer);
648                if (v > 0) cancel_timer(v);
649                v = timer(0.5, "timer0", 0);
650                set_int(sbvis_timer, v);
651             }
652          }
653       }
654    }
655 #endif