Multi-profile support 51/34751/6
authortaeyoon <taeyoon0.lee@samsung.com>
Mon, 2 Feb 2015 11:10:31 +0000 (20:10 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 4 Feb 2015 18:02:07 +0000 (10:02 -0800)
 - Spec file change for build by tizen 3.0 profile
 - Source file change of mobile profile
 - Configure.ac change (efl-assist removal, gles20)

Change-Id: I8aa9eb8f41ea1529e9571a557e1556e617d8e6da

adaptors/mobile/mobile-color-controller-impl.cpp
adaptors/mobile/mobile-system-settings.cpp
adaptors/x11/event-handler-x.cpp
adaptors/x11/window-impl-x.cpp
build/tizen/configure.ac
packaging/dali-adaptor-common.spec [new file with mode: 0644]
packaging/dali-adaptor.spec

index 2a0a0e0644494e65f1dbfbba966bd214e908d1a7..732d459d8fcd10871e4eca5ce7281446a447f423 100644 (file)
@@ -21,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/type-registry.h>
-#include <efl_assist_theme.h>
 
 // INTERNAL INCLUDES
 #include <singleton-service-impl.h>
@@ -81,61 +80,11 @@ ColorController::~ColorController()
 
 bool ColorController::RetrieveColor( const std::string& colorCode, Vector4& colorValue )
 {
-  int R = 0;
-  int G = 0;
-  int B = 0;
-  int A = 0;
-
-  if( ea_theme_color_get(colorCode.c_str(), &R, &G, &B, &A, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) )
-  {
-    colorValue.r = (float) (R) / 255.0f;
-    colorValue.g = (float) (G) / 255.0f;
-    colorValue.b = (float) (B) / 255.0f;
-    colorValue.a = (float) (A) / 255.0f;
-
-    return true;
-  }
-
   return false;
 }
 
 bool ColorController::RetrieveColor( const std::string& colorCode , Vector4& textColor, Vector4& textOutlineColor, Vector4& textShadowColor)
 {
-  int R = 0;
-  int G = 0;
-  int B = 0;
-  int A = 0;
-
-  int outlineR = 0;
-  int outlineG = 0;
-  int outlineB = 0;
-  int outlineA = 0;
-
-  int shadowR = 0;
-  int shadowG = 0;
-  int shadowB = 0;
-  int shadowA = 0;
-
-  if( ea_theme_color_get(colorCode.c_str(), &R, &G, &B, &A, &outlineR, &outlineG, &outlineB, &outlineA, &shadowR, &shadowG, &shadowB, &shadowA) )
-  {
-    textColor.r = (float) (R) / 255.0f;
-    textColor.g = (float) (G) / 255.0f;
-    textColor.b = (float) (B) / 255.0f;
-    textColor.a = (float) (A) / 255.0f;
-
-    textOutlineColor.r = (float) (outlineR) / 255.0f;
-    textOutlineColor.g = (float) (outlineG) / 255.0f;
-    textOutlineColor.b = (float) (outlineB) / 255.0f;
-    textOutlineColor.a = (float) (outlineA) / 255.0f;
-
-    textShadowColor.r = (float) (shadowR) / 255.0f;
-    textShadowColor.g = (float) (shadowG) / 255.0f;
-    textShadowColor.b = (float) (shadowB) / 255.0f;
-    textShadowColor.a = (float) (shadowA) / 255.0f;
-
-    return true;
-  }
-
   return false;
 }
 
index 493a50131c238a8f126dd9e6df51e75c90f557bd..446078f4ccec3fbd2d63a7e2ed953c4c9fefed5d 100644 (file)
@@ -33,21 +33,12 @@ namespace Adaptor
 
 int GetLongPressTime( int defaultTime )
 {
-  int delay( 0 );
-
-  // read system setting
-  if( SYSTEM_SETTINGS_ERROR_NONE != system_settings_get_value_int(SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, &delay ) )
-  {
-    // on error, return default
-    delay = defaultTime;
-  }
-
-  return delay;
+  return defaultTime;
 }
 
 int GetElmAccessActionOver()
 {
-  return ELM_ACCESS_ACTION_OVER;
+  return 0;
 }
 
 } // namespace Adaptor
