Support to build against ubuntu environment. 45/25145/15
authorFrancisco Santos <f1.santos@samsung.com>
Wed, 16 Jul 2014 16:25:13 +0000 (17:25 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 7 Aug 2014 12:57:22 +0000 (13:57 +0100)
Change-Id: I59e1aa0adc3a3f32cde756ae816e71d955fd1a8e
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
60 files changed:
README
adaptors/base/render-thread.cpp
adaptors/common/accessibility-manager-impl.cpp [deleted file]
adaptors/common/file.list
adaptors/common/framework.cpp [deleted file]
adaptors/common/native-bitmap-buffer-impl.cpp
adaptors/common/style-monitor-impl.cpp
adaptors/common/system-settings.cpp
adaptors/common/tilt-sensor-impl.cpp [deleted file]
adaptors/common/tilt-sensor-impl.h [deleted file]
adaptors/common/tts-player-impl.cpp [deleted file]
adaptors/common/tts-player-impl.h [deleted file]
adaptors/common/vsync-monitor.cpp [deleted file]
adaptors/mobile/file.list
adaptors/public-api/file.list
adaptors/tizen/accessibility-manager-impl-tizen.cpp [new file with mode: 0644]
adaptors/tizen/file.list [new file with mode: 0644]
adaptors/tizen/framework-tizen.cpp [new file with mode: 0644]
adaptors/tizen/tilt-sensor-impl-tizen.cpp [new file with mode: 0644]
adaptors/tizen/tilt-sensor-impl.h [new file with mode: 0644]
adaptors/tizen/tts-player-impl-tizen.cpp [new file with mode: 0644]
adaptors/tizen/tts-player-impl.h [new file with mode: 0644]
adaptors/tizen/vsync-monitor-tizen.cpp [new file with mode: 0644]
adaptors/tv/file.list
adaptors/ubuntu/accessibility-manager-impl-ubuntu.cpp [new file with mode: 0644]
adaptors/ubuntu/accessibility-manager-impl.h [new file with mode: 0644]
adaptors/ubuntu/file.list [new file with mode: 0644]
adaptors/ubuntu/framework-ubuntu.cpp [new file with mode: 0644]
adaptors/ubuntu/key-impl-ubuntu.cpp [new file with mode: 0644]
adaptors/ubuntu/tilt-sensor-impl-ubuntu.cpp [new file with mode: 0644]
adaptors/ubuntu/tilt-sensor-impl.h [new file with mode: 0644]
adaptors/ubuntu/tts-player-impl-ubuntu.cpp [new file with mode: 0644]
adaptors/ubuntu/tts-player-impl.h [new file with mode: 0644]
adaptors/ubuntu/vsync-monitor-ubuntu.cpp [new file with mode: 0644]
adaptors/wayland/event-handler-wl.cpp
adaptors/wayland/file.list
adaptors/wayland/system-settings-wl.cpp
adaptors/x11/egl-implementation-x.cpp
adaptors/x11/event-handler-x.cpp
adaptors/x11/file.list
adaptors/x11/imf-manager-impl-x.cpp
adaptors/x11/system-settings-x.cpp
adaptors/x11/window-impl-x.cpp
adaptors/x11/window-render-surface-x.cpp
automated-tests/src/dali-adaptor-internal/CMakeLists.txt
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-touch-utils.h [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-trace-call-stack.h
build/tizen/.gitignore
build/tizen/Makefile.am
build/tizen/README [deleted file]
build/tizen/common/Makefile.am
build/tizen/configure.ac
build/tizen/dali-application/Makefile.am
platform-abstractions/slp/resource-loader/loader-ico.cpp
platform-abstractions/slp/resource-loader/loader-wbmp.cpp
platform-abstractions/slp/slp-logging.cpp
platform-abstractions/slp/slp-platform-abstraction.cpp

diff --git a/README b/README
index d33be28af544c8da23ac28e3e90d5fcfc890fe24..1f71860600178b76b791c6dfc03d7f875777b6c7 100644 (file)
--- a/README
+++ b/README
@@ -1,17 +1,73 @@
-GBS Builds
-==========
+T.O.C.
+======
 
-COMMON Profile
---------------
+ 1.   GBS Builds
+ 1.1. COMMON Profile
+ 1.2. MOBILE Profile
+ 1.3. WEARABLE Profile
+ 2.   Building for Ubuntu desktop
+ 2.1. Minimum Requirements
+ 2.2. Building the Repository
+ 3.   Troubleshooting
+ 3.1. JPEG Library Linking Errors
 
-gbs build -A [TARGET_ARCH]
 
-MOBILE Profile
---------------
 
-gbs build -A [TARGET_ARCH] --spec dali-adaptor-mobile.spec
+1. GBS Builds
+=============
 
-WEARABLE Profile
-----------------
+1.1. COMMON Profile
+-------------------
+
+ gbs build -A [TARGET_ARCH]
+
+1.2. MOBILE Profile
+-------------------
+
+ gbs build -A [TARGET_ARCH] --spec dali-adaptor-mobile.spec
+
+1.3. WEARABLE Profile
+---------------------
+
+ gbs build -A [TARGET_ARCH] --spec dali-adaptor-wearable.spec
+
+
+
+2. Building for Ubuntu desktop
+==============================
+
+2.1. Minimum Requirements
+------------------------
+
+ - Ubuntu 14.04
+ - Environment created using dali_env script in dali-core repository
+
+2.2. Building the Repository
+----------------------------
+
+To build the repository enter the 'build/tizen' folder:
+
+ cd dali-adaptor/build/tizen
+
+Then run the following commands:
+
+ autoreconf --install
+ ./configure --prefix=$DESKTOP_PREFIX --enable-profile=UBUNTU --enable-gles=20
+ make install -j8
+
+
+
+3. Troubleshooting
+==================
+
+3.1. JPEG Library Linking Errors
+--------------------------------
+
+If you have linking problems with libjpeg, then you may have to create a symbolic link to the library:
+
+ - Navigate to where the library is (for example /usr/lib/x86_64-linux-gnu).
+ - Create a symbolic link:
+    sudo ln -s libjpeg.so.8 libjpeg.so
+    sudo chmod 777 libjpeg.so
+   (Change the version number of your libjpeg library accordingly)
 
-gbs build -A [TARGET_ARCH] --spec dali-adaptor-wearable.spec
index 446cf1b8f5409cb8b3dc6e8f9047c40cdf8ef4ce..6b0fe14058a7feb1066dcb927989b3bf5578c327 100644 (file)
@@ -242,11 +242,6 @@ void RenderThread::InitializeEgl()
   // tell core it has a context
   mCore.ContextCreated();
 
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VENDOR : %s ***\n", mGLES.GetString(GL_VENDOR));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_RENDERER : %s ***\n", mGLES.GetString(GL_RENDERER));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VERSION : %s ***\n", mGLES.GetString(GL_VERSION));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_SHADING_LANGUAGE_VERSION : %s***\n", mGLES.GetString(GL_SHADING_LANGUAGE_VERSION));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** Supported Extensions ***\n%s\n\n", mGLES.GetString(GL_EXTENSIONS));
 }
 
 void RenderThread::ConsumeEvents()
diff --git a/adaptors/common/accessibility-manager-impl.cpp b/adaptors/common/accessibility-manager-impl.cpp
deleted file mode 100644 (file)
index 9cd164f..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "accessibility-manager-impl.h"
-
-// EXTERNAL INCLUDES
-#include <vconf.h>
-
-#include <dali/public-api/dali-core.h>
-#include <dali/integration-api/debug.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/gesture-requests.h>
-#include "system-settings.h"
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-#if defined(DEBUG_ENABLED)
-Debug::Filter* gAccessibilityManagerLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_MANAGER");
-#endif
-
-void AccessibilityOnOffNotification(keynode_t* node, void* data)
-{
-  AccessibilityManager* manager = static_cast<AccessibilityManager*>(data);
-  int isEnabled = 0;
-  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
-
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
-
-  if(isEnabled == 1)
-  {
-    manager->EnableAccessibility();
-  }
-  else
-  {
-    manager->DisableAccessibility();
-  }
-}
-
-BaseHandle Create()
-{
-  BaseHandle handle( AccessibilityManager::Get() );
-
-  if ( !handle && Adaptor::IsAvailable() )
-  {
-    Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
-    Dali::AccessibilityManager manager = Dali::AccessibilityManager( new AccessibilityManager() );
-    adaptorImpl.RegisterSingleton( typeid( manager ), manager );
-    handle = manager;
-  }
-
-  return handle;
-}
-TypeRegistration ACCESSIBILITY_MANAGER_TYPE( typeid(Dali::AccessibilityManager), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
-
-} // unnamed namespace
-
-Dali::AccessibilityManager AccessibilityManager::Get()
-{
-  Dali::AccessibilityManager manager;
-
-  if ( Adaptor::IsAvailable() )
-  {
-    // Check whether the singleton is already created
-    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::AccessibilityManager ) );
-    if(handle)
-    {
-      // If so, downcast the handle
-      manager = Dali::AccessibilityManager( dynamic_cast< AccessibilityManager* >( handle.GetObjectPtr() ) );
-    }
-  }
-
-  return manager;
-}
-
-Vector2 AccessibilityManager::GetReadPosition() const
-{
-  return mReadPosition;
-}
-
-void AccessibilityManager::SetActionHandler(AccessibilityActionHandler& handler)
-{
-  mActionHandler = &handler;
-}
-
-void AccessibilityManager::SetGestureHandler(AccessibilityGestureHandler& handler)
-{
-  if( mAccessibilityGestureDetector )
-  {
-    mAccessibilityGestureDetector->SetGestureHandler(handler);
-  }
-}
-
-bool AccessibilityManager::HandleActionClearFocusEvent()
-{
-  bool ret = false;
-
-  Dali::AccessibilityManager handle( this );
-
-  /*
-   * In order to application decide reading action first,
-   * emit ActionClearFocus signal in first, ClearAccessibilityFocus for handler in next
-   */
-  if ( !mIndicatorFocused )
-  {
-    if( !mActionClearFocusSignalV2.Empty() )
-    {
-      mActionClearFocusSignalV2.Emit( handle );
-    }
-  }
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->ClearAccessibilityFocus();
-  }
-
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
-  return ret;
-}
-
-bool AccessibilityManager::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
-{
-  bool ret = false;
-
-  Dali::AccessibilityManager handle( this );
-
-  Dali::TouchEvent touchEvent(timeStamp);
-  touchEvent.points.push_back(point);
-
-  /*
-   * In order to application decide touch action first,
-   * emit ActionScroll signal in first, AccessibilityActionScroll  for handler in next
-   */
-  if ( !mIndicatorFocused )
-  {
-    if( !mActionScrollSignalV2.Empty() )
-    {
-      mActionScrollSignalV2.Emit( handle, touchEvent );
-    }
-  }
-
-  Integration::TouchEvent event;
-  if (mCombiner.GetNextTouchEvent(point, timeStamp, event))
-  {
-    // Process the touch event in accessibility gesture detector
-    if( mAccessibilityGestureDetector )
-    {
-      mAccessibilityGestureDetector->SendEvent(event);
-      ret = true;
-    }
-  }
-
-  return ret;
-}
-
-bool AccessibilityManager::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
-  bool ret = false;
-
-  Dali::TouchEvent touchEvent(timeStamp);
-  touchEvent.points.push_back(point);
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->AccessibilityActionTouch(touchEvent);
-  }
-  return ret;
-}
-
-bool AccessibilityManager::HandleActionBackEvent()
-{
-  bool ret = false;
-
-  Dali::AccessibilityManager handle( this );
-
-  /*
-   * In order to application decide reading action first,
-   * emit ActionBack signal in first, AccessibilityActionBack for handler in next
-   */
-  if ( !mIndicatorFocused )
-  {
-    if( !mActionBackSignalV2.Empty() )
-    {
-      mActionBackSignalV2.Emit( handle );
-    }
-  }
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->AccessibilityActionBack();
-  }
-
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
-  return ret;
-}
-
-void AccessibilityManager::HandleActionEnableEvent()
-{
-  EnableAccessibility();
-}
-
-void AccessibilityManager::HandleActionDisableEvent()
-{
-  DisableAccessibility();
-}
-
-void AccessibilityManager::EnableAccessibility()
-{
-  if(mIsEnabled == false)
-  {
-    mIsEnabled = true;
-
-    if( mActionHandler )
-    {
-      mActionHandler->ChangeAccessibilityStatus();
-    }
-
-    //emit status changed signal
-    Dali::AccessibilityManager handle( this );
-    mStatusChangedSignalV2.Emit( handle );
-  }
-}
-
-void AccessibilityManager::DisableAccessibility()
-{
-  if(mIsEnabled == true)
-  {
-    mIsEnabled = false;
-
-    if( mActionHandler )
-    {
-      mActionHandler->ChangeAccessibilityStatus();
-    }
-
-    //emit status changed signal
-    Dali::AccessibilityManager handle( this );
-    mStatusChangedSignalV2.Emit( handle );
-
-    // Destroy the TtsPlayer if exists.
-    Dali::Adaptor& adaptor = Dali::Adaptor::Get();
-    Adaptor::GetImplementation(adaptor).DestroyTtsPlayer(Dali::TtsPlayer::SCREEN_READER);
-  }
-}
-
-bool AccessibilityManager::IsEnabled() const
-{
-  return mIsEnabled;
-}
-
-void AccessibilityManager::SetIndicator(Indicator* indicator)
-{
-  mIndicator = indicator;
-}
-
-AccessibilityManager::AccessibilityManager()
-: mIsEnabled(false),
-  mActionHandler(NULL),
-  mIndicator(NULL),
-  mIndicatorFocused(false)
-{
-  int isEnabled = 0;
-  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
-
-  if(isEnabled == 1)
-  {
-    mIsEnabled = true;
-  }
-  else
-  {
-    mIsEnabled = false;
-  }
-
-  vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, this );
-
-  mAccessibilityGestureDetector = new AccessibilityGestureDetector();
-}
-
-AccessibilityManager::~AccessibilityManager()
-{
-  vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification );
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
index d0f026561aa05477f96fc59605961088adcca5bc..e0abd0d7b1e62d82dd56eac242ddafa31d507862 100644 (file)
@@ -25,18 +25,8 @@ adaptor_common_src_files = \
   $(adaptor_common_dir)/virtual-keyboard.cpp \
   $(adaptor_common_dir)/window.cpp
 
-adaptor_application_src_files = \
-  $(adaptor_common_dir)/application.cpp
-
-adaptor_application_internal_src_files = \
-  $(adaptor_common_dir)/application-impl.cpp \
-  $(adaptor_common_dir)/framework.cpp \
-  $(adaptor_common_dir)/command-line-options.cpp \
-  $(adaptor_common_dir)/abort-handler.cpp
-
 adaptor_common_internal_src_files = \
   $(adaptor_common_dir)/accessibility-gesture-detector.cpp \
-  $(adaptor_common_dir)/accessibility-manager-impl.cpp \
   $(adaptor_common_dir)/adaptor-impl.cpp \
   $(adaptor_common_dir)/clipboard-event-notifier-impl.cpp \
   $(adaptor_common_dir)/drag-and-drop-detector-impl.cpp \
@@ -56,13 +46,10 @@ adaptor_common_internal_src_files = \
   $(adaptor_common_dir)/shared-file.cpp \
   $(adaptor_common_dir)/sound-player-impl.cpp \
   $(adaptor_common_dir)/style-monitor-impl.cpp \
-  $(adaptor_common_dir)/tilt-sensor-impl.cpp  \
   $(adaptor_common_dir)/timer-impl.cpp \
   $(adaptor_common_dir)/trigger-event.cpp \
   $(adaptor_common_dir)/trigger-event-factory.cpp \
-  $(adaptor_common_dir)/tts-player-impl.cpp \
   $(adaptor_common_dir)/virtual-keyboard-impl.cpp \
-  $(adaptor_common_dir)/vsync-monitor.cpp \
   \
   $(adaptor_common_dir)/events/gesture-manager.cpp \
   $(adaptor_common_dir)/events/long-press-gesture-detector.cpp \
@@ -80,7 +67,15 @@ adaptor_common_internal_src_files = \
   $(adaptor_common_dir)/gl/gl-proxy-implementation.cpp \
   $(adaptor_common_dir)/gl/gl-extensions.cpp
 
-adaptor_common_internal_profile_src_files = \
+adaptor_common_internal_default_profile_src_files = \
   $(adaptor_common_dir)/color-controller-impl.cpp \
   $(adaptor_common_dir)/system-settings.cpp
 
