* 2 - FLOAT: microphone volume 0.0-1.0
* 3 - FLOAT: elapsed time in seconds (> 0.0)
*
- * Where <ID> is: numbers 0 to 9, star, hash, mute, keypad, speaker,
- * merge, swap, contacts, answer, hangup, waiting-hangup, hold-answer,
- * hangup-answer, multiparty, held-multiparty, multiparty-details
+ * Where <ID> is: numbers 0 to 9, star, hash, mute, keypad,
+ * speaker, add-call, merge, swap, contacts, answer, hangup,
+ * waiting-hangup, hold-answer, hangup-answer, multiparty,
+ * held-multiparty, multiparty-details
*
* Where <STATE> is: disconnected, active, held, dialing, alerting,
* incoming, waiting.
image: "bt_keypad_released.png" COMP;
image: "bt_speaker_pressed.png" COMP;
image: "bt_speaker_released.png" COMP;
+ image: "bt_add_call_pressed.png" COMP;
+ image: "bt_add_call_released.png" COMP;
image: "bt_merge_pressed.png" COMP;
image: "bt_merge_released.png" COMP;
image: "bt_swap_pressed.png" COMP;
} \
}
+#define ACTION_HIDEABLE(id, img, r1, r2) \
+ part { \
+ name: "clipper."##id; \
+ type: RECT; \
+ clip_to: "clipper.actions"; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ rel1.to: "button."##id; \
+ rel2.to: "button."##id; \
+ } \
+ description { \
+ state: "hidden" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 0; \
+ visible: 0; \
+ } \
+ } \
+ part { \
+ name: "button."##id; \
+ type: IMAGE; \
+ mouse_events: 1; \
+ clip_to: "clipper."##id; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ color_class: "action"; \
+ min: 240 170; \
+ max: 240 170; \
+ fixed: 1 1; \
+ rel1 { \
+ to: "bg.actions"; \
+ relative: r1; \
+ } \
+ rel2 { \
+ to: "bg.actions"; \
+ relative: r2; \
+ offset: -1 -1; \
+ } \
+ image.normal: "bt_"##img"_released.png"; \
+ } \
+ description { \
+ state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 0; \
+ visible: 0; \
+ } \
+ } \
+ part { \
+ name: "button.over."##id; \
+ type: IMAGE; \
+ clip_to: "clipper."##id; \
+ mouse_events: 0; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 0; \
+ visible: 0; \
+ color_class: "action"; \
+ rel1.to: "button."##id; \
+ rel2.to: "button."##id; \
+ image.normal: "bt_"##img"_pressed.png"; \
+ } \
+ description { \
+ state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ visible: 1; \
+ } \
+ } \
+ programs { \
+ program { \
+ signal: "mouse,up,1"; \
+ source: "button."##id; \
+ action: SIGNAL_EMIT "released,"##id "call"; \
+ after: "show_up_"##id; \
+ api: id"_released" id" was released"; \
+ } \
+ program { \
+ name: "show_up_"##id; \
+ action: STATE_SET "default" 0.0; \
+ transition: DECELERATE 0.1; \
+ target: "button."##id; \
+ target: "button.over."##id; \
+ } \
+ program { \
+ signal: "mouse,down,1"; \
+ source: "button."##id; \
+ after: "show_down_"##id; \
+ action: SIGNAL_EMIT "pressed,"##id "call"; \
+ api: id"_pressed" id" was pressed"; \
+ } \
+ program { \
+ name: "show_down_"##id; \
+ action: STATE_SET "pressed" 0.0; \
+ transition: ACCELERATE 0.1; \
+ target: "button."##id; \
+ target: "button.over."##id; \
+ } \
+ program { \
+ signal: "mouse,clicked,1"; \
+ source: "button."##id; \
+ action: SIGNAL_EMIT "clicked,"##id "call"; \
+ api: id"_clicked" id" was clicked"; \
+ } \
+ program { \
+ name: "hide_"##id; \
+ signal: "hide,"##id; \
+ source: "call"; \
+ action: STATE_SET "hidden" 0.0; \
+ target: "clipper."##id; \
+ api: id"_hide" "hide "##id; \
+ } \
+ program { \
+ name: "show_"##id; \
+ signal: "show,"##id; \
+ source: "call"; \
+ action: STATE_SET "default" 0.0; \
+ target: "clipper."##id; \
+ api: id"_show" "show "##id; \
+ } \
+ }
+
#define ACTION_TOGGLE(id, img, r1, r2) \
part { \
name: "clipper."##id; \
ACTION_BUTTON("keypad", "keypad", 0.333333333 0.0, 0.666666666 0.5);
ACTION_TOGGLE("speaker", "speaker", 0.666666666 0.0, 1.000000000 0.5);
- ACTION_BUTTON("merge", "merge", 0.000000000 0.5, 0.333333333 1.0);
+ ACTION_HIDEABLE("merge", "merge", 0.000000000 0.5, 0.333333333 1.0);
+ ACTION_HIDEABLE("add-call", "add_call",0.000000000 0.5, 0.333333333 1.0);
+
ACTION_BUTTON("swap", "swap", 0.333333333 0.5, 0.666666666 1.0);
ACTION_BUTTON("contacts", "contacts",0.666666666 0.5, 1.000000000 1.0);
#undef ACTION_BUTTON
SEPARATOR("answer", "clipper.answer", 0.0, -8, "button.answer");
SEPARATOR("hangup", "clipper.multiparty-details-hidden", 0.0, -8, "button.hangup");
+ programs {
+ program {
+ signal: "enable,merge";
+ source: "call";
+ after: "hide_add-call";
+ after: "show_merge";
+ }
+ program {
+ signal: "disable,merge";
+ source: "call";
+ after: "show_add-call";
+ after: "hide_merge";
+ }
+ }
+
part {
name: "clipper.keypad-hidden";
type: RECT;