theme: change 'on hold' to 'On Hold'
[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     *   TEXT: elm.text.waiting
12     *   TEXT: elm.text.held
13     *   SWALLOW: elm.swallow.multiparty-details
14     *
15     * Signals:
16     *   Emit (source is "call"):
17     *     pressed,<ID>:  key <ID> was pressed
18     *     released,<ID>: key <ID> was released
19     *     clicked,<ID>:  key <ID> was clicked (press and release in the key)
20     *   Listen (source is "call"):
21     *     show,answer:     show "answer" action
22     *     hide,answer:     hide "answer" action
23     *     show,waiting:    show call waiting popup (decline, hold+answer...)
24     *     hide,waiting:    hide call waiting popup
25     *     show,held:       show call held entry
26     *     hide,held:       hide call held entry
27     *     show,elapsed:    have elapsed (elm.text.elapsed) and should be visible
28     *     hide,elapsed:    don't have elapsed and it should be hidden
29     *     show,multiparty: active call is multiparty
30     *     hide,multiparty: active call is not multiparty
31     *     show,held,multiparty: held call is multiparty
32     *     hide,held,multiparty: held call is not multiparty
33     *     state,<STATE>:   state changed to <STATE>
34     *     disable,<ID>:    disable action <ID>
35     *     enable,<ID>:     enable action <ID>
36     *     toggle,on,<ID>:  mark toggle action <ID> as selected
37     *     toggle,off,<ID>: mark toggle action <ID> as unselected
38     *     show,multiparty-details: ask the multiparty details to be visible
39     *     hide,multiparty-details: ask the multiparty details to be hidden
40     *
41     * Messages:
42     *     1 - FLOAT: speaker volume 0.0-1.0
43     *     2 - FLOAT: microphone volume 0.0-1.0
44     *     3 - FLOAT: elapsed time in seconds (> 0.0)
45     *
46     * Where <ID> is: numbers 0 to 9, star, hash, mute, keypad,
47     * speaker, add-call, merge, swap, contacts, answer, hangup,
48     * waiting-hangup, hold-answer, hangup-answer, multiparty,
49     * held-multiparty, multiparty-details
50     *
51     * Where <STATE> is: disconnected, active, held, dialing, alerting,
52     * incoming, waiting.
53     */
54
55    min: WIDTH HEIGHT;
56
57    images {
58       image: "bg_call.jpg" COMP;
59       image: "bt_mute_pressed.png" COMP;
60       image: "bt_mute_released.png" COMP;
61       image: "bt_keypad_pressed.png" COMP;
62       image: "bt_keypad_released.png" COMP;
63       image: "bt_speaker_pressed.png" COMP;
64       image: "bt_speaker_released.png" COMP;
65       image: "bt_add_call_pressed.png" COMP;
66       image: "bt_add_call_released.png" COMP;
67       image: "bt_merge_pressed.png" COMP;
68       image: "bt_merge_released.png" COMP;
69       image: "bt_swap_pressed.png" COMP;
70       image: "bt_swap_released.png" COMP;
71       image: "bt_contacts_pressed.png" COMP;
72       image: "bt_contacts_released.png" COMP;
73       image: "bt_multiparty_pressed.png" COMP;
74       image: "bt_multiparty_released.png" COMP;
75    }
76
77    parts {
78       part {
79          name: "bg";
80          type: IMAGE;
81          mouse_events: 0;
82          description {
83             state: "default" 0.0;
84             color: 255 255 255 255;
85             color_class: "dark";
86             min: WIDTH HEIGHT;
87             image {
88                normal: "bg_call.jpg";
89                scale_hint: STATIC;
90             }
91             fill.smooth: 1;
92          }
93       }
94
95       part {
96          name: "clipper.multiparty";
97          type: RECT;
98          clip_to: "clipper.multiparty-details-hidden";
99          description {
100             state: "default" 0.0;
101             color: 255 255 255 0;
102             visible: 0;
103          }
104          description {
105             state: "multiparty" 0.0;
106             inherit: "default" 0.0;
107             color: 255 255 255 255;
108             visible: 1;
109          }
110       }
111       part {
112          name: "button.multiparty";
113          type: IMAGE;
114          mouse_events: 1;
115          clip_to: "clipper.multiparty";
116          description {
117             state: "default" 0.0;
118             color: 255 255 255 255;
119             color_class: "action";
120             min: 80 80;
121             max: 80 80;
122             rel1 {
123                relative: 1.0 0.0;
124                offset: -80 (BORDER_PADDING - 1);
125             }
126             rel2 {
127                relative: 1.0 0.0;
128                offset: -1 141;
129             }
130             image.normal: "bt_multiparty_released.png";
131          }
132          description {
133             state: "pressed" 0.0;
134             inherit: "default" 0.0;
135             color_class: "light";
136          }
137       }
138       programs {
139          program {
140             signal: "mouse,up,1";
141             source: "button.multiparty";
142             action: SIGNAL_EMIT "released,multiparty" "call";
143             after: "show_up_multiparty";
144             api: "multiparty_released" "multiparty was released";
145          }
146          program {
147             name: "show_up_multiparty";
148             action: STATE_SET "default" 0.0;
149             transition: DECELERATE 0.1;
150             target: "button.multiparty";
151          }
152          program {
153             signal: "mouse,down,1";
154             source: "button.multiparty";
155             after: "show_down_multiparty";
156             action: SIGNAL_EMIT "pressed,multiparty" "call";
157             api: "multiparty_pressed" "multiparty was pressed";
158          }
159          program {
160             name: "show_down_multiparty";
161             action: STATE_SET "pressed" 0.0;
162             transition: ACCELERATE 0.1;
163             target: "button.multiparty";
164          }
165          program {
166             signal: "mouse,clicked,1";
167             source: "button.multiparty";
168             action: SIGNAL_EMIT "clicked,multiparty" "call";
169             api: "multiparty_clicked" "multiparty was clicked";
170          }
171
172          program {
173             signal: "show,multiparty";
174             source: "call";
175             action: STATE_SET "multiparty" 0.0;
176             target: "clipper.multiparty";
177             target: "elm.text.name";
178             api: "multiparty_show" "make multiparty visible";
179          }
180          program {
181             signal: "hide,multiparty";
182             source: "call";
183             action: STATE_SET "default" 0.0;
184             target: "clipper.multiparty";
185             target: "elm.text.name";
186             api: "multiparty_hide" "make multiparty hidden";
187          }
188       }
189
190       part {
191          name: "elm.text.name";
192          type: TEXT;
193          mouse_events: 0;
194          scale: 1;
195          clip_to: "clipper.multiparty-details-hidden";
196          api: "name" "remote party call name";
197          description {
198             state: "default" 0.0;
199             color: 255 255 255 255;
200             color_class: "action";
201             align: 0.0 0.5;
202             rel1.offset: BORDER_PADDING 0;
203             rel2 {
204                relative: 1.0 0.0;
205                offset: (-BORDER_PADDING - 1) (ACTION_HEIGHT - 1);
206             }
207             text {
208                text: "Gustavo Barbieri";
209                font: FONT_NORMAL;
210                size: SIZE_HUGE;
211                size_range: SIZE_TINY SIZE_HUGE;
212                fit: 1 1;
213                align: 0.0 0.5;
214                ellipsis: 0.0;
215             }
216          }
217          description {
218             state: "multiparty" 0.0;
219             inherit: "default" 0.0;
220             rel2.offset: (-80 - ITEM_PADDING) (ACTION_HEIGHT - 1);
221          }
222       }
223
224       part {
225          name: "elm.text.status";
226          type: TEXT;
227          mouse_events: 0;
228          scale: 1;
229          clip_to: "clipper.multiparty-details-hidden";
230          api: "status" "call status";
231          description {
232             state: "default" 0.0;
233             color: 255 255 255 255;
234             color_class: "light";
235             fixed: 1 1;
236             align: 0.0 0.0;
237             rel1 {
238                to: "elm.text.name";
239                relative: 0.0 1.0;
240                offset: 0 -20;
241             }
242             rel2 {
243                to: "elm.text.name";
244                relative: 0.0 1.0;
245                offset: 0 -1;
246             }
247             text {
248                text: "calling...";
249                font: FONT_NORMAL;
250                size: SIZE_MEDIUM;
251                min: 1 1;
252                align: 0.0 0.0;
253             }
254          }
255       }
256
257       part {
258          name: "elm.text.elapsed";
259          type: TEXT;
260          mouse_events: 0;
261          scale: 1;
262          clip_to: "clipper.multiparty-details-hidden";
263          api: "elapsed" "call elapsed time (formatted)";
264          description {
265             state: "default" 0.0;
266             color: 255 255 255 255;
267             color_class: "light";
268             fixed: 1 1;
269             align: 0.0 0.0;
270             rel1 {
271                to: "elm.text.status";
272                relative: 1.0 0.0;
273                offset: ITEM_PADDING 0;
274             }
275             rel2 {
276                to: "elm.text.status";
277                relative: 1.0 1.0;
278                offset: ITEM_PADDING -1;
279             }
280             text {
281                text: "01:23";
282                font: FONT_NORMAL;
283                size: SIZE_MEDIUM;
284                min: 1 1;
285                align: 0.0 0.0;
286             }
287          }
288       }
289
290 #define SEPARATOR(id, clip, rely, offy, relto)                          \
291       part {                                                            \
292          name: "separator.dark."##id;                                   \
293          type: RECT;                                                    \
294          mouse_events: 0;                                               \
295          clip_to: clip;                                                 \
296          description {                                                  \
297             state: "default" 0.0;                                       \
298             color: 255 255 255 255;                                     \
299             color_class: "dark";                                        \
300             rel1 {                                                      \
301                relative: 0.0 rely;                                      \
302                offset: 0 offy;                                          \
303                to_y: relto;                                             \
304             }                                                           \
305             rel2 {                                                      \
306                relative: 1.0 rely;                                      \
307                offset: -1 (offy + SEPARATOR_HEIGHT / 2);                \
308                to_y: relto;                                             \
309             }                                                           \
310          }                                                              \
311       }                                                                 \
312       part {                                                            \
313          name: "separator.bg."##id;                                     \
314          type: RECT;                                                    \
315          mouse_events: 0;                                               \
316          clip_to: clip;                                                 \
317          description {                                                  \
318             state: "default" 0.0;                                       \
319             color: 255 255 255 255;                                     \
320             color_class: "bg";                                          \
321             rel1 {                                                      \
322                relative: 0.0 rely;                                      \
323                offset: 0 (offy + SEPARATOR_HEIGHT / 2);                 \
324                to_y: relto;                                             \
325             }                                                           \
326             rel2 {                                                      \
327                relative: 1.0 rely;                                      \
328                offset: -1 (offy + SEPARATOR_HEIGHT);                    \
329                to_y: relto;                                             \
330             }                                                           \
331          }                                                              \
332       }
333
334       part {
335          name: "clipper.held";
336          type: RECT;
337          clip_to: "clipper.keypad-hidden";
338          description {
339             state: "default" 0.0;
340             color: 255 255 255 0;
341             visible: 0;
342          }
343          description {
344             state: "visible" 0.0;
345             inherit: "default" 0.0;
346             color: 255 255 255 255;
347             visible: 1;
348          }
349       }
350
351       part {
352          name: "clipper.held.multiparty";
353          type: RECT;
354          clip_to: "clipper.held";
355          description {
356             state: "default" 0.0;
357             color: 255 255 255 0;
358             visible: 0;
359          }
360          description {
361             state: "multiparty" 0.0;
362             inherit: "default" 0.0;
363             color: 255 255 255 255;
364             visible: 1;
365          }
366       }
367       part {
368          name: "button.held.multiparty";
369          type: IMAGE;
370          mouse_events: 1;
371          clip_to: "clipper.held.multiparty";
372          description {
373             state: "default" 0.0;
374             color: 255 255 255 255;
375             color_class: "action";
376             min: 80 80;
377             max: 80 80;
378             rel1 {
379                to_y: "elm.text.status";
380                relative: 1.0 1.0;
381                offset: -80 65;
382             }
383             rel2 {
384                to_y: "elm.text.status";
385                relative: 1.0 1.0;
386                offset: -1 161;
387             }
388             image.normal: "bt_multiparty_released.png";
389          }
390          description {
391             state: "pressed" 0.0;
392             inherit: "default" 0.0;
393             color_class: "light";
394          }
395       }
396       programs {
397          program {
398             signal: "mouse,up,1";
399             source: "button.held.multiparty";
400             action: SIGNAL_EMIT "released,held-multiparty" "call";
401             after: "show_up_held_multiparty";
402             api: "held_multiparty_released" "held multiparty was released";
403          }
404          program {
405             name: "show_up_held_multiparty";
406             action: STATE_SET "default" 0.0;
407             transition: DECELERATE 0.1;
408             target: "button.held.multiparty";
409          }
410          program {
411             signal: "mouse,down,1";
412             source: "button.held.multiparty";
413             after: "show_down_held_multiparty";
414             action: SIGNAL_EMIT "pressed,held-multiparty" "call";
415             api: "held_multiparty_pressed" "held multiparty was pressed";
416          }
417          program {
418             name: "show_down_held_multiparty";
419             action: STATE_SET "pressed" 0.0;
420             transition: ACCELERATE 0.1;
421             target: "button.held.multiparty";
422          }
423          program {
424             signal: "mouse,clicked,1";
425             source: "button.held.multiparty";
426             action: SIGNAL_EMIT "clicked,held-multiparty" "call";
427             api: "held_multiparty_clicked" "held multiparty was clicked";
428          }
429
430          program {
431             signal: "show,held,multiparty";
432             source: "call";
433             action: STATE_SET "multiparty" 0.0;
434             target: "clipper.held.multiparty";
435             target: "elm.text.held";
436             api: "held_multiparty_show" "make held multiparty visible";
437          }
438          program {
439             signal: "hide,held,multiparty";
440             source: "call";
441             action: STATE_SET "default" 0.0;
442             target: "clipper.held.multiparty";
443             target: "elm.text.held";
444             api: "held_multiparty_hide" "make held multiparty hidden";
445          }
446       }
447
448       part {
449          name: "elm.text.held";
450          type: TEXT;
451          mouse_events: 0;
452          scale: 1;
453          api: "held" "held party call name";
454          clip_to: "clipper.held";
455          description {
456             state: "default" 0.0;
457             color: 255 255 255 255;
458             color_class: "action";
459             align: 0.0 0.5;
460             rel1 {
461                to_y: "elm.text.status";
462                to_x: "elm.text.name";
463                relative: 0.0 1.0;
464                offset: 0 30;
465             }
466             rel2 {
467                to_y: "elm.text.status";
468                relative: 1.0 1.0;
469                offset: (-BORDER_PADDING -1) (ACTION_HEIGHT + 30 - 1);
470             }
471             text {
472                text: "Someone on hold";
473                font: FONT_NORMAL;
474                size: SIZE_HUGE;
475                size_range: SIZE_TINY SIZE_HUGE;
476                fit: 1 1;
477                align: 0.0 0.5;
478                ellipsis: 0.0;
479             }
480          }
481          description {
482             state: "multiparty" 0.0;
483             inherit: "default" 0.0;
484             rel2.offset: (-80 - ITEM_PADDING) (ACTION_HEIGHT - 1);
485          }
486       }
487       part {
488          name: "label.held";
489          type: TEXT;
490          mouse_events: 0;
491          scale: 1;
492          clip_to: "clipper.held";
493          description {
494             state: "default" 0.0;
495             color: 255 255 255 255;
496             color_class: "light";
497             fixed: 1 1;
498             align: 0.0 0.0;
499             rel1 {
500                to: "elm.text.held";
501                relative: 0.0 1.0;
502                offset: -1.0 -20;
503             }
504             rel2 {
505                to: "elm.text.held";
506                relative: 0.0 1.0;
507                offset: -1.0 -1;
508             }
509             text {
510                text: "On Hold";
511                font: FONT_NORMAL;
512                size: SIZE_MEDIUM;
513                min: 1 1;
514                align: 0.0 0.0;
515             }
516          }
517       }
518
519       SEPARATOR("held1", "clipper.held", 0.0, -SEPARATOR_HEIGHT, "elm.text.held");
520
521       programs {
522          program {
523             signal: "show,held";
524             source: "call";
525             action: STATE_SET "visible" 0.0;
526             transition: DECELERATE 0.3;
527             target: "clipper.held";
528             api: "held_show" "make held entry visible";
529          }
530          program {
531             signal: "hide,held";
532             source: "call";
533             action: STATE_SET "default" 0.0;
534             transition: ACCELERATE 0.3;
535             target: "clipper.held";
536             api: "held_hide" "make held entry hidden";
537          }
538       }
539
540
541       SEPARATOR("actions", "clipper.actions", 0.0, -SEPARATOR_HEIGHT, "bg.actions");
542
543       part {
544          name: "bg.actions";
545          type: RECT;
546          mouse_events: 0;
547          clip_to: "clipper.keypad-hidden";
548          description {
549             state: "default" 0.0;
550             color: 0 0 0 0;
551             min: WIDTH (ACTION_HEIGHT * 2);
552             max: WIDTH 99999; /* keep it tight centered */
553             fixed: 1 1;
554             rel1 {
555                to: "bg.buttons";
556                relative: 0.0 0.0;
557                offset: 0 (-ACTION_HEIGHT * 2 - SEPARATOR_HEIGHT);
558             }
559             rel2 {
560                to: "bg.buttons";
561                relative: 1.0 0.0;
562                offset: -1 -SEPARATOR_HEIGHT;
563             }
564          }
565       }
566       part {
567          name: "clipper.actions";
568          type: RECT;
569          mouse_events: 0;
570          clip_to: "clipper.keypad-hidden";
571          description {
572             state: "default" 0.0;
573             color: 255 255 255 0;
574             visible: 0;
575          }
576          description {
577             state: "visible" 0.0;
578             inherit: "default" 0.0;
579             color: 255 255 255 255;
580             visible: 1;
581          }
582       }
583       programs {
584          program {
585             name: "show,actions";
586             action: STATE_SET "visible" 0.0;
587             transition: DECELERATE 0.3;
588             target: "clipper.actions";
589          }
590          program {
591             name: "hide,actions";
592             action: STATE_SET "default" 0.0;
593             transition: ACCELERATE 0.3;
594             target: "clipper.actions";
595          }
596
597          program {
598             signal: "state,disconnected";
599             source: "call";
600             after: "hide,actions";
601          }
602          program {
603             signal: "state,active";
604             source: "call";
605             after: "show,actions";
606          }
607          program {
608             signal: "state,held";
609             source: "call";
610             after: "show,actions";
611          }
612          program {
613             signal: "state,dialing";
614             source: "call";
615             after: "hide,actions";
616          }
617          program {
618             signal: "state,alerting";
619             source: "call";
620             after: "hide,actions";
621          }
622          program {
623             signal: "state,incoming";
624             source: "call";
625             after: "hide,actions";
626          }
627       }
628
629 #define ACTION_BUTTON(id, img, r1, r2)                                  \
630       part {                                                            \
631          name: "clipper."##id;                                          \
632          type: RECT;                                                    \
633          clip_to: "clipper.actions";                                    \
634          description {                                                  \
635             state: "default" 0.0;                                       \
636             color: 255 255 255 255;                                     \
637             rel1.to: "button."##id;                                     \
638             rel2.to: "button."##id;                                     \
639          }                                                              \
640          description {                                                  \
641             state: "disabled" 0.0;                                      \
642             inherit: "default" 0.0;                                     \
643             color_class: "disabled";                                    \
644          }                                                              \
645          description {                                                  \
646             state: "hidden" 0.0;                                        \
647             inherit: "default" 0.0;                                     \
648             color: 255 255 255 0;                                       \
649             visible: 0;                                                 \
650          }                                                              \
651       }                                                                 \
652       part {                                                            \
653          name: "button."##id;                                           \
654          type: IMAGE;                                                   \
655          mouse_events: 1;                                               \
656          clip_to: "clipper."##id;                                       \
657          description {                                                  \
658             state: "default" 0.0;                                       \
659             color: 255 255 255 255;                                     \
660             color_class: "action";                                      \
661             min: ACTION_WIDTH ACTION_HEIGHT;                            \
662             max: ACTION_WIDTH ACTION_HEIGHT;                            \
663             fixed: 1 1;                                                 \
664             rel1 {                                                      \
665                to: "bg.actions";                                        \
666                relative: r1;                                            \
667             }                                                           \
668             rel2 {                                                      \
669                to: "bg.actions";                                        \
670                relative: r2;                                            \
671                offset: -1 -1;                                           \
672             }                                                           \
673             image.normal: "bt_"##img"_released.png";                    \
674          }                                                              \
675          description {                                                  \
676             state: "pressed" 0.0;                                       \
677             inherit: "default" 0.0;                                     \
678             color: 255 255 255 0;                                       \
679             visible: 0;                                                 \
680          }                                                              \
681       }                                                                 \
682       part {                                                            \
683          name: "button.over."##id;                                      \
684          type: IMAGE;                                                   \
685          clip_to: "clipper."##id;                                       \
686          mouse_events: 0;                                               \
687          description {                                                  \
688             state: "default" 0.0;                                       \
689             color: 255 255 255 0;                                       \
690             visible: 0;                                                 \
691             color_class: "action";                                      \
692             rel1.to: "button."##id;                                     \
693             rel2.to: "button."##id;                                     \
694             image.normal: "bt_"##img"_pressed.png";                     \
695          }                                                              \
696          description {                                                  \
697             state: "pressed" 0.0;                                       \
698             inherit: "default" 0.0;                                     \
699             color: 255 255 255 255;                                     \
700             visible: 1;                                                 \
701          }                                                              \
702       }                                                                 \
703       part {                                                            \
704          name: "blocker."##id;                                          \
705          type: RECT;                                                    \
706          mouse_events: 1;                                               \
707          clip_to: "clipper."##id;                                       \
708          description {                                                  \
709             state: "default" 0.0;                                       \
710             color: 0 0 0 0;                                             \
711             visible: 0;                                                 \
712             rel1.to: "button."##id;                                     \
713             rel2.to: "button."##id;                                     \
714          }                                                              \
715          description {                                                  \
716             state: "disabled" 0.0;                                      \
717             inherit: "default" 0.0;                                     \
718             visible: 1;                                                 \
719          }                                                              \
720       }                                                                 \
721       programs {                                                        \
722          program {                                                      \
723             signal: "mouse,up,1";                                       \
724             source: "button."##id;                                      \
725             action: SIGNAL_EMIT "released,"##id "call";                 \
726             after: "show_up_"##id;                                      \
727             api: id"_released" id" was released";                       \
728          }                                                              \
729          program {                                                      \
730             name: "show_up_"##id;                                       \
731             action: STATE_SET "default" 0.0;                            \
732             transition: DECELERATE 0.1;                                 \
733             target: "button."##id;                                      \
734             target: "button.over."##id;                                 \
735          }                                                              \
736          program {                                                      \
737             signal: "mouse,down,1";                                     \
738             source: "button."##id;                                      \
739             after: "show_down_"##id;                                    \
740             action: SIGNAL_EMIT "pressed,"##id "call";                  \
741             api: id"_pressed" id" was pressed";                         \
742          }                                                              \
743          program {                                                      \
744             name: "show_down_"##id;                                     \
745             action: STATE_SET "pressed" 0.0;                            \
746             transition: ACCELERATE 0.1;                                 \
747             target: "button."##id;                                      \
748             target: "button.over."##id;                                 \
749          }                                                              \
750          program {                                                      \
751             signal: "mouse,clicked,1";                                  \
752             source: "button."##id;                                      \
753             action: SIGNAL_EMIT "clicked,"##id "call";                  \
754             api: id"_clicked" id" was clicked";                         \
755          }                                                              \
756          program {                                                      \
757             signal: "disable,"##id;                                     \
758             source: "call";                                             \
759             action: STATE_SET "disabled" 0.0;                           \
760             target: "blocker."##id;                                     \
761             target: "clipper."##id;                                     \
762             api: id"_disable" "disable "##id;                           \
763          }                                                              \
764          program {                                                      \
765             signal: "enable,"##id;                                      \
766             source: "call";                                             \
767             action: STATE_SET "default" 0.0;                            \
768             target: "blocker."##id;                                     \
769             target: "clipper."##id;                                     \
770             api: id"_enable" "enable "##id;                             \
771          }                                                              \
772       }
773
774 #define ACTION_HIDEABLE(id, img, r1, r2)                                \
775       part {                                                            \
776          name: "clipper."##id;                                          \
777          type: RECT;                                                    \
778          clip_to: "clipper.actions";                                    \
779          description {                                                  \
780             state: "default" 0.0;                                       \
781             color: 255 255 255 255;                                     \
782             rel1.to: "button."##id;                                     \
783             rel2.to: "button."##id;                                     \
784          }                                                              \
785          description {                                                  \
786             state: "hidden" 0.0;                                        \
787             inherit: "default" 0.0;                                     \
788             color: 255 255 255 0;                                       \
789             visible: 0;                                                 \
790          }                                                              \
791       }                                                                 \
792       part {                                                            \
793          name: "button."##id;                                           \
794          type: IMAGE;                                                   \
795          mouse_events: 1;                                               \
796          clip_to: "clipper."##id;                                       \
797          description {                                                  \
798             state: "default" 0.0;                                       \
799             color: 255 255 255 255;                                     \
800             color_class: "action";                                      \
801             min: ACTION_WIDTH ACTION_HEIGHT;                            \
802             max: ACTION_WIDTH ACTION_HEIGHT;                            \
803             fixed: 1 1;                                                 \
804             rel1 {                                                      \
805                to: "bg.actions";                                        \
806                relative: r1;                                            \
807             }                                                           \
808             rel2 {                                                      \
809                to: "bg.actions";                                        \
810                relative: r2;                                            \
811                offset: -1 -1;                                           \
812             }                                                           \
813             image.normal: "bt_"##img"_released.png";                    \
814          }                                                              \
815          description {                                                  \
816             state: "pressed" 0.0;                                       \
817             inherit: "default" 0.0;                                     \
818             color: 255 255 255 0;                                       \
819             visible: 0;                                                 \
820          }                                                              \
821       }                                                                 \
822       part {                                                            \
823          name: "button.over."##id;                                      \
824          type: IMAGE;                                                   \
825          clip_to: "clipper."##id;                                       \
826          mouse_events: 0;                                               \
827          description {                                                  \
828             state: "default" 0.0;                                       \
829             color: 255 255 255 0;                                       \
830             visible: 0;                                                 \
831             color_class: "action";                                      \
832             rel1.to: "button."##id;                                     \
833             rel2.to: "button."##id;                                     \
834             image.normal: "bt_"##img"_pressed.png";                     \
835          }                                                              \
836          description {                                                  \
837             state: "pressed" 0.0;                                       \
838             inherit: "default" 0.0;                                     \
839             color: 255 255 255 255;                                     \
840             visible: 1;                                                 \
841          }                                                              \
842       }                                                                 \
843       programs {                                                        \
844          program {                                                      \
845             signal: "mouse,up,1";                                       \
846             source: "button."##id;                                      \
847             action: SIGNAL_EMIT "released,"##id "call";                 \
848             after: "show_up_"##id;                                      \
849             api: id"_released" id" was released";                       \
850          }                                                              \
851          program {                                                      \
852             name: "show_up_"##id;                                       \
853             action: STATE_SET "default" 0.0;                            \
854             transition: DECELERATE 0.1;                                 \
855             target: "button."##id;                                      \
856             target: "button.over."##id;                                 \
857          }                                                              \
858          program {                                                      \
859             signal: "mouse,down,1";                                     \
860             source: "button."##id;                                      \
861             after: "show_down_"##id;                                    \
862             action: SIGNAL_EMIT "pressed,"##id "call";                  \
863             api: id"_pressed" id" was pressed";                         \
864          }                                                              \
865          program {                                                      \
866             name: "show_down_"##id;                                     \
867             action: STATE_SET "pressed" 0.0;                            \
868             transition: ACCELERATE 0.1;                                 \
869             target: "button."##id;                                      \
870             target: "button.over."##id;                                 \
871          }                                                              \
872          program {                                                      \
873             signal: "mouse,clicked,1";                                  \
874             source: "button."##id;                                      \
875             action: SIGNAL_EMIT "clicked,"##id "call";                  \
876             api: id"_clicked" id" was clicked";                         \
877          }                                                              \
878          program {                                                      \
879             name: "hide_"##id;                                          \
880             signal: "hide,"##id;                                        \
881             source: "call";                                             \
882             action: STATE_SET "hidden" 0.0;                             \
883             target: "clipper."##id;                                     \
884             api: id"_hide" "hide "##id;                                 \
885          }                                                              \
886          program {                                                      \
887             name: "show_"##id;                                          \
888             signal: "show,"##id;                                        \
889             source: "call";                                             \
890             action: STATE_SET "default" 0.0;                            \
891             target: "clipper."##id;                                     \
892             api: id"_show" "show "##id;                                 \
893          }                                                              \
894       }
895
896 #define ACTION_TOGGLE(id, img, r1, r2)                                  \
897       part {                                                            \
898          name: "clipper."##id;                                          \
899          type: RECT;                                                    \
900          clip_to: "clipper.actions";                                    \
901          description {                                                  \
902             state: "default" 0.0;                                       \
903             color: 255 255 255 255;                                     \
904             rel1.to: "button."##id;                                     \
905             rel2.to: "button."##id;                                     \
906          }                                                              \
907          description {                                                  \
908             state: "disabled" 0.0;                                      \
909             inherit: "default" 0.0;                                     \
910             color_class: "disabled";                                    \
911          }                                                              \
912          description {                                                  \
913             state: "hidden" 0.0;                                        \
914             inherit: "default" 0.0;                                     \
915             color: 255 255 255 0;                                       \
916             visible: 0;                                                 \
917          }                                                              \
918       }                                                                 \
919       part {                                                            \
920          name: "button."##id;                                           \
921          type: IMAGE;                                                   \
922          mouse_events: 1;                                               \
923          clip_to: "clipper.toggle."##id;                                \
924          description {                                                  \
925             state: "default" 0.0;                                       \
926             color: 255 255 255 255;                                     \
927             color_class: "action";                                      \
928             min: ACTION_WIDTH ACTION_HEIGHT;                            \
929             max: ACTION_WIDTH ACTION_HEIGHT;                            \
930             fixed: 1 1;                                                 \
931             rel1 {                                                      \
932                to: "bg.actions";                                        \
933                relative: r1;                                            \
934             }                                                           \
935             rel2 {                                                      \
936                to: "bg.actions";                                        \
937                relative: r2;                                            \
938                offset: -1 -1;                                           \
939             }                                                           \
940             image.normal: "bt_"##img"_released.png";                    \
941          }                                                              \
942          description {                                                  \
943             state: "pressed" 0.0;                                       \
944             inherit: "default" 0.0;                                     \
945             color: 255 255 255 0;                                       \
946             visible: 0;                                                 \
947          }                                                              \
948       }                                                                 \
949       part {                                                            \
950          name: "button.over."##id;                                      \
951          type: IMAGE;                                                   \
952          clip_to: "clipper."##id;                                       \
953          description {                                                  \
954             state: "default" 0.0;                                       \
955             color: 255 255 255 0;                                       \
956             visible: 0;                                                 \
957             color_class: "action";                                      \
958             rel1.to: "button."##id;                                     \
959             rel2.to: "button."##id;                                     \
960             image.normal: "bt_"##img"_pressed.png";                     \
961          }                                                              \
962          description {                                                  \
963             state: "pressed" 0.0;                                       \
964             inherit: "default" 0.0;                                     \
965             color: 255 255 255 255;                                     \
966             visible: 1;                                                 \
967          }                                                              \
968       }                                                                 \
969       part {                                                            \
970          name: "clipper.toggle."##id;                                   \
971          type: RECT;                                                    \
972          clip_to: "clipper."##id;                                       \
973          mouse_events: 0;                                               \
974          description {                                                  \
975             state: "default" 0.0;                                       \
976             color: 255 255 255 255;                                     \
977             visible: 1;                                                 \
978          }                                                              \
979          description {                                                  \
980             state: "on" 0.0;                                            \
981             inherit: "default" 0.0;                                     \
982             color: 255 255 255 0;                                       \
983             visible: 0;                                                 \
984          }                                                              \
985       }                                                                 \
986       part {                                                            \
987          name: "button.toggle."##id;                                    \
988          type: IMAGE;                                                   \
989          clip_to: "clipper."##id;                                       \
990          mouse_events: 1;                                               \
991          description {                                                  \
992             state: "default" 0.0;                                       \
993             color: 255 255 255 0;                                       \
994             visible: 0;                                                 \
995             color_class: "action";                                      \
996             rel1.to: "button."##id;                                     \
997             rel2.to: "button."##id;                                     \
998             image.normal: "bt_"##img"_pressed.png";                     \
999          }                                                              \
1000          description {                                                  \
1001             state: "on" 0.0;                                            \
1002             inherit: "default" 0.0;                                     \
1003             color: 255 255 255 255;                                     \
1004             visible: 1;                                                 \
1005          }                                                              \
1006       }                                                                 \
1007       part {                                                            \
1008          name: "blocker."##id;                                          \
1009          type: RECT;                                                    \
1010          mouse_events: 1;                                               \
1011          clip_to: "clipper."##id;                                       \
1012          description {                                                  \
1013             state: "default" 0.0;                                       \
1014             color: 0 0 0 0;                                             \
1015             visible: 0;                                                 \
1016             rel1.to: "button."##id;                                     \
1017             rel2.to: "button."##id;                                     \
1018          }                                                              \
1019          description {                                                  \
1020             state: "disabled" 0.0;                                      \
1021             inherit: "default" 0.0;                                     \
1022             visible: 1;                                                 \
1023          }                                                              \
1024       }                                                                 \
1025       programs {                                                        \
1026          program {                                                      \
1027             signal: "mouse,up,1";                                       \
1028             source: "button."##id;                                      \
1029             action: SIGNAL_EMIT "released,"##id "call";                 \
1030             api: id"_released" id" was released";                       \
1031             after: "show_up_"##id;                                      \
1032          }                                                              \
1033          program {                                                      \
1034             name: "show_up_"##id;                                       \
1035             action: STATE_SET "default" 0.0;                            \
1036             transition: DECELERATE 0.1;                                 \
1037             target: "button."##id;                                      \
1038             target: "button.over."##id;                                 \
1039          }                                                              \
1040          program {                                                      \
1041             signal: "mouse,down,1";                                     \
1042             source: "button."##id;                                      \
1043             after: "show_down_"##id;                                    \
1044             action: SIGNAL_EMIT "pressed,"##id "call";                  \
1045             api: id"_pressed" id" was pressed";                         \
1046          }                                                              \
1047          program {                                                      \
1048             name: "show_down_"##id;                                     \
1049             action: STATE_SET "pressed" 0.0;                            \
1050             transition: ACCELERATE 0.1;                                 \
1051             target: "button."##id;                                      \
1052             target: "button.over."##id;                                 \
1053          }                                                              \
1054          program {                                                      \
1055             signal: "mouse,clicked,1";                                  \
1056             source: "button."##id;                                      \
1057             action: SIGNAL_EMIT "clicked,"##id "call";                  \
1058             api: id"_clicked" id" was clicked";                         \
1059          }                                                              \
1060          program {                                                      \
1061             signal: "mouse,clicked,1";                                  \
1062             source: "button.toggle."##id;                               \
1063             action: SIGNAL_EMIT "clicked,"##id "call";                  \
1064             api: id"_clicked" id" was clicked";                         \
1065          }                                                              \
1066          program {                                                      \
1067             signal: "disable,"##id;                                     \
1068             source: "call";                                             \
1069             action: STATE_SET "disabled" 0.0;                           \
1070             target: "blocker."##id;                                     \
1071             target: "clipper."##id;                                     \
1072             api: id"_disable" "disable "##id;                           \
1073          }                                                              \
1074          program {                                                      \
1075             signal: "enable,"##id;                                      \
1076             source: "call";                                             \
1077             action: STATE_SET "default" 0.0;                            \
1078             target: "blocker."##id;                                     \
1079             target: "clipper."##id;                                     \
1080             api: id"_enable" "enable "##id;                             \
1081          }                                                              \
1082          program {                                                      \
1083             signal: "toggle,on,"##id;                                   \
1084             source: "call";                                             \
1085             action: STATE_SET "on" 0.0;                                 \
1086             target: "clipper.toggle."##id;                              \
1087             target: "button.toggle."##id;                               \
1088             api: id"_toggle_on" "toggle on "##id;                       \
1089          }                                                              \
1090          program {                                                      \
1091             signal: "toggle,off,"##id;                                  \
1092             source: "call";                                             \
1093             action: STATE_SET "default" 0.0;                            \
1094             target: "clipper.toggle."##id;                              \
1095             target: "button.toggle."##id;                               \
1096             api: id"_toggle_off" "toggle off "##id;                     \
1097          }                                                              \
1098       }
1099
1100       ACTION_TOGGLE("mute",    "mute",    0.000000000 0.0, 0.333333333 0.5);
1101       ACTION_BUTTON("keypad",  "keypad",  0.333333333 0.0, 0.666666666 0.5);
1102       ACTION_TOGGLE("speaker", "speaker", 0.666666666 0.0, 1.000000000 0.5);
1103
1104       ACTION_HIDEABLE("merge",    "merge",  0.000000000 0.5, 0.333333333 1.0);
1105       ACTION_HIDEABLE("add-call", "add_call",0.000000000 0.5, 0.333333333 1.0);
1106
1107       ACTION_BUTTON("swap",     "swap",   0.333333333 0.5, 0.666666666 1.0);
1108       ACTION_BUTTON("contacts", "contacts",0.666666666 0.5, 1.000000000 1.0);
1109 #undef ACTION_BUTTON
1110 #undef ACTION_TOGGLE
1111
1112       SEPARATOR("answer", "clipper.answer", 0.0, -SEPARATOR_HEIGHT, "button.answer");
1113       SEPARATOR("hangup", "clipper.multiparty-details-hidden", 0.0, -SEPARATOR_HEIGHT, "button.hangup");
1114
1115       programs {
1116          program {
1117             signal: "enable,merge";
1118             source: "call";
1119             after: "hide_add-call";
1120             after: "show_merge";
1121          }
1122          program {
1123             signal: "disable,merge";
1124             source: "call";
1125             after: "show_add-call";
1126             after: "hide_merge";
1127          }
1128       }
1129
1130       part {
1131          name: "clipper.keypad-hidden";
1132          type: RECT;
1133          clip_to: "clipper.multiparty-details-hidden";
1134          description {
1135             state: "default" 0.0;
1136             color: 255 255 255 255;
1137             visible: 1;
1138          }
1139          description {
1140             state: "alternate" 0.0;
1141             inherit: "default" 0.0;
1142             color: 255 255 255 0;
1143             visible: 0;
1144          }
1145       }
1146       part {
1147          name: "clipper.keypad-visible";
1148          type: RECT;
1149          clip_to: "clipper.multiparty-details-hidden";
1150          description {
1151             state: "default" 0.0;
1152             color: 255 255 255 0;
1153             visible: 0;
1154          }
1155          description {
1156             state: "alternate" 0.0;
1157             inherit: "default" 0.0;
1158             color: 255 255 255 255;
1159             visible: 1;
1160          }
1161       }
1162
1163
1164       /* keypad */
1165       SEPARATOR("hide-keypad", "clipper.keypad-visible", 0.0, -SEPARATOR_HEIGHT, "button.hide-keypad");
1166       SEPARATOR("keypad", "clipper.keypad-visible", 0.0, -SEPARATOR_HEIGHT, "bg.keypad");
1167
1168       part {
1169          name: "bg.keypad";
1170          type: RECT;
1171          mouse_events: 0;
1172          clip_to: "clipper.keypad-visible";
1173          description {
1174             state: "default" 0.0;
1175             color: 0 0 0 0;
1176             min: WIDTH (ACTION_HEIGHT * 4);
1177             max: WIDTH (ACTION_HEIGHT * 4); /* keep it tight centered */
1178             rel1 {
1179                relative: 0.0 0.0;
1180                offset: 0 (-ACTION_HEIGHT * 4 - SEPARATOR_HEIGHT);
1181                to_y: "button.hide-keypad";
1182             }
1183             rel2 {
1184                relative: 1.0 0.0;
1185                offset: 0 (-SEPARATOR_HEIGHT - 1);
1186                to_y: "button.hide-keypad";
1187             }
1188          }
1189       }
1190 #define BUTTON(id, label, sub, ccls, r1, r2)                            \
1191       part {                                                            \
1192          name: "button."##id;                                           \
1193          type: RECT;                                                    \
1194          mouse_events: 1;                                               \
1195          clip_to: "clipper.keypad-visible";                             \
1196          description {                                                  \
1197             state: "default" 0.0;                                       \
1198             color: 255 255 255 0;                                       \
1199             color_class: "action";                                      \
1200             rel1 {                                                      \
1201                to: "bg.keypad";                                         \
1202                relative: r1;                                            \
1203             }                                                           \
1204             rel2 {                                                      \
1205                to: "bg.keypad";                                         \
1206                relative: r2;                                            \
1207                offset: -2 -2;                                           \
1208             }                                                           \
1209          }                                                              \
1210          description {                                                  \
1211             state: "pressed" 0.0;                                       \
1212             inherit: "default" 0.0;                                     \
1213             color: 255 255 255 255;                                     \
1214          }                                                              \
1215       }                                                                 \
1216       part {                                                            \
1217          name: "label."##id;                                            \
1218          type: TEXT;                                                    \
1219          mouse_events: 0;                                               \
1220          clip_to: "clipper.keypad-visible";                             \
1221          description {                                                  \
1222             state: "default" 0.0;                                       \
1223             color: 255 255 255 255;                                     \
1224             color_class: ccls;                                          \
1225             rel1.to: "button."##id;                                     \
1226             rel2 {                                                      \
1227                to: "button."##id;                                       \
1228                relative: 1.0 0.8;                                       \
1229             }                                                           \
1230             text {                                                      \
1231                text: label;                                             \
1232                font: FONT_NORMAL;                                       \
1233                size: SIZE_HUGE;                                         \
1234                align: 0.5 0.5;                                          \
1235             }                                                           \
1236          }                                                              \
1237          description {                                                  \
1238             state: "pressed" 0.0;                                       \
1239             inherit: "default" 0.0;                                     \
1240             color: 16 16 16 255;                                        \
1241          }                                                              \
1242       }                                                                 \
1243       part {                                                            \
1244          name: "sub."##id;                                              \
1245          type: TEXT;                                                    \
1246          mouse_events: 0;                                               \
1247          clip_to: "clipper.keypad-visible";                             \
1248          description {                                                  \
1249             state: "default" 0.0;                                       \
1250             color: 255 255 255 255;                                     \
1251             color_class: "light";                                       \
1252             rel1 {                                                      \
1253                to: "button."##id;                                       \
1254                relative: 0.0 0.5;                                       \
1255                offset: 0 2;                                             \
1256             }                                                           \
1257             rel2.to: "button."##id;                                     \
1258             text {                                                      \
1259                text: sub;                                               \
1260                font: FONT_BOLD;                                         \
1261                size: SIZE_TINY;                                         \
1262                align: 0.5 0.5;                                          \
1263             }                                                           \
1264          }                                                              \
1265          description {                                                  \
1266             state: "pressed" 0.0;                                       \
1267             inherit: "default" 0.0;                                     \
1268             color: 16 16 16 255;                                        \
1269          }                                                              \
1270       }                                                                 \
1271       programs {                                                        \
1272          program {                                                      \
1273             signal: "mouse,up,1";                                       \
1274             source: "button."##id;                                      \
1275             action: SIGNAL_EMIT "released,"##id "call";                 \
1276             after: "show_up_"##id;                                      \
1277             api: id"_released" id" was released";                       \
1278          }                                                              \
1279          program {                                                      \
1280             name: "show_up_"##id;                                       \
1281             action: STATE_SET "default" 0.0;                            \
1282             transition: DECELERATE 0.1;                                 \
1283             target: "button."##id;                                      \
1284             target: "label."##id;                                       \
1285             target: "sub."##id;                                         \
1286          }                                                              \
1287          program {                                                      \
1288             signal: "mouse,down,1";                                     \
1289             source: "button."##id;                                      \
1290             after: "show_down_"##id;                                    \
1291             action: SIGNAL_EMIT "pressed,"##id "call";                  \
1292             api: id"_pressed" id" was pressed";                         \
1293          }                                                              \
1294          program {                                                      \
1295             name: "show_down_"##id;                                     \
1296             action: STATE_SET "pressed" 0.0;                            \
1297             transition: ACCELERATE 0.3;                                 \
1298             target: "button."##id;                                      \
1299             target: "label."##id;                                       \
1300             target: "sub."##id;                                         \
1301          }                                                              \
1302          program {                                                      \
1303             signal: "mouse,clicked,1";                                  \
1304             source: "button."##id;                                      \
1305             action: SIGNAL_EMIT "clicked,"##id "call";                  \
1306             api: id"_clicked" id" was clicked";                         \
1307          }                                                              \
1308       }
1309
1310       BUTTON("1",    "1",     "", "action", 0.000 0.0, 0.333 0.25);
1311       BUTTON("2",    "2",  "ABC", "action", 0.333 0.0, 0.666 0.25);
1312       BUTTON("3",    "3",  "DEF", "action", 0.666 0.0, 1.000 0.25);
1313
1314       BUTTON("4",    "4",  "GHI", "action", 0.000 0.25, 0.333 0.50);
1315       BUTTON("5",    "5",  "JKL", "action", 0.333 0.25, 0.666 0.50);
1316       BUTTON("6",    "6",  "MNO", "action", 0.666 0.25, 1.000 0.50);
1317
1318       BUTTON("7",    "7", "PQRS", "action", 0.000 0.50, 0.333 0.75);
1319       BUTTON("8",    "8",  "TUV", "action", 0.333 0.50, 0.666 0.75);
1320       BUTTON("9",    "9", "WXYZ", "action", 0.666 0.50, 1.000 0.75);
1321
1322       BUTTON("star", "*",     "", "light",  0.000 0.75, 0.333 1.00);
1323       BUTTON("0",    "0",    "+", "action", 0.333 0.75, 0.666 1.00);
1324       BUTTON("hash", "#",     "", "light",  0.666 0.75, 1.000 1.00);
1325 #undef BUTTON
1326
1327       part {
1328          name: "area.hide-keypad";
1329          type: RECT;
1330          mouse_events: 0;
1331          clip_to: "clipper.keypad-visible";
1332          description {
1333             state: "default" 0.0;
1334             color: 0 0 0 0;
1335             visible: 0;
1336             rel1 {
1337                to_y: "button.hangup";
1338                relative: 0.0 -1.0;
1339                offset: 0 (ACTION_HEIGHT * 4 + SEPARATOR_HEIGHT);
1340             }
1341             rel2 {
1342                to_y: "button.hangup";
1343                relative: 1.0 0.0;
1344                offset: -1 (ACTION_HEIGHT * 4 + SEPARATOR_HEIGHT - 1);
1345             }
1346          }
1347          description {
1348             state: "alternate" 0.0;
1349             inherit: "default" 0.0;
1350             visible: 1;
1351             rel1 {
1352                to_y: "button.hangup";
1353                relative: 0.0 -1.0;
1354                offset: 0 -SEPARATOR_HEIGHT;
1355             }
1356             rel2 {
1357                to_y: "button.hangup";
1358                relative: 1.0 0.0;
1359                offset: -1 (-SEPARATOR_HEIGHT - 1);
1360             }
1361          }
1362       }
1363       part {
1364          name: "button.hide-keypad";
1365          type: RECT;
1366          mouse_events: 1;
1367          clip_to: "clipper.keypad-visible";
1368          description {
1369             state: "default" 0.0;
1370             color: 255 255 255 0;
1371             color_class: "action";
1372             rel1.to_y: "area.hide-keypad";
1373             rel2.to_y: "area.hide-keypad";
1374          }
1375          description {
1376             state: "pressed" 0.0;
1377             inherit: "default" 0.0;
1378             color: 255 255 255 255;
1379          }
1380       }
1381       part {
1382          name: "label.hide-keypad";
1383          type: TEXT;
1384          mouse_events: 0;
1385          clip_to: "clipper.keypad-visible";
1386          description {
1387             state: "default" 0.0;
1388             color: 255 255 255 255;
1389             color_class: "action";
1390             rel1.to: "button.hide-keypad";
1391             rel2.to: "button.hide-keypad";
1392             text {
1393                text: "Hide Keypad";
1394                font: FONT_NORMAL;
1395                size: SIZE_HUGE;
1396                align: 0.5 0.5;
1397             }
1398          }
1399          description {
1400             state: "pressed" 0.0;
1401             inherit: "default" 0.0;
1402             color_class: "bg";
1403          }
1404       }
1405       programs {
1406          program {
1407             signal: "active,disconnected";
1408             source: "call";
1409             after: "hide_keypad";
1410          }
1411          program {
1412             name: "hide_keypad";
1413             signal: "clicked,hangup";
1414             source: "call";
1415             action: STATE_SET "default" 0.0;
1416             target: "clipper.keypad-visible";
1417             target: "clipper.keypad-hidden";
1418             target: "area.hide-keypad";
1419          }
1420
1421          program {
1422             signal: "mouse,up,1";
1423             source: "button.hide-keypad";
1424             action: STATE_SET "default" 0.0;
1425             transition: DECELERATE 0.1;
1426             target: "button.hide-keypad";
1427             target: "label.hide-keypad";
1428          }
1429          program {
1430             signal: "mouse,down,1";
1431             source: "button.hide-keypad";
1432             action: STATE_SET "pressed" 0.0;
1433             transition: ACCELERATE 0.3;
1434             target: "button.hide-keypad";
1435             target: "label.hide-keypad";
1436          }
1437
1438          program {
1439             name: "hide-keypad-phase1";
1440             signal: "mouse,clicked,1";
1441             source: "button.hide-keypad";
1442             action: STATE_SET "default" 0.0;
1443             transition: ACCELERATE 0.3;
1444             target: "clipper.keypad-visible";
1445             target: "area.hide-keypad";
1446             after: "hide-keypad-phase2";
1447          }
1448          program {
1449             name: "hide-keypad-phase2";
1450             action: STATE_SET "default" 0.0;
1451             transition: ACCELERATE 0.3;
1452             target: "clipper.keypad-hidden";
1453          }
1454
1455          program {
1456             name: "show-keypad-phase1";
1457             signal: "mouse,clicked,1";
1458             source: "button.keypad";
1459             action: STATE_SET "alternate" 0.0;
1460             transition: ACCELERATE 0.3;
1461             target: "clipper.keypad-hidden";
1462             after: "show-keypad-phase2";
1463          }
1464          program {
1465             name: "show-keypad-phase2";
1466             action: STATE_SET "alternate" 0.0;
1467             transition: ACCELERATE 0.3;
1468             target: "area.hide-keypad";
1469             target: "clipper.keypad-visible";
1470          }
1471       }
1472
1473       /* buttons */
1474       part {
1475          name: "bg.buttons";
1476          type: RECT;
1477          mouse_events: 0;
1478          clip_to: "clipper.keypad-hidden";
1479          description {
1480             state: "default" 0.0;
1481             color: 0 0 0 0;
1482             rel1.to: "area.answer";
1483             rel2.to: "button.hangup";
1484          }
1485       }
1486
1487       part {
1488          name: "clipper.answer";
1489          type: RECT;
1490          mouse_events: 0;
1491          clip_to: "clipper.keypad-hidden";
1492          description {
1493             state: "default" 0.0;
1494             color: 255 255 255 0;
1495             visible: 0;
1496          }
1497          description {
1498             state: "visible" 0.0;
1499             inherit: "default" 0.0;
1500             color: 255 255 255 255;
1501             visible: 1;
1502          }
1503       }
1504       part {
1505          name: "area.answer";
1506          type: RECT;
1507          mouse_events: 0;
1508          clip_to: "clipper.answer";
1509          description {
1510             state: "default" 0.0;
1511             color: 0 0 0 0;
1512             visible: 0;
1513             rel1.to_y: "button.hangup";
1514             rel2.to_y: "button.hangup";
1515          }
1516          description {
1517             state: "visible" 0.0;
1518             inherit: "default" 0.0;
1519             visible: 1;
1520             rel1 {
1521                to_y: "button.hangup";
1522                relative: 0.0 -1.0;
1523                offset: 0 -SEPARATOR_HEIGHT;
1524             }
1525             rel2 {
1526                to_y: "button.hangup";
1527                relative: 1.0 0.0;
1528                offset: -1 (-SEPARATOR_HEIGHT - 1);
1529             }
1530          }
1531       }
1532       part {
1533          name: "button.answer";
1534          type: RECT;
1535          mouse_events: 1;
1536          clip_to: "clipper.answer";
1537          description {
1538             state: "default" 0.0;
1539             color: 255 255 255 0;
1540             color_class: "action";
1541             rel1.to_y: "area.answer";
1542             rel2.to_y: "area.answer";
1543          }
1544          description {
1545             state: "pressed" 0.0;
1546             inherit: "default" 0.0;
1547             color: 255 255 255 255;
1548          }
1549       }
1550       part {
1551          name: "label.answer";
1552          type: TEXT;
1553          mouse_events: 0;
1554          clip_to: "clipper.answer";
1555          description {
1556             state: "default" 0.0;
1557             color: 255 255 255 255;
1558             color_class: "action";
1559             rel1.to: "button.answer";
1560             rel2.to: "button.answer";
1561             text {
1562                text: "Answer";
1563                font: FONT_NORMAL;
1564                size: SIZE_HUGE;
1565                align: 0.5 0.5;
1566             }
1567          }
1568          description {
1569             state: "pressed" 0.0;
1570             inherit: "default" 0.0;
1571             color_class: "bg";
1572          }
1573       }
1574       programs {
1575          program {
1576             signal: "mouse,up,1";
1577             source: "button.answer";
1578             action: SIGNAL_EMIT "released,answer" "call";
1579             after: "show_up_answer";
1580             api: "answer_released" "answer was released";
1581          }
1582          program {
1583             name: "show_up_answer";
1584             action: STATE_SET "default" 0.0;
1585             transition: DECELERATE 0.1;
1586             target: "button.answer";
1587             target: "label.answer";
1588          }
1589          program {
1590             signal: "mouse,down,1";
1591             source: "button.answer";
1592             after: "show_down_answer";
1593             action: SIGNAL_EMIT "pressed,answer" "call";
1594             api: "answer_pressed" "answer was pressed";
1595          }
1596          program {
1597             name: "show_down_answer";
1598             action: STATE_SET "pressed" 0.0;
1599             transition: ACCELERATE 0.3;
1600             target: "button.answer";
1601             target: "label.answer";
1602          }
1603          program {
1604             signal: "mouse,clicked,1";
1605             source: "button.answer";
1606             action: SIGNAL_EMIT "clicked,answer" "call";
1607             api: "answer_clicked" "answer was clicked";
1608          }
1609
1610          program {
1611             signal: "show,answer";
1612             source: "call";
1613             action: STATE_SET "visible" 0.0;
1614             target: "area.answer";
1615             target: "clipper.answer";
1616             api: "answer_show" "make answer button visible";
1617          }
1618          program {
1619             signal: "hide,answer";
1620             source: "call";
1621             action: STATE_SET "default" 0.0;
1622             target: "area.answer";
1623             target: "clipper.answer";
1624             api: "answer_hide" "make answer button hidden";
1625          }
1626       }
1627
1628       part {
1629          name: "button.hangup";
1630          type: RECT;
1631          mouse_events: 1;
1632          clip_to: "clipper.multiparty-details-hidden";
1633          description {
1634             state: "default" 0.0;
1635             color: 255 255 255 255;
1636             color_class: "bg";
1637             rel1 {
1638                relative: 0.0 1.0;
1639                offset: 0 -ACTION_HEIGHT;
1640             }
1641             rel2 {
1642                relative: 1 1.0;
1643                offset: -1 -1;
1644             }
1645          }
1646          description {
1647             state: "pressed" 0.0;
1648             inherit: "default" 0.0;
1649             color_class: "caution";
1650          }
1651       }
1652       part {
1653          name: "label.hangup";
1654          type: TEXT;
1655          mouse_events: 0;
1656          clip_to: "clipper.multiparty-details-hidden";
1657          description {
1658             state: "default" 0.0;
1659             color: 255 255 255 255;
1660             color_class: "caution";
1661             rel1.to: "button.hangup";
1662             rel2.to: "button.hangup";
1663             text {
1664                text: "Hangup";
1665                font: FONT_NORMAL;
1666                size: SIZE_HUGE;
1667                align: 0.5 0.5;
1668             }
1669          }
1670          description {
1671             state: "pressed" 0.0;
1672             inherit: "default" 0.0;
1673             color_class: "bg";
1674          }
1675       }
1676       programs {
1677          program {
1678             signal: "mouse,up,1";
1679             source: "button.hangup";
1680             action: SIGNAL_EMIT "released,hangup" "call";
1681             api: "hangup_released" "hangup was released";
1682             after: "show_up_hangup";
1683          }
1684          program {
1685             name: "show_up_hangup";
1686             action: STATE_SET "default" 0.0;
1687             transition: DECELERATE 0.1;
1688             target: "button.hangup";
1689             target: "label.hangup";
1690          }
1691          program {
1692             signal: "mouse,down,1";
1693             source: "button.hangup";
1694             after: "show_down_hangup";
1695             action: SIGNAL_EMIT "pressed,hangup" "call";
1696             api: "hangup_pressed" "hangup was pressed";
1697          }
1698          program {
1699             name: "show_down_hangup";
1700             action: STATE_SET "pressed" 0.0;
1701             transition: ACCELERATE 0.3;
1702             target: "button.hangup";
1703             target: "label.hangup";
1704          }
1705          program {
1706             signal: "mouse,clicked,1";
1707             source: "button.hangup";
1708             action: SIGNAL_EMIT "clicked,hangup" "call";
1709             api: "hangup_clicked" "hangup was clicked";
1710          }
1711       }
1712
1713       /* multiparty options */
1714       part {
1715          name: "clipper.multiparty-details-hidden";
1716          type: RECT;
1717          description {
1718             state: "default" 0.0;
1719             color: 255 255 255 255;
1720             visible: 1;
1721          }
1722          description {
1723             state: "alternate" 0.0;
1724             inherit: "default" 0.0;
1725             color: 255 255 255 0;
1726             visible: 0;
1727          }
1728       }
1729       part {
1730          name: "clipper.multiparty-details-visible";
1731          type: RECT;
1732          clip_to: "clipper.waiting-hidden";
1733          description {
1734             state: "default" 0.0;
1735             color: 255 255 255 0;
1736             visible: 0;
1737          }
1738          description {
1739             state: "alternate" 0.0;
1740             inherit: "default" 0.0;
1741             color: 255 255 255 255;
1742             visible: 1;
1743          }
1744       }
1745       part {
1746          name: "label.multiparty";
1747          type: TEXT;
1748          mouse_events: 0;
1749          scale: 1;
1750          clip_to: "clipper.multiparty-details-visible";
1751          description {
1752             state: "default" 0.0;
1753             color: 255 255 255 255;
1754             color_class: "action";
1755             align: 0.0 0.5;
1756             rel1.offset: BORDER_PADDING 0;
1757             rel2 {
1758                relative: 1.0 0.0;
1759                offset: (-BORDER_PADDING - 1) ACTION_HEIGHT;
1760             }
1761             text {
1762                text: "Conference";
1763                font: FONT_NORMAL;
1764                size: SIZE_HUGE;
1765                size_range: SIZE_TINY SIZE_HUGE;
1766                fit: 1 1;
1767                align: 0.5 0.5;
1768                ellipsis: 0.0;
1769             }
1770          }
1771       }
1772       SEPARATOR("multiparty-details", "clipper.multiparty-details-visible", 0.0, -SEPARATOR_HEIGHT, "elm.swallow.multiparty-details");
1773
1774       part {
1775          name: "elm.swallow.multiparty-details";
1776          type: SWALLOW;
1777          mouse_events: 1;
1778          clip_to: "clipper.multiparty-details-visible";
1779          api: "multiparty_details" "swallow to hold the multiparty details";
1780          description {
1781             state: "default" 0.0;
1782             visible: 0;
1783             rel1 {
1784                relative: 0.0 1.0;
1785                offset: 0 (ACTION_HEIGHT + SEPARATOR_HEIGHT);
1786             }
1787             rel2 {
1788                relative: 1.0 2.0;
1789                offset: -1 (-ACTION_HEIGHT - SEPARATOR_HEIGHT);
1790             }
1791          }
1792          description {
1793             state: "alternate" 0.0;
1794             inherit: "default" 0.0;
1795             visible: 1;
1796             rel1 {
1797                relative: 0.0 0.0;
1798                offset: 0 (ACTION_HEIGHT + SEPARATOR_HEIGHT);
1799             }
1800             rel2 {
1801                relative: 1.0 1.0;
1802                offset: -1 (-ACTION_HEIGHT - SEPARATOR_HEIGHT);
1803             }
1804          }
1805       }
1806
1807       SEPARATOR("multiparty-details-back", "clipper.multiparty-details-visible", 0.0, -SEPARATOR_HEIGHT, "button.multiparty-details-back");
1808       part {
1809          name: "button.multiparty-details-back";
1810          type: RECT;
1811          mouse_events: 1;
1812          clip_to: "clipper.multiparty-details-visible";
1813          description {
1814             state: "default" 0.0;
1815             color: 255 255 255 255;
1816             color_class: "bg";
1817             rel1 {
1818                relative: 0.0 1.0;
1819                offset: 0 -ACTION_HEIGHT;
1820             }
1821             rel2 {
1822                relative: 1 1.0;
1823                offset: -1 -1;
1824             }
1825          }
1826          description {
1827             state: "pressed" 0.0;
1828             inherit: "default" 0.0;
1829             color_class: "action";
1830          }
1831       }
1832       part {
1833          name: "label.multiparty-details-back";
1834          type: TEXT;
1835          mouse_events: 0;
1836          clip_to: "clipper.multiparty-details-visible";
1837          description {
1838             state: "default" 0.0;
1839             color: 255 255 255 255;
1840             color_class: "action";
1841             rel1.to: "button.multiparty-details-back";
1842             rel2.to: "button.multiparty-details-back";
1843             text {
1844                text: "Back";
1845                font: FONT_NORMAL;
1846                size: SIZE_HUGE;
1847                align: 0.5 0.5;
1848             }
1849          }
1850          description {
1851             state: "pressed" 0.0;
1852             inherit: "default" 0.0;
1853             color_class: "bg";
1854          }
1855       }
1856       programs {
1857          program {
1858             signal: "mouse,up,1";
1859             source: "button.multiparty-details-back";
1860             action: STATE_SET "default" 0.0;
1861             transition: DECELERATE 0.1;
1862             target: "button.multiparty-details-back";
1863             target: "label.multiparty-details-back";
1864          }
1865          program {
1866             signal: "mouse,down,1";
1867             source: "button.multiparty-details-back";
1868             action: STATE_SET "pressed" 0.0;
1869             transition: ACCELERATE 0.3;
1870             target: "button.multiparty-details-back";
1871             target: "label.multiparty-details-back";
1872          }
1873          program {
1874             signal: "mouse,clicked,1";
1875             source: "button.multiparty-details-back";
1876             action: SIGNAL_EMIT "hide,multiparty-details" "call";
1877          }
1878          program {
1879             signal: "multiparty,private";
1880             source: "call";
1881             action: SIGNAL_EMIT "hide,multiparty-details" "call";
1882          }
1883       }
1884
1885       programs {
1886          program {
1887             name: "hide-multiparty-details-phase1";
1888             signal: "hide,multiparty-details";
1889             source: "call";
1890             action: STATE_SET "default" 0.0;
1891             transition: ACCELERATE 0.3;
1892             target: "clipper.multiparty-details-visible";
1893             target: "elm.swallow.multiparty-details";
1894             after: "hide-multiparty-details-phase2";
1895             api: "multiparty_details_hide" "make multiparty-details popup hidden";
1896          }
1897          program {
1898             name: "hide-multiparty-details-phase2";
1899             action: STATE_SET "default" 0.0;
1900             transition: ACCELERATE 0.3;
1901             target: "clipper.multiparty-details-hidden";
1902          }
1903
1904          program {
1905             signal: "clicked,held-multiparty"; /* just show on user request */
1906             source: "call";
1907             after: "show-multiparty-details-phase1";
1908          }
1909
1910          program {
1911             name: "show-multiparty-details-phase1";
1912             signal: "clicked,multiparty"; /* just show on user request */
1913             source: "call";
1914             action: STATE_SET "alternate" 0.0;
1915             transition: ACCELERATE 0.3;
1916             target: "clipper.multiparty-details-hidden";
1917             after: "show-multiparty-details-phase2";
1918             api: "multiparty_details_show" "make multiparty-details popup visible";
1919          }
1920          program {
1921             name: "show-multiparty-details-phase2";
1922             action: STATE_SET "alternate" 0.0;
1923             transition: ACCELERATE 0.3;
1924             target: "elm.swallow.multiparty-details";
1925             target: "clipper.multiparty-details-visible";
1926          }
1927       }
1928
1929       /* waiting popup */
1930       part {
1931          name: "clipper.waiting-hidden";
1932          type: RECT;
1933          description {
1934             state: "default" 0.0;
1935             color: 255 255 255 255;
1936             visible: 1;
1937          }
1938          description {
1939             state: "alternate" 0.0;
1940             inherit: "default" 0.0;
1941             color: 255 255 255 0;
1942             visible: 0;
1943          }
1944       }
1945       part {
1946          name: "clipper.waiting-visible";
1947          type: RECT;
1948          description {
1949             state: "default" 0.0;
1950             color: 255 255 255 0;
1951             visible: 0;
1952          }
1953          description {
1954             state: "alternate" 0.0;
1955             inherit: "default" 0.0;
1956             color: 255 255 255 255;
1957             visible: 1;
1958          }
1959       }
1960       part {
1961          name: "area.waiting";
1962          type: RECT;
1963          mouse_events: 0;
1964          clip_to: "clipper.waiting-visible";
1965          description {
1966             state: "default" 0.0;
1967             color: 255 255 255 255;
1968             color_class: "bg";
1969             visible: 0;
1970             fixed: 1 1;
1971             align: 0.5 1.0;
1972             rel1 {
1973                to: "separator.dark.waiting-hangup";
1974                relative: 0.0 0.0;
1975                offset: 0 (-ACTION_HEIGHT - SEPARATOR_HEIGHT);
1976             }
1977             rel2 {
1978                relative: 1.0 1.0;
1979                offset: -1 712;
1980             }
1981          }
1982          description {
1983             state: "alternate" 0.0;
1984             inherit: "default" 0.0;
1985             visible: 1;
1986             rel2 {
1987                relative: 1.0 1.0;
1988                offset: -1 -1;
1989             }
1990          }
1991       }
1992
1993 #define BUTTON(id, label, colcls, prev)                                 \
1994       SEPARATOR(id, "clipper."##id, 0.0, -SEPARATOR_HEIGHT, "button."##id);            \
1995       part {                                                            \
1996          name: "clipper."##id;                                          \
1997          type: RECT;                                                    \
1998          clip_to: "clipper.waiting-visible";                            \
1999          description {                                                  \
2000             state: "default" 0.0;                                       \
2001             color: 255 255 255 255;                                     \
2002          }                                                              \
2003          description {                                                  \
2004             state: "hidden" 0.0;                                        \
2005             inherit: "default" 0.0;                                     \
2006             color: 255 255 255 0;                                       \
2007             visible: 0;                                                 \
2008          }                                                              \
2009       }                                                                 \
2010       part {                                                            \
2011          name: "button."##id;                                           \
2012          type: RECT;                                                    \
2013          mouse_events: 1;                                               \
2014          clip_to: "clipper."##id;                                       \
2015          description {                                                  \
2016             state: "default" 0.0;                                       \
2017             color: 255 255 255 0;                                       \
2018             color_class: colcls;                                        \
2019             rel1 {                                                      \
2020                to: prev;                                                \
2021                relative: 0.0 0.0;                                       \
2022                offset: 0 -ACTION_HEIGHT;                                \
2023             }                                                           \
2024             rel2 {                                                      \
2025                to: prev;                                                \
2026                relative: 1.0 0.0;                                       \
2027                offset: -1 -1;                                           \
2028             }                                                           \
2029          }                                                              \
2030          description {                                                  \
2031             state: "pressed" 0.0;                                       \
2032             inherit: "default" 0.0;                                     \
2033             color: 255 255 255 255;                                     \
2034          }                                                              \
2035          description {                                                  \
2036             state: "hidden" 0.0;                                        \
2037             inherit: "default" 0.0;                                     \
2038             rel1 {                                                      \
2039                to: prev;                                                \
2040                relative: 0.0 0.0;                                       \
2041                offset: 0 SEPARATOR_HEIGHT;                              \
2042             }                                                           \
2043             rel2 {                                                      \
2044                to: prev;                                                \
2045                relative: 1.0 0.0;                                       \
2046                offset: -1 (ACTION_HEIGHT + SEPARATOR_HEIGHT - 1);       \
2047             }                                                           \
2048          }                                                              \
2049       }                                                                 \
2050       part {                                                            \
2051          name: "label."##id;                                            \
2052          type: TEXT;                                                    \
2053          mouse_events: 0;                                               \
2054          clip_to: "clipper."##id;                                       \
2055          description {                                                  \
2056             state: "default" 0.0;                                       \
2057             color: 255 255 255 255;                                     \
2058             color_class: colcls;                                        \
2059             rel1 {                                                      \
2060                to: "button."##id;                                       \
2061                offset: BORDER_PADDING 0;                                \
2062             }                                                           \
2063             rel2 {                                                      \
2064                to: "button."##id;                                       \
2065                offset: (-BORDER_PADDING - 1) -1;                        \
2066             }                                                           \
2067             text {                                                      \
2068                text: label;                                             \
2069                font: FONT_NORMAL;                                       \
2070                size: SIZE_LARGE;                                        \
2071                align: 0.5 0.5;                                          \
2072             }                                                           \
2073          }                                                              \
2074          description {                                                  \
2075             state: "pressed" 0.0;                                       \
2076             inherit: "default" 0.0;                                     \
2077             color_class: "bg";                                          \
2078          }                                                              \
2079       }                                                                 \
2080       programs {                                                        \
2081          program {                                                      \
2082             signal: "mouse,up,1";                                       \
2083             source: "button."##id;                                      \
2084             action: SIGNAL_EMIT "released,"##id "call";                 \
2085             api: id"_released" id" was released";                       \
2086             after: "show_up_"##id;                                      \
2087          }                                                              \
2088          program {                                                      \
2089             name: "show_up_"##id;                                       \
2090             action: STATE_SET "default" 0.0;                            \
2091             transition: DECELERATE 0.1;                                 \
2092             target: "button."##id;                                      \
2093             target: "label."##id;                                       \
2094          }                                                              \
2095          program {                                                      \
2096             signal: "mouse,down,1";                                     \
2097             source: "button."##id;                                      \
2098             after: "show_down_"##id;                                    \
2099             action: SIGNAL_EMIT "pressed,"##id "call";                  \
2100             api: id"_pressed" id" was pressed";                         \
2101          }                                                              \
2102          program {                                                      \
2103             name: "show_down_"##id;                                     \
2104             action: STATE_SET "pressed" 0.0;                            \
2105             transition: ACCELERATE 0.3;                                 \
2106             target: "button."##id;                                      \
2107             target: "label."##id;                                       \
2108          }                                                              \
2109          program {                                                      \
2110             signal: "mouse,clicked,1";                                  \
2111             source: "button."##id;                                      \
2112             action: SIGNAL_EMIT "clicked,"##id "call";                  \
2113             api: id"_clicked" id" was clicked";                         \
2114          }                                                              \
2115       }
2116
2117       BUTTON("waiting-hangup", "Decline", "action", "separator.dark.hold-answer");
2118       BUTTON("hold-answer", "Hold + Answer", "action", "separator.dark.hangup-answer");
2119       BUTTON("hangup-answer", "Hangup + Answer", "caution", "separator.dark.waiting-last");
2120 #undef BUTTON
2121
2122       SEPARATOR("waiting-last", "clipper.waiting-visible", 1.0, 0, "");
2123       SEPARATOR("waiting", "clipper.waiting-visible", 0.0, 0, "area.waiting");
2124       part {
2125          name: "elm.text.waiting";
2126          type: TEXT;
2127          mouse_events: 0;
2128          scale: 1;
2129          clip_to: "clipper.waiting-visible";
2130          api: "waiting" "waiting call name";
2131          description {
2132             state: "default" 0.0;
2133             color: 255 255 255 255;
2134             color_class: "disabled";
2135             rel1 {
2136                to: "area.waiting";
2137                offset: BORDER_PADDING SEPARATOR_HEIGHT;
2138             }
2139             rel2 {
2140                to: "area.waiting";
2141                relative: 1.0 0.0;
2142                offset: (-BORDER_PADDING - 1) (ACTION_HEIGHT + SEPARATOR_HEIGHT - 1);
2143             }
2144             text {
2145                text: "Someone";
2146                font: FONT_NORMAL;
2147                size: SIZE_HUGE;
2148                size_range: SIZE_TINY SIZE_HUGE;
2149                fit: 1 1;
2150                align: 0.0 0.5;
2151                ellipsis: 0.0;
2152             }
2153          }
2154       }
2155
2156       programs {
2157          program {
2158             name: "hide-waiting-phase1";
2159             signal: "hide,waiting";
2160             source: "call";
2161             action: STATE_SET "default" 0.0;
2162             transition: ACCELERATE 0.3;
2163             target: "clipper.waiting-visible";
2164             target: "area.waiting";
2165             after: "hide-waiting-phase2";
2166             api: "waiting_hide" "make waiting popup hidden";
2167          }
2168          program {
2169             name: "hide-waiting-phase2";
2170             action: STATE_SET "default" 0.0;
2171             transition: ACCELERATE 0.3;
2172             target: "clipper.waiting-hidden";
2173          }
2174
2175          program {
2176             name: "show-waiting-phase1";
2177             signal: "show,waiting";
2178             source: "call";
2179             action: STATE_SET "alternate" 0.0;
2180             transition: ACCELERATE 0.3;
2181             target: "clipper.waiting-hidden";
2182             after: "show-waiting-phase2";
2183             api: "waiting_show" "make waiting popup visible";
2184          }
2185          program {
2186             name: "show-waiting-phase2";
2187             action: STATE_SET "alternate" 0.0;
2188             transition: ACCELERATE 0.3;
2189             target: "area.waiting";
2190             target: "clipper.waiting-visible";
2191          }
2192
2193          program {
2194             signal: "enable,merge";
2195             source: "call";
2196             action: STATE_SET "hidden" 0.0;
2197             target: "button.hold-answer";
2198             target: "clipper.hold-answer";
2199          }
2200          program {
2201             signal: "disable,merge";
2202             source: "call";
2203             action: STATE_SET "default" 0.0;
2204             target: "button.hold-answer";
2205             target: "clipper.hold-answer";
2206          }
2207       }
2208
2209 #undef SEPARATOR
2210    }
2211
2212 }
2213
2214 group {
2215    name: "elm/layout/dialer/activecall";
2216
2217    /*
2218     * Represents the active call in the other screens (not callscreen)
2219     *
2220     * Parts:
2221     *   TEXT: elm.text.name
2222     *   TEXT: elm.text.status
2223     *   TEXT: elm.text.elapsed
2224     * Signals:
2225     *   Emit (source is "call"):
2226     *     clicked:
2227     * Listen (source is "call"):
2228     *     show,elapsed:    have elapsed (elm.text.elapsed) and should be visible
2229     *     hide,elapsed:    don't have elapsed and it should be hidden
2230     *     show,multiparty: active call is multiparty
2231     *     hide,multiparty: active call is not multiparty
2232     *     state,<STATE>:   state changed to <STATE>
2233     *
2234     * Where <STATE> is: disconnected, active, held, dialing, alerting,
2235     * incoming, waiting.
2236     */
2237
2238    parts {
2239       part {
2240          name: "bg";
2241          type: RECT;
2242          mouse_events: 1;
2243          description {
2244             state: "default" 0.0;
2245             color: 255 255 255 255;
2246             color_class: "action";
2247             max: 99999 (ACTION_HEIGHT / 2);
2248             min: 0 (ACTION_HEIGHT / 2);
2249             align: 0.5 0.0;
2250          }
2251       }
2252
2253       programs {
2254          program {
2255             signal: "mouse,clicked,1";
2256             source: "bg";
2257             action: SIGNAL_EMIT "clicked" "call";
2258          }
2259       }
2260
2261       part {
2262          name: "elm.text.name";
2263          type: TEXT;
2264          mouse_events: 0;
2265          description {
2266             state: "default" 0.0;
2267             color: 255 255 255 255;
2268             color_class: "dark";
2269             rel1 {
2270                offset: BORDER_PADDING 0;
2271             }
2272             rel2 {
2273                to_y: "bg";
2274                to_x: "elm.text.elapsed";
2275                relative: 0.0 1.0;
2276                offset: (-ITEM_PADDING - 1) -1;
2277             }
2278             text {
2279                text: "Gustavo Barbieri";
2280                font: FONT_NORMAL;
2281                size: SIZE_MEDIUM;
2282                align: 0.0 0.5;
2283                ellipsis: 0.0;
2284             }
2285          }
2286       }
2287
2288       part {
2289          name: "elm.text.elapsed";
2290          type: TEXT;
2291          mouse_events: 0;
2292          description {
2293             state: "default" 0.0;
2294             color: 255 255 255 255;
2295             color_class: "dark";
2296             align: 1.0 0.5;
2297             fixed: 1 1;
2298             rel1 {
2299                relative: 1.0 0.0;
2300                offset: (-BORDER_PADDING - 1) 0;
2301             }
2302             rel2 {
2303                to: "bg";
2304                offset: (-BORDER_PADDING - 1) -1;
2305             }
2306             text {
2307                text: "12:34";
2308                font: FONT_NORMAL;
2309                size: SIZE_MEDIUM;
2310                min: 1 0;
2311                align: 1.0 0.5;
2312             }
2313          }
2314       }
2315    }
2316 }