+adaptor_common_application_src_files = \
+  $(adaptor_common_dir)/application.cpp
+
+adaptor_common_application_internal_src_files = \
+  $(adaptor_common_dir)/application-impl.cpp \
+  $(adaptor_common_dir)/command-line-options.cpp \
+  $(adaptor_common_dir)/abort-handler.cpp
+
diff --git a/adaptors/common/framework.cpp b/adaptors/common/framework.cpp
deleted file mode 100644 (file)
index c3687b0..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "framework.h"
-
-// EXTERNAL INCLUDES
-#include <app.h>
-#include <bundle.h>
-#include <Ecore.h>
-#include <boost/bind.hpp>
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <callback-manager.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-
-/// Application Status Enum
-enum
-{
-  APP_CREATE,
-  APP_TERMINATE,
-  APP_PAUSE,
-  APP_RESUME,
-  APP_RESET,
-  APP_LANGUAGE_CHANGE,
-};
-
-} // Unnamed namespace
-
-/**
- * Impl to hide EFL data members
- */
-struct Framework::Impl
-{
-  // Constructor
-
-  Impl(void* data)
-  {
-    mEventCallback.create = AppCreate;
-    mEventCallback.terminate = AppTerminate;
-    mEventCallback.pause = AppPause;
-    mEventCallback.resume = AppResume;
-    mEventCallback.service = AppService;
-    mEventCallback.low_memory = NULL;
-    mEventCallback.low_battery = NULL;
-    mEventCallback.device_orientation = DeviceRotated;
-    mEventCallback.language_changed = AppLanguageChange;
-    mEventCallback.region_format_changed = NULL;
-
-    mCallbackManager = CallbackManager::New();
-  }
-
-  ~Impl()
-  {
-    // we're quiting the main loop so
-    // mCallbackManager->RemoveAllCallBacks() does not need to be called
-    // to delete our abort handler
-    delete mCallbackManager;
-  }
-
-  // Data
-
-  boost::function<void(void)> mAbortCallBack;
-  app_event_callback_s mEventCallback;
-  CallbackManager *mCallbackManager;
-  // Static methods
-
-  /**
-   * Called by AppCore on application creation.
-   */
-  static bool AppCreate(void *data)
-  {
-    return static_cast<Framework*>(data)->SlpAppStatusHandler(APP_CREATE);
-  }
-
-  /**
-   * Called by AppCore when the application should terminate.
-   */
-  static void AppTerminate(void *data)
-  {
-    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_TERMINATE);
-  }
-
-  /**
-   * Called by AppCore when the application is paused.
-   */
-  static void AppPause(void *data)
-  {
-    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_PAUSE);
-  }
-
-  /**
-   * Called by AppCore when the application is resumed.
-   */
-  static void AppResume(void *data)
-  {
-    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_RESUME);
-  }
-
-  /**
-   * Called by AppCore when the application is launched from another module (e.g. homescreen).
-   * @param[in] b the bundle data which the launcher module sent
-   */
-  static void AppService(service_h service, void *data)
-  {
-    Framework* framework = static_cast<Framework*>(data);
-
-    if(framework)
-    {
-      bundle *bundleData = NULL;
-      service_to_bundle(service, &bundleData);
-
-      if(bundleData)
-      {
-        // get bundle name
-        char* bundleName = const_cast<char*>(bundle_get_val(bundleData, "name"));
-        if(bundleName != NULL)
-        {
-          framework->SetBundleName(bundleName);
-        }
-
-        // get bundle id
-        char* bundleId = const_cast<char*>(bundle_get_val(bundleData, "id"));
-        if(bundleId != NULL)
-        {
-          framework->SetBundleId(bundleId);
-        }
-      }
-      framework->SlpAppStatusHandler(APP_RESET);
-    }
-  }
-
-  /**
-   * Called by AppCore when the language changes on the device.
-   */
-  static void AppLanguageChange(void* data)
-  {
-    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_LANGUAGE_CHANGE);
-  }
-
-  static void DeviceRotated(app_device_orientation_e orientation, void *user_data)
-  {
-    switch(orientation)
-    {
-      case APP_DEVICE_ORIENTATION_0:
-        break;
-      case APP_DEVICE_ORIENTATION_90:
-        break;
-      case APP_DEVICE_ORIENTATION_180:
-        break;
-      case APP_DEVICE_ORIENTATION_270:
-        break;
-    }
-  }
-
-};
-
-Framework::Framework(Framework::Observer& observer, int *argc, char ***argv, const std::string& name)
-: mObserver(observer),
-  mInitialised(false),
-  mRunning(false),
-  mArgc(argc),
-  mArgv(argv),
-  mName(name),
-  mBundleName(""),
-  mBundleId(""),
-  mAbortHandler(boost::bind(&Framework::AbortCallback, this)),
-  mImpl(NULL)
-{
-  InitThreads();
-  mImpl = new Impl(this);
-}
-
-Framework::~Framework()
-{
-  if (mRunning)
-  {
-    Quit();
-  }
-
-  delete mImpl;
-}
-
-void Framework::Run()
-{
-  mRunning = true;
-
-  app_efl_main(mArgc, mArgv, &mImpl->mEventCallback, this);
-
-  mRunning = false;
-}
-
-void Framework::Quit()
-{
-  app_efl_exit();
-}
-
-bool Framework::IsMainLoopRunning()
-{
-  return mRunning;
-}
-
-void Framework::AddAbortCallback(boost::function<void(void)> callBack)
-{
-  mImpl->mAbortCallBack = callBack;
-}
-
-std::string Framework::GetBundleName() const
-{
-  return mBundleName;
-}
-
-void Framework::SetBundleName(const std::string& name)
-{
-  mBundleName = name;
-}
-
-std::string Framework::GetBundleId() const
-{
-  return mBundleId;
-}
-
-void Framework::SetBundleId(const std::string& id)
-{
-  mBundleId = id;
-}
-
-void Framework::AbortCallback( )
-{
-  // if an abort call back has been installed run it.
-  if (mImpl->mAbortCallBack)
-  {
-    mImpl->mAbortCallBack();
-  }
-  else
-  {
-    Quit();
-  }
-}
-
-bool Framework::SlpAppStatusHandler(int type)
-{
-  switch (type)
-  {
-    case APP_CREATE:
-    {
-      mInitialised = true;
-
-      // Connect to abnormal exit signals
-      mAbortHandler.AbortOnSignal( SIGINT );
-      mAbortHandler.AbortOnSignal( SIGQUIT );
-      mAbortHandler.AbortOnSignal( SIGKILL );
-
-      mObserver.OnInit();
-      break;
-    }
-
-    case APP_RESET:
-      mObserver.OnReset();
-      break;
-
-    case APP_RESUME:
-      mObserver.OnResume();
-      break;
-
-    case APP_TERMINATE:
-     mObserver.OnTerminate();
-      break;
-
-    case APP_PAUSE:
-      mObserver.OnPause();
-      break;
-
-    case APP_LANGUAGE_CHANGE:
-      mObserver.OnLanguageChanged();
-      break;
-
-    default:
-      break;
-  }
-
-  return true;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
index f445e1003f32c3262182d3080810af8c3493babc..0424b078ef1c7527eb3b259b47c17f2f2259d42a 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali/integration-api/bitmap.h>
 
 // INTERNAL HEADERS
+#include <common/gl/gl-implementation.h>
 
 namespace Dali
 {
index 1695d9413e4723cdb7a965654ff158718794292d..ef701d573445c3931a8db530399e12b3e0175f52 100644 (file)
@@ -18,9 +18,6 @@
 // CLASS HEADER
 #include "style-monitor-impl.h"
 
-// EXTERNAL INCLUDES
-#include <vconf.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <adaptor-impl.h>
index 164cae0ca89956f8d6b72b5f91f05cb4741301de..59ae1c3cb278937068fd7777cf96ae28181d58d0 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <system_settings.h>
-#include <Elementary.h>
-
 // INTERNAL INCLUDES
 #include "system-settings.h"
 
diff --git a/adaptors/common/tilt-sensor-impl.cpp b/adaptors/common/tilt-sensor-impl.cpp
deleted file mode 100644 (file)
index d171c6a..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "tilt-sensor-impl.h"
-
-// EXTERNAL INCLUDES
-#include <cmath>
-#ifdef DALI_PROFILE_LITE
-#include <sensor_internal.h>
-#else
-#include <sensor.h>
-#endif
-
-#include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <adaptor-impl.h>
-
-#ifdef __arm__
-#define SENSOR_ENABLED
-#endif
-
-namespace // unnamed namespace
-{
-
-const int NUMBER_OF_SAMPLES = 10;
-
-const float MAX_ACCELEROMETER_XY_VALUE = 9.8f;
-
-// Type Registration
-Dali::BaseHandle Create()
-{
-  return Dali::Internal::Adaptor::TiltSensor::Get();
-}
-
-Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), Create );
-
-Dali::SignalConnectorType signalConnector1( typeRegistration, Dali::TiltSensor::SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
-
-} // unnamed namespace
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-Dali::TiltSensor TiltSensor::New()
-{
-  Dali::TiltSensor sensor = Dali::TiltSensor(new TiltSensor());
-
-  return sensor;
-}
-
-Dali::TiltSensor TiltSensor::Get()
-{
-  Dali::TiltSensor sensor;
-
-  if ( Adaptor::IsAvailable() )
-  {
-    // Check whether the keyboard focus manager is already created
-    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::TiltSensor ) );
-    if(handle)
-    {
-      // If so, downcast the handle of singleton to keyboard focus manager
-      sensor = Dali::TiltSensor( dynamic_cast< TiltSensor* >( handle.GetObjectPtr() ) );
-    }
-    else
-    {
-      // Create a singleton instance
-      Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
-      sensor = TiltSensor::New();
-      adaptorImpl.RegisterSingleton( typeid( sensor ), sensor );
-      handle = sensor;
-    }
-  }
-
-  return sensor;
-}
-
-TiltSensor::~TiltSensor()
-{
-  Disable();
-}
-
-bool TiltSensor::Enable()
-{
-  // Make sure sensor API is responding
-  bool success = Update();
-
-  if ( success )
-  {
-    if ( !mTimer )
-    {
-      mTimer = Dali::Timer::New( 1000.0f / mFrequencyHertz );
-      mTimer.TickSignal().Connect( mTimerSlot, &TiltSensor::Update );
-    }
-
-    if ( mTimer &&
-         !mTimer.IsRunning() )
-    {
-      mTimer.Start();
-    }
-  }
-
-  return success;
-}
-
-void TiltSensor::Disable()
-{
-  if ( mTimer )
-  {
-    mTimer.Stop();
-    mTimer.Reset();
-  }
-}
-
-bool TiltSensor::IsEnabled() const
-{
-  return ( mTimer && mTimer.IsRunning() );
-}
-
-float TiltSensor::GetRoll() const
-{
-  return mRoll;
-}
-
-float TiltSensor::GetPitch() const
-{
-  return mPitch;
-}
-
-Quaternion TiltSensor::GetRotation() const
-{
-  return mRotation;
-}
-
-TiltSensor::TiltedSignalV2& TiltSensor::TiltedSignal()
-{
-  return mTiltedSignalV2;
-}
-
-void TiltSensor::SetUpdateFrequency( float frequencyHertz )
-{
-  DALI_ASSERT_ALWAYS( frequencyHertz > 0.0f && "Frequency must have a positive value" );
-
-  if ( fabsf(mFrequencyHertz - frequencyHertz) >= GetRangedEpsilon(mFrequencyHertz, frequencyHertz) )
-  {
-    mFrequencyHertz = frequencyHertz;
-
-    if ( mTimer )
-    {
-      mTimer.SetInterval( 1000.0f / mFrequencyHertz );
-    }
-  }
-}
-
-float TiltSensor::GetUpdateFrequency() const
-{
-  return mFrequencyHertz;
-}
-
-void TiltSensor::SetRotationThreshold(Radian rotationThreshold)
-{
-  mRotationThreshold = rotationThreshold;
-}
-
-Radian TiltSensor::GetRotationThreshold() const
-{
-  return mRotationThreshold;
-}
-
-bool TiltSensor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
-{
-  bool connected( true );
-  TiltSensor* sensor = dynamic_cast<TiltSensor*>( object );
-
-  if( sensor &&
-      Dali::TiltSensor::SIGNAL_TILTED == signalName )
-  {
-    sensor->TiltedSignal().Connect( tracker, functor );
-  }
-  else
-  {
-    // signalName does not match any signal
-    connected = false;
-  }
-
-  return connected;
-}
-
-TiltSensor::TiltSensor()
-: mFrequencyHertz( Dali::TiltSensor::DEFAULT_UPDATE_FREQUENCY ),
-  mTimerSlot( this ),
-  mSensorFrameworkHandle( -1 ),
-  mRoll( 0.0f ),
-  mPitch( 0.0f ),
-  mRotation( 0.0f, Vector3::YAXIS ),
-  mRotationThreshold( 0.0f )
-{
-  mRollValues.resize( NUMBER_OF_SAMPLES, 0.0f );
-  mPitchValues.resize( NUMBER_OF_SAMPLES, 0.0f );
-}
-
-bool TiltSensor::Update()
-{
-  float newRoll = 0.0f;
-  float newPitch = 0.0f;
-  Quaternion newRotation;
-#ifdef SENSOR_ENABLED
-
-  // Read accelerometer data
-
-  mSensorFrameworkHandle = sf_connect( ACCELEROMETER_SENSOR );
-  if ( mSensorFrameworkHandle < 0 )
-  {
-    DALI_LOG_ERROR( "Failed to connect to sensor framework" );
-    return false;
-  }
-
-  if ( sf_start(mSensorFrameworkHandle, 0) < 0 )
-  {
-    DALI_LOG_ERROR( "Failed to start sensor" );
-    sf_disconnect(mSensorFrameworkHandle);
-    return false;
-  }
-
-  sensor_data_t* base_data_values = (sensor_data_t*)malloc(sizeof(sensor_data_t));
-
-  int dataErr = sf_get_data(mSensorFrameworkHandle, ACCELEROMETER_BASE_DATA_SET, base_data_values);
-  if ( dataErr < 0 )
-  {
-    DALI_LOG_ERROR( "Failed to retrieve sensor data" );
-    free(base_data_values);
-    sf_stop(mSensorFrameworkHandle);
-    sf_disconnect(mSensorFrameworkHandle);
-    return false;
-  }
-
-  sf_stop(mSensorFrameworkHandle);
-  sf_disconnect(mSensorFrameworkHandle);
-
-  mRollValues.push_back( base_data_values->values[0] );
-  mRollValues.pop_front();
-
-  mPitchValues.push_back( base_data_values->values[1] );
-  mPitchValues.pop_front();
-
-  free(base_data_values);
-  base_data_values = NULL;
-
-  float averageRoll( 0.0f );
-  for ( std::deque<float>::const_iterator iter = mRollValues.begin(); mRollValues.end() != iter; ++iter )
-  {
-    averageRoll += *iter;
-  }
-  averageRoll /= mRollValues.size();
-
-  float averagePitch( 0.0f );
-  for ( std::deque<float>::const_iterator iter = mPitchValues.begin(); mPitchValues.end() != iter; ++iter )
-  {
-    averagePitch += *iter;
-  }
-  averagePitch /= mPitchValues.size();
-
-  newRoll  = Clamp( float(averageRoll  / MAX_ACCELEROMETER_XY_VALUE), -1.0f/*min*/, 1.0f/*max*/ );
-  newPitch = Clamp( float(averagePitch / MAX_ACCELEROMETER_XY_VALUE), -1.0f/*min*/, 1.0f/*max*/ );
-
-  newRotation = Quaternion( newRoll  * Math::PI * -0.5f, Vector3::YAXIS ) *
-              Quaternion( newPitch * Math::PI * -0.5f, Vector3::XAXIS );
-#endif // SENSOR_ENABLED
-
-  Radian angle(Quaternion::AngleBetween(newRotation, mRotation));
-  // If the change in value is more than the threshold then emit tilted signal.
-  if( angle > mRotationThreshold )
-  {
-    mRoll = newRoll;
-    mPitch = newPitch;
-    mRotation = newRotation;
-
-    if ( !mTiltedSignalV2.Empty() )
-    {
-      Dali::TiltSensor handle( this );
-      mTiltedSignalV2.Emit( handle );
-    }
-  }
-
-  return true;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/adaptors/common/tilt-sensor-impl.h b/adaptors/common/tilt-sensor-impl.h
deleted file mode 100644 (file)
index 20c68d9..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-#ifndef __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
-#define __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
-
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <deque>
-#include <dali/public-api/object/base-object.h>
-#include <timer.h>
-
-// INTERNAL INCLUDES
-#include <tilt-sensor.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-/**
- * TiltSensor provides pitch & roll values when the device is tilted.
- */
-class TiltSensor : public Dali::BaseObject
-{
-public:
-
-  typedef Dali::TiltSensor::TiltedSignalV2 TiltedSignalV2;
-
-  /**
-   * Create a TiltSensor.
-   * This should only be called once by the Adaptor class.
-   * @return A newly allocated tilt-sensor.
-   */
-  static Dali::TiltSensor New();
-
-  /**
-   * @copydoc Dali::TiltSensor::Get()
-   */
-  static Dali::TiltSensor Get();
-
-  /**
-   * @copydoc Dali::TiltSensor::Enable()
-   */
-  bool Enable();
-
-  /**
-   * @copydoc Dali::TiltSensor::Disable()
-   */
-  void Disable();
-
-  /**
-   * @copydoc Dali::TiltSensor::IsEnabled()
-   */
-  bool IsEnabled() const;
-
-  /**
-   * @copydoc Dali::TiltSensor::GetRoll()
-   */
-  float GetRoll() const;
-
-  /**
-   * @copydoc Dali::TiltSensor::GetPitch()
-   */
-  float GetPitch() const;
-
-  /**
-   * @copydoc Dali::TiltSensor::GetRotation()
-   */
-  Quaternion GetRotation() const;
-
-  /**
-   * @copydoc Dali::TiltSensor::TiltedSignal()
-   */
-  TiltedSignalV2& TiltedSignal();
-
-  /**
-   * @copydoc Dali::TiltSensor::SetUpdateFrequency()
-   */
-  void SetUpdateFrequency( float frequencyHertz );
-
-  /**
-   * @copydoc Dali::TiltSensor::GetUpdateFrequency()
-   */
-  float GetUpdateFrequency() const;
-
-  /**
-   * @copydoc Dali::TiltSensor::SetRotationThreshold()
-   */
-  void SetRotationThreshold(Radian rotationThreshold);
-
-  /**
-   * @copydoc Dali::TiltSensor::GetRotationThreshold()
-   */
-  Radian GetRotationThreshold() const;
-
-  /**
-   * Connects a callback function with the object's signals.
-   * @param[in] object The object providing the signal.
-   * @param[in] tracker Used to disconnect the signal.
-   * @param[in] signalName The signal to connect to.
-   * @param[in] functor A newly allocated FunctorDelegate.
-   * @return True if the signal was connected.
-   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
-   */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-
-private:
-
-  /**
-   * Private constructor; see also TiltSensor::New()
-   */
-  TiltSensor();
-
-  /**
-   * Destructor
-   */
-  virtual ~TiltSensor();
-
-  /**
-   * Timer callback to update the tilt values
-   */
-  bool Update();
-
-  // Undefined
-  TiltSensor(const TiltSensor&);
-
-  // Undefined
-  TiltSensor& operator=(TiltSensor&);
-
-private:
-
-  float mFrequencyHertz;
-  Dali::Timer mTimer;
-  SlotDelegate< TiltSensor > mTimerSlot;
-
-  int mSensorFrameworkHandle;
-
-  float mRoll;
-  float mPitch;
-  Quaternion mRotation;
-
-  Radian mRotationThreshold;
-
-  std::deque<float> mRollValues;
-  std::deque<float> mPitchValues;
-
-  TiltedSignalV2 mTiltedSignalV2;
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::Adaptor::TiltSensor& GetImplementation(Dali::TiltSensor& sensor)
-{
-  DALI_ASSERT_ALWAYS( sensor && "TiltSensor handle is empty" );
-
-  BaseObject& handle = sensor.GetBaseObject();
-
-  return static_cast<Internal::Adaptor::TiltSensor&>(handle);
-}
-
-inline const Internal::Adaptor::TiltSensor& GetImplementation(const Dali::TiltSensor& sensor)
-{
-  DALI_ASSERT_ALWAYS( sensor && "TiltSensor handle is empty" );
-
-  const BaseObject& handle = sensor.GetBaseObject();
-
-  return static_cast<const Internal::Adaptor::TiltSensor&>(handle);
-}
-
-} // namespace Dali
-
-#endif // __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
diff --git a/adaptors/common/tts-player-impl.cpp b/adaptors/common/tts-player-impl.cpp
deleted file mode 100644 (file)
index 282861c..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "tts-player-impl.h"
-
-// EXTERNAL INCLUDES
-#include <tts.h>
-#include <stdio.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/type-registry.h>
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace // unnamed namespace
-{
-// Type Registration
-Dali::BaseHandle Create()
-{
-  return Dali::TtsPlayer::Get() ;
-}
-
-Dali::TypeRegistration mType( typeid(Dali::TtsPlayer), typeid(Dali::BaseHandle), Create ) ;
-} // unnamed namespace
-
-#if defined(DEBUG_ENABLED)
-Debug::Filter* TtsPlayer::gLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_TTS_PLAYER");
-#endif
-
-Dali::TtsPlayer TtsPlayer::New(Dali::TtsPlayer::Mode mode)
-{
-  Dali::TtsPlayer player = Dali::TtsPlayer(new TtsPlayer(mode));
-
-  return player;
-}
-
-TtsPlayer::TtsPlayer(Dali::TtsPlayer::Mode mode)
-: mInitialized(false),
-  mUnplayedString(""),
-  mUtteranceId(0),
-  mTtsMode(mode)
-{
-  Initialize();
-}
-
-TtsPlayer::~TtsPlayer()
-{
-  // If it is playing, stop it
-  Stop();
-
-  // Unset the callback funtion for TTS state change
-  int retVal = tts_unset_state_changed_cb(mTtsHandle);
-  if( retVal != TTS_ERROR_NONE )
-  {
-    LogErrorCode(static_cast<tts_error_e>(retVal));
-  }
-
-  // Destroy the TTS handle and disconnects the daemon
-  retVal = tts_destroy(mTtsHandle);
-  if( retVal != TTS_ERROR_NONE )
-  {
-    LogErrorCode(static_cast<tts_error_e>(retVal));
-  }
-}
-
-void TtsPlayer::Initialize()
-{
-  // Create the TTS handle
-  int retVal = tts_create(&mTtsHandle);
-
-  if( retVal != TTS_ERROR_NONE )
-  {
-    LogErrorCode(static_cast<tts_error_e>(retVal));
-  }
-  else
-  {
-    // Set the callback funtion for TTS state change
-    retVal = tts_set_state_changed_cb(mTtsHandle, &StateChangedCallback, this);
-    if( retVal != TTS_ERROR_NONE )
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-
-    // Check tts mode
-    tts_mode_e ttsMode = TTS_MODE_DEFAULT;
-    switch (mTtsMode)
-    {
-      case Dali::TtsPlayer::DEFAULT:
-        ttsMode = TTS_MODE_DEFAULT;
-      break;
-      case Dali::TtsPlayer::NOTIFICATION:
-        ttsMode = TTS_MODE_NOTIFICATION;
-      break;
-      case Dali::TtsPlayer::SCREEN_READER:
-        ttsMode = TTS_MODE_SCREEN_READER;
-      break;
-      default:
-      break;
-    }
-
-    // Set mode
-    retVal = tts_set_mode(mTtsHandle, ttsMode);
-    if(retVal != TTS_ERROR_NONE)
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-
-    // Connect the TTS daemon asynchronously
-    retVal = tts_prepare(mTtsHandle);
-    if(retVal != TTS_ERROR_NONE)
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-  }
-}
-
-void TtsPlayer::Play(const std::string& text)
-{
-  if(mInitialized)
-  {
-    Stop();
-
-    // Add text to the queue, and use normal speed, default language and default voice set by the user
-    int retVal = tts_add_text(mTtsHandle, text.c_str(), NULL, TTS_VOICE_TYPE_AUTO, TTS_SPEED_AUTO, &mUtteranceId);
-    if(retVal != TTS_ERROR_NONE)
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-    else
-    {
-      // Start synthesizing voice from text in the queue and play synthesized audio data
-      retVal = tts_play(mTtsHandle);
-      if(retVal != TTS_ERROR_NONE)
-      {
-        LogErrorCode(static_cast<tts_error_e>(retVal));
-      }
-    }
-  }
-  else
-  {
-    mUnplayedString = text;
-  }
-}
-
-void TtsPlayer::Stop()
-{
-  if(mInitialized)
-  {
-    // Check the current TTS state
-    tts_state_e state;
-    int retVal = tts_get_state(mTtsHandle, &state);
-    if(retVal != TTS_ERROR_NONE)
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-    else if(state == TTS_STATE_PLAYING || state == TTS_STATE_PAUSED)
-    {
-      // If it is playing or paused, stop playing and clear the queue
-      retVal = tts_stop(mTtsHandle);
-      if( retVal != TTS_ERROR_NONE )
-      {
-        LogErrorCode(static_cast<tts_error_e>(retVal));
-      }
-    }
-  }
-}
-
-void TtsPlayer::Pause()
-{
-  if(mInitialized)
-  {
-    // Check the current TTS state
-    tts_state_e state;
-    int retVal = tts_get_state(mTtsHandle, &state);
-    if(retVal != TTS_ERROR_NONE)
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-    else if(state == TTS_STATE_PLAYING)
-    {
-      // If the player is playing, pause it.
-      retVal = tts_pause(mTtsHandle);
-      if( retVal != TTS_ERROR_NONE )
-      {
-        LogErrorCode(static_cast<tts_error_e>(retVal));
-      }
-    }
-  }
-}
-
-void TtsPlayer::Resume()
-{
-  if(mInitialized)
-  {
-    // Check the current TTS state
-    tts_state_e state;
-    int retVal = tts_get_state(mTtsHandle, &state);
-    if(retVal != TTS_ERROR_NONE)
-    {
-      LogErrorCode(static_cast<tts_error_e>(retVal));
-    }
-    else if(state == TTS_STATE_PAUSED)
-    {
-      // If the player is paused, resume it.
-      retVal = tts_play(mTtsHandle);
-      if( retVal != TTS_ERROR_NONE )
-      {
-        LogErrorCode(static_cast<tts_error_e>(retVal));
-      }
-    }
-  }
-}
-
-void TtsPlayer::StateChangedCallback(tts_h tts, tts_state_e previous, tts_state_e current, void *userData)
-{
-  TtsPlayer* obj = static_cast<TtsPlayer*>(userData);
-  if(!obj->mInitialized && current == TTS_STATE_READY)
-  {
-    obj->mInitialized = true;
-
-    // if there is queued text before initialization, play it
-    if(obj->mUnplayedString != "")
-    {
-      obj->Play(obj->mUnplayedString);
-      obj->mUnplayedString = "";
-    }
-  }
-}
-
-void TtsPlayer::LogErrorCode(tts_error_e reason)
-{
-  std::string error_string;
-
-  switch (reason)
-  {
-    case TTS_ERROR_NONE:
-    {
-      break;
-    }
-    case TTS_ERROR_OUT_OF_MEMORY:
-    {
-      error_string = "TTS: Out of Memory\n";
-      break;
-    }
-    case TTS_ERROR_IO_ERROR:
-    {
-      error_string = "TTS: I/O error\n";
-      break;
-    }
-    case TTS_ERROR_INVALID_PARAMETER:
-    {
-      error_string = "TTS: Invalid parameter\n";
-      break;
-    }
-    case TTS_ERROR_OUT_OF_NETWORK:
-    {
-      error_string = "TTS: Out of network\n";
-      break;
-    }
-    case TTS_ERROR_INVALID_STATE:
-    {
-      error_string = "TTS: Invalid state\n";
-      break;
-    }
-    case TTS_ERROR_INVALID_VOICE:
-    {
-      error_string = "TTS: Invalid voice\n";
-      break;
-    }
-    case TTS_ERROR_ENGINE_NOT_FOUND:
-    {
-      error_string = "TTS: No available engine\n";
-      break;
-    }
-    case TTS_ERROR_TIMED_OUT:
-    {
-      error_string = "TTS: No answer from the daemon\n";
-      break;
-    }
-    case TTS_ERROR_OPERATION_FAILED:
-    {
-      error_string = "TTS: Operation failed\n";
-      break;
-    }
-    default:
-    {
-      error_string = "Invalid TTS error code\n";
-      break;
-    }
-  }
-
-  if(reason != TTS_ERROR_NONE)
-  {
-    DALI_LOG_WARNING("[%s:%d] tts error : %s\n", __FUNCTION__, __LINE__, error_string.c_str());
-  }
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/adaptors/common/tts-player-impl.h b/adaptors/common/tts-player-impl.h
deleted file mode 100644 (file)
index ffc3bec..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-#ifndef __DALI_INTERNAL_TTS_PLAYER_H__
-#define __DALI_INTERNAL_TTS_PLAYER_H__
-
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <tts.h>
-#include <string>
-
-#include <dali/integration-api/debug.h>
-#include <dali/public-api/object/base-object.h>
-#include <tts-player.h>
-
-// INTERNAL INCLUDES
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-/**
- * Text-to-speech player
- */
-class TtsPlayer : public Dali::BaseObject
-{
-
-public:
-
-  /**
-   * Create a TtsPlayer with the given mode.
-   * This should only be called once by the Adaptor class for each given mode.
-   * @param mode the mode of tts-player
-   * @return A newly created TtsPlayer.
-   */
-  static Dali::TtsPlayer New(Dali::TtsPlayer::Mode mode);
-
-  /**
-   * @copydoc TtsPlayer::Play()
-   */
-  void Play(const std::string& text);
-
-  /**
-   * @copydoc TtsPlayer::Stop()
-   */
-  void Stop();
-
-  /**
-   * @copydoc TtsPlayer::Pause()
-   */
-  void Pause();
-
-  /**
-   * @copydoc TtsPlayer::Resume()
-   */
-  void Resume();
-
-private:
-
-  /**
-   * Private Constructor; see also TtsPlayer::New()
-   * @param mode the mode of tts-player
-   */
-  TtsPlayer(Dali::TtsPlayer::Mode mode);
-
-  /**
-   * Destructor
-   */
-  virtual ~TtsPlayer();
-
-  /**
-   * Initializes the player.
-   */
-  void Initialize();
-
-  /**
-   * Logs the error code.
-   * @param[in] reason The error code
-   */
-  void LogErrorCode(tts_error_e reason);
-
-  /**
-   * Called when the state of TTS is changed.
-   *
-   * @param[in] tts The handle for TTS
-   * @param[in] previous A previous state
-   * @param[in] current A current state
-   * @param[in] userData The user data passed from the callback registration function.
-   */
-  static void StateChangedCallback(tts_h tts, tts_state_e previous, tts_state_e current, void *userData);
-
-  // Undefined
-  TtsPlayer(const TtsPlayer&);
-
-  // Undefined
-  TtsPlayer& operator=(TtsPlayer&);
-
-private:
-
-  bool mInitialized; ///< Whether the TTS player is initialised successfully or not
-  std::string mUnplayedString; ///< The text that can not be played because tts engine is not yet initialized
-  tts_h mTtsHandle;  ///< The handle of TTS
-  int mUtteranceId;  ///< The utterance ID
-
-  Dali::TtsPlayer::Mode mTtsMode; ///< The current mode of tts engine
-
-#if defined(DEBUG_ENABLED)
-public:
-  static Debug::Filter* gLogFilter;
-#endif
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::Adaptor::TtsPlayer& GetImplementation(Dali::TtsPlayer& player)
-{
-  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
-
-  BaseObject& handle = player.GetBaseObject();
-
-  return static_cast<Internal::Adaptor::TtsPlayer&>(handle);
-}
-
-inline const Internal::Adaptor::TtsPlayer& GetImplementation(const Dali::TtsPlayer& player)
-{
-  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
-
-  const BaseObject& handle = player.GetBaseObject();
-
-  return static_cast<const Internal::Adaptor::TtsPlayer&>(handle);
-}
-
-} // namespace Dali
-
-#endif // __DALI_INTERNAL_TTS_PLAYER_H__
diff --git a/adaptors/common/vsync-monitor.cpp b/adaptors/common/vsync-monitor.cpp
deleted file mode 100644 (file)
index 0bb4f99..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <vconf.h>
-#include <vconf-keys.h>
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include "vsync-monitor.h"
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-
-#if defined(DEBUG_ENABLED)
-Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VSYNC_MONITOR");
-#endif
-
-const char * const DRM_DEVICE( "/dev/dri/card0" );
-const int FD_NONE( -1 );
-
-void ScreenStatusChanged(keynode_t* node, void* data)
-{
-  VSyncMonitor* vsyncMonitor( static_cast< VSyncMonitor* >( data ) );
-
-  int status = 0;
-  vconf_get_int( VCONFKEY_PM_STATE, &status );
-
-  // status values
-  //  - VCONFKEY_PM_STATE_NORMAL : turn vsync on
-  //  - VCONFKEY_PM_STATE_LCDDIM : turn vsync off
-  //  - VCONFKEY_PM_STATE_LCDOFF : turn vsync off
-  //  - VCONFKEY_PM_STATE_SLEEP : turn vsync off
-  const bool screenOn( VCONFKEY_PM_STATE_NORMAL == status );
-
-  vsyncMonitor->SetUseHardware( screenOn );
-
-  DALI_LOG_INFO( gLogFilter, Debug::Concise, "%s, Screen %s.\n", __PRETTY_FUNCTION__, screenOn ? "On" : "Off" );
-}
-
-} // unnamed namespace
-
-VSyncMonitor::VSyncMonitor()
-: mFileDescriptor( FD_NONE ),
-  mUseHardware( true )
-{
-  vconf_notify_key_changed( VCONFKEY_PM_STATE, ScreenStatusChanged, this );
-}
-
-VSyncMonitor::~VSyncMonitor()
-{
-  Terminate();
-
-  vconf_ignore_key_changed( VCONFKEY_PM_STATE, ScreenStatusChanged );
-}
-
-void VSyncMonitor::SetUseHardware( bool useHardware )
-{
-  mUseHardware = useHardware;
-}
-
-void VSyncMonitor::Initialize()
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
-
-  // Read initial 'use hardware' status
-  ScreenStatusChanged( NULL, this );
-
-  // open /dev node
-  mFileDescriptor = open( DRM_DEVICE, O_RDWR );
-
-  // setup vblank request - block and wait for next vblank
-  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.request.sequence = 0;
-  mVBlankInfo.request.signal = 0;
-
-  // setup vblank reply - block and wait for next vblank
-  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.reply.sequence = 0;
-  mVBlankInfo.reply.tval_sec = 0;
-  mVBlankInfo.reply.tval_usec = 0;
-}
-
-void VSyncMonitor::Terminate()
-{
-  if( mFileDescriptor != FD_NONE )
-  {
-    close( mFileDescriptor );
-    mFileDescriptor = FD_NONE;
-  }
-}
-
-bool VSyncMonitor::UseHardware()
-{
-  return mUseHardware && (FD_NONE != mFileDescriptor );
-}
-
-
-bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "ECoreX::VSyncMonitor is not initialized" );
-
-  if( 0 == drmWaitVBlank( mFileDescriptor, &mVBlankInfo ) )
-  {
-    frameNumber = mVBlankInfo.reply.sequence;
-    seconds = mVBlankInfo.reply.tval_sec;
-    microseconds = mVBlankInfo.reply.tval_usec;
-
-    return true;
-  }
-
-  return false;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
index b74e139c8adee25a1f8331250c2623de4a4f611a..1d6505f9fac217b6d1540aeba8408af16b5a6558 100644 (file)
@@ -1,5 +1,10 @@
 # mobile profile internal files
