reconstruct folder hierarchy 50/61150/6
authorWoochan Lee <wc0917.lee@samsung.com>
Fri, 4 Mar 2016 07:59:37 +0000 (16:59 +0900)
committerHermet Park <chuneon.park@samsung.com>
Wed, 9 Mar 2016 10:01:30 +0000 (02:01 -0800)
Change-Id: I92a945960daa7d6b747b07ae0b2ac71cc58486e8

50 files changed:
CMakeLists.txt
data/edc/images/core_icon_badge_container.#.png [moved from res/images/core_icon_badge_container.#.png with 100% similarity]
data/edc/images/core_theme_bg_01.png [moved from res/images/core_theme_bg_01.png with 100% similarity]
data/edc/ui-viewmgr.edc [moved from res/ui-viewmgr.edc with 100% similarity]
data/org.tizen.ui-viewmgr.png [deleted file]
data/ui-viewmgr.uri [deleted file]
org.tizen.ui-viewmgr.manifest [deleted file]
org.tizen.ui-viewmgr.xml [deleted file]
packaging/ui-controls.spec [deleted file]
packaging/ui-viewmgr.spec [new file with mode: 0644]
src/CMakeLists.txt [new file with mode: 0644]
src/examples/efl/CMakeLists.txt [new file with mode: 0644]
src/examples/efl/main.cpp [moved from src/efl/example/main.cpp with 56% similarity]
src/examples/efl/main.h [moved from inc/main.h with 89% similarity]
src/examples/efl/page1.h [moved from src/efl/example/page1.h with 100% similarity]
src/examples/efl/page2.h [moved from src/efl/example/page2.h with 100% similarity]
src/examples/efl/page3.h [moved from src/efl/example/page3.h with 100% similarity]
src/examples/efl/page4.h [moved from src/efl/example/page4.h with 100% similarity]
src/examples/efl/page5.h [moved from src/efl/example/page5.h with 100% similarity]
src/examples/efl/page6.h [moved from src/efl/example/page6.h with 99% similarity]
src/include/CMakeLists.txt [new file with mode: 0644]
src/include/efl/mobile/ui_basic_controller.h [moved from src/efl/mobile/ui_basic_controller.h with 96% similarity]
src/include/efl/mobile/ui_basic_key_listener.h [moved from src/efl/mobile/ui_basic_key_listener.h with 96% similarity]
src/include/efl/mobile/ui_basic_view.h [moved from src/efl/mobile/ui_basic_view.h with 97% similarity]
src/include/efl/mobile/ui_basic_viewmgr.h [moved from src/efl/mobile/ui_basic_viewmgr.h with 96% similarity]
src/include/efl/mobile/ui_viewmanager_mobile.h [moved from src/efl/mobile/ui_viewmanager.h with 100% similarity]
src/include/efl/ui_controller.h [moved from src/efl/ui_controller.h with 100% similarity]
src/include/efl/ui_key_listener.h [moved from src/efl/ui_key_listener.h with 100% similarity]
src/include/efl/ui_view.h [moved from src/efl/ui_view.h with 100% similarity]
src/include/efl/ui_viewmanager_efl.h [moved from src/efl/ui_viewmanager.h with 100% similarity]
src/include/efl/ui_viewmgr.h [moved from src/efl/ui_viewmgr.h with 100% similarity]
src/include/interface/ui_iface_controller.h [moved from src/interface/ui_iface_controller.h with 100% similarity]
src/include/interface/ui_iface_view.h [moved from src/interface/ui_iface_view.h with 100% similarity]
src/include/interface/ui_iface_viewmgr.h [moved from src/interface/ui_iface_viewmgr.h with 100% similarity]
src/include/interface/ui_viewmanager_interface.h [moved from src/interface/ui_viewmanager_interface.h with 100% similarity]
src/include/ui_viewmanager.h [new file with mode: 0644]
src/lib/CMakeLists.txt [new file with mode: 0644]
src/lib/efl/mobile/ui_basic_controller.cpp [moved from src/efl/mobile/ui_basic_controller.cpp with 92% similarity]
src/lib/efl/mobile/ui_basic_key_listener.cpp [moved from src/efl/mobile/ui_basic_key_listener.cpp with 95% similarity]
src/lib/efl/mobile/ui_basic_view.cpp [moved from src/efl/mobile/ui_basic_view.cpp with 97% similarity]
src/lib/efl/mobile/ui_basic_viewmgr.cpp [moved from src/efl/mobile/ui_basic_viewmgr.cpp with 93% similarity]
src/lib/efl/ui_controller.cpp [moved from src/efl/ui_controller.cpp with 94% similarity]
src/lib/efl/ui_key_listener.cpp [moved from src/efl/ui_key_listener.cpp with 97% similarity]
src/lib/efl/ui_view.cpp [moved from src/efl/ui_view.cpp with 97% similarity]
src/lib/efl/ui_viewmgr.cpp [moved from src/efl/ui_viewmgr.cpp with 99% similarity]
src/lib/interface/ui_iface_controller.cpp [moved from src/interface/ui_iface_controller.cpp with 92% similarity]
src/lib/interface/ui_iface_view.cpp [moved from src/interface/ui_iface_view.cpp with 98% similarity]
src/lib/interface/ui_iface_viewmgr.cpp [moved from src/interface/ui_iface_viewmgr.cpp with 98% similarity]
ui-viewmgr.manifest [new file with mode: 0644]
ui-viewmgr.pc.in [new file with mode: 0644]

