clarify arguments types. 10/63210/4
authorHermet Park <hermet@hermet.pe.kr>
Tue, 22 Mar 2016 14:09:56 +0000 (23:09 +0900)
committerHermet Park <hermet@hermet.pe.kr>
Tue, 22 Mar 2016 14:37:48 +0000 (23:37 +0900)
Change-Id: I2e15066ca7936df23ea2c8f4d064723f1c478780

src/examples/efl/main.cpp
src/examples/efl/main.h
src/examples/efl/page1.h
src/examples/efl/page2.h
src/examples/efl/page6.h
src/examples/efl/page7.h
src/include/efl/mobile/ui_basic_view.h
src/include/efl/ui_viewmgr.h
src/lib/efl/mobile/ui_basic_view.cpp
src/lib/efl/ui_view.cpp
src/lib/efl/ui_viewmgr.cpp

index 5daf120..40802aa 100644 (file)
 #include "page2.h"
 #include "page1.h"
 
-Evas_Object*
+Elm_Toolbar*
 create_toolbar(Evas_Object *parent, const char *style)
 {
-       Evas_Object *toolbar;
+       Elm_Toolbar *toolbar;
 
        toolbar = elm_toolbar_add(parent);
 
@@ -50,7 +50,11 @@ create_toolbar(Evas_Object *parent, const char *style)
 Evas_Object*
 create_content(Evas_Object *parent, const char *text, Evas_Smart_Cb prev_btn_clicked_cb, Evas_Smart_Cb next_btn_clicked_cb, appdata_s *ad)
 {
-       Evas_Object *grid, *box, *layout, *scroller, *btn, *button_layout;
+       Elm_Grid *grid;
+       Elm_Box *box;
+       Elm_Layout *layout;
+       Elm_Scroller *scroller;
+       Elm_Button *btn;
 
        /* Scroller */
        scroller = elm_scroller_add(parent);
index 0535e7e..5846a11 100644 (file)
@@ -40,4 +40,4 @@ typedef struct appdata {
 } appdata_s;
 
 Evas_Object *create_content(Evas_Object *parent, const char *text, Evas_Smart_Cb prev_btn_clicked_cb, Evas_Smart_Cb next_btn_clicked_cb, appdata_s *ad);
-Evas_Object *create_toolbar(Evas_Object *parent, const char *style);
+Elm_Toolbar *create_toolbar(Evas_Object *parent, const char *style);
index ed26619..c681d86 100644 (file)
@@ -71,7 +71,7 @@ public:
        {
                ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
 
-               Evas_Object *ctxpopup = elm_ctxpopup_add(view->get_base());
+               Elm_Ctxpopup *ctxpopup = elm_ctxpopup_add(view->get_base());
                elm_ctxpopup_item_append(ctxpopup, "Phone calls", NULL, ctxpopup_item_select_cb, this);
                elm_ctxpopup_item_append(ctxpopup, "Favorites", NULL, ctxpopup_item_select_cb, this);
                elm_ctxpopup_item_append(ctxpopup, "Search", NULL, ctxpopup_item_select_cb, this);
index b62f12f..0fb08ed 100644 (file)
@@ -54,11 +54,11 @@ public:
                        this->ad);
 
                //Title left button
-               Evas_Object *left_title_btn = elm_button_add(view->get_base());
+               Elm_Button *left_title_btn = elm_button_add(view->get_base());
                elm_object_text_set(left_title_btn, "Cancel");
 
                //Title right button
-               Evas_Object *right_title_btn = elm_button_add(view->get_base());
+               Elm_Button *right_title_btn = elm_button_add(view->get_base());
                elm_object_text_set(right_title_btn, "Done");
 
                //Arguments: content, title, subtitle, title left button, title right button
index 501ccd7..9e69fda 100644 (file)
@@ -57,7 +57,7 @@ public:
 
                //Arguments: content, title
                view->set_content(content, "Title with toolbar");
-               Evas_Object *toolbar = create_toolbar(view->get_base(), "toolbar_with_title");
+               Elm_Toolbar *toolbar = create_toolbar(view->get_base(), "toolbar_with_title");
                view->set_toolbar(toolbar);
        }
 };
index a50ae14..9ed173b 100644 (file)
@@ -51,7 +51,7 @@ public:
                //Don't delete view's content when this view poped.
                view->set_removable_content(false);
                view->set_content(content, "Title with toolbar");