-adaptor_common_internal_src_files += \
-  $(adaptor_common_dir)/../mobile/mobile-render-surface-factory.cpp \
-  $(adaptor_common_dir)/../mobile/mobile-system-settings.cpp \
-  $(adaptor_common_dir)/../mobile/mobile-color-controller-impl.cpp
\ No newline at end of file
+adaptor_common_internal_mobile_profile_src_files = \
+  $(adaptor_mobile_dir)/mobile-render-surface-factory.cpp \
+  $(adaptor_mobile_dir)/mobile-system-settings.cpp \
+  $(adaptor_mobile_dir)/mobile-color-controller-impl.cpp
+
+adaptor_common_application_mobile_profile_src_files = \
+  $(adaptor_mobile_dir)/mobile-render-surface-factory.cpp \
+  $(adaptor_mobile_dir)/mobile-system-settings.cpp \
+  $(adaptor_mobile_dir)/mobile-color-controller-impl.cpp
index 15dab9d4ab7cad473c6dc87ffe34c88a3c88e0f5..703b22af5d6a1e72782e29a76009b436a5f68214 100644 (file)
@@ -27,7 +27,7 @@ public_api_header_files = \
   $(adaptor_public_api_dir)/tilt-sensor.h
 
 public_api_application_header_files = \
-  $(adaptor_public_api_dir)/application.h 
+  $(adaptor_public_api_dir)/application.h
 
 adaptor_dali_header_file = \
   $(adaptor_public_api_dir)/dali.h \
