+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#ifndef _UI_CAPI_PRIVATE_H_
-#define _UI_CAPI_PRIVATE_H_
-
-namespace efl_viewmanager
-{
-
-class ui_view_event_attr
-{
-public:
- ui_view_lifecycle_callback_s lifecycle_callback;
- ui_view_event_callback_s event_callback;
- void *lifecycle_data;
- void *event_data;
-
- ui_view_event_attr() : lifecycle_data(NULL), event_data(NULL)
- {
- this->lifecycle_callback = {0, };
- this->event_callback = {0, };
- }
-
- ~ui_view_event_attr()
- {
- }
-};
-
-}
-
-#endif /* _UI_CAPI_PRIVATE_H_ */
#endif
/**
- * @brief This is for replacing or setting a content of the ui_menu.
+ * @brief Replace or set a content of an ui_menu.
*
- * @param menu The ui_menu object
- * @param ctxpopup ctxpopup object. It allows @c NULL for canceling the previous content
+ * @param menu An ui_menu object
+ * @param ctxpopup ctxpopup object. It allows @c NULL for canceling the previous content.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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.
+ * @brief Return an ui_menu content.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return content of ui_memu object
+ * @return A content of ui_menu.
*
* @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.
+ * @brief Unset an ui_menu content.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
+ *
+ * @see ui_menu_content_set()
*/
Elm_Ctxpopup *ui_menu_content_unset(ui_menu *menu);
/**
- * @brief This is activating the ui_menu.
+ * @brief Activate an ui_menu.
*
* @note It makes ui_menu state as show.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_menu_deactivate()
*/
bool ui_menu_activate(ui_menu *menu);
/**
- * @brief This is deactivating the ui_menu.
+ * @brief Deactivate an ui_menu.
*
* @note It makes ui_menu state as hide.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_menu_activate()
*/
/**
* @brief Return the active status of ui_menu.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return @c true if ui_menu is activated, @c false otherwise
+ * @return @c true if it succeeds, @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.
+ * @brief Get a base object of an ui_menu.
+ *
+ * @note Normally, A base object can be used for a parent of ui_menu content.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return viewmgr's window object
+ * @return base object of ui_menu.
*/
Evas_Object *ui_menu_base_get(ui_menu *menu);
/**
- * @brief Get current ui_menu's degree.
+ * @brief Get a current ui_menu's degree.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
- * @return Current rotation degree, -1 if it fails to get degree information
+ * @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.
+ * @brief Return a view which is matched with this ui_menu.
*
- * @param menu The ui_menu object
+ * @param menu An ui_menu instance.
*
* @return The view which is matched with ui_menu
*/
#endif
/**
- * @brief This is a constructor for initializing this ui_popup.
+ * @brief A constructor for an ui_popup.
*
- * @param view The view object
+ * @param view An instance of ui_view.
*
- * @return The ui_popup object
+ * @note The instance of ui_popup is subordinated to the given @p ui_view. If the given @p ui_view is hidden or deactivated, this ui_popup will be also do
+ * same followed to its ui_view behaviors.
+ *
+ * @return An ui_popup instance.
+ *
+ * @warning The instance of ui_popup will be destroyed automatically when the ui_view is destroyed.
*
* @see ui_popup_destroy()
*/
ui_popup *ui_popup_create(ui_view *view);
/**
- * @brief This is a ui_popup destructor.
+ * @brief A destructor for an ui_popup.
*
- * @param popup The ui_popup object
+ * @note destroy an @p given ui_popup instance.
*
- * @seee ui_popup_create()
+ * @param popup An ui_popup instance.
+ *
+ * @see 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
+ * @brief Replace or set a content of an ui_popup.
*
- * @param elm_popup elm_popup object. It allows @c NULL for canceling the previous content.
+ * @param popup An ui_popup instance.
+ * @param content popup object. It allows @c NULL for canceling the previous content.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_popup_content_get()
*/
/**
* @brief Return a content object of ui_popup.
*
- * @param popup The ui_popup object
+ * @param popup An ui_popup instance.
*
- * @return content of ui_popup object
+ * @return A content of ui_popup.
*
* @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.
+ * @brief Unset an ui_popup content.
*
- * @param popup The ui_popup object
+ * @param popup An ui_popup instance.
*
- * @return A previous content. If it wasn't, return value will be @c NULL
+ * @return A previous content. If it wasn't, return @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.
+ * @brief Activate an ui_popup.
+ *
+ * @note It makes ui_popup state as show.
*
- * @param popup The popup object
+ * @param popup An ui_popup instance.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_popup_deactivate()
*/
bool ui_popup_activate(ui_popup *popup);
/**
- * @brief This is deactivating the ui_popup.
+ * @brief Deactivate an ui_popup.
*
- * @param popup The ui_popup object
+ * @note It makes ui_popup state as hide.
*
- * @return true if it succeed, false otherwise
+ * @param popup An ui_popup instance.
+ *
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_popup_activate()
*/
/**
* @brief Return the active status of ui_popup.
*
- * @param popup The ui_popup object
+ * @param popup An ui_popup instance.
*
* @return @c true if ui_popup is activated, @c false otherwise
*
*/
bool ui_popup_activated_get(ui_popup *popup);
-//FIXME: is it really need?
/**
- * @brief Get a base window of viewmgr.
+ * @brief Get a base object of an ui_popup.
+ *
+ * @note Normally, A base object can be used for a parent of ui_popup content.
*
- * @param popup The ui_popup object
+ * @param menu An ui_popup instance.
*
- * @return viewmgr's window object
+ * @return base object of ui_popup.
*/
Evas_Object *ui_popup_base_get(ui_popup *popup);
/**
* @brief Get current ui_popup's degree.
*
- * @param popup The ui_popup object
+ * @param popup An ui_popup instance.
*
- * @return Current rotation degree, -1 if it fails to get degree information
+ * @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
+ * @param popup An ui_popup instance.
*
* @return The view which is matched with ui_popup.
*/
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#ifndef _UI_CAPI_PRIVATE_H_
+#define _UI_CAPI_PRIVATE_H_
+
+namespace efl_viewmanager
+{
+
+class ui_view_event_attr
+{
+public:
+ ui_view_lifecycle_callback_s lifecycle_callback;
+ ui_view_event_callback_s event_callback;
+ void *lifecycle_data;
+ void *event_data;
+
+ ui_view_event_attr() : lifecycle_data(NULL), event_data(NULL)
+ {
+ this->lifecycle_callback = {0, };
+ this->event_callback = {0, };
+ }
+
+ ~ui_view_event_attr()
+ {
+ }
+};
+
+}
+
+#endif /* _UI_CAPI_PRIVATE_H_ */
#endif
/**
- * @brief ui_view's 'lifecycle callback' function signature.
+ * @brief ui_view's lifecycle callback function signature.
*/
typedef bool (*ui_view_lifecycle_cb)(ui_view *view, void *data);
ui_view_event_menu_cb menu;
} ui_view_event_callback_s;
-//================================== view common APIs ========================================
+/**
+ * @brief A constructor for an ui_view.
+ *
+ * @param name view name.
+ *
+ * @return The ui_view instance.
+ *
+ * @see ui_view_destroy()
+ */
+ui_view *ui_view_create(const char *name);
+
+/**
+ * @brief Replace or set a content of ui_view.
+ *
+ * @param view An ui_view instance.
+ * @param content A new content. It allows @c NULL for canceling the previous content.
+ *
+ * @return @c true if it succeeds, @c false otherwise.
+ *
+ * @see ui_view_content_get()
+ */
+bool ui_view_content_set(ui_view *view, Evas_Object *content);
/**
* @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
+ * @param view An ui_view instance.
+ * @param lifecycle_callback The set of callback functions to handle application lifecycle events.
+ * @param data The user data to be passed to the given @p lifecycle_callback functions.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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
+ * @param view An ui_view instance.
+ * @param event_callback The set of callback functions to handle view events.
+ * @param data The user data to be passed to the given @p event_callback functions.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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.
+ * @brief Get a base object of ui_view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return viewmgr's base layout object
+ * @note Normally, this base object can be used for a parent of a view content.
+ *
+ * @return The base object of ui_view.
*/
Evas_Object* ui_view_base_get(ui_view *view);
/**
- * @brief This is for unsetting a content of the view.
+ * @brief Unset a ui_view content.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return A previous content. If it wasn't, return value will be @c NULL
+ * @return A previous content. If it wasn't, return @c NULL.
*
* @see ui_view_content_set()
*/
Evas_Object *ui_view_content_unset(ui_view *view);
/**
- * @brief Set indicator of the view.
+ * @brief Set the indicator mode of a ui_view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
* @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
+ * @param view An ui_view instance.
*
- * @return indicator state of view
+ * @return indicator state of the given @p view.
*
* @see ui_view_indicator_set()
*/
/**
* @brief Set content removable.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
* @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.
/**
* @brief Return a state of removable content.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return true if the view's content is removable, otherwise false
+ * @return @c true if the view's content is removable, otherwise @c false.
*
* @see ui_view_removable_content_get()
*/
bool ui_view_removable_content_get(ui_view *view);
/**
- * @brief Get current view's degree.
+ * @brief Get the current view's degree.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return Current rotation degree, -1 if it fails to get degree information
+ * @return Current rotation degree, -1 if it fails to get degree information.
*/
int ui_view_degree_get(ui_view *view);
* 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 view An ui_view instance.
* @param style a transition style name
*
- * @return true if the given @c style is available, otherwise false
+ * @return @c true if the given @c style is available, otherwise @c false.
*
* @see ui_view_transition_style_get()
*/
/**
* @brief Return a style name of this view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return style name of view
+ * @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.
+ * @brief Get a ui_menu instance.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return The menu object of connected with view
+ * @return The ui_memnu that connected with given @p view.
*/
const ui_menu *ui_view_menu_get(ui_view *view);
/**
- * @brief Set name of the view.
+ * @brief Set name of ui_view.
*
- * @note A view can get a specific name. default value of the name is NULL.
+ * @note A ui_view can have a unique name. Default value of the name is NULL.
*
- * @param view The ui_view object
- * @param name A new name of view
+ * @param view An ui_view instance.
+ * @param name A new name of given @p 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.
+ * @return @c true if the given @p name is available, otherwise @c false.
*
* @see ui_view_name_get()
*/
/**
* @brief Return a name of this view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return name of view
+ * @return name of @p view.
*
* @see ui_view_name_set()
*/
/**
* @brief Return a state of this view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return current state of view
+ * @return current state of @p view.
*/
ui_view_state ui_view_state_get(ui_view *view);
/**
* @brief Return a content of this view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return content of view
+ * @return content of @p view. If no contents set yet, @c NULL.
*
* @see ui_view_content_set()
*/
Evas_Object *ui_view_content_get(ui_view *view);
/**
- * @brief This is a view destructor.
+ * @brief A destructor for an ui_view.
+ *
+ * @param view An ui_view instance.
*
- * @param view The ui_view object
+ * @return @c true if it succeeds, @c false otherwise.
*
- * @return true if it succeed, false otherwise
+ * @see ui_view_create()
+ * @see ui_standard_view_create()
*/
bool ui_view_destroy(ui_view *view);
-//================================ ui_standard view APIs =====================================
+
+//================================ ui_standard_view APIs =====================================
/**
- * @brief This is a constructor for initializing ui_standard_view.
+ * @brief A constructor for an ui_standard_view.
*
* @param name view name
*
- * @return The ui_view object
+ * @param view An ui_view instance.
*
* @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.
+ * @brief Replace or set 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
+ * @param view An ui_view instance.
+ * @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
+ * @return @c true if it succeeds, @c 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);
+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.
+ * @brief Set a title text.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
* @param text The label in the title area
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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.
+ * @brief Set a subtitle text.
*
- * @param view The ui_view object
- * @param text The label in the subtitle area
+ * @param view An ui_view instance.
+ * @param text The label in the subtitle area.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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.
+ * @brief Set a title badge text.
*
- * @param view The ui_view object
- * @param text The label in the title badge area
+ * @param view An ui_view instance.
+ * @param text The label in the title badge area.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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.
+ * @brief Set a title_right_btn.
*
- * @param view The ui_view object
- * @param title_right_btn The button in the right part of title area
+ * @param view An ui_view instance.
+ * @param title_right_btn The button in the right part of title area.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_standard_view_title_right_btn_get()
*/
/**
* @brief Return a title right button of the view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return title right button of the view
+ * @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.
+ * @brief Unset 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
+ * @param view An ui_view instance.
+ * @return A previous content. If it wasn't, return @c NULL
*/
Elm_Button *ui_standard_view_title_right_btn_unset(ui_view *view);
/**
- * @brief This is for setting title_left_btn.
+ * @brief Set a title_left_btn.
*
- * @param view The ui_view object
- * @param title_left_btn The button in the left part of title area
+ * @param view An ui_view instance.
+ * @param title_left_btn The button in the left part of title area.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_standard_view_title_left_btn_get()
*/
/**
* @brief Return a title left button of the view.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
* @return title left button of the view
*
Elm_Button *ui_standard_view_title_left_btn_get(ui_view *view);
/**
- * @brief This is for unsetting a title right button of title area.
+ * @brief Unset a title right button of title area.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return A previous content. If it wasn't, return value will be @c NULL
+ * @return A previous content. If it wasn't, return @c NULL.
*/
Elm_Button *ui_standard_view_title_left_btn_unset(ui_view *view);
/**
- * @brief This is for setting toolbar below title.
+ * @brief Set a toolbar below title.
*
- * @param view The ui_view obejct
+ * @param view An ui_view instance.
* @param toolbar Toolbar object
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see ui_standard_view_toolbar_get()
*/
/**
* @brief Return a toolbar of the view.
*
- * @param view The ui_view obejct
- * @return toolbar of the view
+ * @param view An ui_view instance.
+ * @return The toolbar of the given @p view.
*
* @see ui_standard_view_toolbar_set()
*/
Elm_Toolbar *ui_standard_view_toolbar_get(ui_view *view);
/**
- * @brief This is for unsetting a toolbar.
+ * @brief Unset a toolbar.
*
- * @param view The ui_view object
+ * @param view An ui_view instance.
*
- * @return A previous content. If it wasn't, return value will be @c NULL
+ * @return A previous content. If it wasn't, return @c NULL.
*/
Elm_Toolbar *ui_standard_view_toolbar_unset(ui_view *view);
/**
- * @brief This is handling title visible state.
+ * @brief Control the 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
+ * @param view An ui_view instance.
+ * @param visible title state set as visible if the given param is @c true, otherwise title area set as invisible
+ * @param anim title area will be shown with animation if the given param is @c true, otherwise title area will be shown without animation
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c 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);
-
-
#ifdef __cplusplus
}
#endif
#endif
/**
- * @brief Push a new view into this viewmgr. This function is used for when application switches a current view to a new one.
+ * @brief Push a new view into given @p 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().
+ * only when ui_viewmgr state is activated. Otherwise, the @p view will be shown later when ui_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
+ * @param viewmgr The ui_viewmgr instance.
+ * @param view An ui_view to insert in the given @p viewmgr view list
*
* @return @p view, @c NULL when it fails to push a @p view
*
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.
+ * @brief Insert a view in this given @p 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
+ * @param viewmgr The ui_viewmgr instance.
+ * @param view An ui_view to insert in the @p viewmgr view list
+ * @param before An ui_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
*
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.
+ * @brief Insert a view in this given @p 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
+ * @param viewmgr The ui_viewmgr instance.
+ * @param view An ui_view to insert in the @p viewmgr view list
+ * @param after An ui_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
*
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.
+ * @brief Pop the top(last) view from this given @p 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.
+ * The top view will be removed from the view stack and then it will be deleted by the given @p viewmgr.
*
- * @note If the view is just one left, then viewmgr would be deactivated automatically since the ui application might be invalid anymore. Otherwise,
+ * @note 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.
*
- * @param viewmgr The viewmgr object
+ * @param viewmgr The ui_viewmgr instance.
*
* @return @c true on success or @c false otherwise
*
* @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
+ * @param viewmgr The ui_viewmgr instance.
*
* @return @c true on success or @c false otherwise
*
* @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
+ * @param viewmgr The ui_viewmgr instance.
*
* @return @c true success or @c false not
*
/**
* @brief Get a window object of viewmgr.
*
- * @param viewmgr The viewmgr object
+ * @param viewmgr The ui_viewmgr instance.
*
* @return The window object of viewmgr
*/
/**
* @brief Return a last(top) view.
*
- * @param viewmgr The viewmgr object
+ * @param viewmgr The ui_viewmgr instance.
*
- * @return The view which is last view of the viewmgr view list
+ * @return The view which is last view of the given @p 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 viewmgr The ui_viewmgr instance.
* @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.
*/
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.
+ * @brief Get a base object of a ui_viewmgr.
+ *
+ * @note Normally, a base object can be used for adding additional objects.
*
- * @param viewmgr The viewmgr object
+ * @param viewmgr The ui_viewmgr instance.
*
- * @return The base layout object of viewmgr
+ * @return The base object of ui_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
+ * @param viewmgr The ui_viewmgr instance.
+ * @param view An ui_view to query the index
*
* @return An index of the given @p view on success, otherwise, -1
*
*/
int ui_viewmgr_view_index_get(ui_viewmgr *viewmgr, const ui_view *view);
+//FIXME:
+//ui_view *ui_viewmgr_view_get_by_id(ui_viewmgr *viewmgr, const char *id);
+
/**
- * @brief Return the number of views which this viewmgr has.
+ * @brief Return the number of views which this @p given viewmgr has.
*
- * @param viewgmr The viewmgr object
+ * @param viewmgr The ui_viewmgr instance.
*
* @return the count of views
*/
/**
* @brief Return whether soft back key is required or not.
*
- * @param viewmgr The viewmgr object
+ * @param viewmgr The ui_viewmgr instance.
*
* @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.
+ * @brief Return the ui_viewmgr instance.
*
- * @return The viewmgr object
+ * @note ui_viewmgr has a singleton instance.
+ *
+ * @return The ui_viewmgr instance.
*/
ui_viewmgr *ui_viewmgr_viewmgr_get();
/**
- * @brief Macro for calling ui_viewmgr_deactivate()
+ * @brief A Convenient Macro to activate the ui_viewmgr.
+ */
+#define UI_VIEWMGR_ACTIVATE() (ui_viewmgr_activate(ui_viewmgr_viewmgr_get()))
+
+/**
+ * @brief A Convenient Macro function to deactivate the ui_viewmgr.
*/
#define UI_VIEWMGR_DEACTIVATE() (ui_viewmgr_deactivate(ui_viewmgr_viewmgr_get()))
/**
- * @brief Macro for calling ui_viewmgr_view_push()
+ * @brief A Convenient Macro function to push a view.
*/
#define UI_VIEWMGR_VIEW_PUSH(X) (ui_viewmgr_view_push(ui_viewmgr_viewmgr_get(), (X)))
/**
- * @brief Macro for calling ui_viewmgr_view_pop()
+ * @brief A Convenient Macro function to pop a view.
*/
#define UI_VIEWMGR_VIEW_POP() (ui_viewmgr_view_pop(ui_viewmgr_viewmgr_get()))
#endif
/**
- * @brief This is constructor for initializing ui_viewmgr_app.
+ * @brief Initialize ui_viewmgr_app.
*
- * @param pkg The name of package
- * @param loale_dir The path of locale directory
+ * This function initializes ui_viewmgr_app and ui_viewmgr.
*
- * @return true if it succeed, false otherwise
+ * @param pkg The name of package.
+ * @param loale_dir The path of locale directory.
+ *
+ * @return @c true if it succeeds, @c false otherwise.
+ *
+ * @warning Before exit application, call ui_viewmgr_app_term()
+ *
+ * @see ui_viewmgr_app_term()
*/
bool ui_viewmgr_app_init(const char *pkg, const char *locale_dir);
/**
- * @brief This is calling ui_app_main() function with given params to run application's main loop.
+ * @brief Run ui_viewmgr_app. This triggers application main loops.
*
* @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
+ * @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 gieven @p life_cycle_callback functions.
*
* @return 0 on success, otherwise a negative error value
*/
/**
* @brief This is ui_viewmgr_app destructor.
*
- * @return true if it succeed, false otherwise
+ * @return @c true if it succeeds, @c false otherwise.
+ *
+ * @see ui_viewmgr_app_init()
*/
bool ui_viewmgr_app_term(void);
*
* @note It makes menu state as show.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see deactivate()
*/
*
* @note It makes menu state as hide.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see activate()
*/
*
* @param ctxpopup ctxpopup object. It allows @c NULL for canceling the previous content.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
virtual bool set_content(Elm_Ctxpopup* ctxpopup);
virtual bool is_activated();
/**
- * @brief Get a base window of viewmgr.
+ * @brief Get a base object of a ui_menu.
*
- * @return viewmgr's window object.
+ * @note Normally, A base object can be used for a parent of ui_menu content.
+ * @return base object of ui_menu.
*/
virtual Evas_Object *get_base();
/**
- * @brief Get current menu's degree.
+ * @brief Get a current menu's degree.
*
* @return Current rotation degree, -1 if it fails to get degree information.
*/
*
* @note It makes popup state as show.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see deactivate()
*/
*
* @note It makes popup state as hide.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see activate()
*/
*
* @param popup popup object. It allows @c NULL for canceling the previous content.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
virtual bool set_content(Elm_Popup* popup);
virtual bool is_activated();
/**
- * @brief Get a base window of viewmgr.
+ * @brief Get a base object of an ui_popup.
*
- * @return viewmgr's window object.
+ * @note Normally, A base object can be used for a parent of ui_popup content.
+ *
+ * @return base object of ui_popup.
*/
virtual Evas_Object *get_base();
{
public:
/**
- * @brief This is a constructor for initializing this view resources.
+ * @brief A constructor for an ui_standard_view.
*
* @param name view name.
*/
virtual ~ui_standard_view();
/**
- * @brief This is for replacing or setting a content of the view.
+ * @brief Replace or set a content of the view.
*
* @param content a new content. It allows @c NULL for canceling the previous content.
* @param title title_label The label in the title area. The name of the title label part is "elm.text.title"
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_content(Evas_Object *content, const char *title = NULL);
/**
- * @brief This is for replacing or setting a content of the view.
+ * @brief Replace or set a content of the view.
*
* @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 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.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_content(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *title_left_btn, Elm_Button *title_right_btn);
/**
- * @brief This is for setting title badge text.
+ * @brief Set a title badge text.
*
* @param text The label in the title badge area.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_title_badge(const char *text);
/**
- * @brief This is for setting subtitle text.
+ * @brief Set a subtitle text.
*
* @param text The label in the subtitle area.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_subtitle(const char *text);
/**
- * @brief This is for setting title_left_btn.
+ * @brief Set a title_left_btn.
*
* @param title_left_btn The button in the left part of title area.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_title_left_btn(Elm_Button *title_left_btn);
/**
- * @brief This is for setting title_right_btn.
+ * @brief Set a title_right_btn.
*
* @param title_right_btn The button in the right part of title area.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_title_right_btn(Elm_Button *title_right_btn);
/**
- * @brief This is for setting title text.
+ * @brief Set a title text.
*
* @param text The label in the title area.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_title(const char *text);
/**
- * @brief This is for setting toolbar below title.
+ * @brief Set a toolbar below title.
*
* @param toolbar Toolbar object.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_toolbar(Elm_Toolbar *toolbar);
/**
- * @brief This is handling title visible state.
+ * @brief Control the title visible state.
*
- * @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.
+ * @param visible title state set as visible if the given param is @c true, otherwise title area set as invisible.
+ * @param anim title area will be shown with animation if the given param is @c true, otherwise title area will be shown without animation.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
bool set_title_visible(bool visible, bool anim);
/**
- * @brief This is for unsetting a content of the view.
+ * @brief Unset a content of the view.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
Evas_Object *unset_content();
/**
- * @brief This is for unsetting a title left button of title area.
+ * @brief Unset a title left button of title area.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
Elm_Button *unset_title_left_btn();
/**
- * @brief This is for unsetting a title right button of title area.
+ * @brief Unset a title right button of title area.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
Elm_Button *unset_title_right_btn();
/**
- * @brief This is for unsetting a toolbar.
+ * @brief Unset a toolbar.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
Elm_Toolbar *unset_toolbar();
/**
* @brief Get menu object.
*
- * @return The menu object of connected with view.
+ * @return The menu object that connected with this view.
*/
const ui_menu *get_menu();
*
* @param content a new content. It allows @c NULL for canceling the previous content.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
virtual bool set_content(Evas_Object *content);
/**
* @brief This is for unsetting a content of the view.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
virtual Evas_Object *unset_content();
/**
- * @brief Get a base layout of viewmgr.
+ * @brief Get a base object of ui_view.
*
- * @return The base layout object of viewmgr.
+ * @note Normally, this base object can be used for a parent of a view content.
+ *
+ * @return The base object of ui_view.
*/
virtual Evas_Object *get_base();
ui_base_view *get_view(unsigned int idx);
/**
- * @brief Get a base layout of viewmgr.
+ * @brief Get a base object of this viewmgr.
*
- * @return The base layout object of viewmgr.
+ * @note Normally, a base object can be used for adding additional objects.
+ *
+ * @return The base object of this viewmgr.
*/
Evas_Object *get_base();
*
* @param content a new content. It allows @c NULL for canceling the previous content.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
virtual bool set_content(T content);
/**
* @brief This is for unsetting a content of the view.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
virtual T unset_content();
*
* @note It makes overlay state as show.
*
- * @return @c true on success or @c false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see deactivate()
*/
/**
* @brief Set name of the view.
*
- * @note A view can get a specific name. default value of the name is NULL.
+ * @note A view can have a unique name. Default value of the name is NULL.
*
* @param name A new name of view.
*
void set_removable_content(bool removable);
/**
- * @brief Set the indicator of the view with mode.
+ * @brief Set the indicator mode of the view.
*
* @param indicator The mode to set, one of #ui_view_indicator.
*/
/**
* @brief Return a content instance of this view.
*
- * @return content of view.
+ * @return content of view. If no contents set yet, @c NULL.
*/
T get_content();
/**
- * @brief This is for replacing or setting a content of the view.
+ * @brief Replace or set a content of the view.
*
* @note @p content is a logical object that represents a view in your framework. The actual type of the content could be translated to any certain types.
* For instance, the type could be Evas_Object * in EFL and Layer * in Dali.
*
* @param content a new content. It allows @c NULL for canceling the previous content.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*/
virtual bool set_content(T content);
/**
- * @brief This is for unsetting a content of the view.
+ * @brief Unset the view content.
*
- * @return A previous content. If it wasn't, return value will be @c NULL.
+ * @return A previous content. If it wasn't, return @c NULL.
*/
virtual T unset_content();
*
* @param viewmgr The instance of viewmgr.
*
- * @return true if it succeed, false otherwise.
+ * @return @c true if it succeeds, @c false otherwise.
*
* @see get_viewmgr()
*/
#include "../../../../include/efl/mobile/ui_mobile_viewmanager.h"
#include "../../../../include/efl/mobile/c/ui_view.h"
-#include "../../../../include/efl/mobile/c/ui_capi_private.h"
+#include "../../../../include/efl/mobile/c/ui_private.h"
using namespace efl_viewmanager;
#include "../../../../include/efl/mobile/ui_mobile_viewmanager.h"
#include "../../../../include/efl/mobile/c/ui_view.h"
-#include "../../../../include/efl/mobile/c/ui_capi_private.h"
+#include "../../../../include/efl/mobile/c/ui_private.h"
using namespace efl_viewmanager;
return;
}
- return view->set_indicator(indicator);
+ view->set_indicator(indicator);
}
ui_view_indicator ui_view_indicator_get(ui_view *view)