diff options
author | YoungHun Cho <hoon.cho@samsung.com> | 2017-01-02 11:22:45 +0900 |
---|---|---|
committer | YoungHun Cho <hoon.cho@samsung.com> | 2017-01-02 11:22:45 +0900 |
commit | 62a62ce51d7250d8459957d481713bd2df505e8c (patch) | |
tree | 491c4e855454d950aea3c763443ed52a2411f80f | |
parent | e9da500001fba0a0e4226702a9326a4ec9914d54 (diff) | |
download | w3-home-refactor.tar.gz w3-home-refactor.tar.bz2 w3-home-refactor.zip |
tmp backuprefactor
Change-Id: I3f9349443c08de197b1ed56cf36275e3e60982ac
Signed-off-by: YoungHun Cho <hoon.cho@samsung.com>
59 files changed, 2773 insertions, 13 deletions
@@ -22,22 +22,29 @@ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1355751470" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/> <builder autoBuildTarget="all" buildPath="${workspace_loc:/w-home}/Debug" enableAutoBuild="true" id="org.tizen.nativecore.target.sbi.gnu.builder.2139296544" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/> <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.1185153126" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/> - <tool id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.313160840" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler"> + <tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.313160840" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler"> <option id="gnu.cpp.compiler.option.optimization.level.714871784" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option defaultValue="gnu.cpp.compiler.debugging.level.max" id="sbi.gnu.cpp.compiler.option.debugging.level.core.298373187" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" valueType="enumerated"/> <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.1154239338" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/> <option id="sbi.gnu.cpp.compiler.option.1289811232" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs"> - <listOptionValue builtIn="false" value="wearable-3.0-emulator.core.private_llvm36.i386.core.app"/> + <listOptionValue builtIn="false" value="wearable-3.0-emulator.core.private_gcc49.i386.core.app"/> </option> <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.609084465" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath"> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-watch""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> @@ -104,11 +111,15 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony-client""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ug-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vconf""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> </option> @@ -126,22 +137,29 @@ </option> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1054126879" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> </tool> - <tool command="clang" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.2055553720" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler"> + <tool command="i386-linux-gnueabi-gcc" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.2055553720" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler"> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.638378502" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.debugging.level.max" id="sbi.gnu.c.compiler.option.debugging.level.core.2112202005" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" valueType="enumerated"/> <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.1599290658" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/> <option id="sbi.gnu.c.compiler.option.1472463663" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs"> - <listOptionValue builtIn="false" value="wearable-3.0-emulator.core.private_llvm36.i386.core.app"/> + <listOptionValue builtIn="false" value="wearable-3.0-emulator.core.private_gcc49.i386.core.app"/> </option> <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1632273778" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath"> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-watch""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> @@ -208,11 +226,15 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony-client""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ug-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vconf""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> </option> @@ -231,14 +253,13 @@ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.760585419" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> </tool> <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.157928647" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/> - <tool id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1579277851" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker"> + <tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1579277851" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker"> <option defaultValue="false" id="sbi.gnu.cpp.linker.option.shared_flag.core.36471001" name="Linker.Shared" superClass="sbi.gnu.cpp.linker.option.shared_flag.core" valueType="boolean"/> <option defaultValue="false" id="sbi.gnu.cpp.linker.option.noundefined.core.1542667184" name="Report unresolved symbol references (-Wl,--no-undefined)" superClass="sbi.gnu.cpp.linker.option.noundefined.core" valueType="boolean"/> <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.202624322" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList"> <listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/> <listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/> <listOptionValue builtIn="false" value="-pie -lpthread "/> - <listOptionValue builtIn="false" value="-Xlinker -rpath="/home/developer/sdk_tools/lib""/> <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> <listOptionValue builtIn="false" value="-Xlinker --version-script="${PROJ_PATH}/.exportMap""/> <listOptionValue builtIn="false" value="-L"${SBI_SYSROOT}/usr/lib""/> @@ -265,7 +286,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> @@ -295,22 +316,29 @@ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1887362137" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/> <builder buildPath="${workspace_loc:/w-home}/Release" id="org.tizen.nativecore.target.sbi.gnu.builder.1391369649" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/> <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.423295166" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/> - <tool id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1751047652" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler"> + <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1751047652" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler"> <option id="gnu.cpp.compiler.option.optimization.level.358029870" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option defaultValue="gnu.cpp.compiler.debugging.level.default" id="sbi.gnu.cpp.compiler.option.debugging.level.core.1120720381" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" valueType="enumerated"/> <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.673515912" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/> <option id="sbi.gnu.cpp.compiler.option.1044296963" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs"> - <listOptionValue builtIn="false" value="wearable-3.0-emulator.core_llvm36.i386.core.app"/> + <listOptionValue builtIn="false" value="wearable-3.0-emulator.core_llvm37.i386.core.app"/> </option> <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.306497793" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath"> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-watch""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> @@ -374,9 +402,13 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> </option> @@ -399,17 +431,24 @@ <option defaultValue="gnu.c.debugging.level.default" id="sbi.gnu.c.compiler.option.debugging.level.core.810411906" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" valueType="enumerated"/> <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.659595119" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/> <option id="sbi.gnu.c.compiler.option.1461833637" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs"> - <listOptionValue builtIn="false" value="wearable-3.0-emulator.core_llvm36.i386.core.app"/> + <listOptionValue builtIn="false" value="wearable-3.0-emulator.core_llvm37.i386.core.app"/> </option> <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1181069995" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath"> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-watch""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> @@ -473,9 +512,13 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> </option> @@ -494,14 +537,13 @@ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.925959317" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> </tool> <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.803521817" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/> - <tool id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1235232886" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker"> + <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1235232886" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker"> <option defaultValue="false" id="sbi.gnu.cpp.linker.option.shared_flag.core.1941140916" name="Linker.Shared" superClass="sbi.gnu.cpp.linker.option.shared_flag.core" valueType="boolean"/> <option defaultValue="false" id="sbi.gnu.cpp.linker.option.noundefined.core.59439963" name="Report unresolved symbol references (-Wl,--no-undefined)" superClass="sbi.gnu.cpp.linker.option.noundefined.core" valueType="boolean"/> <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.975784891" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList"> <listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/> <listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/> <listOptionValue builtIn="false" value="-pie -lpthread "/> - <listOptionValue builtIn="false" value="-Xlinker -rpath="/home/developer/sdk_tools/lib""/> <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> <listOptionValue builtIn="false" value="-Xlinker --version-script="${PROJ_PATH}/.exportMap""/> <listOptionValue builtIn="false" value="-L"${SBI_SYSROOT}/usr/lib""/> @@ -528,7 +570,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> diff --git a/inc/add-widget/add-widget.h b/inc/add-widget/add-widget.h new file mode 100755 index 0000000..c4481bb --- /dev/null +++ b/inc/add-widget/add-widget.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __ADD_WIDGET_H__ +#define __ADD_WIDGET_H__ + +#include "home/home_state.h" + +HOME_STATE *add_widget_new(void); + +#endif diff --git a/inc/apps/apps.h b/inc/apps/apps.h new file mode 100755 index 0000000..a86ecfb --- /dev/null +++ b/inc/apps/apps.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __APPS_H__ +#define __APPS_H__ + +#include "home/home_state.h" + +HOME_STATE *apps_new(void); + +#endif diff --git a/inc/clock/clock.h b/inc/clock/clock.h new file mode 100755 index 0000000..47b74b4 --- /dev/null +++ b/inc/clock/clock.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CLOCK_H__ +#define __CLOCK_H__ + +#include "home/home_state.h" + +HOME_STATE *clock_new(); + +#endif diff --git a/inc/clock/clock_info.h b/inc/clock/clock_info.h new file mode 100755 index 0000000..2a4131f --- /dev/null +++ b/inc/clock/clock_info.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CLOCK_INFO_H__ +#define __CLOCK_INFO_H__ + +#include <Elementary.h> +#include <app.h> + +typedef struct __clock_info_t { + Evas_Object *clock_layout; + Evas_Object *clock_content; + char *clock_id; +} clock_info_t; + +clock_info_t *clock_info_new(Evas_Object *parent); +bool clock_info_set_content(clock_info_t *info, Evas_Object *content); + +#endif diff --git a/inc/clock/clock_scroller.h b/inc/clock/clock_scroller.h new file mode 100755 index 0000000..de77b9f --- /dev/null +++ b/inc/clock/clock_scroller.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CLOCK_SCROLLER_H__ +#define __CLOCK_SCROLLER_H__ + +#include "clock/clock_info.h" + +#include <Elementary.h> +#include <app.h> + +bool clock_scroller_init(void); +bool clock_scroller_push_clock(clock_info_t *clock_info); +void clock_scroller_pop_clock(void); +void clock_scroller_scroll_to_clock(bool need_animation); + +#endif diff --git a/inc/clock/clock_view.h b/inc/clock/clock_view.h new file mode 100755 index 0000000..722bce8 --- /dev/null +++ b/inc/clock/clock_view.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CLOCK_VIEW_H__ +#define __CLOCK_VIEW_H__ + +#include <app.h> + +bool clock_view_create_base_ui(void); +void clock_view_destroy(void); + +#endif diff --git a/inc/common/callback_handler.h b/inc/common/callback_handler.h new file mode 100755 index 0000000..a51e0fa --- /dev/null +++ b/inc/common/callback_handler.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CALLBACK_HANDLER_H__ +#define __CALLBACK_HANDLER_H__ + +#include <app.h> + +#define MAX_CB_CNT 20 + +typedef struct __callback_h { + char *key; + int cb_count; + void (*cb_list[MAX_CB_CNT])(void* data); +} callback_h; + +callback_h *callback_handler_new(const char *key); +void callback_handler_free(callback_h *cb_h); +bool callback_handler_add_cb(callback_h *cb_h, void(*cb)(void *data)); +void callback_handler_del_cb(callback_h *cb_h, void(*cb)(void *data)); +void callback_handler_execute_cb(callback_h *cb_h, void *data); + +#endif diff --git a/inc/common/conf.h b/inc/common/conf.h new file mode 100755 index 0000000..1d346b4 --- /dev/null +++ b/inc/common/conf.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_CONF_H__ +#define __HOME_CONF_H__ + +#include <app.h> + +extern double _get_resolution_scale_h(); +extern double _get_resolution_scale_w(); +extern int _get_window_h(); +extern int _get_window_w(); + +#define WINDOW_H (_get_window_h()) +#define WINDOW_W (_get_window_w()) +#define WINDOW_CENTER_X (WINDOW_W/2) +#define WINDOW_CENTER_Y (WINDOW_H/2) + +#define PAGE_W WINDOW_W +#define PAGE_H WINDOW_H + +#define OUTSIDE_X (-(WINDOW_W + WINDOW_W)) +#define OUTSIDE_Y (-(WINDOW_H + WINDOW_H)) + +#define SCALE_H (_get_resolution_scale_h()) +#define SCALE_W (_get_resolution_scale_w()) + +void conf_set_resolution(int w, int h); +bool conf_is_supported_resolution(int w, int h); + +#endif diff --git a/inc/common/edje_conf.h b/inc/common/edje_conf.h new file mode 100755 index 0000000..cfcc95b --- /dev/null +++ b/inc/common/edje_conf.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_EDJE_CONF_H__ +#define __HOME_EDJE_CONF_H__ + +#define EDJE_DIR "edje" +#define IMAGE_DIR "images" + +#define GROUP_HOME_PAGE_LAYOUT "group_home_page_layout" + +#define PART_PAGE_CONTENT "part_page_content" + +#define SIZE_SETTER "size_setter" + +#endif diff --git a/inc/common/log.h b/inc/common/log.h new file mode 100755 index 0000000..5580391 --- /dev/null +++ b/inc/common/log.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __W_HOME_LOG_H__ +#define __W_HOME_LOG_H__ + +#include <dlog.h> + +#ifndef __MODULE__ +#define __MODULE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) +#endif + +#undef LOG_TAG +#define LOG_TAG "W_HOME" + +#ifndef LOG_ +#define LOG_(prio, tag, fmt, arg...) \ + ({ do { \ + dlog_print(prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg);\ + } while (0); }) +#endif + +#ifndef _D +#define _D(format, arg...) LOG_(DLOG_DEBUG, LOG_TAG, format, ##arg) +#endif +#ifndef _I +#define _I(format, arg...) LOG_(DLOG_INFO, LOG_TAG, format, ##arg) +#endif +#ifndef _E +#define _E(format, arg...) LOG_(DLOG_ERROR, LOG_TAG, format, ##arg) +#endif + +#endif diff --git a/inc/common/util.h b/inc/common/util.h new file mode 100755 index 0000000..53cb3d7 --- /dev/null +++ b/inc/common/util.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __W_HOME_UTIL_H__ +#define __W_HOME_UTIL_H__ + +enum directory_path { + DATA, + RESOURCE, +}; + +const char *util_get_file_path(enum directory_path, const char *file); + +#define util_get_data_file_path(x) util_get_file_path(DATA, (x)) +#define util_get_res_file_path(x) util_get_file_path(RESOURCE, (x)) + +#endif diff --git a/inc/home/home_base_layout.h b/inc/home/home_base_layout.h new file mode 100755 index 0000000..72eaa51 --- /dev/null +++ b/inc/home/home_base_layout.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_BASE_LAYOUT_H__ +#define __HOME_BASE_LAYOUT_H__ + +#include <Elementary.h> + +typedef struct __home_base_layout_t { + Evas_Object *parent; + Evas_Object *scroller; + Evas_Object *box; +} home_base_layout_t; + +#endif diff --git a/inc/home/home_manager.h b/inc/home/home_manager.h new file mode 100755 index 0000000..d826f60 --- /dev/null +++ b/inc/home/home_manager.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_MANAGER_H__ +#define __HOME_MANAGER_H__ + +#include <app.h> + +#include "home/home_state.h" + +bool home_create_cb(void *data); +void home_app_control_cb(app_control_h app_control, void *data); +void home_resume_cb(void *data); +void home_pause_cb(void *data); +void home_terminate_cb(void *data); +void home_language_changed_cb(app_event_info_h event_info, void *user_data); + +HOME_STATE *home_get_current_state(void); +void home_add_terminate_cb(void(*cb)(void *data)); +void home_del_terminate_cb(void(*cb)(void *data)); + + +#endif diff --git a/inc/home/home_scroller.h b/inc/home/home_scroller.h new file mode 100755 index 0000000..3087a54 --- /dev/null +++ b/inc/home/home_scroller.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_SCROLLER_H__ +#define __HOME_SCROLLER_H__ + +#include "home/home_view_page.h" + +#include <Elementary.h> +#include <app.h> + +typedef struct __home_scroller_t { + Evas_Object *parent; + Evas_Object *scroller; + Evas_Object *box; + home_scroller_page_t *clock_page; + home_scroller_page_t *noti_first_page; + home_scroller_page_t *widgets_first_page; +} home_scroller_t; + +home_scroller_t *home_scroller_get(void); + +#endif diff --git a/inc/home/home_scroller_page.h b/inc/home/home_scroller_page.h new file mode 100755 index 0000000..29aefc3 --- /dev/null +++ b/inc/home/home_scroller_page.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_SCROLLER_PAGE_H__ +#define __HOME_SCROLLER_PAGE_H__ + +#include <app.h> +#include <Elementary.h> + +typedef struct __home_scroller_paget_t { + Evas_Object *parent; + Evas_Object *layout; + int page_idx; +} home_scroller_page_t; + +home_scroller_page_t *home_scroller_page_new(Evas_Object *parent); +void home_scroller_page_del(home_scroller_page_t *page); +bool home_scroller_page_set_content(home_scroller_page_t *page, Evas_Object *content); +Evas_Object *home_scroller_page_get_content(home_scroller_page_t *page); + +#endif diff --git a/inc/home/home_state.h b/inc/home/home_state.h new file mode 100755 index 0000000..28a46f5 --- /dev/null +++ b/inc/home/home_state.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_STATE_H__ +#define __HOME_STATE_H__ + +#include <app.h> + +typedef enum _home_state_e { + DUMMY = -1, + CLOCK = 0, + WIDGETS, + NOTIFICATIONS, + APPS, + MOMENT, + ADD_WIDGET, +} home_state_e; + +typedef struct _HOME_STATE { + home_state_e type; + bool (*is_visible_cb)(void); + void (*step_in_cb)(void); + void (*step_out_cb)(void); + void (*destroy_cb)(void); +} HOME_STATE; + +void home_state_destroy(HOME_STATE *state); + +#endif diff --git a/inc/home/home_view_page.h b/inc/home/home_view_page.h new file mode 100755 index 0000000..91e1ba2 --- /dev/null +++ b/inc/home/home_view_page.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_VIEW_PAGE_H__ +#define __HOME_VIEW_PAGE_H__ + +#include <app.h> +#include <Elementary.h> + +typedef struct __home_view_paget_t { + Evas_Object *parent; + Evas_Object *layout; + int page_idx; +} home_view_page_t; + +home_view_page_t *home_view_page_new(Evas_Object *parent); +void home_view_page_del(home_view_page_t *page); +bool home_view_page_set_content(home_view_page_t *page, Evas_Object *content); +Evas_Object *home_view_page_get_content(home_view_page_t *page); + +#endif diff --git a/inc/home/home_win.h b/inc/home/home_win.h new file mode 100755 index 0000000..df72335 --- /dev/null +++ b/inc/home/home_win.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_WIN_H__ +#define __HOME_WIN_H__ + +#include <Elementary.h> +#include <app.h> + +Evas_Object *home_win_get(void); + +#endif diff --git a/inc/moment/moment.h b/inc/moment/moment.h new file mode 100755 index 0000000..a9c1a73 --- /dev/null +++ b/inc/moment/moment.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __MOMENT_H__ +#define __MOMENT_H__ + +#include "home/home_state.h" + +HOME_STATE *moment_new(void); + +#endif diff --git a/inc/notifications/noti_event_manager.h b/inc/notifications/noti_event_manager.h new file mode 100755 index 0000000..ce698ad --- /dev/null +++ b/inc/notifications/noti_event_manager.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_EVENT_MANAGER_H__ +#define __NOTI_EVENT_MANAGER_H__ + +#include "notifications/noti_info.h" + +bool noti_event_manager_init(void); +void noti_event_manager_fini(void); + +void noti_event_manager_add_changed_cb(void(*cb)(void *noti_info)); +void noti_event_manager_del_changed_cb(void(*cb)(void *noti_info)); + +#endif diff --git a/inc/notifications/noti_full_popup.h b/inc/notifications/noti_full_popup.h new file mode 100755 index 0000000..879f11b --- /dev/null +++ b/inc/notifications/noti_full_popup.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_FULL_POPUP_H__ +#define __NOTI_FULL_POPUP_H__ + +#include <notification.h> +#include <notification_internal.h> + +void noti_full_popup_show(notification_h noti_handler); + +#endif diff --git a/inc/notifications/noti_info.h b/inc/notifications/noti_info.h new file mode 100755 index 0000000..e91148a --- /dev/null +++ b/inc/notifications/noti_info.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_INFO_H__ +#define __NOTI_INFO_H__ + +#include <notification.h> +#include <notification_internal.h> +#include <Elementary.h> +#include <app.h> + +typedef struct __noti_message_t { + int id; + notification_h noti_handler; + notification_op_type_e operation_type; +} noti_message_t; + +typedef struct __noti_info_t { + Evas_Object *noti_layout; + Evas_Object *noti_content; + char *noti_id; +} noti_info_t; + +noti_info_t *noti_info_new(Evas_Object *parent); +bool noti_info_set_content(noti_info_t *info, Evas_Object *content); + +#endif diff --git a/inc/notifications/noti_popup_manager.h b/inc/notifications/noti_popup_manager.h new file mode 100755 index 0000000..8609ef6 --- /dev/null +++ b/inc/notifications/noti_popup_manager.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_POPUP_MANAGER_H__ +#define __NOTI_POPUP_MANAGER_H__ + +#include <app.h> + +bool noti_popup_manager_init(void); +void noti_popup_manager_fini(void); + +#endif diff --git a/inc/notifications/noti_scroller.h b/inc/notifications/noti_scroller.h new file mode 100755 index 0000000..d25cde9 --- /dev/null +++ b/inc/notifications/noti_scroller.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_SCROLLER_H__ +#define __NOTI_SCROLLER_H__ + +#include "home/home_scroller.h" +#include "notifications/noti_info.h" + +#include <Elementary.h> +#include <app.h> + +home_scroller_t *noti_scroller_get(void); +bool noti_scroller_push_noti(noti_info_t *noti_info); +void noti_scroller_pop_noti(void); + +#endif diff --git a/inc/notifications/noti_small_popup.h b/inc/notifications/noti_small_popup.h new file mode 100755 index 0000000..7351508 --- /dev/null +++ b/inc/notifications/noti_small_popup.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_SMALL_POPUP_H__ +#define __NOTI_SMALL_POPUP_H__ + +#include <notification.h> +#include <notification_internal.h> + +void noti_small_popup_show(notification_h noti_handler); + +#endif diff --git a/inc/notifications/noti_view.h b/inc/notifications/noti_view.h new file mode 100755 index 0000000..70c7deb --- /dev/null +++ b/inc/notifications/noti_view.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTI_VIEW_H__ +#define __NOTI_VIEW_H__ + +#include <app.h> + +bool noti_view_create_base_ui(void); +void noti_view_destroy(void); + +#endif diff --git a/inc/notifications/notifications.h b/inc/notifications/notifications.h new file mode 100755 index 0000000..1a1a837 --- /dev/null +++ b/inc/notifications/notifications.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NOTIFICATIONS_H__ +#define __NOTIFICATIONS_H__ + +#include "home/home_state.h" + +HOME_STATE *notifications_new(); + +#endif diff --git a/inc/widgets/widget_info.h b/inc/widgets/widget_info.h new file mode 100755 index 0000000..b91370f --- /dev/null +++ b/inc/widgets/widget_info.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __WIDGET_INFO_H__ +#define __WIDGET_INFO_H__ + +#include <Elementary.h> +#include <app.h> + +typedef struct __widget_info_t { + Evas_Object *widget_layout; + Evas_Object *widget_content; + char *widget_id; +} widget_info_t; + +widget_info_t *widget_info_new(Evas_Object *parent); +bool widget_info_set_content(widget_info_t *info, Evas_Object *content); + +#endif diff --git a/inc/widgets/widgets.h b/inc/widgets/widgets.h new file mode 100755 index 0000000..3918018 --- /dev/null +++ b/inc/widgets/widgets.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __WIDGETS_H__ +#define __WIDGETS_H__ + +#include "home/home_state.h" + +HOME_STATE *widgets_new(); + +#endif diff --git a/inc/widgets/widgets_scroller.h b/inc/widgets/widgets_scroller.h new file mode 100755 index 0000000..413e18b --- /dev/null +++ b/inc/widgets/widgets_scroller.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __WIDGETS_SCROLLER_H__ +#define __WIDGETS_SCROLLER_H__ + +#include "home/home_scroller.h" +#include "widgets/widget_info.h" + +#include <Elementary.h> +#include <app.h> + +home_scroller_t *widgets_scroller_get(void); +bool *widgets_scroller_push_widget(widget_info_t *widget_info); +void widgets_scroller_pop_widget(widget_info_t *widget_info); +void *widgets_scroller_pop_all(void); + +#endif diff --git a/inc/widgets/widgets_view.h b/inc/widgets/widgets_view.h new file mode 100755 index 0000000..bbb3ee4 --- /dev/null +++ b/inc/widgets/widgets_view.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __WIDGETS_VIEW_H__ +#define __WIDGETS_VIEW_H__ + +#include <app.h> + +bool widgets_view_create_base_ui(void); +void widgets_view_destroy(void); + +#endif diff --git a/res/edje/page.edc b/res/edje/page.edc new file mode 100755 index 0000000..f82dcf0 --- /dev/null +++ b/res/edje/page.edc @@ -0,0 +1,44 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/common/edje_conf.h" + +collections { + group { name: GROUP_HOME_PAGE_LAYOUT; + parts { + part { name: SIZE_SETTER; + type: SWALLOW; + description { + state: "default" 0.0; + align: 0 0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + part { name: PART_PAGE_CONTENT; + type: SWALLOW; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1{relative: 0.0 0.0; to: SIZE_SETTER;} + rel2{relative: 1.0 1.0; to: SIZE_SETTER;} + } + } + } + programs { + } + } +}
\ No newline at end of file diff --git a/res/edje/page.edj b/res/edje/page.edj Binary files differnew file mode 100755 index 0000000..2450bd8 --- /dev/null +++ b/res/edje/page.edj diff --git a/res/po/en_US.po b/res/po/en_US.po new file mode 100755 index 0000000..a78fde9 --- /dev/null +++ b/res/po/en_US.po @@ -0,0 +1,2 @@ +msgid "IDS_ST_BUTTON_OK" +msgstr "OK" diff --git a/shared/res/w-home.png b/shared/res/w-home.png Binary files differnew file mode 100755 index 0000000..ac14444 --- /dev/null +++ b/shared/res/w-home.png diff --git a/src/add-widget/add-widget_manager.c b/src/add-widget/add-widget_manager.c new file mode 100755 index 0000000..edae1ae --- /dev/null +++ b/src/add-widget/add-widget_manager.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "add-widget/add-widget.h" + +static struct __add_widget_manager_s { + HOME_STATE *state; +} s_info = { + .state = NULL, +}; + +static bool __add_widget_init(void); +static void __add_widget_fini(void); +static HOME_STATE *__add_widget_state_new(void); + +extern HOME_STATE *home_state_new(void); + +HOME_STATE *add_widget_new(void) +{ + __add_widget_init(); + + s_info.state = __add_widget_state_new(); + + return s_info.state; +} + +static bool __add_widget_init(void) +{ + _D("%s", __func__); + + return true; +} + +static void __add_widget_fini(void) +{ + +} + +static HOME_STATE *__add_widget_state_new(void) +{ + HOME_STATE *state = home_state_new(); + state->type = ADD_WIDGET; + state->destroy_cb = __add_widget_fini; + + return state; +} diff --git a/src/apps/apps_manager.c b/src/apps/apps_manager.c new file mode 100755 index 0000000..703e6b4 --- /dev/null +++ b/src/apps/apps_manager.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "apps/apps.h" + +static struct __apps_manager_s { + HOME_STATE *state; +} s_info = { + .state = NULL, +}; + +static bool __apps_init(void); +static void __apps_fini(void); +static HOME_STATE *__apps_state_new(void); + +extern HOME_STATE *home_state_new(void); + +HOME_STATE *apps_new(void) +{ + __apps_init(); + + s_info.state = __apps_state_new(); + + return s_info.state; +} + +static bool __apps_init(void) +{ + _D("%s", __func__); + + return true; +} + +static void __apps_fini(void) +{ + +} + +static HOME_STATE *__apps_state_new(void) +{ + HOME_STATE *state = home_state_new(); + state->type = APPS; + state->destroy_cb = __apps_fini; + + return state; +} diff --git a/src/clock/clock_manager.c b/src/clock/clock_manager.c new file mode 100755 index 0000000..1e6eb1e --- /dev/null +++ b/src/clock/clock_manager.c @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "clock/clock.h" +#include "clock/clock_view.h" + +static struct __clock_manager_s { + HOME_STATE *state; +} s_info = { + .state = NULL, +}; + +static bool __clock_init(void); +static void __clock_fini(void); +static HOME_STATE *__clock_state_new(void); + +extern HOME_STATE *home_state_new(void); + +HOME_STATE *clock_new() +{ + _D("%s", __func__); + + if (__clock_init() == false) { + goto __fail; + } + + s_info.state = __clock_state_new(); + if (s_info.state == NULL) { + goto __fail; + } + + return s_info.state; + +__fail: + home_state_destroy(s_info.state); + __clock_fini(); + return NULL; +} + +static bool __clock_init(void) +{ + _D("%s", __func__); + + if (clock_view_create_base_ui() == false) { + _E("failed to create clock ui"); + return false; + } + + + return true; +} + +static void __clock_fini(void) +{ + _D("%s", __func__); + + s_info.state = NULL; + clock_view_destroy(); +} + +static HOME_STATE *__clock_state_new(void) +{ + _D("%s", __func__); + + HOME_STATE *state = home_state_new(); + if (state == NULL) { + return NULL; + } + state->type = CLOCK; + state->destroy_cb = __clock_fini; + + return state; +} diff --git a/src/clock/clock_scroller.c b/src/clock/clock_scroller.c new file mode 100755 index 0000000..44acfa3 --- /dev/null +++ b/src/clock/clock_scroller.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "home/home_scroller.h" + +static struct __clock_scroller_s { + home_scroller_t *home_scroller; +} s_info = { + .home_scroller = NULL, +}; + +bool clock_scroller_init(void) +{ + s_info.home_scroller = home_scroller_get(); + if (s_info.home_scroller == NULL) { + _E("failed to get scroller"); + return false; + } + + return true; +} + +bool clock_scroller_push_clock(clock_info_t *clock_info) +{ + +} + +void clock_scroller_pop_clock(void) +{ + +} + +void clock_scroller_scroll_to_clock(bool need_animation) +{ + +} diff --git a/src/clock/clock_view.c b/src/clock/clock_view.c new file mode 100755 index 0000000..af1dd87 --- /dev/null +++ b/src/clock/clock_view.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "clock/clock_view.h" +#include "clock/clock_scroller.h" +#include "clock/clock_info.h" + +#include <stdlib.h> + +static struct __clock_veiw_s { + Evas_Object *base_layout; +} s_info = { + .base_layout = NULL, +}; + +static bool __create_base_ui(void); +static void __destroy_base_ui(void); + +bool clock_view_create_base_ui(void) +{ + if (clock_scroller_init() == false) { + _E("failed to get clock scroller"); + return false; + } + + if (__create_base_ui() == false) { + _E("failed to create clock ui"); + return false; + } + + return true; +} + +void clock_view_destroy(void) +{ + __destroy_base_ui(); +} + +static bool __create_base_ui(void) +{ + s_info.base_layout = clock_scroller_get_parent(); + clock_info_t *tmp_clock = clock_info_new(s_info.base_layout); + + Evas_Object *tmp_object = elm_label_add(s_info.base_layout); + elm_object_text_set(tmp_object, "<align=center>CLOCK</align>"); + evas_object_size_hint_weight_set(tmp_object, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(tmp_object, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_min_set(tmp_object, WINDOW_W, WINDOW_H); + evas_object_resize(tmp_object, WINDOW_W, WINDOW_H); + evas_object_show(tmp_object); + + clock_info_set_content(tmp_clock, tmp_object); + clock_scroller_push_clock(tmp_clock); + + return true; +} + +static void __destroy_base_ui(void) +{ + clock_scroller_pop_clock(); +} diff --git a/src/common/callback_handler.c b/src/common/callback_handler.c new file mode 100755 index 0000000..8c23b7a --- /dev/null +++ b/src/common/callback_handler.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/callback_handler.h" + +#include <stdlib.h> + +callback_h *callback_handler_new(const char *key) +{ + callback_h *cb_h = (callback_h *)malloc(sizeof(callback_h)); + if (cb_h == NULL) { + _E("failed to malloc"); + return NULL; + } + + cb_h->key = key == NULL ? NULL : strdup(key); + cb_h->cb_count = 0; + + return cb_h; +} + +void callback_handler_free(callback_h *cb_h) +{ + if (cb_h == NULL) { + return ; + } + + free(cb_h->key); + free(cb_h); +} + +bool callback_handler_add_cb(callback_h *cb_h, void(*cb)(void *data)) +{ + if (cb_h == NULL) { + _E("callback handler is null"); + return false; + } + + if (cb_h->cb_count >= MAX_CB_CNT) { + _E("[%s] callback handler is full", cb_h->key); + return false; + } + + int idx = 0; + for (idx = 0; idx < cb_h->cb_count; idx++) { + if (cb == cb_h->cb_list[idx]) { + _E("[%s] %p callback is already registered", cb_h->key, cb); + return false; + } + } + cb_h->cb_list[cb_h->cb_count] = cb; + cb_h->cb_count += 1; + + _D("[%s] current callback count is %d", cb_h->key, cb_h->cb_count); + + return true; +} + +void callback_handler_del_cb(callback_h *cb_h, void(*cb)(void *data)) +{ + if (cb_h == NULL) { + _E("callback handler is null"); + return ; + } + + if (cb_h->cb_count == MAX_CB_CNT) { + _E("[%s] callback handler is empty", cb_h->key); + return ; + } + + int idx = 0; + for (idx = 0; idx < cb_h->cb_count; idx++) { + if (cb == cb_h->cb_list[idx]) { + break; + } + } + + if (idx == cb_h->cb_count) { + _E("[%s] %p cb is not found", cb_h->key, cb); + return ; + } + + int cur = 0; + for (cur = idx + 1; cur < cb_h->cb_count; cur++) { + cb_h->cb_list[cur - 1] = cb_h->cb_list[cur]; + cb_h->cb_list[cur] = NULL; + } + cb_h->cb_count -= 1; + + _D("[%s] current callback count is %d", cb_h->key, cb_h->cb_count); +} + +void callback_handler_execute_cb(callback_h *cb_h, void *data) +{ + if (cb_h == NULL) { + _D("callback handler is null"); + return ; + } + + int idx = 0; + for (idx = 0; idx < cb_h->cb_count; idx++) { + if (cb_h->cb_list[idx] != NULL) { + (*cb_h->cb_list[idx])(data); + } + } +} diff --git a/src/common/conf.c b/src/common/conf.c new file mode 100755 index 0000000..04e6ff2 --- /dev/null +++ b/src/common/conf.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" + +static int window_width = 360; +static int window_height = 360; +static double resolution_scale_h = 1.0; +static double resolution_scale_w = 1.0; + +static int supported_resolution[10][2] = { {320, 320}, {360, 360}, {360, 480}, {0, 0}, }; + +int _get_window_h(void) +{ + return window_height; +} + +int _get_window_w(void) +{ + return window_width; +} + +double _get_resolution_scale_h() +{ + return resolution_scale_h; +} + +double _get_resolution_scale_w() +{ + return resolution_scale_w; +} + +void conf_set_resolution(int w, int h) +{ + _I("set resolution [%d x %d]", w, h); + window_width = w; + window_height = h; + resolution_scale_w = (double)window_width / 360; + resolution_scale_h = (double)window_height / 360; +} + +bool conf_is_supported_resolution(int w, int h) +{ + int idx = 0; + for (idx = 0; supported_resolution[idx][0] > 0; idx++) { + if (w == supported_resolution[idx][0] && h == supported_resolution[idx][1]) + break; + } + return supported_resolution[idx][0] == 0 ? false : true; +} diff --git a/src/common/util.c b/src/common/util.c new file mode 100755 index 0000000..c7bb27f --- /dev/null +++ b/src/common/util.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/util.h" + +#include <app.h> +#include <Elementary.h> + +#define PATH_MAX_LEN 1024 + +const char *util_get_file_path(enum directory_path dir, const char *file) +{ + static char buf[PATH_MAX_LEN]; + char *prefix; + + switch (dir) { + case DATA: + prefix = app_get_data_path(); + break; + case RESOURCE: + prefix = app_get_resource_path(); + break; + default: + _E("Not handled directory type."); + return NULL; + } + if (prefix == NULL) { + _E("Failed to get prefix"); + return NULL; + } + + size_t res = eina_file_path_join(buf, sizeof(buf), prefix, file); + free(prefix); + if (res > sizeof(buf)) { + _E("Path exceeded PATH_MAX"); + return NULL; + } + + return &buf[0]; +} diff --git a/src/home/home_manager.c b/src/home/home_manager.c new file mode 100755 index 0000000..b4b28a4 --- /dev/null +++ b/src/home/home_manager.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/callback_handler.h" +#include "home/home_manager.h" +#include "home/home_win.h" +#include "clock/clock.h" +#include "apps/apps.h" +#include "notifications/notifications.h" +#include "moment/moment.h" +#include "widgets/widgets.h" +#include "add-widget/add-widget.h" + +static struct __home_manager_s { + HOME_STATE *clock; + HOME_STATE *notifications; + HOME_STATE *widgets; + HOME_STATE *apps; + HOME_STATE *moment; + HOME_STATE *add_widget; + HOME_STATE *current_state; + callback_h *terminate_cb_handler; +} s_info = { + .clock = NULL, + .notifications = NULL, + .widgets = NULL, + .apps = NULL, + .moment = NULL, + .add_widget = NULL, + .current_state = NULL, + .terminate_cb_handler = NULL, +}; + +static bool __create_home_state(void); +static void __destroy_home_state(void); + +bool home_create_cb(void *data) +{ + _D("%s", __func__); + + if (__create_home_state() == false){ + _E("failed to create home state"); + goto __fail; + } + + (*s_info.current_state->step_in_cb)(); + + return true; + +__fail : + home_terminate_cb(data); + return false; +} + +void home_app_control_cb(app_control_h app_control, void *data) +{ + _D("%s", __func__); +} + +void home_resume_cb(void *data) +{ + _D("%s", __func__); +} + +void home_pause_cb(void *data) +{ + _D("%s", __func__); +} + +void home_terminate_cb(void *data) +{ + _D("%s", __func__); + + __destroy_home_state(); + + callback_handler_execute_cb(s_info.terminate_cb_handler, NULL); + callback_handler_free(s_info.terminate_cb_handler); + s_info.terminate_cb_handler = NULL; +} + +void home_language_changed_cb(app_event_info_h event_info, void *user_data) +{ + _D("home lang changed cb"); +} + +HOME_STATE *home_get_current_state(void) +{ + return s_info.current_state; +} + +void home_add_terminate_cb(void(*cb)(void *data)) +{ + if (s_info.terminate_cb_handler == NULL) { + s_info.terminate_cb_handler = callback_handler_new("home_manager"); + } + + callback_handler_add_cb(s_info.terminate_cb_handler, cb); +} + +void home_del_terminate_cb(void(*cb)(void *data)) +{ + callback_handler_del_cb(s_info.terminate_cb_handler, cb); +} + +static bool __create_home_state(void) +{ + s_info.clock = clock_new(); + s_info.widgets = widgets_new(); + s_info.notifications = notifications_new(); + s_info.apps = apps_new(); + s_info.moment = moment_new(); + s_info.add_widget = add_widget_new(); + + if (!s_info.clock || !s_info.widgets || !s_info.notifications || !s_info.apps || !s_info.moment || !s_info.add_widget) + return false; + + s_info.current_state = s_info.clock; + + return true; +} + +static void __destroy_home_state(void) +{ + s_info.current_state = NULL; + + home_state_destroy(s_info.add_widget); + s_info.add_widget = NULL; + home_state_destroy(s_info.moment); + s_info.moment = NULL; + home_state_destroy(s_info.apps); + s_info.apps = NULL; + home_state_destroy(s_info.notifications); + s_info.notifications = NULL; + home_state_destroy(s_info.widgets); + s_info.widgets = NULL; + home_state_destroy(s_info.clock); + s_info.clock = NULL; +} diff --git a/src/home/home_scroller.c b/src/home/home_scroller.c new file mode 100755 index 0000000..9418802 --- /dev/null +++ b/src/home/home_scroller.c @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "home/home_win.h" +#include "home/home_scroller.h" +#include "home/home_manager.h" + +#include <app.h> +#include <stdlib.h> + +static struct __home_scroller_s { + home_scroller_t *home_scroller; +} s_info = { + .home_scroller = NULL, +}; + +static home_scroller_t *__home_scroller_new(void); +static void __destroy_home_scroller(void *data); +static Evas_Object *__create_main_scroller(Evas_Object *parent); +static Evas_Object *__create_main_box(Evas_Object *parent); + +home_scroller_t *home_scroller_get(void) +{ + if (s_info.home_scroller == NULL) { + s_info.home_scroller = __home_scroller_new(); + home_add_terminate_cb(__destroy_home_scroller); + } + + return s_info.home_scroller; +} + +static home_scroller_t *__home_scroller_new(void) +{ + home_scroller_t *home_scroller = NULL; + + home_scroller = (home_scroller_t *)malloc(sizeof(home_scroller_t)); + if (home_scroller == NULL) { + _E("failed to malloc"); + return NULL; + } + + home_scroller->parent = home_win_get(); + if (home_scroller->parent == NULL) { + _E("failed to get win"); + free(home_scroller); + return NULL; + } + + home_scroller->scroller = __create_main_scroller(home_scroller->parent); + if (home_scroller->scroller == NULL) { + _E("failed to create scroller"); + free(home_scroller); + return NULL; + } + + s_info.home_scroller->box = __create_main_box(s_info.home_scroller->scroller); + if (s_info.home_scroller->box == NULL) { + _E("failed to create box"); + evas_object_del(home_scroller->scroller); + free(home_scroller); + return NULL; + } + + elm_object_content_set(s_info.home_scroller->scroller, s_info.home_scroller->box); + + s_info.home_scroller->clock_page = NULL; + s_info.home_scroller->noti_first_page = NULL; + s_info.home_scroller->widgets_first_page = NULL; + + return home_scroller; +} + +static void __destroy_home_scroller(void *data) +{ + if (s_info.home_scroller == NULL) { + return ; + } + + if (s_info.home_scroller->box) { + evas_object_del(s_info.home_scroller->box); + } + + if (s_info.home_scroller->scroller) { + evas_object_del(s_info.home_scroller->scroller); + } + + free(s_info.home_scroller); + s_info.home_scroller = NULL; +} + +static Evas_Object *__create_main_scroller(Evas_Object *parent) +{ + Evas_Object *scroller = NULL; + scroller = elm_scroller_add(parent); + + if (scroller == NULL) { + return NULL; + } + + elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE); + elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); + elm_scroller_page_scroll_limit_set(scroller, 1, 0); + elm_scroller_single_direction_set(scroller, ELM_SCROLLER_SINGLE_DIRECTION_HARD); + elm_scroller_page_size_set(scroller, WINDOW_W, WINDOW_H); + elm_object_style_set(scroller, "effect"); + elm_object_scroll_lock_y_set(scroller, EINA_TRUE); + evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_resize(scroller, WINDOW_W, WINDOW_H); + evas_object_move(scroller, 0, 0); + evas_object_show(scroller); + + return scroller; +} + +static Evas_Object *__create_main_box(Evas_Object *parent) +{ + Evas_Object *box = NULL; + box = elm_box_add(parent); + if (box == NULL) { + return NULL; + } + + elm_box_horizontal_set(box, EINA_TRUE); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(box, 0, 0); + evas_object_show(box); + + return box; +} diff --git a/src/home/home_scroller_page.c b/src/home/home_scroller_page.c new file mode 100755 index 0000000..d9e7311 --- /dev/null +++ b/src/home/home_scroller_page.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "common/util.h" +#include "common/edje_conf.h" +#include "home/home_scroller_page.h" + +#include <stdlib.h> + +home_scroller_page_t *home_scroller_page_new(Evas_Object *parent) +{ + home_scroller_page_t *page = (home_scroller_page_t *)malloc(sizeof(home_scroller_page_t)); + if (page == NULL) { + _E("failed to malloc"); + goto __fail; + } + + page->page_idx = 0; + page->parent = parent; + page->layout = elm_layout_add(parent); + if (page->layout == NULL) { + _E("failed to elm_layout_add"); + return false; + } + + elm_layout_file_set(page->layout, util_get_res_file_path(EDJE_DIR"/page.edj"), GROUP_HOME_PAGE_LAYOUT); + evas_object_size_hint_align_set(page->layout, 0, 0); + evas_object_size_hint_weight_set(page->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(page->layout); + + Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(page->layout)); + evas_object_size_hint_min_set(rect, PAGE_W, PAGE_H); + evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_color_set(rect, 0, 0, 0, 0); + evas_object_show(rect); + + elm_object_part_content_set(page->layout, SIZE_SETTER, rect); + + return page; + +__fail: + home_scroller_page_del(page); + return NULL; +} + +void home_scroller_page_del(home_scroller_page_t *page) +{ + if (page == NULL) { + return ; + } + + if (page->layout) { + evas_object_del(page->layout); + } + free(page); +} + +bool home_scroller_page_set_content(home_scroller_page_t *page, Evas_Object *content) +{ + if (page == NULL || page->layout == NULL || content == NULL) { + _E("failed to set content on page"); + return false; + } + + elm_object_part_content_set(page->layout, PART_PAGE_CONTENT, content); + + return true; +} + +Evas_Object *home_scroller_page_get_content(home_scroller_page_t *page) +{ + if (page == NULL || page->layout == NULL) { + _E("failed to get content from page"); + return NULL; + } + + return elm_object_item_part_content_get(page->layout, PART_PAGE_CONTENT); +} diff --git a/src/home/home_state.c b/src/home/home_state.c new file mode 100755 index 0000000..fdafa1c --- /dev/null +++ b/src/home/home_state.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "home/home_state.h" + +#include <stdlib.h> + +static bool __dummy_is_visible(void) { _D("do nothing"); return false;} +static void __dummy_step_in(void) { _D("do nothing"); } +static void __dummy_step_out(void) { _D("do nothing"); } +static void __dummy_destroy(void) { _D("do nothing"); } + +HOME_STATE *home_state_new(void) +{ + HOME_STATE *state = (HOME_STATE *)malloc(sizeof(HOME_STATE)); + if(state == NULL) { + _E("failed to malloc"); + return NULL; + } + + state->type = DUMMY; + state->is_visible_cb = __dummy_is_visible; + state->step_in_cb = __dummy_step_in; + state->step_out_cb = __dummy_step_out; + state->destroy_cb = __dummy_destroy; + + return state; +} + +void home_state_destroy(HOME_STATE *state) +{ + if (state == NULL) + return ; + + if (state->destroy_cb) { + (*state->destroy_cb)(); + } + free(state); +} diff --git a/src/home/home_win.c b/src/home/home_win.c new file mode 100755 index 0000000..a237e8c --- /dev/null +++ b/src/home/home_win.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "home/home_win.h" +#include "home/home_manager.h" + +static struct __home_win_s { + Evas_Object *main_win; +} s_info = { + .main_win = NULL, +}; + +static Evas_Object *__create_main_win(void); +static void __destroy_main_win(void *data); + +Evas_Object *home_win_get(void) +{ + if (s_info.main_win == NULL) { + s_info.main_win = __create_main_win(); + home_add_terminate_cb(__destroy_main_win); + } + + return s_info.main_win; +} + +Evas_Object *__create_main_win(void) +{ + Evas_Object *win = NULL; + + elm_config_accel_preference_set("3d"); + + win = elm_win_add(NULL, "W-Home", ELM_WIN_BASIC); + if (win == NULL) { + _E("failed to create window"); + return NULL; + } + + int w, h; + elm_win_screen_size_get(win, NULL, NULL, &w, &h); + if (!conf_is_supported_resolution(w, h)) { + _E("%dx%d is not supported", w, h); + evas_object_del(win); + return NULL; + } + conf_set_resolution(w, h); + + elm_win_title_set(win, "W-Home"); + elm_win_borderless_set(win, EINA_TRUE); + elm_win_alpha_set(win, EINA_FALSE); + elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW); + elm_win_indicator_opacity_set(win, ELM_WIN_INDICATOR_OPAQUE); + elm_win_aux_hint_add(win, "wm.policy.win.gesture.disable", "1"); + + evas_object_resize(win, w, h); + evas_object_show(win); + + return win; +} + +static void __destroy_main_win(void *data) +{ + if (s_info.main_win == NULL) { + return ; + } + + evas_object_del(s_info.main_win); + s_info.main_win = NULL; +} + diff --git a/src/main.c b/src/main.c new file mode 100755 index 0000000..ee057f7 --- /dev/null +++ b/src/main.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "home/home_manager.h" + +int main(int argc, char *argv[]) +{ + _I("Starting w-home"); + + ui_app_lifecycle_callback_s lifecycle_callback = {0, }; + app_event_handler_h event_handlers[5] = {NULL, }; + + lifecycle_callback.create = home_create_cb; + lifecycle_callback.app_control = home_app_control_cb; + lifecycle_callback.resume = home_resume_cb; + lifecycle_callback.pause = home_pause_cb; + lifecycle_callback.terminate = home_terminate_cb; + + ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, NULL, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, NULL, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, home_language_changed_cb, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL); + + int ret = ui_app_main(argc, argv, &lifecycle_callback, NULL); + if (ret) { + _E("app_main() is failed. err = %d", ret); + } + return ret; +} diff --git a/src/moments/moment_manager.c b/src/moments/moment_manager.c new file mode 100755 index 0000000..214929a --- /dev/null +++ b/src/moments/moment_manager.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "moment/moment.h" + +#include <app.h> + +static struct __moment_manager_s { + HOME_STATE *state; +} s_info = { + .state = NULL, +}; + +static bool __moment_init(void); +static void __moment_fini(void); +static HOME_STATE *__moment_state_new(void); + +extern HOME_STATE *home_state_new(void); + +HOME_STATE *moment_new(void) +{ + __moment_init(); + + s_info.state = __moment_state_new(); + + return s_info.state; +} + +static bool __moment_init(void) +{ + _D("%s", __func__); + + return true; +} + +static void __moment_fini(void) +{ + +} + +static HOME_STATE *__moment_state_new(void) +{ + HOME_STATE *state = home_state_new(); + state->type = MOMENT; + state->destroy_cb = __moment_fini; + + return state; +} diff --git a/src/notifications/noti_event_manager.c b/src/notifications/noti_event_manager.c new file mode 100755 index 0000000..609d7b6 --- /dev/null +++ b/src/notifications/noti_event_manager.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/callback_handler.h" +#include "notifications/noti_event_manager.h" + +#include <stdlib.h> + +static struct __noti_event_s { + callback_h *changed_cb_handler; +} s_info = { + .changed_cb_handler = NULL, +}; + +static void __notification_changed_cb(void *data, notification_type_e type, notification_op *operation_list, int operation_count); + +bool noti_event_manager_init(void) +{ + _D("%s", __func__); + + int ret = NOTIFICATION_ERROR_NONE; + + ret = notification_register_detailed_changed_cb(__notification_changed_cb, NULL); + + if (ret != NOTIFICATION_ERROR_NONE) { + _E("notification_register_detailed_changed_cb failed [%d]", ret); + return false; + } + + return true; +} + +void noti_event_manager_fini(void) +{ + callback_handler_free(s_info.changed_cb_handler); + s_info.changed_cb_handler = NULL; + + int ret = NOTIFICATION_ERROR_NONE; + ret = notification_unregister_detailed_changed_cb(__notification_changed_cb, NULL); + + if (ret != NOTIFICATION_ERROR_NONE) { + _E("notification_unregister_detailed_changed_cb failed [%d]", ret); + } +} + +void noti_event_manager_add_changed_cb(void(*cb)(void *noti_info)) +{ + if (s_info.changed_cb_handler == NULL) { + s_info.changed_cb_handler = callback_handler_new("noti_manager"); + } + + callback_handler_add_cb(s_info.changed_cb_handler, cb); +} + +void noti_event_manager_del_changed_cb(void(*cb)(void *noti_info)) +{ + callback_handler_del_cb(s_info.changed_cb_handler, cb); +} + +static void __notification_changed_cb(void *data, notification_type_e type, notification_op *operation_list, int operation_count) +{ + if (operation_list == NULL || operation_count < 1) { + _E("Invalid parameter"); + return; + } + + int i = 0; + noti_message_t *info = (noti_message_t *)malloc(sizeof(noti_message_t)); + if (info == NULL) { + _E("failed to malloc"); + return ; + } + + info->id = 0; + info->noti_handler = NULL; + info->operation_type = NOTIFICATION_OP_NONE; + for (i = 0; i < operation_count; i++) { + notification_op_get_data(operation_list + i, NOTIFICATION_OP_DATA_NOTI, &info->noti_handler); + notification_op_get_data(operation_list + i, NOTIFICATION_OP_DATA_PRIV_ID, &info->id); + notification_op_get_data(operation_list + i, NOTIFICATION_OP_DATA_TYPE, &info->operation_type); + + _D("notification id [%d], operation type [%d]", info->id, info->operation_type); + callback_handler_execute_cb(s_info.changed_cb_handler, info); + } +} diff --git a/src/notifications/noti_full_popup.c b/src/notifications/noti_full_popup.c new file mode 100755 index 0000000..526fb02 --- /dev/null +++ b/src/notifications/noti_full_popup.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "notifications/noti_full_popup.h" + +void noti_full_popup_show(notification_h noti_handler) +{ + +} diff --git a/src/notifications/noti_manager.c b/src/notifications/noti_manager.c new file mode 100755 index 0000000..c7f9091 --- /dev/null +++ b/src/notifications/noti_manager.c @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "home/home_state.h" +#include "notifications/notifications.h" +#include "notifications/noti_event_manager.h" +#include "notifications/noti_popup_manager.h" +#include "notifications/noti_view.h" + +static struct __noti_manager_s { + HOME_STATE *state; +} s_info = { + .state = NULL, +}; + +static bool __noti_init(void); +static void __noti_fini(void); +static HOME_STATE *__noti_state_new(void); + +extern HOME_STATE *home_state_new(void); + +HOME_STATE *notifications_new() +{ + if (__noti_init() == false) { + goto __fail; + } + + s_info.state = __noti_state_new(); + if (s_info.state == NULL) { + goto __fail; + } + + return s_info.state; + +__fail: + home_state_destroy(s_info.state); + __noti_fini(); + return NULL; +} + +static bool __noti_init(void) +{ + _D("%s", __func__); + + if (noti_event_manager_init() == false) { + _E("failed to initialize notification event manager"); + } + + if (noti_popup_manager_init() == false) { + _E("failed to initialize notification popup manager"); + } + + if (noti_view_create_base_ui() == false) { + _E("failed to create notifications ui"); + return false; + } + + return true; +} + +static void __noti_fini(void) +{ + s_info.state = NULL; + noti_view_destroy(); + + noti_popup_manager_fini(); + noti_event_manager_fini(); +} + +static HOME_STATE *__noti_state_new(void) +{ + HOME_STATE *state = home_state_new(); + state->type = NOTIFICATIONS; + state->destroy_cb = __noti_fini; + + return state; +} diff --git a/src/notifications/noti_popup_manager.c b/src/notifications/noti_popup_manager.c new file mode 100755 index 0000000..1ffa314 --- /dev/null +++ b/src/notifications/noti_popup_manager.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "home/home_manager.h" +#include "notifications/noti_info.h" +#include "notifications/noti_event_manager.h" +#include "notifications/noti_popup_manager.h" +#include "notifications/noti_full_popup.h" +#include "notifications/noti_small_popup.h" + +static void __show_popup(void *noti_info); + +bool noti_popup_manager_init(void) +{ + noti_event_manager_add_changed_cb(__show_popup); + + return true; +} + +void noti_popup_manager_fini(void) +{ + noti_event_manager_del_changed_cb(__show_popup); +} + +static void __show_popup(void *noti_info) +{ + noti_message_t *info = (noti_message_t *)noti_info; + if (info->operation_type != NOTIFICATION_OP_INSERT) { + return ; + } + + HOME_STATE *state = home_get_current_state(); + if (state && state->type == CLOCK && state->is_visible_cb) { + noti_full_popup_show(info->noti_handler); + return ; + } + + noti_small_popup_show(info->noti_handler); +} + diff --git a/src/notifications/noti_small_popup.c b/src/notifications/noti_small_popup.c new file mode 100755 index 0000000..4e778e2 --- /dev/null +++ b/src/notifications/noti_small_popup.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "notifications/noti_full_popup.h" + +void noti_small_popup_show(notification_h noti_handler) +{ + +} diff --git a/src/notifications/noti_view.c b/src/notifications/noti_view.c new file mode 100755 index 0000000..11f892f --- /dev/null +++ b/src/notifications/noti_view.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "home/home_win.h" +#include "notifications/noti_view.h" +#include "notifications/noti_scroller.h" +#include "notifications/noti_info.h" + +#include <stdlib.h> + +static struct __noti_veiw_s { + home_scroller_t *scroller; + Evas_Object *base_layout; +} s_info = { + .scroller = NULL, + .base_layout = NULL, +}; + +static bool __create_base_ui(void); +static void __destroy_base_ui(void); + +bool noti_view_create_base_ui(void) +{ + s_info.scroller = noti_scroller_get(); + + if (s_info.scroller == NULL) { + _E("failed to get scroller"); + return false; + } + + if (__create_base_ui() == false) { + _E("failed to create notifications ui"); + return false; + } + + return true; +} + +void noti_view_destroy(void) +{ + __destroy_base_ui(); +} + +static bool __create_base_ui(void) +{ + s_info.base_layout = s_info.scroller->box; + noti_message_t *tmp_noti = noti_info_new(s_info.base_layout); + + Evas_Object *tmp_object = elm_label_add(s_info.base_layout); + elm_object_text_set(tmp_object, "<align=center>NOTI</align>"); + evas_object_size_hint_weight_set(tmp_object, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(tmp_object, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_min_set(tmp_object, WINDOW_W, WINDOW_H); + evas_object_resize(tmp_object, WINDOW_W, WINDOW_H); + evas_object_show(tmp_object); + + noti_info_set_content(tmp_noti, tmp_object); + noti_scroller_push_noti(tmp_noti); + + return true; + +__fail: + __destroy_base_ui(); + return false; +} + +static void __destroy_base_ui(void) +{ + +} diff --git a/src/widgets/widgets_manager.c b/src/widgets/widgets_manager.c new file mode 100755 index 0000000..f793a0d --- /dev/null +++ b/src/widgets/widgets_manager.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "widgets/widgets.h" +#include "widgets/widgets_view.h" + +static struct __widgets_manager_s { + HOME_STATE *state; +} s_info = { + .state = NULL, +}; + +static bool __widgets_init(void); +static void __widgets_fini(void); +static HOME_STATE *__widgets_state_new(void); + +extern HOME_STATE *home_state_new(void); + +HOME_STATE *widgets_new() +{ + if (__widgets_init() == false) { + _E("failed to create widget ui"); + goto __fail; + } + + s_info.state = __widgets_state_new(); + if (s_info.state == NULL) { + goto __fail; + } + + return s_info.state; + +__fail: + home_state_destroy(s_info.state); + __widgets_fini(); + return false; +} + +static bool __widgets_init(void) +{ + _D("%s", __func__); + + if (widgets_view_create_base_ui() == false) { + _E("failed to create clock ui"); + return false; + } + + return true; +} + +static void __widgets_fini(void) +{ + s_info.state = NULL; + widgets_view_destroy(); +} + +static HOME_STATE *__widgets_state_new(void) +{ + HOME_STATE *state = home_state_new(); + state->type = WIDGETS; + state->destroy_cb = __widgets_fini; + + return state; +} diff --git a/src/widgets/widgets_view.c b/src/widgets/widgets_view.c new file mode 100755 index 0000000..b45ba33 --- /dev/null +++ b/src/widgets/widgets_view.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.1 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "common/log.h" +#include "common/conf.h" +#include "widgets/widgets_view.h" +#include "widgets/widgets_scroller.h" +#include "widgets/widget_info.h" + +#include <stdlib.h> + +static struct __widgets_veiw_s { + home_scroller_t *scroller; + Evas_Object *base_layout; +} s_info = { + .scroller = NULL, + .base_layout = NULL, +}; + +static bool __create_base_ui(void); +static void __destroy_base_ui(void); + +bool widgets_view_create_base_ui(void) +{ + s_info.scroller = widgets_scroller_get(); + + if (s_info.scroller == NULL) { + _E("failed to get scroller"); + return false; + } + + if (__create_base_ui() == false) { + _E("failed to create widgets ui"); + return false; + } + + return true; +} + +void widgets_view_destroy(void) +{ + __destroy_base_ui(); +} + +static bool __create_base_ui(void) +{ + s_info.base_layout = s_info.scroller->box; + widget_info_t *tmp_widget = widget_info_new(s_info.base_layout); + + Evas_Object *tmp_object = elm_label_add(s_info.base_layout); + elm_object_text_set(tmp_object, "<align=center>WIDGETS</align>"); + evas_object_size_hint_weight_set(tmp_object, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(tmp_object, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_min_set(tmp_object, WINDOW_W, WINDOW_H); + evas_object_resize(tmp_object, WINDOW_W, WINDOW_H); + evas_object_show(tmp_object); + + widget_info_set_content(tmp_widget, tmp_object); + widgets_scroller_push_widget(tmp_widget); + + return true; +} + +static void __destroy_base_ui(void) +{ + widgets_scroller_pop_all(); +} |