From: Hermet Park Date: Thu, 16 Jun 2016 13:45:00 +0000 (+0900) Subject: c: split ui_view and ui_standard_view. X-Git-Tag: submit/tizen/20160617.075742~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d90368cc45d60bb5a424367bfc08f993f43e110c;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git c: split ui_view and ui_standard_view. Change-Id: Ib5bd008024b8fe5e843a26c34768269035008fb0 --- diff --git a/src/include/efl/mobile/c/ui_mobile_viewmanager.h b/src/include/efl/mobile/c/ui_mobile_viewmanager.h index 556ff66..9c7d5c1 100644 --- a/src/include/efl/mobile/c/ui_mobile_viewmanager.h +++ b/src/include/efl/mobile/c/ui_mobile_viewmanager.h @@ -36,7 +36,6 @@ #define ui_menu void #define ui_popup void - //FIXME: better way? #include "../../../interface/ui_iface_types.h" @@ -45,5 +44,6 @@ #include "ui_popup.h" #include "ui_viewmgr.h" #include "ui_view.h" +#include "ui_standard_view.h" #endif /* UI_MOBILE_VIEWMANAGER_CAPI_H */ diff --git a/src/include/efl/mobile/c/ui_standard_view.h b/src/include/efl/mobile/c/ui_standard_view.h new file mode 100644 index 0000000..0462896 --- /dev/null +++ b/src/include/efl/mobile/c/ui_standard_view.h @@ -0,0 +1,180 @@ +#ifndef _UI_STANDARD_VIEW_CAPI_H_ +#define _UI_STANDARD_VIEW_CAPI_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief A constructor for an ui_standard_view. + * + * @param name view name + * + * @param view An ui_view instance. + * + * @see ui_view_destroy() + */ +ui_view *ui_standard_view_create(const char *name); + +/** + * @brief Replace or set a content of the view. + * + * @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 @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); + +/** + * @brief Set a title text. + * + * @param view An ui_view instance. + * @param text The label in the title area + * + * @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 Set a subtitle text. + * + * @param view An ui_view instance. + * @param text The label in the subtitle area. + * + * @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 Set a title badge text. + * + * @param view An ui_view instance. + * @param text The label in the title badge area. + * + * @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 Set a title_right_btn. + * + * @param view An ui_view instance. + * @param title_right_btn The button in the right part of title area. + * + * @return @c true if it succeeds, @c 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 An ui_view instance. + * + * @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 Unset a title right button of title area. + * + * @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 Set a title_left_btn. + * + * @param view An ui_view instance. + * @param title_left_btn The button in the left part of title area. + * + * @return @c true if it succeeds, @c 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 An ui_view instance. + * + * @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 Unset a title right button of title area. + * + * @param view An ui_view instance. + * + * @return A previous content. If it wasn't, return @c NULL. + */ +Elm_Button *ui_standard_view_title_left_btn_unset(ui_view *view); + +/** + * @brief Set a toolbar below title. + * + * @param view An ui_view instance. + * @param toolbar Toolbar object + * + * @return @c true if it succeeds, @c 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 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 Unset a toolbar. + * + * @param view An ui_view instance. + * + * @return A previous content. If it wasn't, return @c NULL. + */ +Elm_Toolbar *ui_standard_view_toolbar_unset(ui_view *view); + +/** + * @brief Control the title visible state. + * + * @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 @c true if it succeeds, @c false otherwise. + */ +bool ui_standard_view_title_visible_set(ui_view *view, bool visible, bool anim); + +#ifdef __cplusplus +} +#endif + +#endif /* _UI_STANDARD_VIEW_CAPI_H_ */ diff --git a/src/include/efl/mobile/c/ui_view.h b/src/include/efl/mobile/c/ui_view.h index 323dcd0..f2d0094 100644 --- a/src/include/efl/mobile/c/ui_view.h +++ b/src/include/efl/mobile/c/ui_view.h @@ -270,177 +270,6 @@ Evas_Object *ui_view_content_get(ui_view *view); */ bool ui_view_destroy(ui_view *view); - -//================================ ui_standard_view APIs ===================================== - -/** - * @brief A constructor for an ui_standard_view. - * - * @param name view name - * - * @param view An ui_view instance. - * - * @see ui_view_destroy() - */ -ui_view *ui_standard_view_create(const char *name); - -/** - * @brief Replace or set a content of the view. - * - * @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 @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); - -/** - * @brief Set a title text. - * - * @param view An ui_view instance. - * @param text The label in the title area - * - * @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 Set a subtitle text. - * - * @param view An ui_view instance. - * @param text The label in the subtitle area. - * - * @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 Set a title badge text. - * - * @param view An ui_view instance. - * @param text The label in the title badge area. - * - * @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 Set a title_right_btn. - * - * @param view An ui_view instance. - * @param title_right_btn The button in the right part of title area. - * - * @return @c true if it succeeds, @c 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 An ui_view instance. - * - * @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 Unset a title right button of title area. - * - * @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 Set a title_left_btn. - * - * @param view An ui_view instance. - * @param title_left_btn The button in the left part of title area. - * - * @return @c true if it succeeds, @c 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 An ui_view instance. - * - * @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 Unset a title right button of title area. - * - * @param view An ui_view instance. - * - * @return A previous content. If it wasn't, return @c NULL. - */ -Elm_Button *ui_standard_view_title_left_btn_unset(ui_view *view); - -/** - * @brief Set a toolbar below title. - * - * @param view An ui_view instance. - * @param toolbar Toolbar object - * - * @return @c true if it succeeds, @c 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 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 Unset a toolbar. - * - * @param view An ui_view instance. - * - * @return A previous content. If it wasn't, return @c NULL. - */ -Elm_Toolbar *ui_standard_view_toolbar_unset(ui_view *view); - -/** - * @brief Control the title visible state. - * - * @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 @c true if it succeeds, @c false otherwise. - */ -bool ui_standard_view_title_visible_set(ui_view *view, bool visible, bool anim); - #ifdef __cplusplus } #endif diff --git a/src/lib/efl/mobile/c/ui_standard_view.cpp b/src/lib/efl/mobile/c/ui_standard_view.cpp index a240aa6..a36dacc 100644 --- a/src/lib/efl/mobile/c/ui_standard_view.cpp +++ b/src/lib/efl/mobile/c/ui_standard_view.cpp @@ -1,5 +1,6 @@ #include "../../../../include/efl/mobile/ui_mobile_viewmanager.h" #include "../../../../include/efl/mobile/c/ui_view.h" +#include "../../../../include/efl/mobile/c/ui_standard_view.h" #include "../../../../include/efl/mobile/c/ui_private.h" using namespace efl_viewmanager;