diff --git a/adaptors/tizen/accessibility-manager-impl-tizen.cpp b/adaptors/tizen/accessibility-manager-impl-tizen.cpp
new file mode 100644 (file)
index 0000000..9cd164f
--- /dev/null
@@ -0,0 +1,313 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "accessibility-manager-impl.h"
+
+// EXTERNAL INCLUDES
+#include <vconf.h>
+
+#include <dali/public-api/dali-core.h>
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/gesture-requests.h>
+#include "system-settings.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gAccessibilityManagerLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_MANAGER");
+#endif
+
+void AccessibilityOnOffNotification(keynode_t* node, void* data)
+{
+  AccessibilityManager* manager = static_cast<AccessibilityManager*>(data);
+  int isEnabled = 0;
+  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
+
+  if(isEnabled == 1)
+  {
+    manager->EnableAccessibility();
+  }
+  else
+  {
+    manager->DisableAccessibility();
+  }
+}
+
+BaseHandle Create()
+{
+  BaseHandle handle( AccessibilityManager::Get() );
+
+  if ( !handle && Adaptor::IsAvailable() )
+  {
+    Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
+    Dali::AccessibilityManager manager = Dali::AccessibilityManager( new AccessibilityManager() );
+    adaptorImpl.RegisterSingleton( typeid( manager ), manager );
+    handle = manager;
+  }
+
+  return handle;
+}
+TypeRegistration ACCESSIBILITY_MANAGER_TYPE( typeid(Dali::AccessibilityManager), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
+
+} // unnamed namespace
+
+Dali::AccessibilityManager AccessibilityManager::Get()
+{
+  Dali::AccessibilityManager manager;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::AccessibilityManager ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      manager = Dali::AccessibilityManager( dynamic_cast< AccessibilityManager* >( handle.GetObjectPtr() ) );
+    }
+  }
+
+  return manager;
+}
+
+Vector2 AccessibilityManager::GetReadPosition() const
+{
+  return mReadPosition;
+}
+
+void AccessibilityManager::SetActionHandler(AccessibilityActionHandler& handler)
+{
+  mActionHandler = &handler;
+}
+
+void AccessibilityManager::SetGestureHandler(AccessibilityGestureHandler& handler)
+{
+  if( mAccessibilityGestureDetector )
+  {
+    mAccessibilityGestureDetector->SetGestureHandler(handler);
+  }
+}
+
+bool AccessibilityManager::HandleActionClearFocusEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionClearFocus signal in first, ClearAccessibilityFocus for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionClearFocusSignalV2.Empty() )
+    {
+      mActionClearFocusSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->ClearAccessibilityFocus();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  Dali::TouchEvent touchEvent(timeStamp);
+  touchEvent.points.push_back(point);
+
+  /*
+   * In order to application decide touch action first,
+   * emit ActionScroll signal in first, AccessibilityActionScroll  for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionScrollSignalV2.Empty() )
+    {
+      mActionScrollSignalV2.Emit( handle, touchEvent );
+    }
+  }
+
+  Integration::TouchEvent event;
+  if (mCombiner.GetNextTouchEvent(point, timeStamp, event))
+  {
+    // Process the touch event in accessibility gesture detector
+    if( mAccessibilityGestureDetector )
+    {
+      mAccessibilityGestureDetector->SendEvent(event);
+      ret = true;
+    }
+  }
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  bool ret = false;
+
+  Dali::TouchEvent touchEvent(timeStamp);
+  touchEvent.points.push_back(point);
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionTouch(touchEvent);
+  }
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionBackEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionBack signal in first, AccessibilityActionBack for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionBackSignalV2.Empty() )
+    {
+      mActionBackSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionBack();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+void AccessibilityManager::HandleActionEnableEvent()
+{
+  EnableAccessibility();
+}
+
+void AccessibilityManager::HandleActionDisableEvent()
+{
+  DisableAccessibility();
+}
+
+void AccessibilityManager::EnableAccessibility()
+{
+  if(mIsEnabled == false)
+  {
+    mIsEnabled = true;
+
+    if( mActionHandler )
+    {
+      mActionHandler->ChangeAccessibilityStatus();
+    }
+
+    //emit status changed signal
+    Dali::AccessibilityManager handle( this );
+    mStatusChangedSignalV2.Emit( handle );
+  }
+}
+
+void AccessibilityManager::DisableAccessibility()
+{
+  if(mIsEnabled == true)
+  {
+    mIsEnabled = false;
+
+    if( mActionHandler )
+    {
+      mActionHandler->ChangeAccessibilityStatus();
+    }
+
+    //emit status changed signal
+    Dali::AccessibilityManager handle( this );
+    mStatusChangedSignalV2.Emit( handle );
+
+    // Destroy the TtsPlayer if exists.
+    Dali::Adaptor& adaptor = Dali::Adaptor::Get();
+    Adaptor::GetImplementation(adaptor).DestroyTtsPlayer(Dali::TtsPlayer::SCREEN_READER);
+  }
+}
+
+bool AccessibilityManager::IsEnabled() const
+{
+  return mIsEnabled;
+}
+
+void AccessibilityManager::SetIndicator(Indicator* indicator)
+{
+  mIndicator = indicator;
+}
+
+AccessibilityManager::AccessibilityManager()
+: mIsEnabled(false),
+  mActionHandler(NULL),
+  mIndicator(NULL),
+  mIndicatorFocused(false)
+{
+  int isEnabled = 0;
+  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
+
+  if(isEnabled == 1)
+  {
+    mIsEnabled = true;
+  }
+  else
+  {
+    mIsEnabled = false;
+  }
+
+  vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, this );
+
+  mAccessibilityGestureDetector = new AccessibilityGestureDetector();
+}
+
+AccessibilityManager::~AccessibilityManager()
+{
+  vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification );
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/tizen/file.list b/adaptors/tizen/file.list
new file mode 100644 (file)
index 0000000..8a1dc9c
--- /dev/null
@@ -0,0 +1,11 @@
+# tizen
+
+adaptor_tizen_internal_src_files = \
+  $(adaptor_tizen_dir)/accessibility-manager-impl-tizen.cpp \
+  $(adaptor_tizen_dir)/vsync-monitor-tizen.cpp \
+  $(adaptor_tizen_dir)/tilt-sensor-impl-tizen.cpp \
+  $(adaptor_tizen_dir)/tts-player-impl-tizen.cpp
+
+adaptor_tizen_application_src_files = \
+  $(adaptor_tizen_dir)/framework-tizen.cpp
+
diff --git a/adaptors/tizen/framework-tizen.cpp b/adaptors/tizen/framework-tizen.cpp
new file mode 100644 (file)
index 0000000..c3687b0
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "framework.h"
+
+// EXTERNAL INCLUDES
+#include <app.h>
+#include <bundle.h>
+#include <Ecore.h>
+#include <boost/bind.hpp>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <callback-manager.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+
+/// Application Status Enum
+enum
+{
+  APP_CREATE,
+  APP_TERMINATE,
+  APP_PAUSE,
+  APP_RESUME,
+  APP_RESET,
+  APP_LANGUAGE_CHANGE,
+};
+
+} // Unnamed namespace
+
+/**
+ * Impl to hide EFL data members
+ */
+struct Framework::Impl
+{
+  // Constructor
+
+  Impl(void* data)
+  {
+    mEventCallback.create = AppCreate;
+    mEventCallback.terminate = AppTerminate;
+    mEventCallback.pause = AppPause;
+    mEventCallback.resume = AppResume;
+    mEventCallback.service = AppService;
+    mEventCallback.low_memory = NULL;
+    mEventCallback.low_battery = NULL;
+    mEventCallback.device_orientation = DeviceRotated;
+    mEventCallback.language_changed = AppLanguageChange;
+    mEventCallback.region_format_changed = NULL;
+
+    mCallbackManager = CallbackManager::New();
+  }
+
+  ~Impl()
+  {
+    // we're quiting the main loop so
+    // mCallbackManager->RemoveAllCallBacks() does not need to be called
+    // to delete our abort handler
+    delete mCallbackManager;
+  }
+
+  // Data
+
+  boost::function<void(void)> mAbortCallBack;
+  app_event_callback_s mEventCallback;
+  CallbackManager *mCallbackManager;
+  // Static methods
+
+  /**
+   * Called by AppCore on application creation.
+   */
+  static bool AppCreate(void *data)
+  {
+    return static_cast<Framework*>(data)->SlpAppStatusHandler(APP_CREATE);
+  }
+
+  /**
+   * Called by AppCore when the application should terminate.
+   */
+  static void AppTerminate(void *data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_TERMINATE);
+  }
+
+  /**
+   * Called by AppCore when the application is paused.
+   */
+  static void AppPause(void *data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_PAUSE);
+  }
+
+  /**
+   * Called by AppCore when the application is resumed.
+   */
+  static void AppResume(void *data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_RESUME);
+  }
+
+  /**
+   * Called by AppCore when the application is launched from another module (e.g. homescreen).
+   * @param[in] b the bundle data which the launcher module sent
+   */
+  static void AppService(service_h service, void *data)
+  {
+    Framework* framework = static_cast<Framework*>(data);
+
+    if(framework)
+    {
+      bundle *bundleData = NULL;
+      service_to_bundle(service, &bundleData);
+
+      if(bundleData)
+      {
+        // get bundle name
+        char* bundleName = const_cast<char*>(bundle_get_val(bundleData, "name"));
+        if(bundleName != NULL)
+        {
+          framework->SetBundleName(bundleName);
+        }
+
+        // get bundle id
+        char* bundleId = const_cast<char*>(bundle_get_val(bundleData, "id"));
+        if(bundleId != NULL)
+        {
+          framework->SetBundleId(bundleId);
+        }
+      }
+      framework->SlpAppStatusHandler(APP_RESET);
+    }
+  }
+
+  /**
+   * Called by AppCore when the language changes on the device.
+   */
+  static void AppLanguageChange(void* data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_LANGUAGE_CHANGE);
+  }
+
+  static void DeviceRotated(app_device_orientation_e orientation, void *user_data)
+  {
+    switch(orientation)
+    {
+      case APP_DEVICE_ORIENTATION_0:
+        break;
+      case APP_DEVICE_ORIENTATION_90:
+        break;
+      case APP_DEVICE_ORIENTATION_180:
+        break;
+      case APP_DEVICE_ORIENTATION_270:
+        break;
+    }
+  }
+
+};
+
+Framework::Framework(Framework::Observer& observer, int *argc, char ***argv, const std::string& name)
+: mObserver(observer),
+  mInitialised(false),
+  mRunning(false),
+  mArgc(argc),
+  mArgv(argv),
+  mName(name),
+  mBundleName(""),
+  mBundleId(""),
+  mAbortHandler(boost::bind(&Framework::AbortCallback, this)),
+  mImpl(NULL)
+{
+  InitThreads();
+  mImpl = new Impl(this);
+}
+
+Framework::~Framework()
+{
+  if (mRunning)
+  {
+    Quit();
+  }
+
+  delete mImpl;
+}
+
+void Framework::Run()
+{
+  mRunning = true;
+
+  app_efl_main(mArgc, mArgv, &mImpl->mEventCallback, this);
+
+  mRunning = false;
+}
+
+void Framework::Quit()
+{
+  app_efl_exit();
+}
+
+bool Framework::IsMainLoopRunning()
+{
+  return mRunning;
+}
+
+void Framework::AddAbortCallback(boost::function<void(void)> callBack)
+{
+  mImpl->mAbortCallBack = callBack;
+}
+
+std::string Framework::GetBundleName() const
+{
+  return mBundleName;
+}
+
+void Framework::SetBundleName(const std::string& name)
+{
+  mBundleName = name;
+}
+
+std::string Framework::GetBundleId() const
+{
+  return mBundleId;
+}
+
+void Framework::SetBundleId(const std::string& id)
+{
+  mBundleId = id;
+}
+
+void Framework::AbortCallback( )
+{
+  // if an abort call back has been installed run it.
+  if (mImpl->mAbortCallBack)
+  {
+    mImpl->mAbortCallBack();
+  }
+  else
+  {
+    Quit();
+  }
+}
+
+bool Framework::SlpAppStatusHandler(int type)
+{
+  switch (type)
+  {
+    case APP_CREATE:
+    {
+      mInitialised = true;
+
+      // Connect to abnormal exit signals
+      mAbortHandler.AbortOnSignal( SIGINT );
+      mAbortHandler.AbortOnSignal( SIGQUIT );
+      mAbortHandler.AbortOnSignal( SIGKILL );
+
+      mObserver.OnInit();
+      break;
+    }
+
+    case APP_RESET:
+      mObserver.OnReset();
+      break;
+
+    case APP_RESUME:
+      mObserver.OnResume();
+      break;
+
+    case APP_TERMINATE:
+     mObserver.OnTerminate();
+      break;
+
+    case APP_PAUSE:
+      mObserver.OnPause();
+      break;
+
+    case APP_LANGUAGE_CHANGE:
+      mObserver.OnLanguageChanged();
+      break;
+
+    default:
+      break;
+  }
+
+  return true;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/tizen/tilt-sensor-impl-tizen.cpp b/adaptors/tizen/tilt-sensor-impl-tizen.cpp
new file mode 100644 (file)
index 0000000..d171c6a
--- /dev/null
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "tilt-sensor-impl.h"
+
+// EXTERNAL INCLUDES
+#include <cmath>
+#ifdef DALI_PROFILE_LITE
+#include <sensor_internal.h>
+#else
+#include <sensor.h>
+#endif
+
+#include <dali/public-api/object/type-registry.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <adaptor-impl.h>
+
+#ifdef __arm__
+#define SENSOR_ENABLED
+#endif
+
+namespace // unnamed namespace
+{
+
+const int NUMBER_OF_SAMPLES = 10;
+
+const float MAX_ACCELEROMETER_XY_VALUE = 9.8f;
+
+// Type Registration
+Dali::BaseHandle Create()
+{
+  return Dali::Internal::Adaptor::TiltSensor::Get();
+}
+
+Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), Create );
+
+Dali::SignalConnectorType signalConnector1( typeRegistration, Dali::TiltSensor::SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
+
+} // unnamed namespace
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+Dali::TiltSensor TiltSensor::New()
+{
+  Dali::TiltSensor sensor = Dali::TiltSensor(new TiltSensor());
+
+  return sensor;
+}
+
+Dali::TiltSensor TiltSensor::Get()
+{
+  Dali::TiltSensor sensor;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the keyboard focus manager is already created
+    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::TiltSensor ) );
+    if(handle)
+    {
+      // If so, downcast the handle of singleton to keyboard focus manager
+      sensor = Dali::TiltSensor( dynamic_cast< TiltSensor* >( handle.GetObjectPtr() ) );
+    }
+    else
+    {
+      // Create a singleton instance
+      Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
+      sensor = TiltSensor::New();
+      adaptorImpl.RegisterSingleton( typeid( sensor ), sensor );
+      handle = sensor;
+    }
+  }
+
+  return sensor;
+}
+
+TiltSensor::~TiltSensor()
+{
+  Disable();
+}
+
+bool TiltSensor::Enable()
+{
+  // Make sure sensor API is responding
+  bool success = Update();
+
+  if ( success )
+  {
+    if ( !mTimer )
+    {
+      mTimer = Dali::Timer::New( 1000.0f / mFrequencyHertz );
+      mTimer.TickSignal().Connect( mTimerSlot, &TiltSensor::Update );
+    }
+
+    if ( mTimer &&
+         !mTimer.IsRunning() )
+    {
+      mTimer.Start();
+    }
+  }
+
+  return success;
+}
+
+void TiltSensor::Disable()
+{
+  if ( mTimer )
+  {
+    mTimer.Stop();
+    mTimer.Reset();
+  }
+}
+
+bool TiltSensor::IsEnabled() const
+{
+  return ( mTimer && mTimer.IsRunning() );
+}
+
+float TiltSensor::GetRoll() const
+{
+  return mRoll;
+}
+
+float TiltSensor::GetPitch() const
+{
+  return mPitch;
+}
+
+Quaternion TiltSensor::GetRotation() const
+{
+  return mRotation;
+}
+
+TiltSensor::TiltedSignalV2& TiltSensor::TiltedSignal()
+{
+  return mTiltedSignalV2;
+}
+
+void TiltSensor::SetUpdateFrequency( float frequencyHertz )
+{
+  DALI_ASSERT_ALWAYS( frequencyHertz > 0.0f && "Frequency must have a positive value" );
+
+  if ( fabsf(mFrequencyHertz - frequencyHertz) >= GetRangedEpsilon(mFrequencyHertz, frequencyHertz) )
+  {
+    mFrequencyHertz = frequencyHertz;
+
+    if ( mTimer )
+    {
+      mTimer.SetInterval( 1000.0f / mFrequencyHertz );
+    }
+  }
+}
+
+float TiltSensor::GetUpdateFrequency() const
+{
+  return mFrequencyHertz;
+}
+
+void TiltSensor::SetRotationThreshold(Radian rotationThreshold)
+{
+  mRotationThreshold = rotationThreshold;
+}
+
+Radian TiltSensor::GetRotationThreshold() const
+{
+  return mRotationThreshold;
+}
+
+bool TiltSensor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+{
+  bool connected( true );
+  TiltSensor* sensor = dynamic_cast<TiltSensor*>( object );
+
+  if( sensor &&
+      Dali::TiltSensor::SIGNAL_TILTED == signalName )
+  {
+    sensor->TiltedSignal().Connect( tracker, functor );
+  }
+  else
+  {
+    // signalName does not match any signal
+    connected = false;
+  }
+
+  return connected;
+}
+
+TiltSensor::TiltSensor()
+: mFrequencyHertz( Dali::TiltSensor::DEFAULT_UPDATE_FREQUENCY ),
+  mTimerSlot( this ),
+  mSensorFrameworkHandle( -1 ),
+  mRoll( 0.0f ),
+  mPitch( 0.0f ),
+  mRotation( 0.0f, Vector3::YAXIS ),
+  mRotationThreshold( 0.0f )
+{
+  mRollValues.resize( NUMBER_OF_SAMPLES, 0.0f );
+  mPitchValues.resize( NUMBER_OF_SAMPLES, 0.0f );
+}
+
+bool TiltSensor::Update()
+{
+  float newRoll = 0.0f;
+  float newPitch = 0.0f;
+  Quaternion newRotation;
+#ifdef SENSOR_ENABLED
+
+  // Read accelerometer data
+
+  mSensorFrameworkHandle = sf_connect( ACCELEROMETER_SENSOR );
+  if ( mSensorFrameworkHandle < 0 )
+  {
+    DALI_LOG_ERROR( "Failed to connect to sensor framework" );
+    return false;
+  }
+
+  if ( sf_start(mSensorFrameworkHandle, 0) < 0 )
+  {
+    DALI_LOG_ERROR( "Failed to start sensor" );
+    sf_disconnect(mSensorFrameworkHandle);
+    return false;
+  }
+
+  sensor_data_t* base_data_values = (sensor_data_t*)malloc(sizeof(sensor_data_t));
+
+  int dataErr = sf_get_data(mSensorFrameworkHandle, ACCELEROMETER_BASE_DATA_SET, base_data_values);
+  if ( dataErr < 0 )
+  {
+    DALI_LOG_ERROR( "Failed to retrieve sensor data" );
+    free(base_data_values);
+    sf_stop(mSensorFrameworkHandle);
+    sf_disconnect(mSensorFrameworkHandle);
+    return false;
+  }
+
+  sf_stop(mSensorFrameworkHandle);
+  sf_disconnect(mSensorFrameworkHandle);
+
+  mRollValues.push_back( base_data_values->values[0] );
+  mRollValues.pop_front();
+
+  mPitchValues.push_back( base_data_values->values[1] );
+  mPitchValues.pop_front();
+
+  free(base_data_values);
+  base_data_values = NULL;
+
+  float averageRoll( 0.0f );
+  for ( std::deque<float>::const_iterator iter = mRollValues.begin(); mRollValues.end() != iter; ++iter )
+  {
+    averageRoll += *iter;
+  }
+  averageRoll /= mRollValues.size();
+
+  float averagePitch( 0.0f );
+  for ( std::deque<float>::const_iterator iter = mPitchValues.begin(); mPitchValues.end() != iter; ++iter )
+  {
+    averagePitch += *iter;
+  }
+  averagePitch /= mPitchValues.size();
+
+  newRoll  = Clamp( float(averageRoll  / MAX_ACCELEROMETER_XY_VALUE), -1.0f/*min*/, 1.0f/*max*/ );
+  newPitch = Clamp( float(averagePitch / MAX_ACCELEROMETER_XY_VALUE), -1.0f/*min*/, 1.0f/*max*/ );
+
+  newRotation = Quaternion( newRoll  * Math::PI * -0.5f, Vector3::YAXIS ) *
+              Quaternion( newPitch * Math::PI * -0.5f, Vector3::XAXIS );
+#endif // SENSOR_ENABLED
+
+  Radian angle(Quaternion::AngleBetween(newRotation, mRotation));
+  // If the change in value is more than the threshold then emit tilted signal.
+  if( angle > mRotationThreshold )
+  {
+    mRoll = newRoll;
+    mPitch = newPitch;
+    mRotation = newRotation;
+
+    if ( !mTiltedSignalV2.Empty() )
+    {
+      Dali::TiltSensor handle( this );
+      mTiltedSignalV2.Emit( handle );
+    }
+  }
+
+  return true;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/tizen/tilt-sensor-impl.h b/adaptors/tizen/tilt-sensor-impl.h
new file mode 100644 (file)
index 0000000..20c68d9
--- /dev/null
@@ -0,0 +1,194 @@
+#ifndef __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
+#define __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <deque>
+#include <dali/public-api/object/base-object.h>
+#include <timer.h>
+
+// INTERNAL INCLUDES
+#include <tilt-sensor.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * TiltSensor provides pitch & roll values when the device is tilted.
+ */
+class TiltSensor : public Dali::BaseObject
+{
+public:
+
+  typedef Dali::TiltSensor::TiltedSignalV2 TiltedSignalV2;
+
+  /**
+   * Create a TiltSensor.
+   * This should only be called once by the Adaptor class.
+   * @return A newly allocated tilt-sensor.
+   */
+  static Dali::TiltSensor New();
+
+  /**
+   * @copydoc Dali::TiltSensor::Get()
+   */
+  static Dali::TiltSensor Get();
+
+  /**
+   * @copydoc Dali::TiltSensor::Enable()
+   */
+  bool Enable();
+
+  /**
+   * @copydoc Dali::TiltSensor::Disable()
+   */
+  void Disable();
+
+  /**
+   * @copydoc Dali::TiltSensor::IsEnabled()
+   */
+  bool IsEnabled() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::GetRoll()
+   */
+  float GetRoll() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::GetPitch()
+   */
+  float GetPitch() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::GetRotation()
+   */
+  Quaternion GetRotation() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::TiltedSignal()
+   */
+  TiltedSignalV2& TiltedSignal();
+
+  /**
+   * @copydoc Dali::TiltSensor::SetUpdateFrequency()
+   */
+  void SetUpdateFrequency( float frequencyHertz );
+
+  /**
+   * @copydoc Dali::TiltSensor::GetUpdateFrequency()
+   */
+  float GetUpdateFrequency() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::SetRotationThreshold()
+   */
+  void SetRotationThreshold(Radian rotationThreshold);
+
+  /**
+   * @copydoc Dali::TiltSensor::GetRotationThreshold()
+   */
+  Radian GetRotationThreshold() const;
+
+  /**
+   * Connects a callback function with the object's signals.
+   * @param[in] object The object providing the signal.
+   * @param[in] tracker Used to disconnect the signal.
+   * @param[in] signalName The signal to connect to.
+   * @param[in] functor A newly allocated FunctorDelegate.
+   * @return True if the signal was connected.
+   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+   */
+  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+
+private:
+
+  /**
+   * Private constructor; see also TiltSensor::New()
+   */
+  TiltSensor();
+
+  /**
+   * Destructor
+   */
+  virtual ~TiltSensor();
+
+  /**
+   * Timer callback to update the tilt values
+   */
+  bool Update();
+
+  // Undefined
+  TiltSensor(const TiltSensor&);
+
+  // Undefined
+  TiltSensor& operator=(TiltSensor&);
+
+private:
+
+  float mFrequencyHertz;
+  Dali::Timer mTimer;
+  SlotDelegate< TiltSensor > mTimerSlot;
+
+  int mSensorFrameworkHandle;
+
+  float mRoll;
+  float mPitch;
+  Quaternion mRotation;
+
+  Radian mRotationThreshold;
+
+  std::deque<float> mRollValues;
+  std::deque<float> mPitchValues;
+
+  TiltedSignalV2 mTiltedSignalV2;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::Adaptor::TiltSensor& GetImplementation(Dali::TiltSensor& sensor)
+{
+  DALI_ASSERT_ALWAYS( sensor && "TiltSensor handle is empty" );
+
+  BaseObject& handle = sensor.GetBaseObject();
+
+  return static_cast<Internal::Adaptor::TiltSensor&>(handle);
+}
+
+inline const Internal::Adaptor::TiltSensor& GetImplementation(const Dali::TiltSensor& sensor)
+{
+  DALI_ASSERT_ALWAYS( sensor && "TiltSensor handle is empty" );
+
+  const BaseObject& handle = sensor.GetBaseObject();
+
+  return static_cast<const Internal::Adaptor::TiltSensor&>(handle);
+}
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
diff --git a/adaptors/tizen/tts-player-impl-tizen.cpp b/adaptors/tizen/tts-player-impl-tizen.cpp
new file mode 100644 (file)
index 0000000..282861c
--- /dev/null
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "tts-player-impl.h"
+
+// EXTERNAL INCLUDES
+#include <tts.h>
+#include <stdio.h>
+
+// INTERNAL INCLUDES
+#include <dali/public-api/object/type-registry.h>
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace // unnamed namespace
+{
+// Type Registration
+Dali::BaseHandle Create()
+{
+  return Dali::TtsPlayer::Get() ;
+}
+
+Dali::TypeRegistration mType( typeid(Dali::TtsPlayer), typeid(Dali::BaseHandle), Create ) ;
+} // unnamed namespace
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* TtsPlayer::gLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_TTS_PLAYER");
+#endif
+
+Dali::TtsPlayer TtsPlayer::New(Dali::TtsPlayer::Mode mode)
+{
+  Dali::TtsPlayer player = Dali::TtsPlayer(new TtsPlayer(mode));
+
+  return player;
+}
+
+TtsPlayer::TtsPlayer(Dali::TtsPlayer::Mode mode)
+: mInitialized(false),
+  mUnplayedString(""),
+  mUtteranceId(0),
+  mTtsMode(mode)
+{
+  Initialize();
+}
+
+TtsPlayer::~TtsPlayer()
+{
+  // If it is playing, stop it
+  Stop();
+
+  // Unset the callback funtion for TTS state change
+  int retVal = tts_unset_state_changed_cb(mTtsHandle);
+  if( retVal != TTS_ERROR_NONE )
+  {
+    LogErrorCode(static_cast<tts_error_e>(retVal));
+  }
+
+  // Destroy the TTS handle and disconnects the daemon
+  retVal = tts_destroy(mTtsHandle);
+  if( retVal != TTS_ERROR_NONE )
+  {
+    LogErrorCode(static_cast<tts_error_e>(retVal));
+  }
+}
+
+void TtsPlayer::Initialize()
+{
+  // Create the TTS handle
+  int retVal = tts_create(&mTtsHandle);
+
+  if( retVal != TTS_ERROR_NONE )
+  {
+    LogErrorCode(static_cast<tts_error_e>(retVal));
+  }
+  else
+  {
+    // Set the callback funtion for TTS state change
+    retVal = tts_set_state_changed_cb(mTtsHandle, &StateChangedCallback, this);
+    if( retVal != TTS_ERROR_NONE )
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+
+    // Check tts mode
+    tts_mode_e ttsMode = TTS_MODE_DEFAULT;
+    switch (mTtsMode)
+    {
+      case Dali::TtsPlayer::DEFAULT:
+        ttsMode = TTS_MODE_DEFAULT;
+      break;
+      case Dali::TtsPlayer::NOTIFICATION:
+        ttsMode = TTS_MODE_NOTIFICATION;
+      break;
+      case Dali::TtsPlayer::SCREEN_READER:
+        ttsMode = TTS_MODE_SCREEN_READER;
+      break;
+      default:
+      break;
+    }
+
+    // Set mode
+    retVal = tts_set_mode(mTtsHandle, ttsMode);
+    if(retVal != TTS_ERROR_NONE)
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+
+    // Connect the TTS daemon asynchronously
+    retVal = tts_prepare(mTtsHandle);
+    if(retVal != TTS_ERROR_NONE)
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+  }
+}
+
+void TtsPlayer::Play(const std::string& text)
+{
+  if(mInitialized)
+  {
+    Stop();
+
+    // Add text to the queue, and use normal speed, default language and default voice set by the user
+    int retVal = tts_add_text(mTtsHandle, text.c_str(), NULL, TTS_VOICE_TYPE_AUTO, TTS_SPEED_AUTO, &mUtteranceId);
+    if(retVal != TTS_ERROR_NONE)
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+    else
+    {
+      // Start synthesizing voice from text in the queue and play synthesized audio data
+      retVal = tts_play(mTtsHandle);
+      if(retVal != TTS_ERROR_NONE)
+      {
+        LogErrorCode(static_cast<tts_error_e>(retVal));
+      }
+    }
+  }
+  else
+  {
+    mUnplayedString = text;
+  }
+}
+
+void TtsPlayer::Stop()
+{
+  if(mInitialized)
+  {
+    // Check the current TTS state
+    tts_state_e state;
+    int retVal = tts_get_state(mTtsHandle, &state);
+    if(retVal != TTS_ERROR_NONE)
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+    else if(state == TTS_STATE_PLAYING || state == TTS_STATE_PAUSED)
+    {
+      // If it is playing or paused, stop playing and clear the queue
+      retVal = tts_stop(mTtsHandle);
+      if( retVal != TTS_ERROR_NONE )
+      {
+        LogErrorCode(static_cast<tts_error_e>(retVal));
+      }
+    }
+  }
+}
+
+void TtsPlayer::Pause()
+{
+  if(mInitialized)
+  {
+    // Check the current TTS state
+    tts_state_e state;
+    int retVal = tts_get_state(mTtsHandle, &state);
+    if(retVal != TTS_ERROR_NONE)
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+    else if(state == TTS_STATE_PLAYING)
+    {
+      // If the player is playing, pause it.
+      retVal = tts_pause(mTtsHandle);
+      if( retVal != TTS_ERROR_NONE )
+      {
+        LogErrorCode(static_cast<tts_error_e>(retVal));
+      }
+    }
+  }
+}
+
+void TtsPlayer::Resume()
+{
+  if(mInitialized)
+  {
+    // Check the current TTS state
+    tts_state_e state;
+    int retVal = tts_get_state(mTtsHandle, &state);
+    if(retVal != TTS_ERROR_NONE)
+    {
+      LogErrorCode(static_cast<tts_error_e>(retVal));
+    }
+    else if(state == TTS_STATE_PAUSED)
+    {
+      // If the player is paused, resume it.
+      retVal = tts_play(mTtsHandle);
+      if( retVal != TTS_ERROR_NONE )
+      {
+        LogErrorCode(static_cast<tts_error_e>(retVal));
+      }
+    }
+  }
+}
+
+void TtsPlayer::StateChangedCallback(tts_h tts, tts_state_e previous, tts_state_e current, void *userData)
+{
+  TtsPlayer* obj = static_cast<TtsPlayer*>(userData);
+  if(!obj->mInitialized && current == TTS_STATE_READY)
+  {
+    obj->mInitialized = true;
+
+    // if there is queued text before initialization, play it
+    if(obj->mUnplayedString != "")
+    {
+      obj->Play(obj->mUnplayedString);
+      obj->mUnplayedString = "";
+    }
+  }
+}
+
+void TtsPlayer::LogErrorCode(tts_error_e reason)
+{
+  std::string error_string;
+
+  switch (reason)
+  {
+    case TTS_ERROR_NONE:
+    {
+      break;
+    }
+    case TTS_ERROR_OUT_OF_MEMORY:
+    {
+      error_string = "TTS: Out of Memory\n";
+      break;
+    }
+    case TTS_ERROR_IO_ERROR:
+    {
+      error_string = "TTS: I/O error\n";
+      break;
+    }
+    case TTS_ERROR_INVALID_PARAMETER:
+    {
+      error_string = "TTS: Invalid parameter\n";
+      break;
+    }
+    case TTS_ERROR_OUT_OF_NETWORK:
+    {
+      error_string = "TTS: Out of network\n";
+      break;
+    }
+    case TTS_ERROR_INVALID_STATE:
+    {
+      error_string = "TTS: Invalid state\n";
+      break;
+    }
+    case TTS_ERROR_INVALID_VOICE:
+    {
+      error_string = "TTS: Invalid voice\n";
+      break;
+    }
+    case TTS_ERROR_ENGINE_NOT_FOUND:
+    {
+      error_string = "TTS: No available engine\n";
+      break;
+    }
+    case TTS_ERROR_TIMED_OUT:
+    {
+      error_string = "TTS: No answer from the daemon\n";
+      break;
+    }
+    case TTS_ERROR_OPERATION_FAILED:
+    {
+      error_string = "TTS: Operation failed\n";
+      break;
+    }
+    default:
+    {
+      error_string = "Invalid TTS error code\n";
+      break;
+    }
+  }
+
+  if(reason != TTS_ERROR_NONE)
+  {
+    DALI_LOG_WARNING("[%s:%d] tts error : %s\n", __FUNCTION__, __LINE__, error_string.c_str());
+  }
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/tizen/tts-player-impl.h b/adaptors/tizen/tts-player-impl.h
new file mode 100644 (file)
index 0000000..d2659bc
--- /dev/null
@@ -0,0 +1,155 @@
+#ifndef __DALI_INTERNAL_TTS_PLAYER_H__
+#define __DALI_INTERNAL_TTS_PLAYER_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <tts.h>
+#include <string>
+
+#include <dali/integration-api/debug.h>
+#include <dali/public-api/object/base-object.h>
+#include <tts-player.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * Text-to-speech player
+ */
+class TtsPlayer : public Dali::BaseObject
+{
+
+public:
+
+  /**
+   * Create a TtsPlayer with the given mode.
+   * This should only be called once by the Adaptor class for each given mode.
+   * @param mode the mode of tts-player
+   * @return A newly created TtsPlayer.
+   */
+  static Dali::TtsPlayer New(Dali::TtsPlayer::Mode mode);
+
+  /**
+   * @copydoc TtsPlayer::Play()
+   */
+  void Play(const std::string& text);
+
+  /**
+   * @copydoc TtsPlayer::Stop()
+   */
+  void Stop();
+
+  /**
+   * @copydoc TtsPlayer::Pause()
+   */
+  void Pause();
+
+  /**
+   * @copydoc TtsPlayer::Resume()
+   */
+  void Resume();
+
+private:
+
+  /**
+   * Private Constructor; see also TtsPlayer::New()
+   * @param mode the mode of tts-player
+   */
+  TtsPlayer(Dali::TtsPlayer::Mode mode);
+
+  /**
+   * Destructor
+   */
+  virtual ~TtsPlayer();
+
+  /**
+   * Initializes the player.
+   */
+  void Initialize();
+
+  /**
+   * Logs the error code.
+   * @param[in] reason The error code
+   */
+  void LogErrorCode(tts_error_e reason);
+
+  /**
+   * Called when the state of TTS is changed.
+   *
+   * @param[in] tts The handle for TTS
+   * @param[in] previous A previous state
+   * @param[in] current A current state
+   * @param[in] userData The user data passed from the callback registration function.
+   */
+  static void StateChangedCallback(tts_h tts, tts_state_e previous, tts_state_e current, void *userData);
+
+  // Undefined
+  TtsPlayer(const TtsPlayer&);
+
+  // Undefined
+  TtsPlayer& operator=(TtsPlayer&);
+
+private:
+
+  bool mInitialized; ///< Whether the TTS player is initialised successfully or not
+  std::string mUnplayedString; ///< The text that can not be played because tts engine is not yet initialized
+  tts_h mTtsHandle;  ///< The handle of TTS
+  int mUtteranceId;  ///< The utterance ID
+
+  Dali::TtsPlayer::Mode mTtsMode; ///< The current mode of tts engine
+
+#if defined(DEBUG_ENABLED)
+public:
+  static Debug::Filter* gLogFilter;
+#endif
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::Adaptor::TtsPlayer& GetImplementation(Dali::TtsPlayer& player)
+{
+  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
+
+  BaseObject& handle = player.GetBaseObject();
+
+  return static_cast<Internal::Adaptor::TtsPlayer&>(handle);
+}
+
+inline const Internal::Adaptor::TtsPlayer& GetImplementation(const Dali::TtsPlayer& player)
+{
+  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
+
+  const BaseObject& handle = player.GetBaseObject();
+
+  return static_cast<const Internal::Adaptor::TtsPlayer&>(handle);
+}
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_TTS_PLAYER_H__
diff --git a/adaptors/tizen/vsync-monitor-tizen.cpp b/adaptors/tizen/vsync-monitor-tizen.cpp
new file mode 100644 (file)
index 0000000..0bb4f99
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include "vsync-monitor.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VSYNC_MONITOR");
+#endif
+
+const char * const DRM_DEVICE( "/dev/dri/card0" );
+const int FD_NONE( -1 );
+
+void ScreenStatusChanged(keynode_t* node, void* data)
+{
+  VSyncMonitor* vsyncMonitor( static_cast< VSyncMonitor* >( data ) );
+
+  int status = 0;
+  vconf_get_int( VCONFKEY_PM_STATE, &status );
+
+  // status values
+  //  - VCONFKEY_PM_STATE_NORMAL : turn vsync on
+  //  - VCONFKEY_PM_STATE_LCDDIM : turn vsync off
+  //  - VCONFKEY_PM_STATE_LCDOFF : turn vsync off
+  //  - VCONFKEY_PM_STATE_SLEEP : turn vsync off
+  const bool screenOn( VCONFKEY_PM_STATE_NORMAL == status );
+
+  vsyncMonitor->SetUseHardware( screenOn );
+
+  DALI_LOG_INFO( gLogFilter, Debug::Concise, "%s, Screen %s.\n", __PRETTY_FUNCTION__, screenOn ? "On" : "Off" );
+}
+
+} // unnamed namespace
+
+VSyncMonitor::VSyncMonitor()
+: mFileDescriptor( FD_NONE ),
+  mUseHardware( true )
+{
+  vconf_notify_key_changed( VCONFKEY_PM_STATE, ScreenStatusChanged, this );
+}
+
+VSyncMonitor::~VSyncMonitor()
+{
+  Terminate();
+
+  vconf_ignore_key_changed( VCONFKEY_PM_STATE, ScreenStatusChanged );
+}
+
+void VSyncMonitor::SetUseHardware( bool useHardware )
+{
+  mUseHardware = useHardware;
+}
+
+void VSyncMonitor::Initialize()
+{
+  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
+
+  // Read initial 'use hardware' status
+  ScreenStatusChanged( NULL, this );
+
+  // open /dev node
+  mFileDescriptor = open( DRM_DEVICE, O_RDWR );
+
+  // setup vblank request - block and wait for next vblank
+  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
+  mVBlankInfo.request.sequence = 0;
+  mVBlankInfo.request.signal = 0;
+
+  // setup vblank reply - block and wait for next vblank
+  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
+  mVBlankInfo.reply.sequence = 0;
+  mVBlankInfo.reply.tval_sec = 0;
+  mVBlankInfo.reply.tval_usec = 0;
+}
+
+void VSyncMonitor::Terminate()
+{
+  if( mFileDescriptor != FD_NONE )
+  {
+    close( mFileDescriptor );
+    mFileDescriptor = FD_NONE;
+  }
+}
+
+bool VSyncMonitor::UseHardware()
+{
+  return mUseHardware && (FD_NONE != mFileDescriptor );
+}
+
+
+bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
+{
+  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "ECoreX::VSyncMonitor is not initialized" );
+
+  if( 0 == drmWaitVBlank( mFileDescriptor, &mVBlankInfo ) )
+  {
+    frameNumber = mVBlankInfo.reply.sequence;
+    seconds = mVBlankInfo.reply.tval_sec;
+    microseconds = mVBlankInfo.reply.tval_usec;
+
+    return true;
+  }
+
+  return false;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
index 4b511a79ec9f9c43a7c4cc04d9c9af41ff734088..f3258d37a8132ea561da66064bfcd3d6c419a252 100644 (file)
@@ -1,6 +1,6 @@
 # tv profile internal files
-adaptor_common_internal_src_files += \
-  $(adaptor_common_dir)/../tv/tv-key-impl.cpp  \
-  $(adaptor_common_dir)/../tv/tv-render-surface-factory.cpp \
-  $(adaptor_common_dir)/../tv/tv-system-settings.cpp \
-  $(adaptor_common_dir)/../tv/tv-color-controller-impl.cpp
\ No newline at end of file
+adaptor_common_internal_tv_profile_src_files = \
+  $(adaptor_tv_dir)/tv-key-impl.cpp  \
+  $(adaptor_tv_dir)/tv-render-surface-factory.cpp \
+  $(adaptor_tv_dir)/tv-system-settings.cpp \
+  $(adaptor_tv_dir)/tv-color-controller-impl.cpp
diff --git a/adaptors/ubuntu/accessibility-manager-impl-ubuntu.cpp b/adaptors/ubuntu/accessibility-manager-impl-ubuntu.cpp
new file mode 100644 (file)
index 0000000..cb8fc21
--- /dev/null
@@ -0,0 +1,576 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "accessibility-manager-impl.h"
+
+// EXTERNAL INCLUDES
+
+#include <dali/public-api/dali-core.h>
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/gesture-requests.h>
+#include "system-settings.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gAccessibilityManagerLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_MANAGER");
+#endif
+
+BaseHandle Create()
+{
+  BaseHandle handle( AccessibilityManager::Get() );
+
+  if ( !handle && Adaptor::IsAvailable() )
+  {
+    Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
+    Dali::AccessibilityManager manager = Dali::AccessibilityManager( new AccessibilityManager() );
+    adaptorImpl.RegisterSingleton( typeid( manager ), manager );
+    handle = manager;
+  }
+
+  return handle;
+}
+TypeRegistration ACCESSIBILITY_MANAGER_TYPE( typeid(Dali::AccessibilityManager), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
+
+} // unnamed namespace
+
+Dali::AccessibilityManager AccessibilityManager::Get()
+{
+  Dali::AccessibilityManager manager;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::AccessibilityManager ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      manager = Dali::AccessibilityManager( dynamic_cast< AccessibilityManager* >( handle.GetObjectPtr() ) );
+    }
+  }
+
+  return manager;
+}
+
+Vector2 AccessibilityManager::GetReadPosition() const
+{
+  return mReadPosition;
+}
+
+void AccessibilityManager::SetActionHandler(AccessibilityActionHandler& handler)
+{
+  mActionHandler = &handler;
+}
+
+void AccessibilityManager::SetGestureHandler(AccessibilityGestureHandler& handler)
+{
+  if( mAccessibilityGestureDetector )
+  {
+    mAccessibilityGestureDetector->SetGestureHandler(handler);
+  }
+}
+
+bool AccessibilityManager::HandleActionClearFocusEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionClearFocus signal in first, ClearAccessibilityFocus for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionClearFocusSignalV2.Empty() )
+    {
+      mActionClearFocusSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->ClearAccessibilityFocus();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  Dali::TouchEvent touchEvent(timeStamp);
+  touchEvent.points.push_back(point);
+
+  /*
+   * In order to application decide touch action first,
+   * emit ActionScroll signal in first, AccessibilityActionScroll  for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionScrollSignalV2.Empty() )
+    {
+      mActionScrollSignalV2.Emit( handle, touchEvent );
+    }
+  }
+
+  Integration::TouchEvent event;
+  if (mCombiner.GetNextTouchEvent(point, timeStamp, event))
+  {
+    // Process the touch event in accessibility gesture detector
+    if( mAccessibilityGestureDetector )
+    {
+      mAccessibilityGestureDetector->SendEvent(event);
+      ret = true;
+    }
+  }
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  bool ret = false;
+
+  Dali::TouchEvent touchEvent(timeStamp);
+  touchEvent.points.push_back(point);
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionTouch(touchEvent);
+  }
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionBackEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionBack signal in first, AccessibilityActionBack for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionBackSignalV2.Empty() )
+    {
+      mActionBackSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionBack();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+void AccessibilityManager::HandleActionEnableEvent()
+{
+  EnableAccessibility();
+}
+
+void AccessibilityManager::HandleActionDisableEvent()
+{
+  DisableAccessibility();
+}
+
+void AccessibilityManager::EnableAccessibility()
+{
+  if(mIsEnabled == false)
+  {
+    mIsEnabled = true;
+
+    if( mActionHandler )
+    {
+      mActionHandler->ChangeAccessibilityStatus();
+    }
+
+    //emit status changed signal
+    Dali::AccessibilityManager handle( this );
+    mStatusChangedSignalV2.Emit( handle );
+  }
+}
+
+void AccessibilityManager::DisableAccessibility()
+{
+  if(mIsEnabled == true)
+  {
+    mIsEnabled = false;
+
+    if( mActionHandler )
+    {
+      mActionHandler->ChangeAccessibilityStatus();
+    }
+
+    //emit status changed signal
+    Dali::AccessibilityManager handle( this );
+    mStatusChangedSignalV2.Emit( handle );
+
+    // Destroy the TtsPlayer if exists.
+    Dali::Adaptor& adaptor = Dali::Adaptor::Get();
+    Adaptor::GetImplementation(adaptor).DestroyTtsPlayer(Dali::TtsPlayer::SCREEN_READER);
+  }
+}
+
+bool AccessibilityManager::IsEnabled() const
+{
+  return mIsEnabled;
+}
+
+void AccessibilityManager::SetIndicator(Indicator* indicator)
+{
+  mIndicator = indicator;
+}
+
+AccessibilityManager::AccessibilityManager()
+: mIsEnabled(false),
+  mActionHandler(NULL),
+  mIndicator(NULL),
+  mIndicatorFocused(false)
+{
+  int isEnabled = 0;
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
+
+  if(isEnabled == 1)
+  {
+    mIsEnabled = true;
+  }
+  else
+  {
+    mIsEnabled = false;
+  }
+
+  mAccessibilityGestureDetector = new AccessibilityGestureDetector();
+}
+
+AccessibilityManager::~AccessibilityManager()
+{
+}
+
+bool AccessibilityManager::HandleActionNextEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionNext signal in first, AccessibilityActionNext for handler in next
+   */
+  if( !mIndicatorFocused )
+  {
+    if( !mActionNextSignalV2.Empty() )
+    {
+      mActionNextSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionNext(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionPreviousEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+   /*
+   * In order to application decide reading action first,
+   * emit ActionPrevious signal in first, AccessibilityActionPrevious for handler in next
+   */
+ if ( !mIndicatorFocused )
+  {
+    if( !mActionPreviousSignalV2.Empty() )
+    {
+      mActionPreviousSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionActivateEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionActivate signal in first, AccessibilityActionActivate for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionActivateSignalV2.Empty() )
+    {
+      mActionActivateSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionActivate();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain)
+{
+  bool ret = false;
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %d , %d\n", __FUNCTION__, __LINE__, x, y);
+
+  mReadPosition.x = x;
+  mReadPosition.y = y;
+
+  Dali::AccessibilityManager handle( this );
+
+  bool indicatorFocused = false;
+
+  // Check whether the Indicator is focused
+  if( mIndicator && mIndicator->IsConnected() )
+  {
+    // Check the position and size of Indicator actor
+    Dali::Actor indicatorActor = mIndicator->GetActor();
+    Vector3 position = Vector3(0.0f, 0.0f, 0.0f);
+    Vector3 size = indicatorActor.GetCurrentSize();
+
+    if(mReadPosition.x >= position.x &&
+       mReadPosition.x <= position.x + size.width &&
+       mReadPosition.y >= position.y &&
+       mReadPosition.y <= position.y + size.height)
+    {
+      indicatorFocused = true;
+      DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] Indicator area!!!!\n", __FUNCTION__, __LINE__);
+    }
+  }
+
+  if( mIndicator )
+  {
+    if( !mIndicatorFocused && indicatorFocused )
+    {
+      // If Indicator is focused, the focus should be cleared in Dali focus chain.
+      if( mActionHandler )
+      {
+        mActionHandler->ClearAccessibilityFocus();
+      }
+    }
+
+    mIndicatorFocused = indicatorFocused;
+
+    // Send accessibility READ action information to Indicator
+    if( mIndicatorFocused )
+    {
+      DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] Send READ message to indicator!!!!\n", __FUNCTION__, __LINE__);
+    }
+  }
+
+  if(allowReadAgain)
+  {
+    /*
+     * In order to application decide reading action first,
+     * emit ActionRead signal in first, AccessibilityActionRead for handler in next
+     */
+    if( !mIndicatorFocused )
+    {
+      if ( !mActionReadSignalV2.Empty() )
+      {
+        mActionReadSignalV2.Emit( handle );
+      }
+    }
+  }
+  else
+  {
+    /*
+     * In order to application decide reading action first,
+     * emit ActionRead signal in first, AccessibilityActionRead for handler in next
+     */
+    if( !mIndicatorFocused )
+    {
+      if ( !mActionOverSignalV2.Empty() )
+      {
+        mActionOverSignalV2.Emit( handle );
+      }
+    }
+  }
+
+  if( mActionHandler && !mIndicatorFocused)
+  {
+    // If Indicator is not focused, the accessibility actions should be handled by the registered
+    // accessibility action handler (e.g. focus manager)
+    ret = mActionHandler->AccessibilityActionRead(allowReadAgain);
+    DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+  }
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionReadNextEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionReadNext signal in first, AccessibilityActionReadNext for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionReadNextSignalV2.Empty() )
+    {
+      mActionReadNextSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionReadPreviousEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionReadPrevious signal in first, AccessibilityActionReadPrevious for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionReadPreviousSignalV2.Empty() )
+    {
+      mActionReadPreviousSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionUpEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionUp signal in first, AccessibilityActionUp for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionUpSignalV2.Empty() )
+    {
+      mActionUpSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionUp();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionDownEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionDown signal in first, AccessibilityActionDown for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionDownSignalV2.Empty() )
+    {
+      mActionDownSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionDown();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/ubuntu/accessibility-manager-impl.h b/adaptors/ubuntu/accessibility-manager-impl.h
new file mode 100644 (file)
index 0000000..0b2002d
--- /dev/null
@@ -0,0 +1,354 @@
+#ifndef __DALI_INTERNAL_ACCESSIBILITY_MANAGER_H__
+#define __DALI_INTERNAL_ACCESSIBILITY_MANAGER_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/math/vector2.h>
+#include <dali/public-api/events/touch-point.h>
+#include <dali/integration-api/events/touch-event-combiner.h>
+#include <accessibility-manager.h>
+
+// INTERNAL INCLUDES
+#include <accessibility-action-handler.h>
+#include <accessibility-gesture-handler.h>
+#include <indicator-impl.h>
+#include <accessibility-gesture-detector.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * This class detects to accessibility action
+ */
+class AccessibilityManager : public Dali::BaseObject
+{
+public:
+
+  typedef Dali::AccessibilityManager::AccessibilityActionSignalV2 AccessibilityActionSignalV2;
+  typedef Dali::AccessibilityManager::AccessibilityActionScrollSignalV2 AccessibilityActionScrollSignalV2;
+
+  // Creation
+
+  /**
+   * Constructor.
+   */
+  AccessibilityManager();
+
+  /**
+   * Get an instance of the AccessibilityManager.
+   * @return The instance of the AccessibilityManager.
+   */
+  static Dali::AccessibilityManager Get();
+
+  // Public API
+
+  /**
+   * Turn on accessibility action
+   * This method should be called by vconf callback
+   */
+  void EnableAccessibility();
+
+  /**
+   * Turn off accessibility action
+   * This method should be called by vconf callback
+   */
+  void DisableAccessibility();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::IsEnabled()
+   */
+  bool IsEnabled() const;
+
+  /**
+   * @copydoc Dali::AccessibilityManager::GetReadPosition() const
+   */
+  Vector2 GetReadPosition() const;
+
+  /**
+   * @copydoc Dali::AccessibilityManager::SetActionHandler()
+   */
+  void SetActionHandler(AccessibilityActionHandler& handler);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::SetGestureHandler()
+   */
+  void SetGestureHandler(AccessibilityGestureHandler& handler);
+
+  /**
+   * Set the Indicator
+   */
+  void SetIndicator(Indicator* indicator);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionNextEvent()
+   */
+  bool HandleActionNextEvent(bool allowEndFeedback = true);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionPreviousEvent()
+   */
+  bool HandleActionPreviousEvent(bool allowEndFeedback = true);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionActivateEvent()
+   */
+  bool HandleActionActivateEvent();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionReadEvent()
+   */
+  bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionReadNextEvent()
+   */
+  bool HandleActionReadNextEvent(bool allowEndFeedback = true);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionReadPreviousEvent()
+   */
+  bool HandleActionReadPreviousEvent(bool allowEndFeedback = true);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionUpEvent()
+   */
+  bool HandleActionUpEvent();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionDownEvent()
+   */
+  bool HandleActionDownEvent();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionClearFocusEvent()
+   */
+  bool HandleActionClearFocusEvent();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionScrollEvent()
+   */
+  bool HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionTouchEvent()
+   */
+  bool HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp);
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionBackEvent()
+   */
+  bool HandleActionBackEvent();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionEnableEvent()
+   */
+  void HandleActionEnableEvent();
+
+  /**
+   * @copydoc Dali::AccessibilityManager::HandleActionDisableEvent()
+   */
+  void HandleActionDisableEvent();
+
+public: // Signals
+
+  /**
+   * @copydoc Dali::AccessibilityManager::StatusChangedSignal
+   */
+  AccessibilityActionSignalV2& StatusChangedSignal()
+  {
+    return mStatusChangedSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionNextSignal
+   */
+  AccessibilityActionSignalV2& ActionNextSignal()
+  {
+    return mActionNextSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionPreviousSignal
+   */
+  AccessibilityActionSignalV2& ActionPreviousSignal()
+  {
+    return mActionPreviousSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionActivateSignal
+   */
+  AccessibilityActionSignalV2& ActionActivateSignal()
+  {
+    return mActionActivateSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionOverSignal
+   */
+  AccessibilityActionSignalV2& ActionOverSignal()
+  {
+    return mActionOverSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionReadSignal
+   */
+  AccessibilityActionSignalV2& ActionReadSignal()
+  {
+    return mActionReadSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionReadNextSignal
+   */
+  AccessibilityActionSignalV2& ActionReadNextSignal()
+  {
+    return mActionReadNextSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionReadPreviousSignal
+   */
+  AccessibilityActionSignalV2& ActionReadPreviousSignal()
+  {
+    return mActionReadPreviousSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionUpSignal
+   */
+  AccessibilityActionSignalV2& ActionUpSignal()
+  {
+    return mActionUpSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionDownSignal
+   */
+  AccessibilityActionSignalV2& ActionDownSignal()
+  {
+    return mActionDownSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionClearFocusSignal
+   */
+  AccessibilityActionSignalV2& ActionClearFocusSignal()
+  {
+    return mActionClearFocusSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionBackSignal
+   */
+  AccessibilityActionSignalV2& ActionBackSignal()
+  {
+    return mActionBackSignalV2;
+  }
+
+  /**
+   * @copydoc Dali::AccessibilityManager::ActionScrollSignal
+   */
+  AccessibilityActionScrollSignalV2& ActionScrollSignal()
+  {
+    return mActionScrollSignalV2;
+  }
+
+private:
+
+  // Destruction
+
+  /**
+   * Destructor.
+   */
+  virtual ~AccessibilityManager();
+
+  // Undefined
+  AccessibilityManager( const AccessibilityManager& );
+  AccessibilityManager& operator=( AccessibilityManager& );
+
+private:
+
+  Dali::Integration::TouchEventCombiner mCombiner; ///< Combines multi-touch events.
+
+  bool mIsEnabled; ///< enable/disable the accessibility action
+  Vector2 mReadPosition; ///< ActionRead position
+
+  AccessibilityActionHandler* mActionHandler; ///< The pointer of accessibility action handler
+
+  AccessibilityGestureDetectorPtr mAccessibilityGestureDetector; ///< The accessibility gesture detector
+
+  Indicator* mIndicator; ///< The indicator
+  bool mIndicatorFocused; ///< Whether the Indicator is focused
+
+  AccessibilityActionSignalV2 mStatusChangedSignalV2;
+  AccessibilityActionSignalV2 mActionNextSignalV2;
+  AccessibilityActionSignalV2 mActionPreviousSignalV2;
+  AccessibilityActionSignalV2 mActionActivateSignalV2;
+  AccessibilityActionSignalV2 mActionOverSignalV2;
+  AccessibilityActionSignalV2 mActionReadSignalV2;
+  AccessibilityActionSignalV2 mActionReadNextSignalV2;
+  AccessibilityActionSignalV2 mActionReadPreviousSignalV2;
+  AccessibilityActionSignalV2 mActionUpSignalV2;
+  AccessibilityActionSignalV2 mActionDownSignalV2;
+  AccessibilityActionSignalV2 mActionClearFocusSignalV2;
+  AccessibilityActionSignalV2 mActionBackSignalV2;
+  AccessibilityActionScrollSignalV2 mActionScrollSignalV2;
+
+public:
+
+  // Helpers for public-api forwarding methods
+
+  inline static Internal::Adaptor::AccessibilityManager& GetImplementation(Dali::AccessibilityManager& manager)
+  {
+    DALI_ASSERT_ALWAYS( manager && "AccessibilityManager handle is empty" );
+
+    BaseObject& handle = manager.GetBaseObject();
+
+    return static_cast<Internal::Adaptor::AccessibilityManager&>(handle);
+  }
+
+  inline static const Internal::Adaptor::AccessibilityManager& GetImplementation(const Dali::AccessibilityManager& manager)
+  {
+    DALI_ASSERT_ALWAYS( manager && "AccessibilityManager handle is empty" );
+
+    const BaseObject& handle = manager.GetBaseObject();
+
+    return static_cast<const Internal::Adaptor::AccessibilityManager&>(handle);
+  }
+
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ACCESSIBILITY_MANAGER_H__
diff --git a/adaptors/ubuntu/file.list b/adaptors/ubuntu/file.list
new file mode 100644 (file)
index 0000000..6f6eb02
--- /dev/null
@@ -0,0 +1,12 @@
+# ubuntu
+
+adaptor_ubuntu_internal_src_files = \
+  $(adaptor_ubuntu_dir)/accessibility-manager-impl-ubuntu.cpp \
+  $(adaptor_ubuntu_dir)/vsync-monitor-ubuntu.cpp \
+  $(adaptor_ubuntu_dir)/tilt-sensor-impl-ubuntu.cpp \
+  $(adaptor_ubuntu_dir)/tts-player-impl-ubuntu.cpp \
+  $(adaptor_ubuntu_dir)/key-impl-ubuntu.cpp
+
+adaptor_ubuntu_application_src_files = \
+  $(adaptor_ubuntu_dir)/framework-ubuntu.cpp
+
diff --git a/adaptors/ubuntu/framework-ubuntu.cpp b/adaptors/ubuntu/framework-ubuntu.cpp
new file mode 100644 (file)
index 0000000..c799b39
--- /dev/null
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "framework.h"
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+#include <Elementary.h>
+#include <boost/bind.hpp>
+#include <X11/Xlib.h>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <callback-manager.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+
+/// Application Status Enum
+enum
+{
+  APP_CREATE,
+  APP_TERMINATE,
+  APP_PAUSE,
+  APP_RESUME,
+  APP_RESET,
+  APP_LANGUAGE_CHANGE,
+};
+
+} // Unnamed namespace
+
+/**
+ * Impl to hide EFL data members
+ */
+struct Framework::Impl
+{
+  // Constructor
+
+  Impl(void* data)
+  {
+    mCallbackManager = CallbackManager::New();
+  }
+
+  ~Impl()
+  {
+    // we're quiting the main loop so
+    // mCallbackManager->RemoveAllCallBacks() does not need to be called
+    // to delete our abort handler
+    delete mCallbackManager;
+  }
+
+  // Data
+
+  boost::function<void(void)> mAbortCallBack;
+  CallbackManager *mCallbackManager;
+  // Static methods
+
+  /**
+   * Called by AppCore on application creation.
+   */
+  static bool AppCreate(void *data)
+  {
+    return static_cast<Framework*>(data)->SlpAppStatusHandler(APP_CREATE);
+  }
+
+  /**
+   * Called by AppCore when the application should terminate.
+   */
+  static void AppTerminate(void *data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_TERMINATE);
+  }
+
+  /**
+   * Called by AppCore when the application is paused.
+   */
+  static void AppPause(void *data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_PAUSE);
+  }
+
+  /**
+   * Called by AppCore when the application is resumed.
+   */
+  static void AppResume(void *data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_RESUME);
+  }
+
+  /**
+   * Called by AppCore when the language changes on the device.
+   */
+  static void AppLanguageChange(void* data)
+  {
+    static_cast<Framework*>(data)->SlpAppStatusHandler(APP_LANGUAGE_CHANGE);
+  }
+
+};
+
+Framework::Framework(Framework::Observer& observer, int *argc, char ***argv, const std::string& name)
+: mObserver(observer),
+  mInitialised(false),
+  mRunning(false),
+  mArgc(argc),
+  mArgv(argv),
+  mName(name),
+  mBundleName(""),
+  mBundleId(""),
+  mAbortHandler(boost::bind(&Framework::AbortCallback, this)),
+  mImpl(NULL)
+{
+  InitThreads();
+  mImpl = new Impl(this);
+}
+
+Framework::~Framework()
+{
+  if (mRunning)
+  {
+    Quit();
+  }
+
+  delete mImpl;
+}
+
+void Framework::Run()
+{
+  mRunning = true;
+
+  elm_init(*mArgc, *mArgv);
+
+  Impl::AppCreate(this);
+
+  elm_run();
+
+  mRunning = false;
+}
+
+void Framework::Quit()
+{
+  Impl::AppTerminate(this);
+
+  elm_exit();
+}
+
+bool Framework::IsMainLoopRunning()
+{
+  return mRunning;
+}
+
+void Framework::AddAbortCallback(boost::function<void(void)> callBack)
+{
+  mImpl->mAbortCallBack = callBack;
+}
+
+std::string Framework::GetBundleName() const
+{
+  return mBundleName;
+}
+
+void Framework::SetBundleName(const std::string& name)
+{
+  mBundleName = name;
+}
+
+std::string Framework::GetBundleId() const
+{
+  return mBundleId;
+}
+
+void Framework::SetBundleId(const std::string& id)
+{
+  mBundleId = id;
+}
+
+void Framework::AbortCallback( )
+{
+  // if an abort call back has been installed run it.
+  if (mImpl->mAbortCallBack)
+  {
+    mImpl->mAbortCallBack();
+  }
+  else
+  {
+    Quit();
+  }
+}
+
+bool Framework::SlpAppStatusHandler(int type)
+{
+  switch (type)
+  {
+    case APP_CREATE:
+    {
+      mInitialised = true;
+
+      // Connect to abnormal exit signals
+      mAbortHandler.AbortOnSignal( SIGINT );
+      mAbortHandler.AbortOnSignal( SIGQUIT );
+      mAbortHandler.AbortOnSignal( SIGKILL );
+
+      mObserver.OnInit();
+      break;
+    }
+
+    case APP_RESET:
+      mObserver.OnReset();
+      break;
+
+    case APP_RESUME:
+      mObserver.OnResume();
+      break;
+
+    case APP_TERMINATE:
+     mObserver.OnTerminate();
+      break;
+
+    case APP_PAUSE:
+      mObserver.OnPause();
+      break;
+
+    case APP_LANGUAGE_CHANGE:
+      mObserver.OnLanguageChanged();
+      break;
+
+    default:
+      break;
+  }
+
+  return true;
+}
+
+void Framework::InitThreads()
+{
+  XInitThreads();
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/ubuntu/key-impl-ubuntu.cpp b/adaptors/ubuntu/key-impl-ubuntu.cpp
new file mode 100644 (file)
index 0000000..917ae44
--- /dev/null
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "key-impl.h"
+
+// EXTERNAL INCLUDES
+#define KEY_VOLUMEUP            "XF86AudioRaiseVolume"  /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Volume Up' key */
+#define KEY_VOLUMEDOWN          "XF86AudioLowerVolume"  /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Volume Down' key */
+
+#define KEY_CAMERA              "XF86WebCam"    /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Half-Press of Camera' key */
+#define KEY_CONFIG              "XF86Pictures"  /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Full-Press of Camera' key */
+
+#define KEY_POWER               "XF86PowerOff"  /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Power' key */
+#define KEY_PAUSE               "XF86Standby"   /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Pause' key */
+#define KEY_CANCEL              "Cancel"        /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Cancel' key */
+
+// Earjack/BT Headset/Multimedia keys
+#define KEY_PLAYCD              "XF86AudioPlay" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Play Audio' key */
+#define KEY_STOPCD              "XF86AudioStop" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Stop Audio' key */
+#define KEY_PAUSECD             "XF86AudioPause"        /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Pause Audio' key */
+#define KEY_NEXTSONG            "XF86AudioNext" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Next Song' key */
+#define KEY_PREVIOUSSONG        "XF86AudioPrev" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Previous Song' key */
+#define KEY_REWIND              "XF86AudioRewind"       /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Rewind Song' key */
+#define KEY_FASTFORWARD         "XF86AudioForward"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Forward Song' key */
+#define KEY_MEDIA               "XF86AudioMedia"        /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Media' key */
+#define KEY_PLAYPAUSE           "XF86AudioPlayPause"    /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'PlayPause' key */
+#define KEY_MUTE                        "XF86AudioMute" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Mute' key */
+
+// 3-Touch key
+#define KEY_SEND                "XF86Send"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Send' key */
+#define KEY_SELECT              "XF86Phone"     /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Home' key */
+#define KEY_END                 "XF86Stop"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'End' key */
+
+// Renamed 3-Touch key
+#define KEY_MENU                "XF86Send"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Send' key */
+#define KEY_HOME                "XF86Phone"     /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Home' key */
+#define KEY_BACK                "XF86Stop"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'End' key */
+
+//Other functions keys
+#define KEY_HOMEPAGE            "XF86HomePage"  /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'HomePage' key */
+#define KEY_WEBPAGE             "XF86WWW"       /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'WWW' key */
+#define KEY_MAIL                        "XF86Mail"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Mail' key */
+#define KEY_SCREENSAVER "XF86ScreenSaver"       /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'ScreenSaver' key */
+#define KEY_BRIGHTNESSUP        "XF86MonBrightnessUp"   /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'BrightnessUp' key */
+#define KEY_BRIGHTNESSDOWN      "XF86MonBrightnessDown" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'BrightnessDown' key */
+#define KEY_SOFTKBD                     "XF86MenuKB"    /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Soft keyboard(toggle)' key */
+#define KEY_QUICKPANEL          "XF86Tools"     /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Quick panel(toggle)' key */
+#define KEY_TASKSWITCH          "XF86TaskPane"  /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Task switcher(toggle)' key */
+#define KEY_APPS                "XF86Launch0"   /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Apptray(toggle)' key */
+#define KEY_SEARCH              "XF86Search"            /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Search(toggle)' key */
+#define KEY_VOICE               "XF86Launch2"           /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Voice(toggle)' key */
+#define KEY_LANGUAGE            "Hangul"                /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Language(toggle)' key */
+
+#include <map>
+#include <string.h>
+#include <iostream>
+
+
+#include <dali/integration-api/debug.h>
+
+
+namespace Dali
+{
+
+const KEY DALI_KEY_INVALID          = -1;
+const KEY DALI_KEY_ESCAPE           = 9;
+const KEY DALI_KEY_BACK             = 166;
+const KEY DALI_KEY_CAMERA           = 167;
+const KEY DALI_KEY_CONFIG           = 168;
+const KEY DALI_KEY_POWER            = 169;
+const KEY DALI_KEY_PAUSE            = 170;
+const KEY DALI_KEY_CANCEL           = 171;
+const KEY DALI_KEY_PLAY_CD          = 172;
+const KEY DALI_KEY_STOP_CD          = 173;
+const KEY DALI_KEY_PAUSE_CD         = 174;
+const KEY DALI_KEY_NEXT_SONG        = 175;
+const KEY DALI_KEY_PREVIOUS_SONG    = 176;
+const KEY DALI_KEY_REWIND           = 177;
+const KEY DALI_KEY_FASTFORWARD      = 178;
+const KEY DALI_KEY_MEDIA            = 179;
+const KEY DALI_KEY_PLAY_PAUSE       = 180;
+const KEY DALI_KEY_MUTE             = 181;
+const KEY DALI_KEY_SEND             = 182;
+const KEY DALI_KEY_SELECT           = 183;
+const KEY DALI_KEY_END              = DALI_KEY_BACK;
+const KEY DALI_KEY_MENU             = DALI_KEY_SEND;
+const KEY DALI_KEY_HOME             = DALI_KEY_SELECT;
+const KEY DALI_KEY_HOMEPAGE         = 187;
+const KEY DALI_KEY_WEBPAGE          = 188;
+const KEY DALI_KEY_MAIL             = 189;
+const KEY DALI_KEY_SCREENSAVER      = 190;
+const KEY DALI_KEY_BRIGHTNESS_UP    = 191;
+const KEY DALI_KEY_BRIGHTNESS_DOWN  = 192;
+const KEY DALI_KEY_SOFT_KBD         = 193;
+const KEY DALI_KEY_QUICK_PANEL      = 194;
+const KEY DALI_KEY_TASK_SWITCH      = 195;
+const KEY DALI_KEY_APPS             = 196;
+const KEY DALI_KEY_SEARCH           = 197;
+const KEY DALI_KEY_VOICE            = 198;
+const KEY DALI_KEY_LANGUAGE         = 199;
+const KEY DALI_KEY_VOLUME_UP        = 200;
+const KEY DALI_KEY_VOLUME_DOWN      = 201;
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace KeyLookup
+{
+
+namespace
+{
+
+struct KeyLookup
+{
+  const char* keyName;      ///< X string representation
+  const int   daliKeyCode;  ///< Dali Enum Representation
+  const bool  deviceButton; ///< Whether the key is from a button on the device
+};
+
+// matches a DALI_KEY enum, to a X key name
+KeyLookup KeyLookupTable[]=
+{
+  // more than one key name can be assigned to a single dali-key code
+  // e.g. Menu and KEY_MENU("FS86KeyMenu") are both assigned to  DALI_KEY_MENU
+
+  { "Escape",               DALI_KEY_ESCAPE,          false },  // item not defined in utilX
+  { "Menu",                 DALI_KEY_MENU,            false },  // item not defined in utilX
+  { KEY_CAMERA,             DALI_KEY_CAMERA,          false },
+  { KEY_CONFIG,             DALI_KEY_CONFIG,          false },
+  { KEY_POWER,              DALI_KEY_POWER,           true  },
+  { KEY_PAUSE,              DALI_KEY_PAUSE,           false },
+  { KEY_CANCEL,             DALI_KEY_CANCEL,          false },
+  { KEY_PLAYCD,             DALI_KEY_PLAY_CD,         false },
+  { KEY_STOPCD,             DALI_KEY_STOP_CD,         false },
+  { KEY_PAUSECD,            DALI_KEY_PAUSE_CD,        false },
+  { KEY_NEXTSONG,           DALI_KEY_NEXT_SONG,       false },
+  { KEY_PREVIOUSSONG,       DALI_KEY_PREVIOUS_SONG,   false },
+  { KEY_REWIND,             DALI_KEY_REWIND,          false },
+  { KEY_FASTFORWARD,        DALI_KEY_FASTFORWARD,     false },
+  { KEY_MEDIA,              DALI_KEY_MEDIA,           false },
+  { KEY_PLAYPAUSE,          DALI_KEY_PLAY_PAUSE,      false },
+  { KEY_MUTE,               DALI_KEY_MUTE,            false },
+  { KEY_SEND,               DALI_KEY_SEND,            true  },
+  { KEY_SELECT,             DALI_KEY_SELECT,          true  },
+  { KEY_END,                DALI_KEY_END,             true  },
+  { KEY_MENU,               DALI_KEY_MENU,            true  },
+  { KEY_HOME,               DALI_KEY_HOME,            true  },
+  { KEY_BACK,               DALI_KEY_BACK,            true  },
+  { KEY_HOMEPAGE,           DALI_KEY_HOMEPAGE,        false },
+  { KEY_WEBPAGE,            DALI_KEY_WEBPAGE,         false },
+  { KEY_MAIL,               DALI_KEY_MAIL,            false },
+  { KEY_SCREENSAVER,        DALI_KEY_SCREENSAVER,     false },
+  { KEY_BRIGHTNESSUP,       DALI_KEY_BRIGHTNESS_UP,   false },
+  { KEY_BRIGHTNESSDOWN,     DALI_KEY_BRIGHTNESS_DOWN, false },
+  { KEY_SOFTKBD,            DALI_KEY_SOFT_KBD,        false },
+  { KEY_QUICKPANEL,         DALI_KEY_QUICK_PANEL,     false },
+  { KEY_TASKSWITCH,         DALI_KEY_TASK_SWITCH,     false },
+  { KEY_APPS,               DALI_KEY_APPS,            false },
+  { KEY_SEARCH,             DALI_KEY_SEARCH,          false },
+  { KEY_VOICE,              DALI_KEY_VOICE,           false },
+  { KEY_LANGUAGE,           DALI_KEY_LANGUAGE,        false },
+  { KEY_VOLUMEUP,           DALI_KEY_VOLUME_UP,       true  },
+  { KEY_VOLUMEDOWN,         DALI_KEY_VOLUME_DOWN,     true  },
+};
+
+const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable))/ (sizeof(KeyLookup));
+
+class KeyMap
+{
+  public:
+
+  KeyMap():
+  mLookup( cmpString )
+  {
+    // create the lookup
+    for( size_t i = 0; i < KEY_LOOKUP_COUNT ; ++i )
+    {
+      const KeyLookup&  keyLookup( KeyLookupTable[i] );
+      mLookup[ keyLookup.keyName  ] = DaliKeyType( keyLookup.daliKeyCode, keyLookup.deviceButton );
+    }
+  }
+
+  int GetDaliKeyEnum( const char* keyName ) const
+  {
+    Lookup::const_iterator i = mLookup.find( keyName );
+    if( i == mLookup.end() )
+    {
+      return -1;
+    }
+    else
+    {
+      return (*i).second.first;
+    }
+  }
+
+  bool IsDeviceButton( const char* keyName ) const
+  {
+    Lookup::const_iterator i = mLookup.find( keyName );
+    if ( i != mLookup.end() )
+    {
+      return (*i).second.second;
+    }
+    return false;
+  }
+
+  private:
+
+  /**
+   * compare function, to compare string by pointer
+   */
+  static bool cmpString( const char* a, const char* b)
+  {
+    return strcmp(a, b) < 0;
+  }
+
+  typedef std::pair< int, bool > DaliKeyType;
+  typedef std::map<const char* /* key name */, DaliKeyType /* key code */, bool(*) ( char const* a, char const* b) > Lookup;
+  Lookup mLookup;
+
+};
+const KeyMap globalKeyLookup;
+
+} // un-named name space
+
+bool IsKey( const Dali::KeyEvent& keyEvent, Dali::KEY daliKey)
+{
+  int key = globalKeyLookup.GetDaliKeyEnum( keyEvent.keyPressedName.c_str() );
+  return daliKey == key;
+}
+
+bool IsDeviceButton( const char* keyName )
+{
+  return globalKeyLookup.IsDeviceButton( keyName );
+}
+
+} // namespace KeyLookup
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/ubuntu/tilt-sensor-impl-ubuntu.cpp b/adaptors/ubuntu/tilt-sensor-impl-ubuntu.cpp
new file mode 100644 (file)
index 0000000..b30b0de
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "tilt-sensor-impl.h"
+
+// EXTERNAL INCLUDES
+#include <cmath>
+
+#include <dali/public-api/object/type-registry.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <adaptor-impl.h>
+
+namespace // unnamed namespace
+{
+
+const int NUMBER_OF_SAMPLES = 10;
+
+const float MAX_ACCELEROMETER_XY_VALUE = 9.8f;
+
+// Type Registration
+Dali::BaseHandle Create()
+{
+  return Dali::Internal::Adaptor::TiltSensor::Get();
+}
+
+Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), Create );
+
+Dali::SignalConnectorType signalConnector1( typeRegistration, Dali::TiltSensor::SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
+
+} // unnamed namespace
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+Dali::TiltSensor TiltSensor::New()
+{
+  Dali::TiltSensor sensor = Dali::TiltSensor(new TiltSensor());
+
+  return sensor;
+}
+
+Dali::TiltSensor TiltSensor::Get()
+{
+  Dali::TiltSensor sensor;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the keyboard focus manager is already created
+    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::TiltSensor ) );
+    if(handle)
+    {
+      // If so, downcast the handle of singleton to keyboard focus manager
+      sensor = Dali::TiltSensor( dynamic_cast< TiltSensor* >( handle.GetObjectPtr() ) );
+    }
+    else
+    {
+      // Create a singleton instance
+      Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
+      sensor = TiltSensor::New();
+      adaptorImpl.RegisterSingleton( typeid( sensor ), sensor );
+      handle = sensor;
+    }
+  }
+
+  return sensor;
+}
+
+TiltSensor::~TiltSensor()
+{
+  Disable();
+}
+
+bool TiltSensor::Enable()
+{
+  // Make sure sensor API is responding
+  bool success = Update();
+
+  if ( success )
+  {
+    if ( !mTimer )
+    {
+      mTimer = Dali::Timer::New( 1000.0f / mFrequencyHertz );
+      mTimer.TickSignal().Connect( mTimerSlot, &TiltSensor::Update );
+    }
+
+    if ( mTimer &&
+         !mTimer.IsRunning() )
+    {
+      mTimer.Start();
+    }
+  }
+
+  return success;
+}
+
+void TiltSensor::Disable()
+{
+  if ( mTimer )
+  {
+    mTimer.Stop();
+    mTimer.Reset();
+  }
+}
+
+bool TiltSensor::IsEnabled() const
+{
+  return ( mTimer && mTimer.IsRunning() );
+}
+
+float TiltSensor::GetRoll() const
+{
+  return mRoll;
+}
+
+float TiltSensor::GetPitch() const
+{
+  return mPitch;
+}
+
+Quaternion TiltSensor::GetRotation() const
+{
+  return mRotation;
+}
+
+TiltSensor::TiltedSignalV2& TiltSensor::TiltedSignal()
+{
+  return mTiltedSignalV2;
+}
+
+void TiltSensor::SetUpdateFrequency( float frequencyHertz )
+{
+  DALI_ASSERT_ALWAYS( frequencyHertz > 0.0f && "Frequency must have a positive value" );
+
+  if ( fabsf(mFrequencyHertz - frequencyHertz) >= GetRangedEpsilon(mFrequencyHertz, frequencyHertz) )
+  {
+    mFrequencyHertz = frequencyHertz;
+
+    if ( mTimer )
+    {
+      mTimer.SetInterval( 1000.0f / mFrequencyHertz );
+    }
+  }
+}
+
+float TiltSensor::GetUpdateFrequency() const
+{
+  return mFrequencyHertz;
+}
+
+void TiltSensor::SetRotationThreshold(Radian rotationThreshold)
+{
+  mRotationThreshold = rotationThreshold;
+}
+
+Radian TiltSensor::GetRotationThreshold() const
+{
+  return mRotationThreshold;
+}
+
+bool TiltSensor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+{
+  bool connected( true );
+  TiltSensor* sensor = dynamic_cast<TiltSensor*>( object );
+
+  if( sensor &&
+      Dali::TiltSensor::SIGNAL_TILTED == signalName )
+  {
+    sensor->TiltedSignal().Connect( tracker, functor );
+  }
+  else
+  {
+    // signalName does not match any signal
+    connected = false;
+  }
+
+  return connected;
+}
+
+TiltSensor::TiltSensor()
+: mFrequencyHertz( Dali::TiltSensor::DEFAULT_UPDATE_FREQUENCY ),
+  mTimerSlot( this ),
+  mSensorFrameworkHandle( -1 ),
+  mRoll( 0.0f ),
+  mPitch( 0.0f ),
+  mRotation( 0.0f, Vector3::YAXIS ),
+  mRotationThreshold( 0.0f )
+{
+  mRollValues.resize( NUMBER_OF_SAMPLES, 0.0f );
+  mPitchValues.resize( NUMBER_OF_SAMPLES, 0.0f );
+}
+
+bool TiltSensor::Update()
+{
+  float newRoll = 0.0f;
+  float newPitch = 0.0f;
+  Quaternion newRotation;
+
+  Radian angle(Quaternion::AngleBetween(newRotation, mRotation));
+  // If the change in value is more than the threshold then emit tilted signal.
+  if( angle > mRotationThreshold )
+  {
+    mRoll = newRoll;
+    mPitch = newPitch;
+    mRotation = newRotation;
+
+    if ( !mTiltedSignalV2.Empty() )
+    {
+      Dali::TiltSensor handle( this );
+      mTiltedSignalV2.Emit( handle );
+    }
+  }
+
+  return true;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/ubuntu/tilt-sensor-impl.h b/adaptors/ubuntu/tilt-sensor-impl.h
new file mode 100644 (file)
index 0000000..20c68d9
--- /dev/null
@@ -0,0 +1,194 @@
+#ifndef __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
+#define __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <deque>
+#include <dali/public-api/object/base-object.h>
+#include <timer.h>
+
+// INTERNAL INCLUDES
+#include <tilt-sensor.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * TiltSensor provides pitch & roll values when the device is tilted.
+ */
+class TiltSensor : public Dali::BaseObject
+{
+public:
+
+  typedef Dali::TiltSensor::TiltedSignalV2 TiltedSignalV2;
+
+  /**
+   * Create a TiltSensor.
+   * This should only be called once by the Adaptor class.
+   * @return A newly allocated tilt-sensor.
+   */
+  static Dali::TiltSensor New();
+
+  /**
+   * @copydoc Dali::TiltSensor::Get()
+   */
+  static Dali::TiltSensor Get();
+
+  /**
+   * @copydoc Dali::TiltSensor::Enable()
+   */
+  bool Enable();
+
+  /**
+   * @copydoc Dali::TiltSensor::Disable()
+   */
+  void Disable();
+
+  /**
+   * @copydoc Dali::TiltSensor::IsEnabled()
+   */
+  bool IsEnabled() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::GetRoll()
+   */
+  float GetRoll() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::GetPitch()
+   */
+  float GetPitch() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::GetRotation()
+   */
+  Quaternion GetRotation() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::TiltedSignal()
+   */
+  TiltedSignalV2& TiltedSignal();
+
+  /**
+   * @copydoc Dali::TiltSensor::SetUpdateFrequency()
+   */
+  void SetUpdateFrequency( float frequencyHertz );
+
+  /**
+   * @copydoc Dali::TiltSensor::GetUpdateFrequency()
+   */
+  float GetUpdateFrequency() const;
+
+  /**
+   * @copydoc Dali::TiltSensor::SetRotationThreshold()
+   */
+  void SetRotationThreshold(Radian rotationThreshold);
+
+  /**
+   * @copydoc Dali::TiltSensor::GetRotationThreshold()
+   */
+  Radian GetRotationThreshold() const;
+
+  /**
+   * Connects a callback function with the object's signals.
+   * @param[in] object The object providing the signal.
+   * @param[in] tracker Used to disconnect the signal.
+   * @param[in] signalName The signal to connect to.
+   * @param[in] functor A newly allocated FunctorDelegate.
+   * @return True if the signal was connected.
+   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+   */
+  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+
+private:
+
+  /**
+   * Private constructor; see also TiltSensor::New()
+   */
+  TiltSensor();
+
+  /**
+   * Destructor
+   */
+  virtual ~TiltSensor();
+
+  /**
+   * Timer callback to update the tilt values
+   */
+  bool Update();
+
+  // Undefined
+  TiltSensor(const TiltSensor&);
+
+  // Undefined
+  TiltSensor& operator=(TiltSensor&);
+
+private:
+
+  float mFrequencyHertz;
+  Dali::Timer mTimer;
+  SlotDelegate< TiltSensor > mTimerSlot;
+
+  int mSensorFrameworkHandle;
+
+  float mRoll;
+  float mPitch;
+  Quaternion mRotation;
+
+  Radian mRotationThreshold;
+
+  std::deque<float> mRollValues;
+  std::deque<float> mPitchValues;
+
+  TiltedSignalV2 mTiltedSignalV2;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::Adaptor::TiltSensor& GetImplementation(Dali::TiltSensor& sensor)
+{
+  DALI_ASSERT_ALWAYS( sensor && "TiltSensor handle is empty" );
+
+  BaseObject& handle = sensor.GetBaseObject();
+
+  return static_cast<Internal::Adaptor::TiltSensor&>(handle);
+}
+
+inline const Internal::Adaptor::TiltSensor& GetImplementation(const Dali::TiltSensor& sensor)
+{
+  DALI_ASSERT_ALWAYS( sensor && "TiltSensor handle is empty" );
+
+  const BaseObject& handle = sensor.GetBaseObject();
+
+  return static_cast<const Internal::Adaptor::TiltSensor&>(handle);
+}
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ADAPTOR_TILT_SENSOR_H__
diff --git a/adaptors/ubuntu/tts-player-impl-ubuntu.cpp b/adaptors/ubuntu/tts-player-impl-ubuntu.cpp
new file mode 100644 (file)
index 0000000..adcc147
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "tts-player-impl.h"
+
+// INTERNAL INCLUDES
+#include <dali/public-api/object/type-registry.h>
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace // unnamed namespace
+{
+// Type Registration
+Dali::BaseHandle Create()
+{
+  return Dali::TtsPlayer::Get() ;
+}
+
+Dali::TypeRegistration mType( typeid(Dali::TtsPlayer), typeid(Dali::BaseHandle), Create ) ;
+} // unnamed namespace
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* TtsPlayer::gLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_TTS_PLAYER");
+#endif
+
+Dali::TtsPlayer TtsPlayer::New(Dali::TtsPlayer::Mode mode)
+{
+  Dali::TtsPlayer player = Dali::TtsPlayer(new TtsPlayer(mode));
+
+  return player;
+}
+
+TtsPlayer::TtsPlayer(Dali::TtsPlayer::Mode mode)
+{
+  DALI_LOG_ERROR("TTS is not implemented in UBUNTU profile.");
+}
+
+TtsPlayer::~TtsPlayer()
+{
+}
+
+void TtsPlayer::Play(const std::string& text)
+{
+}
+
+void TtsPlayer::Stop()
+{
+}
+
+void TtsPlayer::Pause()
+{
+}
+
+void TtsPlayer::Resume()
+{
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
diff --git a/adaptors/ubuntu/tts-player-impl.h b/adaptors/ubuntu/tts-player-impl.h
new file mode 100644 (file)
index 0000000..8c51629
--- /dev/null
@@ -0,0 +1,128 @@
+#ifndef __DALI_INTERNAL_TTS_PLAYER_H__
+#define __DALI_INTERNAL_TTS_PLAYER_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+#include <string>
+
+#include <dali/integration-api/debug.h>
+#include <dali/public-api/object/base-object.h>
+#include <tts-player.h>
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * Text-to-speech player
+ */
+class TtsPlayer : public Dali::BaseObject
+{
+
+public:
+
+  /**
+   * Create a TtsPlayer with the given mode.
+   * This should only be called once by the Adaptor class for each given mode.
+   * @param mode the mode of tts-player
+   * @return A newly created TtsPlayer.
+   */
+  static Dali::TtsPlayer New(Dali::TtsPlayer::Mode mode);
+
+  /**
+   * @copydoc TtsPlayer::Play()
+   */
+  void Play(const std::string& text);
+
+  /**
+   * @copydoc TtsPlayer::Stop()
+   */
+  void Stop();
+
+  /**
+   * @copydoc TtsPlayer::Pause()
+   */
+  void Pause();
+
+  /**
+   * @copydoc TtsPlayer::Resume()
+   */
+  void Resume();
+
+private:
+
+  /**
+   * Private Constructor; see also TtsPlayer::New()
+   * @param mode the mode of tts-player
+   */
+  TtsPlayer(Dali::TtsPlayer::Mode mode);
+
+  /**
+   * Destructor
+   */
+  virtual ~TtsPlayer();
+
+private:
+
+  std::string mUnplayedString; ///< The text that can not be played because tts engine is not yet initialized
+  int mUtteranceId;  ///< The utterance ID
+
+  Dali::TtsPlayer::Mode mTtsMode; ///< The current mode of tts engine
+
+#if defined(DEBUG_ENABLED)
+public:
+  static Debug::Filter* gLogFilter;
+#endif
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::Adaptor::TtsPlayer& GetImplementation(Dali::TtsPlayer& player)
+{
+  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
+
+  BaseObject& handle = player.GetBaseObject();
+
+  return static_cast<Internal::Adaptor::TtsPlayer&>(handle);
+}
+
+inline const Internal::Adaptor::TtsPlayer& GetImplementation(const Dali::TtsPlayer& player)
+{
+  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
+
+  const BaseObject& handle = player.GetBaseObject();
+
+  return static_cast<const Internal::Adaptor::TtsPlayer&>(handle);
+}
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_TTS_PLAYER_H__
diff --git a/adaptors/ubuntu/vsync-monitor-ubuntu.cpp b/adaptors/ubuntu/vsync-monitor-ubuntu.cpp
new file mode 100644 (file)
index 0000000..13592a7
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include "vsync-monitor.h"
+
+// EXTERNAL INCLUDES
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VSYNC_MONITOR");
+#endif
+
+const int FD_NONE( -1 );
+
+} // unnamed namespace
+
+VSyncMonitor::VSyncMonitor()
+: mFileDescriptor( FD_NONE ),
+  mUseHardware( false )
+{
+}
+
+VSyncMonitor::~VSyncMonitor()
+{
+  Terminate();
+}
+
+void VSyncMonitor::SetUseHardware( bool useHardware )
+{
+  mUseHardware = useHardware;
+}
+
+void VSyncMonitor::Initialize()
+{
+  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
+
+  // setup vblank request - block and wait for next vblank
+  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
+  mVBlankInfo.request.sequence = 0;
+  mVBlankInfo.request.signal = 0;
+
+  // setup vblank reply - block and wait for next vblank
+  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
+  mVBlankInfo.reply.sequence = 0;
+  mVBlankInfo.reply.tval_sec = 0;
+  mVBlankInfo.reply.tval_usec = 0;
+}
+
+void VSyncMonitor::Terminate()
+{
+  if( mFileDescriptor != FD_NONE )
+  {
+    close( mFileDescriptor );
+    mFileDescriptor = FD_NONE;
+  }
+}
+
+bool VSyncMonitor::UseHardware()
+{
+  return mUseHardware && (FD_NONE != mFileDescriptor );
+}
+
+
+bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
+{
+  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "ECoreX::VSyncMonitor is not initialized" );
+
+  if( 0 == drmWaitVBlank( mFileDescriptor, &mVBlankInfo ) )
+  {
+    frameNumber = mVBlankInfo.reply.sequence;
+    seconds = mVBlankInfo.reply.tval_sec;
+    microseconds = mVBlankInfo.reply.tval_usec;
+
+    return true;
+  }
+
+  return false;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
index 19dfa1c7759fd5e223bc5eeeb9a61334fdeef37a..7b191e6ae1c263d7373d18b4bc45a9184b5f8ae0 100644 (file)
 
 #include <sys/time.h>
 
+#ifndef DALI_PROFILE_UBUNTU
 #include <vconf.h>
 #include <vconf-keys.h>
+#endif // DALI_PROFILE_UBUNTU
 
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/events/touch-point.h>
@@ -181,7 +183,9 @@ static unsigned int GetCurrentMilliSeconds(void)
   return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
 }
 
+#ifndef DALI_PROFILE_UBUNTU
 const char * DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE = "db/setting/accessibility/font_name";  // It will be update at vconf-key.h and replaced.
+#endif // DALI_PROFILE_UBUNTU
 
 } // unnamed namespace
 
@@ -214,9 +218,11 @@ struct EventHandler::Impl
       mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_DOWN,           EcoreEventKeyDown,         handler ) );
       mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_UP,             EcoreEventKeyUp,           handler ) );
 
+#ifndef DALI_PROFILE_UBUNTU
       // Register Vconf notify - font name and size
       vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontNameChanged, handler );
       vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, handler );
+#endif // DALI_PROFILE_UBUNTU
     }
   }
 
