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