--- /dev/null
+group {
+ name: "elm/scroller/base/multiparty-details";
+
+ script {
+ public sbvis_v, sbalways_v, sbvis_timer;
+ public timer0(val) {
+ new v;
+ v = get_int(sbvis_v);
+ if (v) {
+ v = get_int(sbalways_v);
+ if (!v) {
+ emit("do-hide-vbar", "");
+ set_int(sbvis_v, 0);
+ }
+ }
+ set_int(sbvis_timer, 0);
+ return 0;
+ }
+ }
+
+ parts {
+ part {
+ name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ }
+ }
+
+ part {
+ name: "elm.swallow.content";
+ clip_to: "clipper";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ }
+ }
+
+ part {
+ name: "sb_vbar_clip_master";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ }
+ description {
+ state: "hidden" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "sb_vbar_clip";
+ clip_to: "sb_vbar_clip_master";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ }
+ description {
+ state: "hidden" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "sb_vbar";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ min: 16 16;
+ align: 1.0 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: -1 0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ }
+ }
+
+ part {
+ name: "elm.dragable.vbar";
+ type: RECT;
+ clip_to: "sb_vbar_clip";
+ mouse_events: 0;
+ dragable {
+ x: 0 0 0;
+ y: 1 1 0;
+ confine: "sb_vbar";
+ }
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "light";
+ fixed: 1 1;
+ min: 16 16;
+ max: 16 99999;
+ rel1 {
+ relative: 0.5 0.5;
+ offset: 0 0;
+ to: "sb_vbar";
+ }
+ rel2 {
+ relative: 0.5 0.5;
+ offset: 0 0;
+ to: "sb_vbar";
+ }
+ }
+ }
+ }
+
+ programs {
+ program {
+ signal: "load";
+ source: "";
+ script {
+ set_state(PART:"sb_vbar_clip", "hidden", 0.0);
+ set_int(sbvis_v, 0);
+ set_int(sbalways_v, 0);
+ set_int(sbvis_timer, 0);
+ }
+ }
+
+ program {
+ name: "vbar_show";
+ signal: "elm,action,show,vbar";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sb_vbar_clip_master";
+ }
+
+ program {
+ name: "vbar_hide";
+ signal: "elm,action,hide,vbar";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "sb_vbar_clip_master";
+ }
+
+ program {
+ name: "vbar_show_always";
+ signal: "elm,action,show_always,vbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbvis_v);
+ v |= get_int(sbalways_v);
+ if (!v) {
+ set_int(sbalways_v, 1);
+ emit("do-show-vbar", "");
+ set_int(sbvis_v, 1);
+ }
+ }
+ }
+
+ program {
+ name: "vbar_show_notalways";
+ signal: "elm,action,show_notalways,vbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbalways_v);
+ if (v) {
+ set_int(sbalways_v, 0);
+ v = get_int(sbvis_v);
+ if (!v) {
+ emit("do-hide-vbar", "");
+ set_int(sbvis_v, 0);
+ }
+ }
+ }
+ }
+
+ program {
+ signal: "do-show-vbar";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.5;
+ target: "sb_vbar_clip";
+ }
+
+ program {
+ signal: "do-hide-vbar";
+ source: "";
+ action: STATE_SET "hidden" 0.0;
+ transition: LINEAR 0.5;
+ target: "sb_vbar_clip";
+ }
+
+ program {
+ name: "scroll";
+ signal: "elm,action,scroll";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbvis_v);
+ v |= get_int(sbalways_v);
+ if (!v) {
+ emit("do-show-vbar", "");
+ set_int(sbvis_v, 1);
+ }
+ v = get_int(sbvis_timer);
+ if (v > 0) cancel_timer(v);
+ v = timer(1.0, "timer0", 0);
+ set_int(sbvis_timer, v);
+ }
+ }
+ }
+}
+
+group {
+ name: "elm/layout/dialer/multiparty-details";
+
+ images {
+ image: "bt_multiparty_hangup.png" COMP;
+ image: "bt_multiparty_hangup_confirm.png" COMP;
+ image: "bt_multiparty_private.png" COMP;
+ image: "bt_multiparty_private_confirm.png" COMP;
+ }
+
+ parts {
+ part {
+ name: "cancel.area";
+ type: RECT;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ rel1.offset: -1000 -1000;
+ rel2.offset: 1000 1000;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ programs {
+ program {
+ name: "do_cancel";
+ after: "show_hangup_ico_up";
+ after: "show_hangup_confirm_up_phase1";
+ after: "show_private_ico_up";
+ after: "show_private_confirm_up_phase1";
+ }
+
+ program {
+ name: "ask_raise";
+ action: SIGNAL_EMIT "raise" "call";
+ }
+
+ program {
+ signal: "mouse,down,1";
+ source: "cancel.area";
+ after: "do_cancel";
+ }
+ program {
+ signal: "mouse,down,1";
+ source: "hangup.blocker";
+ after: "do_cancel";
+ }
+ program {
+ signal: "mouse,down,1";
+ source: "private.blocker";
+ after: "do_cancel";
+ }
+
+ program {
+ name: "show_hangup_cancel";
+ after: "ask_raise";
+ after: "show_hangup_cancel_phase2";
+ }
+ program {
+ name: "show_hangup_cancel_phase2";
+ action: STATE_SET "visible" 0.0;
+ target: "cancel.area";
+ target: "private.blocker";
+ transition: ACCELERATE 0.3;
+ }
+
+ program {
+ name: "hide_hangup_cancel";
+ action: STATE_SET "default" 0.0;
+ target: "cancel.area";
+ target: "private.blocker";
+ transition: ACCELERATE 0.3;
+ }
+
+ program {
+ name: "show_private_cancel";
+ after: "ask_raise";
+ after: "show_private_cancel_phase2";
+ }
+ program {
+ name: "show_private_cancel_phase2";
+ action: STATE_SET "visible" 0.0;
+ target: "cancel.area";
+ target: "hangup.blocker";
+ transition: ACCELERATE 0.3;
+ }
+
+ program {
+ name: "hide_private_cancel";
+ action: STATE_SET "default" 0.0;
+ target: "cancel.area";
+ target: "hangup.blocker";
+ transition: ACCELERATE 0.3;
+ }
+ }
+
+ part {
+ name: "hangup.area";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel2 {
+ relative: 0.0 1.0;
+ offset: 101 -1;
+ }
+ }
+ description {
+ state: "confirm" 0.0;
+ inherit: "default" 0.0;
+ rel2 {
+ relative: 0.0 1.0;
+ offset: 127 -1;
+ }
+ }
+ }
+
+ part {
+ name: "hangup.ico";
+ type: IMAGE;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ min: 56 56;
+ max: 56 56;
+ align: 0.0 0.5;
+ rel1.offset: 46 0;
+ rel2 {
+ relative: 0.0 1.0;
+ offset: 101 -1;
+ }
+ image.normal: "bt_multiparty_hangup.png";
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color_class: "light";
+ }
+ description {
+ state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "hangup.confirm";
+ type: IMAGE;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 0;
+ color_class: "caution";
+ visible: 0;
+ min: 128 128;
+ max: 128 128;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 0.0 1.0;
+ offset: 127 -1;
+ }
+ image.normal: "bt_multiparty_hangup_confirm.png";
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ visible: 1;
+ }
+
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 128;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "hangup.blocker";
+ type: RECT;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1.to: "hangup.confirm";
+ rel2.to: "hangup.confirm";
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ programs {
+ program {
+ name: "show_hangup_ico_down";
+ signal: "mouse,down,1";
+ source: "hangup.ico";
+ action: STATE_SET "pressed" 0.0;
+ transition: ACCELERATE 0.1;
+ target: "hangup.ico";
+ }
+
+ program {
+ name: "show_hangup_ico_up";
+ signal: "mouse,up,1";
+ source: "hangup.ico";
+ action: STATE_SET "default" 0.0;
+ in: 0.1 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.ico";
+ }
+
+ program {
+ name: "clicked_hangup_ico_phase1";
+ signal: "mouse,clicked,1";
+ source: "hangup.ico";
+ action: ACTION_STOP;
+ target: "show_hangup_ico_up";
+ after: "clicked_hangup_ico_phase2";
+ }
+ program {
+ name: "clicked_hangup_ico_phase2";
+ action: STATE_SET "hidden" 0.0;
+ target: "hangup.ico";
+ after: "clicked_hangup_ico_phase3.1";
+ after: "clicked_hangup_ico_phase3.2";
+ }
+ program {
+ name: "clicked_hangup_ico_phase3.1";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.confirm";
+ }
+ program {
+ name: "clicked_hangup_ico_phase3.2";
+ action: STATE_SET "confirm" 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.area";
+ after: "show_hangup_cancel";
+ }
+
+ program {
+ name: "show_hangup_confirm_down";
+ signal: "mouse,down,1";
+ source: "hangup.confirm";
+ action: STATE_SET "pressed" 0.0;
+ transition: ACCELERATE 0.1;
+ target: "hangup.confirm";
+ }
+
+ program {
+ name: "show_hangup_confirm_up_phase1";
+ signal: "mouse,up,1";
+ source: "hangup.confirm";
+ action: STATE_SET "hidden" 0.0;
+ in: 0.1 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.confirm";
+ after: "show_hangup_confirm_up_phase2.1";
+ after: "show_hangup_confirm_up_phase2.2";
+ after: "hide_hangup_cancel";
+ }
+ program {
+ name: "show_hangup_confirm_up_phase2.1";
+ action: STATE_SET "default" 0.0;
+ transition: ACCELERATE 0.1;
+ target: "hangup.ico";
+ }
+ program {
+ name: "show_hangup_confirm_up_phase2.2";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.area";
+ }
+
+ program {
+ name: "clicked_hangup_confirm_phase1";
+ signal: "mouse,clicked,1";
+ source: "hangup.confirm";
+ action: ACTION_STOP;
+ target: "show_hangup_confirm_up_phase1";
+ target: "show_hangup_confirm_up_phase2.1";
+ target: "show_hangup_confirm_up_phase2.2";
+ after: "clicked_hangup_confirm_phase2";
+ after: "hide_hangup_cancel";
+ }
+ program {
+ name: "clicked_hangup_confirm_phase2";
+ action: STATE_SET "hidden" 0.0;
+ target: "hangup.confirm";
+ after: "clicked_hangup_confirm_phase3.1";
+ after: "clicked_hangup_confirm_phase3.2";
+ after: "clicked_hangup_confirm_phase3.3";
+ }
+ program {
+ name: "clicked_hangup_confirm_phase3.1";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.ico";
+ }
+ program {
+ name: "clicked_hangup_confirm_phase3.2";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.1;
+ target: "hangup.area";
+ }
+ program {
+ name: "clicked_hangup_confirm_phase3.3";
+ action: SIGNAL_EMIT "clicked,hangup" "call";
+ }
+ }
+
+
+ part {
+ name: "private.area";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: -102 0;
+ }
+ }
+ description {
+ state: "confirm" 0.0;
+ inherit: "default" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: -128 0;
+ }
+ }
+ }
+
+ part {
+ name: "private.ico";
+ type: IMAGE;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ min: 56 56;
+ max: 56 56;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: -102 0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -47 -1;
+ }
+ image.normal: "bt_multiparty_private.png";
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color_class: "light";
+ }
+ description {
+ state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "private.label";
+ type: TEXT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ align: 0.5 0.0;
+ fixed: 1 1;
+ rel1 {
+ to: "private.ico";
+ relative: 0.5 1.0;
+ offset: 0 2;
+ }
+ rel2 {
+ to_x: "private.ico";
+ relative: 0.5 1.0;
+ offset: -1 -1;
+ }
+ text {
+ text: "PRIVATE";
+ font: "Verdana";
+ size: 24;
+ min: 1 1;
+ align: 0.5 0.0;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color_class: "light";
+ }
+ description {
+ state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "private.confirm";
+ type: IMAGE;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 0;
+ color_class: "caution";
+ visible: 0;
+ min: 128 128;
+ max: 128 128;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: -128 0;
+ }
+ image.normal: "bt_multiparty_private_confirm.png";
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ visible: 1;
+ }
+
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 128;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "private.blocker";
+ type: RECT;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1.to: "private.confirm";
+ rel2.to: "private.confirm";
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ programs {
+ program {
+ name: "show_private_ico_down";
+ signal: "mouse,down,1";
+ source: "private.ico";
+ action: STATE_SET "pressed" 0.0;
+ transition: ACCELERATE 0.1;
+ target: "private.ico";
+ target: "private.label";
+ }
+
+ program {
+ name: "show_private_ico_up";
+ signal: "mouse,up,1";
+ source: "private.ico";
+ action: STATE_SET "default" 0.0;
+ in: 0.1 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.ico";
+ target: "private.label";
+ }
+
+ program {
+ name: "clicked_private_ico_phase1";
+ signal: "mouse,clicked,1";
+ source: "private.ico";
+ action: ACTION_STOP;
+ target: "show_private_ico_up";
+ after: "clicked_private_ico_phase2";
+ }
+ program {
+ name: "clicked_private_ico_phase2";
+ action: STATE_SET "hidden" 0.0;
+ target: "private.ico";
+ target: "private.label";
+ after: "clicked_private_ico_phase3.1";
+ after: "clicked_private_ico_phase3.2";
+ }
+ program {
+ name: "clicked_private_ico_phase3.1";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.confirm";
+ }
+ program {
+ name: "clicked_private_ico_phase3.2";
+ action: STATE_SET "confirm" 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.area";
+ after: "show_private_cancel";
+ }
+
+ program {
+ name: "show_private_confirm_down";
+ signal: "mouse,down,1";
+ source: "private.confirm";
+ action: STATE_SET "pressed" 0.0;
+ transition: ACCELERATE 0.1;
+ target: "private.confirm";
+ }
+
+ program {
+ name: "show_private_confirm_up_phase1";
+ signal: "mouse,up,1";
+ source: "private.confirm";
+ action: STATE_SET "hidden" 0.0;
+ in: 0.1 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.confirm";
+ after: "show_private_confirm_up_phase2.1";
+ after: "show_private_confirm_up_phase2.2";
+ after: "hide_private_cancel";
+ }
+ program {
+ name: "show_private_confirm_up_phase2.1";
+ action: STATE_SET "default" 0.0;
+ transition: ACCELERATE 0.1;
+ target: "private.ico";
+ target: "private.label";
+ }
+ program {
+ name: "show_private_confirm_up_phase2.2";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.area";
+ }
+
+ program {
+ name: "clicked_private_confirm_phase1";
+ signal: "mouse,clicked,1";
+ source: "private.confirm";
+ action: ACTION_STOP;
+ target: "show_private_confirm_up_phase1";
+ target: "show_private_confirm_up_phase2.1";
+ target: "show_private_confirm_up_phase2.2";
+ after: "clicked_private_confirm_phase2";
+ after: "hide_private_cancel";
+ }
+ program {
+ name: "clicked_private_confirm_phase2";
+ action: STATE_SET "hidden" 0.0;
+ target: "private.confirm";
+ after: "clicked_private_confirm_phase3.1";
+ after: "clicked_private_confirm_phase3.2";
+ after: "clicked_private_confirm_phase3.3";
+ }
+ program {
+ name: "clicked_private_confirm_phase3.1";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.ico";
+ target: "private.label";
+ }
+ program {
+ name: "clicked_private_confirm_phase3.2";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.1;
+ target: "private.area";
+ }
+ program {
+ name: "clicked_private_confirm_phase3.3";
+ action: SIGNAL_EMIT "clicked,private" "call";
+ }
+ }
+
+ part {
+ name: "elm.text.name";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ api: "name" "party name";
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ rel1 {
+ to_x: "hangup.area";
+ relative: 1.0 0.0;
+ offset: 16 16;
+ }
+ rel2 {
+ to_x: "private.area";
+ relative: 0.0 0.5;
+ offset: -17 0;
+ }
+ text {
+ text: "Name Here";
+ font: "Verdana";
+ size: 58;
+ min: 1 1;
+ align: -1.0 1.0;
+ }
+ }
+ description {
+ state: "alternate" 0.0;
+ inherit: "default" 0.0;
+ color: 255 0 0 255;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "elm.text.number";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ api: "number" "party number";
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "light";
+ rel1 {
+ to_x: "hangup.area";
+ relative: 1.0 0.5;
+ offset: 16 0;
+ }
+ rel2 {
+ to_x: "private.area";
+ relative: 0.0 1.0;
+ offset: -17 -17;
+ }
+ text {
+ text: "3333-4444";
+ font: "Verdana";
+ size: 43;
+ min: 1 1;
+ align: -1.0 0.0;
+ }
+ }
+ description {
+ state: "alternate" 0.0;
+ inherit: "default" 0.0;
+ color_class: "action";
+ rel1 {
+ to_x: "hangup.area";
+ relative: 1.0 0.0;
+ offset: 16 16;
+ }
+ rel2 {
+ to_x: "private.area";
+ relative: 0.0 1.0;
+ offset: -17 -17;
+ }
+ text {
+ text: "3333-4444";
+ font: "Verdana";
+ size: 58;
+ min: 1 1;
+ align: -1.0 0.5;
+ }
+ }
+ }
+
+ programs {
+ program {
+ signal: "show,name";
+ source: "call";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text.name";
+ target: "elm.text.number";
+ }
+
+ program {
+ signal: "hide,name";
+ source: "call";
+ action: STATE_SET "alternate" 0.0;
+ target: "elm.text.name";
+ target: "elm.text.number";
+ }
+ }
+ }
+}
typedef struct _Callscreen
{
Evas_Object *self;
- Evas_Object *multiparty;
+ struct {
+ Evas_Object *sc;
+ Evas_Object *bx;
+ Eina_List *calls;
+ } multiparty;
struct {
OFono_Call *active;
OFono_Call *waiting;
} Callscreen;
static void _on_mp_hangup(void *data, Evas_Object *o __UNUSED__,
- void *event_info __UNUSED__)
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
{
OFono_Call *call = data;
DBG("User ask hangup of multiparty call=%p", call);
ofono_call_hangup(call, NULL, NULL);
}
-static void _on_mp_pvt(void *data, Evas_Object *o __UNUSED__,
- void *event_info __UNUSED__)
+static void _on_mp_pvt_reply(void *data, OFono_Error err)
+{
+ Callscreen *ctx = data;
+
+ DBG("PrivateChat: err=%d", err);
+
+ if (err == OFONO_ERROR_NONE)
+ elm_object_signal_emit(ctx->self, "multiparty,private", "call");
+}
+
+static void _on_mp_pvt(void *data, Evas_Object *o,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
{
+ Callscreen *ctx = evas_object_data_get(o, "callscreen.ctx");
OFono_Call *call = data;
DBG("User ask private chat of multiparty call=%p", call);
- ofono_private_chat(call, NULL, NULL);
+ ofono_private_chat(call, _on_mp_pvt_reply, ctx);
}
-static const char *_call_name_or_id(const OFono_Call *call);
+static void _on_raise(void *data __UNUSED__, Evas_Object *o,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ evas_object_raise(o);
+}
static void _multiparty_update(Callscreen *ctx)
{
- const Elm_Object_Item *item;
Eina_List *new = NULL, *old = NULL;
const Eina_List *n1, *n2;
OFono_Call *c;
+ Evas_Object *it;
EINA_LIST_FOREACH(ctx->calls.list, n1, c) {
if (ofono_call_multiparty_get(c))
new = eina_list_append(new, c);
}
- item = elm_list_first_item_get(ctx->multiparty);
- for (; item != NULL; item = elm_list_item_next(item))
- old = eina_list_append(old, elm_object_item_data_get(item));
-
- if (eina_list_count(new) != eina_list_count(old)) {
- eina_list_free(old);
+ old = ctx->multiparty.calls;
+ if (eina_list_count(new) != eina_list_count(old))
goto repopulate;
- }
for (n1 = new, n2 = old; n1 && n2; n1 = n1->next, n2 = n2->next) {
if (n1->data != n2->data)
break;
}
- eina_list_free(old);
if (n1)
goto repopulate;
eina_list_free(new);
return;
repopulate:
- elm_list_clear(ctx->multiparty);
+ eina_list_free(ctx->multiparty.calls);
+ ctx->multiparty.calls = new;
+
+ elm_box_clear(ctx->multiparty.bx);
+
if (!new) {
elm_object_signal_emit(ctx->self, "hide,multiparty-details",
"call");
return;
}
- EINA_LIST_FREE(new, c) {
- const char *t = _call_name_or_id(c);
- Evas_Object *h = elm_button_add(ctx->multiparty);
- Evas_Object *p = elm_button_add(ctx->multiparty);
- Elm_Object_Item *it;
+ EINA_LIST_FOREACH(new, n1, c) {
+ const char *name, *number;
+
+ name = ofono_call_name_get(c);
+ number = ofono_call_line_id_get(c);
+
+ it = gui_layout_add(ctx->multiparty.bx, "multiparty-details");
+ evas_object_size_hint_align_set(it,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_show(it);
- elm_object_text_set(h, "Hangup");
- evas_object_smart_callback_add(h, "clicked", _on_mp_hangup, c);
+ elm_object_part_text_set(it, "elm.text.name", name);
+ elm_object_part_text_set(it, "elm.text.number", number);
- elm_object_text_set(p, "Private");
- evas_object_smart_callback_add(p, "clicked", _on_mp_pvt, c);
+ if ((!name) || (*name == '\0'))
+ elm_object_signal_emit(it, "hide,name", "call");
+ else
+ elm_object_signal_emit(it, "show,name", "call");
+
+ elm_object_signal_callback_add(it, "clicked,hangup", "call",
+ _on_mp_hangup, c);
+ elm_object_signal_callback_add(it, "clicked,private", "call",
+ _on_mp_pvt, c);
+ elm_object_signal_callback_add(it, "raise", "call",
+ _on_raise, NULL);
+
+ evas_object_data_set(it, "callscreen.ctx", ctx);
+ elm_box_pack_end(ctx->multiparty.bx, it);
- it = elm_list_item_append(ctx->multiparty, t, h, p, NULL, NULL);
- elm_object_item_data_set(it, c);
}
- elm_list_go(ctx->multiparty);
elm_object_signal_emit(ctx->self, "show,multiparty-details", "call");
}
eina_stringshare_del(ctx->disconnected.number);
+ eina_list_free(ctx->multiparty.calls);
+
eina_list_free(ctx->calls.list);
free(ctx);
}
elm_object_part_text_set(obj, "elm.text.status", "");
elm_object_part_text_set(obj, "elm.text.elapsed", "");
- ctx->multiparty = elm_list_add(obj);
- elm_list_select_mode_set(ctx->multiparty, ELM_OBJECT_SELECT_MODE_NONE);
+ ctx->multiparty.sc = elm_scroller_add(obj);
+ elm_scroller_policy_set(ctx->multiparty.sc, ELM_SCROLLER_POLICY_AUTO,
+ ELM_SCROLLER_POLICY_OFF);
+ elm_scroller_bounce_set(ctx->multiparty.sc, EINA_FALSE, EINA_TRUE);
+ elm_object_style_set(ctx->multiparty.sc, "multiparty-details");
+
+ ctx->multiparty.bx = elm_box_add(obj);
+ evas_object_size_hint_weight_set(ctx->multiparty.bx,
+ EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(ctx->multiparty.bx,
+ EVAS_HINT_FILL, 0.0);
+ evas_object_show(ctx->multiparty.bx);
+ elm_object_content_set(ctx->multiparty.sc, ctx->multiparty.bx);
+
elm_object_part_content_set(obj, "elm.swallow.multiparty-details",
- ctx->multiparty);
+ ctx->multiparty.sc);
ofono_call_added_cb_set(_call_added, ctx);
ofono_call_removed_cb_set(_call_removed, ctx);