add keypad and actions to callscreen theme - no backend yet.
[profile/ivi/lemolo.git] / data / themes / default.edc
1 collections {
2
3    color_classes {
4       color_class {
5          name: "bg";
6          color: 0 0 0 255;
7       }
8
9       color_class {
10          name: "dark";
11          color: 25 45 51 255;
12       }
13
14       color_class {
15          name: "light";
16          color: 55 88 84 255;
17       }
18
19       color_class {
20          name: "action";
21          color: 123 184 155 255;
22       }
23
24       color_class {
25          name: "caution";
26          color: 193 39 44 255;
27       }
28
29       color_class {
30          name: "disabled";
31          color: 255 255 255 64;
32       }
33    }
34
35    group {
36       name: "elm/layout/dialer/main";
37       parts {
38          part {
39             name: "bg";
40             type: RECT;
41             mouse_events: 0;
42             description {
43                state: "default" 0.0;
44                color: 0 0 0 255;
45             }
46          }
47
48          part {
49             name: "elm.swallow.keypad";
50             type: SWALLOW;
51             description {
52                state: "default" 0.0;
53                rel2.offset: -1 -171;
54             }
55          }
56
57       }
58    }
59
60    group {
61       name: "elm/layout/dialer/keypad";
62
63       min: 720 1110;
64
65       images {
66          image: "bg_keypad.jpg" COMP;
67          image: "bt_call_pressed.png" COMP;
68          image: "bt_call_released.png" COMP;
69          image: "bt_backspace_pressed.png" COMP;
70          image: "bt_backspace_released.png" COMP;
71          image: "bt_add_contact_released.png" COMP;
72          image: "bt_add_contact_pressed.png" COMP;
73       }
74
75       parts {
76          part {
77             name: "bg";
78             type: IMAGE;
79             mouse_events: 0;
80             description {
81                state: "default" 0.0;
82                color: 255 255 255 255;
83                color_class: "dark";
84                min: 720 1110;
85                image {
86                   normal: "bg_keypad.jpg";
87                   scale_hint: STATIC;
88                }
89                fill.smooth: 1;
90             }
91          }
92
93          part {
94             name: "elm.text.display";
95             type: TEXT;
96             mouse_events: 0;
97             scale: 1;
98             description {
99                state: "default" 0.0;
100                color: 255 255 255 255;
101                color_class: "action";
102                min: 720 170;
103                rel2 {
104                   relative: 1.0 0.0;
105                   offset: -1.0 169;
106                }
107                text {
108                   text: "+1 (12) 3456-7890";
109                   font: "Verdana";
110                   size: 99;
111                   size_range: 16 99;
112                   fit: 1 1;
113                   align: 0.5 0.5;
114                   ellipsis: 1.0;
115                }
116             }
117          }
118
119          part {
120             name: "bg.buttons";
121             type: RECT;
122             mouse_events: 0;
123             description {
124                state: "default" 0.0;
125                color: 0 0 0 0;
126                min: 720 0;
127                max: 720 720; /* keep it tight centered */
128                rel1 {
129                   relative: 0.0 1.0;
130                   to_y: "elm.text.display";
131                }
132                rel2 {
133                   relative: 1.0 0.0;
134                   to_y: "bg.actions";
135                }
136             }
137          }
138
139          part {
140             name: "bg.actions";
141             type: RECT;
142             mouse_events: 0;
143             description {
144                state: "default" 0.0;
145                color: 0 0 0 0;
146                min: 720 170;
147                max: 720 99999; /* keep it tight centered */
148                rel1 {
149                   relative: 0.0 1.0;
150                   offset: 0 -170;
151                }
152             }
153          }
154
155 #define SEPARATOR(id, rely, offy, relto)                                \
156          part {                                                         \
157             name: "separator.dark."##id;                                \
158             type: RECT;                                                 \
159             mouse_events: 0;                                            \
160             description {                                               \
161                state: "default" 0.0;                                    \
162                color: 255 255 255 255;                                  \
163                color_class: "dark";                                     \
164                rel1 {                                                   \
165                   relative: 0.0 rely;                                   \
166                   offset: 0 offy;                                       \
167                   to_y: relto;                                          \
168                }                                                        \
169                rel2 {                                                   \
170                   relative: 1.0 rely;                                   \
171                   offset: -1 (offy + 4);                                \
172                   to_y: relto;                                          \
173                }                                                        \
174             }                                                           \
175          }                                                              \
176          part {                                                         \
177             name: "separator.bg."##id;                                  \
178             type: RECT;                                                 \
179             mouse_events: 0;                                            \
180             description {                                               \
181                state: "default" 0.0;                                    \
182                color: 255 255 255 255;                                  \
183                color_class: "bg";                                       \
184                rel1 {                                                   \
185                   relative: 0.0 rely;                                   \
186                   offset: 0 (offy + 4);                                 \
187                   to_y: relto;                                          \
188                }                                                        \
189                rel2 {                                                   \
190                   relative: 1.0 rely;                                   \
191                   offset: -1 (offy + 8);                                \
192                   to_y: relto;                                          \
193                }                                                        \
194             }                                                           \
195          }
196
197          SEPARATOR("number", 1.0, 0, "elm.text.display");
198          SEPARATOR("actions", 0.0, -8, "bg.actions");
199 #undef SEPARATOR
200
201
202 #define BUTTON(id, label, sub, ccls, r1, r2)                            \
203          part {                                                         \
204             name: "button."##id;                                        \
205             type: RECT;                                                 \
206             mouse_events: 1;                                            \
207             description {                                               \
208                state: "default" 0.0;                                    \
209                color: 255 255 255 0;                                    \
210                color_class: "action";                                   \
211                rel1 {                                                   \
212                   to: "bg.buttons";                                     \
213                   relative: r1;                                         \
214                }                                                        \
215                rel2 {                                                   \
216                   to: "bg.buttons";                                     \
217                   relative: r2;                                         \
218                   offset: -2 -2;                                        \
219                }                                                        \
220             }                                                           \
221             description {                                               \
222                state: "pressed" 0.0;                                    \
223                inherit: "default" 0.0;                                  \
224                color: 255 255 255 255;                                  \
225             }                                                           \
226          }                                                              \
227          part {                                                         \
228             name: "label."##id;                                         \
229             type: TEXT;                                                 \
230             mouse_events: 0;                                            \
231             description {                                               \
232                state: "default" 0.0;                                    \
233                color: 255 255 255 255;                                  \
234                color_class: ccls;                                       \
235                rel1.to: "button."##id;                                  \
236                rel2 {                                                   \
237                   to: "button."##id;                                    \
238                   relative: 1.0 0.8;                                    \
239                }                                                        \
240                text {                                                   \
241                   text: label;                                          \
242                   font: "Verdana";                                      \
243                   size: 99;                                             \
244                   align: 0.5 0.5;                                       \
245                }                                                        \
246             }                                                           \
247             description {                                               \
248                state: "pressed" 0.0;                                    \
249                inherit: "default" 0.0;                                  \
250                color: 16 16 16 255;                                     \
251             }                                                           \
252          }                                                              \
253          part {                                                         \
254             name: "sub."##id;                                           \
255             type: TEXT;                                                 \
256             mouse_events: 0;                                            \
257             description {                                               \
258                state: "default" 0.0;                                    \
259                color: 255 255 255 255;                                  \
260                color_class: "light";                                    \
261                rel1 {                                                   \
262                   to: "button."##id;                                    \
263                   relative: 0.0 0.5;                                    \
264                   offset: 0 2;                                          \
265                }                                                        \
266                rel2.to: "button."##id;                                  \
267                text {                                                   \
268                   text: sub;                                            \
269                   font: "Verdana:style=Bold";                           \
270                   size: 16;                                             \
271                   align: 0.5 0.5;                                       \
272                }                                                        \
273             }                                                           \
274             description {                                               \
275                state: "pressed" 0.0;                                    \
276                inherit: "default" 0.0;                                  \
277                color: 16 16 16 255;                                     \
278             }                                                           \
279          }                                                              \
280          programs {                                                     \
281             program {                                                   \
282                signal: "mouse,up,1";                                    \
283                source: "button."##id;                                   \
284                action: SIGNAL_EMIT "released,"##id "keypad";            \
285                after: "show_up_"##id;                                   \
286             }                                                           \
287             program {                                                   \
288                name: "show_up_"##id;                                    \
289                action: STATE_SET "default" 0.0;                         \
290                transition: DECELERATE 0.1;                              \
291                target: "button."##id;                                   \
292                target: "label."##id;                                    \
293                target: "sub."##id;                                      \
294             }                                                           \
295             program {                                                   \
296                signal: "mouse,down,1";                                  \
297                source: "button."##id;                                   \
298                after: "show_down_"##id;                                 \
299                action: SIGNAL_EMIT "pressed,"##id "keypad";             \
300             }                                                           \
301             program {                                                   \
302                name: "show_down_"##id;                                  \
303                action: STATE_SET "pressed" 0.0;                         \
304                transition: ACCELERATE 0.3;                              \
305                target: "button."##id;                                   \
306                target: "label."##id;                                    \
307                target: "sub."##id;                                      \
308             }                                                           \
309             program {                                                   \
310                signal: "mouse,clicked,1";                               \
311                source: "button."##id;                                   \
312                action: SIGNAL_EMIT "clicked,"##id "keypad";             \
313             }                                                           \
314          }
315
316          BUTTON("1",    "1",     "", "action", 0.000 0.0, 0.333 0.25);
317          BUTTON("2",    "2",  "ABC", "action", 0.333 0.0, 0.666 0.25);
318          BUTTON("3",    "3",  "DEF", "action", 0.666 0.0, 1.000 0.25);
319
320          BUTTON("4",    "4",  "GHI", "action", 0.000 0.25, 0.333 0.50);
321          BUTTON("5",    "5",  "JKL", "action", 0.333 0.25, 0.666 0.50);
322          BUTTON("6",    "6",  "MNO", "action", 0.666 0.25, 1.000 0.50);
323
324          BUTTON("7",    "7", "PQRS", "action", 0.000 0.50, 0.333 0.75);
325          BUTTON("8",    "8",  "TUV", "action", 0.333 0.50, 0.666 0.75);
326          BUTTON("9",    "9", "WXYZ", "action", 0.666 0.50, 1.000 0.75);
327
328          BUTTON("star", "*",     "", "light",  0.000 0.75, 0.333 1.00);
329          BUTTON("0",    "0",    "+", "action", 0.333 0.75, 0.666 1.00);
330          BUTTON("hash", "#",     "", "light",  0.666 0.75, 1.000 1.00);
331 #undef BUTTON
332
333
334 #define ACTION_BUTTON(id, img, x0, x1)                                  \
335          part {                                                         \
336             name: "button."##id;                                        \
337             type: IMAGE;                                                \
338             mouse_events: 1;                                            \
339             description {                                               \
340                state: "default" 0.0;                                    \
341                color: 255 255 255 255;                                  \
342                color_class: "action";                                   \
343                min: 240 170;                                            \
344                max: 240 170;                                            \
345                fixed: 1 1;                                              \
346                rel1 {                                                   \
347                   to: "bg.actions";                                     \
348                   relative: x0 0.0;                                     \
349                }                                                        \
350                rel2 {                                                   \
351                   to: "bg.actions";                                     \
352                   relative: x1 1.0;                                     \
353                   offset: -1 -1;                                        \
354                }                                                        \
355                image.normal: "bt_"##img"_released.png";                 \
356             }                                                           \
357             description {                                               \
358                state: "pressed" 0.0;                                    \
359                inherit: "default" 0.0;                                  \
360                color: 255 255 255 0;                                    \
361                visible: 0;                                              \
362             }                                                           \
363          }                                                              \
364          part {                                                         \
365             name: "button.over."##id;                                   \
366             type: IMAGE;                                                \
367             mouse_events: 1;                                            \
368             description {                                               \
369                state: "default" 0.0;                                    \
370                color: 255 255 255 0;                                    \
371                visible: 0;                                              \
372                color_class: "action";                                   \
373                rel1.to: "button."##id;                                  \
374                rel2.to: "button."##id;                                  \
375                image.normal: "bt_"##img"_pressed.png";                  \
376             }                                                           \
377             description {                                               \
378                state: "pressed" 0.0;                                    \
379                inherit: "default" 0.0;                                  \
380                color: 255 255 255 255;                                  \
381                visible: 1;                                              \
382             }                                                           \
383          }                                                              \
384          programs {                                                     \
385             program {                                                   \
386                signal: "mouse,up,1";                                    \
387                source: "button."##id;                                   \
388                action: SIGNAL_EMIT "released,"##id "keypad";            \
389                after: "show_up_"##id;                                   \
390             }                                                           \
391             program {                                                   \
392                name: "show_up_"##id;                                    \
393                action: STATE_SET "default" 0.0;                         \
394                transition: DECELERATE 0.1;                              \
395                target: "button."##id;                                   \
396                target: "button.over."##id;                              \
397             }                                                           \
398             program {                                                   \
399                signal: "mouse,down,1";                                  \
400                source: "button."##id;                                   \
401                after: "show_down_"##id;                                 \
402                action: SIGNAL_EMIT "pressed,"##id "keypad";             \
403             }                                                           \
404             program {                                                   \
405                name: "show_down_"##id;                                  \
406                action: STATE_SET "pressed" 0.0;                         \
407                transition: ACCELERATE 0.1;                              \
408                target: "button."##id;                                   \
409                target: "button.over."##id;                              \
410             }                                                           \
411             program {                                                   \
412                signal: "mouse,clicked,1";                               \
413                source: "button."##id;                                   \
414                action: SIGNAL_EMIT "clicked,"##id "keypad";             \
415             }                                                           \
416          }
417
418          ACTION_BUTTON("save",      "add_contact", 0.000000000, 0.333333333);
419          ACTION_BUTTON("call",      "call",        0.333333333, 0.666666666);
420          ACTION_BUTTON("backspace", "backspace",   0.666666666, 1.000000000);
421 #undef ACTION_BUTTON
422       }
423    }
424
425    group {
426       name: "elm/layout/dialer/call";
427
428       min: 720 1280;
429
430       images {
431          image: "bg_call.jpg" COMP;
432          image: "bt_mute_pressed.png" COMP;
433          image: "bt_mute_released.png" COMP;
434          image: "bt_keypad_pressed.png" COMP;
435          image: "bt_keypad_released.png" COMP;
436          image: "bt_speaker_pressed.png" COMP;
437          image: "bt_speaker_released.png" COMP;
438          image: "bt_merge_pressed.png" COMP;
439          image: "bt_merge_released.png" COMP;
440          image: "bt_swap_pressed.png" COMP;
441          image: "bt_swap_released.png" COMP;
442          image: "bt_contacts_pressed.png" COMP;
443          image: "bt_contacts_released.png" COMP;
444       }
445
446       parts {
447          part {
448             name: "bg";
449             type: IMAGE;
450             mouse_events: 0;
451             description {
452                state: "default" 0.0;
453                color: 255 255 255 255;
454                color_class: "dark";
455                min: 720 1280;
456                image {
457                   normal: "bg_call.jpg";
458                   scale_hint: STATIC;
459                }
460                fill.smooth: 1;
461             }
462          }
463
464          part {
465             name: "elm.text.name";
466             type: TEXT;
467             mouse_events: 0;
468             scale: 1;
469             description {
470                state: "default" 0.0;
471                color: 255 255 255 255;
472                color_class: "action";
473                min: 628 170;
474                rel1.offset: 46 0;
475                rel2 {
476                   relative: 1.0 0.0;
477                   offset: -47.0 169;
478                }
479                text {
480                   text: "Gustavo Barbieri";
481                   font: "Verdana";
482                   size: 99;
483                   size_range: 16 99;
484                   fit: 1 1;
485                   align: 0.0 0.5;
486                   ellipsis: 0.0;
487                }
488             }
489          }
490
491          part {
492             name: "elm.text.status";
493             type: TEXT;
494             mouse_events: 0;
495             scale: 1;
496             description {
497                state: "default" 0.0;
498                color: 255 255 255 255;
499                color_class: "light";
500                fixed: 1 1;
501                rel1 {
502                   to: "elm.text.name";
503                   relative: 0.0 1.0;
504                   offset: -1.0 -20;
505                }
506                rel2 {
507                   to: "elm.text.name";
508                   relative: 1.0 1.0;
509                   offset: -1.0 -1;
510                }
511                text {
512                   text: "calling...";
513                   font: "Verdana";
514                   size: 43;
515                   min: 0 1;
516                   align: 0.0 0.0;
517                   ellipsis: 0.0;
518                }
519             }
520          }
521
522 #define SEPARATOR(id, clip, rely, offy, relto)                          \
523          part {                                                         \
524             name: "separator.dark."##id;                                \
525             type: RECT;                                                 \
526             mouse_events: 0;                                            \
527             clip_to: clip;                                              \
528             description {                                               \
529                state: "default" 0.0;                                    \
530                color: 255 255 255 255;                                  \
531                color_class: "dark";                                     \
532                rel1 {                                                   \
533                   relative: 0.0 rely;                                   \
534                   offset: 0 offy;                                       \
535                   to_y: relto;                                          \
536                }                                                        \
537                rel2 {                                                   \
538                   relative: 1.0 rely;                                   \
539                   offset: -1 (offy + 4);                                \
540                   to_y: relto;                                          \
541                }                                                        \
542             }                                                           \
543          }                                                              \
544          part {                                                         \
545             name: "separator.bg."##id;                                  \
546             type: RECT;                                                 \
547             mouse_events: 0;                                            \
548             clip_to: clip;                                              \
549             description {                                               \
550                state: "default" 0.0;                                    \
551                color: 255 255 255 255;                                  \
552                color_class: "bg";                                       \
553                rel1 {                                                   \
554                   relative: 0.0 rely;                                   \
555                   offset: 0 (offy + 4);                                 \
556                   to_y: relto;                                          \
557                }                                                        \
558                rel2 {                                                   \
559                   relative: 1.0 rely;                                   \
560                   offset: -1 (offy + 8);                                \
561                   to_y: relto;                                          \
562                }                                                        \
563             }                                                           \
564          }
565
566          SEPARATOR("actions", "clipper.actions", 0.0, -8, "bg.actions");
567
568          part {
569             name: "bg.actions";
570             type: RECT;
571             mouse_events: 0;
572             clip_to: "clipper.keypad-hidden";
573             description {
574                state: "default" 0.0;
575                color: 0 0 0 0;
576                min: 720 340;
577                max: 720 99999; /* keep it tight centered */
578                fixed: 1 1;
579                rel1 {
580                   to: "bg.buttons";
581                   relative: 0.0 0.0;
582                   offset: 0 -348;
583                }
584                rel2 {
585                   to: "bg.buttons";
586                   relative: 1.0 0.0;
587                   offset: -1 -8;
588                }
589             }
590          }
591          part {
592             name: "clipper.actions";
593             type: RECT;
594             mouse_events: 0;
595             clip_to: "clipper.keypad-hidden";
596             description {
597                state: "default" 0.0;
598                color: 255 255 255 0;
599                visible: 0;
600             }
601             description {
602                state: "visible" 0.0;
603                inherit: "default" 0.0;
604                color: 255 255 255 255;
605                visible: 1;
606             }
607          }
608          programs {
609             program {
610                name: "show,actions";
611                action: STATE_SET "visible" 0.0;
612                transition: DECELERATE 0.3;
613                target: "clipper.actions";
614             }
615             program {
616                name: "hide,actions";
617                action: STATE_SET "default" 0.0;
618                transition: ACCELERATE 0.3;
619                target: "clipper.actions";
620             }
621
622             program {
623                signal: "state,disconnected";
624                source: "call";
625                after: "hide,actions";
626             }
627             program {
628                signal: "state,active";
629                source: "call";
630                after: "show,actions";
631             }
632             program {
633                signal: "state,held";
634                source: "call";
635                after: "hide,actions";
636             }
637             program {
638                signal: "state,dialing";
639                source: "call";
640                after: "hide,actions";
641             }
642             program {
643                signal: "state,alerting";
644                source: "call";
645                after: "hide,actions";
646             }
647             program {
648                signal: "state,incoming";
649                source: "call";
650                after: "hide,actions";
651             }
652          }
653
654 #define ACTION_BUTTON(id, img, r1, r2)                                  \
655          part {                                                         \
656             name: "clipper."##id;                                       \
657             type: RECT;                                                 \
658             clip_to: "clipper.actions";                                 \
659             description {                                               \
660                state: "default" 0.0;                                    \
661                color: 255 255 255 255;                                  \
662                rel1.to: "button."##id;                                  \
663                rel2.to: "button."##id;                                  \
664             }                                                           \
665             description {                                               \
666                state: "disabled" 0.0;                                   \
667                inherit: "default" 0.0;                                  \
668                color_class: "disabled";                                 \
669             }                                                           \
670             description {                                               \
671                state: "hidden" 0.0;                                     \
672                inherit: "default" 0.0;                                  \
673                color: 255 255 255 0;                                    \
674                visible: 0;                                              \
675             }                                                           \
676          }                                                              \
677          part {                                                         \
678             name: "button."##id;                                        \
679             type: IMAGE;                                                \
680             mouse_events: 1;                                            \
681             clip_to: "clipper."##id;                                    \
682             description {                                               \
683                state: "default" 0.0;                                    \
684                color: 255 255 255 255;                                  \
685                color_class: "action";                                   \
686                min: 240 170;                                            \
687                max: 240 170;                                            \
688                fixed: 1 1;                                              \
689                rel1 {                                                   \
690                   to: "bg.actions";                                     \
691                   relative: r1;                                         \
692                }                                                        \
693                rel2 {                                                   \
694                   to: "bg.actions";                                     \
695                   relative: r2;                                         \
696                   offset: -1 -1;                                        \
697                }                                                        \
698                image.normal: "bt_"##img"_released.png";                 \
699             }                                                           \
700             description {                                               \
701                state: "pressed" 0.0;                                    \
702                inherit: "default" 0.0;                                  \
703                color: 255 255 255 0;                                    \
704                visible: 0;                                              \
705             }                                                           \
706          }                                                              \
707          part {                                                         \
708             name: "button.over."##id;                                   \
709             type: IMAGE;                                                \
710             clip_to: "clipper."##id;                                    \
711             mouse_events: 1;                                            \
712             description {                                               \
713                state: "default" 0.0;                                    \
714                color: 255 255 255 0;                                    \
715                visible: 0;                                              \
716                color_class: "action";                                   \
717                rel1.to: "button."##id;                                  \
718                rel2.to: "button."##id;                                  \
719                image.normal: "bt_"##img"_pressed.png";                  \
720             }                                                           \
721             description {                                               \
722                state: "pressed" 0.0;                                    \
723                inherit: "default" 0.0;                                  \
724                color: 255 255 255 255;                                  \
725                visible: 1;                                              \
726             }                                                           \
727          }                                                              \
728          part {                                                         \
729             name: "blocker."##id;                                       \
730             type: RECT;                                                 \
731             mouse_events: 1;                                            \
732             clip_to: "clipper."##id;                                    \
733             description {                                               \
734                state: "default" 0.0;                                    \
735                color: 0 0 0 0;                                          \
736                visible: 0;                                              \
737             }                                                           \
738             description {                                               \
739                state: "disabled" 0.0;                                   \
740                inherit: "default" 0.0;                                  \
741                visible: 1;                                              \
742             }                                                           \
743          }                                                              \
744          programs {                                                     \
745             program {                                                   \
746                signal: "mouse,up,1";                                    \
747                source: "button."##id;                                   \
748                action: SIGNAL_EMIT "released,"##id "call";              \
749                after: "show_up_"##id;                                   \
750             }                                                           \
751             program {                                                   \
752                name: "show_up_"##id;                                    \
753                action: STATE_SET "default" 0.0;                         \
754                transition: DECELERATE 0.1;                              \
755                target: "button."##id;                                   \
756                target: "button.over."##id;                              \
757             }                                                           \
758             program {                                                   \
759                signal: "mouse,down,1";                                  \
760                source: "button."##id;                                   \
761                after: "show_down_"##id;                                 \
762                action: SIGNAL_EMIT "pressed,"##id "call";               \
763             }                                                           \
764             program {                                                   \
765                name: "show_down_"##id;                                  \
766                action: STATE_SET "pressed" 0.0;                         \
767                transition: ACCELERATE 0.1;                              \
768                target: "button."##id;                                   \
769                target: "button.over."##id;                              \
770             }                                                           \
771             program {                                                   \
772                signal: "mouse,clicked,1";                               \
773                source: "button."##id;                                   \
774                action: SIGNAL_EMIT "clicked,"##id "call";               \
775             }                                                           \
776             program {                                                   \
777                signal: "disable,"##id;                                  \
778                source: "call";                                          \
779                action: STATE_SET "disabled" 0.0;                        \
780                target: "blocker."##id;                                  \
781                target: "clipper."##id;                                  \
782             }                                                           \
783             program {                                                   \
784                signal: "enable,"##id;                                   \
785                source: "call";                                          \
786                action: STATE_SET "default" 0.0;                         \
787                target: "blocker."##id;                                  \
788                target: "clipper."##id;                                  \
789             }                                                           \
790          }
791
792          ACTION_BUTTON("mute",    "mute",    0.000000000 0.0, 0.333333333 0.5);
793          ACTION_BUTTON("keypad",  "keypad",  0.333333333 0.0, 0.666666666 0.5);
794          ACTION_BUTTON("speaker", "speaker", 0.666666666 0.0, 1.000000000 0.5);
795
796          ACTION_BUTTON("merge",    "merge",  0.000000000 0.5, 0.333333333 1.0);
797          ACTION_BUTTON("swap",     "swap",   0.333333333 0.5, 0.666666666 1.0);
798          ACTION_BUTTON("contacts", "contacts",0.666666666 0.5, 1.000000000 1.0);
799 #undef ACTION_BUTTON
800
801          SEPARATOR("answer", "clipper.answer", 0.0, -8, "button.answer");
802          SEPARATOR("hangup", "", 0.0, -8, "button.hangup");
803
804          part {
805             name: "clipper.keypad-hidden";
806             type: RECT;
807             description {
808                state: "default" 0.0;
809                color: 255 255 255 255;
810                visible: 1;
811             }
812             description {
813                state: "alternate" 0.0;
814                inherit: "default" 0.0;
815                color: 255 255 255 0;
816                visible: 0;
817             }
818          }
819          part {
820             name: "clipper.keypad-visible";
821             type: RECT;
822             description {
823                state: "default" 0.0;
824                color: 255 255 255 0;
825                visible: 0;
826             }
827             description {
828                state: "alternate" 0.0;
829                inherit: "default" 0.0;
830                color: 255 255 255 255;
831                visible: 1;
832             }
833          }
834
835
836          /* keypad */
837          SEPARATOR("hide-keypad", "clipper.keypad-visible", 0.0, -8, "button.hide-keypad");
838          SEPARATOR("keypad", "clipper.keypad-visible", 0.0, -8, "bg.keypad");
839
840          part {
841             name: "bg.keypad";
842             type: RECT;
843             mouse_events: 0;
844             clip_to: "clipper.keypad-visible";
845             description {
846                state: "default" 0.0;
847                color: 0 0 0 0;
848                min: 720 680;
849                max: 720 680; /* keep it tight centered */
850                rel1 {
851                   relative: 0.0 0.0;
852                   offset: 0 -688; /* separator */
853                   to_y: "button.hide-keypad";
854                }
855                rel2 {
856                   relative: 1.0 0.0;
857                   offset: 0 -9; /* separator */
858                   to_y: "button.hide-keypad";
859                }
860             }
861          }
862 #define BUTTON(id, label, sub, ccls, r1, r2)                            \
863          part {                                                         \
864             name: "button."##id;                                        \
865             type: RECT;                                                 \
866             mouse_events: 1;                                            \
867             clip_to: "clipper.keypad-visible";                          \
868             description {                                               \
869                state: "default" 0.0;                                    \
870                color: 255 255 255 0;                                    \
871                color_class: "action";                                   \
872                rel1 {                                                   \
873                   to: "bg.keypad";                                      \
874                   relative: r1;                                         \
875                }                                                        \
876                rel2 {                                                   \
877                   to: "bg.keypad";                                      \
878                   relative: r2;                                         \
879                   offset: -2 -2;                                        \
880                }                                                        \
881             }                                                           \
882             description {                                               \
883                state: "pressed" 0.0;                                    \
884                inherit: "default" 0.0;                                  \
885                color: 255 255 255 255;                                  \
886             }                                                           \
887          }                                                              \
888          part {                                                         \
889             name: "label."##id;                                         \
890             type: TEXT;                                                 \
891             mouse_events: 0;                                            \
892             clip_to: "clipper.keypad-visible";                          \
893             description {                                               \
894                state: "default" 0.0;                                    \
895                color: 255 255 255 255;                                  \
896                color_class: ccls;                                       \
897                rel1.to: "button."##id;                                  \
898                rel2 {                                                   \
899                   to: "button."##id;                                    \
900                   relative: 1.0 0.8;                                    \
901                }                                                        \
902                text {                                                   \
903                   text: label;                                          \
904                   font: "Verdana";                                      \
905                   size: 99;                                             \
906                   align: 0.5 0.5;                                       \
907                }                                                        \
908             }                                                           \
909             description {                                               \
910                state: "pressed" 0.0;                                    \
911                inherit: "default" 0.0;                                  \
912                color: 16 16 16 255;                                     \
913             }                                                           \
914          }                                                              \
915          part {                                                         \
916             name: "sub."##id;                                           \
917             type: TEXT;                                                 \
918             mouse_events: 0;                                            \
919             clip_to: "clipper.keypad-visible";                          \
920             description {                                               \
921                state: "default" 0.0;                                    \
922                color: 255 255 255 255;                                  \
923                color_class: "light";                                    \
924                rel1 {                                                   \
925                   to: "button."##id;                                    \
926                   relative: 0.0 0.5;                                    \
927                   offset: 0 2;                                          \
928                }                                                        \
929                rel2.to: "button."##id;                                  \
930                text {                                                   \
931                   text: sub;                                            \
932                   font: "Verdana:style=Bold";                           \
933                   size: 16;                                             \
934                   align: 0.5 0.5;                                       \
935                }                                                        \
936             }                                                           \
937             description {                                               \
938                state: "pressed" 0.0;                                    \
939                inherit: "default" 0.0;                                  \
940                color: 16 16 16 255;                                     \
941             }                                                           \
942          }                                                              \
943          programs {                                                     \
944             program {                                                   \
945                signal: "mouse,up,1";                                    \
946                source: "button."##id;                                   \
947                action: SIGNAL_EMIT "released,"##id "call";              \
948                after: "show_up_"##id;                                   \
949             }                                                           \
950             program {                                                   \
951                name: "show_up_"##id;                                    \
952                action: STATE_SET "default" 0.0;                         \
953                transition: DECELERATE 0.1;                              \
954                target: "button."##id;                                   \
955                target: "label."##id;                                    \
956                target: "sub."##id;                                      \
957             }                                                           \
958             program {                                                   \
959                signal: "mouse,down,1";                                  \
960                source: "button."##id;                                   \
961                after: "show_down_"##id;                                 \
962                action: SIGNAL_EMIT "pressed,"##id "call";               \
963             }                                                           \
964             program {                                                   \
965                name: "show_down_"##id;                                  \
966                action: STATE_SET "pressed" 0.0;                         \
967                transition: ACCELERATE 0.3;                              \
968                target: "button."##id;                                   \
969                target: "label."##id;                                    \
970                target: "sub."##id;                                      \
971             }                                                           \
972             program {                                                   \
973                signal: "mouse,clicked,1";                               \
974                source: "button."##id;                                   \
975                action: SIGNAL_EMIT "clicked,"##id "call";               \
976             }                                                           \
977          }
978
979          BUTTON("1",    "1",     "", "action", 0.000 0.0, 0.333 0.25);
980          BUTTON("2",    "2",  "ABC", "action", 0.333 0.0, 0.666 0.25);
981          BUTTON("3",    "3",  "DEF", "action", 0.666 0.0, 1.000 0.25);
982
983          BUTTON("4",    "4",  "GHI", "action", 0.000 0.25, 0.333 0.50);
984          BUTTON("5",    "5",  "JKL", "action", 0.333 0.25, 0.666 0.50);
985          BUTTON("6",    "6",  "MNO", "action", 0.666 0.25, 1.000 0.50);
986
987          BUTTON("7",    "7", "PQRS", "action", 0.000 0.50, 0.333 0.75);
988          BUTTON("8",    "8",  "TUV", "action", 0.333 0.50, 0.666 0.75);
989          BUTTON("9",    "9", "WXYZ", "action", 0.666 0.50, 1.000 0.75);
990
991          BUTTON("star", "*",     "", "light",  0.000 0.75, 0.333 1.00);
992          BUTTON("0",    "0",    "+", "action", 0.333 0.75, 0.666 1.00);
993          BUTTON("hash", "#",     "", "light",  0.666 0.75, 1.000 1.00);
994 #undef BUTTON
995
996          part {
997             name: "area.hide-keypad";
998             type: RECT;
999             mouse_events: 0;
1000             clip_to: "clipper.keypad-visible";
1001             description {
1002                state: "default" 0.0;
1003                color: 0 0 0 0;
1004                visible: 0;
1005                rel1 {
1006                   to_y: "button.hangup";
1007                   relative: 0.0 -1.0;
1008                   offset: 0 688;
1009                }
1010                rel2 {
1011                   to_y: "button.hangup";
1012                   relative: 1.0 0.0;
1013                   offset: -1 687;
1014                }
1015             }
1016             description {
1017                state: "alternate" 0.0;
1018                inherit: "default" 0.0;
1019                visible: 1;
1020                rel1 {
1021                   to_y: "button.hangup";
1022                   relative: 0.0 -1.0;
1023                   offset: 0 -8; /* separator */
1024                }
1025                rel2 {
1026                   to_y: "button.hangup";
1027                   relative: 1.0 0.0;
1028                   offset: -1 -9; /* separator */
1029                }
1030             }
1031          }
1032          part {
1033             name: "button.hide-keypad";
1034             type: RECT;
1035             mouse_events: 1;
1036             clip_to: "clipper.keypad-visible";
1037             description {
1038                state: "default" 0.0;
1039                color: 255 255 255 0;
1040                color_class: "action";
1041                rel1.to_y: "area.hide-keypad";
1042                rel2.to_y: "area.hide-keypad";
1043             }
1044             description {
1045                state: "pressed" 0.0;
1046                inherit: "default" 0.0;
1047                color: 255 255 255 255;
1048             }
1049          }
1050          part {
1051             name: "label.hide-keypad";
1052             type: TEXT;
1053             mouse_events: 0;
1054             clip_to: "clipper.keypad-visible";
1055             description {
1056                state: "default" 0.0;
1057                color: 255 255 255 255;
1058                color_class: "action";
1059                rel1.to: "button.hide-keypad";
1060                rel2.to: "button.hide-keypad";
1061                text {
1062                   text: "Hide Keypad";
1063                   font: "Verdana";
1064                   size: 99;
1065                   align: 0.5 0.5;
1066                }
1067             }
1068             description {
1069                state: "pressed" 0.0;
1070                inherit: "default" 0.0;
1071                color_class: "bg";
1072             }
1073          }
1074          programs {
1075             program {
1076                signal: "mouse,up,1";
1077                source: "button.hide-keypad";
1078                action: STATE_SET "default" 0.0;
1079                transition: DECELERATE 0.1;
1080                target: "button.hide-keypad";
1081                target: "label.hide-keypad";
1082             }
1083             program {
1084                signal: "mouse,down,1";
1085                source: "button.hide-keypad";
1086                action: STATE_SET "pressed" 0.0;
1087                transition: ACCELERATE 0.3;
1088                target: "button.hide-keypad";
1089                target: "label.hide-keypad";
1090             }
1091
1092             program {
1093                name: "hide-keypad-phase1";
1094                signal: "mouse,clicked,1";
1095                source: "button.hide-keypad";
1096                action: STATE_SET "default" 0.0;
1097                transition: ACCELERATE 0.3;
1098                target: "clipper.keypad-visible";
1099                target: "area.hide-keypad";
1100                after: "hide-keypad-phase2";
1101             }
1102             program {
1103                name: "hide-keypad-phase2";
1104                action: STATE_SET "default" 0.0;
1105                transition: ACCELERATE 0.3;
1106                target: "clipper.keypad-hidden";
1107             }
1108
1109             program {
1110                name: "show-keypad-phase1";
1111                signal: "mouse,clicked,1";
1112                source: "button.keypad";
1113                action: STATE_SET "alternate" 0.0;
1114                transition: ACCELERATE 0.3;
1115                target: "clipper.keypad-hidden";
1116                after: "show-keypad-phase2";
1117             }
1118             program {
1119                name: "show-keypad-phase2";
1120                action: STATE_SET "alternate" 0.0;
1121                transition: ACCELERATE 0.3;
1122                target: "area.hide-keypad";
1123                target: "clipper.keypad-visible";
1124             }
1125          }
1126
1127          /* buttons */
1128          part {
1129             name: "bg.buttons";
1130             type: RECT;
1131             mouse_events: 0;
1132             clip_to: "clipper.keypad-hidden";
1133             description {
1134                state: "default" 0.0;
1135                color: 0 0 0 0;
1136                rel1.to: "area.answer";
1137                rel2.to: "button.hangup";
1138             }
1139          }
1140
1141          part {
1142             name: "clipper.answer";
1143             type: RECT;
1144             mouse_events: 0;
1145             clip_to: "clipper.keypad-hidden";
1146             description {
1147                state: "default" 0.0;
1148                color: 255 255 255 0;
1149                visible: 0;
1150             }
1151             description {
1152                state: "visible" 0.0;
1153                inherit: "default" 0.0;
1154                color: 255 255 255 255;
1155                visible: 1;
1156             }
1157          }
1158          part {
1159             name: "area.answer";
1160             type: RECT;
1161             mouse_events: 0;
1162             clip_to: "clipper.answer";
1163             description {
1164                state: "default" 0.0;
1165                color: 0 0 0 0;
1166                visible: 0;
1167                rel1.to_y: "button.hangup";
1168                rel2.to_y: "button.hangup";
1169             }
1170             description {
1171                state: "visible" 0.0;
1172                inherit: "default" 0.0;
1173                visible: 1;
1174                rel1 {
1175                   to_y: "button.hangup";
1176                   relative: 0.0 -1.0;
1177                   offset: 0 -8; /* separator */
1178                }
1179                rel2 {
1180                   to_y: "button.hangup";
1181                   relative: 1.0 0.0;
1182                   offset: -1 -9; /* separator */
1183                }
1184             }
1185          }
1186          part {
1187             name: "button.answer";
1188             type: RECT;
1189             mouse_events: 1;
1190             clip_to: "clipper.answer";
1191             description {
1192                state: "default" 0.0;
1193                color: 255 255 255 0;
1194                color_class: "action";
1195                rel1.to_y: "area.answer";
1196                rel2.to_y: "area.answer";
1197             }
1198             description {
1199                state: "pressed" 0.0;
1200                inherit: "default" 0.0;
1201                color: 255 255 255 255;
1202             }
1203          }
1204          part {
1205             name: "label.answer";
1206             type: TEXT;
1207             mouse_events: 0;
1208             clip_to: "clipper.answer";
1209             description {
1210                state: "default" 0.0;
1211                color: 255 255 255 255;
1212                color_class: "action";
1213                rel1.to: "button.answer";
1214                rel2.to: "button.answer";
1215                text {
1216                   text: "Answer";
1217                   font: "Verdana";
1218                   size: 99;
1219                   align: 0.5 0.5;
1220                }
1221             }
1222             description {
1223                state: "pressed" 0.0;
1224                inherit: "default" 0.0;
1225                color_class: "bg";
1226             }
1227          }
1228          programs {
1229             program {
1230                signal: "mouse,up,1";
1231                source: "button.answer";
1232                action: SIGNAL_EMIT "released,answer" "call";
1233                after: "show_up_answer";
1234             }
1235             program {
1236                name: "show_up_answer";
1237                action: STATE_SET "default" 0.0;
1238                transition: DECELERATE 0.1;
1239                target: "button.answer";
1240                target: "label.answer";
1241             }
1242             program {
1243                signal: "mouse,down,1";
1244                source: "button.answer";
1245                after: "show_down_answer";
1246                action: SIGNAL_EMIT "pressed,answer" "call";
1247             }
1248             program {
1249                name: "show_down_answer";
1250                action: STATE_SET "pressed" 0.0;
1251                transition: ACCELERATE 0.3;
1252                target: "button.answer";
1253                target: "label.answer";
1254             }
1255             program {
1256                signal: "mouse,clicked,1";
1257                source: "button.answer";
1258                action: SIGNAL_EMIT "clicked,answer" "call";
1259             }
1260
1261             program {
1262                signal: "show,answer";
1263                source: "call";
1264                action: STATE_SET "visible" 0.0;
1265                target: "area.answer";
1266                target: "clipper.answer";
1267             }
1268             program {
1269                signal: "hide,answer";
1270                source: "call";
1271                action: STATE_SET "default" 0.0;
1272                target: "area.answer";
1273                target: "clipper.answer";
1274             }
1275          }
1276
1277          part {
1278             name: "button.hangup";
1279             type: RECT;
1280             mouse_events: 1;
1281             description {
1282                state: "default" 0.0;
1283                color: 255 255 255 255;
1284                color_class: "bg";
1285                rel1 {
1286                   relative: 0.0 1.0;
1287                   offset: 0 -170;
1288                }
1289                rel2 {
1290                   relative: 1 1.0;
1291                   offset: -1 -1;
1292                }
1293             }
1294             description {
1295                state: "pressed" 0.0;
1296                inherit: "default" 0.0;
1297                color_class: "caution";
1298             }
1299          }
1300          part {
1301             name: "label.hangup";
1302             type: TEXT;
1303             mouse_events: 0;
1304             description {
1305                state: "default" 0.0;
1306                color: 255 255 255 255;
1307                color_class: "caution";
1308                rel1.to: "button.hangup";
1309                rel2.to: "button.hangup";
1310                text {
1311                   text: "Hangup";
1312                   font: "Verdana";
1313                   size: 99;
1314                   align: 0.5 0.5;
1315                }
1316             }
1317             description {
1318                state: "pressed" 0.0;
1319                inherit: "default" 0.0;
1320                color_class: "bg";
1321             }
1322          }
1323          programs {
1324             program {
1325                signal: "mouse,up,1";
1326                source: "button.hangup";
1327                action: SIGNAL_EMIT "released,hangup" "call";
1328                after: "show_up_hangup";
1329             }
1330             program {
1331                name: "show_up_hangup";
1332                action: STATE_SET "default" 0.0;
1333                transition: DECELERATE 0.1;
1334                target: "button.hangup";
1335                target: "label.hangup";
1336             }
1337             program {
1338                signal: "mouse,down,1";
1339                source: "button.hangup";
1340                after: "show_down_hangup";
1341                action: SIGNAL_EMIT "pressed,hangup" "call";
1342             }
1343             program {
1344                name: "show_down_hangup";
1345                action: STATE_SET "pressed" 0.0;
1346                transition: ACCELERATE 0.3;
1347                target: "button.hangup";
1348                target: "label.hangup";
1349             }
1350             program {
1351                signal: "mouse,clicked,1";
1352                source: "button.hangup";
1353                action: SIGNAL_EMIT "clicked,hangup" "call";
1354             }
1355          }
1356 #undef SEPARATOR
1357       }
1358
1359    }
1360 }