public:
/**
* @brief This is a constructor for initializing this view resources.
+ * @remarks if you don't set a view name, you could not look up the view with it's name. @see ui_viewmgr_get_view_by_name().
*
* @param[in] name view name.
*/
virtual int setContent(Eo *content) override;
/**
- * @brief This is for unsetting a content of the view.
+ * @brief Unsets a content of view.
*
- * @return A previous content. If it wasn't, return @c nullptr.
+ * @return A previous content. If it wasn't, return @c nullptr
+ *
+ * @see setContent()
+ * @see getContent()
*/
virtual Eo *unsetContent() override;
/**
- * @brief Get a base object of ui_view.
+ * @brief Gets a base object of view.
*
- * @note Normally, this base object can be used for a parent of a view content.
+ * @remarks Normally, this base object can be used for a parent of a view content.
*
- * @return The base object of ui_view.
+ * @return The base object of view
*/
virtual Eo *getBase();
virtual int setAvailableRotations(const int *rotations, unsigned int count) override;
/**
- * @brief Get current view's degree.
+ * @brief Gets the current view's degree.
*
- * @return Current rotation degree, -1 if it fails to get degree information.
+ * @return Current rotation degree, -1 if it fails to get degree information
*/
virtual int getDegree() override;
/**
* @brief Return a last(top) view.
*
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
* @return The view which is last view of the viewmgr view list.
- * If there were no views name matched, @c nullptr will be returned.
+ * If there were no views, @c nullptr will be returned.
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED @a viewmgr has no view
+ *
+ * @see get_last_result()
*/
UiBaseView *getLastView();
/**
* @brief Return a view which is matched with the index @a idx.
*
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
* @param[in] idx A index of the view which you are looking for.
*
* @return The view which index is matched with @a idx.
* @note You could use the index as the page numbers of the views.
* @warning the index number of views are variable since the view list is variable.
*
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER Wrong index
+ *
* @see getViewIndex()
* @see getViewCount()
+ * @see get_last_result()
*/
UiBaseView *getView(unsigned int idx);
/**
* @brief Return a view which is matched with the @a name.
*
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
* @note Every view have their names as their own identifiers.
*
* @param[in] name The name of the view which you are looking for.
*
* @return The view which name is matched with @a name.
* If there were no views name matched, @c nullptr will be returned.
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a name is nullptr, otherwise there is no matched name
*
* @see UiIfaceView::setName()
+ * @see get_last_result()
*/
UiBaseView *getView(const char *name);
virtual int setContent(Elm_Ctxpopup* ctxpopup) override;
/**
- * @brief This is for unsetting a content of the menu.
+ * @brief Unsets a content of menu.
*
- * @return A previous content. If it wasn't, return value will be @c nullptr.
+ * @return A previous content. If it wasn't, return @c nullptr
+ *
+ * @see setContent()
+ * @see getContent()
*/
virtual Elm_Ctxpopup *unsetContent() override;
/**
- * @brief Return the active status of menu.
+ * @brief Returns the active status of menu.
*
- * @return @c true if menu is activated, @c false otherwise.
+ * @return @c true if menu is activated, @c false otherwise
*
* @see activate()
* @see deactivate()
virtual bool isActivated() override;
/**
- * @brief Get a base object of a UiMenu.
+ * @brief Gets a base object of menu.
+ * @details Normally, A base object can be used for a parent of menu content.
*
- * @note Normally, A base object can be used for a parent of UiMenu content.
- * @return base object of UiMenu.
+ * @return base object of menu
*/
virtual Eo *getBase();
virtual int setContent(Elm_Popup* popup) override;
/**
- * @brief This is for unsetting a content of the popup.
+ * @brief Unsets an popup content.
*
- * @return A previous content. If it wasn't, return value will be @c nullptr.
+ * @return A previous content. If it wasn't, return @c nullptr
+ *
+ * @see getContent()
+ * @see setContent()
*/
virtual Elm_Popup *unsetContent() override;
/**
- * @brief Return the active status of popup.
+ * @brief Returns the active status of popup.
+ *
+ * @param[in] popup An popup instance
*
- * @return @c true if overlay is activated, @c false otherwise.
+ * @return @c true if popup is activated, @c false otherwise
*
* @see activate()
* @see deactivate()
virtual bool isActivated() override;
/**
- * @brief Get a base object of an UiPopup.
- *
- * @note Normally, A base object can be used for a parent of UiPopup content.
+ * @brief Gets a base object of popup.
+ * @details Normally, A base object can be used for a parent of popup content.
*
- * @return base object of UiPopup.
+ * @return base object of popup
*/
virtual Eo *getBase();
Eo *unsetContent() override;
/**
- * @brief Unset a title left button of title area.
+ * @brief Unsets a title left button of title area.
*
- * @return A previous content. If it wasn't, return @c nullptr.
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @return A previous content. If it wasn't, return @c nullptr
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED @a left button was not set
+ * @exception #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ *
+ * @see getTitleLeftBtn()
+ * @see setTitleLeftBtn()
+ * @see get_last_result()
*/
Elm_Button *unsetTitleLeftBtn();
/**
- * @brief Unset a title right button of title area.
+ * @brief Unsets a title right button of title area.
*
- * @return A previous content. If it wasn't, return @c nullptr.
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @return A previous content. If it wasn't, return @c nullptr
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED @a right button was not set
+ * @exception #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ *
+ * @see getTitleRightBtn()
+ * @see setTitleRightBtn()
+ * @see get_last_result()
*/
Elm_Button *unsetTitleRightBtn();
/**
- * @brief Unset a toolbar.
+ * @brief Unsets a toolbar.
*
- * @return A previous content. If it wasn't, return @c nullptr.
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @return A previous content. If it wasn't, return @c nullptr
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED @a toolbar was not set
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_standard_view_get_toolbar()
+ * @see ui_standard_view_set_toolbar()
+ * @see get_last_result()
*/
Elm_Toolbar *unsetToolbar();
/**
- * @brief Return a title left button of the view.
+ * @brief Returns a title left button of the view.
*
- * @return title left button of the view.
+ * @return title left button of the view
+ *
+ * @see setTitleLeftBtn()
+ * @see unsetTitleLeftBtn()
*/
Elm_Button *getTitleLeftBtn();
/**
- * @brief Return a title right button of the view.
+ * @brief Returns a title right button of the view.
+ *
+ * @return title right button of the view
*
- * @return title right button of the view.
+ * @see setTitleRightBtn()
+ * @see unsetTitleRightBtn()
*/
Elm_Button *getTitleRightBtn();
/**
- * @brief Return a toolbar of the view.
+ * @brief Returns a toolbar of the view.
+ *
+ * @return toolbar of the view
*
- * @return toolbar of the view.
+ * @see setToolbar()
+ * @see unsetToolbar()
*/
Elm_Toolbar *getToolbar();
class UiView: public efl_viewmanager::UiBaseView
{
public:
- /**
- * @brief This is a constructor for initializing this view resources.
- *
- * @param[in] name view name.
- *
- * @warning if you don't set a view name, you could not look up the view with its name. @see ui_viewmgr_view_get_by_name()
+ /**
+ * @brief This is a constructor for initializing this view resources.
+ * @remarks if you don't set a view name, you could not look up the view with it's name. @see ui_viewmgr_get_view_by_name().
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] name view name.
+ *
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
+ *
+ * @see get_last_result()
*/
explicit UiView(const char *name = nullptr);
virtual ~UiView();
/**
- * @brief Get menu object.
+ * @brief Gets a menu instance.
*
* @return The menu object that connected with this view. If it doesn't, @c nullptr will be returned.
*/
const UiMenu *getMenu();
/**
- * @brief Get current view's orientation mode.
+ * @brief Gets current view's orientation mode.
+ *
+ * @return Current orientation mode, one of #UiViewOrientationMode
*
- * @return Current orientation mode, one of #UiViewOrientationMode.
+ * @see UiViewOrientationMode
*/
virtual UiViewOrientationMode getOrientationMode() override;
* @param[in] pkg The name of package
* @param[in] locale_dir The path of locale directory
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS Initialization was already done.
- * @retval #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fails to allocate memory.
+ * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS Initialization was already done
+ * @retval #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fails to allocate memory
*
* @see ui_application_term()
* @see ui_application_run()
* @param[in] events Event callback list
* @param[in] user_data User data for event callbacks
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
* @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER Invalid parameters
* @retval #UI_VIEWMGR_ERROR_APPLICATION The application is illegally launched, not launched by the launch system.
- * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS The main loop already starts.
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED If Initialization was not performed yet.
+ * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS The main loop already starts
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED If Initialization was not performed yet
*
* @pre Call ui_application_init() before calling this function.
*
* @brief Deinitializes ui_application.
* @since_tizen 3.0
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
*
* @pre Call ui_application_init() before calling this function.
* @param[in] menu An ui_menu object
* @param[in] ctxpopup ctxpopup object. It allows @c NULL for canceling the previous content
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid or @a content is not a type of Elm_Ctxpopup.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid or @a content is not a type of Elm_Ctxpopup
*
* @see ui_menu_get_content()
* @see ui_menu_unset_content()
/**
* @brief Returns an ui_menu content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] menu An ui_menu instance
*
* @return A content of ui_menu
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
*
* @see ui_menu_set_content()
* @see ui_menu_unset_content()
+ * @see get_last_result()
*/
EAPI Elm_Ctxpopup *ui_menu_get_content(ui_menu *menu);
/**
* @brief Unsets an ui_menu content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] menu An ui_menu instance
*
* @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
*
* @see ui_menu_set_content()
* @see ui_menu_get_content()
+ * @see get_last_result()
*/
EAPI Elm_Ctxpopup *ui_menu_unset_content(ui_menu *menu);
*
* @param[in] menu An ui_menu instance
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED menu instance is not set up yet.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED menu instance is not set up yet
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
*
* @see ui_menu_deactivate()
*/
*
* @param[in] menu An ui_menu instance
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED menu instance is not set up yet.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED menu instance is not set up yet
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
*
* @see ui_menu_activate()
*/
/**
* @brief Returns the active status of ui_menu.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] menu An ui_menu instance
*
* @return @c true if menu is activated, @c false otherwise
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
*
* @see ui_menu_activate()
* @see ui_menu_deactivate()
+ * @see get_last_result()
*/
EAPI bool ui_menu_get_activated(ui_menu *menu);
* @brief Gets a base object of an ui_menu.
* @details Normally, A base object can be used for a parent of ui_menu content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] menu An ui_menu instance
*
* @return base object of ui_menu
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
+ *
+ * @see get_last_result()
*/
EAPI Eo *ui_menu_get_base(ui_menu *menu);
/**
* @brief Gets a current ui_menu's degree.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] menu An ui_menu instance
*
* @return Current rotation degree, -1 if it fails to get degree information
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
+ *
+ * @see get_last_result()
*/
EAPI int ui_menu_get_degree(ui_menu *menu);
/**
* @brief Returns a view which is matched with this ui_menu.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] menu An ui_menu instance
*
* @return The view which is matched with ui_menu
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a menu is invalid
+ *
+ * @see get_last_result()
*/
EAPI ui_view *ui_menu_get_view(ui_menu *menu);
* @since_tizen 3.0
* @remarks The instance of ui_popup is subordinated to the given @a ui_view. If the given @a ui_view is hidden or deactivated, this ui_popup will be also do
* same followed to its ui_view behaviors. The instance of ui_popup will be destroyed automatically when the ui_view is destroyed.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An instance of ui_view
*
* @return An ui_popup instance
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_destroy()
*/
*
* @param[in] popup An ui_popup instance
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_create()
*/
* @param[in] popup An ui_popup instance
* @param[in] content popup object. It allows @c NULL for canceling the previous content
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid or @a content is not a type of Elm_Popup.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid or @a content is not a type of Elm_Popup
*
* @see ui_popup_get_content()
* @see ui_popup_unset_content()
/**
* @brief Returns a content object of ui_popup.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] popup An ui_popup instance
*
* @return A content of ui_popup
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_set_content()
* @see ui_popup_unset_content()
+ * @see get_last_result()
*/
EAPI Elm_Popup *ui_popup_get_content(ui_popup *popup);
/**
* @brief Unsets an ui_popup content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] popup An ui_popup instance
*
* @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_get_content()
* @see ui_popup_set_content()
+ * @see get_last_result()
*/
EAPI Elm_Popup *ui_popup_unset_content(ui_popup *popup);
*
* @param[in] popup An ui_popup instance
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED popup instance is not set up yet.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED popup instance is not set up yet
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_deactivate()
* @see ui_popup_get_activated()
*
* @return @c 0 on success, otherwise a negative error value.
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED popup instance is not set up yet.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED popup instance is not set up yet
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_activate()
* @see ui_popup_get_activated()
/**
* @brief Returns the active status of ui_popup.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] popup An ui_popup instance
*
* @return @c true if ui_popup is activated, @c false otherwise
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
* @see ui_popup_activate()
* @see ui_popup_deactivate()
+ * @see get_last_result()
*/
EAPI bool ui_popup_get_activated(ui_popup *popup);
* @brief Gets a base object of an ui_popup.
* @details Normally, A base object can be used for a parent of ui_popup content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] popup An ui_popup instance
*
- * @param[in] menu An ui_popup instance
+ * @return base object of popup
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
*
- * @return base object of ui_popup
-
+ * @see get_last_result()
*/
EAPI Eo *ui_popup_get_base(ui_popup *popup);
/**
* @brief Gets current ui_popup's degree.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] popup An ui_popup instance
*
* @return Current rotation degree, -1 if it fails to get degree information
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
+ *
+ * @see get_last_result()
*/
EAPI int ui_popup_get_degree(ui_popup *popup);
/**
* @brief Returns a view which is matched with the ui_popup.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] popup An ui_popup instance
*
* @return The view which is matched with ui_popup
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a popup is invalid
+ *
+ * @see get_last_result()
*/
EAPI ui_view *ui_popup_get_view(ui_popup *popup);
/**
* @brief Creates an ui_standard_view.
* @since_tizen 3.0
- * @remarks if you don't set a view name, you could not look up the view with its name. @see ui_viewmgr_get_view_by_name().
+ * @remarks if you don't set a view name, you could not look up the view with it's name. @see ui_viewmgr_get_view_by_name().
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] name view name
*
- * @return view An ui_standard_view instance
+ * @return The ui_view instance. NULL if failed
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
*
* @see ui_view_destroy()
+ * @see get_last_result()
*/
EAPI ui_standard_view *ui_standard_view_create(const char *name);
* @param[in] view An ui_standard_view instance
* @param[in] text The label in the title area
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_title()
*/
* @param[in] view An ui_standard_view instance
* @param[in] text The label in the subtitle area
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_sub_title()
*/
* @param[in] view An ui_standard_view instance
* @param[in] text The label in the title badge area
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_title_badge()
*/
* @param[in] view An ui_standard_view instance
* @param[in] title_right_btn The button in the right part of title area
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS if @a title_right_btn is same with the existing one.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS if @a title_right_btn is same with the existing one
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_title_right_btn()
* @see ui_standard_view_unset_title_right_btn()
/**
* @brief Returns a title right button of the view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_standard_view instance
*
* @return title right button of the view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_standard_view_set_title_right_btn()
* @see ui_standard_view_unset_title_right_btn()
+ * @see get_last_result()
*/
EAPI Elm_Button *ui_standard_view_get_title_right_btn(ui_standard_view *view);
/**
* @brief Unsets a title right button of title area.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_standard_view instance
*
* @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ * @exception #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_title_right_btn()
* @see ui_standard_view_set_title_right_btn()
+ * @see get_last_result()
*/
EAPI Elm_Button *ui_standard_view_unset_title_right_btn(ui_standard_view *view);
*
* @return @c 0 on success, otherwise a negative error value.
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS if @a title_left_btn is same with the existing one.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS if @a title_left_btn is same with the existing one
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_title_left_btn()
* @see ui_standard_view_unset_title_left_btn()
/**
* @brief Returns a title left button of the view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_standard_view instance
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @return title left button of the view
*
* @see ui_standard_view_set_title_left_btn()
* @see ui_standard_view_unset_title_left_btn()
+ * @see get_last_result()
*/
EAPI Elm_Button *ui_standard_view_get_title_left_btn(ui_standard_view *view);
/**
- * @brief Unsets a title right button of title area.
+ * @brief Unsets a title left button of title area.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_standard_view instance
*
* @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ * @exception #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_title_left_btn()
* @see ui_standard_view_set_title_left_btn()
+ * @see get_last_result()
*/
EAPI Elm_Button *ui_standard_view_unset_title_left_btn(ui_standard_view *view);
* @param[in] view An ui_standard_view instance
* @param[in] toolbar Toolbar object
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS if @a toolbar is already existing.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS if @a toolbar is already existing
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*
* @see ui_standard_view_get_toolbar()
* @see ui_standard_view_unset_toolbar()
+ * @see get_last_result()
*/
EAPI int ui_standard_view_set_toolbar(ui_standard_view *view, Elm_Toolbar *toolbar);
/**
* @brief Returns a toolbar of the view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_standard_view instance
*
* @return The toolbar of the given @a view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_standard_view_set_toolbar()
* @see ui_standard_view_unset_toolbar()
+ * @see get_last_result()
*/
EAPI Elm_Toolbar *ui_standard_view_get_toolbar(ui_standard_view *view);
/**
* @brief Unsets a toolbar.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_standard_view instance
*
* @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_standard_view_get_toolbar()
* @see ui_standard_view_set_toolbar()
+ * @see get_last_result()
*/
EAPI Elm_Toolbar *ui_standard_view_unset_toolbar(ui_standard_view *view);
* @param[in] visible title state set as visible if the given param is @c true, otherwise title area set as invisible
* @param[in] anim title area will be shown with animation if the given param is @c true, otherwise title area will be shown without animation
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
- * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE Instance is corrupted. Maybe base object is broken
*/
EAPI int ui_standard_view_set_title_visible(ui_standard_view *view, bool visible, bool anim);
* @brief Creates an ui_view.
* @since_tizen 3.0
* @remarks if you don't set a view name, you could not look up the view with it's name. @see ui_viewmgr_get_view_by_name().
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] name view name
*
- * @return The ui_view instance.
+ * @return The ui_view instance. @c NULL if failed
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
*
* @see ui_view_destroy()
+ * @see get_last_result()
*/
EAPI ui_view *ui_view_create(const char *name);
* @param[in] view An ui_view instance
* @param[in] content A new content. It allows @c NULL for canceling the previous content
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
*
* @see ui_view_get_content()
* @see ui_view_unset_content()
/**
* @brief Returns a content of this view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return content of @a view. If no contents set yet, @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_set_content()
* @see ui_view_unset_content()
+ * @see get_last_result()
*/
EAPI Eo *ui_view_get_content(ui_view *view);
/**
* @brief Unsets a ui_view content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_set_content()
* @see ui_view_get_content()
+ * @see get_last_result()
*/
EAPI Eo *ui_view_unset_content(ui_view *view);
* @param[in] event_cb The set of callback functions to handle view events
* @param[in] user_data The user data to be passed to the given @a event_callback functions
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
*
* @see ui_view_event_type_e
*/
* @brief Gets a base object of ui_view.
* @since_tizen 3.0
* @remarks Normally, this base object can be used for a parent of a view content.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return The base object of ui_view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see get_last_result()
*/
EAPI Eo* ui_view_get_base(ui_view *view);
* @param[in] view An ui_view instance
* @param[in] indicator The mode to set, one of #ui_view_indicator
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER Invalid Parameters.
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED Current view manager system is not set up.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER Invalid Parameters
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED Current view manager system is not set up
*
* @see ui_view_indicator
* @see ui_view_get_indicator()
/**
* @brief Returns the indicator mode of this view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param view An ui_view instance
*
* @return indicator state of the given @a view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_get_indicator()
+ * @see get_last_result()
*/
EAPI ui_view_indicator ui_view_get_indicator(ui_view *view);
* @param[in] rotations The array of rotation values
* @param[in] count The number of arrays of rotations
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER If @a view is invalid or @a count is less than 1 or @a rotations is invalid pointer.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER If @a view is invalid or @a count is less than 1 or @a rotations is invalid pointer
* @retval #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Out of Memory
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED Current view manager system is not set up.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED Current view manager system is not set up
*
* @see ui_view_get_available_rotations()
*/
/**
* @brief Gets the array of view's available rotations.
* @since_tizen 3.0
+ * @remarks @c NULL will be returned if @a view or @a count is invalid.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
* @param[out] count The number of arrays of rotations
*
* @return The array of rotation values
- *
- * @warning @c NULL will be returned if @a view or @a count is invalid.
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_set_available_rotations()
+ * @see get_last_result()
*/
EAPI const int *ui_view_get_available_rotations(ui_view *view, unsigned int *count);
*
* @warning You should not remove a view content manually on unload status if removable content is set
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER If @a view is invalid or @a count is less than 1 or @a rotations is invalid pointer.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER If @a view is invalid or @a count is less than 1 or @a rotations is invalid pointer
*
* @see ui_view_get_removable_content()
*/
/**
* @brief Returns a state of removable content.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return @c true if the view's content is removable, otherwise @c false
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_get_removable_content()
+ * @see get_last_result()
*/
EAPI bool ui_view_get_removable_content(ui_view *view);
/**
* @brief Gets the current view's degree.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return Current rotation degree, -1 if it fails to get degree information
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see get_last_result()
*/
EAPI int ui_view_get_degree(ui_view *view);
/**
* @brief Gets current view's orientation mode.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return Current orientation mode, one of #ui_view_orientation_mode
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_orientation_mode
+ * @see get_last_result()
*/
EAPI ui_view_orientation_mode ui_view_get_orientation_mode(ui_view *view);
* @param[in] view An ui_view instance
* @param[in] style a transition style name
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid or @a style is not supported.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid or @a style is not supported
*
* @see ui_view_get_transition_style()
*/
/**
* @brief Returns a style name of this view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return style name of view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_set_transition_style()
+ * @see get_last_result()
*/
EAPI const char *ui_view_get_transition_style(ui_view *view);
/**
* @brief Gets a ui_menu instance.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return The ui_menu that connected with given @a view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @get_last_result()
*/
EAPI ui_menu *ui_view_get_menu(ui_view *view);
/**
* @brief Returns a name of this view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return name of @a view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @get_last_result()
*/
EAPI const char *ui_view_get_name(ui_view *view);
/**
* @brief Returns a state of this view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] view An ui_view instance
*
* @return current state of @a view
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_state
+ * @see get_last_result()
*/
EAPI ui_view_state ui_view_get_state(ui_view *view);
*
* @param[in] view An ui_view instance
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid.
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
* @see ui_view_create()
* @see ui_standard_view_create()
*
* @param[in] view An ui_view to insert in the ui_viewmgr view list
*
- * @return @c 0 on success, otherwise a negative error value.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid.
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED @a view was already inserted.
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED @a view was already inserted
*
* @see ui_viewmgr_activate()
* @see ui_viewmgr_insert_view_before()
* @param[in] view An ui_view to insert in the ui_viewmgr view list
* @param[in] before An ui_view that will be just inserted after @a view. If you pass @c NULL, @a view will be inserted at the front of the view list
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED @a view was already inserted.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED @a view was already inserted
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid
*
* @see ui_viewmgr_insert_view_after()
*/
* @param[in] view An ui_view to insert in the ui_viewmgr view list
* @param[in] after An ui_view that will be just inserted before the @a view. If you pass @c NULL, @a view will be inserted at the end of the view list
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED @a view was already inserted.
- * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED @a view was already inserted
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid
*
* @see ui_viewmgr_insert_view_before()
*/
* @remarks If the view is just one left, then ui_viewmgr would be deactivated automatically since the ui application might be invalid anymore. Otherwise,
* the application will be terminated. It's up to system configuration.
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
- * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED No more views to pop.
- * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS On a certain profile, it may not allow to pop multiple views at the same time.
+ * @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED No more views to pop
+ * @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS On a certain profile, it may not allow to pop multiple views at the same time
*
* @see ui_viewmgr_deactivate()
* @see ui_viewmgr_push_view()
* @remarks ui_viewmgr window and views will be shown once this function is called.
* Usually this should be called after applications set their all views on initialization time.
*
- * @return @c 0 on success, otherwise a negative error value.
+ * @return @c 0 on success, otherwise a negative error value
* @retval #UI_VIEWMGR_ERROR_NONE Successful
* @retval #UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESS Already activated
* @retval #UI_VIEWMGR_ERROR_NOT_PERMITTED Can't be activated. (ie, view manager has zero views.)
/**
* @brief Deactivates this view manager.
- *
+ * @since_tizen 3.0
* @remarks ui_viewmgr window and views will be hidden once this function is called.
* this behavior is up ui system, but usually it hides(unmap)
* current window in order that application go background.
/**
* @brief Returns a last(top) view.
* @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @return The view which is last view of the ui_viewmgr view list. NULL on error
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED @a viewmgr has no view
*
- * @return The view which is last view of the ui_viewmgr view list
+ * @see get_last_result()
*/
EAPI ui_view *ui_viewmgr_get_last_view(void);
* @since_tizen 3.0
* @remarks You could use the index as the page numbers of the views.
* the index number of views are variable since the view list is variable.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] idx A index of the view which you are looking for
*
* @return The view which index is matched with @a idx
* If there were no views with index @a idx, @c NULL will be returned
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER Wrong index
*
* @see ui_viewmgr_get_view_index()
* @see ui_viewmgr_get_view_count()
+ * @see get_last_result()
*/
EAPI ui_view *ui_viewmgr_get_view_by_idx(int idx);
* @brief Returns a view which is matched with the @a name.
* @since_tizen 3.0
* @remarks Every view have their names as their own identifiers.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
* @param[in] name The name of the view which you are looking for
*
* @return The view which name is matched with @a name
* If there were no views name matched, @c NULL will be returned
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a name is NULL, otherwise there is no matched name
*
* @see ui_view_create()
* @see ui_standard_view_create()
+ * @see get_last_result()
*/
EAPI ui_view *ui_viewmgr_get_view_by_name(const char *name);
*
* @param[in] view An ui_view to query the index.
*
- * @return An index of the given @a view on success, otherwise, -1
+ * @return An index of the given @a view on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is not valid
*/
EAPI int ui_viewmgr_get_view_index(const ui_view *view);
virtual int setContent(T content);
/**
- * @brief This is for unsetting a content of the view.
+ * @brief Unsets an overlay content.
*
- * @return A previous content. If it wasn't, return @c nullptr.
+ * @return A previous content. If it wasn't, return @c nullptr
+ *
+ * @see setContent()
+ * @see getContent()
*/
virtual T unsetContent();
virtual int deactivate() = 0;
/**
- * @brief Return the active status of overlay.
+ * @brief Returns the active status of overlay.
*
- * @return @c true if overlay is activated, @c false otherwise.
+ * @return @c true if overlay is activated, @c false otherwise
*
* @see activate()
* @see deactivate()
UiIfaceView *getView();
/**
- * @brief Return a content instance of this overlay.
+ * @brief Returns a content of overlay.
+ *
+ * @return A content of overlay
*
- * @return content of overlay.
+ * @see setContent()
+ * @see unsetContent()
*/
virtual T getContent();
public:
/**
* @brief This is a constructor for initializing this view resources.
- *
+ * @remarks if you don't set a view name, you could not look up the view with it's name. @see ui_viewmgr_get_view_by_name().
+ *
* @param[in] name view name.
- *
- * @warning if you don't set a view name, you could not look up the view with its name. @see ui_viewmgr_view_get_by_name()
*/
explicit UiIfaceView(const char *name = nullptr);
virtual int setAvailableRotations(const int *rotations, unsigned int count);
/**
- * @brief Get the array of view's available rotations.
+ * @brief Gets the array of view's available rotations.
+ * @remarks @c nullptr will be returned if @a count is invalid.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
*
- * @param[out] count The number of arrays of rotations.
+ * @param[out] count The number of arrays of rotations
*
- * @return The array of rotation values.
+ * @return The array of rotation values
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
*
- * @warning @c nullptr will be returned if @a count is invalid.
- *
- * @see setAvailableRotations()
+ * @see setAvailableRotations
+ * @see get_last_result()
*/
const int *getAvailableRotations(unsigned int *count);
/**
- * @brief Return a style name of this view.
+ * @brief Returns a style name of this view.
+ *
+ * @return style name of view
*
- * @return style name of view. A default value is "default".
+ * @see setTransitionStyle()
*/
const char *getTransitionStyle();
/**
- * @brief Return a name of this view.
+ * @brief Returns a name of this view.
*
- * @return name of view. If it doesn't have, empty string will be returned.
+ * @return name of view
*/
const char *getName();
/**
- * @brief Return a content instance of this view.
+ * @brief Returns a content of this view.
*
- * @return content of view. If no contents set yet, @c nullptr.
+ * @return content of view. If no contents set yet, @c nullptr
+ *
+ * @see setContent()
+ * @see unsetContent()
*/
T getContent();
virtual int setContent(T content);
/**
- * @brief Unset the view content.
+ * @brief Unsets this view content.
+ *
+ * @param[in] view An ui_view instance
*
- * @return A previous content. If it wasn't, return @c nullptr.
+ * @return A previous content. If it wasn't, return @c nullptr
*/
virtual T unsetContent();
/**
- * @brief Return a state of this view.
+ * @brief Returns a state of this view.
+ *
+ * @return current state of view
*
- * @return current state of view.
+ * @see UiViewState
*/
UiViewState getState();
/**
- * @brief Return a state of removable content.
+ * @brief Returns a state of removable content.
*
- * @return true if the view's content is removable, otherwise false.
+ * @return @c true if the view's content is removable, otherwise @c false
*/
bool getRemovableContent();
/**
- * @brief Return the indicator mode of this view.
+ * @brief Returns the indicator mode of this view.
*
- * @return indicator state of view.
+ * @return indicator state of this view
*/
UiViewIndicator getIndicator();
/**
* @brief Return a view which is matched with the index @a idx.
*
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
* @param[in] idx A index of the view which you are looking for.
*
* @return The view which index is matched with @a idx.
* @note You could use the index as the page numbers of the views.
* @warning the index number of views are variable since the view list is variable.
*
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER Wrong index
+ *
* @see getViewIndex()
* @see getViewCount()
+ * @see get_last_result()
*/
UiIfaceView* getView(unsigned int idx);
/**
* @brief Return a view which is matched with the @a name.
*
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
* @note Every view have their names as their own identifiers.
*
* @param[in] name The name of the view which you are looking for.
*
* @return The view which name is matched with @a name.
* If there were no views name matched, @c nullptr will be returned.
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a name is nullptr, otherwise there is no matched name
*
- * @see UiIfaceView::getName().
+ * @see UiIfaceView::getName()
+ * @see get_last_result()
*/
UiIfaceView *getView(const char *name);
/**
* @brief Return a last(top) view.
*
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
* @return The view which is last view of the viewmgr view list.
* If there were no views, @c nullptr will be returned.
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED @a viewmgr has no view
+ *
+ * @see get_last_result()
*/
UiIfaceView *getLastView();
Elm_Button *UiStandardViewImpl::unsetTitleLeftBtn()
{
Elm_Button *btn = this->_titleLeftBtn;
- if (!btn) return nullptr;
+ if (!btn) {
+ set_last_result(UI_VIEWMGR_ERROR_NOT_PERMITTED);
+ return nullptr;
+ }
Elm_Layout *layout = this->getBase();
if (!layout) {
LOGE("Layout is invalid! UiStandardView(%p)", this);
+ set_last_result(UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE);
return btn;
}
evas_object_hide(btn);
this->_titleLeftBtn = nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return btn;
}
Elm_Button *UiStandardViewImpl::unsetTitleRightBtn()
{
Elm_Button *btn = this->_titleRightBtn;
- if (!btn) return nullptr;
+ if (!btn) {
+ set_last_result(UI_VIEWMGR_ERROR_NOT_PERMITTED);
+ return nullptr;
+ }
Elm_Layout *layout = this->getBase();
if (!layout) {
LOGE("Layout is invalid! UiStandardView(%p)", this);
+ set_last_result(UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE);
return btn;
}
evas_object_hide(btn);
this->_titleRightBtn = nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return btn;
}
Elm_Toolbar *UiStandardViewImpl::unsetToolbar()
{
Elm_Toolbar *toolbar = this->_toolbar;
- if (!toolbar) return nullptr;
+ if (!toolbar) {
+ set_last_result(UI_VIEWMGR_ERROR_NOT_PERMITTED);
+ return nullptr;
+ }
Elm_Layout *layout = this->getBase();
if (!layout) {
+ set_last_result(UI_VIEWMGR_ERROR_RESULT_OUT_OF_RANGE);
LOGE("Layout is invalid! UiStandardView(%p)", this);
return toolbar;
}
evas_object_hide(toolbar);
this->_toolbar = nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return toolbar;
}
if (!menu)
{
LOGE("Invalid ui_menu = nullptr");
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return UI_VIEWMGR_ERROR_INVALID_PARAMETER;
}
return UI_VIEWMGR_ERROR_NONE;
{
if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return menu->getContent();
}
{
if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return menu->unsetContent();
}
{
if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return menu->isActivated();
}
{
if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return menu->getBase();
}
{
if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return -1;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return menu->getDegree();
}
{
if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return dynamic_cast<ui_view *>(menu->getView());
}
if (!popup)
{
LOGE("Invalid ui_popup = nullptr");
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return UI_VIEWMGR_ERROR_INVALID_PARAMETER;
}
return UI_VIEWMGR_ERROR_NONE;
{
if (!view)
{
- LOGE("view is null.");
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return nullptr;
}
- return new ui_popup(view);
+ ui_popup *popup = new ui_popup(view);
+ if (!popup)
+ {
+ LOGE("Failed to create new ui_popup instance");
+ set_last_result(UI_VIEWMGR_ERROR_OUT_OF_MEMORY);
+ return nullptr;
+ }
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
+ return popup;
}
EAPI int ui_popup_destroy(ui_popup *popup)
EAPI Elm_Popup *ui_popup_get_content(ui_popup *popup)
{
if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return popup->getContent();
}
EAPI Elm_Popup *ui_popup_unset_content(ui_popup *popup)
{
if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return popup->unsetContent();
}
EAPI bool ui_popup_get_activated(ui_popup *popup)
{
if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return false;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return popup->isActivated();
}
EAPI Eo *ui_popup_get_base(ui_popup *popup)
{
if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return popup->getBase();
}
EAPI int ui_popup_get_degree(ui_popup *popup)
{
if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return -1;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return popup->getDegree();
}
EAPI ui_view *ui_popup_get_view(ui_popup *popup)
{
if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return dynamic_cast<ui_view *>(popup->getView());
}
if (!view)
{
LOGE("Invalid ui_standard_view = nullptr");
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return nullptr;
}
EAPI ui_standard_view* ui_standard_view_create(const char *name)
{
+ ui_standard_view *view = new ui_standard_view_capi(name);
+
+ if (!view)
+ {
+ LOGE("Failed to create new ui_standard_view instance");
+ set_last_result(UI_VIEWMGR_ERROR_OUT_OF_MEMORY);
+ return nullptr;
+ }
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return new ui_standard_view_capi(name);
}
EAPI Elm_Button *ui_standard_view_get_title_right_btn(ui_standard_view *view)
{
ui_standard_view_capi *capi_view = validate_view(view);
- if (!capi_view) return nullptr;
+ if (!capi_view)
+ {
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
+ return nullptr;
+ }
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return capi_view->getTitleRightBtn();
}
ui_standard_view_capi *capi_view = validate_view(view);
if (!capi_view) return nullptr;
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return capi_view->getTitleLeftBtn();
}
{
ui_standard_view_capi *capi_view = validate_view(view);
if (!capi_view) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return capi_view->getToolbar();
}
{
ui_standard_view_capi *capi_view = validate_view(view);
if (!capi_view) return nullptr;
+
return capi_view->unsetToolbar();
}
if (!view)
{
LOGE("Invalid ui_view = nullptr");
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return UI_VIEWMGR_ERROR_INVALID_PARAMETER;
}
return UI_VIEWMGR_ERROR_NONE;
EAPI ui_view* ui_view_create(const char *name)
{
- return new ui_view_capi(name);
+ ui_view *view = new ui_view_capi(name);
+
+ if (!view)
+ {
+ LOGE("Failed to create new ui_view instance");
+ set_last_result(UI_VIEWMGR_ERROR_OUT_OF_MEMORY);
+ return nullptr;
+ }
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
+ return view;
}
EAPI int ui_view_set_event_cb(ui_view *view, ui_view_event_type_e event_type, ui_view_event_cb event_cb, void *user_data)
EAPI Eo *ui_view_unset_content(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->unsetContent();
}
EAPI ui_view_indicator ui_view_get_indicator(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return UI_VIEW_INDICATOR_UNKNOWN;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getIndicator();
}
EAPI bool ui_view_get_removable_content(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return false;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getRemovableContent();
}
EAPI int ui_view_get_degree(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return -1;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getDegree();
}
EAPI ui_view_orientation_mode ui_view_get_orientation_mode(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return UI_VIEW_ORIENTATION_MODE_UNKNOWN;
+
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getOrientationMode();
}
EAPI const int *ui_view_get_available_rotations(ui_view *view, unsigned int *count)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return false;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getAvailableRotations(count);
}
EAPI const char *ui_view_get_transition_style(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getTransitionStyle();
}
EAPI ui_menu *ui_view_get_menu(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return const_cast<ui_menu*>(view->getMenu());
}
EAPI const char *ui_view_get_name(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getName();
}
EAPI ui_view_state ui_view_get_state(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return UI_VIEW_STATE_UNKNOWN;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getState();
}
EAPI Eo *ui_view_get_content(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return view->getContent();
}
EAPI const char *ui_view_get_type(ui_view *view)
{
if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return false;
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return dynamic_cast<ui_common_view_capi *>(view)->type;
}
if (!view)
{
LOGE("Invalid Parameter view = %p", view);
- return -1;
+ return UI_VIEWMGR_ERROR_INVALID_PARAMETER;
}
return UI_VIEWMGR->getViewIndex(view);
const int *UiIfaceViewImpl::getAvailableRotations(unsigned int *count)
{
- if (!count) return nullptr;
+ if (!count) {
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
+ return nullptr;
+ }
static int rots[MAX_NUM_OF_AVAILABLE_ROTATIONS] = {0, 90, 180, 270};
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
if (this->_rotationCount > 0) {
*count = this->_rotationCount;
return this->_rotations;
{
if (idx >= this->_viewList.size()) {
LOGE("Invalid idx(%d)! =? (idx range: %d ~ %d)", idx, 0, this->_viewList.size() - 1);
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return nullptr;
}
auto it = this->_viewList.begin();
advance(it, idx);
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return *it;
}
++idx;
}
- return -1;
+ return UI_VIEWMGR_ERROR_INVALID_PARAMETER;
}
UiIfaceView *UiIfaceViewmgrImpl::getLastView()
{
int cnt = this->getViewCount();
+ if (cnt == 0)
+ {
+ set_last_result(UI_VIEWMGR_ERROR_NOT_PERMITTED);
+ return nullptr;
+ }
+
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return this->getView(cnt - 1);
}
UiIfaceView *UiIfaceViewmgrImpl::getView(const char *name)
{
- if (!name) return nullptr;
+ if (!name)
+ {
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
+ return nullptr;
+ }
int nameLen = strlen(name);
for (auto v : this->_viewList) {
//Got you!
if ((viewNameLen == nameLen) && !strcmp(name, viewName)) {
+ set_last_result(UI_VIEWMGR_ERROR_NONE);
return v;
}
}
+ set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
return nullptr;
}