index f85c42d..561834a 100644 (file)
@@ -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})
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 (file)
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 (file)
index 737a89a..0000000
+++ /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 (file)
index d864c98..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<manifest>
-       <define>
-               <domain name="org.tizen.ui-viewmgr"/>
-               <request>
-                       <smack request="device::app_logging" type="rw"/>
-                       <smack request="device::sys_logging" type="rw"/>
-                       <smack request="pkgmgr::db" type="rl"/>
-                       <smack request="sdbd" type="rl"/>
-                       <smack request="tizen::vconf::setting::admin" type="rl"/>
-                       <smack request="system::homedir" type="rwx"/>
-                       <smack request="xorg" type="rw"/>
-                       <smack request="isf" type="rwx"/>
-                       <smack request="tizen::vconf::public::r" type="rwx" />
-                       <smack request="tizen::vconf::public::r::platform::rw" type="rwx" />
-                       <smack request="tizen::vconf::setting::admin" type="rwx" />
-                       <smack request="tizen::vconf::display" type="rwx" />
-               </request>
-       </define>
-       <request>
-               <domain name="org.tizen.ui-viewmgr"/>
-       </request>
-       <assign>
-               <filesystem path="/usr/share/icons/default/small/org.tizen.ui-viewmgr.png" label="_"/>
-               <filesystem path="/opt/usr/apps/org.tizen.ui-viewmgr/res/*" label="_"/>
-       </assign>
-</manifest>
diff --git a/org.tizen.ui-viewmgr.xml b/org.tizen.ui-viewmgr.xml
deleted file mode 100644 (file)
index 113efba..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ui-viewmgr" version="1.0.0" install-location="internal-only">
-   <ui-application appid="org.tizen.ui-viewmgr" exec="/opt/usr/apps/org.tizen.ui-viewmgr/bin/ui-viewmgr" nodisplay="false" multiple="false" type="capp" taskmanage="true">
-      <label>ui-viewmgr</label>
-      <icon>org.tizen.ui-viewmgr.png</icon>
-      <application-service>
-         <mime name="ui-viewmgr.uri" />
-      </application-service>
-   </ui-application>
-   <privileges>
-     <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
-     <privilege>http://tizen.org/privilege/appmanager.kill.bgapp</privilege>
-   </privileges>
-</manifest>
diff --git a/packaging/ui-controls.spec b/packaging/ui-controls.spec
deleted file mode 100644 (file)
index 8ac34ee..0000000
+++ /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 (file)
index 0000000..afd5d09
--- /dev/null
@@ -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 (file)
index 0000000..6d8f4b6
--- /dev/null
@@ -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 (file)
index 0000000..697066a
--- /dev/null
@@ -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)
similarity index 56%
rename from src/efl/example/main.cpp
rename to src/examples/efl/main.cpp
index fa8e761..e10e8c0 100644 (file)
@@ -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<appdata_s *>(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;
-}
similarity index 89%
rename from inc/main.h
rename to src/examples/efl/main.h
index 0dbbc4f..f508a1a 100644 (file)
  *  limitations under the License.
  *
  */
-#include <app.h>
-#include <system_settings.h>
+#include <Elementary.h>
+//#include <system_settings.h>
 #include <dlog.h>