index 79705d0da5fc3efdcddfc34c0fb3929bf7cf72fa..05ca436fac38a306235d33e31a636d3ea9d6da32 100644 (file)
@@ -236,9 +236,6 @@ struct EventHandler::Impl
       // Register Vconf notify - font name, font size and style
       vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged, handler );
       vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, handler );
-#if defined(DALI_PROFILE_MOBILE) || defined(DALI_PROFILE_LITE)
-      vconf_notify_key_changed( VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, VconfNotifyThemeChanged, handler );
-#endif
 #endif // DALI_PROFILE_UBUNTU
     }
   }
@@ -249,9 +246,6 @@ struct EventHandler::Impl
   ~Impl()
   {
 #ifndef DALI_PROFILE_UBUNTU
-#if defined(DALI_PROFILE_MOBILE) || defined(DALI_PROFILE_LITE)
-    vconf_ignore_key_changed( VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, VconfNotifyThemeChanged );
-#endif
     vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged );
     vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged );
 #endif // DALI_PROFILE_UBUNTU
index a2d051f117b3d2ee3c2ff8856c37a2b1193ce139..71a2925d3c7174e91d65ca766457834f125560ab 100644 (file)
@@ -270,7 +270,7 @@ void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
 #if defined(DALI_PROFILE_MOBILE)
     else if ( mIndicatorOpacityMode == Dali::Window::TRANSPARENT )
     {
-      ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_BG_TRANSPARENT);
+      ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_OPAQUE);
     }
 #endif
   }
index d29fe1f259550c0988b486d23f91c5ebd8879d64..3b0590ffe3083ef4e9534df3838c9103413caeb9 100644 (file)
@@ -151,29 +151,9 @@ AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
 # should not disable features. This allows the developer to override
 # features through the command line.
 
-if test "x$enable_profile" = "xCOMMON"; then
 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-fi
-
-if test "x$enable_profile" = "xMOBILE"; then
-PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
-fi
-
-if test "x$enable_profile" = "xLITE"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-fi
-
-if test "x$enable_profile" = "xWEARABLE"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-fi
-
-if test "x$enable_profile" = "xTV"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-fi
 
-if test "x$enable_profile" = "xUBUNTU"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-else
+if test "x$enable_profile" != "xUBUNTU"; then
 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
 PKG_CHECK_MODULES(DLOG, dlog)
 PKG_CHECK_MODULES(SENSOR, sensor)
@@ -182,10 +162,6 @@ PKG_CHECK_MODULES(VCONF, vconf)
 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
 fi
 
-if test "x$enable_profile" != "xTV" && test "x$enable_profile" != "xUBUNTU"; then
-PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
-fi
-
 if test "x$enable_wayland" = "xyes"; then
 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
                   [DALI_HAS_ECOREWL=yes],