@@ -225,8 +231,10 @@ struct EventHandler::Impl
    */
   ~Impl()
   {
+#ifndef DALI_PROFILE_UBUNTU
     vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged );
     vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontNameChanged );
+#endif // DALI_PROFILE_UBUNTU
 
     for( std::vector<Ecore_Event_Handler*>::iterator iter = mEcoreEventHandler.begin(), endIter = mEcoreEventHandler.end(); iter != endIter; ++iter )
     {
index 565eb9be225cfe3f13c7bb6c6cc0e04a482bcc62..2720a914d29d70818ed5c3ade11075b0456fc2be 100644 (file)
@@ -1,29 +1,24 @@
 # wayland
 
-adaptor_wayland_internal_header_files = \
-  $(adaptor_wayland_dir)/clipboard-impl.h \
-  $(adaptor_wayland_dir)/imf-manager-impl.h \
-  $(adaptor_wayland_dir)/pixmap-image-impl.h \
-  $(adaptor_wayland_dir)/pixmap-render-surface.h 
-
-adaptor_wayland_application_src_files = \
-  $(adaptor_wayland_dir)/framework-wl.cpp
-
-adaptor_wayland_internal_src_files = \
+adaptor_wayland_tizen_internal_src_files = \
   $(adaptor_wayland_dir)/accessibility-manager-impl-wl.cpp \
   $(adaptor_wayland_dir)/clipboard-impl-wl.cpp \
   $(adaptor_wayland_dir)/imf-manager-impl-wl.cpp \
   $(adaptor_wayland_dir)/pixmap-image-impl-wl.cpp \
   $(adaptor_wayland_dir)/server-connection-wl.cpp \
-  $(adaptor_wayland_dir)/system-settings-wl.cpp \
   $(adaptor_wayland_dir)/virtual-keyboard-impl-wl.cpp \
   $(adaptor_wayland_dir)/window-impl-wl.cpp \
   $(adaptor_wayland_dir)/event-handler-wl.cpp \
   $(adaptor_wayland_dir)/egl-implementation-wl.cpp \
-  $(adaptor_wayland_dir)/ecore-wl-render-surface.cpp \
   $(adaptor_wayland_dir)/pixmap-render-surface-wl.cpp \
-  $(adaptor_wayland_dir)/window-render-surface-wl.cpp
-  
-adaptor_wayland_profile_src_files = \
-  $(adaptor_wayland_dir)/key-impl-wl.cpp \
-  $(adaptor_wayland_dir)/ecore-wl-render-surface-factory.cpp
+  $(adaptor_wayland_dir)/ecore-wl-render-surface.cpp \
+  $(adaptor_wayland_dir)/window-render-surface-wl.cpp \
+  $(adaptor_wayland_dir)/key-impl-wl.cpp
+
+adaptor_wayland_tizen_common_internal_default_profile_src_files = \
+  $(adaptor_wayland_dir)/ecore-wl-render-surface-factory.cpp \
+  $(adaptor_wayland_dir)/system-settings-wl.cpp
+
+adaptor_wayland_tizen_application_src_files = \
+  $(adaptor_wayland_dir)/framework-wl.cpp
+
index 679964e8042117e69a366edf87e92c37764584ed..54e780939fcff1775fa6daa85758cebf9dda5850 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <system_settings.h>
-#include <Elementary.h>
-
 // INTERNAL INCLUDES
 #include "system-settings.h"
 
index 5077d17d816963dcb426d47a1bce839e90638d38..e8610ae787dda4ae9f56de18963286c407b35917 100644 (file)
@@ -26,6 +26,7 @@
 
 // INTERNAL INCLUDES
 #include <ecore-x-render-surface.h>
+#include <gl/gl-implementation.h>
 
 namespace Dali
 {
@@ -122,6 +123,12 @@ bool EglImplementation::CreateContext()
 
   DALI_ASSERT_ALWAYS( EGL_NO_CONTEXT != mEglContext && "EGL context not created" );
 
+  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VENDOR : %s ***\n", glGetString(GL_VENDOR));
+  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_RENDERER : %s ***\n", glGetString(GL_RENDERER));
+  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VERSION : %s ***\n", glGetString(GL_VERSION));
+  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_SHADING_LANGUAGE_VERSION : %s***\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
+  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** Supported Extensions ***\n%s\n\n", glGetString(GL_EXTENSIONS));
+
   return true;
 }
 
@@ -356,6 +363,7 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
 
 #else // DALI_GLES_VERSION >= 30
 
+  DALI_LOG_WARNING( "Using OpenGL ES 2 \n" );
   configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
 
 #endif //DALI_GLES_VERSION >= 30
@@ -386,10 +394,12 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   configAttribs.PushBack( 24 );
   configAttribs.PushBack( EGL_STENCIL_SIZE );
   configAttribs.PushBack( 8 );
+#ifndef DALI_PROFILE_UBUNTU
   configAttribs.PushBack( EGL_SAMPLES );
   configAttribs.PushBack( 4 );
   configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
   configAttribs.PushBack( 1 );
+#endif // DALI_PROFILE_UBUNTU
   configAttribs.PushBack( EGL_NONE );
 
   if ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE )
