UCL_DECLARE_REF_ALIASES(AcceptRejectWidget);
+ /**
+ * @brief Widget for accept / reject calls
+ */
class AcceptRejectWidget final : public ucl::ElmWidget {
public:
+
+ /**
+ * @brief Builder builder
+ */
class Builder {
public:
+
+ /**
+ * @brief Constructor
+ */
Builder();
+
+ /**
+ * @brief Sets accept event handler
+ * @param[in] handler Accept event handler
+ * @return Reference to builder
+ */
Builder &setAcceptEventHandler(const NotiHandler &handler);
+
+ /**
+ * @brief Sets reject event handler
+ * @param[in] handler Reject event handler
+ * @return Reference to builder
+ */
Builder &setRejectEventHandler(const NotiHandler &handler);
+
+ /**
+ * @brief Sets Accept button type
+ * @param[in] type Accept button type
+ * @return Reference to builder
+ */
Builder &setAcceptBtnType(AcceptButtonType type);
+
+ /**
+ * @brief Creates new instance of AcceptRejectWidget
+ * @param[in] parent Parent widget
+ * @return Shared reference to AcceptRejectWidget instance
+ * on success or NULL otherwise
+ */
AcceptRejectWidgetSRef build(ucl::ElmWidget &parent) const;
private:
};
public:
+
+ /**
+ * @brief Destructor
+ */
virtual ~AcceptRejectWidget();
+ /**
+ * @brief Starts Bezel Cue animation
+ */
void startBezelCueAnimation();
+
+ /**
+ * @brief Resets widget to default state
+ */
void reset();
+
+ /**
+ * @brief Activates rotary to accept rotary events
+ */
void activateRotary();
+
+ /**
+ * @brief Deactivates rotary to not accept rotary events
+ */
void deactivateRotary();
+
+ /**
+ * @brief Sets Accept button type
+ * @param[in] type Accept button type
+ */
void setAcceptBtnType(AcceptButtonType type);
+ /**
+ * @brief Gets Access object of Accept button
+ * @remark Use only for Screen Reader feature
+ * @return Pointer to widget on success or NULL otherwise
+ */
ucl::ElmWidget *getAcceptAo();
+
+ /**
+ * @brief Gets Access object of Reject button
+ * @remark Use only for Screen Reader feature
+ * @return Pointer to widget on success or NULL otherwise
+ */
ucl::ElmWidget *getRejectAo();
private:
Slider::Builder::Builder():
m_maxValue(0),
- m_curValue(0)
+ m_value(0)
{
}
return *this;
}
- Slider::Builder &Slider::Builder::setValue(int curValue)
+ Slider::Builder &Slider::Builder::setValue(int value)
{
- m_curValue = curValue;
+ m_value = value;
return *this;
}
LOG_RETURN_VALUE(RES_FAIL, {}, "Layout::build() failed!");
}
- auto result = makeShared<Slider>(layout, m_maxValue, m_curValue);
+ auto result = makeShared<Slider>(layout, m_maxValue, m_value);
result->bindToEo();
UCL_DECLARE_REF_ALIASES(Slider);
+ /**
+ * @brief Slider widget
+ */
class Slider : public ucl::ElmWidget {
public:
+ /**
+ * @brief Slider builder
+ */
class Builder {
public:
+
+ /**
+ * @brief Constructor
+ */
Builder();
+
+ /**
+ * @brief Sets max value to display
+ * @param[in] maxValue Max value to set
+ * @return Reference to builder
+ */
Builder &setMaxValue(int maxValue);
- Builder &setValue(int curValue);
+
+ /**
+ * @brief Sets value to display
+ * @param[in] value Value to set
+ * @return Reference to builder
+ */
+ Builder &setValue(int value);
+
+ /**
+ * @brief Creates new instance of Slider
+ * @param[in] parent Parent widget
+ * @return Shared reference to Slider instance
+ * on success or NULL otherwise
+ */
SliderSRef build(ucl::ElmWidget &parent) const;
private:
int m_maxValue;
- int m_curValue;
+ int m_value;
};
public:
+
+ /**
+ * @brief Destructor
+ */
virtual ~Slider() = default;
+ /**
+ * @brief Sets value to display
+ * @param[in] value Value to set
+ */
virtual void setValue(int value);
+
+ /**
+ * @brief Sets max value to display
+ * @param[in] maxValue Max value to set
+ */
virtual void setMaxValue(int maxValue);
protected:
VolumeControl::Builder::Builder():
m_maxValue(0),
- m_curValue(0)
+ m_value(0)
{
}
return *this;
}
- VolumeControl::Builder &VolumeControl::Builder::setValue(int curValue)
+ VolumeControl::Builder &VolumeControl::Builder::setValue(int value)
{
- m_curValue = curValue;
+ m_value = value;
return *this;
}
auto result = makeShared<VolumeControl>(layout,
m_info,
m_maxValue,
- m_curValue,
+ m_value,
m_handler);
result->bindToEo();
UCL_DECLARE_REF_ALIASES(VolumeControl);
+ /**
+ * @brief Volume Control widget
+ */
class VolumeControl final : public Slider {
public:
+
+ /**
+ * @brief Enumeration of event type
+ */
enum class Event {
- INCREASE,
- DECREASE
+ INCREASE, /**< Increase event type */
+ DECREASE /**< Decrease event type */
};
+ /**
+ * @brief Event handler definition
+ */
using EventHandler = ucl::WeakDelegate<void(Event)>;
public:
+
+ /**
+ * @brief VolumeControl builder
+ */
class Builder {
public:
+
+ /**
+ * @brief Constructor
+ */
Builder();
+
+ /**
+ * @brief Sets information text to display
+ * @param[in] info Text to set
+ * @return Reference to builder
+ */
Builder &setInfoText(const ucl::TString &info);
+
+ /**
+ * @brief Sets max volume value to display
+ * @param[in] maxValue Max value to set
+ * @return Reference to builder
+ */
Builder &setMaxValue(int maxValue);
- Builder &setValue(int curValue);
+
+ /**
+ * @brief Sets volume value to display
+ * @param[in] info Value to set
+ * @return Reference to builder
+ */
+ Builder &setValue(int value);
+
+ /**
+ * @brief Sets event handler
+ * @param[in] handler Event handler
+ * @return Reference to builder
+ */
Builder &setEventHandler(const EventHandler &handler);
+
+ /**
+ * @brief Creates new instance of VolumeControl
+ * @param[in] parent Parent widget
+ * @return Shared reference to VolumeControl instance
+ * on success or NULL otherwise
+ */
VolumeControlSRef build(ucl::ElmWidget &parent) const;
private:
ucl::TString m_info;
int m_maxValue;
- int m_curValue;
+ int m_value;
EventHandler m_handler;
};
public:
+
+ /**
+ * @brief Destructor
+ */
virtual ~VolumeControl() = default;
+ /**
+ * @brief Sets information text to display
+ * @param[in] info Text to set
+ */
void setInfoText(const ucl::TString &info);
+
+ /**
+ * @brief Sets decrease volume button enable state
+ * @param[in] isEnable Button state
+ */
void setDecreaseBtnEnable(bool isEnable);
+
+ /**
+ * @brief Sets increase volume button enable state
+ * @param[in] isEnable Button state
+ */
void setIncreaseBtnEnable(bool isEnable);
+
+ /**
+ * @brief Sets event handler
+ * @param[in] handler Event handler
+ */
void setEventHandler(const EventHandler &handler);
+ /**
+ * @brief Gets Access object of decrease volume button
+ * @remark Use only for Screen Reader feature
+ * @return Pointer to widget on success or NULL otherwise
+ */
ucl::ElmWidget *getDecreaseBtn();
+
+ /**
+ * @brief Gets Access object of increase volume button
+ * @remark Use only for Screen Reader feature
+ * @return Pointer to widget on success or NULL otherwise
+ */
ucl::ElmWidget *getIncreaseBtn();
+
+ /**
+ * @brief Gets Access object of volume value text area
+ * @remark Use only for Screen Reader feature
+ * @return Pointer to widget on success or NULL otherwise
+ */
ucl::ElmWidget *getValueTxtAo();
// Slider //
+ /**
+ * @see Slider::setValue()
+ */
virtual void setValue(int value) override final;
private:
return itc;
}
- ElmWidgetSRef createAccessObject(ElmWidget &parent, Widget &ly)
+ ElmWidgetSRef createAccessObject(ElmWidget &parent, Widget &obj)
{
- auto ao = elm_access_object_register(ly, parent);
+ auto ao = elm_access_object_register(obj, parent);
if (!ao) {
LOG_RETURN_VALUE(RES_FAIL, {},
"elm_access_object_register() failed!");
namespace callui { namespace utils {
+ /**
+ * @brief Create circular surface from Naviframe for circular objects
+ * @param[in] navi Naviframe instance
+ * @return RES_OK on success or another result otherwise
+ */
ucl::Result createCircleSurface(ucl::Naviframe &navi);
+ /**
+ * @brief Gets circular surface for widget
+ * @param[in] widget Widget instance
+ * @return Pointer on circular surface
+ */
Eext_Circle_Surface *getCircleSurface(const ucl::ElmWidget &widget);
+ /**
+ * @brief Creates fake Access object
+ * @param[in] parent Parent widget
+ * @return Shared reference to ElmWidget instance
+ * on success or NULL otherwise
+ */
ucl::ElmWidgetSRef createFakeAccessObject(ucl::ElmWidget &parent);
+ /**
+ * @brief Creates elm_genlist item class according to input params
+ * @param[in] style Item style
+ * @param[in] txtCb Item text callback function
+ * @param[in] contentCb Item content callback function
+ * @param[in] txtCb Item state callback function
+ * @param[in] txtCb Item delete callback function
+ * @return Elementary genlist item class instance
+ */
Elm_Genlist_Item_Class createGenlistItemClass(const char *style,
Elm_Gen_Item_Text_Get_Cb txtCb = nullptr,
Elm_Gen_Item_Content_Get_Cb contentCb = nullptr,
Elm_Gen_Item_State_Get_Cb stateCb = nullptr,
Elm_Gen_Item_Del_Cb delCb = nullptr);
+ /**
+ * @brief Creates Access object
+ * @param[in] parent ElmWidget which is used for creating
+ * @param[in] obj Widget to register as an accessible object
+ * @return Shared reference to ElmWidget instance
+ * on success or NULL otherwise
+ */
ucl::ElmWidgetSRef createAccessObject(ucl::ElmWidget &parent,
- ucl::Widget &ly);
-
+ ucl::Widget &obj);
+
+ /**
+ * @brief Creates Access object from layout part
+ * @param[in] parent ElmWidget which is used for creating
+ * @param[in] ly Widget which part is used to register as an accessible object
+ * @param[in] lyPart Widget part to register as an accessible object
+ * @return Shared reference to ElmWidget instance
+ * on success or NULL otherwise
+ */
ucl::ElmWidgetSRef createAccessObjectFromLyPart(ucl::ElmWidget &parent,
ucl::Widget &ly,
const ucl::EdjePart &lyPart);
+ /**
+ * @brief Destroys Access object
+ * @param[in] ao Access object to destroy
+ */
void destroyAccessObject(ucl::ElmWidget &ao);
+ /**
+ * @brief Sets mirrored mode status
+ * @param[in] isMirroredMode Mirrored mode status
+ */
void setMirroredMode(bool isMirroredMode);
+ /**
+ * @brief Gets mirrored mode status
+ * @return true if mirrored mode is on, false otherwise
+ */
bool getMirroredMode();
}}
namespace callui {
+ /**
+ * @brief Adds rotary event handler
+ * @param[in] func Callback function on rotary events
+ * @param[in] data User data
+ */
void addRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data);
+ /**
+ * @brief Deletes rotary event handler
+ * @param[in] func Callback function on rotary events
+ * @param[in] data User data
+ */
void delRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data);
+ /**
+ * @brief Converts image file name into image layout theme
+ * @param[in] fileName Image filename
+ * @return Layout theme instance
+ */
ucl::LayoutTheme getImageTheme(const char *fileName);
+ /**
+ * @brief Gets Screen Reader relation type from Screen Reader gesture info
+ * @param[in] gestureInfo Screen Reader gesture info
+ * @return Screen Reader relation type
+ */
Elm_Atspi_Relation_Type getFlowRelation(Elm_Atspi_Gesture_Info gestureInfo);
}
namespace callui {
+ /**
+ * @brief Enumeration of Acceept button type for AcceptRejectWidget
+ */
enum class AcceptButtonType {
- SIMPLE,
- BT_HEADSET
+ SIMPLE, /**< Normal accept button type */
+ BT_HEADSET /**< Accept with BT Headset button type */
};
}