From: Hermet Park Date: Fri, 1 Apr 2016 16:14:03 +0000 (+0900) Subject: packaging organizing. X-Git-Tag: submit/tizen/20160617.075742~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F64554%2F10;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git packaging organizing. Change-Id: Idb5fdc0d92b4e3f9b02dd15b64539b7b4414919d --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 23e79ee..2fe0034 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,18 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(ui-viewmgr) +PROJECT(org.tizen.ui-viewmgr) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -SET(EXEC_DIR ${PREFIX}) -SET(BINDIR ${PREFIX}/bin) +SET(VERSION 0.1.0) +SET(VENDOR "samsung") + +SET(LIBNAME ui-viewmgr) SET(LIBDIR ${PREFIX}/lib) SET(INCDIR ${PREFIX}/include) -SET(IMGDIR ${PREFIX}/share/${PROJECT_NAME}/images) -SET(VERSION_MAJOR 0) -SET(VERSION ${VERSION_MAJOR}.1.0) -SET(VENDOR "samsung") -SET(PACKAGE ${PROJECT_NAME}) +SET(EDJDIR "/usr/share/edje/${LIBNAME}") + +SET(BINNAME ui.viewmgr.demo) +SET(BINDIR /opt/usr/apps/${BINNAME}) +SET(IMGDIR ${BINDIR}/data/images) SET(CMAKE_SKIP_BUILD_RPATH TRUE) @@ -19,34 +21,34 @@ IF("${CMAKE_BUILD_TYPE}" STREQUAL "") ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") -IF(NOT DBDIR) - SET(DBDIR "$ENV{HOME}") -ENDIF(NOT DBDIR) -ADD_DEFINITIONS("-DDBDIR=\"${DBDIR}\"") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DVERSION=\"${VERSION}\"") -ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") -ADD_DEFINITIONS("-DPLUGINDIR=\"${PLUGINDIR}\"") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall") - -SET(EDJ_PATH "${RESDIR}/edje") +ADD_DEFINITIONS("-DBINNAME=\"${BINNAME}\"") +ADD_DEFINITIONS("-DLOCALE_DIR=\"${LOCALEDIR}\"") INCLUDE(FindPkgConfig) -ADD_SUBDIRECTORY(src) +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -O2 -Wall -fPIE") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -fPIE -std=c++0x") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") -SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") +ADD_SUBDIRECTORY(src) -CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig) +#pc file +CONFIGURE_FILE(pc/${LIBNAME}.pc.in pc/${LIBNAME}.pc @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pc/${LIBNAME}.pc DESTINATION lib/pkgconfig) -ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj +#edj file +ADD_CUSTOM_TARGET(${LIBNAME}.edj COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/data/edc - ${CMAKE_SOURCE_DIR}/data/edc/${PROJECT_NAME}.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj - DEPENDS ${CMAKE_SOURCE_DIR}/data/edc/${PROJECT_NAME}.edc + ${CMAKE_SOURCE_DIR}/data/edc/${LIBNAME}.edc ${CMAKE_BINARY_DIR}/data/edc/${LIBNAME}.edj + DEPENDS ${CMAKE_SOURCE_DIR}/data/edc/${LIBNAME}.edc ) -ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj) -INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION /usr/share/edje/${PROJECT_NAME}) +ADD_DEPENDENCIES(${LIBNAME} ${LIBNAME}.edj) +INSTALL(FILES ${CMAKE_BINARY_DIR}/data/edc/${LIBNAME}.edj DESTINATION ${EDJDIR}) + +#xml file +CONFIGURE_FILE(${BINNAME}.xml.in ${BINNAME}.xml @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${BINNAME}.xml DESTINATION /usr/share/packages/) + +#image file INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png") diff --git a/packaging/ui-viewmgr.spec b/packaging/ui-viewmgr.spec index 36980bb..64d1b80 100644 --- a/packaging/ui-viewmgr.spec +++ b/packaging/ui-viewmgr.spec @@ -1,6 +1,6 @@ Name: ui-viewmgr Summary: UI VIEW MANAGER library -Version: 0.1.1 +Version: 0.1.0 Release: 1 Group: System/Libraries License: Apache License, Version 2.0 @@ -15,18 +15,16 @@ BuildRequires: efl-extension-devel BuildRequires: cmake BuildRequires: edje-bin BuildRequires: gettext-tools -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig %description UI VIEW MANAGER library -%package example -Summary: UI VIEW MANAGER Example Application +%package ui.viewmgr.demo +Summary: UI VIEW MANAGER Demo Application Group: Development/Applications -%description example -UI VIEW MANAGER Example Application +%description ui.viewmgr.demo +UI VIEW MANAGER Demo Application %package devel Summary: UI VIEW MANAGER library (devel) @@ -51,21 +49,19 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/usr/share/license cp %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}/usr/share/license/%{name} -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - %files %defattr(-,root,root,-) %{_libdir}/libui-viewmgr.so.* -%manifest %{name}.manifest -%{_datadir}/ui-viewmgr/images/* +%manifest ui-viewmgr.manifest /usr/share/license/%{name} /usr/share/edje/ui-viewmgr/ui-viewmgr.edj -%files example +%files ui.viewmgr.demo %defattr(-,root,root,-) -/opt/usr/apps/ui-viewmgr/bin/* +%{_datadir}/packages/ui.viewmgr.demo.xml +%manifest ui.viewmgr.demo.manifest +/opt/usr/apps/ui.viewmgr.demo/bin/* +/opt/usr/apps/ui.viewmgr.demo/data/images/* %files devel %defattr(-,root,root,-) diff --git a/pc/ui-viewmgr.pc.in b/pc/ui-viewmgr.pc.in new file mode 100644 index 0000000..be51ae7 --- /dev/null +++ b/pc/ui-viewmgr.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +libdir=@LIBDIR@ +includedir=@INCDIR@ + +Name: UI View Manager +Description: Tizen UI View Manager library +Version: @VERSION@ +Requires: +Libs: -L${libdir} -lui-viewmgr +Cflags: -I${includedir}/ui-viewmgr diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d8f4b6..8596dc5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,6 @@ -SET(LIB_NAME ${PROJECT_NAME}) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/lib) ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(lib) ADD_SUBDIRECTORY(examples/efl) - diff --git a/src/examples/efl/CMakeLists.txt b/src/examples/efl/CMakeLists.txt index 91dca42..d287512 100644 --- a/src/examples/efl/CMakeLists.txt +++ b/src/examples/efl/CMakeLists.txt @@ -1,31 +1,20 @@ -SET(EXAM_NAME viewmgr_demo) -SET(EXAM_SRCS - ../../lib/efl/ui_base_view.cpp - ../../lib/efl/ui_base_viewmgr.cpp - ../../lib/efl/ui_base_key_listener.cpp - ../../lib/efl/mobile/ui_menu.cpp - ../../lib/efl/mobile/ui_popup.cpp - ../../lib/efl/mobile/ui_view.cpp - ../../lib/efl/mobile/ui_key_listener.cpp - ../../lib/efl/mobile/ui_viewmgr.cpp - main.cpp +SET(SRCS + main.cpp ) -ADD_EXECUTABLE(${EXAM_NAME} ${EXAM_SRCS}) +ADD_EXECUTABLE(${BINNAME} ${SRCS}) -PKG_CHECK_MODULES(EXAM_PKGS REQUIRED elementary efl-extension dlog capi-appfw-application capi-system-system-settings appcore-efl capi-appfw-app-manager) +ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"") -PKG_CHECK_MODULES(EXAM_PKGS REQUIRED elementary dlog efl-extension) +PKG_CHECK_MODULES(BIN_PKGS REQUIRED elementary dlog capi-appfw-application capi-system-system-settings appcore-efl capi-appfw-app-manager) -FOREACH(flag ${EXAM_PKGS_CFLAGS}) - SET(EXAM_CFLAGS "${EXAM_CFLAGS} ${flag}") +FOREACH(flag ${BIN_PKGS_CFLAGS}) + SET(PKG_CFLAGS "${PKG_CFLAGS} ${flag}") ENDFOREACH(flag) -SET_TARGET_PROPERTIES(${EXAM_NAME} PROPERTIES COMPILE_FLAGS "${EXAM_CFLAGS}") -TARGET_LINK_LIBRARIES(${EXAM_NAME} ${EXAM_PKGS_LDFLAGS} ${EXAM_TARGET_PKGS_LDFLAGS}) -TARGET_LINK_LIBRARIES(${EXAM_NAME} ${EXAM_PKGS_LDFLAGS} ${LIB_NAME}) +SET_TARGET_PROPERTIES(${BINNAME} PROPERTIES COMPILE_FLAGS "${PKG_CFLAGS}" LINK_FLAGS -pie) +TARGET_LINK_LIBRARIES(${BINNAME} ${BIN_PKGS_LDFLAGS} ${LIBNAME}) -SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS} -Wall -Werror -Wno-unused -Wno-format-extra-args -Wl,--no-undefined -fvisibility=hidden -fPIC -std=c++0x ${GC_SECTIONS_FLAGS}") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS}") -INSTALL(TARGETS ${EXAM_NAME} DESTINATION /opt/usr/apps/ui-viewmgr/bin) +INSTALL(TARGETS ${BINNAME} DESTINATION ${BINDIR}/bin) diff --git a/src/examples/efl/main.cpp b/src/examples/efl/main.cpp index d374167..ec6a6de 100644 --- a/src/examples/efl/main.cpp +++ b/src/examples/efl/main.cpp @@ -55,7 +55,7 @@ create_toolbar(Evas_Object *parent, const char *style) Evas_Object* create_landscape_content(Evas_Object *parent, const char *text, Evas_Smart_Cb prev_btn_clicked_cb, Evas_Smart_Cb next_btn_clicked_cb) { - char buf[128]; + char buf[PATH_MAX]; Elm_Grid *grid; Elm_Box *box; Elm_Layout *layout; @@ -83,7 +83,7 @@ create_landscape_content(Evas_Object *parent, const char *text, Evas_Smart_Cb pr /* Image */ image = elm_image_add(grid); - snprintf(buf, sizeof(buf), "/usr/share/ui-viewmgr/images/tizen.png"); + snprintf(buf, sizeof(buf), "%s/data/images/tizen.png", BINDIR); elm_image_file_set(image, buf, NULL); evas_object_show(image); elm_grid_pack(grid, image, 50, 0, 50, 85); @@ -179,27 +179,109 @@ create_content(Evas_Object *parent, const char *text, Evas_Smart_Cb prev_btn_cli return scroller; } -static void create_base_gui(appdata_s *ad) +static void create_base_gui(void) { create_page1(); UI_VIEWMGR->activate(); } -int -elm_main(int argc, char **argv) +static bool app_create(void *data) { - appdata_s *ad = {0,}; + /* Hook to take necessary actions before main event loop starts + Initialize UI resources and application's data + If this function returns true, the main loop of application starts + If this function returns false, the application is terminated */ - ad = static_cast(calloc(1, sizeof(appdata_s))); + elm_app_base_scale_set(2.6); + + /* Bind package locale file */ + bindtextdomain(PACKAGE, LOCALE_DIR); + textdomain(PACKAGE); //FIXME: Hide this creation. ui_viewmgr *viewmgr = new ui_viewmgr(PACKAGE); - create_base_gui(ad); + create_base_gui(); + + return true; +} + +static void app_control(app_control_h app_control, void *data) +{ + /* Handle the launch request. */ +} + +static void app_pause(void *data) +{ +} + +static void app_resume(void *data) +{ +} + +static void app_terminate(void *data) +{ +} + +static void ui_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LANGUAGE_CHANGED*/ + char *locale = NULL; + system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale); + elm_language_set(locale); + free(locale); + return; +} + +static void ui_app_orient_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/ + return; +} - elm_run(); - elm_shutdown(); - return 0; +static void ui_app_region_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_REGION_FORMAT_CHANGED*/ } -ELM_MAIN() +static void ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_BATTERY*/ +} + +static void ui_app_low_memory(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_MEMORY*/ +} + +int main(int argc, char *argv[]) +{ + appdata_s ad; + int ret = 0; + + ui_app_lifecycle_callback_s event_callback = { 0, }; + app_event_handler_h handlers[5] = { NULL, }; + + event_callback.create = app_create; + event_callback.terminate = app_terminate; + event_callback.pause = app_pause; + event_callback.resume = app_resume; + event_callback.app_control = app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, + ui_app_orient_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, + &ad); + ui_app_remove_event_handler(handlers[APP_EVENT_LOW_MEMORY]); + + ret = ui_app_main(argc, argv, &event_callback, &ad); + if (ret != APP_ERROR_NONE) + { + dlog_print(DLOG_ERROR, LOG_TAG, "app_main() is failed. err = %d", ret); + } + + return ret; +} diff --git a/src/examples/efl/main.h b/src/examples/efl/main.h index 321bc69..f216175 100644 --- a/src/examples/efl/main.h +++ b/src/examples/efl/main.h @@ -14,8 +14,8 @@ * limitations under the License. * */ -#include -//#include +#include +#include #include #include "ui_viewmanager.h" @@ -36,7 +36,6 @@ using namespace efl_viewmgr; typedef struct appdata { - ui_viewmgr *viewmgr; } appdata_s; Evas_Object *create_landscape_content(Evas_Object *parent, const char *text, Evas_Smart_Cb prev_btn_clicked_cb, Evas_Smart_Cb next_btn_clicked_cb); diff --git a/src/examples/efl/page11.h b/src/examples/efl/page11.h index 313d106..3cb7bb6 100644 --- a/src/examples/efl/page11.h +++ b/src/examples/efl/page11.h @@ -21,7 +21,6 @@ */ static void ctxpopup_item_select_cb(void *data, Evas_Object *obj, void *event_info) { - ui_view *view = static_cast(data); Elm_Object_Item *it = static_cast(event_info); elm_ctxpopup_dismiss(obj); LOGE("Item (%s) is selected", elm_object_item_text_get(it)); diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt index 98c230d..d45646b 100644 --- a/src/include/CMakeLists.txt +++ b/src/include/CMakeLists.txt @@ -1,5 +1,5 @@ INSTALL( - DIRECTORY ./ DESTINATION include/${LIB_NAME} + DIRECTORY ./ DESTINATION include/${LIBNAME} FILES_MATCHING PATTERN "interface/*.h" PATTERN "efl/*.h" diff --git a/src/include/interface/ui_iface_overlay.h b/src/include/interface/ui_iface_overlay.h index 5409408..234200c 100644 --- a/src/include/interface/ui_iface_overlay.h +++ b/src/include/interface/ui_iface_overlay.h @@ -60,7 +60,6 @@ ui_iface_overlay::~ui_iface_overlay() template bool ui_iface_overlay::set_content(T content) { - T prev = this->content; this->content = content; return true; } diff --git a/src/include/interface/ui_iface_view.h b/src/include/interface/ui_iface_view.h index 2cc26c8..3e3f18c 100644 --- a/src/include/interface/ui_iface_view.h +++ b/src/include/interface/ui_iface_view.h @@ -315,7 +315,6 @@ ui_iface_view::~ui_iface_view() template bool ui_iface_view::set_content(T content) { - T prev = this->content; this->content = content; return true; } diff --git a/src/include/interface/ui_iface_viewmgr.h b/src/include/interface/ui_iface_viewmgr.h index 13b0cda..eeaf453 100644 --- a/src/include/interface/ui_iface_viewmgr.h +++ b/src/include/interface/ui_iface_viewmgr.h @@ -328,8 +328,6 @@ bool ui_iface_viewmgr::insert_view_after(ui_iface_view *view, ui_iface_vie return false; } - ui_iface_view *bview; - if (this->view_list.size() > 0) { for (it = this->view_list.begin(); it != this->view_list.end(); it++) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 2efcc44..0580f9d 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(LIB_SRCS +SET(SRCS efl/ui_base_view.cpp efl/ui_base_viewmgr.cpp efl/ui_base_key_listener.cpp @@ -9,21 +9,19 @@ SET(LIB_SRCS efl/mobile/ui_viewmgr.cpp ) -ADD_LIBRARY(${LIB_NAME} SHARED ${LIB_SRCS}) - +ADD_LIBRARY(${LIBNAME} SHARED ${SRCS}) ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))") -PKG_CHECK_MODULES(LIB_PKGS REQUIRED elementary efl-extension dlog capi-appfw-application capi-system-system-settings appcore-efl capi-appfw-app-manager) +ADD_DEFINITIONS("-DEDJ_PATH=\"${EDJDIR}\"") + +PKG_CHECK_MODULES(LIB_PKGS REQUIRED elementary dlog capi-appfw-application capi-system-system-settings appcore-efl capi-appfw-app-manager) FOREACH(flag ${LIB_PKGS_CFLAGS}) SET(LIB_CFLAGS "${LIB_CFLAGS} ${flag}") ENDFOREACH(flag) -SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_FLAGS "${LIB_CFLAGS}") -SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${VERSION}) -SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR}) -TARGET_LINK_LIBRARIES(${LIB_NAME} ${LIB_PKGS_LDFLAGS} ${LIB_TARGET_PKGS_LDFLAGS}) +SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_FLAGS "${LIB_CFLAGS}" VERSION ${VERSION}) +TARGET_LINK_LIBRARIES(${LIBNAME} ${LIB_PKGS_LDFLAGS}) -SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS} -Wall -Werror -Wno-unused -Wno-format-extra-args -Wl,--no-undefined -fvisibility=hidden -fPIC -std=c++0x ${GC_SECTIONS_FLAGS}") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS}") -INSTALL(TARGETS ${LIB_NAME} DESTINATION lib) +INSTALL(TARGETS ${LIBNAME} DESTINATION lib) diff --git a/src/lib/efl/mobile/ui_view.cpp b/src/lib/efl/mobile/ui_view.cpp index bf75728..3937d52 100644 --- a/src/lib/efl/mobile/ui_view.cpp +++ b/src/lib/efl/mobile/ui_view.cpp @@ -16,9 +16,7 @@ */ #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" -#define GROUP "tizen_view/default" +#define DEFAULT_GROUP "tizen_view/default" using namespace efl_viewmgr; using namespace viewmgr; @@ -88,9 +86,12 @@ bool ui_view::create_layout() Elm_Layout *layout = elm_layout_add(this->get_parent()); LAYOUT_VALIDATE(); - if (!elm_layout_file_set(layout, EDJ_PATH, GROUP)) + char buf[PATH_MAX]; + snprintf(buf, sizeof(buf), "%s/ui-viewmgr.edj", EDJ_PATH); + + if (!elm_layout_file_set(layout, buf, DEFAULT_GROUP)) { - LOGE("Failed to set file = ui_view(%p), path(%s), group(%s)", this, EDJ_PATH, GROUP); + LOGE("Failed to set file = ui_view(%p), path(%s), group(%s)", this, buf, DEFAULT_GROUP); evas_object_del(layout); return false; } diff --git a/src/lib/efl/ui_base_viewmgr.cpp b/src/lib/efl/ui_base_viewmgr.cpp index ae256e2..20f65d5 100644 --- a/src/lib/efl/ui_base_viewmgr.cpp +++ b/src/lib/efl/ui_base_viewmgr.cpp @@ -19,19 +19,17 @@ 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_base_viewmgr::create_base_layout(Elm_Conformant *conform, const char *style) { - char buf[128]; + char edj_path[PATH_MAX]; + char group_name[128]; + Elm_Layout *layout = elm_layout_add(conform); if (!layout) return false; - //FIXME: Is it C programming style? need to change? - snprintf(buf, sizeof(buf), "transition/%s", style); - //default transition layout - elm_layout_file_set(layout, EDJ_PATH, buf); + snprintf(group_name, sizeof(group_name), "transition/%s", style); + snprintf(edj_path, sizeof(edj_path), "%s/ui-viewmgr.edj", EDJ_PATH); + elm_layout_file_set(layout, edj_path, group_name); elm_object_content_set(conform, layout); //Push Finished Event diff --git a/ui-viewmgr.manifest b/ui-viewmgr.manifest index 89040d2..97e8c31 100644 --- a/ui-viewmgr.manifest +++ b/ui-viewmgr.manifest @@ -1,24 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/ui-viewmgr.pc.in b/ui-viewmgr.pc.in deleted file mode 100644 index ccdc293..0000000 --- a/ui-viewmgr.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@PREFIX@ -exec_prefix=@EXEC_DIR@ -libdir=@LIBDIR@ -includedir=@INCDIR@ - -Name: UI VIEW MANAGER -Description: An UI VIEW MANAGER library -Version: @VERSION@ -Requires: -Libs: -L${libdir} -lui-viewmgr -Cflags: -I${includedir}/ui-viewmgr diff --git a/ui.viewmgr.demo.manifest b/ui.viewmgr.demo.manifest new file mode 100644 index 0000000..b0f19c7 --- /dev/null +++ b/ui.viewmgr.demo.manifest @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ui.viewmgr.demo.xml.in b/ui.viewmgr.demo.xml.in new file mode 100644 index 0000000..bb5d178 --- /dev/null +++ b/ui.viewmgr.demo.xml.in @@ -0,0 +1,10 @@ + + + + + + + http://tizen.org/privilege/appmanager.launch + http://tizen.org/privilege/appmanager.kill.bgapp + +