-               Evas_Object *toolbar = create_toolbar(view->get_base(), "navigationbar");
+               Elm_Toolbar *toolbar = create_toolbar(view->get_base(), "navigationbar");
                view->set_toolbar(toolbar);
                ad->viewmgr->push_view(view);
        }
index 3fff884..4dc46b8 100644 (file)
@@ -25,8 +25,8 @@ namespace efl_viewmgr
 class ui_basic_view: public ui_view
 {
 private:
-       Evas_Object *layout;                     //Base layout for view
-       Evas_Object *ctxpopup;                   //Menu Widget
+       Elm_Layout *layout;                //Base layout for view
+       Elm_Ctxpopup *ctxpopup;            //Menu Widget
 
        bool create_layout();
        bool destroy_layout();
@@ -43,15 +43,15 @@ public:
        virtual ~ui_basic_view();
 
        Evas_Object *set_content(Evas_Object *content, const char *title = NULL);
-       Evas_Object *set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn, Evas_Object *title_right_btn);
+       Evas_Object *set_content(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *title_left_btn, Elm_Button *title_right_btn);
        bool set_title_badge(const char *text);
        bool set_subtitle(const char *text);
-       bool set_title_left_btn(Evas_Object *title_left_btn);
-       bool set_title_right_btn(Evas_Object *title_right_btn);
+       bool set_title_left_btn(Elm_Button *title_left_btn);
+       bool set_title_right_btn(Elm_Button *title_right_btn);
        bool set_title(const char *text);
-       bool set_toolbar(Evas_Object *toolbar);
-       bool set_menu(Evas_Object *menu);
-       Evas_Object * unset_menu();
+       bool set_toolbar(Elm_Toolbar *toolbar);
+       bool set_menu(Elm_Ctxpopup *menu);
+       Elm_Ctxpopup * unset_menu();
 
        virtual void on_menu();
 
@@ -61,7 +61,7 @@ public:
                return this->layout;
        }
 
-       Evas_Object *get_menu()
+       Elm_Ctxpopup *get_menu()
        {
                return this->ctxpopup;
        }
index b507711..02b0046 100644 (file)
 #include "ui_key_listener.h"
 #include <map>
 
