Add CAPI doc. 61/74961/1
authorWoochan Lee <wc0917.lee@samsung.com>
Thu, 16 Jun 2016 07:11:00 +0000 (16:11 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Thu, 16 Jun 2016 07:11:45 +0000 (16:11 +0900)
Change-Id: I7e8ce036f79636c50e99c86abd839a56d7e75d42

src/include/efl/mobile/c/ui_menu.h
src/include/efl/mobile/c/ui_popup.h
src/include/efl/mobile/c/ui_view.h
src/include/efl/mobile/c/ui_viewmgr.h
src/include/efl/mobile/c/ui_viewmgr_app.h
src/include/efl/mobile/ui_menu.h
src/include/efl/mobile/ui_standard_view.h
src/include/interface/ui_iface_view.h
src/include/interface/ui_iface_viewmgr.h
src/lib/efl/mobile/c/ui_viewmgr.cpp
src/lib/efl/mobile/c/ui_viewmgr_app.cpp

index 5ff3a48317b5247c9af09f25e8e946671529e675..68d5623aecebc71cc4e4d14a6891c178d5daae7e 100644 (file)
 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
index a0310971032e34d5a1aac0a7d144166c8a8357e8..bf809d6acd18cb548cfbc60da0a994b31583dc23 100644 (file)
 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
index 108817123f08935e6cdd9530cf7f49408d89385e..da1389dcf053214975068ac6b62a057563d07784 100644 (file)
@@ -5,14 +5,35 @@
 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;
@@ -24,6 +45,9 @@ typedef struct
        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;
@@ -35,64 +59,389 @@ typedef struct
 
 //================================== 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);
 
 
index f650334165d895bb929bf841628d0d77762d31dc..ecf6832cf87f0104143dfb6083e6fcc6a2300588 100644 (file)
 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
index c54740075c80222d2e9432bbe7b4396c6efecde1..ac983ac250d40cdd7507bfcf85041fc2f1a50d93 100644 (file)
@@ -5,9 +5,35 @@
 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
index e7eb6cd7b689722a147a6ed928f9a350bcf917f1..cab1a568fdda03ed658b548d803a936ad33c5cc1 100644 (file)
@@ -77,7 +77,7 @@ public:
        /**
         *  @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()
index 6e6eb731ce8fdfada1d4dcdd04bf9c2d85e7efa5..d080748ffb44d14136e51a5d7eef7863c4e0b5cb 100644 (file)
@@ -59,7 +59,7 @@ public:
        /**
         *  @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.
index a3ca8d191ca8d7f9feb289be2a584e40da603853..474650b3241908d65d63ba9f4d651c66e00ba312 100644 (file)
@@ -71,7 +71,7 @@ public:
         *
         *  @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.
         *
index e889f9ebfe65a3b1b9b7e6a972a330227a677749..a52faacca7a2b4adb46a8fe76e1360af48574d4f 100644 (file)
@@ -76,6 +76,18 @@ public:
         */
        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.
         *
@@ -226,18 +238,6 @@ protected:
         */
        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();
 
index 7bc944734f73a74f0c7f6264026ad469f0be75d5..19fe2d85b9f46072e029a7dda25c33b7be45a3ae 100644 (file)
@@ -113,6 +113,18 @@ Evas_Object *ui_viewmgr_base_get(ui_viewmgr *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)
index b5181bca526eeae83b52a542a134023f27eb5ea4..8ac39bdc2805107ee81f85bc06026e65257ac500 100644 (file)
@@ -58,14 +58,14 @@ public:
        {
        }
 
-       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);
        }
@@ -90,18 +90,20 @@ bool ui_viewmgr_app_init(const char *pkg, const char *locale_dir)
        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;