#define CU_BTN_ACCESSORY_EFF_PRESSED_SIZE 144 144
#define CU_BTN_ACCESSORY_ICON_SIZE 50 50
+#define CU_BTN_MORE_OPT_TXT_SIZE 100 32
+
#define CU_BTN_INCOM_CALL(_name, _icon, _bg_cc, _effect_cc, _icon_norm_cc, _icon_pressed_cc) \
group { "elm/button/base/"_name; \
script { \
} \
program { "disable_event_pass"; \
signal: "elm,event,pass,disabled"; \
- source:"elm"; \
+ source: "elm"; \
script { \
set_mouse_events(PART:"event", 1); \
} \
} \
program { "disable_event_repeat"; \
signal: "elm,event,repeat,disabled"; \
- source:"elm"; \
+ source: "elm"; \
script { \
set_repeat_events(PART:"event", 0); \
} \
} \
}
+styles {
+ style { "more_btn_norm";
+ base: "font=Tizen font_weight=Regular font_width=Condensed font_size=24 align=center valign=center color=#FFFFFF ellipsis=1.0";
+ }
+ style { "more_btn_dim";
+ base: "font=Tizen font_weight=Regular font_width=Condensed font_size=24 align=center valign=center color=#4D4D4D ellipsis=1.0";
+ }
+}
+
+#define CU_BTN_MORE_OPTION(_name, _icon) \
+ group { "elm/button/base/"_name; \
+ images { \
+ image: "w_more_circle_bg.png" COMP; \
+ image: _icon COMP; \
+ } \
+ parts { \
+ image { "icon.bg"; \
+ scale; \
+ desc { "default"; \
+ aspect: 1 1; \
+ aspect_preference: BOTH; \
+ align: 0.5 0.0; \
+ image.normal: "w_more_circle_bg.png"; \
+ color_class: "AO0110"; \
+ } \
+ desc { "pressed"; \
+ inherit: "default"; \
+ color_class: "AO0110P"; \
+ } \
+ desc { "disabled"; \
+ inherit: "default"; \
+ color_class: "AO0110D"; \
+ } \
+ } \
+ image { "icon"; \
+ scale; \
+ desc { "default"; \
+ aspect: 1 1; \
+ aspect_preference: BOTH; \
+ align: 0.5 0.0; \
+ image.normal: _icon; \
+ color_class: "AO0181"; \
+ } \
+ desc { "pressed"; \
+ inherit: "default"; \
+ color_class: "AO0181P"; \
+ } \
+ desc { "disabled"; \
+ inherit: "default"; \
+ color_class: "AO0181D"; \
+ } \
+ } \
+ textblock { "elm.text"; \
+ scale; \
+ desc { "default"; \
+ min: CU_BTN_MORE_OPT_TXT_SIZE; \
+ max: CU_BTN_MORE_OPT_TXT_SIZE; \
+ align: 0.5 1.0; \
+ text.style: "more_btn_norm"; \
+ } \
+ desc { "pressed"; \
+ inherit: "default"; \
+ } \
+ desc { "disabled"; \
+ inherit: "default"; \
+ text.style: "more_btn_dim"; \
+ } \
+ } \
+ rect { "event"; \
+ mouse; \
+ desc { "default"; \
+ color: 0 0 0 0; \
+ } \
+ desc { "disabled"; \
+ inherit: "default"; \
+ hid; \
+ } \
+ } \
+ } \
+ script { \
+ public mouse_down = 0; \
+ public multi_down = 0; \
+ public disabled = 0; \
+ } \
+ programs { \
+ program { "pressed"; \
+ signal: "mouse,down,1*"; \
+ source: "event"; \
+ action: SIGNAL_EMIT "elm,action,press" ""; \
+ after: "on_pressed"; \
+ } \
+ program { "unpressed"; \
+ signal: "mouse,up,1*"; \
+ source: "event"; \
+ action: SIGNAL_EMIT "elm,action,unpress" ""; \
+ after: "on_unpressed"; \
+ } \
+ program { "clicked"; \
+ signal: "mouse,clicked,1"; \
+ source: "event"; \
+ action: SIGNAL_EMIT "elm,action,click" ""; \
+ after: "on_clicked"; \
+ } \
+ program { "enabled"; \
+ signal: "elm,state,enabled"; \
+ source: "elm"; \
+ action: STATE_SET "default"; \
+ target: "event"; \
+ after: "on_enabled"; \
+ } \
+ program { "disabled"; \
+ signal: "elm,state,disabled"; \
+ source: "elm"; \
+ action: STATE_SET "disabled"; \
+ target: "event"; \
+ after: "on_disabled"; \
+ } \
+ program { "enable_event_pass"; \
+ signal: "elm,event,pass,enabled"; \
+ source: "elm"; \
+ script { \
+ set_mouse_events(PART:"event", 0); \
+ } \
+ } \
+ program { "disable_event_pass"; \
+ signal: "elm,event,pass,disabled"; \
+ source: "elm"; \
+ script { \
+ set_mouse_events(PART:"event", 1); \
+ } \
+ } \
+ program { "enable_event_repeat"; \
+ signal: "elm,event,repeat,enabled"; \
+ source: "elm"; \
+ script { \
+ set_repeat_events(PART:"event", 1); \
+ } \
+ } \
+ program { "disable_event_repeat"; \
+ signal: "elm,event,repeat,disabled"; \
+ source: "elm"; \
+ script { \
+ set_repeat_events(PART:"event", 0); \
+ } \
+ } \
+ program { "on_pressed"; \
+ script { \
+ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) { \
+ set_int(mouse_down, 1); \
+ if (!get_int(disabled)) { \
+ set_state(PART:"icon.bg", "pressed", 0.0); \
+ set_state(PART:"icon", "pressed", 0.0); \
+ set_state(PART:"elm.text", "pressed", 0.0); \
+ } \
+ } \
+ } \
+ } \
+ program { "on_unpressed"; \
+ script { \
+ if (get_int(mouse_down) == 1) { \
+ set_int(mouse_down, 0); \
+ if (!get_int(disabled)) { \
+ set_state(PART:"icon.bg", "default", 0.0); \
+ set_state(PART:"icon", "default", 0.0); \
+ set_state(PART:"elm.text", "default", 0.0); \
+ } \
+ } \
+ } \
+ } \
+ program { "on_clicked"; \
+ script { \
+ if (get_int(multi_down) == 0) { \
+ if (!get_int(disabled)) { \
+ run_program(PROGRAM:"play_sample"); \
+ } \
+ } \
+ } \
+ } \
+ program { \
+ name: "play_sample"; \
+ action: RUN_PLUGIN "touch_sound"; \
+ } \
+ program { "on_disabled"; \
+ script { \
+ set_int(disabled, 1); \
+ set_state(PART:"icon.bg", "disabled", 0.0); \
+ set_state(PART:"icon", "disabled", 0.0); \
+ set_state(PART:"elm.text", "disabled", 0.0); \
+ set_state(PART:"event", "disabled", 0.0); \
+ } \
+ } \
+ program { "on_enabled"; \
+ script { \
+ set_int(disabled, 0); \
+ set_state(PART:"icon.bg", "default", 0.0); \
+ set_state(PART:"icon", "default", 0.0); \
+ set_state(PART:"elm.text", "default", 0.0); \
+ set_state(PART:"event", "default", 0.0); \
+ } \
+ } \
+ program { "multi_down"; \
+ signal: "elm,action,multi,down"; \
+ source: "elm"; \
+ script { \
+ set_int(multi_down, 1); \
+ } \
+ } \
+ program { "multi_up"; \
+ signal: "elm,action,multi,up"; \
+ source: "elm"; \
+ script { \
+ set_int(multi_down, 0); \
+ } \
+ } \
+ } \
+ }
+
+
CU_BTN_INCOM_CALL("callui/accept", "w_call_incoming_icon_accept.png", "AO01131", "AO01132", "AO0113", "AO0113P")
CU_BTN_INCOM_CALL("callui/reject", "w_call_incoming_icon_reject.png", "AO01151", "AO01152", "AO0115", "AO0115P")
CU_BTN_VOLUME_CONTROL("callui/plus", "b_slider_icon_plus.png")
CU_BTN_ACCESSORY("callui/volume", "w_outgoing_icon_volume.png", 1.0, 1.0)
-CU_BTN_ACCESSORY("callui/mute", "w_outgoing_icon_mute.png", 0.0, 0.0)
\ No newline at end of file
+CU_BTN_ACCESSORY("callui/mute", "w_outgoing_icon_mute.png", 0.0, 0.0)
+
+CU_BTN_MORE_OPTION("callui/swap", "w_call_option_icon_volume_swap.png")
+CU_BTN_MORE_OPTION("callui/unhold", "w_call_option_icon_volume_unhold.png")
+CU_BTN_MORE_OPTION("callui/headset", "w_call_option_icon_headset.png")
+CU_BTN_MORE_OPTION("callui/phone", "w_call_option_icon_device.png")
+CU_BTN_MORE_OPTION("callui/keypad", "w_call_option_icon_keypad.png")
+CU_BTN_MORE_OPTION("callui/gear", "w_call_option_icon_volume_towatch.png")
desc { "default";
rel1 { relative: 0.5 0.0; to: "zone.text_info"; }
rel2 { relative: 0.5 1.0; to: "zone.text_info"; }
+ max: 208 32;
text {
style: "call_status";
min: 1 0;
set_state(PART:"top.pad", "default", 0.0);
set_state(PART:"zone.text_1line", "default", 0.0);
set_state(PART:"text_1line", "default", 0.0);
+ set_int(b_set_photo, 0);
}
}
program {
signal: "caller_id_enable";
source: "text_1line";
script {
- set_int(b_set_photo, 1);
set_state(PART:"text_1line", "photo", 0.0);
set_state(PART:"text_info", "photo", 0.0);
}
signal: "caller_id_disable";
source: "text_1line";
script {
- set_int(b_set_photo, 0);
set_state(PART:"text_1line", "default", 0.0);
set_state(PART:"text_info", "default", 0.0);
}
signal: "caller_id_enable";
source: "caller_id";
script {
+ set_int(b_set_photo, 1);
set_state(PART:"caller_id.mask", "incoming", 0.0);
}
}
signal: "caller_id_disable";
source: "caller_id";
script {
+ set_int(b_set_photo, 0);
set_state(PART:"caller_id.mask", "default", 0.0);
}
}
color_class { name: "AO012D";
color: 255 255 255 77;
}
+ // More options
+ color_class { name: "AO0110";
+ color: 250 250 250 255;
+ }
+ color_class { name: "AO0110P";
+ color: 191 191 191 255;
+ }
+ color_class { name: "AO0110D";
+ color: 77 77 77 255;
+ }
+ color_class { name: "AO0181";
+ color: 20 20 20 255;
+ }
+ color_class { name: "AO0181P";
+ color: 50 156 209 255;
+ }
+ color_class { name: "AO0181D";
+ color: 51 51 51 255;
+ }
}
desc { "default";
}
}
+ swallow { "swl.more_option";
+ scale;
+ desc { "default";
+ }
+ }
}
}
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define CU_MORE_OPT_TXT_TOP_PAD 161
+
+#define CU_MORE_OPT_TXT_SMALL_W 112
+#define CU_MORE_OPT_TXT_SMALL_H 36
+
+#define CU_MORE_OPT_TXT_BIG_W 100
+#define CU_MORE_OPT_TXT_BIG_H 39
+
+#define CU_MORE_OPT_BTN_TOP_X 130
+#define CU_MORE_OPT_BTN_TOP_Y 21
+
+#define CU_MORE_OPT_BTN_LEFT_X 21
+#define CU_MORE_OPT_BTN_LEFT_Y 130
+
+#define CU_MORE_OPT_BTN_RIGHT_X 239
+#define CU_MORE_OPT_BTN_RIGHT_Y 130
+
+#define CU_MORE_OPT_BTN_BOTTOM_X 130
+#define CU_MORE_OPT_BTN_BOTTOM_Y 219
+
+#define CU_MORE_OPT_BTN_W 100
+#define CU_MORE_OPT_BTN_H 135
+
+#define CU_MORE_OPT_BTN_TOP_REL1 CU_REL_W(CU_MORE_OPT_BTN_TOP_X) CU_REL_H(CU_MORE_OPT_BTN_TOP_Y)
+#define CU_MORE_OPT_BTN_TOP_REL2 CU_REL_W((CU_MORE_OPT_BTN_TOP_X + CU_MORE_OPT_BTN_W)) CU_REL_H((CU_MORE_OPT_BTN_TOP_Y + CU_MORE_OPT_BTN_H))
+
+#define CU_MORE_OPT_BTN_LEFT_REL1 CU_REL_W(CU_MORE_OPT_BTN_LEFT_X) CU_REL_H(CU_MORE_OPT_BTN_LEFT_Y)
+#define CU_MORE_OPT_BTN_LEFT_REL2 CU_REL_W((CU_MORE_OPT_BTN_LEFT_X + CU_MORE_OPT_BTN_W)) CU_REL_H((CU_MORE_OPT_BTN_LEFT_Y + CU_MORE_OPT_BTN_H))
+
+#define CU_MORE_OPT_BTN_RIGHT_REL1 CU_REL_W(CU_MORE_OPT_BTN_RIGHT_X) CU_REL_H(CU_MORE_OPT_BTN_RIGHT_Y)
+#define CU_MORE_OPT_BTN_RIGHT_REL2 CU_REL_W((CU_MORE_OPT_BTN_RIGHT_X+CU_MORE_OPT_BTN_W)) CU_REL_H((CU_MORE_OPT_BTN_RIGHT_Y + CU_MORE_OPT_BTN_H))
+
+#define CU_MORE_OPT_BTN_BOTTOM_REL1 CU_REL_W(CU_MORE_OPT_BTN_BOTTOM_X) CU_REL_H(CU_MORE_OPT_BTN_BOTTOM_Y)
+#define CU_MORE_OPT_BTN_BOTTOM_REL2 CU_REL_W((CU_MORE_OPT_BTN_BOTTOM_X + CU_MORE_OPT_BTN_W)) CU_REL_H((CU_MORE_OPT_BTN_BOTTOM_Y + CU_MORE_OPT_BTN_H))
+
+styles {
+ style { "more_opt_status_big";
+ base: "font=Tizen font_weight=Regular font_width=Condensed font_size=30 align=center valign=center color=#4DCFFF ellipsis=1.0";
+ }
+ style { "more_opt_status_small";
+ base: "font=Tizen font_weight=Regular font_width=Condensed font_size=27 align=center valign=center color=#4DCFFF ellipsis=1.0";
+ }
+}
+
+group { "elm/layout/callui/more_option";
+ parts {
+ rect { "bg";
+ scale;
+ desc { "default";
+ min: CU_WIN_W CU_WIN_H;
+ max: CU_WIN_W CU_WIN_H;
+ fixed: 1 1;
+ color: 0 0 0 255;
+ }
+ }
+ spacer { "txt.pad.top";
+ scale;
+ desc { "default";
+ min: 0 CU_MORE_OPT_TXT_TOP_PAD;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 0.0; to: "bg"; }
+ align: 0.0 0.0;
+ }
+ }
+ textblock { "txt.status";
+ scale;
+ desc { "default";
+ min: CU_MORE_OPT_TXT_BIG_W CU_MORE_OPT_TXT_BIG_H;
+ max: CU_MORE_OPT_TXT_BIG_W CU_MORE_OPT_TXT_BIG_H;
+ fixed: 1 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "txt.pad.top"; }
+ rel2 { relative: 1.0 1.0; to_y: "txt.pad.top"; }
+ text.style: "more_opt_status_big";
+ }
+ desc { "small";
+ inherit: "default";
+ min: CU_MORE_OPT_TXT_SMALL_W CU_MORE_OPT_TXT_SMALL_H;
+ max: CU_MORE_OPT_TXT_SMALL_W CU_MORE_OPT_TXT_SMALL_H;
+ text.style: "more_opt_status_small";
+ }
+ }
+ swallow { "swl.top";
+ scale;
+ desc { "default";
+ fixed: 1 1;
+ rel1 { relative: CU_MORE_OPT_BTN_TOP_REL1; to: "bg";}
+ rel2 { relative: CU_MORE_OPT_BTN_TOP_REL2; to: "bg";}
+ }
+ }
+ swallow { "swl.left";
+ scale;
+ desc { "default";
+ fixed: 1 1;
+ rel1 { relative: CU_MORE_OPT_BTN_LEFT_REL1; to: "bg";}
+ rel2 { relative: CU_MORE_OPT_BTN_LEFT_REL2; to: "bg";}
+ }
+ }
+ swallow { "swl.right";
+ scale;
+ desc { "default";
+ fixed: 1 1;
+ rel1 { relative: CU_MORE_OPT_BTN_RIGHT_REL1; to: "bg";}
+ rel2 { relative: CU_MORE_OPT_BTN_RIGHT_REL2; to: "bg";}
+ }
+ }
+ swallow { "swl.bottom";
+ scale;
+ desc { "default";
+ fixed: 1 1;
+ rel1 { relative: CU_MORE_OPT_BTN_BOTTOM_REL1; to: "bg";}
+ rel2 { relative: CU_MORE_OPT_BTN_BOTTOM_REL2; to: "bg";}
+ }
+ }
+ }
+ programs {
+ program {
+ signal: "status_txt_big";
+ source: "";
+ action: STATE_SET "default";
+ target: "txt.status";
+ }
+ program {
+ signal: "status_txt_small";
+ source: "";
+ action: STATE_SET "small";
+ target: "txt.status";
+ }
+ }
+}
}
}
+group { "elm/layout/callui/slider";
+ parts {
+ swallow { "swl.slider";
+ scale;
+ desc { "default";
+ }
+ }
+ }
+}
+
group { "elm/layout/callui/volume_control";
images {
image: "b_slider_btn_bg.png" COMP;
image: "w_call_opt_volume.png" COMP;
}
parts {
- spacer { "sizer"
- scale;
- desc { "default";
- min: 360 360;
- }
- }
rect { "bg";
scale;
desc { "default";
swallow { "swl.slider";
scale;
desc { "default";
- rel1.to: "sizer";
- rel2.to: "sizer";
}
}
spacer { "pad.top";
desc { "default";
min: CU_VOLUME_PAD_TOP_MIN;
fixed: 0 1;
- rel1 { relative: 0.0 0.0; to: "sizer"; }
- rel2 { relative: 1.0 0.0; to: "sizer"; }
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
align: 0.0 0.0;
}
}
desc { "default";
min: CU_VOLUME_PAD_BOTTOM_MIN;
fixed: 0 1;
- rel1 { relative: 0.0 1.0; to: "sizer"; }
- rel2 { relative: 1.0 1.0; to: "sizer"; }
+ rel1 { relative: 0.0 1.0; }
+ rel2 { relative: 1.0 1.0; }
align: 0.0 1.0;
}
}
desc { "default";
min: CU_VOLUME_ICON_SIZE;
max: CU_VOLUME_ICON_SIZE;
- rel1.to: "sizer";
- rel2.to: "sizer";
image.normal: "b_slider_btn_bg.png";
}
desc { "hide";
desc { "default";
min: CU_VOLUME_ICON_SIZE;
max: CU_VOLUME_ICON_SIZE;
- rel1.to: "sizer";
- rel2.to: "sizer";
image.normal: "w_call_opt_volume.png";
color: 0 0 0 255;
}
ucl::Result prepare(ucl::ElmWidget &parent, bool isMuteControlDisabled = false);
ucl::Result createWidget(ucl::ElmWidget &parent);
+ ucl::Result createSlider();
ucl::Result createVolumeControl();
ucl::Result createVolumeBtn();
ucl::Result createMuteBtn();
ucl::LayoutSRef m_widget;
ucl::StyledWidgetSRef m_volumeBtn;
ucl::StyledWidgetSRef m_muteBtn;
+ SliderSRef m_slider;
VolumeControlSRef m_vc;
ISoundManagerSRef m_sm;
Ecore_Timer *m_vcTimer;
ICallInfoSCRef m_heldCallInfo;
ICallInfoSCRef m_endCallInfo;
CallStatusSRef m_callStatus;
- bool m_isCallerIdEnable;
bool m_isEmergency;
bool m_isSubTxtEnable;
bool m_needModifyCallStatus;
void RejectMsgSelectCb(const IRejectMsgSRef &rm);
ucl::Result createCallInfoPresenter(CallMode mode);
-
ucl::Result createAccessoryPresenter();
+ ucl::Result createMoreOptionsPresenter();
ucl::Result createBottomBtn(const ucl::ElmStyle &style);
void onBottomBtnClicked(ucl::Widget &widget, void *eventInfo);
AcceptRejectPresenterSRef m_acceptRejectPrs;
RejectMsgPresenterSRef m_rmPrs;
AccessoryPresenterSRef m_accessoryPrs;
+ MoreOptionsPresenterSRef m_moreOptions;
CallMode m_mode;
Ecore_Timer *m_ecTimer;
bool m_ecTimerBtnReq;
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_PRESENTERS_MORE_OPTIONS_PRESENTER_H__
+#define __CALLUI_PRESENTERS_MORE_OPTIONS_PRESENTER_H__
+
+#include "Presenter.h"
+
+#include "ucl/gui/Layout.h"
+#include "ucl/gui/StyledWidget.h"
+
+#include "types.h"
+
+namespace callui {
+
+ class MoreOptionsPresenter final : public Presenter {
+ public:
+ class Builder {
+ public:
+ Builder();
+ ~Builder();
+ Builder &setCallManager(const ICallManagerSRef &cm);
+ MoreOptionsPresenterSRef build(ucl::ElmWidget &parent) const;
+ private:
+ ICallManagerSRef m_cm;
+ };
+
+ public:
+ ucl::Widget &getWidget();
+ ucl::Result update();
+
+ private:
+ friend class ucl::RefCountObj<MoreOptionsPresenter>;
+ MoreOptionsPresenter(ucl::RefCountObjBase &rc, const ICallManagerSRef &cm);
+ virtual ~MoreOptionsPresenter();
+
+ ucl::Result prepare(ucl::ElmWidget &parent);
+
+ ucl::Result createWidget(ucl::ElmWidget &parent);
+ ucl::Result createPanel();
+ ucl::Result createPanelLayout();
+ ucl::Result createButtons();
+ ucl::StyledWidgetSRef createButton(const ucl::ElmStyle &style,
+ const ucl::TString &txt,
+ const ucl::WidgetEventHandler &handler);
+
+ ucl::Result updateSlots();
+ ucl::Result updateTopSlot();
+ ucl::Result updateLeftSlot();
+ ucl::Result updateRightSlot();
+ ucl::Result updateBottomSlot();
+
+ ucl::Result updateStatusText();
+ void updateStatusFontSize();
+
+ void onSwapBtnClick(ucl::Widget &sender, void *eventInfo);
+ void onUnholdBtnClick(ucl::Widget &sender, void *eventInfo);
+ void onHeadsetBtnClick(ucl::Widget &sender, void *eventInfo);
+ void onPhoneBtnClick(ucl::Widget &sender, void *eventInfo);
+ void onKeypadBtnClick(ucl::Widget &sender, void *eventInfo);
+ void onGearBtnClick(ucl::Widget &sender, void *eventInfo);
+
+ void onBackKey(Evas_Object *obj, void *eventInfo);
+
+ void onActivate(Evas_Object *obj, const char *emission, const char *source);
+ void onInactivate(Evas_Object *obj, const char *emission, const char *source);
+
+ ucl::Result startCallDurationTimer();
+ void stopCallDurationTimer();
+ Eina_Bool onCallDurationTimerCb();
+
+ private:
+ ucl::LayoutSRef m_widget;
+ ucl::StyledWidgetSRef m_panel;
+ ucl::LayoutSRef m_panelLy;
+ ucl::StyledWidgetSRef m_btnSwap;
+ ucl::StyledWidgetSRef m_btnUnhold;
+ ucl::StyledWidgetSRef m_btnHeadset;
+ ucl::StyledWidgetSRef m_btnPhone;
+ ucl::StyledWidgetSRef m_btnKeypad;
+ ucl::StyledWidgetSRef m_btnGear;
+
+ ICallManagerSRef m_cm;
+ ICallInfoWCRef m_info;
+
+ Ecore_Timer *m_timer;
+ struct tm m_duration;
+ };
+}
+
+#endif // __CALLUI_PRESENTERS_MORE_OPTIONS_PRESENTER_H__
UCL_DECLARE_REF_ALIASES(RejectMsgPresenter);
UCL_DECLARE_REF_ALIASES(AccessoryPresenter);
+ UCL_DECLARE_REF_ALIASES(MoreOptionsPresenter);
using AcceptDialogHandler = ucl::WeakDelegate<bool(AcceptDialog &, AcceptDialogEvent)>;
using RejectMsgStateHandler = ucl::WeakDelegate<void(RejectMsgState)>;
extern const ucl::TString STR_DECLINE_MESSAGES;
extern const ucl::TString STR_VOLUME;
+
+ extern const ucl::TString STR_MORE_SWAP;
+ extern const ucl::TString STR_MORE_HEADSET;
+ extern const ucl::TString STR_MORE_PHONE;
+ extern const ucl::TString STR_MORE_KEYPAD;
+ extern const ucl::TString STR_MORE_HOLD;
+ extern const ucl::TString STR_MORE_UNHOLD;
+ extern const ucl::TString STR_MORE_TRANSFER;
+ extern const ucl::TString STR_MORE_GEAR;
}
#endif // __CALLUI_RESOURCES_H__
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_VIEW_SLIDER_H__
+#define __CALLUI_VIEW_SLIDER_H__
+
+#include "ucl/gui/Layout.h"
+
+#include "types.h"
+
+namespace callui {
+
+ class Slider : public ucl::ElmWidget {
+ public:
+ class Builder {
+ public:
+ Builder();
+ Builder &setMaxValue(int maxValue);
+ Builder &setValue(int curValue);
+ SliderSRef build(ucl::ElmWidget &parent) const;
+
+ private:
+ int m_maxValue;
+ int m_curValue;
+ };
+
+ public:
+ virtual void setValue(int value);
+ virtual void setMaxValue(int maxValue);
+
+ protected:
+ friend class ucl::RefCountObj<Slider>;
+ Slider(ucl::RefCountObjBase &rc,
+ const ucl::LayoutSRef &layout,
+ int maxValue,
+ int curValue);
+ virtual ~Slider();
+
+ private:
+ void prepare(int maxValue, int curValue);
+
+ protected:
+ ucl::LayoutWRef m_layout;
+ ucl::Layout m_circleLy;
+ Eext_Circle_Surface *m_circleSurf;
+ ucl::ElmWidget m_slider;
+ };
+
+}
+
+#endif // __CALLUI_VIEW_SLIDER_H__
#ifndef __CALLUI_VIEW_VOLUME_CONTROL_H__
#define __CALLUI_VIEW_VOLUME_CONTROL_H__
+#include <view/Slider.h>
#include "ucl/gui/StyledWidget.h"
#include "ucl/gui/Layout.h"
namespace callui {
- class VolumeControl final : public ucl::ElmWidget {
+ class VolumeControl final : public Slider {
public:
class Builder {
public:
Builder();
Builder &setInfoText(const ucl::TString &info);
- Builder &setMaxSliderValue(int maxValue);
- Builder &setSliderValue(int curValue);
- Builder &setShowControls(bool isShown);
+ Builder &setMaxValue(int maxValue);
+ Builder &setValue(int curValue);
Builder &setEventHandler(const VolumeControlEventHandler &handler);
VolumeControlSRef build(ucl::ElmWidget &parent) const;
ucl::TString m_info;
int m_maxValue;
int m_curValue;
- bool m_showControls;
VolumeControlEventHandler m_handler;
};
public:
- void showControls();
- void hideControls();
- bool getControlsVisibilityState();
void setInfoText(const ucl::TString &info);
- void setSliderValue(int value);
- void setMaxSliderValue(int maxValue);
void setDecreaseBtnEnable(bool isEnable);
void setIncreaseBtnEnable(bool isEnable);
void setEventHandler(const VolumeControlEventHandler &handler);
+ // Slider
+
+ virtual void setValue(int value) override final;
+
private:
friend class ucl::RefCountObj<VolumeControl>;
VolumeControl(ucl::RefCountObjBase &rc,
const ucl::TString &info,
int maxValue,
int curValue,
- bool showControls,
const VolumeControlEventHandler &handler);
+
virtual ~VolumeControl();
- void prepare(const ucl::TString &info,
- int maxValue,
- int curValue,
- bool showControls);
+ void prepare(const ucl::TString &info, int curValue);
void onDecreaseBtnClickedCb(ucl::Widget &widget, void *eventInfo);
void onIncreaseBtnClickedCb(ucl::Widget &widget, void *eventInfo);
private:
- ucl::LayoutWRef m_layout;
- ucl::ElmWidget m_slider;
ucl::StyledWidget m_decreaseBtn;
ucl::StyledWidget m_increaseBtn;
VolumeControlEventHandler m_handler;
- bool m_isControlsShown;
};
}
DECREASE
};
+ UCL_DECLARE_REF_ALIASES(Slider);
UCL_DECLARE_REF_ALIASES(VolumeControl);
using VolumeControlEventHandler = ucl::WeakDelegate<void(VolumeControlEvent)>;
#include "../../edc/reject_msg.edc"
#include "../../edc/volume_control.edc"
#include "../../edc/accessory.edc"
+ #include "../../edc/more_option.edc"
}
#include "model/ISoundManager.h"
#include "view/VolumeControl.h"
+
#include "resources.h"
#include "common.h"
constexpr LayoutTheme LAYOUT_ACCESSORY_WIDGET
{"layout", "callui", "accessory"};
- constexpr EdjePart PART_SWL_VOLUME_CONTROL {"swl.volume_control"};
+ constexpr EdjePart PART_SWL_VOLUME_SLIDER {"swl.volume_control"};
constexpr EdjePart PART_SWL_SOUND {"swl.sound"};
constexpr EdjePart PART_SWL_MUTE {"swl.mute"};
FAIL_RETURN(createWidget(parent), "createWidget() failed");
+ FAIL_RETURN(createSlider(), "createSlider() failed");
+
FAIL_RETURN(createVolumeControl(), "createVolumeControl() failed");
FAIL_RETURN(createVolumeBtn(), "createVolumeBtn() failed");
registerCallbacks();
+ updateVolume(m_sm->getVolume());
+
setMuteControlDisabled(isMuteControlDisabled);
return RES_OK;
void AccessoryPresenter::hideVolumeControls()
{
stopVCTimer();
- m_vc->hideControls();
+ hide(*m_vc);
}
void AccessoryPresenter::setMuteControlDisabled(bool isDisabled)
return RES_OK;
}
+ Result AccessoryPresenter::createSlider()
+ {
+ m_slider = Slider::Builder().
+ setMaxValue(m_sm->getMaxVolume()).
+ build(*m_widget);
+ if (!m_slider) {
+ LOG_RETURN(RES_FAIL, "Slider::build() failed");
+ }
+
+ m_widget->setContent(*m_slider, impl::PART_SWL_VOLUME_SLIDER);
+
+ return RES_OK;
+ }
+
Result AccessoryPresenter::createVolumeControl()
{
m_vc = VolumeControl::Builder().
setInfoText(STR_VOLUME).
- setMaxSliderValue(m_sm->getMaxVolume()).
- setShowControls(false).
+ setMaxValue(m_sm->getMaxVolume()).
setEventHandler(WEAK_DELEGATE(
- AccessoryPresenter::onVolumeControlEventCb,
- asWeak(*this))).
+ AccessoryPresenter::onVolumeControlEventCb,
+ asWeak(*this))).
build(*m_widget);
if (!m_vc) {
LOG_RETURN(RES_FAIL, "VolumeControl::build() failed");
}
- updateVolume(m_sm->getVolume());
- m_widget->setContent(*m_vc, impl::PART_SWL_VOLUME_CONTROL);
+ auto window = m_vc->getWindow();
+ if (!window) {
+ LOG_RETURN(RES_FAIL, "Window is NULL!");
+ }
+ int w = 0, h = 0;
+ window->getScreenSize(&w, &h);
+
+ m_vc->move(0, 0);
+ m_vc->resize(w, h);
+ hide(*m_vc);
return RES_OK;
}
void AccessoryPresenter::onVolumeBtnClicked(Widget &widget, void *eventInfo)
{
- m_vc->showControls();
+ show(*m_vc);
startVCTimer();
}
Eina_Bool AccessoryPresenter::onVCTimerCb()
{
- m_vc->hideControls();
+ hide(*m_vc);
m_vcTimer = nullptr;
return ECORE_CALLBACK_CANCEL;
Eina_Bool AccessoryPresenter::onRotaryEvent(Eext_Rotary_Event_Info *info)
{
+ if (!isActive()) {
+ LOG_RETURN_VALUE(RES_OK, EINA_TRUE, "Presenter is not active. Ignore");
+ }
+
if (m_vcTimer) {
restartVCTimer();
} else {
- m_vc->showControls();
+ show(*m_vc);
startVCTimer();
}
(m_audioState == AudioStateType::BT &&
state != AudioStateType::BT)) {
m_audioState = state;
- m_vc->setSliderValue(0);
- m_vc->setMaxSliderValue(m_sm->getMaxVolume());
+
+ m_vc->setValue(0);
+ m_slider->setValue(0);
+
+ auto maxVol = m_sm->getMaxVolume();
+ m_vc->setMaxValue(maxVol);
+ m_slider->setMaxValue(maxVol);
+
updateVolume(m_sm->getVolume());
}
}
void AccessoryPresenter::updateVolume(int value)
{
- m_vc->setSliderValue(value);
+ m_vc->setValue(value);
+ m_slider->setValue(value);
auto max = m_sm->getMaxVolume();
auto cur = m_sm->getVolume();
constexpr int SUB_TXT_WIDTH = 208;
constexpr int MAIN_TXT_WIDTH_SIMPLE = 208;
constexpr int MAIN_TXT_WIDTH_INCOM = 190;
- constexpr int SLIDE_LABEL_DURATION_KOEFF = 8;
+ constexpr int SLIDE_LABEL_DURATION_KOEFF = 20;
constexpr LayoutTheme LAYOUT_CALLER_INFO_WIDGET
{"layout", "callui", "call_info"};
CallMode mode):
Presenter(rc),
m_mode(mode),
- m_isCallerIdEnable(false),
m_isEmergency(false),
m_isSubTxtEnable(false),
m_needModifyCallStatus(false)
m_mode = mode;
initCallInfos(cm);
- m_isCallerIdEnable = false;
m_isEmergency = false;
m_isSubTxtEnable = false;
Result CallInfoPresenter::createLabel(const std::string &text)
{
TString tmp;
- if (m_isCallerIdEnable) {
+ if (m_callerId) {
tmp = impl::STR_LABEL_CALLER_ID_ENABLE.format(text.c_str());
} else {
tmp = impl::STR_LABEL_CALLER_ID_DISABLE.format(text.c_str());
}
- int duration = text.size() / impl::SLIDE_LABEL_DURATION_KOEFF;
+ double duration = (static_cast<double>(text.size())) /
+ impl::SLIDE_LABEL_DURATION_KOEFF;
auto label = makeShared<StyledWidget>(elm_label_add(*m_widget), true);
if (!label) {
Result CallInfoPresenter::updateCallerId()
{
- m_isCallerIdEnable = false;
-
m_callerId.reset();
m_widget->emit(impl::SIGN_CALLER_ID_DISABLE, impl::SRC_CALLER_ID);
m_widget->emit(impl::SIGN_CALLER_ID_ENABLE, impl::SRC_CALLER_ID);
m_callerId = callerId;
-
- m_isCallerIdEnable = true;
}
return RES_OK;
m_isSubTxtEnable = true;
TString tmp;
- if (m_isCallerIdEnable) {
+ if (m_callerId) {
tmp = impl::STR_LABEL_CALLER_ID_ENABLE.format(subTxt.c_str());
} else {
tmp = impl::STR_LABEL_CALLER_ID_DISABLE.format(subTxt.c_str());
}
if (m_mode == CallMode::INCOMING) {
- if (m_isCallerIdEnable) {
+ if (m_callerId) {
m_widget->emit(impl::SIGN_CALLER_ID_ENABLE, impl::SRC_TXT_1LINE);
} else {
m_widget->emit(impl::SIGN_CALLER_ID_DISABLE, impl::SRC_TXT_1LINE);
constexpr EdjeSignalSrc SIGN_SRC_DOT{"dot"};
- const TString STR_HH_MM_SS_TIME{"%02d:%02d:%02d"};
- const TString STR_MM_SS_TIME{"%02d:%02d"};
-
- void setCallDuration(const struct tm &time,
- EdjeWidget &widget,
- const EdjePart &part)
- {
- TString tmp;
- if (time.tm_hour > 0) {
- tmp = STR_HH_MM_SS_TIME.format(time.tm_hour, time.tm_min, time.tm_sec);
- } else {
- tmp = STR_MM_SS_TIME.format(time.tm_min, time.tm_sec);
- }
- widget.setText(tmp, part);
- }
-
- void tryUpdateCallDurationTime(
- struct tm &curTime,
- struct tm &compTime,
- EdjeWidget &widget,
- const EdjePart &part)
- {
- if ((compTime.tm_sec - curTime.tm_sec) != 0) {
- curTime = compTime;
- setCallDuration(curTime, widget, part);
- }
- }
-
}}}
namespace callui {
}
struct tm tmp = m_info->getDuration();
- impl::tryUpdateCallDurationTime(
+ tryUpdateCallDurationTime(
m_duration,
tmp,
*m_ly,
m_ly->setText(STR_ON_HOLD, impl::PART_TXT_TEXT_INFO);
} else {
m_duration = m_info->getDuration();
- impl::setCallDuration(m_duration, *m_ly, impl::PART_TXT_TEXT_INFO);
+ setCallDuration(m_duration, *m_ly, impl::PART_TXT_TEXT_INFO);
if (m_timer) {
ecore_timer_del(m_timer);
Eina_Bool CallStatus::onBlinkingTimerCb()
{
if ((m_blinkCount % 2) == 0) {
- impl::setCallDuration(m_duration, *m_ly, impl::PART_TXT_TEXT_INFO);
+ setCallDuration(m_duration, *m_ly, impl::PART_TXT_TEXT_INFO);
} else if ((m_blinkCount % 2) == 1) {
m_ly->setText("", impl::PART_TXT_TEXT_INFO);
}
#include "presenters/CallInfoPresenter.h"
#include "presenters/RejectMsgPresenter.h"
#include "presenters/AccessoryPresenter.h"
+#include "presenters/MoreOptionsPresenter.h"
#include "resources.h"
#include "common.h"
constexpr EdjePart PART_SWL_REJECT_MSG {"swl.rm"};
constexpr EdjePart PART_SWL_BOTTOM_BTN {"swl.bottom_btn"};
constexpr EdjePart PART_SWL_OVERLAY {"swl.overlay"};
+ constexpr EdjePart PART_SWL_MORE_OPTION {"swl.more_option"};
constexpr EdjePart PART_TXT_REJECT_MSG {"reject_msg_text"};
void MainPage::onActivateBy(const DeactivatorInfo &info)
{
- if (info.deactivator == &getNaviframe()) {
- if (m_rmPrs) {
- m_rmPrs->activateBy(info.deactivator);
- }
+ if (info.isBroadcast) {
+ return;
+ }
+
+ if (m_rmPrs) {
+ m_rmPrs->activateBy(info.deactivator);
}
if (m_acceptRejectPrs) {
m_acceptRejectPrs->activateBy(info.deactivator);
}
+
+ if (m_accessoryPrs) {
+ m_accessoryPrs->activateBy(info.deactivator);
+ }
}
void MainPage::onDeactivateBy(const DeactivatorInfo &info)
{
- if (info.deactivator == &getNaviframe()) {
- if (m_rmPrs) {
- m_rmPrs->deactivateBy(info.deactivator);
- }
+ if (info.isBroadcast) {
+ return;
+ }
+
+ if (m_rmPrs) {
+ m_rmPrs->deactivateBy(info.deactivator);
}
if (m_acceptRejectPrs) {
m_acceptRejectPrs->deactivateBy(info.deactivator);
}
+
+ if (m_accessoryPrs) {
+ m_accessoryPrs->deactivateBy(info.deactivator);
+ }
}
void MainPage::processKeyPress()
if (m_mode == CallMode::INCOMING) {
m_accessoryPrs.reset();
+ m_moreOptions.reset();
+
FAIL_RETURN_VOID(processIncomingCall(),
"processIncomingCall() failed!");
} else {
if (m_mode == CallMode::END) {
m_accessoryPrs.reset();
+ m_moreOptions.reset();
startEndCallTimer();
} else {
FAIL_RETURN_VOID(createAccessoryPresenter(),
"createAccessoryPresenter() failed");
+ FAIL_RETURN_VOID(createMoreOptionsPresenter(),
+ "createMoreOptionsPresenter() failed");
FAIL_RETURN_VOID(createBottomBtn(impl::STYLE_BB_END_CALL),
"createBottomBtn() failed");
Result MainPage::createAccessoryPresenter()
{
if (m_accessoryPrs) {
- ILOG("Already exists. No need to create new one");
+ ILOG("Already exists. No need to create new one. Just update.");
m_accessoryPrs->setMuteControlDisabled(
detectMuteControlDisableState());
return RES_OK;
"AccessoryPresenter::build() failed!");
}
- m_widget->setContent(m_accessoryPrs->getWidget().getEo(),
+ m_widget->setContent(m_accessoryPrs->getWidget(),
impl::PART_SWL_OVERLAY);
return RES_OK;
}
+ Result MainPage::createMoreOptionsPresenter()
+ {
+ if (m_moreOptions) {
+ ILOG("Already exists. No need to create new one. Just update.");
+ return m_moreOptions->update();
+ }
+
+ m_moreOptions = MoreOptionsPresenter::Builder().
+ setCallManager(m_cm).
+ build(*m_widget);
+
+ if (!m_moreOptions) {
+ LOG_RETURN(RES_FAIL,
+ "MoreOptionsPresenter::build() failed!");
+ }
+
+ m_widget->setContent(m_moreOptions->getWidget(),
+ impl::PART_SWL_MORE_OPTION);
+ addDeactivatorSource(m_moreOptions->getWidget());
+
+ return RES_OK;
+ }
+
Result MainPage::createAcceptRejectPresenter()
{
if (m_acceptRejectPrs) {
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "presenters/MoreOptionsPresenter.h"
+
+#include "ucl/gui/Layout.h"
+
+#include "model/ICallManager.h"
+#include "model/IHeldCall.h"
+#include "model/IActiveCall.h"
+#include "model/ICallInfo.h"
+
+#include "resources.h"
+#include "common.h"
+
+namespace callui { namespace { namespace impl {
+
+ using namespace ucl;
+
+ constexpr auto CALL_DURATION_TIMER_INTERVAL = 0.1;
+
+ constexpr LayoutTheme LAYOUT_DRAWER_PANEL
+ {"layout", "drawer", "panel"};
+
+ constexpr LayoutTheme LAYOUT_MORE_OPTION_WIDGET
+ {"layout", "callui", "more_option"};
+
+ constexpr EdjePart PART_SWL_RIGHT {"elm.swallow.right"};
+
+ constexpr ElmStyle STYLE_BTN_SWAP {"callui/swap"};
+ constexpr ElmStyle STYLE_BTN_UNHOLD {"callui/unhold"};
+ constexpr ElmStyle STYLE_BTN_HEADSET {"callui/headset"};
+ constexpr ElmStyle STYLE_BTN_PHONE {"callui/phone"};
+ constexpr ElmStyle STYLE_BTN_KEYPAD {"callui/keypad"};
+ constexpr ElmStyle STYLE_BTN_GEAR {"callui/gear"};
+
+ constexpr EdjePart PART_SWL_PANEL_LY_TOP {"swl.top"};
+ constexpr EdjePart PART_SWL_PANEL_LY_LEFT {"swl.left"};
+ constexpr EdjePart PART_SWL_PANEL_LY_RIGHT {"swl.right"};
+ constexpr EdjePart PART_SWL_PANEL_LY_BOTTOM {"swl.bottom"};
+
+ constexpr EdjePart PART_TXT_STATUS {"txt.status"};
+
+ constexpr EdjeSignal SIGNAL_STATUS_TXT_BIG {"status_txt_big"};
+ constexpr EdjeSignal SIGNAL_STATUS_TXT_SMALL {"status_txt_small"};
+
+}}}
+
+namespace callui {
+
+ using namespace ucl;
+
+ // MoreOptionsPresenter::Builder
+
+ MoreOptionsPresenter::Builder::Builder()
+ {
+ }
+
+ MoreOptionsPresenter::Builder::~Builder()
+ {
+ }
+
+ MoreOptionsPresenter::Builder &MoreOptionsPresenter::Builder::setCallManager(const ICallManagerSRef &cm)
+ {
+ m_cm = cm;
+ return *this;
+ }
+
+ MoreOptionsPresenterSRef MoreOptionsPresenter::Builder::build(ElmWidget &parent) const
+ {
+ if (!m_cm) {
+ LOG_RETURN_VALUE(RES_FAIL, {}, "Call Manager is not set");
+ }
+
+ auto result = makeShared<MoreOptionsPresenter>(m_cm);
+ FAIL_RETURN_VALUE(result->prepare(parent), {},
+ "result->prepare() failed!");
+
+ return result;
+ }
+
+ // MoreOptionsPresenter
+
+ MoreOptionsPresenter::MoreOptionsPresenter(RefCountObjBase &rc, const ICallManagerSRef &cm):
+ Presenter(rc),
+ m_cm(cm),
+ m_timer(nullptr)
+ {
+ }
+
+ MoreOptionsPresenter::~MoreOptionsPresenter()
+ {
+ stopCallDurationTimer();
+
+ if (m_widget) {
+ eext_object_event_callback_del(*m_widget, EEXT_CALLBACK_BACK,
+ CALLBACK_A(MoreOptionsPresenter::onBackKey));
+
+ sendActivateBy(*m_widget, this);
+ }
+ }
+
+ Result MoreOptionsPresenter::prepare(ElmWidget &parent)
+ {
+ FAIL_RETURN(Presenter::prepare(parent), "Presenter::prepare() failed!");
+
+ FAIL_RETURN(createWidget(parent), "createWidget() failed!");
+
+ FAIL_RETURN(createPanel(), "createPanel() failed!");
+
+ FAIL_RETURN(createPanelLayout(), "createPanelContent() failed!");
+
+ FAIL_RETURN(createButtons(), "createButtons() failed!");
+
+ FAIL_RETURN(update(), "update() failed!");
+
+ addDeactivatorException(this);
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::createWidget(ElmWidget &parent)
+ {
+ m_widget = Layout::Builder().
+ setTheme(impl::LAYOUT_DRAWER_PANEL).
+ setIsOwner(true).
+ build(parent);
+
+ if (!m_widget) {
+ LOG_RETURN(RES_FAIL, "Layout::build() failed!");
+ }
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::createPanel()
+ {
+ auto *eo = elm_panel_add(*m_widget);
+ if (!eo) {
+ LOG_RETURN(RES_FAIL, "elm_panel_add() failed!");
+ }
+ m_panel = makeShared<StyledWidget>(eo, true);
+ elm_panel_orient_set(*m_panel, ELM_PANEL_ORIENT_RIGHT);
+ show(*m_panel);
+
+ m_widget->setContent(*m_panel, impl::PART_SWL_RIGHT);
+
+ elm_panel_toggle(*m_panel);
+
+ elm_layout_signal_callback_add(*m_panel, "elm,state,active,finished",
+ "elm", CALLBACK_A(MoreOptionsPresenter::onActivate), this);
+
+ elm_layout_signal_callback_add(*m_panel, "elm,state,inactive,finished",
+ "elm", CALLBACK_A(MoreOptionsPresenter::onInactivate), this);
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::createPanelLayout()
+ {
+ m_panelLy = Layout::Builder().
+ setTheme(impl::LAYOUT_MORE_OPTION_WIDGET).
+ build(*m_panel);
+ if (!m_panelLy) {
+ LOG_RETURN(RES_FAIL, "Layout::build() failed!");
+ }
+ show(*m_panelLy);
+ m_panel->setContent(*m_panelLy);
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::updateSlots()
+ {
+ FAIL_RETURN(updateTopSlot(), "updateTopSlot() failed");
+ FAIL_RETURN(updateLeftSlot(), "updateLeftSlot() failed");
+ FAIL_RETURN(updateRightSlot(), "updateRightSlot() failed");
+ FAIL_RETURN(updateBottomSlot(), "updateBottomSlot() failed");
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::updateTopSlot()
+ {
+ auto active = m_cm->getActiveCall();
+ auto held = m_cm->getHeldCall();
+
+ auto *eo = m_panelLy->unsetContent(impl::PART_SWL_PANEL_LY_TOP);
+ if (eo) {
+ hide(*asWidget(eo));
+ }
+
+ if (active) {
+ if (held) {
+ m_panelLy->setContent(*m_btnSwap, impl::PART_SWL_PANEL_LY_TOP);
+ show(*m_btnSwap);
+ }
+ } else if (held) {
+ m_panelLy->setContent(*m_btnUnhold, impl::PART_SWL_PANEL_LY_TOP);
+ show(*m_btnUnhold);
+ } else {
+ LOG_RETURN(RES_FAIL, "Undefined state");
+ }
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::updateLeftSlot()
+ {
+ auto *eo = m_panelLy->unsetContent(impl::PART_SWL_PANEL_LY_LEFT);
+ if (eo) {
+ hide(*asWidget(eo));
+ }
+
+ m_panelLy->setContent(*m_btnHeadset, impl::PART_SWL_PANEL_LY_LEFT);
+ show(*m_btnHeadset);
+ disable(*m_btnHeadset);
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::updateRightSlot()
+ {
+ auto *eo = m_panelLy->unsetContent(impl::PART_SWL_PANEL_LY_RIGHT);
+ if (eo) {
+ hide(*asWidget(eo));
+ }
+
+ m_panelLy->setContent(*m_btnPhone, impl::PART_SWL_PANEL_LY_RIGHT);
+ show(*m_btnPhone);
+ disable(*m_btnPhone);
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::updateBottomSlot()
+ {
+ auto *eo = m_panelLy->unsetContent(impl::PART_SWL_PANEL_LY_BOTTOM);
+ if (eo) {
+ hide(*asWidget(eo));
+ }
+
+ m_panelLy->setContent(*m_btnKeypad, impl::PART_SWL_PANEL_LY_BOTTOM);
+ show(*m_btnKeypad);
+ disable(*m_btnKeypad);
+
+ return RES_OK;
+ }
+
+ Result MoreOptionsPresenter::createButtons()
+ {
+ // Swap
+ m_btnSwap = createButton(impl::STYLE_BTN_SWAP, STR_MORE_SWAP,
+ WEAK_DELEGATE(MoreOptionsPresenter::onSwapBtnClick,
+ asWeak(*this)));
+ if (!m_btnSwap) {
+ LOG_RETURN(RES_FAIL, "Create Swap button failed!");
+ }
+
+ // Unhold
+ m_btnUnhold = createButton(impl::STYLE_BTN_UNHOLD, STR_MORE_UNHOLD,
+ WEAK_DELEGATE(MoreOptionsPresenter::onUnholdBtnClick,
+ asWeak(*this)));
+ if (!m_btnUnhold) {
+ LOG_RETURN(RES_FAIL, "Create Unhold button failed!");
+ }
+
+ // Headset
+ m_btnHeadset = createButton(impl::STYLE_BTN_HEADSET, STR_MORE_HEADSET,
+ WEAK_DELEGATE(MoreOptionsPresenter::onHeadsetBtnClick,
+ asWeak(*this)));
+ if (!m_btnHeadset) {
+ LOG_RETURN(RES_FAIL, "Create Headset button failed!");
+ }
+
+ // Phone
+ m_btnPhone = createButton(impl::STYLE_BTN_PHONE, STR_MORE_PHONE,
+ WEAK_DELEGATE(MoreOptionsPresenter::onPhoneBtnClick,
+ asWeak(*this)));
+ if (!m_btnPhone) {
+ LOG_RETURN(RES_FAIL, "Create Phone button failed!");
+ }
+
+ // Keypad
+ m_btnKeypad = createButton(impl::STYLE_BTN_KEYPAD, STR_MORE_KEYPAD,
+ WEAK_DELEGATE(MoreOptionsPresenter::onKeypadBtnClick,
+ asWeak(*this)));
+ if (!m_btnKeypad) {
+ LOG_RETURN(RES_FAIL, "Create Keypad button failed!");
+ }
+
+ // Gear
+ m_btnGear = createButton(impl::STYLE_BTN_GEAR, STR_MORE_GEAR,
+ WEAK_DELEGATE(MoreOptionsPresenter::onGearBtnClick,
+ asWeak(*this)));
+ if (!m_btnGear) {
+ LOG_RETURN(RES_FAIL, "Create Gear button failed!");
+ }
+
+ return RES_OK;
+ }
+
+ void MoreOptionsPresenter::onSwapBtnClick(Widget &sender, void *eventInfo)
+ {
+ auto held = m_cm->getHeldCall();
+ if (!held) {
+ LOG_RETURN_VOID(RES_FAIL, "Held call is NULL");
+ }
+ FAIL_RETURN_VOID(held->swapWithActive(), "swapWithActive() failed");
+ }
+
+ void MoreOptionsPresenter::onUnholdBtnClick(Widget &sender, void *eventInfo)
+ {
+ auto held = m_cm->getHeldCall();
+ if (!held) {
+ LOG_RETURN_VOID(RES_FAIL, "Held call is NULL");
+ }
+ FAIL_RETURN_VOID(held->unhold(), "unhold() failed");
+ }
+
+ void MoreOptionsPresenter::onHeadsetBtnClick(Widget &sender, void *eventInfo)
+ {
+ ELOG("Not implemented");
+ }
+
+ void MoreOptionsPresenter::onPhoneBtnClick(Widget &sender, void *eventInfo)
+ {
+ ELOG("Not implemented");
+ }
+
+ void MoreOptionsPresenter::onKeypadBtnClick(Widget &sender, void *eventInfo)
+ {
+ ELOG("Not implemented");
+ }
+
+ void MoreOptionsPresenter::onGearBtnClick(Widget &sender, void *eventInfo)
+ {
+ ELOG("Not implemented");
+ }
+
+ StyledWidgetSRef MoreOptionsPresenter::createButton(
+ const ElmStyle &style,
+ const TString &txt,
+ const WidgetEventHandler &handler)
+ {
+ auto *eo = elm_button_add(*m_panelLy);
+ if (!eo) {
+ LOG_RETURN_VALUE(RES_FAIL, {}, "elm_button_add() failed!");
+ }
+ auto btn = makeShared<StyledWidget>(eo, true);
+ btn->setStyle(style);
+ btn->setText(txt);
+ btn->addEventHandler(BTN_CLICKED, handler);
+ hide(*btn);
+
+ btn->bindToEo();
+
+ return btn;
+ }
+
+ Widget &MoreOptionsPresenter::getWidget()
+ {
+ return *m_widget;
+ }
+
+ Result MoreOptionsPresenter::update()
+ {
+ FAIL_RETURN(updateSlots(), "updateSlots() failed!");
+
+ FAIL_RETURN(updateStatusText(), "updateStatusText() failed!");
+
+ return RES_OK;
+ }
+
+ void MoreOptionsPresenter::onActivate(Evas_Object *obj, const char *emission, const char *source)
+ {
+ eext_object_event_callback_add(*m_widget, EEXT_CALLBACK_BACK,
+ CALLBACK_A(MoreOptionsPresenter::onBackKey), this);
+
+ const auto keepAliver = asShared(*this);
+ sendDeactivateBy(*m_widget, this);
+ activateBy(m_widget.get());
+ }
+
+ void MoreOptionsPresenter::onInactivate(Evas_Object *obj, const char *emission, const char *source)
+ {
+ eext_object_event_callback_del(*m_widget, EEXT_CALLBACK_BACK,
+ CALLBACK_A(MoreOptionsPresenter::onBackKey));
+
+ const auto keepAliver = asShared(*this);
+ deactivateBy(m_widget.get());
+ sendActivateBy(*m_widget, this);
+ }
+
+ void MoreOptionsPresenter::onBackKey(Evas_Object *obj, void *eventInfo)
+ {
+ if (isActive() && !elm_panel_hidden_get(*m_panel)) {
+ elm_panel_toggle(*m_panel);
+ }
+ }
+
+ Result MoreOptionsPresenter::updateStatusText()
+ {
+ m_panelLy->setText("", impl::PART_TXT_STATUS);
+
+ auto active = m_cm->getActiveCall();
+ auto held = m_cm->getHeldCall();
+
+ if (held && !active) {
+ m_panelLy->setText(STR_ON_HOLD, impl::PART_TXT_STATUS);
+ m_panelLy->emit(impl::SIGNAL_STATUS_TXT_BIG);
+ } else if (active) {
+ if (active->isDialingMode()) {
+ m_panelLy->setText(STR_DIALING_CALL, impl::PART_TXT_STATUS);
+ m_panelLy->emit(impl::SIGNAL_STATUS_TXT_BIG);
+ return RES_OK;
+ }
+ m_info = active->getInfo();
+ if (!m_info) {
+ LOG_RETURN(RES_FAIL, "Call Info is NULL");
+ }
+ m_duration = m_info->getDuration();
+ setCallDuration(m_duration, *m_panelLy, impl::PART_TXT_STATUS);
+ updateStatusFontSize();
+
+ FAIL_RETURN(startCallDurationTimer(), "startTimer() failed!");
+
+ } else {
+ LOG_RETURN(RES_FAIL, "Undefined state");
+ }
+
+ return RES_OK;
+ }
+
+ void MoreOptionsPresenter::updateStatusFontSize()
+ {
+ if (m_duration.tm_hour > 0) {
+ m_panelLy->emit(impl::SIGNAL_STATUS_TXT_SMALL);
+ } else {
+ m_panelLy->emit(impl::SIGNAL_STATUS_TXT_BIG);
+ }
+ }
+
+ Eina_Bool MoreOptionsPresenter::onCallDurationTimerCb()
+ {
+ if (!m_info) {
+ m_timer = nullptr;
+ LOG_RETURN_VALUE(RES_FAIL, ECORE_CALLBACK_CANCEL, "m_info is NULL");
+ }
+
+ struct tm tmp = m_info->getDuration();
+ tryUpdateCallDurationTime(
+ m_duration,
+ tmp,
+ *m_panelLy,
+ impl::PART_TXT_STATUS);
+ updateStatusFontSize();
+
+ return ECORE_CALLBACK_RENEW;
+ }
+
+ Result MoreOptionsPresenter::startCallDurationTimer()
+ {
+ stopCallDurationTimer();
+
+ m_timer = ecore_timer_add(impl::CALL_DURATION_TIMER_INTERVAL,
+ CALLBACK_B(MoreOptionsPresenter::onCallDurationTimerCb),
+ this);
+
+ if (!m_timer) {
+ LOG_RETURN(RES_FAIL, "m_timer is NULL");
+ }
+
+ return RES_OK;
+ }
+
+ void MoreOptionsPresenter::stopCallDurationTimer()
+ {
+ if (m_timer) {
+ ecore_timer_del(m_timer);
+ m_timer = nullptr;
+ }
+ }
+}
#include "model/IRejectMsgProvider.h"
#include "model/IRejectMsg.h"
-#include "helpers.h"
#include "resources.h"
#include "common.h"
FAIL_RETURN(createGenlist(),
"createGenlist() failed!");
+ addDeactivatorException(this);
+
deactivateBy(m_widget.get());
return RES_OK;
#include "view/helpers.h"
+#include "helpers.h"
+
#include "../common.h"
#include "../view/common.h"
* limitations under the License.
*/
-#include "helpers.h"
-
#include "common.h"
+namespace callui { namespace { namespace himpl {
+
+ const TString STR_HH_MM_SS_TIME{"%02d:%02d:%02d"};
+ const TString STR_MM_SS_TIME{"%02d:%02d"};
+
+}}}
+
namespace callui {
using namespace ucl;
}
}
+ void setCallDuration(const struct tm &time,
+ EdjeWidget &widget,
+ const EdjePart &part)
+ {
+ TString tmp;
+ if (time.tm_hour > 0) {
+ tmp = himpl::STR_HH_MM_SS_TIME.format(time.tm_hour, time.tm_min, time.tm_sec);
+ } else {
+ tmp = himpl::STR_MM_SS_TIME.format(time.tm_min, time.tm_sec);
+ }
+ widget.setText(tmp, part);
+ }
+
+ void tryUpdateCallDurationTime(
+ struct tm &curTime,
+ struct tm &compTime,
+ EdjeWidget &widget,
+ const EdjePart &part)
+ {
+ if ((compTime.tm_sec - curTime.tm_sec) != 0) {
+ curTime = compTime;
+ setCallDuration(curTime, widget, part);
+ }
+ }
+
}
#define __CALLUI_PRESENTERS_HELPERS_H__
#include <string>
+#include <time.h>
+
+#include "ucl/gui/EdjeWidget.h"
+#include "ucl/gui/types.h"
namespace callui {
void replaceSubstringInString(std::string &str,
const std::string &from, const std::string &to);
+
+ void setCallDuration(const struct tm &time,
+ ucl::EdjeWidget &widget, const ucl::EdjePart &part);
+
+ void tryUpdateCallDurationTime(
+ struct tm &curTime, struct tm &compTime,
+ ucl::EdjeWidget &widget, const ucl::EdjePart &part);
}
#endif // __CALLUI_PRESENTERS_HELPERS_H__
const ucl::TString STR_DECLINE_MESSAGES {"Decline messages"};
const ucl::TString STR_VOLUME {"Volume"};
+
+ const ucl::TString STR_MORE_SWAP {"Swap"};
+ const ucl::TString STR_MORE_HEADSET {"Headset"};
+ const ucl::TString STR_MORE_PHONE {"Phone"};
+ const ucl::TString STR_MORE_KEYPAD {"Keypad"};
+ const ucl::TString STR_MORE_HOLD {"Hold"};
+ const ucl::TString STR_MORE_UNHOLD {"Unhold"};
+ const ucl::TString STR_MORE_GEAR {"Gear"};
}
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <view/Slider.h>
+
+#include "common.h"
+
+namespace callui { namespace { namespace impl {
+
+ using namespace ucl;
+
+ constexpr LayoutTheme LAYOUT_SLIDER
+ {"layout", "callui", "slider"};
+
+ constexpr ElmStyle STYLE_BTN_MINUS {"callui/minus"};
+ constexpr ElmStyle STYLE_BTN_PLUS {"callui/plus"};
+
+ constexpr EdjePart PART_SWL_SLIDER {"swl.slider"};
+ constexpr EdjePart PART_SWL_MINUS {"swl.minus"};
+ constexpr EdjePart PART_SWL_PLUS {"swl.plus"};
+
+ constexpr EdjePart PART_TXT_INFO {"txt.info"};
+ constexpr EdjePart PART_TXT_VALUE {"txt.value"};
+
+ constexpr EdjeSignal SIGNAL_SHOW_CONTROLS {"show_controls"};
+ constexpr EdjeSignal SIGNAL_HIDE_CONTROLS {"hide_controls"};
+
+ constexpr EdjeSignalSrc SIGNAL_SRC_VOICE_CONTROL {"volume_control"};
+}}}
+
+namespace callui {
+
+ using namespace ucl;
+
+ Slider::Builder::Builder():
+ m_maxValue(0),
+ m_curValue(0)
+ {
+ }
+
+ Slider::Builder &Slider::Builder::setMaxValue(int maxValue)
+ {
+ m_maxValue = maxValue;
+ return *this;
+ }
+
+ Slider::Builder &Slider::Builder::setValue(int curValue)
+ {
+ m_curValue = curValue;
+ return *this;
+ }
+
+ SliderSRef Slider::Builder::build(ElmWidget &parent) const
+ {
+ auto layout = Layout::Builder().
+ setTheme(impl::LAYOUT_SLIDER).
+ setIsOwner(true).
+ build(parent);
+ if (!layout) {
+ LOG_RETURN_VALUE(RES_FAIL, {}, "Layout::build() failed!");
+ }
+
+ auto result = makeShared<Slider>(layout, m_maxValue, m_curValue);
+
+ result->bindToEo();
+
+ return result;
+ }
+
+ Slider::Slider(RefCountObjBase &rc,
+ const LayoutSRef &layout,
+ int maxValue,
+ int curValue):
+ ElmWidget(&rc, *layout, true),
+ m_layout(layout),
+ m_circleLy(elm_layout_add(*m_layout)),
+ m_circleSurf(eext_circle_surface_layout_add(m_circleLy)),
+ m_slider(eext_circle_object_slider_add(*m_layout, m_circleSurf))
+ {
+ prepare(maxValue, curValue);
+ }
+
+ Slider::~Slider()
+ {
+ }
+
+ void Slider::prepare(int maxValue, int curValue)
+ {
+ m_layout->setIsOwner(false);
+
+ evas_object_size_hint_align_set(m_slider,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(m_slider,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ m_circleLy.setContent(m_slider);
+ m_layout->setContent(m_circleLy, impl::PART_SWL_SLIDER);
+ show(m_circleLy);
+ show(m_slider);
+ show(*m_layout);
+
+ setMaxValue(maxValue);
+ setValue(curValue);
+ }
+
+ void Slider::setValue(int value)
+ {
+ eext_circle_object_value_set(m_slider, static_cast<double>(value));
+ m_layout->setText(std::to_string(value), impl::PART_TXT_VALUE);
+ }
+
+ void Slider::setMaxValue(int maxValue)
+ {
+ eext_circle_object_value_min_max_set(m_slider, 0, maxValue);
+ }
+}
VolumeControl::Builder::Builder():
m_maxValue(0),
- m_curValue(0),
- m_showControls(true)
+ m_curValue(0)
{
}
return *this;
}
- VolumeControl::Builder &VolumeControl::Builder::setMaxSliderValue(int maxValue)
+ VolumeControl::Builder &VolumeControl::Builder::setMaxValue(int maxValue)
{
m_maxValue = maxValue;
return *this;
}
- VolumeControl::Builder &VolumeControl::Builder::setSliderValue(int curValue)
+ VolumeControl::Builder &VolumeControl::Builder::setValue(int curValue)
{
m_curValue = curValue;
return *this;
}
- VolumeControl::Builder &VolumeControl::Builder::setShowControls(bool isShown)
- {
- m_showControls = isShown;
- return *this;
- }
-
VolumeControl::Builder &VolumeControl::Builder::setEventHandler(
const VolumeControlEventHandler &handler)
{
m_info,
m_maxValue,
m_curValue,
- m_showControls,
m_handler);
result->bindToEo();
const TString &info,
int maxValue,
int curValue,
- bool showControls,
const VolumeControlEventHandler &handler):
- ElmWidget(&rc, *layout, true),
- m_layout(layout),
- m_slider(eext_circle_object_slider_add(*m_layout,
- getCircleSurface(*m_layout))),
+ Slider(rc, layout, maxValue, curValue),
m_decreaseBtn(elm_button_add(*m_layout)),
m_increaseBtn(elm_button_add(*m_layout)),
- m_handler(handler),
- m_isControlsShown(true)
+ m_handler(handler)
{
- prepare(info, maxValue, curValue, showControls);
+ prepare(info, curValue);
}
VolumeControl::~VolumeControl()
{
}
- void VolumeControl::prepare(const TString &info,
- int maxValue,
- int curValue,
- bool showControls)
+ void VolumeControl::prepare(const ucl::TString &info, int curValue)
{
- m_layout->setIsOwner(false);
-
- evas_object_size_hint_align_set(m_slider,
- EVAS_HINT_FILL, 0.5);
- evas_object_size_hint_weight_set(m_slider,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- m_layout->setContent(m_slider, impl::PART_SWL_SLIDER);
- show(*m_layout);
-
m_decreaseBtn.setStyle(impl::STYLE_BTN_MINUS);
m_decreaseBtn.addEventHandler(BTN_CLICKED, WEAK_DELEGATE(
VolumeControl::onDecreaseBtnClickedCb, asWeak(*this)));
show(m_increaseBtn);
setInfoText(info);
- setMaxSliderValue(maxValue);
- setSliderValue(curValue);
-
- if (!showControls) {
- hideControls();
- }
- }
-
- void VolumeControl::showControls()
- {
- if (!m_isControlsShown) {
- m_layout->emit(impl::SIGNAL_SHOW_CONTROLS,
- impl::SIGNAL_SRC_VOICE_CONTROL);
- m_isControlsShown = true;
- }
- }
-
- void VolumeControl::hideControls()
- {
- if (m_isControlsShown) {
- m_layout->emit(impl::SIGNAL_HIDE_CONTROLS,
- impl::SIGNAL_SRC_VOICE_CONTROL);
- m_isControlsShown = false;
- }
- }
-
- bool VolumeControl::getControlsVisibilityState()
- {
- return m_isControlsShown;
+ setValue(curValue);
}
void VolumeControl::setInfoText(const TString &info)
m_layout->setText(info.translate(), impl::PART_TXT_INFO);
}
- void VolumeControl::setSliderValue(int value)
+ void VolumeControl::setValue(int value)
{
eext_circle_object_value_set(m_slider, static_cast<double>(value));
m_layout->setText(std::to_string(value), impl::PART_TXT_VALUE);
}
- void VolumeControl::setMaxSliderValue(int maxValue)
- {
- eext_circle_object_value_min_max_set(m_slider,
- 0, maxValue);
- }
-
void VolumeControl::setIncreaseBtnEnable(bool isEnable)
{
isEnable ? enable(m_increaseBtn) : disable(m_increaseBtn);
void VolumeControl::onDecreaseBtnClickedCb(Widget &widget, void *eventInfo)
{
- if (m_isControlsShown) {
- ILOG("Ignored as callback called after control was hidden");
- }
-
if (m_handler) {
m_handler(VolumeControlEvent::DECREASE);
}
void VolumeControl::onIncreaseBtnClickedCb(Widget &widget, void *eventInfo)
{
- if (m_isControlsShown) {
- ILOG("Ignored as callback called after control was hidden");
- }
-
if (m_handler) {
m_handler(VolumeControlEvent::INCREASE);
}
LOG_RETURN(RES_ILLEGAL_STATE, "Circle Surface data already set!");
}
- const auto sfc = eext_circle_surface_naviframe_add(navi);
+ const auto sfc = eext_circle_surface_conformant_add(win->getConformant());
if (!sfc) {
LOG_RETURN(RES_FAIL,
"eext_circle_surface_conformant_add() failed!");