-#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;
similarity index 99%
rename from src/efl/example/page6.h
rename to src/examples/efl/page6.h
index 36ccca8..9fad923 100644 (file)
@@ -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 (file)
index 0000000..98c230d
--- /dev/null
@@ -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"
+        )
+
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 (file)
@@ -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
 {
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 (file)
@@ -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
 {
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 (file)
@@ -17,7 +17,7 @@
 #ifndef UI_BASIC_VIEW
 #define UI_BASIC_VIEW
 
-#include "../ui_viewmanager.h"
+#include "../ui_viewmanager_efl.h"
 
 namespace efl_viewmgr
 {
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 (file)
@@ -18,7 +18,7 @@
 #define UI_BASIC_VIEWMGR_H
 
 #include <Elementary.h>
-#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();
 
 };
similarity index 100%
rename from src/efl/ui_view.h
rename to src/include/efl/ui_view.h
diff --git a/src/include/ui_viewmanager.h b/src/include/ui_viewmanager.h
new file mode 100644 (file)
index 0000000..294e2c2
--- /dev/null
@@ -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 (file)
index 0000000..87857f5
--- /dev/null
@@ -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)
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 (file)
@@ -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;
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 (file)
@@ -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;
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 (file)
  *  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"
 
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 (file)
@@ -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;
similarity index 94%
rename from src/efl/ui_controller.cpp
rename to src/lib/efl/ui_controller.cpp
index 1b06cc0..cec9351 100644 (file)
@@ -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;
similarity index 97%
rename from src/efl/ui_key_listener.cpp
rename to src/lib/efl/ui_key_listener.cpp
index 6a6144c..54aec46 100644 (file)
@@ -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;
similarity index 97%
rename from src/efl/ui_view.cpp
rename to src/lib/efl/ui_view.cpp
index ffc8422..dfa66f4 100644 (file)
@@ -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;
similarity index 99%
rename from src/efl/ui_viewmgr.cpp
rename to src/lib/efl/ui_viewmgr.cpp
index 6fe416d..b21172b 100644 (file)
@@ -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;
similarity index 92%
rename from src/interface/ui_iface_controller.cpp
rename to src/lib/interface/ui_iface_controller.cpp
index 854231f..e86b333 100644 (file)
@@ -14,7 +14,7 @@
  *  limitations under the License.
  *
  */
-#include "ui_viewmanager_interface.h"
+#include "../../include/interface/ui_viewmanager_interface.h"
 
 using namespace viewmgr;
 
similarity index 98%
rename from src/interface/ui_iface_view.cpp
rename to src/lib/interface/ui_iface_view.cpp
index 9a2968e..8348563 100644 (file)
@@ -14,7 +14,7 @@
  *  limitations under the License.
  *
  */
-#include "ui_viewmanager_interface.h"
+#include "../../include/interface/ui_viewmanager_interface.h"
 
 using namespace viewmgr;
 
similarity index 98%
rename from src/interface/ui_iface_viewmgr.cpp
rename to src/lib/interface/ui_iface_viewmgr.cpp
index f7b8ba6..d2cb2b0 100644 (file)
@@ -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 (file)
index 0000000..89040d2
--- /dev/null
@@ -0,0 +1,24 @@
+<manifest>
+    <define>
+               <domain name="ui-viewmgr"/>
+               <request>
+                   <smack request="xorg" type="wx"/>
+                       <smack request="system::homedir" type="rwx"/>
+                       <smack request="isf" type="rx"/>
+                       <smack request="tizen::vconf::public::r::platform::rw" type="rl"/>
+                       <smack request="tizen::vconf::setting" type="rl"/>
+                       <smack request="device::sys_logging" type="rw"/>
+                       <smack request="tizen::vconf::camcorder" type="rl"/>
+                       <smack request="tizen::vconf::setting::admin" type="rl"/>
+                       <smack request="device::app_logging" type="rwx"/>
+                       <smack request="pulseaudio" type="w"/>
+                       <smack request="sdbd" type="rw"/>
+                       <smack request="dbus" type="w"/>
+                       <smack request="pkgmgr::db" type="rwl"/>
+               </request>
+               <permit>
+                   <smack permit="xorg" type="rwx"/>
+                   <smack permit="_" type="rw"/>
+               </permit>
+       </define>
+</manifest>
diff --git a/ui-viewmgr.pc.in b/ui-viewmgr.pc.in
new file mode 100644 (file)
index 0000000..ccdc293
--- /dev/null
@@ -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