@@ -399,27 +409,27 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
     {
       case EGL_BAD_DISPLAY:
       {
-        DALI_LOG_ERROR("Display is not an EGL display connection");
+        DALI_LOG_ERROR("Display is not an EGL display connection\n");
         break;
       }
       case EGL_BAD_ATTRIBUTE:
       {
-        DALI_LOG_ERROR("The parameter confirAttribs contains an invalid frame buffer configuration attribute or an attribute value that is unrecognized or out of range");
+        DALI_LOG_ERROR("The parameter configAttribs contains an invalid frame buffer configuration attribute or an attribute value that is unrecognized or out of range\n");
         break;
       }
       case EGL_NOT_INITIALIZED:
       {
-        DALI_LOG_ERROR("Display has not been initialized");
+        DALI_LOG_ERROR("Display has not been initialized\n");
         break;
       }
       case EGL_BAD_PARAMETER:
       {
-        DALI_LOG_ERROR("The parameter numConfig is NULL");
+        DALI_LOG_ERROR("The parameter numConfig is NULL\n");
         break;
       }
       default:
       {
-        DALI_LOG_ERROR("Unknown error");
+        DALI_LOG_ERROR("Unknown error.\n");
       }
     }
     DALI_ASSERT_ALWAYS(false && "eglChooseConfig failed!");
