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