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