../../lib/interface/ui_iface_controller.cpp
../../lib/interface/ui_iface_view.cpp
../../lib/interface/ui_iface_viewmgr.cpp
- ../../lib/efl/ui_controller.cpp
- ../../lib/efl/ui_view.cpp
- ../../lib/efl/ui_viewmgr.cpp
- ../../lib/efl/ui_key_listener.cpp
- ../../lib/efl/mobile/ui_basic_controller.cpp
- ../../lib/efl/mobile/ui_basic_view.cpp
- ../../lib/efl/mobile/ui_basic_key_listener.cpp
- ../../lib/efl/mobile/ui_basic_viewmgr.cpp
+ ../../lib/efl/ui_base_controller.cpp
+ ../../lib/efl/ui_base_view.cpp
+ ../../lib/efl/ui_base_viewmgr.cpp
+ ../../lib/efl/ui_base_key_listener.cpp
+ ../../lib/efl/mobile/ui_controller.cpp
+ ../../lib/efl/mobile/ui_view.cpp
+ ../../lib/efl/mobile/ui_key_listener.cpp
+ ../../lib/efl/mobile/ui_viewmgr.cpp
main.cpp
)
static void create_base_gui(appdata_s *ad)
{
//FIXME: Hide this creation.
- ad->viewmgr = new ui_basic_viewmgr(PACKAGE);
+ ad->viewmgr = new ui_viewmgr(PACKAGE);
create_page1(ad);
*/
static void ctxpopup_item_select_cb(void *data, Evas_Object *obj, void *event_info)
{
- ui_basic_view *view = static_cast<ui_basic_view *>(data);
+ ui_view *view = static_cast<ui_view *>(data);
Elm_Object_Item *it = static_cast<Elm_Object_Item *>(event_info);
elm_ctxpopup_dismiss(obj);
LOGE("Item (%s) is selected", elm_object_item_text_get(it));
}
-class page1: public ui_basic_controller
+class page1: public ui_controller
{
private:
appdata_s *ad;
page1(appdata_s *ad)
: ad(ad)
{
- /* ui_basic_view(controller, identity name).
+ /* ui_view(controller, identity name).
Later, you could get the identity name using view->get_name(); */
- ad->viewmgr->push_view(new ui_basic_view(this, "page1"));
+ ad->viewmgr->push_view(new ui_view(this, "page1"));
}
~page1()
{
{
//Initialize contents.
- ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
+ ui_view *view = dynamic_cast<ui_view *>(this->get_view());
//Check the current rotation for set portrait or landscape content if any.
LOGE("view 1 load rotation = %d\n", view->get_degree());
bool on_menu()
{
- ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
+ ui_view *view = dynamic_cast<ui_view *>(this->get_view());
Elm_Ctxpopup *ctxpopup = elm_ctxpopup_add(view->get_base());
elm_ctxpopup_item_append(ctxpopup, "Phone calls", NULL, ctxpopup_item_select_cb, this);
* limitations under the License.
*
*/
-class page2: public ui_basic_controller
+class page2: public ui_controller
{
private:
appdata_s *ad;
page2(appdata_s *ad)
: ad(ad)
{
- /* ui_basic_view(controller, identity name).
+ /* ui_view(controller, identity name).
Later, you could get the identity name using view->get_name(); */
- ad->viewmgr->push_view(new ui_basic_view(this, "page2"));
+ ad->viewmgr->push_view(new ui_view(this, "page2"));
}
~page2()
void on_load()
{
//Initialize contents.
- ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
+ ui_view *view = dynamic_cast<ui_view *>(this->get_view());
//Create a main content.
Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 2",
* limitations under the License.
*
*/
-class page3: public ui_basic_controller
+class page3: public ui_controller
{
private:
appdata_s *ad;
page3(appdata_s *ad)
: ad(ad)
{
- /* ui_basic_view(controller, identity name).
+ /* ui_view(controller, identity name).
Later, you could get the identity name using view->get_name(); */
- ad->viewmgr->push_view(new ui_basic_view(this, "page3"));
+ ad->viewmgr->push_view(new ui_view(this, "page3"));
}
~page3()
{
//Initialize contents.
- ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
+ ui_view *view = dynamic_cast<ui_view *>(this->get_view());
//Create a main content.
Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 3",
* limitations under the License.
*
*/
-class page4: public ui_basic_controller
+class page4: public ui_controller
{
private:
appdata_s *ad;
page4(appdata_s *ad)
: ad(ad)
{
- /* ui_basic_view(controller, identity name).
+ /* ui_view(controller, identity name).
Later, you could get the identity name using view->get_name(); */
- ad->viewmgr->push_view(new ui_basic_view(this, "page4"));
+ ad->viewmgr->push_view(new ui_view(this, "page4"));
}
~page4()
{
//Initialize contents.
- ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
+ ui_view *view = dynamic_cast<ui_view *>(this->get_view());
//Create a main content.
Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 4",
* limitations under the License.
*
*/
-class page5: public ui_basic_controller
+class page5: public ui_controller
{
private:
appdata_s *ad;
//No basic form.
/* ui_view(controller, identity name).
Later, you could get the identity name using view->get_name(); */
- ad->viewmgr->push_view(new ui_view(this, "page5"));
+ ad->viewmgr->push_view(new ui_base_view(this, "page5"));
}
~page5()
{
//Initialize contents.
- ui_view *view = dynamic_cast<ui_view *>(this->get_view());
+ ui_base_view *view = dynamic_cast<ui_base_view *>(this->get_view());
//Create a main content.
Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 5<br>(Full View)",
* limitations under the License.
*
*/
-class page6: public ui_basic_controller
+class page6: public ui_controller
{
private:
appdata_s *ad;
page6(appdata_s *ad)
: ad(ad)
{
- /* ui_basic_view(controller, identity name).
+ /* ui_view(controller, identity name).
Later, you could get the identity name using view->get_name(); */
- ad->viewmgr->push_view(new ui_basic_view(this, "page6"));
+ ad->viewmgr->push_view(new ui_view(this, "page6"));
}
~page6()
//Initialize contents.
- ui_basic_view *view = dynamic_cast<ui_basic_view *>(this->get_view());
+ ui_view *view = dynamic_cast<ui_view *>(this->get_view());
//Create a main content.
Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 6",
* limitations under the License.
*
*/
-class page7: public ui_basic_controller
+class page7: public ui_controller
{
private:
appdata_s *ad;
page7(appdata_s *ad)
: ad(ad)
{
- /* ui_basic_view(controller, identity name, style name of view).
+ /* ui_view(controller, identity name, style name of view).
Later, you could get the identity name using view->get_name();
you could get the style name of view as well */
- ui_basic_view *view = new ui_basic_view(this, "page7");
+ ui_view *view = new ui_view(this, "page7");
//FIXME: It will be deleted or change to other way :(
// We don't have any way to support it now.
*
*/
-class page8: public ui_basic_view
+class page8: public ui_view
{
private:
appdata_s *ad;
public:
page8(const char *name, appdata_s *ad)
- : ui_basic_view(name), ad(ad)
+ : ui_view(name), ad(ad)
{
ad->viewmgr->push_view(this);
}
* limitations under the License.
*
*/
-class page9: public ui_basic_view
+class page9: public ui_view
{
private:
appdata_s *ad;
public:
page9(const char *name, appdata_s *ad)
- : ui_basic_view(name), ad(ad)
+ : ui_view(name), ad(ad)
{
//FIXME: It will be deleted or change to other way :(
// We don't have any way to support it now.
* limitations under the License.
*
*/
-#ifndef UI_BASIC_CONTROLLER_H
-#define UI_BASIC_CONTROLLER_H
+#ifndef UI_CONTROLLER_H
+#define UI_CONTROLLER_H
-#include "../ui_viewmanager_efl.h"
+#include "../ui_viewmanager_base.h"
namespace efl_viewmgr
{
-class ui_basic_controller: public ui_controller
+class ui_controller: public ui_base_controller
{
public:
- virtual ~ui_basic_controller();
+ virtual ~ui_controller();
virtual bool on_menu();
};
}
-#endif /* UI_BASIC_CONTROLLER_H */
+#endif /* UI_CONTROLLER_H */
* limitations under the License.
*
*/
-#ifndef UI_BASIC_KEY_HANDLER_H
-#define UI_BASIC_KEY_HANDLER_H
+#ifndef UI_KEY_HANDLER_H
+#define UI_KEY_HANDLER_H
-#include "../ui_viewmanager_efl.h"
+#include "../ui_viewmanager_base.h"
namespace efl_viewmgr
{
class ui_viewmgr;
-class ui_basic_key_listener : public ui_key_listener
+class ui_key_listener : public ui_base_key_listener
{
public:
- ui_basic_key_listener(ui_viewmgr *viewmgr);
+ ui_key_listener(ui_viewmgr *viewmgr);
virtual bool init();
- virtual void extend_event_proc(ui_view *view, Evas_Event_Key_Down *ev);
+ virtual void extend_event_proc(ui_base_view *view, Evas_Event_Key_Down *ev);
};
}
* limitations under the License.
*
*/
-#ifndef UI_BASIC_VIEW
-#define UI_BASIC_VIEW
+#ifndef UI_VIEW
+#define UI_VIEW
-#include "../ui_viewmanager_efl.h"
+#include "../ui_viewmanager_base.h"
namespace efl_viewmgr
{
-class ui_basic_view: public ui_view
+class ui_view: public ui_base_view
{
private:
Elm_Layout *layout; //Base layout for view
virtual void set_event_block(bool block);
public:
- ui_basic_view(ui_controller *controller, const char *name = NULL);
- ui_basic_view(const char *name = NULL);
- virtual ~ui_basic_view();
+ ui_view(ui_controller *controller, const char *name = NULL);
+ ui_view(const char *name = NULL);
+ virtual ~ui_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, Elm_Button *title_left_btn, Elm_Button *title_right_btn);
}
-#endif /* UI_BASIC_VIEW */
+#endif /* UI_VIEW */
#endif
#define LOG_TAG "UI_VIEWMGR"
-#include "ui_viewmgr.h"
#include "ui_controller.h"
#include "ui_view.h"
#include "ui_key_listener.h"
-
+#include "ui_viewmgr.h"
#define UI_BASIC_VIEWMGR_H
#include <Elementary.h>
-#include "../ui_viewmanager_efl.h"
+#include "../ui_viewmanager_base.h"
namespace efl_viewmgr
{
-class ui_basic_view;
+class ui_view;
-class ui_basic_viewmgr: public ui_viewmgr
+class ui_viewmgr: public ui_base_viewmgr
{
- friend class ui_basic_view;
+ friend class ui_view;
public:
- ui_basic_viewmgr(const char *pkg);
+ ui_viewmgr(const char *pkg);
- virtual ~ui_basic_viewmgr();
+ virtual ~ui_viewmgr();
};
}
-#endif /* UI_BASIC_VIEWMGR_H */
+#endif /* UI_VIEWMGR_H */
* limitations under the License.
*
*/
-#ifndef UI_CONTROLLER_H
-#define UI_CONTROLLER_H
+#ifndef UI_BASE_CONTROLLER_H
+#define UI_BASE_CONTROLLER_H
#include "../interface/ui_viewmanager_interface.h"
{
/**
- * @class ui_controller
+ * @class ui_base_controller
*
* @ingroup viewmgr
*
* @brief UI Controller. This is a class for handling of life-cycle events from user side.
*/
-class ui_controller: public viewmgr::ui_iface_controller
+class ui_base_controller: public viewmgr::ui_iface_controller
{
public:
///Destructor.
- virtual ~ui_controller();
+ virtual ~ui_base_controller();
/**
* @brief Return a view which is matched with controller
* @see set_view()
*/
- ui_view *get_view();
+ ui_base_view *get_view();
/** @brief load callback.
*
/** @brief pause callback.
*
* @note When the system blocks the application running in cases such as phone call, system notification, switching applications ...
- * When Window turns to deactivate. (@see ui_viewmgr_base :: deactivate()).
+ * When Window turns to deactivate. (@see ui_base_viewmgr_base :: deactivate()).
* If the view were inactive or unload state, the pause won't be called.
*/
virtual void on_pause() {}
*
* @note View is turning back to the active state again from pause.
* When the system allows the application turns to activate.
- * When the Window turns to activate. (@see ui_viewmgr_base :: activate())
+ * When the Window turns to activate. (@see ui_base_viewmgr :: activate())
*/
virtual void on_resume() {}
};
}
-#endif /* UI_CONTROLLER_H */
+#endif /* UI_BASE_CONTROLLER_H */
* limitations under the License.
*
*/
-#ifndef UI_KEY_LISTENER_H
-#define UI_KEY_LISTENER_H
+#ifndef UI_BASE_KEY_LISTENER_H
+#define UI_BASE_KEY_LISTENER_H
#include <Elementary.h>
#include "../interface/ui_viewmanager_interface.h"
namespace efl_viewmgr
{
-class ui_viewmgr;
-class ui_view;
+class ui_base_viewmgr;
+class ui_base_view;
-class ui_key_listener
+class ui_base_key_listener
{
protected:
- ui_viewmgr *viewmgr;
+ ui_base_viewmgr *viewmgr;
Evas_Object *key_grabber;
public:
- ui_key_listener(ui_viewmgr *viewmgr);
- virtual ~ui_key_listener() {}
+ ui_base_key_listener(ui_base_viewmgr *viewmgr);
+ virtual ~ui_base_key_listener() {}
virtual bool init();
virtual bool term();
- virtual void extend_event_proc(ui_view *view, Evas_Event_Key_Down *ev) {}
+ virtual void extend_event_proc(ui_base_view *view, Evas_Event_Key_Down *ev) {}
- ui_viewmgr *get_viewmgr() { return this->viewmgr; }
+ ui_base_viewmgr *get_viewmgr() { return this->viewmgr; }
};
}
-#endif /* UI_KEY_LISTENER_H */
+#endif /* UI_BASE_KEY_LISTENER_H */
* limitations under the License.
*
*/
-#ifndef UI_VIEW_H
-#define UI_VIEW_H
+#ifndef UI_BASE_VIEW_H
+#define UI_BASE_VIEW_H
#include <Elementary.h>
#include "../interface/ui_viewmanager_interface.h"
namespace efl_viewmgr
{
-class ui_controller;
+class ui_base_controller;
/**
- * @class ui_view
+ * @class ui_base_view
*
* @ingroup viewmgr
*
* @warning When the transitions are finished, the view must to call ui_iface_viewmgr :: _push_finished(), ui_iface_viewmgr :: _pop_finished() in order that
* The ui_iface_viewmgr keeps the view states exactly.
*/
-class ui_view: public viewmgr::ui_iface_view
+class ui_base_view: public viewmgr::ui_iface_view
{
- friend class ui_viewmgr;
+ friend class ui_base_viewmgr;
protected:
/** @brief Unload current view's content
public:
///Constructor.
- ui_view(ui_controller *controller, const char *name = NULL);
+ ui_base_view(ui_base_controller *controller, const char *name = NULL);
///Constructor.
- ui_view(const char *name = NULL);
+ ui_base_view(const char *name = NULL);
///Destructor.
- virtual ~ui_view();
+ virtual ~ui_base_view();
/** @brief This is for replacing or setting a content of the view.
*
virtual void on_landscape();
/** @brief Set the indicator mode.
*
- * @param indicator The mode to set, one of #ui_view_indicator.
+ * @param indicator The mode to set, one of #ui_base_view_indicator.
*/
void set_indicator(ui_view_indicator indicator);
}
-#endif /* UI_VIEW_H */
+#endif /* UI_BASE_VIEW_H */
* limitations under the License.
*
*/
-#ifndef UI_VIEWMGR_H
-#define UI_VIEWMGR_H
+#ifndef UI_BASE_VIEWMGR_H
+#define UI_BASE_VIEWMGR_H
#include <Elementary.h>
#include "../interface/ui_viewmanager_interface.h"
-#include "ui_key_listener.h"
+#include "ui_base_key_listener.h"
#include <map>
namespace efl_viewmgr
{
-class ui_view;
+class ui_base_view;
/**
- * @class ui_viewmgr
+ * @class ui_base_viewmgr
*
* @ingroup viewmgr
*
*
* @warning viewmgr will remove all containing views when it's destroyed.
*/
-class ui_viewmgr: public viewmgr::ui_iface_viewmgr
+class ui_base_viewmgr: public viewmgr::ui_iface_viewmgr
{
- friend class ui_view;
+ friend class ui_base_view;
private:
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_base_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, Elm_Layout *> effect_map; //Map for effect layouts.
void active_top_view();
protected:
- ui_viewmgr(const char *pkg, ui_key_listener *key_listener);
+ ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener);
/** @brief Get a base layout of viewmgr.
*/
public:
///Constructor.
- ui_viewmgr(const char *pkg);
+ ui_base_viewmgr(const char *pkg);
///Destructor.
- virtual ~ui_viewmgr();
+ virtual ~ui_base_viewmgr();
/**
* @brief Activate this view manager.
* @see insert_view_after()
* @see pop_view()
*/
- virtual ui_view *push_view(ui_view *view);
+ virtual ui_base_view *push_view(ui_base_view *view);
/**
* @brief Push a new view into this viewmgr. This function is used for when application switches a current view to a new one.
/** @brief Get a last view of current view stack.
*/
- ui_view *get_last_view();
+ ui_base_view *get_last_view();
/**
* @brief Return a view which is matched with the index @p idx.
* @see get_view_index()
* @see get_view_count()
*/
- ui_view *get_view(unsigned int idx);
+ ui_base_view *get_view(unsigned int idx);
};
}
-#endif /* UI_VIEWMGR_H */
+#endif /* UI_BASE_VIEWMGR_H */
#endif
#define LOG_TAG "UI_VIEWMGR"
-#include "ui_basic_controller.h"
-#include "ui_basic_view.h"
-#include "ui_basic_key_listener.h"
-#include "ui_basic_viewmgr.h"
+#include "ui_base_viewmgr.h"
+#include "ui_base_controller.h"
+#include "ui_base_view.h"
+#include "ui_base_key_listener.h"
+
-#include "efl/mobile/ui_viewmanager_mobile.h"
+#include "efl/mobile/ui_viewmanager.h"
interface/ui_iface_controller.cpp
interface/ui_iface_view.cpp
interface/ui_iface_viewmgr.cpp
- efl/ui_controller.cpp
- efl/ui_view.cpp
- efl/ui_viewmgr.cpp
- efl/ui_key_listener.cpp
- efl/mobile/ui_basic_controller.cpp
- efl/mobile/ui_basic_view.cpp
- efl/mobile/ui_basic_key_listener.cpp
- efl/mobile/ui_basic_viewmgr.cpp
+ efl/ui_base_controller.cpp
+ efl/ui_base_view.cpp
+ efl/ui_base_viewmgr.cpp
+ efl/ui_base_key_listener.cpp
+ efl/mobile/ui_controller.cpp
+ efl/mobile/ui_view.cpp
+ efl/mobile/ui_key_listener.cpp
+ efl/mobile/ui_viewmgr.cpp
)
ADD_LIBRARY(${LIB_NAME} SHARED ${LIB_SRCS})
* limitations under the License.
*
*/
-#include "../../../include/efl/mobile/ui_viewmanager_mobile.h"
+#include "../../../include/efl/mobile/ui_viewmanager.h"
using namespace efl_viewmgr;
using namespace viewmgr;
-ui_basic_controller::~ui_basic_controller()
+ui_controller::~ui_controller()
{
}
-bool ui_basic_controller::on_menu()
+bool ui_controller::on_menu()
{
return true;
}
* limitations under the License.
*
*/
-#include "../../../include/efl/mobile/ui_viewmanager_mobile.h"
+#include "../../../include/efl/mobile/ui_viewmanager.h"
using namespace efl_viewmgr;
using namespace viewmgr;
static const char *KEY_MENU = "XF86Menu";
static const char *KEY_MENU2 = "XF86Send";
-ui_basic_key_listener::ui_basic_key_listener(ui_viewmgr *viewmgr)
- : ui_key_listener(viewmgr)
+ui_key_listener::ui_key_listener(ui_viewmgr *viewmgr)
+ : ui_base_key_listener(viewmgr)
{
}
-void ui_basic_key_listener::extend_event_proc(ui_view *view, Evas_Event_Key_Down *ev)
+void ui_key_listener::extend_event_proc(ui_base_view *view, Evas_Event_Key_Down *ev)
{
if (strcmp(ev->keyname, KEY_MENU) && strcmp(ev->keyname, KEY_MENU2)) return;
- dynamic_cast<ui_basic_view *>(view)->on_menu();
+ dynamic_cast<ui_view *>(view)->on_menu();
}
-bool ui_basic_key_listener::init()
+bool ui_key_listener::init()
{
- if (!ui_key_listener::init()) return false;
+ if (!ui_base_key_listener::init()) return false;
if (!evas_object_key_grab(this->key_grabber, KEY_MENU, 0, 0, EINA_FALSE))
{
* limitations under the License.
*
*/
-#include "../../../include/efl/mobile/ui_viewmanager_mobile.h"
+#include "../../../include/efl/mobile/ui_viewmanager.h"
//FIXME: is it correct to define here?
#define EDJ_PATH "/usr/share/edje/ui-viewmgr/ui-viewmgr.edj"
using namespace viewmgr;
#define MY_VIEWMGR dynamic_cast<ui_viewmgr *>(this->get_viewmgr())
-#define MY_CONTROLLER dynamic_cast<ui_basic_controller *>(this->get_controller()))
+#define MY_CONTROLLER dynamic_cast<ui_controller *>(this->get_controller()))
static void update_menu(Elm_Win *win, Elm_Ctxpopup *ctxpopup)
{
evas_object_show(ctxpopup);
}
-bool ui_basic_view::destroy_layout()
+bool ui_view::destroy_layout()
{
if (!this->layout) return false;
evas_object_del(this->layout);
return true;
}
-bool ui_basic_view::create_layout()
+bool ui_view::create_layout()
{
if (this->layout) return false;
if (!layout)
{
- LOGE("Failed to create a layout = ui_basic_view(%p)", this);
+ LOGE("Failed to create a layout = ui_view(%p)", this);
return false;
}
if (!elm_layout_file_set(layout, EDJ_PATH, GROUP))
{
- LOGE("Failed to set file = ui_basic_view(%p), path(%s), group(%s)", this, EDJ_PATH, GROUP);
+ LOGE("Failed to set file = ui_view(%p), path(%s), group(%s)", this, EDJ_PATH, GROUP);
evas_object_del(layout);
return false;
}
if (!prev_btn)
{
- LOGE("Failed to create a button = ui_basic_view(%p)", this);
+ LOGE("Failed to create a button = ui_view(%p)", this);
}
else
{
evas_object_event_callback_add(layout, EVAS_CALLBACK_RESIZE,
[](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void
{
- ui_basic_view *view = static_cast<ui_basic_view *>(data);
+ ui_view *view = static_cast<ui_view *>(data);
Elm_Ctxpopup *ctxpopup = view->get_menu();
if (ctxpopup && evas_object_visible_get(ctxpopup))
{
evas_object_event_callback_add(layout, EVAS_CALLBACK_MOVE,
[](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void
{
- ui_basic_view *view = static_cast<ui_basic_view *>(data);
+ ui_view *view = static_cast<ui_view *>(data);
Elm_Ctxpopup *ctxpopup = view->get_menu();
if (ctxpopup && evas_object_visible_get(ctxpopup))
{
return true;
}
-ui_basic_view::ui_basic_view(ui_controller *controller, const char *name)
- : ui_view(controller, name), layout(NULL), ctxpopup(NULL)
+ui_view::ui_view(ui_controller *controller, const char *name)
+ : ui_base_view(controller, name), layout(NULL), ctxpopup(NULL)
{
}
-ui_basic_view::ui_basic_view(const char *name)
- : ui_basic_view(NULL, name)
+ui_view::ui_view(const char *name)
+ : ui_view(NULL, name)
{
}
-ui_basic_view::~ui_basic_view()
+ui_view::~ui_view()
{
evas_object_del(this->ctxpopup);
destroy_layout();
}
-void ui_basic_view::on_load()
+void ui_view::on_load()
{
if (!this->layout) this->create_layout();
- ui_view::on_load();
+ ui_base_view::on_load();
}
-void ui_basic_view::on_unload()
+void ui_view::on_unload()
{
- ui_view::on_unload();
+ ui_base_view::on_unload();
}
Evas_Object *
-ui_basic_view::set_content(Evas_Object *content, const char *title)
+ui_view::set_content(Evas_Object *content, const char *title)
{
- Evas_Object *pcontent = ui_view::set_content(content);
+ Evas_Object *pcontent = ui_base_view::set_content(content);
if (this->layout)
{
return pcontent;
}
-bool ui_basic_view::set_subtitle(const char *text)
+bool ui_view::set_subtitle(const char *text)
{
if (this->layout)
{
return false;
}
-bool ui_basic_view::set_title_left_btn(Elm_Button *title_left_btn)
+bool ui_view::set_title_left_btn(Elm_Button *title_left_btn)
{
if (this->layout)
{
return false;
}
-bool ui_basic_view::set_title_right_btn(Elm_Button *title_right_btn)
+bool ui_view::set_title_right_btn(Elm_Button *title_right_btn)
{
if (this->layout)
{
return false;
}
-bool ui_basic_view::set_title_badge(const char *text)
+bool ui_view::set_title_badge(const char *text)
{
if (this->layout)
{
return false;
}
-bool ui_basic_view::set_title(const char *text)
+bool ui_view::set_title(const char *text)
{
if (this->layout)
{
return false;
}
-Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *title_left_btn,
+Evas_Object *ui_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);
return pcontent;
}
-bool ui_basic_view::set_menu(Elm_Ctxpopup *menu)
+bool ui_view::set_menu(Elm_Ctxpopup *menu)
{
if (this->ctxpopup) evas_object_del(this->ctxpopup);
evas_object_event_callback_add(menu, EVAS_CALLBACK_DEL,
[](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void
{
- ui_basic_view *view = static_cast<ui_basic_view *>(data);
+ ui_view *view = static_cast<ui_view *>(data);
view->unset_menu();
},
this);
return true;
}
-bool ui_basic_view::set_toolbar(Elm_Toolbar *toolbar)
+bool ui_view::set_toolbar(Elm_Toolbar *toolbar)
{
Elm_Layout *layout = this->get_base();
return true;
}
-void ui_basic_view::unload_content()
+void ui_view::unload_content()
{
- ui_view::set_content(NULL);
+ ui_base_view::set_content(NULL);
this->destroy_layout();
}
-void ui_basic_view::on_menu()
+void ui_view::on_menu()
{
if (this->ctxpopup && evas_object_visible_get(this->ctxpopup))
{
}
}
-void ui_basic_view::set_event_block(bool block)
+void ui_view::set_event_block(bool block)
{
ui_iface_view::set_event_block(block);
evas_object_freeze_events_set(this->get_base(), block);
}
-Elm_Ctxpopup* ui_basic_view::unset_menu()
+Elm_Ctxpopup* ui_view::unset_menu()
{
Elm_Ctxpopup *menu = this->ctxpopup;
//FIXME: cancel callbacks
return menu;
}
-Evas_Object *ui_basic_view::unset_content()
+Evas_Object *ui_view::unset_content()
{
- Evas_Object *pcontent = ui_view::unset_content();
+ Evas_Object *pcontent = ui_base_view::unset_content();
if (!this->get_base()) return pcontent;
return pcontent;
}
-Elm_Button *ui_basic_view::unset_title_left_btn()
+Elm_Button *ui_view::unset_title_left_btn()
{
Elm_Button *title_left_btn;
return title_left_btn;
}
-Elm_Button *ui_basic_view::unset_title_right_btn()
+Elm_Button *ui_view::unset_title_right_btn()
{
Elm_Button *title_right_btn;
return title_right_btn;
}
-Elm_Toolbar *ui_basic_view::unset_toolbar()
+Elm_Toolbar *ui_view::unset_toolbar()
{
Elm_Toolbar *toolbar;
* limitations under the License.
*
*/
-#include "../../../include/efl/mobile/ui_viewmanager_mobile.h"
+#include "../../../include/efl/mobile/ui_viewmanager.h"
using namespace efl_viewmgr;
using namespace viewmgr;
-ui_basic_viewmgr::ui_basic_viewmgr(const char *pkg)
- : ui_viewmgr(pkg, new ui_basic_key_listener(this))
+ui_viewmgr::ui_viewmgr(const char *pkg)
+ : ui_base_viewmgr(pkg, new ui_key_listener(this))
{
}
-ui_basic_viewmgr::~ui_basic_viewmgr()
+ui_viewmgr::~ui_viewmgr()
{
}
* limitations under the License.
*
*/
-#include "../../include/efl/ui_viewmanager_efl.h"
+#include "../../include/efl/ui_viewmanager_base.h"
using namespace efl_viewmgr;
using namespace viewmgr;
-ui_view * ui_controller::get_view()
+ui_base_view * ui_base_controller::get_view()
{
ui_iface_view *view = ui_iface_controller::get_view();
if (!view) return NULL;
- return dynamic_cast<ui_view *>(view);
+ return dynamic_cast<ui_base_view *>(view);
}
-ui_controller::~ui_controller()
+ui_base_controller::~ui_base_controller()
{
}
* limitations under the License.
*
*/
-#include "../../include/efl/ui_viewmanager_efl.h"
+#include "../../include/efl/ui_viewmanager_base.h"
using namespace efl_viewmgr;
using namespace viewmgr;
static const char *KEY_BACK = "XF86Back";
static const char *KEY_BACK2 = "XF86Stop";
-ui_key_listener::ui_key_listener(ui_viewmgr *viewmgr)
+ui_base_key_listener::ui_base_key_listener(ui_base_viewmgr *viewmgr)
: viewmgr(viewmgr), key_grabber(NULL)
{
}
-static void event_proc(ui_key_listener *key_listener, Evas_Event_Key_Down *ev)
+static void event_proc(ui_base_key_listener *key_listener, Evas_Event_Key_Down *ev)
{
//Only if view manager is activated
- ui_viewmgr *viewmgr = key_listener->get_viewmgr();
+ ui_base_viewmgr *viewmgr = key_listener->get_viewmgr();
if (!viewmgr->is_activated()) return;
//Get Top View
- ui_view *view = dynamic_cast<ui_view *>(viewmgr->get_last_view());
+ ui_base_view *view = dynamic_cast<ui_base_view *>(viewmgr->get_last_view());
if (!view) return;
key_listener->extend_event_proc(view, ev);
view->on_back();
}
-bool ui_key_listener::term()
+bool ui_base_key_listener::term()
{
evas_object_del(this->key_grabber);
return true;
}
-bool ui_key_listener::init()
+bool ui_base_key_listener::init()
{
if (!this->viewmgr)
{
evas_object_event_callback_add(key_grab_rect, EVAS_CALLBACK_KEY_UP, [](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void
{
Evas_Event_Key_Down *ev = static_cast<Evas_Event_Key_Down *>(event_info);
- ui_key_listener *key_listener = static_cast<ui_key_listener *>(data);
+ ui_base_key_listener *key_listener = static_cast<ui_base_key_listener *>(data);
event_proc(key_listener, ev);
}, this);
* limitations under the License.
*
*/
-#include "../../include/efl/ui_viewmanager_efl.h"
+#include "../../include/efl/ui_viewmanager_base.h"
using namespace efl_viewmgr;
using namespace viewmgr;
-#define MY_CONTROLLER dynamic_cast<ui_controller *>(this->get_controller())
-#define MY_VIEWMGR dynamic_cast<ui_viewmgr *>(this->get_viewmgr())
+#define MY_CONTROLLER dynamic_cast<ui_base_controller *>(this->get_controller())
+#define MY_VIEWMGR dynamic_cast<ui_base_viewmgr *>(this->get_viewmgr())
-ui_view::ui_view(ui_controller *controller, const char *name)
+ui_base_view::ui_base_view(ui_base_controller *controller, const char *name)
: ui_iface_view(controller, name)
{
}
-ui_view::ui_view(const char *name)
- : ui_view(NULL, name)
+ui_base_view::ui_base_view(const char *name)
+ : ui_base_view(NULL, name)
{
}
-ui_view::~ui_view()
+ui_base_view::~ui_base_view()
{
}
-Evas_Object *ui_view::set_content(Evas_Object *content)
+Evas_Object *ui_base_view::set_content(Evas_Object *content)
{
T pcontent = ui_iface_view::set_content(CONVERT_TO_T(content));
return CONVERT_TO_EO(pcontent);
}
-Evas_Object *ui_view::unset_content()
+Evas_Object *ui_base_view::unset_content()
{
T pcontent = ui_iface_view::unset_content();
return static_cast<Evas_Object *>(pcontent);
}
-Evas_Object *ui_view::get_base()
+Evas_Object *ui_base_view::get_base()
{
- ui_viewmgr *viewmgr = MY_VIEWMGR;
+ ui_base_viewmgr *viewmgr = MY_VIEWMGR;
if (!viewmgr)
{
return NULL;
return viewmgr->get_base();
}
-void ui_view::unload_content()
+void ui_base_view::unload_content()
{
Evas_Object *pcontent = this->set_content(NULL);
if (pcontent) evas_object_del(pcontent);
}
-Evas_Object *ui_view ::get_parent()
+Evas_Object *ui_base_view ::get_parent()
{
- ui_viewmgr *viewmgr = MY_VIEWMGR;
+ ui_base_viewmgr *viewmgr = MY_VIEWMGR;
if (!viewmgr)
{
LOGE("Failed to get a viewmgr");
return viewmgr->get_base();
}
-void ui_view::set_indicator(ui_view_indicator indicator)
+void ui_base_view::set_indicator(ui_view_indicator indicator)
{
if (this->get_indicator() == indicator) return;
ui_iface_view::set_indicator(indicator);
- ui_viewmgr *viewmgr = MY_VIEWMGR;
+ ui_base_viewmgr *viewmgr = MY_VIEWMGR;
if (!viewmgr->is_activated()) return;
- if (dynamic_cast<ui_view *>(viewmgr->get_last_view()) != this) return;
+ if (dynamic_cast<ui_base_view *>(viewmgr->get_last_view()) != this) return;
viewmgr->set_indicator(indicator);
}
-void ui_view::on_back()
+void ui_base_view::on_back()
{
if (this->get_controller())
{
MY_VIEWMGR->pop_view();
}
-void ui_view::on_rotate(int degree)
+void ui_base_view::on_rotate(int degree)
{
if (this->get_controller())
{
}
}
-void ui_view::on_portrait()
+void ui_base_view::on_portrait()
{
if (this->get_controller())
{
}
}
-void ui_view::on_landscape()
+void ui_base_view::on_landscape()
{
if (this->get_controller())
{
MY_CONTROLLER->on_landscape();
}
}
-void ui_view::set_event_block(bool block)
+void ui_base_view::set_event_block(bool block)
{
ui_iface_view::set_event_block(block);
evas_object_freeze_events_set(CONVERT_TO_EO(this->get_content()), block);
}
-int ui_view::get_degree()
+int ui_base_view::get_degree()
{
- ui_viewmgr *viewmgr = MY_VIEWMGR;
+ ui_base_viewmgr *viewmgr = MY_VIEWMGR;
if (!viewmgr)
{
LOGE("Failed to get a viewmgr");
* limitations under the License.
*
*/
-#include "../../include/efl/ui_viewmanager_efl.h"
+#include "../../include/efl/ui_viewmanager_base.h"
using namespace efl_viewmgr;
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(Elm_Conformant *conform, const char *style)
+bool ui_base_viewmgr::create_base_layout(Elm_Conformant *conform, const char *style)
{
char buf[128];
Elm_Layout *layout = elm_layout_add(conform);
elm_layout_signal_callback_add(layout, "push,finished", "viewmgr",
[](void *data, Evas_Object *obj, const char *emission, const char *source) -> void
{
- ui_viewmgr *viewmgr = static_cast<ui_viewmgr *>(data);
- ui_view *pview = viewmgr->get_view(viewmgr->get_view_count() - 2);
- ui_view *view = viewmgr->get_last_view();
+ ui_base_viewmgr *viewmgr = static_cast<ui_base_viewmgr *>(data);
+ ui_base_view *pview = viewmgr->get_view(viewmgr->get_view_count() - 2);
+ ui_base_view *view = viewmgr->get_last_view();
if (pview) viewmgr->push_view_finished(pview);
if (view) viewmgr->push_view_finished(view);
},
elm_layout_signal_callback_add(layout, "pop,finished", "viewmgr",
[](void *data, Evas_Object *obj, const char *emission, const char *source) -> void
{
- ui_viewmgr *viewmgr = static_cast<ui_viewmgr *>(data);
- ui_view *pview = viewmgr->get_view(viewmgr->get_view_count() - 2);
- ui_view *view = viewmgr->get_last_view();
+ ui_base_viewmgr *viewmgr = static_cast<ui_base_viewmgr *>(data);
+ ui_base_view *pview = viewmgr->get_view(viewmgr->get_view_count() - 2);
+ ui_base_view *view = viewmgr->get_last_view();
if (pview) viewmgr->pop_view_finished(pview);
if (view) viewmgr->pop_view_finished(view);
},
return true;
}
-Elm_Layout *ui_viewmgr::set_transition_layout(string transition_style)
+Elm_Layout *ui_base_viewmgr::set_transition_layout(string transition_style)
{
Elm_Layout *effect_layout = NULL;
return this->layout;
}
-void ui_viewmgr::active_top_view()
+void ui_base_viewmgr::active_top_view()
{
elm_object_part_content_unset(this->get_base(), "content");
- ui_view *view = this->get_last_view();
+ ui_base_view *view = this->get_last_view();
- //In case of ui_view, it doesn't have any base form. It uses viewmgr base instead.
+ //In case of ui_base_view, it doesn't have any base form. It uses viewmgr base instead.
Evas_Object *content;
if (view->get_base() == this->get_base())
{
//FIXME: How to deal with indicator in other UI framework? Dali? Volt?
//Is it possible make this interface common?
-bool ui_viewmgr::set_indicator(ui_view_indicator indicator)
+bool ui_base_viewmgr::set_indicator(ui_view_indicator indicator)
{
if (this->indicator == indicator) return false;
this->indicator = indicator;
return true;
}
-bool ui_viewmgr::create_conformant(Elm_Win *win)
+bool ui_base_viewmgr::create_conformant(Elm_Win *win)
{
Elm_Conformant *conform = elm_conformant_add(win);
if (!conform) return false;
return true;
}
-ui_viewmgr::ui_viewmgr(const char *pkg, ui_key_listener *key_listener)
+ui_base_viewmgr::ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener)
: ui_iface_viewmgr(), key_listener(key_listener), transition_style("default")
{
if (!pkg)
{
int rot = elm_win_rotation_get(obj);
- ui_viewmgr *viewmgr = static_cast<ui_viewmgr *>(data);
- ui_view *view = viewmgr->get_last_view();
+ ui_base_viewmgr *viewmgr = static_cast<ui_base_viewmgr *>(data);
+ ui_base_view *view = viewmgr->get_last_view();
view->on_rotate(rot);
//FIXME: Change this configurable?
evas_object_smart_callback_add(this->win, "delete,request",
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- ui_viewmgr *viewmgr = static_cast<ui_viewmgr*>(data);
+ ui_base_viewmgr *viewmgr = static_cast<ui_base_viewmgr*>(data);
delete(viewmgr);
//FIXME: Window is destroyed. Terminate Application!
//ui_app_exit();
key_listener->init();
}
-ui_viewmgr::ui_viewmgr(const char *pkg)
- : ui_viewmgr(pkg, new ui_key_listener(this))
+ui_base_viewmgr::ui_base_viewmgr(const char *pkg)
+ : ui_base_viewmgr(pkg, new ui_base_key_listener(this))
{
}
-ui_viewmgr::~ui_viewmgr()
+ui_base_viewmgr::~ui_base_viewmgr()
{
this->key_listener->term();
delete(this->key_listener);
}
-bool ui_viewmgr::activate()
+bool ui_base_viewmgr::activate()
{
if (!ui_iface_viewmgr::activate()) return false;
this->active_top_view();
//FIXME: Necessary??
- ui_view *view = this->get_last_view();
+ ui_base_view *view = this->get_last_view();
view->on_active();
evas_object_show(this->win);
return true;
}
-bool ui_viewmgr::deactivate()
+bool ui_base_viewmgr::deactivate()
{
if (!ui_iface_viewmgr::deactivate()) return false;
//FIXME: based on the profile, we should app to go behind or terminate.
if (true)
{
- ui_view *view = this->get_last_view();
+ ui_base_view *view = this->get_last_view();
if (view) view->on_inactive();
evas_object_lower(this->win);
}
return true;
}
-bool ui_viewmgr::pop_view()
+bool ui_base_viewmgr::pop_view()
{
if (this->get_view_count() == 1)
{
return false;
}
- ui_view *pview = this->get_view(this->get_view_count() - 2);
- ui_view *view = this->get_last_view();
+ ui_base_view *pview = this->get_view(this->get_view_count() - 2);
+ ui_base_view *view = this->get_last_view();
//In case, if view doesn't have transition effect
if (!strcmp(view->get_transition_style(), "none"))
return true;
}
-ui_view * ui_viewmgr::push_view(ui_view *view)
+ui_base_view * ui_base_viewmgr::push_view(ui_base_view *view)
{
ui_iface_viewmgr::push_view(view);
return view;
}
- ui_view *pview = this->get_view(this->get_view_count() - 2);
+ ui_base_view *pview = this->get_view(this->get_view_count() - 2);
//In case, if view doesn't have transition effect
if (!strcmp(view->get_transition_style(), "none")) {
return view;
}
-ui_view *ui_viewmgr::get_view(unsigned int idx)
+ui_base_view *ui_base_viewmgr::get_view(unsigned int idx)
{
- return dynamic_cast<ui_view *>(ui_iface_viewmgr::get_view(idx));
+ return dynamic_cast<ui_base_view *>(ui_iface_viewmgr::get_view(idx));
}
-ui_view *ui_viewmgr::get_last_view()
+ui_base_view *ui_base_viewmgr::get_last_view()
{
- return dynamic_cast<ui_view *>(ui_iface_viewmgr::get_last_view());
+ return dynamic_cast<ui_base_view *>(ui_iface_viewmgr::get_last_view());
}