+
+//FIXME: ??
+#ifndef Elm_Conformant
+#define Elm_Conformant Evas_Object
+#endif
+
 namespace efl_viewmgr
 {
 
@@ -43,15 +49,15 @@ class ui_viewmgr: public viewmgr::ui_iface_viewmgr
        friend class ui_view;
 
 private:
-       Evas_Object *win;                          //This is acting like a base object of viewmgr.
-       Evas_Object *conform;                      //Conformant for viewmgr.
-       Evas_Object *layout;                       //Viewmgr's base layout.
+       Elm_Win *win;                                      //This is acting like a base object of viewmgr.
+       Elm_Conformant *conform;                   //Conformant for viewmgr.
+       Elm_Layout *layout;                        //Viewmgr's base layout.
        ui_key_listener *key_listener;             //HW Key Handler such as "BACK" key...
        ui_view_indicator indicator;               //Mode of indicator.
        string transition_style;                   //Current transiton effect style name
-       map<string, Evas_Object *> effect_map;     //Map for effect layouts.
+       map<string, Elm_Layout *> effect_map;      //Map for effect layouts.
 
-       Evas_Object *set_transition_layout(string transition_style);
+       Elm_Layout *set_transition_layout(string transition_style);
 
        /**
         *  @brief Create a conformant.
@@ -60,7 +66,7 @@ private:
         *
         *  @return @c true success or @c false not.
         */
-       bool create_conformant(Evas_Object *win);
+       bool create_conformant(Elm_Win *win);
 
        /**
         *  @brief Create a base layout.
@@ -70,7 +76,7 @@ private:
         *
         *  @return @c true success or @c false not.
         */
-       bool create_base_layout(Evas_Object *conform, const char *style);
+       bool create_base_layout(Elm_Conformant *conform, const char *style);
 
        /** @brief Set the indicator mode.
         *
@@ -160,14 +166,14 @@ public:
 
        /** @brief Get a window object of viewmgr.
         */
-       Evas_Object *get_window()
+       Elm_Win *get_window()
        {
                return this->win;
        }
 
        /** @brief Get a conformant object of viewmgr.
         */
-       Evas_Object *get_conformant()
+       Elm_Conformant *get_conformant()
        {
                return this->conform;
        }
index ca3fd00..c34e9cc 100644 (file)
@@ -26,7 +26,7 @@ using namespace viewmgr;
 #define MY_VIEWMGR dynamic_cast<ui_viewmgr *>(this->get_viewmgr())
 #define MY_CONTROLLER dynamic_cast<ui_basic_controller *>(this->get_controller()))
 
-static void update_menu(Evas_Object *win, Evas_Object *ctxpopup)
+static void update_menu(Elm_Win *win, Elm_Ctxpopup *ctxpopup)
 {
        /* We convince the top widget is a window */
        Evas_Coord w, h;
@@ -60,7 +60,7 @@ bool ui_basic_view::create_layout()
 {
        if (this->layout) return false;
 
-       Evas_Object *layout = elm_layout_add(this->get_parent());
+       Elm_Layout *layout = elm_layout_add(this->get_parent());
 
        if (!layout)
        {
@@ -86,7 +86,7 @@ bool ui_basic_view::create_layout()
        ui_viewmgr *viewmgr = MY_VIEWMGR;
        if (viewmgr->need_soft_key())
        {
-               Evas_Object *prev_btn = elm_button_add(layout);
+               Elm_Button *prev_btn = elm_button_add(layout);
 
                if (!prev_btn)
                {
@@ -111,7 +111,7 @@ bool ui_basic_view::create_layout()
                        [](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void
                        {
                                ui_basic_view *view = static_cast<ui_basic_view *>(data);
-                               Evas_Object *ctxpopup = view->get_menu();
+                               Elm_Ctxpopup *ctxpopup = view->get_menu();
                                if (ctxpopup && evas_object_visible_get(ctxpopup))
                                {
                                        update_menu(dynamic_cast<ui_viewmgr *>(view->get_viewmgr())->get_window(), ctxpopup);
@@ -123,7 +123,7 @@ bool ui_basic_view::create_layout()
                        [](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void
                        {
                                ui_basic_view *view = static_cast<ui_basic_view *>(data);
-                               Evas_Object *ctxpopup = view->get_menu();
+                               Elm_Ctxpopup *ctxpopup = view->get_menu();
                                if (ctxpopup && evas_object_visible_get(ctxpopup))
                                {
                                        elm_ctxpopup_dismiss(ctxpopup);
@@ -195,7 +195,7 @@ bool ui_basic_view::set_subtitle(const char *text)
        return false;
 }
 
-bool ui_basic_view::set_title_left_btn(Evas_Object *title_left_btn)
+bool ui_basic_view::set_title_left_btn(Elm_Button *title_left_btn)
 {
        if (this->layout)
        {
@@ -212,7 +212,7 @@ bool ui_basic_view::set_title_left_btn(Evas_Object *title_left_btn)
        return false;
 }
 
-bool ui_basic_view::set_title_right_btn(Evas_Object *title_right_btn)
+bool ui_basic_view::set_title_right_btn(Elm_Button *title_right_btn)
 {
        if (this->layout)
        {
@@ -255,8 +255,8 @@ bool ui_basic_view::set_title(const char *text)
        return false;
 }
 
-Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn,
-        Evas_Object *title_right_btn)
+Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *title_left_btn,
+        Elm_Button *title_right_btn)
 {
        Evas_Object *pcontent = this->set_content(content);
 
@@ -275,15 +275,15 @@ Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title,
        return pcontent;
 }
 
-Evas_Object* ui_basic_view::unset_menu()
+Elm_Ctxpopup* ui_basic_view::unset_menu()
 {
-       Evas_Object *menu = this->ctxpopup;
+       Elm_Ctxpopup *menu = this->ctxpopup;
        //FIXME: cancel callbacks
        this->ctxpopup = NULL;
        return menu;
 }
 
-bool ui_basic_view::set_menu(Evas_Object *menu)
+bool ui_basic_view::set_menu(Elm_Ctxpopup *menu)
 {
        if (this->ctxpopup) evas_object_del(this->ctxpopup);
 
@@ -316,9 +316,9 @@ bool ui_basic_view::set_menu(Evas_Object *menu)
        return true;
 }
 
-bool ui_basic_view::set_toolbar(Evas_Object *toolbar)
+bool ui_basic_view::set_toolbar(Elm_Toolbar *toolbar)
 {
-       Evas_Object *layout = this->get_base();
+       Elm_Layout *layout = this->get_base();
 
        //FIXME: Keep this toolbar inside of this view then set up when layout is created after.
        if (!layout)
index 5cf2a09..ce5d94d 100644 (file)
@@ -39,7 +39,7 @@ ui_view::~ui_view()
 Evas_Object *ui_view::set_content(Evas_Object *content)
 {
        T pcontent = ui_iface_view::set_content(CONVERT_TO_T(content));
-       return static_cast<Evas_Object *>(pcontent);
+       return CONVERT_TO_EO(pcontent);
 }
 
 Evas_Object *ui_view::get_base()
index 6c66fde..1320f70 100644 (file)
@@ -22,10 +22,10 @@ using namespace viewmgr;
 //FIXME: is it correct to define here?
 #define EDJ_PATH "/usr/share/edje/ui-viewmgr/ui-viewmgr.edj"
 
-bool ui_viewmgr::create_base_layout(Evas_Object *conform, const char *style)
+bool ui_viewmgr::create_base_layout(Elm_Conformant *conform, const char *style)
 {
        char buf[128];
-       Evas_Object *layout = elm_layout_add(conform);
+       Elm_Layout *layout = elm_layout_add(conform);
        if (!layout) return false;
 
        //FIXME: Is it C programming style? need to change?
@@ -63,9 +63,9 @@ bool ui_viewmgr::create_base_layout(Evas_Object *conform, const char *style)
        return true;
 }
 
-Evas_Object *ui_viewmgr::set_transition_layout(string transition_style)
+Elm_Layout *ui_viewmgr::set_transition_layout(string transition_style)
 {
-       Evas_Object *effect_layout = NULL;
+       Elm_Layout *effect_layout = NULL;
 
        elm_object_part_content_unset(this->get_base(), "pcontent");
        elm_object_part_content_unset(this->get_base(), "content");
@@ -75,18 +75,16 @@ Evas_Object *ui_viewmgr::set_transition_layout(string transition_style)
        if (effect_map.size()) effect_layout = effect_map.find(transition_style)->second;
 
        //Conformant content change to current effect layout and change to hide prev layout.
-       Evas_Object *playout = elm_object_part_content_unset(this->conform, "elm.swallow.content");
+       Elm_Layout *playout = elm_object_part_content_unset(this->conform, "elm.swallow.content");
        evas_object_hide(playout);
 
        if (!effect_layout)
        {
                //Create and add effect_layouts in map here.
                //FIXME: If we have to support many effects, this logic should be changed.
-               effect_map.insert(pair<string, Evas_Object *>("default", this->layout));
-
+               effect_map.insert(pair<string, Elm_Layout *>("default", this->layout));
                this->create_base_layout(this->get_conformant(), transition_style.c_str());
-
-               effect_map.insert(pair<string, Evas_Object *>(transition_style, this->layout));
+               effect_map.insert(pair<string, Elm_Layout *>(transition_style, this->layout));
        }
        else
        {
@@ -129,8 +127,8 @@ bool ui_viewmgr::set_indicator(ui_view_indicator indicator)
        if (this->indicator == indicator) return false;
        this->indicator = indicator;
 
-       Evas_Object *window = this->get_window();
-       Evas_Object *conform = this->get_conformant();
+       Elm_Win *window = this->get_window();
+       Elm_Conformant *conform = this->get_conformant();
 
        switch (indicator)
        {
@@ -156,9 +154,9 @@ bool ui_viewmgr::set_indicator(ui_view_indicator indicator)
        return true;
 }
 
-bool ui_viewmgr::create_conformant(Evas_Object *win)
+bool ui_viewmgr::create_conformant(Elm_Win *win)
 {
-       Evas_Object *conform = elm_conformant_add(win);
+       Elm_Conformant *conform = elm_conformant_add(win);
        if (!conform) return false;
 
        evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -316,7 +314,7 @@ bool ui_viewmgr::pop_view()
        }
 
        //Choose an effect layout.
-       Evas_Object *effect = this->set_transition_layout(view->get_transition_style());
+       Elm_Layout *effect = this->set_transition_layout(view->get_transition_style());
        if (!effect) {
                LOGE("invalid effect transition style?! = %s", view->get_transition_style());
                this->pop_view_finished(pview);
@@ -363,7 +361,7 @@ ui_view * ui_viewmgr::push_view(ui_view *view)
        }
 
        //Choose an effect layout.
-       Evas_Object *effect = this->set_transition_layout(view->get_transition_style());
+       Elm_Layout *effect = this->set_transition_layout(view->get_transition_style());
        if (!effect) {
                LOGE("invalid effect transition style?! = %s", view->get_transition_style());
                this->active_top_view();