extern "C" {
#endif
+/**
+ * @brief This is for replacing or setting a content of the ui_menu.
+ *
+ * @param menu The ui_menu object
+ * @param ctxpopup ctxpopup object. It allows @c NULL for canceling the previous content
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_menu_content_get()
+ */
bool ui_menu_content_set(ui_menu *menu, Elm_Ctxpopup *ctxpopup);
+
+/**
+ * @brief Return a content object of ui_menu.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return content of ui_memu object
+ *
+ * @see ui_menu_content_set()
+ */
Elm_Ctxpopup *ui_menu_content_get(ui_menu *menu);
+
+/**
+ * @brief This is for unsetting a content of the ui_menu.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return A previous content. If it wasn't, return value will be @c NULL.
+ */
Elm_Ctxpopup *ui_menu_content_unset(ui_menu *menu);
+
+/**
+ * @brief This is activating the ui_menu.
+ *
+ * @note It makes ui_menu state as show.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_menu_deactivate()
+ */
bool ui_menu_activate(ui_menu *menu);
+
+/**
+ * @brief This is deactivating the ui_menu.
+ *
+ * @note It makes ui_menu state as hide.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_menu_activate()
+ */
bool ui_menu_deactivate(ui_menu *menu);
+
+/**
+ * @brief Return the active status of ui_menu.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return @c true if ui_menu is activated, @c false otherwise
+ *
+ * @see ui_menu_activate()
+ * @see ui_menu_deactivate()
+ */
bool ui_menu_activated_get(ui_menu *menu);
+
+//FIXME: is it really need?
+/**
+ * @brief Get a base window of viewmgr.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return viewmgr's window object
+ */
Evas_Object *ui_menu_base_get(ui_menu *menu);
+
+/**
+ * @brief Get current ui_menu's degree.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return Current rotation degree, -1 if it fails to get degree information
+ */
int ui_menu_degree_get(ui_menu *menu);
+
+/**
+ * @brief Return a view which is matched with the ui_menu.
+ *
+ * @param menu The ui_menu object
+ *
+ * @return The view which is matched with ui_menu
+ */
ui_view *ui_menu_view_get(ui_menu *menu);
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @brief This is a constructor for initializing this ui_popup.
+ *
+ * @param view The view object
+ *
+ * @return The ui_popup object
+ *
+ * @see ui_popup_destroy()
+ */
ui_popup *ui_popup_create(ui_view *view);
+
+/**
+ * @brief This is a ui_popup destructor.
+ *
+ * @param popup The ui_popup object
+ *
+ * @seee ui_popup_create()
+ */
void ui_popup_destroy(ui_popup *popup);
+
+/**
+ * @brief This is for replacing or setting a content of the ui_popup.
+ *
+ * @popup popup The ui_popup object
+ *
+ * @param elm_popup elm_popup object. It allows @c NULL for canceling the previous content.
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_popup_content_get()
+ */
bool ui_popup_content_set(ui_popup *popup, Elm_Popup *content);
+
+/**
+ * @brief Return a content object of ui_popup.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return content of ui_popup object
+ *
+ * @see ui_popup_content_set()
+ */
Elm_Popup *ui_popup_content_get(ui_popup *popup);
+
+/**
+ * @brief This is for unsetting a content of the ui_popup.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return A previous content. If it wasn't, return value will be @c NULL
+ *
+ * @see ui_popup_content_set()
+ * @see ui_popup_content_get()
+ */
Elm_Popup *ui_popup_content_unset(ui_popup *popup);
+
+/**
+ * @brief This is activating the ui_popup.
+ *
+ * @param popup The popup object
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_popup_deactivate()
+ */
bool ui_popup_activate(ui_popup *popup);
+
+/**
+ * @brief This is deactivating the ui_popup.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_popup_activate()
+ */
bool ui_popup_deactivate(ui_popup *popup);
+
+/**
+ * @brief Return the active status of ui_popup.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return @c true if ui_popup is activated, @c false otherwise
+ *
+ * @see ui_popup_activate()
+ * @see ui_popup_deactivate()
+ */
bool ui_popup_activated_get(ui_popup *popup);
+
+//FIXME: is it really need?
+/**
+ * @brief Get a base window of viewmgr.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return viewmgr's window object
+ */
Evas_Object *ui_popup_base_get(ui_popup *popup);
+
+/**
+ * @brief Get current ui_popup's degree.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return Current rotation degree, -1 if it fails to get degree information
+ */
int ui_popup_degree_get(ui_popup *popup);
+
+/**
+ * @brief Return a view which is matched with the ui_popup.
+ *
+ * @param popup The ui_popup object
+ *
+ * @return The view which is matched with ui_popup.
+ */
ui_view *ui_popup_view_get(ui_popup *popup);
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @brief ui_view's 'lifecycle callback' function signature.
+ */
typedef bool (*ui_view_lifecycle_cb)(ui_view *view, void *data);
+/**
+ * @brief ui_view's rotate event callback function signature.
+ */
typedef bool (*ui_view_event_rotate_cb)(ui_view *view, int degree, void *data);
+/**
+ * @brief ui_view's portrait event callback function signature.
+ */
typedef bool (*ui_view_event_portrait_cb)(ui_view *view, void *data);
+/**
+ * @brief ui_view's landscape event callback function signature.
+ */
typedef bool (*ui_view_event_landscape_cb)(ui_view *view, void *data);
+/**
+ * @brief ui_view's back event callback function signature.
+ */
typedef bool (*ui_view_event_back_cb)(ui_view *view, void *data);
+/**
+ * @brief ui_view's menu event callback function signature.
+ */
typedef bool (*ui_view_event_menu_cb)(ui_menu *menu, void *data);
+/**
+ * @brief The structure type containing the set of callback functions for handling view's lifecycle events.
+ */
typedef struct
{
ui_view_lifecycle_cb load;
ui_view_lifecycle_cb destroy;
} ui_view_lifecycle_callback_s;
+/**
+ * @brief The structure type containing the set of callback functions for handling view's events.
+ */
typedef struct
{
ui_view_event_rotate_cb rotate;
//================================== view common APIs ========================================
+/**
+ * @brief Set callback functions for handling view's lifecycle events.
+ *
+ * @param view The ui_view object
+ * @param lifecycle_callback The set of callback functions to handle application lifecycle events
+ * @param data The user data to be passed to the callback functions
+ *
+ * @return true if it succeed, false otherwise
+ */
bool ui_view_lifecycle_callbacks_set(ui_view *view, ui_view_lifecycle_callback_s *lifecycle_callback, void *data);
+
+/**
+ * @brief Set callback functions for handling view events.
+ *
+ * @param view The ui_view object
+ * @param event_callback The set of callback functions to handle view events
+ * @param data The user data to be passed to the callback functions
+ *
+ * @return true if it succeed, false otherwise
+ */
bool ui_view_event_callbacks_set(ui_view *view, ui_view_event_callback_s *event_callback, void *data);
+/**
+ * @brief Get a base layout of viewmgr.
+ *
+ * @param view The ui_view object
+ *
+ * @return viewmgr's base layout object
+ */
Evas_Object* ui_view_base_get(ui_view *view);
+/**
+ * @brief This is for unsetting a content of the view.
+ *
+ * @param view The ui_view object
+ *
+ * @return A previous content. If it wasn't, return value will be @c NULL
+ *
+ * @see ui_view_content_set()
+ */
Evas_Object *ui_view_content_unset(ui_view *view);
+/**
+ * @brief Set indicator of the view.
+ *
+ * @param view The ui_view object
+ * @param indicator The mode to set, one of #ui_view_indicator
+ *
+ * @return @c false if current indicator is same with new one, @c true otherwise
+ *
+ * @see ui_view_indicator_get()
+ */
void ui_view_indicator_set(ui_view *view, ui_view_indicator indicator);
+
+/**
+ * @brief Return the indicator mode of this view.
+ *
+ * @param view The ui_view object
+ *
+ * @return indicator state of view
+ *
+ * @see ui_view_indicator_set()
+ */
ui_view_indicator ui_view_indicator_get(ui_view *view);
+/**
+ * @brief Set content removable.
+ *
+ * @param view The ui_view object
+ * @param removable if @p removable is @c true, content of this view will be removed on unload state. @c false otherwise
+ *
+ * @warning You should not remove a view content manually on unload status if removable content is set.
+ *
+ * @see ui_view_removable_content_get()
+ */
void ui_view_removable_content_set(ui_view *view, bool remove);
+
+/**
+ * @brief Return a state of removable content.
+ *
+ * @param view The ui_view object
+ *
+ * @return true if the view's content is removable, otherwise false
+ *
+ * @see ui_view_removable_content_get()
+ */
bool ui_view_removable_content_get(ui_view *view);
+/**
+ * @brief Get current view's degree.
+ *
+ * @param view The ui_view object
+ *
+ * @return Current rotation degree, -1 if it fails to get degree information
+ */
int ui_view_degree_get(ui_view *view);
+/**
+ * @brief Set transition style of a view.
+ *
+ * @note @p style is reserved for supporting various kinds of view transition effects.
+ * The actual behaviors with this transition style is up to your frameworks. Default value of the style is NULL.
+ * and "none" represents none transition. If you don't like give any transition effects to this view, you can pass "none" as @p style.
+ *
+ * @param view The ui_view object
+ * @param style a transition style name
+ *
+ * @return true if the given @c style is available, otherwise false
+ *
+ * @see ui_view_transition_style_get()
+ */
bool ui_view_transition_style_set(ui_view *view, const char *style);
+
+/**
+ * @brief Return a style name of this view.
+ *
+ * @param view The ui_view object
+ *
+ * @return style name of view
+ *
+ * @see ui_view_transition_style_set()
+ */
const char *ui_view_transition_style_get(ui_view *view);
+/**
+ * @brief Get menu object.
+ *
+ * @param view The ui_view object
+ *
+ * @return The menu object of connected with view
+ */
const ui_menu *ui_view_menu_get(ui_view *view);
+/**
+ * @brief Set name of the view.
+ *
+ * @note A view can get a specific name. default value of the name is NULL.
+ *
+ * @param view The ui_view object
+ * @param name A new name of view
+ *
+ * @return true if the given @c name is available, otherwise false
+ *
+ * @warning When you override this member function, you should check the name duplicate with other view or not.
+ *
+ * @see ui_view_name_get()
+ */
bool ui_view_name_set(ui_view *view, const char *name);
+
+/**
+ * @brief Return a name of this view.
+ *
+ * @param view The ui_view object
+ *
+ * @return name of view
+ *
+ * @see ui_view_name_set()
+ */
const char *ui_view_name_get(ui_view *view);
+/**
+ * @brief Return a state of this view.
+ *
+ * @param view The ui_view object
+ *
+ * @return current state of view
+ */
ui_view_state ui_view_state_get(ui_view *view);
+/**
+ * @brief Return a content of this view.
+ *
+ * @param view The ui_view object
+ *
+ * @return content of view
+ *
+ * @see ui_view_content_set()
+ */
Evas_Object *ui_view_content_get(ui_view *view);
+/**
+ * @brief This is a view destructor.
+ *
+ * @param view The ui_view object
+ *
+ * @return true if it succeed, false otherwise
+ */
bool ui_view_destroy(ui_view *view);
//================================ ui_standard view APIs =====================================
+/**
+ * @brief This is a constructor for initializing ui_standard_view.
+ *
+ * @param name view name
+ *
+ * @return The ui_view object
+ *
+ * @see ui_view_destroy()
+ */
ui_view *ui_standard_view_create(const char *name);
+/**
+ * @brief This is for replacing or setting a content of the view.
+ *
+ * @param view The ui_view object
+ * @param content A new content. It allows @c NULL for canceling the previous content
+ * @param title The label in the title area. The name of the title label part is "elm.text.title"
+ * @param subtitle The label in the subtitle area. The name of the subtitle label part is "elm.text.subtitle"
+ * @param title_left_btn The button in the left part of title area
+ * @param title_right_btn The button in the right part of title area
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_view_content_get()
+ */
bool ui_standard_view_content_set(ui_view *view, Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn,
Evas_Object *title_right_btn);
+/**
+ * @brief This is for setting title text.
+ *
+ * @param view The ui_view object
+ * @param text The label in the title area
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @ui_standard_view_title_get()
+ */
bool ui_standard_view_title_set(ui_view *view, const char *text);
+/**
+ * @brief This is for setting subtitle text.
+ *
+ * @param view The ui_view object
+ * @param text The label in the subtitle area
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_standard_view_sub_title_get()
+ */
bool ui_standard_view_sub_title_set(ui_view *view, const char *text);
+/**
+ * @brief This is for setting title badge text.
+ *
+ * @param view The ui_view object
+ * @param text The label in the title badge area
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_standard_view_title_badge_get()
+ */
bool ui_standard_view_title_badge_set(ui_view *view, const char *badge_text);
+/**
+ * @brief This is for setting title_right_btn.
+ *
+ * @param view The ui_view object
+ * @param title_right_btn The button in the right part of title area
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_standard_view_title_right_btn_get()
+ */
bool ui_standard_view_title_right_btn_set(ui_view *view, Evas_Object *title_right_btn);
+
+/**
+ * @brief Return a title right button of the view.
+ *
+ * @param view The ui_view object
+ *
+ * @return title right button of the view
+ *
+ * @see ui_standard_view_title_right_btn_set()
+ */
Elm_Button *ui_standard_view_title_right_btn_get(ui_view *view);
+
+/**
+ * @brief This is for unsetting a title right button of title area.
+ *
+ * @param view The ui_view object
+ * @return A previous content. If it wasn't, return value will be @c NULL
+ */
Elm_Button *ui_standard_view_title_right_btn_unset(ui_view *view);
+/**
+ * @brief This is for setting title_left_btn.
+ *
+ * @param view The ui_view object
+ * @param title_left_btn The button in the left part of title area
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_standard_view_title_left_btn_get()
+ */
bool ui_standard_view_title_left_btn_set(ui_view *view, Evas_Object *title_left_btn);
+
+/**
+ * @brief Return a title left button of the view.
+ *
+ * @param view The ui_view object
+ *
+ * @return title left button of the view
+ *
+ * @see ui_standard_view_title_left_btn_set()
+ */
Elm_Button *ui_standard_view_title_left_btn_get(ui_view *view);
+
+/**
+ * @brief This is for unsetting a title right button of title area.
+ *
+ * @param view The ui_view object
+ *
+ * @return A previous content. If it wasn't, return value will be @c NULL
+ */
Elm_Button *ui_standard_view_title_left_btn_unset(ui_view *view);
+/**
+ * @brief This is for setting toolbar below title.
+ *
+ * @param view The ui_view obejct
+ * @param toolbar Toolbar object
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_standard_view_toolbar_get()
+ */
bool ui_standard_view_toolbar_set(ui_view *view, Elm_Toolbar *toolbar);
+
+/**
+ * @brief Return a toolbar of the view.
+ *
+ * @param view The ui_view obejct
+ * @return toolbar of the view
+ *
+ * @see ui_standard_view_toolbar_set()
+ */
Elm_Toolbar *ui_standard_view_toolbar_get(ui_view *view);
+
+/**
+ * @brief This is for unsetting a toolbar.
+ *
+ * @param view The ui_view object
+ *
+ * @return A previous content. If it wasn't, return value will be @c NULL
+ */
Elm_Toolbar *ui_standard_view_toolbar_unset(ui_view *view);
+/**
+ * @brief This is handling title visible state.
+ *
+ * @param view The ui_view object
+ * @param visible title state set as visible if the given param is true, otherwise title area set as invisible
+ * @param anim title area will be shown with animation if the given param is true, otherwise title area will be shown without animation
+ *
+ * @return true if it succeed, false otherwise
+ */
bool ui_standard_view_title_visible_set(ui_view *view, bool visible, bool anim);
//==================================== ui_view APIs ==========================================
+
+/**
+ * @brief This is a constructor for initializing ui_view.
+ *
+ * @param name view name
+ *
+ * @return The ui_view object
+ *
+ * @see ui_view_destory()
+ */
ui_view *ui_view_create(const char *name);
+
+/**
+ * @brief This is for replacing or setting a content of the view.
+ *
+ * @param view The ui_view object
+ * @param content A new content. It allows @c NULL for canceling the previous content
+ *
+ * @return true if it succeed, false otherwise
+ *
+ * @see ui_view_content_get()
+ */
bool ui_view_content_set(ui_view *view, Evas_Object *content);
extern "C" {
#endif
+/**
+ * @brief Push a new view into this viewmgr. This function is used for when application switches a current view to a new one.
+ *
+ * @note Normally, the current view will be hidden by a new view. In default, when user calls this API, view will be switched to @p view instantly,
+ * only when viewmgr state is activated. Otherwise, the @p view will be shown later when viewmgr is activated. ui_viewmgr_view_push() is designed for providing
+ * view transition effect. If you want push view instantly without any transition, you could use ui_viewmgr_view_push_insert_before() or ui_viewmgr_view_push_insert_after().
+ * If you want to pop the current view, the please use ui_viewmgr_view_pop().
+ *
+ * @param viewmgr The viewmgr object
+ * @param view A view to insert in the viewmgr view list
+ *
+ * @return @p view, @c NULL when it fails to push a @p view
+ *
+ * @see ui_viewmgr_activate()
+ * @see ui_viewmgr_view_push_insert_before()
+ * @see ui_viewmgr_view_push_insert_after()
+ * @see ui_viewmgr_view_pop()
+ */
ui_view *ui_viewmgr_view_push(ui_viewmgr *viewmgr, ui_view *view);
+
+/**
+ * @brief Insert a view in this viewmgr view list. Specifically, insert a given @p view right before of the given view, @before.
+ *
+ * @param viewmgr The viewmgr object
+ * @param view A view to insert in the viewmgr view list
+ * @param before A view that will be just inserted after @p view. If you pass @c NULL, @p view will be inserted at the front of the view list
+ *
+ * @return @c true on success or @c false otherwise
+ *
+ * @see ui_viewmgr_view_push_insert_after()
+ */
bool ui_viewmgr_view_push_insert_before(ui_viewmgr *viewmgr, ui_view *view, ui_view *before);
+
+/**
+ * @brief Insert a view in this viewmgr view list. Specifically, insert a given @p view right after of the given view, @after.
+ *
+ * @oaran viewmgr The viewmgr object
+ * @param view A view to insert in the viewmgr view list
+ * @param after A view that will be just inserted before the @p view. If you pass @c NULL, @p view will be inserted at the end of the view list
+ *
+ * @return @c true on success or @c false otherwise
+ *
+ * @see ui_viewmgr_view_push_insert_before()
+ */
bool ui_viewmgr_view_push_insert_after(ui_viewmgr *viewmgr, ui_view *view, ui_view *after);
+
+/**
+ * @brief Pop the top(last) view from this viewmgr view list.
+ * This function is used when application switches the current view back to the previous view.
+ * The top view will be removed from the view stack and then it will be deleted by the viewmgr.
+ *
+ * @note If the view is just one left, then 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.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return @c true on success or @c false otherwise
+ *
+ * @see ui_viewmgr_deactivate()
+ * @see ui_viewmgr_view_push()
+ */
bool ui_viewmgr_view_pop(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Activate this view manager.
+ *
+ * @note 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.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return @c true on success or @c false otherwise
+ *
+ * @see ui_viewmgr_deactivate()
+ */
bool ui_viewmgr_activate(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Deactivate this view manager.
+ *
+ * @note 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.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return @c true success or @c false not
+ *
+ * @see ui_viewmgr_activate()
+ */
bool ui_viewmgr_deactivate(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Get a window object of viewmgr.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return The window object of viewmgr
+ */
Elm_Win *ui_viewmgr_window_get(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Return a last(top) view.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return The view which is last view of the viewmgr view list
+ */
ui_view *ui_viewmgr_last_view_get(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Return a view which is matched with the index @p idx.
+ *
+ * @param viewmgr The viewmgr object
+ * @param idx A index of the view which you are looking for.
+ *
+ * @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.
+ *
+ * @return The view which index is matched with @p idx
+ * If there were no views with index @p idx, @c NULL will be returned
+ *
+ * @see ui_viewmgr_view_index_get()
+ * @see ui_viewmgr_view_count_get()
+ */
ui_view *ui_viewmgr_view_get(ui_viewmgr *viewmgr, int idx);
+
//ui_view *ui_viewmgr_view_get_by_id(ui_viewmgr *viewmgr, const char *id);
+
+/**
+ * @brief Get a base layout of viewmgr.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return The base layout object of viewmgr
+ */
Evas_Object *ui_viewmgr_base_get(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Return a view index(page) number of the given view.
+ * You could use this function to query the given @p view list order.
+ *
+ * @param viewmgr The viewmgr object
+ * @param view A view to query the index
+ *
+ * @return An index of the given @p view on success, otherwise, -1
+ *
+ * @warning The index number of views are variable since the view list is variable
+ */
+int ui_viewmgr_view_index_get(ui_viewmgr *viewmgr, const ui_view *view);
+
+/**
+ * @brief Return the number of views which this viewmgr has.
+ *
+ * @param viewgmr The viewmgr object
+ *
+ * @return the count of views
+ */
int ui_viewmgr_view_count_get(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Return whether soft back key is required or not.
+ *
+ * @param viewmgr The viewmgr object
+ *
+ * @return @c true if soft key is required, @c false otherwise
+ */
bool ui_viewmgr_soft_key_need_get(ui_viewmgr *viewmgr);
+
+/**
+ * @brief Return viewmgr object.
+ *
+ * @return The viewmgr object
+ */
ui_viewmgr *ui_viewmgr_viewmgr_get();
+/**
+ * @brief Macro for calling ui_viewmgr_deactivate()
+ */
#define UI_VIEWMGR_DEACTIVATE() (ui_viewmgr_deactivate(ui_viewmgr_viewmgr_get()))
+
+/**
+ * @brief Macro for calling ui_viewmgr_view_push()
+ */
#define UI_VIEWMGR_VIEW_PUSH(X) (ui_viewmgr_view_push(ui_viewmgr_viewmgr_get(), (X)))
+
+/**
+ * @brief Macro for calling ui_viewmgr_view_pop()
+ */
#define UI_VIEWMGR_VIEW_POP() (ui_viewmgr_view_pop(ui_viewmgr_viewmgr_get()))
#ifdef __cplusplus
extern "C" {
#endif
-
+/**
+ * @brief This is constructor for initializing ui_viewmgr_app.
+ *
+ * @param pkg The name of package
+ * @param loale_dir The path of locale directory
+ *
+ * @return true if it succeed, false otherwise
+ */
bool ui_viewmgr_app_init(const char *pkg, const char *locale_dir);
-int ui_viewmgr_app_run(int argc, char **argv, ui_app_lifecycle_callback_s *lifecycle_callback, void *data);
+
+/**
+ * @brief This is calling ui_app_main() function with given params to run application's main loop.
+ *
+ * @note This is wrapping ui_app_main() function.
+ *
+ * @param argc The argument count
+ * @param argv The argument vector
+ * @param lifecycle_callback The set of callback functions to handle application lifecycle events
+ * @param user_data The user data to be passed to the callback functions
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
+int ui_viewmgr_app_run(int argc, char **argv, ui_app_lifecycle_callback_s *lifecycle_callback, void *user_data);
+
+/**
+ * @brief This is ui_viewmgr_app destructor.
+ *
+ * @return true if it succeed, false otherwise
+ */
bool ui_viewmgr_app_term(void);
#ifdef __cplusplus
/**
* @brief Return the active status of menu.
*
- * @return @c true if overlay is activated, @c false otherwise.
+ * @return @c true if menu is activated, @c false otherwise.
*
* @see activate()
* @see deactivate()
/**
* @brief This is for replacing or setting a content of the view.
*
- * @param content a new content. It allows @c NULL for canceling the previous content.
+ * @param content A new content. It allows @c NULL for canceling the previous content.
* @param title The label in the title area. The name of the title label part is "elm.text.title".
* @param subtitle The label in the subtitle area. The name of the subtitle label part is "elm.text.subtitle".
* @param title_left_btn The button in the left part of title area.
*
* @note A view can get a specific name. default value of the name is NULL.
*
- * @param name a new name of view.
+ * @param name A new name of view.
*
* @return true if the given @c name is available, otherwise false.
*
*/
unsigned int get_view_count();
+ /**
+ * @brief Return a view index(page) number of the given view.
+ * You could use this function to query the given @p view list order.
+ *
+ * @param view A view to query the index.
+ *
+ * @return An index of the given @p view on success, otherwise, -1.
+ *
+ * @warning The index number of views are variable since the view list is variable.
+ */
+ int get_view_index(const ui_iface_view *view);
+
/**
* @brief Return whether soft key is required or not.
*
*/
ui_iface_view *get_last_view();
- /**
- * @brief Return a view index(page) number of the given view.
- * You could use this function to query the given @p view list order.
- *
- * @param view A view to query the index.
- *
- * @return An index of the given @p view on success, otherwise, -1.
- *
- * @warning The index number of views are variable since the view list is variable.
- */
- int get_view_index(const ui_iface_view *view);
-
///Constructor.
ui_iface_viewmgr();
return viewmgr->get_base();
}
+int ui_viewmgr_view_index_get(ui_viewmgr *viewmgr, const ui_view *view)
+{
+ if (!viewmgr || !view)
+ {
+ LOGE("Invalid Parameter viewmgr = %p, view = %p", viewmgr, view);
+ return -1;
+ }
+
+ return viewmgr->get_view_index(view);
+}
+
+
int ui_viewmgr_view_count_get(ui_viewmgr *viewmgr)
{
if (!viewmgr)
{
}
- int run(int argc, char **argv, ui_app_lifecycle_callback_s *lifecycle_callback, void *data)
+ int run(int argc, char **argv, ui_app_lifecycle_callback_s *lifecycle_callback, void *user_data)
{
if (lifecycle_callback)
{
this->capi_lifecycle_callback = *lifecycle_callback;
}
- this->data = data;
+ this->data = user_data;
return ui_app::run(argc, argv);
}
return true;
}
-int ui_viewmgr_app_run(int argc, char **argv, ui_app_lifecycle_callback_s *lifecycle_callback, void *data)
+int ui_viewmgr_app_run(int argc, char **argv, ui_app_lifecycle_callback_s *lifecycle_callback, void *user_data)
{
ui_app_capi *app = g_app;
if (!app) return -1;
- return app->run(argc, argv, lifecycle_callback, data);
+ return app->run(argc, argv, lifecycle_callback, user_data);
}
bool ui_viewmgr_app_term(void)
{
ui_app_capi *app = g_app;
if (app) delete (app);
+ else return false;
+
g_app = NULL;
return true;