@@ -427,7 +437,7 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
 
   if ( numConfigs != 1 )
   {
-    DALI_LOG_ERROR("No configurations found.");
+    DALI_LOG_ERROR("No configurations found.\n");
 
     TEST_EGL_ERROR("eglChooseConfig");
   }
index 2c945f8b818953fb3c49ef6e0a629df18c9d3263..8ea0ac3b28685cd636857f17d917b016f8fce2f3 100644 (file)
 
 #include <sys/time.h>
 
+#ifndef DALI_PROFILE_UBUNTU
 #include <vconf.h>
 #include <vconf-keys.h>
+#endif // DALI_PROFILE_UBUNTU
 
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/events/touch-point.h>
@@ -73,7 +75,9 @@ Integration::Log::Filter* gSelectionEventLogFilter = Integration::Log::Filter::N
 
 namespace
 {
+#ifndef DALI_PROFILE_UBUNTU
 const char * DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME = "db/setting/accessibility/font_name"; // It will be update at vconf-key.h and replaced.
+#endif // DALI_PROFILE_UBUNTU
 
 // Currently this code is internal to dali/dali/internal/event/text/utf8.h but should be made Public and used from there instead.
 size_t Utf8SequenceLength(const unsigned char leadByte)
@@ -106,8 +110,10 @@ size_t Utf8SequenceLength(const unsigned char leadByte)
 
 const unsigned int PRIMARY_TOUCH_BUTTON_ID( 1 );
 
+#ifndef DALI_PROFILE_UBUNTU
 const char * CLIPBOARD_ATOM                = "CBHM_MSG";
 const char * CLIPBOARD_SET_OWNER_MESSAGE   = "SET_OWNER";
+#endif // DALI_PROFILE_UBUNTU
 
 /// The atoms required by Ecore for Drag & Drop behaviour.
 Ecore_X_Atom DRAG_AND_DROP_ATOMS[] =
@@ -256,12 +262,14 @@ struct EventHandler::Impl
       mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_X_EVENT_SELECTION_CLEAR, EcoreEventSelectionClear, handler ) );
       mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_X_EVENT_SELECTION_NOTIFY, EcoreEventSelectionNotify, handler ) );
 
+#ifndef DALI_PROFILE_UBUNTU
       // 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
     }
   }
 
@@ -270,11 +278,13 @@ 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
 
     for( std::vector<Ecore_Event_Handler*>::iterator iter = mEcoreEventHandler.begin(), endIter = mEcoreEventHandler.end(); iter != endIter; ++iter )
     {
@@ -759,6 +769,7 @@ struct EventHandler::Impl
    */
   static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
   {
+#ifndef DALI_PROFILE_UBUNTU
     Ecore_X_Event_Client_Message* clientMessageEvent( (Ecore_X_Event_Client_Message*)event );
     EventHandler* handler( (EventHandler*)data );
 
@@ -977,6 +988,7 @@ struct EventHandler::Impl
       handler->SendRotationRequestEvent();
     }
 
+#endif // DALI_PROFILE_UBUNTU
     return ECORE_CALLBACK_PASS_ON;
   }
 
@@ -1056,6 +1068,8 @@ struct EventHandler::Impl
     return ECORE_CALLBACK_PASS_ON;
   }
 
+
+#ifndef DALI_PROFILE_UBUNTU
   /////////////////////////////////////////////////////////////////////////////////////////////////
   // Font Callbacks
   /////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1097,6 +1111,7 @@ struct EventHandler::Impl
 
     handler->SendEvent( themeChange );
   }
+#endif // DALI_PROFILE_UBUNTU
 
   // Data
   EventHandler* mHandler;
index 59de4c3de796d70fd26f8097a8d3852ff26fb976..3b9e604c1d040a261a549c26ec7046f1e378a6cb 100644 (file)
@@ -1,16 +1,6 @@
 # x11
 
-adaptor_x11_internal_header_files = \
-  $(adaptor_x11_dir)/clipboard-impl.h \
-  $(adaptor_x11_dir)/imf-manager-impl.h \
-  $(adaptor_x11_dir)/pixmap-image-impl.h \
-  $(adaptor_x11_dir)/pixmap-render-surface.h 
-
-adaptor_x11_application_src_files = \
-  $(adaptor_x11_dir)/framework-x.cpp
-
-adaptor_x11_internal_src_files = \
-  $(adaptor_x11_dir)/accessibility-manager-impl-x.cpp \
+_adaptor_x11_internal_src_files = \
   $(adaptor_x11_dir)/clipboard-impl-x.cpp \
   $(adaptor_x11_dir)/imf-manager-impl-x.cpp \
   $(adaptor_x11_dir)/pixmap-image-impl-x.cpp \
@@ -24,9 +14,23 @@ adaptor_x11_internal_src_files = \
   $(adaptor_x11_dir)/window-render-surface-x.cpp \
   $(adaptor_x11_dir)/ecore-x-window-interface.cpp
 
-adaptor_x11_profile_src_files = \
+
+adaptor_x11_ubuntu_internal_src_files = \
+  $(_adaptor_x11_internal_src_files)
+
+adaptor_x11_tizen_internal_src_files = \
+  $(_adaptor_x11_internal_src_files) \
+  $(adaptor_x11_dir)/accessibility-manager-impl-x.cpp \
   $(adaptor_x11_dir)/key-impl-x.cpp
-  
-adaptor_x11_common_internal_profile_src_files = \
+
+adaptor_x11_tv_internal_src_files = \
+  $(_adaptor_x11_internal_src_files) \
+  $(adaptor_x11_dir)/accessibility-manager-impl-x.cpp
+
+adaptor_x11_internal_default_profile_src_files = \
   $(adaptor_x11_dir)/ecore-x-render-surface-factory.cpp \
   $(adaptor_x11_dir)/system-settings-x.cpp
+
+adaptor_x11_tizen_application_src_files = \
+  $(adaptor_x11_dir)/framework-x.cpp
+
index 01d836597b37d1c39d863d460dd36b17b7e79ec0..2f7db6652c0b41e48b8d138a685c3c2b236a0f59 100644 (file)
@@ -340,7 +340,11 @@ void ImfManager::PreEditChanged( void *, Ecore_IMF_Context *imfContext, void *ev
     // iterate through the list of attributes getting the type, start and end position.
     for ( l = attrs, (attr =  (Ecore_IMF_Preedit_Attr*)eina_list_data_get(l) ); l; l = eina_list_next(l), ( attr = (Ecore_IMF_Preedit_Attr*)eina_list_data_get(l) ))
     {
+#ifdef DALI_PROFILE_UBUNTU
+      if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3 ) // (Ecore_IMF)
+#else // DALI_PROFILE_UBUNTU
       if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB4 ) // (Ecore_IMF)
+#endif // DALI_PROFILE_UBUNTU
       {
         // check first byte so know how many bytes a character is represented by as keyboard returns cursor position in bytes. Which is different for some languages.
 
index 4cb2f6f7155d0cdb10a3681a1e07cafd5b8492b6..124e38acfe1354ddaa1dbfef655b39aec6a60454 100644 (file)
@@ -16,7 +16,9 @@
  */
 
 // EXTERNAL INCLUDES
+#ifndef DALI_PROFILE_UBUNTU
 #include <system_settings.h>
+#endif // DALI_PROFILE_UBUNTU
 #include <Elementary.h>
 
 // INTERNAL INCLUDES
@@ -33,8 +35,12 @@ namespace Adaptor
 
 int GetElmAccessActionOver()
 {
+#ifndef DALI_PROFILE_UBUNTU
   // ELM_ACCESS_ACTION_OVER not available in common profile
   return ELM_ACCESS_ACTION_LAST;
+#else // DALI_PROFILE_UBUNTU
+  return 0;
+#endif // DALI_PROFILE_UBUNTU
 }
 
 } // namespace Adaptor
index aac604c626135274f2a46fdb013e74659367be5c..0241a2a2404684828efd9018717202f786177dd7 100644 (file)
@@ -75,11 +75,13 @@ struct Window::EventHandler
     }
     DALI_ASSERT_ALWAYS( mEcoreWindow != 0 && "There is no ecore x window");
 
+#ifndef DALI_PROFILE_UBUNTU
     // set property on window to get deiconify approve client message
     unsigned int tmp = 1;
     ecore_x_window_prop_card32_set(mEcoreWindow,
                              ECORE_X_ATOM_E_DEICONIFY_APPROVE,
                              &tmp, 1);
+#endif // DALI_PROFILE_UBUNTU
   }
 
   /**
@@ -156,6 +158,7 @@ struct Window::EventHandler
   static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
   {
     Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
+#ifndef DALI_PROFILE_UBUNTU
     Ecore_X_Event_Client_Message* clientMessageEvent( (Ecore_X_Event_Client_Message*)event );
     EventHandler* handler( (EventHandler*)data );
 
@@ -180,6 +183,7 @@ struct Window::EventHandler
         }
       }
     }
+#endif // DALI_PROFILE_UBUNTU
 
     return handled;
   }
@@ -454,6 +458,7 @@ void Window::IndicatorTypeChanged(Indicator::Type type)
   ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
+#ifndef DALI_PROFILE_UBUNTU
     Ecore_X_Window win = x11Window->GetXWindow();
     switch(type)
     {
@@ -469,6 +474,7 @@ void Window::IndicatorTypeChanged(Indicator::Type type)
       default:
         break;
     }
+#endif // DALI_PROFILE_UBUNTU
   }
 }
 
@@ -635,6 +641,7 @@ void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrie
   ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
+#ifndef DALI_PROFILE_UBUNTU
     Ecore_X_Window ecoreWindow = x11Window->GetXWindow();
     if( ! mWMRotationAppSet )
     {
@@ -648,7 +655,7 @@ void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrie
       rotations[i] = static_cast<int>(mAvailableOrientations[i]);
     }
     ecore_x_e_window_rotation_available_rotations_set(ecoreWindow, rotations, mAvailableOrientations.size() );
-
+#endif // DALI_PROFILE_UBUNTU
   }
 }
 
@@ -664,6 +671,7 @@ void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation
   ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
+#ifndef DALI_PROFILE_UBUNTU
     Ecore_X_Window ecoreWindow = x11Window->GetXWindow();
 
     if( ! mWMRotationAppSet )
@@ -673,6 +681,7 @@ void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation
     }
 
     ecore_x_e_window_rotation_preferred_rotation_set(ecoreWindow, orientation);
+#endif // DALI_PROFILE_UBUNTU
   }
 }
 
@@ -687,6 +696,7 @@ void Window::RotationDone( int orientation, int width, int height )
   ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
+#ifndef DALI_PROFILE_UBUNTU
     Ecore_X_Window ecoreWindow = x11Window->GetXWindow();
     Ecore_X_Window root = ecore_x_window_root_get(ecoreWindow);
 
@@ -704,6 +714,7 @@ void Window::RotationDone( int orientation, int width, int height )
     ecore_x_window_prop_property_set( ecoreWindow,
                                      ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
                                      ECORE_X_ATOM_CARDINAL, 32, &angles, 2 );
+#endif // DALI_PROFILE_UBUNTU
   }
 }
 
index 1636193108b47892759bb8c1afe9adbc14d5af74..8006eee7e339bd0a66881cacd032e239e9a8402a 100644 (file)
@@ -205,12 +205,14 @@ void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract
     // SwapBuffer is desychronized. So make sure to sychronize when window is deiconified.
     glAbstraction.Finish();
 
+#ifndef DALI_PROFILE_UBUNTU
     /* client sends immediately reply message using value 1 */
     ecore_x_client_message32_send(mX11Window,
                         ECORE_X_ATOM_E_DEICONIFY_APPROVE,
                         ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                         mX11Window, 1,
                         0, 0, 0);
+#endif // DALI_PROFILE_UBUNTU
 
     ecore_x_sync();
 
index 8f30e5904344fe399a5e61e3e9855d06b322f3e8..c7fa761c4eecb367cb83d7b20cec64fe8fcdfc39 100644 (file)
@@ -51,6 +51,8 @@ INCLUDE_DIRECTORIES(
     ../../../adaptors/common
     ../../../adaptors/base
     ../../../adaptors/public-api
+    ../../../adaptors/tizen
+    ../../../adaptors/ubuntu
     ../../../
 )
 
index 7cb21fbba2104606d3f9abdacacb301fe22f5f83..fcc734aa436ffce6a359eba1eeda3bca3b8a9a57 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/gl-abstraction.h>
+#include <dali/integration-api/gl-defines.h>
 #include "test-trace-call-stack.h"
 
 namespace Dali
@@ -50,6 +51,7 @@ public:
   TestGlAbstraction();
   ~TestGlAbstraction();
   void Initialize();
+
   void PreRender();
   void PostRender(unsigned int timeDelta);
 
@@ -132,6 +134,10 @@ public:
         mActiveTextures[ mActiveTextureUnit ].mBoundTextures.push_back( texture );
       }
     }
+
+    std::stringstream out;
+    out << target << ", " << texture;
+    mTextureTrace.PushCall("BindTexture", out.str());
   }
 
   inline void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
@@ -474,6 +480,17 @@ public:
         *(textures+i) = ++mLastAutoTextureIdUsed;
       }
     }