diff --git a/packaging/dali-adaptor-common.spec b/packaging/dali-adaptor-common.spec
new file mode 100644 (file)
index 0000000..cdb83af
--- /dev/null
@@ -0,0 +1,264 @@
+%bcond_with wayland
+
+Name:       dali-adaptor
+Summary:    The DALi Tizen Adaptor
+Version:    1.0.27
+Release:    1
+Group:      System/Libraries
+License:    Apache-2.0
+URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
+Source0:    %{name}-%{version}.tar.gz
+
+%define dali_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+Requires:       boost-thread
+Requires:       giflib
+BuildRequires:  pkgconfig
+BuildRequires:  gawk
+BuildRequires:  pkgconfig(sensor)
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  boost-devel
+BuildRequires:  giflib-devel
+BuildRequires:  pkgconfig(fontconfig)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  libjpeg-turbo-devel
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  dali-devel
+BuildRequires:  dali-integration-devel
+BuildRequires:  libxml2-devel
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  tts-devel
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  libdrm-devel
+BuildRequires:  pkgconfig(libexif)
+BuildRequires:  pkgconfig(capi-system-system-settings)
+BuildRequires:  pkgconfig(efl-assist)
+BuildRequires:  pkgconfig(libpng)
+%if %{with wayland}
+BuildRequires:  pkgconfig(glesv2)
+BuildRequires:  pkgconfig(egl)
+BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(wayland-egl)
+BuildRequires:  pkgconfig(wayland-client)
+%else
+BuildRequires:  pkgconfig(xi)
+BuildRequires:  pkgconfig(xfixes)
+BuildRequires:  pkgconfig(xdamage)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(gles20)
+%endif
+
+%if 0%{?dali_assimp_plugin}
+BuildRequires:  pkgconfig(assimp)
+%endif
+
+%description
+The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
+platform abstraction and application shell
+
+##############################
+# devel
+##############################
+%package devel
+Summary:    Development components for the DALi Tizen Adaptor
+Group:      Development/Building
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Development components for the DALi Tizen Adaptor - public headers and package configs
+
+##############################
+# Dali Feedback Plugin
+##############################
+%package dali-feedback-plugin
+Summary:    Plugin to play haptic and audio feedback for Dali
+Group:      System/Libraries
+%if 0%{?dali_feedback_plugin}
+#Requires:       libdeviced
+BuildRequires:  pkgconfig(mm-sound)
+BuildRequires:  pkgconfig(haptic)
+BuildRequires:  libfeedback-devel
+%endif
+
+%description dali-feedback-plugin
+Feedback plugin to play haptic and audio feedback for Dali
+
+##############################
+# Dali Dynamics/Bullet Plugin
+##############################
+%package dali-bullet-plugin
+Summary:    Plugin to provide physics
+Group:      System/Libraries
+%if 0%{?dali_bullet_plugin}
+BuildRequires:  pkgconfig(bullet)
+%endif
+
+%description dali-bullet-plugin
+Dynamics plugin to wrap the libBulletDynamics libraries
+
+##############################
+# Preparation
+##############################
+%prep
+%setup -q
+%define dali_data_rw_dir         /usr/share/dali/
+%define dali_data_ro_dir         /usr/share/dali/
+%define user_font_cache_dir      %{dali_data_rw_dir}/glyphcache/
+%define user_shader_cache_dir    %{dali_data_rw_dir}/core/shaderbin/
+%define font_preloaded_path      /usr/share/fonts/
+%define font_downloaded_path     /opt/share/fonts/
+%define font_application_path    /usr/share/app_fonts/
+%define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
+%define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
+%define dali_plugin_theme_files  %{dali_data_ro_dir}/themes/feedback-themes/
+
+%define dev_include_path %{_includedir}
+
+##############################
+# Build
+##############################
+%build
+PREFIX+="/usr"
+CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
+LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections "
+
+%ifarch %{arm}
+CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
+%endif
+
+%if %{with wayland}
+CFLAGS+=" -DWAYLAND"
+CXXFLAGS+=" -DWAYLAND"
+configure_flags="--enable-wayland"
+%endif
+
+libtoolize --force
+cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
+cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}"
+
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=COMMON \
+%if 0%{?dali_feedback_plugin}
+           --enable-feedback \
+%endif
+%if 0%{?dali_bullet_plugin}
+           --enable-bullet \
+%endif
+%if 0%{?dali_assimp_plugin}
+           --enable-assimp \
+%endif
+           $configure_flags --libdir=%{_libdir}
+
+make %{?jobs:-j%jobs}
+
+##############################
+# Installation
+##############################
+%install
+rm -rf %{buildroot}
+cd build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+
+# LICENSE
+mkdir -p %{buildroot}/usr/share/license
+cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
+
+##############################
+# Upgrade order:
+# 1 - Pre Install new package
+# 2 - Install new package
+# 3 - Post install new package
+# 4 - Pre uninstall old package
+# 5 - Remove files not overwritten by new package
+# 6 - Post uninstall old package
+##############################
+
+%pre
+rm -f %{user_font_cache_dir}/*
+rm -f %{user_shader_cache_dir}/*
+exit 0
+
+##############################
+#  Post Install new package
+##############################
+%post
+/sbin/ldconfig
+chown 5000:5000 %{user_font_cache_dir}
+chown 5000:5000 %{user_shader_cache_dir}
+exit 0
+
+%if 0%{?dali_feedback_plugin}
+%post dali-feedback-plugin
+/sbin/ldconfig
+exit 0
+%endif
+
+%if 0%{?dali_bullet_plugin}
+%post dali-bullet-plugin
+/sbin/ldconfig
+exit 0
+%endif
+
+##############################
+#   Pre Uninstall old package
+##############################
+%preun
+rm -f %{user_font_cache_dir}/*
+rm -f %{user_shader_cache_dir}/*
+exit 0
+
+##############################
+#   Post Uninstall old package
+##############################
+%postun
+/sbin/ldconfig
+exit 0
+
+%if 0%{?dali_feedback_plugin}
+%postun dali-feedback-plugin
+/sbin/ldconfig
+exit 0
+%endif
+
+%if 0%{?dali_bullet_plugin}
+%postun dali-bullet-plugin
+/sbin/ldconfig
+exit 0
+%endif
+
+##############################
+# Files in Binary Packages
+##############################
+
+%files
+%manifest dali-adaptor.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-adap*.so*
+%defattr(-,app,app,-)
+%dir %{user_font_cache_dir}
+%dir %{user_shader_cache_dir}
+%{_bindir}/*
+%{_datadir}/license/%{name}
+
+%files devel
+%defattr(-,root,root,-)
+%{dev_include_path}/dali/*
+%{_libdir}/pkgconfig/dali*.pc
+
+%if 0%{?dali_feedback_plugin}
+%files dali-feedback-plugin
+%defattr(-,root,root,-)
+%{_libdir}/libdali-feedback-plugin.so*
+%{dali_plugin_sound_files}/*
+%{dali_plugin_theme_files}/*
+%endif
+
+%if 0%{?dali_bullet_plugin}
+%files dali-bullet-plugin
+%defattr(-,root,root,-)
+%{_libdir}/libdali-bullet-plugin.so*
+%endif
index cdb83af8aee26e0f288e96564d060c538710ec5f..4593971049f1d91b3621cf06f16155253ae38d54 100644 (file)
@@ -9,9 +9,33 @@ License:    Apache-2.0
 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
 Source0:    %{name}-%{version}.tar.gz
 
+%if "%{profile}" == "mobile"
+%define dali_profile MOBILE
 %define dali_feedback_plugin 0
 %define dali_bullet_plugin 0
 %define dali_assimp_plugin 0
+%endif
+
+%if "%{profile}" == "tv"
+%define dali_profile TV
+%define dali_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
+%endif
+
+%if "%{profile}" == "wearable"
+%define dali_profile WEARABLE
+%define dali_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
+%endif
+
+%if "%{profile}" == "common"
+%define dali_profile COMMON
+%define dali_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
+%endif
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -37,11 +61,11 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  libdrm-devel
 BuildRequires:  pkgconfig(libexif)
 BuildRequires:  pkgconfig(capi-system-system-settings)
-BuildRequires:  pkgconfig(efl-assist)
 BuildRequires:  pkgconfig(libpng)
-%if %{with wayland}
 BuildRequires:  pkgconfig(glesv2)
 BuildRequires:  pkgconfig(egl)
+
+%if %{with wayland}
 BuildRequires:  pkgconfig(ecore-wayland)
 BuildRequires:  pkgconfig(wayland-egl)
 BuildRequires:  pkgconfig(wayland-client)
@@ -50,7 +74,6 @@ BuildRequires:  pkgconfig(xi)
 BuildRequires:  pkgconfig(xfixes)
 BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(utilX)
-BuildRequires:  pkgconfig(gles20)
 %endif
 
 %if 0%{?dali_assimp_plugin}
@@ -141,7 +164,7 @@ libtoolize --force
 cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
 cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}"
 
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=COMMON \
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=%{dali_profile} \
 %if 0%{?dali_feedback_plugin}
            --enable-feedback \
 %endif
@@ -235,7 +258,19 @@ exit 0
 ##############################
 
 %files
+
+%if "%{profile}" == "mobile" || "%{profile}" == "wearable"
+%manifest dali-adaptor.manifest-mobile
+%endif
+
+%if "%{profile}" == "tv"
+%manifest dali-adaptor.manifest-tv
+%endif
+
+%if "%{profile}" == "common"
 %manifest dali-adaptor.manifest
+%endif
+
 %defattr(-,root,root,-)
 %{_libdir}/libdali-adap*.so*
 %defattr(-,app,app,-)