From: Woochan Lee Date: Fri, 4 Mar 2016 07:59:37 +0000 (+0900) Subject: reconstruct folder hierarchy X-Git-Tag: submit/tizen/20160617.075742~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ecbddadcd96bc9d59a69eefcb91c8d3f12127be;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git reconstruct folder hierarchy Change-Id: I92a945960daa7d6b747b07ae0b2ac71cc58486e8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f85c42d..561834a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,76 +1,50 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ui-viewmgr) -SET(PACKAGE org.tizen.ui-viewmgr) -SET(SRCS - src/interface/ui_iface_controller.cpp - src/interface/ui_iface_view.cpp - src/interface/ui_iface_viewmgr.cpp - src/efl/ui_controller.cpp - src/efl/ui_view.cpp - src/efl/ui_viewmgr.cpp - src/efl/ui_key_listener.cpp - src/efl/mobile/ui_basic_controller.cpp - src/efl/mobile/ui_basic_view.cpp - src/efl/mobile/ui_basic_key_listener.cpp - src/efl/mobile/ui_basic_viewmgr.cpp - src/efl/example/main.cpp - ) - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc) +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(EXEC_DIR ${PREFIX}) +SET(BINDIR ${PREFIX}/bin) +SET(LIBDIR ${PREFIX}/lib) +SET(INCDIR ${PREFIX}/include) +SET(VERSION_MAJOR 0) +SET(VERSION ${VERSION_MAJOR}.1.0) +SET(VENDOR "samsung") +SET(PACKAGE ${PROJECT_NAME}) + +SET(CMAKE_SKIP_BUILD_RPATH TRUE) + +IF("${CMAKE_BUILD_TYPE}" STREQUAL "") + SET(CMAKE_BUILD_TYPE "Release") +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") -FIND_LIBRARY(LIB_M m) -#FIXME: pthread is added for preventing build error -SET(PKG_LDFLAGS "-pthread ${LIB_M} -pie") -SET(PKG_CFLAGS "-g -Wall -fPIE") +SET(EDJ_PATH "${RESDIR}/edje") INCLUDE(FindPkgConfig) -pkg_check_modules(BASE_PKG REQUIRED elementary efl-extension) -FOREACH(flag ${BASE_PKG_CFLAGS}) - SET(PKG_CFLAGS "${PKG_CFLAGS} ${flag}") -ENDFOREACH(flag) -FOREACH(flag ${BASE_PKG_LDFLAGS}) - SET(PKG_LDFLAGS "${PKG_LDFLAGS} ${flag}") -ENDFOREACH(flag) - -pkg_check_modules(TIZEN_PKG REQUIRED dlog capi-appfw-application capi-system-system-settings appcore-efl capi-appfw-app-manager) -FOREACH(flag ${TIZEN_PKG_CFLAGS}) - SET(PKG_CFLAGS "${PKG_CFLAGS} ${flag}") -ENDFOREACH(flag) -FOREACH(flag ${TIZEN_PKG_LDFLAGS}) - SET(PKG_LDFLAGS "${PKG_LDFLAGS} ${flag}") -ENDFOREACH(flag) -SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PKG_CFLAGS}") -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}") +ADD_SUBDIRECTORY(src) -# install desktop file & icon -SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -SET(BINDIR "${PREFIX}/bin") -SET(RESDIR "${PREFIX}/res") -SET(DATADIR "${PREFIX}/data") -SET(LOCALEDIR "${RESDIR}/locale") -SET(IMGDIR "${RESDIR}/images") - -ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") -ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") -ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") -ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"") -ADD_DEFINITIONS("-DLOCALE_DIR=\"${LOCALEDIR}\"") +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_EXECUTABLE(${PROJECT_NAME} ${SRCS}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKG_LDFLAGS}) +CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig) ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj - COMMAND edje_cc -no-save -id ${CMAKE_CURRENT_SOURCE_DIR}/res - ${CMAKE_SOURCE_DIR}/res/${PROJECT_NAME}.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj - DEPENDS ${CMAKE_SOURCE_DIR}/res/${PROJECT_NAME}.edc - ) + 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 + ) ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj) - -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) -# for workaround taskmanager behaviour -INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PACKAGE}.png DESTINATION /usr/share/icons/default/small/) -INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${RESDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE}.xml DESTINATION /usr/share/packages/) +INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION /usr/share/edje/${PROJECT_NAME}) diff --git a/res/images/core_icon_badge_container.#.png b/data/edc/images/core_icon_badge_container.#.png similarity index 100% rename from res/images/core_icon_badge_container.#.png rename to data/edc/images/core_icon_badge_container.#.png diff --git a/res/images/core_theme_bg_01.png b/data/edc/images/core_theme_bg_01.png similarity index 100% rename from res/images/core_theme_bg_01.png rename to data/edc/images/core_theme_bg_01.png diff --git a/res/ui-viewmgr.edc b/data/edc/ui-viewmgr.edc similarity index 100% rename from res/ui-viewmgr.edc rename to data/edc/ui-viewmgr.edc diff --git a/data/org.tizen.ui-viewmgr.png b/data/org.tizen.ui-viewmgr.png deleted file mode 100644 index 9765b1b..0000000 Binary files a/data/org.tizen.ui-viewmgr.png and /dev/null differ diff --git a/data/ui-viewmgr.uri b/data/ui-viewmgr.uri deleted file mode 100644 index 737a89a..0000000 --- a/data/ui-viewmgr.uri +++ /dev/null @@ -1,2 +0,0 @@ -(^( )*ui-viewmgr:).* -ui viewmgr Shortcut Internal diff --git a/org.tizen.ui-viewmgr.manifest b/org.tizen.ui-viewmgr.manifest deleted file mode 100644 index d864c98..0000000 --- a/org.tizen.ui-viewmgr.manifest +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.tizen.ui-viewmgr.xml b/org.tizen.ui-viewmgr.xml deleted file mode 100644 index 113efba..0000000 --- a/org.tizen.ui-viewmgr.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - org.tizen.ui-viewmgr.png - - - - - - http://tizen.org/privilege/appmanager.launch - http://tizen.org/privilege/appmanager.kill.bgapp - - diff --git a/packaging/ui-controls.spec b/packaging/ui-controls.spec deleted file mode 100644 index 8ac34ee..0000000 --- a/packaging/ui-controls.spec +++ /dev/null @@ -1,47 +0,0 @@ -Name: org.tizen.ui-viewmgr -Summary: UI Viewmgr (Elementary) -Version: 1.0.3 -Release: 1 -Group: TO_BE/FILLED_IN -License: Apache License, Version 2.0 -Source0: %{name}-%{version}.tar.gz -BuildRequires: pkgconfig(elementary) -BuildRequires: pkgconfig(capi-appfw-application) -BuildRequires: pkgconfig(capi-system-system-settings) -BuildRequires: pkgconfig(capi-appfw-app-manager) -BuildRequires: pkgconfig(dlog) -BuildRequires: app-core-efl-devel -BuildRequires: efl-extension-devel -BuildRequires: cmake -BuildRequires: edje-bin -BuildRequires: gettext-tools - -%description -UI Viewmgr (Elementary) - -%prep -%setup -q - -%define prefix "/opt/usr/apps/org.tizen.ui-viewmgr" - -%build -rm -rf CMakeFiles CMakeCache.txt && cmake . -DCMAKE_INSTALL_PREFIX=%{prefix} -make %{?jobs:-j%jobs} - -%install -%make_install - -mkdir -p %{buildroot}/%{_datadir}/packages/ -cp %{_builddir}/%{buildsubdir}/org.tizen.ui-viewmgr.xml %{buildroot}/%{_datadir}/packages/org.tizen.ui-viewmgr.xml - -mkdir -p %{buildroot}/%{_datadir}/license -cp %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}/%{_datadir}/license/%{name} - -%files -%defattr(-,root,root,-) -/opt/usr/apps/org.tizen.ui-viewmgr/bin/* -/opt/usr/apps/org.tizen.ui-viewmgr/res/* -%{_datadir}/packages/org.tizen.ui-viewmgr.xml -%{_datadir}/icons/default/small/org.tizen.ui-viewmgr.png -%{_datadir}/license/%{name} -%manifest %{name}.manifest diff --git a/packaging/ui-viewmgr.spec b/packaging/ui-viewmgr.spec new file mode 100644 index 0000000..afd5d09 --- /dev/null +++ b/packaging/ui-viewmgr.spec @@ -0,0 +1,76 @@ +Name: ui-viewmgr +Summary: UI VIEW MANAGER library +Version: 0.1.1 +Release: 1 +Group: System/Libraries +License: Apache License, Version 2.0 +Source0: %{name}-%{version}.tar.gz +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-system-system-settings) +BuildRequires: pkgconfig(capi-appfw-app-manager) +BuildRequires: pkgconfig(dlog) +BuildRequires: app-core-efl-devel +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 +Group: Development/Applications + +%description example +UI VIEW MANAGER Example Application + +%package devel +Summary: UI VIEW MANAGER library (devel) +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: capi-base-common-devel + +%description devel +UI VIEW MANAGER library providing View management functionality(devel) + +%prep +%setup -q + +%build +cmake . -DCMAKE_INSTALL_PREFIX=/usr +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +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 +/usr/share/license/%{name} +/usr/share/edje/ui-viewmgr/ui-viewmgr.edj + +%files example +%defattr(-,root,root,-) +/opt/usr/apps/ui-viewmgr/bin/* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/ui-viewmgr/interface/*.h +%{_includedir}/ui-viewmgr/efl/*.h +%{_includedir}/ui-viewmgr/efl/mobile/*.h +%{_includedir}/ui-viewmgr/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/ui-viewmgr.pc diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..6d8f4b6 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,9 @@ +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 new file mode 100644 index 0000000..697066a --- /dev/null +++ b/src/examples/efl/CMakeLists.txt @@ -0,0 +1,34 @@ +SET(EXAM_NAME viewmgr_demo) +SET(EXAM_SRCS + ../../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 + main.cpp + ) + +ADD_EXECUTABLE(${EXAM_NAME} ${EXAM_SRCS}) + +PKG_CHECK_MODULES(EXAM_PKGS REQUIRED elementary efl-extension dlog capi-appfw-application capi-system-system-settings appcore-efl capi-appfw-app-manager) + +PKG_CHECK_MODULES(EXAM_PKGS REQUIRED elementary dlog efl-extension) + +FOREACH(flag ${EXAM_PKGS_CFLAGS}) + SET(EXAM_CFLAGS "${EXAM_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(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}") + +INSTALL(TARGETS ${EXAM_NAME} DESTINATION /opt/usr/apps/ui-viewmgr/bin) diff --git a/src/efl/example/main.cpp b/src/examples/efl/main.cpp similarity index 56% rename from src/efl/example/main.cpp rename to src/examples/efl/main.cpp index fa8e761..e10e8c0 100644 --- a/src/efl/example/main.cpp +++ b/src/examples/efl/main.cpp @@ -22,7 +22,6 @@ #include "page2.h" #include "page1.h" - Evas_Object* create_toolbar(Evas_Object *parent) { @@ -108,103 +107,17 @@ static void create_base_gui(appdata_s *ad) ad->viewmgr->activate(); } -static bool app_create(void *data) +int +elm_main(int argc, char **argv) { - /* 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 */ - appdata_s *ad = (appdata_s *) data; - - elm_app_base_scale_set(2.6); - - /* Bind package locale file */ - bindtextdomain(PACKAGE, LOCALE_DIR); - textdomain(PACKAGE); + appdata_s *ad = {0,}; + ad = static_cast(calloc(1, sizeof(appdata_s))); create_base_gui(ad); - 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) -{ - appdata_s *ad = (appdata_s *) data; - ad->viewmgr->activate(); -} - -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; -} - -static void ui_app_region_changed(app_event_info_h event_info, void *user_data) -{ - /*APP_EVENT_REGION_FORMAT_CHANGED*/ + elm_run(); + elm_shutdown(); + return 0; } +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 = { 0, }; - 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/inc/main.h b/src/examples/efl/main.h similarity index 89% rename from inc/main.h rename to src/examples/efl/main.h index 0dbbc4f..f508a1a 100644 --- a/inc/main.h +++ b/src/examples/efl/main.h @@ -14,10 +14,10 @@ * limitations under the License. * */ -#include -#include +#include +//#include #include -#include "../src/efl/mobile/ui_viewmanager.h" +#include "ui_viewmanager.h" //uncomment if you want debug #ifndef TIZEN_ENGINEER_MODE @@ -30,7 +30,7 @@ #define LOG_TAG "UI_VIEWMGR" #if !defined(PACKAGE) -#define PACKAGE "org.tizen.ui-viewmgr" +#define PACKAGE "ui-viewmgr" #endif using namespace efl_viewmgr; diff --git a/src/efl/example/page1.h b/src/examples/efl/page1.h similarity index 100% rename from src/efl/example/page1.h rename to src/examples/efl/page1.h diff --git a/src/efl/example/page2.h b/src/examples/efl/page2.h similarity index 100% rename from src/efl/example/page2.h rename to src/examples/efl/page2.h diff --git a/src/efl/example/page3.h b/src/examples/efl/page3.h similarity index 100% rename from src/efl/example/page3.h rename to src/examples/efl/page3.h diff --git a/src/efl/example/page4.h b/src/examples/efl/page4.h similarity index 100% rename from src/efl/example/page4.h rename to src/examples/efl/page4.h diff --git a/src/efl/example/page5.h b/src/examples/efl/page5.h similarity index 100% rename from src/efl/example/page5.h rename to src/examples/efl/page5.h diff --git a/src/efl/example/page6.h b/src/examples/efl/page6.h similarity index 99% rename from src/efl/example/page6.h rename to src/examples/efl/page6.h index 36ccca8..9fad923 100644 --- a/src/efl/example/page6.h +++ b/src/examples/efl/page6.h @@ -21,7 +21,7 @@ private: public: page6(appdata_s *ad) - : ad(ad) + : ad(ad) { /* ui_basic_view(controller, identity name, style name of view). Later, you could get the identity name using view->get_name(); diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt new file mode 100644 index 0000000..98c230d --- /dev/null +++ b/src/include/CMakeLists.txt @@ -0,0 +1,9 @@ +INSTALL( + DIRECTORY ./ DESTINATION include/${LIB_NAME} + FILES_MATCHING + PATTERN "interface/*.h" + PATTERN "efl/*.h" + PATTERN "efl/mobile/*.h" + PATTERN "ui_viewmanager.h" + ) + diff --git a/src/efl/mobile/ui_basic_controller.h b/src/include/efl/mobile/ui_basic_controller.h similarity index 96% rename from src/efl/mobile/ui_basic_controller.h rename to src/include/efl/mobile/ui_basic_controller.h index a980e95..7a1aafd 100644 --- a/src/efl/mobile/ui_basic_controller.h +++ b/src/include/efl/mobile/ui_basic_controller.h @@ -17,7 +17,7 @@ #ifndef UI_BASIC_CONTROLLER_H #define UI_BASIC_CONTROLLER_H -#include "../ui_viewmanager.h" +#include "../ui_viewmanager_efl.h" namespace efl_viewmgr { diff --git a/src/efl/mobile/ui_basic_key_listener.h b/src/include/efl/mobile/ui_basic_key_listener.h similarity index 96% rename from src/efl/mobile/ui_basic_key_listener.h rename to src/include/efl/mobile/ui_basic_key_listener.h index 2563d55..8291ca2 100644 --- a/src/efl/mobile/ui_basic_key_listener.h +++ b/src/include/efl/mobile/ui_basic_key_listener.h @@ -17,7 +17,7 @@ #ifndef MOBILE_KEY_HANDLER_H #define MOBILE_KEY_HANDLER_H -#include "../ui_viewmanager.h" +#include "../ui_viewmanager_efl.h" namespace efl_viewmgr { diff --git a/src/efl/mobile/ui_basic_view.h b/src/include/efl/mobile/ui_basic_view.h similarity index 97% rename from src/efl/mobile/ui_basic_view.h rename to src/include/efl/mobile/ui_basic_view.h index 64fffa6..e6bda73 100644 --- a/src/efl/mobile/ui_basic_view.h +++ b/src/include/efl/mobile/ui_basic_view.h @@ -17,7 +17,7 @@ #ifndef UI_BASIC_VIEW #define UI_BASIC_VIEW -#include "../ui_viewmanager.h" +#include "../ui_viewmanager_efl.h" namespace efl_viewmgr { diff --git a/src/efl/mobile/ui_basic_viewmgr.h b/src/include/efl/mobile/ui_basic_viewmgr.h similarity index 96% rename from src/efl/mobile/ui_basic_viewmgr.h rename to src/include/efl/mobile/ui_basic_viewmgr.h index f0aa8d1..8a0ba89 100644 --- a/src/efl/mobile/ui_basic_viewmgr.h +++ b/src/include/efl/mobile/ui_basic_viewmgr.h @@ -18,7 +18,7 @@ #define UI_BASIC_VIEWMGR_H #include -#include "../ui_viewmanager.h" +#include "../ui_viewmanager_efl.h" namespace efl_viewmgr { @@ -31,6 +31,7 @@ class ui_basic_viewmgr: public ui_viewmgr public: ui_basic_viewmgr(const char *pkg); + virtual ~ui_basic_viewmgr(); }; diff --git a/src/efl/mobile/ui_viewmanager.h b/src/include/efl/mobile/ui_viewmanager_mobile.h similarity index 100% rename from src/efl/mobile/ui_viewmanager.h rename to src/include/efl/mobile/ui_viewmanager_mobile.h diff --git a/src/efl/ui_controller.h b/src/include/efl/ui_controller.h similarity index 100% rename from src/efl/ui_controller.h rename to src/include/efl/ui_controller.h diff --git a/src/efl/ui_key_listener.h b/src/include/efl/ui_key_listener.h similarity index 100% rename from src/efl/ui_key_listener.h rename to src/include/efl/ui_key_listener.h diff --git a/src/efl/ui_view.h b/src/include/efl/ui_view.h similarity index 100% rename from src/efl/ui_view.h rename to src/include/efl/ui_view.h diff --git a/src/efl/ui_viewmanager.h b/src/include/efl/ui_viewmanager_efl.h similarity index 100% rename from src/efl/ui_viewmanager.h rename to src/include/efl/ui_viewmanager_efl.h diff --git a/src/efl/ui_viewmgr.h b/src/include/efl/ui_viewmgr.h similarity index 100% rename from src/efl/ui_viewmgr.h rename to src/include/efl/ui_viewmgr.h diff --git a/src/interface/ui_iface_controller.h b/src/include/interface/ui_iface_controller.h similarity index 100% rename from src/interface/ui_iface_controller.h rename to src/include/interface/ui_iface_controller.h diff --git a/src/interface/ui_iface_view.h b/src/include/interface/ui_iface_view.h similarity index 100% rename from src/interface/ui_iface_view.h rename to src/include/interface/ui_iface_view.h diff --git a/src/interface/ui_iface_viewmgr.h b/src/include/interface/ui_iface_viewmgr.h similarity index 100% rename from src/interface/ui_iface_viewmgr.h rename to src/include/interface/ui_iface_viewmgr.h diff --git a/src/interface/ui_viewmanager_interface.h b/src/include/interface/ui_viewmanager_interface.h similarity index 100% rename from src/interface/ui_viewmanager_interface.h rename to src/include/interface/ui_viewmanager_interface.h diff --git a/src/include/ui_viewmanager.h b/src/include/ui_viewmanager.h new file mode 100644 index 0000000..294e2c2 --- /dev/null +++ b/src/include/ui_viewmanager.h @@ -0,0 +1 @@ +#include "efl/mobile/ui_viewmanager_mobile.h" diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt new file mode 100644 index 0000000..87857f5 --- /dev/null +++ b/src/lib/CMakeLists.txt @@ -0,0 +1,32 @@ +SET(LIB_SRCS + 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 + ) + +ADD_LIBRARY(${LIB_NAME} SHARED ${LIB_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) + +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(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}") + +INSTALL(TARGETS ${LIB_NAME} DESTINATION lib) diff --git a/src/efl/mobile/ui_basic_controller.cpp b/src/lib/efl/mobile/ui_basic_controller.cpp similarity index 92% rename from src/efl/mobile/ui_basic_controller.cpp rename to src/lib/efl/mobile/ui_basic_controller.cpp index 9f53896..dc7654a 100644 --- a/src/efl/mobile/ui_basic_controller.cpp +++ b/src/lib/efl/mobile/ui_basic_controller.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../../include/efl/mobile/ui_viewmanager_mobile.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/efl/mobile/ui_basic_key_listener.cpp b/src/lib/efl/mobile/ui_basic_key_listener.cpp similarity index 95% rename from src/efl/mobile/ui_basic_key_listener.cpp rename to src/lib/efl/mobile/ui_basic_key_listener.cpp index cff8b70..b077dab 100644 --- a/src/efl/mobile/ui_basic_key_listener.cpp +++ b/src/lib/efl/mobile/ui_basic_key_listener.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../../include/efl/mobile/ui_viewmanager_mobile.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/efl/mobile/ui_basic_view.cpp b/src/lib/efl/mobile/ui_basic_view.cpp similarity index 97% rename from src/efl/mobile/ui_basic_view.cpp rename to src/lib/efl/mobile/ui_basic_view.cpp index ccc7de7..ef15fee 100644 --- a/src/efl/mobile/ui_basic_view.cpp +++ b/src/lib/efl/mobile/ui_basic_view.cpp @@ -14,10 +14,11 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../../include/efl/mobile/ui_viewmanager_mobile.h" //FIXME: is it correct to define here? -#define EDJ_PATH "/opt/usr/apps/org.tizen.ui-viewmgr/res/ui-viewmgr.edj" +//#define EDJ_PATH "/opt/usr/apps/org.tizen.ui-viewmgr/res/ui-viewmgr.edj" +#define EDJ_PATH "/usr/share/edje/ui-viewmgr/ui-viewmgr.edj" #define GROUP "elm/layout/tizen_view/default" #define TOOLBAR "elm/layout/tizen_view/toolbar" diff --git a/src/efl/mobile/ui_basic_viewmgr.cpp b/src/lib/efl/mobile/ui_basic_viewmgr.cpp similarity index 93% rename from src/efl/mobile/ui_basic_viewmgr.cpp rename to src/lib/efl/mobile/ui_basic_viewmgr.cpp index a2fc32c..7db39f0 100644 --- a/src/efl/mobile/ui_basic_viewmgr.cpp +++ b/src/lib/efl/mobile/ui_basic_viewmgr.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../../include/efl/mobile/ui_viewmanager_mobile.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/efl/ui_controller.cpp b/src/lib/efl/ui_controller.cpp similarity index 94% rename from src/efl/ui_controller.cpp rename to src/lib/efl/ui_controller.cpp index 1b06cc0..cec9351 100644 --- a/src/efl/ui_controller.cpp +++ b/src/lib/efl/ui_controller.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../include/efl/ui_viewmanager_efl.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/efl/ui_key_listener.cpp b/src/lib/efl/ui_key_listener.cpp similarity index 97% rename from src/efl/ui_key_listener.cpp rename to src/lib/efl/ui_key_listener.cpp index 6a6144c..54aec46 100644 --- a/src/efl/ui_key_listener.cpp +++ b/src/lib/efl/ui_key_listener.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../include/efl/ui_viewmanager_efl.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/efl/ui_view.cpp b/src/lib/efl/ui_view.cpp similarity index 97% rename from src/efl/ui_view.cpp rename to src/lib/efl/ui_view.cpp index ffc8422..dfa66f4 100644 --- a/src/efl/ui_view.cpp +++ b/src/lib/efl/ui_view.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../include/efl/ui_viewmanager_efl.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/efl/ui_viewmgr.cpp b/src/lib/efl/ui_viewmgr.cpp similarity index 99% rename from src/efl/ui_viewmgr.cpp rename to src/lib/efl/ui_viewmgr.cpp index 6fe416d..b21172b 100644 --- a/src/efl/ui_viewmgr.cpp +++ b/src/lib/efl/ui_viewmgr.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager.h" +#include "../../include/efl/ui_viewmanager_efl.h" using namespace efl_viewmgr; using namespace viewmgr; diff --git a/src/interface/ui_iface_controller.cpp b/src/lib/interface/ui_iface_controller.cpp similarity index 92% rename from src/interface/ui_iface_controller.cpp rename to src/lib/interface/ui_iface_controller.cpp index 854231f..e86b333 100644 --- a/src/interface/ui_iface_controller.cpp +++ b/src/lib/interface/ui_iface_controller.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager_interface.h" +#include "../../include/interface/ui_viewmanager_interface.h" using namespace viewmgr; diff --git a/src/interface/ui_iface_view.cpp b/src/lib/interface/ui_iface_view.cpp similarity index 98% rename from src/interface/ui_iface_view.cpp rename to src/lib/interface/ui_iface_view.cpp index 9a2968e..8348563 100644 --- a/src/interface/ui_iface_view.cpp +++ b/src/lib/interface/ui_iface_view.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager_interface.h" +#include "../../include/interface/ui_viewmanager_interface.h" using namespace viewmgr; diff --git a/src/interface/ui_iface_viewmgr.cpp b/src/lib/interface/ui_iface_viewmgr.cpp similarity index 98% rename from src/interface/ui_iface_viewmgr.cpp rename to src/lib/interface/ui_iface_viewmgr.cpp index f7b8ba6..d2cb2b0 100644 --- a/src/interface/ui_iface_viewmgr.cpp +++ b/src/lib/interface/ui_iface_viewmgr.cpp @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "ui_viewmanager_interface.h" +#include "../../include/interface/ui_viewmanager_interface.h" using namespace viewmgr; diff --git a/ui-viewmgr.manifest b/ui-viewmgr.manifest new file mode 100644 index 0000000..89040d2 --- /dev/null +++ b/ui-viewmgr.manifest @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui-viewmgr.pc.in b/ui-viewmgr.pc.in new file mode 100644 index 0000000..ccdc293 --- /dev/null +++ b/ui-viewmgr.pc.in @@ -0,0 +1,11 @@ +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