summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucl/include/ucl/gui/Atspi.h18
-rw-r--r--ucl/include/ucl/gui/Widget.h29
-rw-r--r--ucl/include/ucl/gui/Widget.hpp10
-rw-r--r--ucl/include/ucl/mvp/ListItemPresenter.h2
4 files changed, 48 insertions, 11 deletions
diff --git a/ucl/include/ucl/gui/Atspi.h b/ucl/include/ucl/gui/Atspi.h
index adea58d..56a0bf8 100644
--- a/ucl/include/ucl/gui/Atspi.h
+++ b/ucl/include/ucl/gui/Atspi.h
@@ -130,14 +130,14 @@ namespace ucl {
Elm_Atspi_Role getRole() const;
/**
- * @brief Sets highlight ability status
- * @param[in] value New highlight ability status
+ * @brief Sets higlightability status
+ * @param[in] value New higlightability status
*/
void setHighlightable(bool value);
/**
- * @brief Gets highlight ability status
- * @return Current highlight ability status
+ * @brief Gets higlightability status
+ * @return Current higlightability status
*/
bool isHighlightable() const;
@@ -236,21 +236,21 @@ namespace ucl {
*/
template <class T>
inline auto as_ao(const T &ptr) -> typename std::enable_if<
- std::is_convertible<T, bool>::value, decltype(as_ao(*ptr))>::type
+ std::is_constructible<bool, T>::value, decltype(as_ao(*ptr))>::type
{
return (ptr ? as_ao(*ptr) : nullptr);
}
/**
* @brief Gets Access object from iterator
- * @param[in] ptr Target object iterator
+ * @param[in] it Target object iterator
* @return Pointer to Access object or NULL
*/
template <class T>
- inline auto as_ao(const T &iter) -> typename std::enable_if<
- !std::is_convertible<T, bool>::value, decltype(as_ao(*iter))>::type
+ inline auto as_ao(const T &it) -> typename std::enable_if<
+ !std::is_constructible<bool, T>::value, decltype(as_ao(*it))>::type
{
- return as_ao(*iter);
+ return as_ao(*it);
}
/**
diff --git a/ucl/include/ucl/gui/Widget.h b/ucl/include/ucl/gui/Widget.h
index e6506ab..df4713e 100644
--- a/ucl/include/ucl/gui/Widget.h
+++ b/ucl/include/ucl/gui/Widget.h
@@ -440,12 +440,39 @@ namespace ucl {
* @return Pointer to Evas object or NULL
*/
template <class T>
- inline auto as_eo(const T &ptr) -> decltype(as_eo(*ptr))
+ inline auto as_eo(const T &ptr) -> typename std::enable_if<
+ std::is_constructible<bool, T>::value, decltype(as_eo(*ptr))>::type
{
return (ptr ? as_eo(*ptr) : nullptr);
}
/**
+ * @brief Gets Evas object from iterator
+ * @param[in] it Target object iterator
+ * @return Pointer to Evas object or NULL
+ */
+ template <class T>
+ inline auto as_eo(const T &it) -> typename std::enable_if<
+ !std::is_constructible<bool, T>::value, decltype(as_eo(*it))>::type
+ {
+ return as_eo(*it);
+ }
+
+ /**
+ * @brief Passes through original Evas object pointer
+ * @param[in] eo Evas object pointer
+ * @return Evas object pointer
+ */
+ Evas_Object *as_eo(Evas_Object *eo);
+
+ /**
+ * @brief Passes through original constant Evas object pointer
+ * @param[in] eo Constant Evas object pointer
+ * @return Constant Evas object pointer
+ */
+ const Evas_Object *as_eo(const Evas_Object *eo);
+
+ /**
* @brief Gets position of the widget
* @param[in] widget Reference to target widget
* @param[out] x Top-left X coordinate of the widget (may be NULL)
diff --git a/ucl/include/ucl/gui/Widget.hpp b/ucl/include/ucl/gui/Widget.hpp
index 9e98bfd..4d2cf29 100644
--- a/ucl/include/ucl/gui/Widget.hpp
+++ b/ucl/include/ucl/gui/Widget.hpp
@@ -206,6 +206,16 @@ namespace ucl {
return widget.m_eo;
}
+ inline Evas_Object *as_eo(Evas_Object *const eo)
+ {
+ return eo;
+ }
+
+ inline const Evas_Object *as_eo(const Evas_Object *const eo)
+ {
+ return eo;
+ }
+
inline void getPosition(const Widget &widget, int *x, int *y)
{
widget.getGeometry(x, y, nullptr, nullptr);
diff --git a/ucl/include/ucl/mvp/ListItemPresenter.h b/ucl/include/ucl/mvp/ListItemPresenter.h
index bda4546..690623e 100644
--- a/ucl/include/ucl/mvp/ListItemPresenter.h
+++ b/ucl/include/ucl/mvp/ListItemPresenter.h
@@ -287,7 +287,7 @@ namespace ucl {
const ItemPickModeParams &params);
/**
- * @brief Return GUI item insertion parameters
+ * @brief Gets GUI item insertion parameters
* @details Called just before item is added to list
* @return Item insertion params structure
*/