+
+    std::stringstream out;
+    for(int i=0; i<n; i++)
+    {
+      out << textures[i];
+      if(i<n-1)
+      {
+        out << ", ";
+      }
+    }
+    mTextureTrace.PushCall("GenTexture", out.str());
   }
 
   inline void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
@@ -746,6 +763,11 @@ public:
     }
   }
 
+  inline std::string GetShaderSource(GLuint shader)
+  {
+    return mShaderSources[shader];
+  }
+
   inline void StencilFunc(GLenum func, GLint ref, GLuint mask)
   {
   }
@@ -779,18 +801,30 @@ public:
 
   inline void TexParameterf(GLenum target, GLenum pname, GLfloat param)
   {
+    std::stringstream out;
+    out << target << ", " << pname << ", " << param;
+    mTexParamaterTrace.PushCall("TexParameterf", out.str());
   }
 
   inline void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
   {
+    std::stringstream out;
+    out << target << ", " << pname << ", " << params[0];
+    mTexParamaterTrace.PushCall("TexParameterfv", out.str());
   }
 
   inline void TexParameteri(GLenum target, GLenum pname, GLint param)
   {
+    std::stringstream out;
+    out << target << ", " << pname << ", " << param;
+    mTexParamaterTrace.PushCall("TexParameteri", out.str());
   }
 
   inline void TexParameteriv(GLenum target, GLenum pname, const GLint* params)
   {
+    std::stringstream out;
+    out << target << ", " << pname << ", " << params[0];
+    mTexParamaterTrace.PushCall("TexParameteriv", out.str());
   }
 
   inline void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
@@ -1498,6 +1532,11 @@ public: // TEST FUNCTIONS
   inline void ResetTextureCallStack() { mTextureTrace.Reset(); }
   inline TraceCallStack& GetTextureTrace() { return mTextureTrace; }
 
+  //Methods for Texture verification
+  inline void EnableTexParameterCallTrace(bool enable) { mTexParamaterTrace.Enable(enable); }
+  inline void ResetTexParameterCallStack() { mTexParamaterTrace.Reset(); }
+  inline TraceCallStack& GetTexParameterTrace() { return mTexParamaterTrace; }
+
   //Methods for Draw verification
   inline void EnableDrawCallTrace(bool enable) { mDrawTrace.Enable(enable); }
   inline void ResetDrawCallStack() { mDrawTrace.Reset(); }
@@ -1655,6 +1694,7 @@ private:
   TraceCallStack mCullFaceTrace;
   TraceCallStack mShaderTrace;
   TraceCallStack mTextureTrace;
+  TraceCallStack mTexParamaterTrace;
   TraceCallStack mDrawTrace;
 
   // Shaders & Uniforms
index 6b6a8f8de7b18521c2e8b19c7dc32aa11dde7f59..4f749ce222b50c92b88eeeee4c1a72d0e6a5bbbf 100644 (file)
@@ -86,7 +86,19 @@ void TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer
  */
 void TestPlatformAbstraction::LoadResource(const Integration::ResourceRequest& request)
 {
-  mTrace.PushCall("LoadResource", "");
+  std::ostringstream out;
+  out << "Type:";
+  if( request.GetType()->id == Integration::ResourceText )
+  {
+    out << "Text";
+  }
+  else
+  {
+    out << request.GetType()->id;
+  }
+  out << ", Path: " << request.GetPath() << std::endl ;
+
+  mTrace.PushCall("LoadResource", out.str());
   if(mRequest != NULL)
   {
     delete mRequest;
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-touch-utils.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-touch-utils.h
new file mode 100644 (file)
index 0000000..68d50f2
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef _TEST_TOUCH_UTILS_H_
+#define _TEST_TOUCH_UTILS_H_
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <dali/public-api/actors/actor.h>
+
+namespace Dali
+{
+
+// Data for touch events
+struct TouchEventData
+{
+  TouchEventData()
+  : functorCalled(false),
+    receivedTouch(),
+    touchActor()
+  {
+  }
+
+  void Reset()
+  {
+    functorCalled = false;
+
+    receivedTouch.points.clear();
+    receivedTouch.time = 0;
+
+    touchActor = NULL;
+  }
+
+  bool functorCalled;
+  TouchEvent receivedTouch;
+  Actor touchActor;
+};
+
+// Functor that sets the data when called
+struct TouchEventDataFunctor
+{
+  TouchEventDataFunctor(TouchEventData& data) : touchEventData(data) { }
+
+  bool operator()(Actor actor, const TouchEvent& touch)
+  {
+    touchEventData.functorCalled = true;
+    touchEventData.touchActor = actor;
+    touchEventData.receivedTouch = touch;
+    return false;
+  }
+
+  // Generate a touch-event
+  Integration::TouchEvent GenerateSingleTouch( TouchPoint::State state, Vector2 screenPosition ) const
+  {
+    Integration::TouchEvent touchEvent;
+    touchEvent.points.push_back( TouchPoint ( 0, state, screenPosition.x, screenPosition.y ) );
+    return touchEvent;
+  }
+
+  TouchEventData& touchEventData;
+};
+
+
+} // namespace Dali
+
+#endif //  _TEST_TOUCH_UTILS_H_
index 9ed53ece90cb59de825d7c1db0b07a774abf1227..921088bdd02d046acef28739f96020e2a09c2ae0 100644 (file)
@@ -34,6 +34,8 @@ TraceCallStack::~TraceCallStack() { }
  */
 void TraceCallStack::Enable(bool enable) { mTraceActive = enable; }
 
+bool TraceCallStack::IsEnabled() { return mTraceActive; }
+
 /**
  * Push a call onto the stack if the trace is active
  * @param[in] method The name of the method
@@ -69,6 +71,20 @@ bool TraceCallStack::FindMethod(std::string method) const
   return found;
 }
 
+int TraceCallStack::CountMethod(std::string method) const
+{
+  int numCalls = 0;
+  for( size_t i=0; i < mCallStack.size(); i++ )
+  {
+    if( 0 == mCallStack[i][0].compare(method) )
+    {
+      numCalls++;
+    }
+  }
+  return numCalls;
+}
+
+
 /**
  * Search for a method in the stack with the given parameter list
  * @param[in] method The name of the method
index b98e42fb34e20924d537604e879cf4e1a98b958b..25b77f885bbf8ad05359785043655781f9e9246c 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #include <string>
-#include <dali/public-api/common/vector-wrapper.h>
+#include <vector>
 
 namespace Dali
 {
@@ -45,6 +45,8 @@ public:
    */
   void Enable(bool enable);
 
+  bool IsEnabled();
+
   /**
    * Push a call onto the stack if the trace is active
    * @param[in] method The name of the method
@@ -60,6 +62,13 @@ public:
    */
   bool FindMethod(std::string method) const;
 
+  /**
+   * Count how many times a method was called
+   * @param[in] method The name of the method
+   * @return The number of times it was called
+   */
+  int CountMethod(std::string method) const;
+
   /**
    * Search for a method in the stack with the given parameter list
    * @param[in] method The name of the method
index 0b522dbc450fd65584da94b65c6607a933c48d1e..0d1f02999c0f909efd73054fdded80c6a7e5b116 100644 (file)
@@ -2,6 +2,8 @@
 /.cov
 /aclocal.m4
 /autom4te.cache
+/ar-lib
+/compile
 /config.guess
 /config.log
 /config.status
@@ -12,6 +14,7 @@
 /install-sh
 /libtool
 /ltmain.sh
+/m4
 /missing
 *.pc
 /documentation.list
index aba9958d42eeaed2cd4111d116bc53146b668722..2529831e545c17d9b162325aaa0f436fe4769d7b 100644 (file)
@@ -18,9 +18,11 @@ SUBDIRS = common dali-application
 
 if ! LITE_PROFILE
 if ! WEARABLE_PROFILE
+if ! UBUNTU_PROFILE
 SUBDIRS += plugins
 endif
 endif
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = dali.pc \
diff --git a/build/tizen/README b/build/tizen/README
deleted file mode 100644 (file)
index ea76b45..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-autoreconf --install
-./configure --prefix=$DESKTOP_PREFIX
-make install -j3
index 1d73d7f20bb5f00335cf31104b30b73d83375b2b..7b1243f86e0c03a0418cd763a1f9e464345dc28a 100644 (file)
@@ -16,6 +16,9 @@
 
 # Build the Dali Adaptor common intermediate library
 
+
+############# INCLUDE FILE LISTS #############
+
 # Base Adaptor
 base_adaptor_src_dir = ../../../adaptors/base
 include ../../../adaptors/base/file.list
@@ -28,67 +31,126 @@ include ../../../platform-abstractions/slp/file.list
 adaptor_common_dir = ../../../adaptors/common
 include ../../../adaptors/common/file.list
 
+# Wayland
 if WAYLAND
 adaptor_wayland_dir = ../../../adaptors/wayland
 include ../../../adaptors/wayland/file.list
 else
+# X11
 adaptor_x11_dir = ../../../adaptors/x11
 include ../../../adaptors/x11/file.list
 endif
 
-if COMMON_PROFILE
-adaptor_common_internal_src_files += $(adaptor_common_internal_profile_src_files)
-slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
-if ! WAYLAND
-adaptor_common_internal_src_files += $(adaptor_x11_common_internal_profile_src_files)
+# Ubuntu
+if UBUNTU_PROFILE
+adaptor_ubuntu_dir = ../../../adaptors/ubuntu
+include ../../../adaptors/ubuntu/file.list
+else
+# Tizen
+adaptor_tizen_dir = ../../../adaptors/tizen
+include ../../../adaptors/tizen/file.list
 endif
+
+# Mobile
+adaptor_mobile_dir = ../../../adaptors/mobile
+include ../../../adaptors/mobile/file.list
+
+# TV
+if TV_PROFILE
+adaptor_tv_dir = ../../../adaptors/tv
+include ../../../adaptors/tv/file.list
 endif
 
+# Public API
+adaptor_public_api_dir = ../../../adaptors/public-api
+include ../../../adaptors/public-api/file.list
+
+
+
+############# source files #############
+
+adaptor_src_files = $(adaptor_common_src_files)
+
+# COMMON
+if COMMON_PROFILE
+slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
+
+adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
+                             $(adaptor_common_internal_default_profile_src_files) \
+                             $(adaptor_tizen_internal_src_files)
+
 if WAYLAND
-adaptor_common_internal_src_files += $(adaptor_wayland_internal_src_files)
-adaptor_common_internal_profile_src_files += $(adaptor_wayland_profile_src_files)
+adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files) \
+                              $(adaptor_wayland_internal_default_profile_src_files)
 else
-adaptor_common_internal_src_files += $(adaptor_x11_internal_src_files)
-adaptor_common_internal_profile_src_files += $(adaptor_x11_profile_src_files)
-endif
+adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
+                              $(adaptor_x11_internal_default_profile_src_files)
+endif # WAYLAND
+endif # COMMON_PROFILE
+
+
+# UBUNTU
+if UBUNTU_PROFILE
+slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
+
+adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
+                             $(adaptor_common_internal_default_profile_src_files) \
+                             $(adaptor_ubuntu_internal_src_files) \
+                             $(adaptor_x11_ubuntu_internal_src_files) \
+                             $(adaptor_x11_internal_default_profile_src_files)
 
+endif # UBUNTU_PROFILE
+
+
+# MOBILE
 if MOBILE_PROFILE
-adaptor_common_internal_src_files += $(adaptor_x11_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_src_files)
-include ../../../adaptors/mobile/file.list
+
+adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
+                             $(adaptor_common_internal_mobile_profile_src_files) \
+                             $(adaptor_tizen_internal_src_files) \
+                             $(adaptor_x11_tizen_internal_src_files)
+
 endif
 
+
+# LITE
 if LITE_PROFILE
-adaptor_common_internal_src_files += $(adaptor_common_internal_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
-if ! WAYLAND
-adaptor_common_internal_src_files += $(adaptor_x11_common_internal_profile_src_files)
-endif
+
+adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
+                             $(adaptor_common_internal_mobile_profile_src_files) \
+                             $(adaptor_tizen_internal_src_files) \
+                             $(adaptor_x11_tizen_internal_src_files)
 endif
 
+
+# WEARABLE
 if WEARABLE_PROFILE
-adaptor_common_internal_src_files += $(adaptor_common_internal_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
-if ! WAYLAND
-adaptor_common_internal_src_files += $(adaptor_x11_common_internal_profile_src_files)
-endif
+
+adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
+                             $(adaptor_common_internal_mobile_profile_src_files) \
+                             $(adaptor_tizen_internal_src_files) \
+                             $(adaptor_x11_tizen_internal_src_files)
 endif
 
+
+# TV
 if TV_PROFILE
 slp_platform_abstraction_src_files += $(slp_assimp_src_files)
-include ../../../adaptors/tv/file.list
-endif
 
-# Public API
-adaptor_public_api_dir = ../../../adaptors/public-api
-include ../../../adaptors/public-api/file.list
+adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
+                             $(adaptor_common_internal_tv_profile_src_files) \
+                             $(adaptor_tizen_internal_src_files) \
+                             $(adaptor_x11_tv_internal_src_files)
+endif
 
 # Feedback Plugin
 if ! LITE_PROFILE
 if ! WEARABLE_PROFILE
 plugin_themes_dir = ../../../adaptors/common/feedback
 dali_plugin_theme_files = $(plugin_themes_dir)/default-feedback-theme.json
-
 dalifeedbackthemedir = ${dataReadOnlyDir}/themes/feedback-themes/
 dalifeedbacktheme_DATA = ${dali_plugin_theme_files}
 endif
@@ -105,8 +167,8 @@ lib_LTLIBRARIES = libdali-adaptor-common.la
 libdali_adaptor_common_la_SOURCES = \
                      $(base_adaptor_src_files) \
                      $(slp_platform_abstraction_src_files) \
-                     $(adaptor_common_src_files) \
-                     $(adaptor_common_internal_src_files)
+                     $(adaptor_src_files) \
+                     $(adaptor_internal_src_files)
 
 libdali_adaptor_common_la_DEPENDENCIES =
 
@@ -119,7 +181,7 @@ libdali_adaptor_common_la_includes = \
                       -I../../../platform-abstractions/ \
                       -I../../../adaptors/public-api \
                       -I../../../adaptors/common \
-                      -I../../../adaptors/ 
+                      -I../../../adaptors/
 if WAYLAND
 libdali_adaptor_common_la_includes += \
                       -I../../../adaptors/wayland
@@ -128,6 +190,14 @@ libdali_adaptor_common_la_includes += \
                       -I../../../adaptors/x11
 endif
 
+if UBUNTU_PROFILE
+libdali_adaptor_common_la_includes += \
+                      -I../../../adaptors/ubuntu
+else
+libdali_adaptor_common_la_includes += \
+                      -I../../../adaptors/tizen
+endif
+
 daliDefaultFontCacheDir = ${dataReadOnlyDir}/glyphcache/
 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
@@ -233,6 +303,10 @@ endif
 if TURBO_JPEG_IS_ON
 libdali_adaptor_common_la_LIBADD += -lturbojpeg
 CFLAGS += -D_TURBO_JPEG_LOADER
+if UBUNTU_PROFILE
+libdali_adaptor_common_la_LIBADD += -ljpeg
+CFLAGS += -fPIC
+endif
 else
 libdali_adaptor_common_la_LIBADD += -ljpeg
 endif
index adbc3f08d520bdc3d4c28433e40733dcb7cb6c4f..cf4d542f35088cbd9eb96511c405cfa212faa6ba 100644 (file)
@@ -18,6 +18,8 @@ m4_define([dali_version],[0.1.0])
 AC_INIT([dali], [dali_version])
 AM_INIT_AUTOMAKE([-Wall foreign])
 
+AC_CONFIG_MACRO_DIR([m4])
+
 AC_PROG_CXX
 AC_PROG_LIBTOOL
 AC_PROG_MKDIR_P
@@ -31,26 +33,17 @@ AC_SUBST(DALI_ADAPTOR_VERSION)
 
 FREETYPE_REQUIRED=9.16.3
 
-PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
 PKG_CHECK_MODULES(DALICORE, dali-core)
-PKG_CHECK_MODULES(DLOG, dlog)
 PKG_CHECK_MODULES(ELEMENTARY, elementary)
 PKG_CHECK_MODULES(ECORE, ecore)
 PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
 PKG_CHECK_MODULES(EXIF, libexif)
 PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
-PKG_CHECK_MODULES(FEEDBACK, feedback)
 PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
-PKG_CHECK_MODULES(MMFSOUND, mm-sound)
 PKG_CHECK_MODULES(PNG, libpng)
-PKG_CHECK_MODULES(SENSOR, sensor)
-PKG_CHECK_MODULES(TTS, tts)
-PKG_CHECK_MODULES(VCONF, vconf)
 PKG_CHECK_MODULES(XML, libxml-2.0)
-PKG_CHECK_MODULES(LIBDRM, libdrm)
 PKG_CHECK_MODULES(LIBEXIF, libexif)
-PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
-PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
+PKG_CHECK_MODULES(LIBDRM, libdrm)
 
 # Check for availability of BulletPhysics
 PKG_CHECK_EXISTS(bullet, [
@@ -108,7 +101,7 @@ AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
 
 # Tizen Profile options
 AC_ARG_ENABLE([profile],
-              [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV],
+              [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV,UBUNTU],
                             [Select the variant of tizen])],
               [enable_profile=$enableval],
               [enable_profile=COMMON])
@@ -125,6 +118,7 @@ AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
 AM_CONDITIONAL([LITE_PROFILE], [test x$enable_profile = xLITE])
 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
+AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
 
 if test "x$enable_profile" = "xCOMMON"; then
@@ -156,6 +150,20 @@ PKG_CHECK_MODULES(ASSIMP, assimp)
 PKG_CHECK_MODULES(HAPTIC, haptic)
 fi
 
+if test "x$enable_profile" = "xUBUNTU"; then
+PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
+else
+PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
+PKG_CHECK_MODULES(DLOG, dlog)
+PKG_CHECK_MODULES(FEEDBACK, feedback)
+PKG_CHECK_MODULES(MMFSOUND, mm-sound)
+PKG_CHECK_MODULES(SENSOR, sensor)
+PKG_CHECK_MODULES(TTS, tts)
+PKG_CHECK_MODULES(VCONF, vconf)
+PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
+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],
index 70afe23f0fafc080080c6605dcee171df7b35c3a..b5139ed6be433dbf90a52aa51c5fd60f6b1e6d17 100644 (file)
@@ -32,17 +32,32 @@ adaptor_x11_dir = ../../../adaptors/x11
 include ../../../adaptors/x11/file.list
 endif
 
+if UBUNTU_PROFILE
+adaptor_ubuntu_dir = ../../../adaptors/ubuntu
+include ../../../adaptors/ubuntu/file.list
+else
+adaptor_tizen_dir = ../../../adaptors/tizen
+include ../../../adaptors/tizen/file.list
+endif
+
 lib_LTLIBRARIES = libdali-application.la
 
-libdali_application_la_SOURCES = \
-                     $(adaptor_application_src_files) \
-                     $(adaptor_application_internal_src_files)
+libdali_application_la_SOURCES = $(adaptor_common_application_src_files)
+
+libdali_application_la_SOURCES += $(adaptor_common_application_internal_src_files)
+
+if UBUNTU_PROFILE
+libdali_application_la_SOURCES += $(adaptor_ubuntu_application_src_files)
+else
+libdali_application_la_SOURCES += $(adaptor_tizen_application_src_files)
 
 if WAYLAND
-libdali_application_la_SOURCES += $(adaptor_wayland_application_src_files)
+libdali_application_la_SOURCES += $(adaptor_wayland_tizen_application_src_files)
 else
-libdali_application_la_SOURCES += $(adaptor_x11_application_src_files)
-endif
+libdali_application_la_SOURCES += $(adaptor_x11_tizen_application_src_files)
+endif # WAYLAND
+
+endif # UBUNTU_PROFILE
 
 libdali_application_la_DEPENDENCIES =
 
@@ -56,6 +71,11 @@ libdali_application_includes = \
                       -I../../../adaptors/common \
                       -I../../../adaptors/
 
+if UBUNTU_PROFILE
+libdali_application_includes += \
+                      -I../../../adaptors/ubuntu
+endif
+
 if WAYLAND
 libdali_application_includes += \
                       -I../../../adaptors/wayland
@@ -98,7 +118,8 @@ libdali_application_la_CXXFLAGS = \
                       $(TTS_CFLAGS)
 
 libdali_application_la_LIBADD = \
-                      $(CAPI_APPFW_APPLICATION_LIBS)
+                      $(CAPI_APPFW_APPLICATION_LIBS) \
+                      $(ELEMENTARY_LIBS)
 
 install-data-local:
        $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliUserShaderCacheDir}
index 578ede6da3fafefa3a6e677ac11726764962318b..f9258098dc0a76f1beb0a1b12404f9077d208304 100644 (file)
@@ -26,7 +26,6 @@
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/bitmap.h>
 #include <dali/public-api/images/image-attributes.h>
-#include <dlog.h>
 
 namespace Dali
 {
index 9759d8f7d8e2988f9b441bd1797e62db1656b7db..a3a071c851d16c2ac8e050c50245963e870a7dc1 100755 (executable)
@@ -28,7 +28,6 @@
 #include <dali/integration-api/bitmap.h>
 #include <dali/public-api/images/image-attributes.h>
 #include <dali/public-api/common/dali-vector.h>
-#include <dlog.h>
 
 namespace Dali
 {
index f2b68ee4af22be64872e90b4a024d8cc8e650ae8..d47919f14194acf1d2a8e3e2728af04dc88023fe 100644 (file)
@@ -19,7 +19,9 @@
 #include "slp-logging.h"
 
 // EXTERNAL INCLUDES
+#ifndef DALI_PROFILE_UBUNTU
 #include <dlog.h>
+#endif // DALI_PROFILE_UBUNTU
 
 namespace Dali
 {
@@ -30,6 +32,8 @@ namespace SlpPlatform
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
+
+#ifndef DALI_PROFILE_UBUNTU
   switch(level)
   {
     case Dali::Integration::Log::DebugInfo:
@@ -45,6 +49,25 @@ void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& messag
       LOG(LOG_DEFAULT, DALI_TAG, "%s", message.c_str());
       break;
   }
+#else // DALI_PROFILE_UBUNTU
+  const char *format = NULL;
+  switch(level)
+  {
+    case Dali::Integration::Log::DebugInfo:
+      format = "\e[1;34mINFO:\e[21m %s: %s\e[0m";
+      break;
+    case Dali::Integration::Log::DebugWarning:
+      format = "\e[1;33mWARN:\e[21m %s: %s\e[0m";
+      break;
+    case Dali::Integration::Log::DebugError:
+      format = "\e[1;91mERROR:\e[21m %s: %s\e[0m";
+      break;
+    default:
+      format = ":\e[21m %s: %s\e[0m";
+      break;
+  }
+  printf(format, DALI_TAG, message.c_str());
+#endif // DALI_PROFILE_UBUNTU
 }
 
 } // namespace SlpPlatform
index 4fd538defe3eba3788491931a8c47a4258bbdb22..960a17544e81f4d58fddb629c48235971623e360 100644 (file)
@@ -17,7 +17,9 @@
 
 #include "slp-platform-abstraction.h"
 
+#ifndef DALI_PROFILE_UBUNTU
 #include <vconf.h>
+#endif // DALI_PROFILE_UBUNTU
 #include <dirent.h>
 
 #include <dali/integration-api/debug.h>
@@ -355,7 +357,9 @@ void SlpPlatformAbstraction::UpdateDefaultsFromDevice()
   }
 
   int fontSize(0);
+#ifndef DALI_PROFILE_UBUNTU
   vconf_get_int( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &fontSize );
+#endif // DALI_PROFILE_UBUNTU
   mDefaultFontSize = FONT_SIZE_TABLE[fontSize];
 }