Merge branch 'devel/master' into tizen 42/159942/1 accepted/tizen/unified/20171117.124943 submit/tizen/20171115.014233 submit/tizen/20171115.054905
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 14 Nov 2017 00:56:51 +0000 (09:56 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 14 Nov 2017 00:56:56 +0000 (09:56 +0900)
Change-Id: Id4f26374cc96c8f4140d2368b03e8c77c51687bc

104 files changed:
adaptors/base/combined-update-render/combined-update-render-controller.cpp
adaptors/base/environment-options.cpp
adaptors/base/environment-options.h
adaptors/base/environment-variables.h
adaptors/base/render-helper.cpp
adaptors/base/render-helper.h
adaptors/common/adaptor-impl.cpp
adaptors/common/adaptor-impl.h
adaptors/common/adaptor.cpp
adaptors/common/application-impl.cpp
adaptors/common/application-impl.h
adaptors/common/event-loop/ecore/ecore-timer-impl.cpp
adaptors/common/framework.h
adaptors/common/gl/egl-factory.cpp
adaptors/common/gl/egl-factory.h
adaptors/common/gl/egl-implementation.cpp
adaptors/common/gl/egl-implementation.h
adaptors/common/gl/gl-implementation.h
adaptors/common/pixel-buffer-impl.cpp
adaptors/common/pixel-buffer-impl.h
adaptors/common/timer-impl.h
adaptors/common/video-player-impl.cpp
adaptors/common/video-player-impl.h
adaptors/common/virtual-keyboard-impl.h
adaptors/common/window-impl.h
adaptors/devel-api/adaptor-framework/application-devel.cpp
adaptors/devel-api/adaptor-framework/application-devel.h
adaptors/devel-api/adaptor-framework/image-loading.h
adaptors/devel-api/adaptor-framework/imf-manager.cpp
adaptors/devel-api/adaptor-framework/imf-manager.h
adaptors/devel-api/adaptor-framework/pixel-buffer.cpp
adaptors/devel-api/adaptor-framework/pixel-buffer.h
adaptors/devel-api/adaptor-framework/video-player-plugin.h
adaptors/devel-api/adaptor-framework/video-player.cpp
adaptors/devel-api/adaptor-framework/video-player.h
adaptors/devel-api/adaptor-framework/virtual-keyboard.cpp
adaptors/devel-api/adaptor-framework/virtual-keyboard.h
adaptors/devel-api/adaptor-framework/window-devel.cpp [deleted file]
adaptors/devel-api/adaptor-framework/window-devel.h [deleted file]
adaptors/devel-api/file.list
adaptors/ecore/common/ecore-virtual-keyboard.cpp
adaptors/ecore/wayland/event-handler-ecore-wl.cpp
adaptors/ecore/wayland/imf-manager-impl-ecore-wl.cpp
adaptors/ecore/wayland/imf-manager-impl.h
adaptors/ecore/wayland/window-impl-ecore-wl.cpp
adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp
adaptors/integration-api/adaptor.h
adaptors/integration-api/x11/imf-manager-impl.h
adaptors/public-api/adaptor-framework/application.cpp
adaptors/public-api/adaptor-framework/application.h
adaptors/public-api/adaptor-framework/device-status.h [new file with mode: 0644]
adaptors/public-api/adaptor-framework/window.cpp
adaptors/public-api/adaptor-framework/window.h
adaptors/public-api/dali-adaptor-version.cpp
adaptors/public-api/dali.h
adaptors/public-api/file.list
adaptors/tizen/framework-tizen-3.cpp
adaptors/tizen/framework-tizen.cpp
adaptors/ubuntu/framework-ubuntu.cpp
adaptors/wayland/input/text/imf/imf-manager-impl-wl.cpp
adaptors/wayland/input/text/imf/imf-manager-impl.h
adaptors/wayland/window-impl-wl.cpp
adaptors/x11/ecore-x-event-handler.cpp
adaptors/x11/imf-manager-impl-x.cpp
adaptors/x11/window-impl-x.cpp
automated-tests/src/dali-adaptor-internal/CMakeLists.txt
automated-tests/src/dali-adaptor-internal/utc-Dali-TiltSensor.cpp
automated-tests/src/dali-adaptor/CMakeLists.txt
automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.h [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-compare-types.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-harness.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-controller.h
automated-tests/src/dali-adaptor/utc-Dali-Application.cpp
automated-tests/src/dali-adaptor/utc-Dali-PixelBuffer.cpp
automated-tests/src/dali-adaptor/utc-Dali-Timer.cpp
automated-tests/src/dali-adaptor/utc-Dali-Window.cpp
automated-tests/src/dali-platform-abstraction/CMakeLists.txt
build/tizen/configure.ac
build/tizen/plugins/Makefile.am
build/tizen/plugins/configure.ac
packaging/dali-adaptor.spec
platform-abstractions/portable/gaussian-blur.cpp [new file with mode: 0644]
platform-abstractions/portable/gaussian-blur.h [new file with mode: 0644]
platform-abstractions/portable/image-operations.cpp
platform-abstractions/portable/pixel-manipulation.cpp
platform-abstractions/tizen/file.list
platform-abstractions/tizen/image-loaders/loader-png.cpp
plugins/file.list
plugins/video-player/tizen-video-player.cpp [deleted file]
plugins/video-player/tizen-video-player.h [deleted file]
text/dali/devel-api/text-abstraction/font-client.cpp
text/dali/devel-api/text-abstraction/font-client.h
text/dali/internal/text-abstraction/font-client-impl.cpp
text/dali/internal/text-abstraction/font-client-impl.h
text/dali/internal/text-abstraction/font-client-plugin-impl.cpp
text/dali/internal/text-abstraction/font-client-plugin-impl.h

index 2b3ed58..9bb5bdc 100644 (file)
@@ -400,6 +400,10 @@ void CombinedUpdateRenderController::UpdateRenderThread()
   uint64_t timeToSleepUntil = 0;
   int extraFramesDropped = 0;
 
+  const unsigned int renderToFboInterval = mEnvironmentOptions.GetRenderToFboInterval();
+  const bool renderToFboEnabled = 0u != renderToFboInterval;
+  unsigned int frameCount = 0u;
+
   while( UpdateRenderReady( useElapsedTime, updateRequired, timeToSleepUntil ) )
   {
     LOG_UPDATE_RENDER_TRACE;
@@ -437,6 +441,9 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     // RESIZE SURFACE
     //////////////////////////////
 
+    const bool isRenderingToFbo = renderToFboEnabled && ( ( 0u == frameCount ) || ( 0u != frameCount % renderToFboInterval ) );
+    ++frameCount;
+
     // The resizing will be applied in the next loop
     bool surfaceResized = ShouldSurfaceBeResized();
     if( DALI_UNLIKELY( surfaceResized ) )
@@ -467,7 +474,12 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     Integration::UpdateStatus updateStatus;
 
     AddPerformanceMarker( PerformanceInterface::UPDATE_START );
-    mCore.Update( frameDelta, currentTime, nextFrameTime, updateStatus );
+    mCore.Update( frameDelta,
+                  currentTime,
+                  nextFrameTime,
+                  updateStatus,
+                  renderToFboEnabled,
+                  isRenderingToFbo );
     AddPerformanceMarker( PerformanceInterface::UPDATE_END );
 
     unsigned int keepUpdatingStatus = updateStatus.KeepUpdating();
@@ -497,7 +509,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
 
     if( renderStatus.NeedsPostRender() )
     {
-      mRenderHelper.PostRender();
+      mRenderHelper.PostRender( isRenderingToFbo );
     }
 
     // Trigger event thread to request Update/Render thread to sleep if update not required
@@ -549,8 +561,12 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       }
     }
 
-    // Sleep until at least the the default frame duration has elapsed. This will return immediately if the specified end-time has already passed.
-    TimeService::SleepUntil( timeToSleepUntil );
+    // Render to FBO is intended to measure fps above 60 so sleep is not wanted.
+    if( 0u == renderToFboInterval )
+    {
+      // Sleep until at least the the default frame duration has elapsed. This will return immediately if the specified end-time has already passed.
+      TimeService::SleepUntil( timeToSleepUntil );
+    }
   }
 
   // Inform core of context destruction & shutdown EGL
index fef700d..7d2d354 100644 (file)
@@ -38,6 +38,7 @@ namespace Adaptor
 namespace
 {
 const unsigned int DEFAULT_STATISTICS_LOG_FREQUENCY = 2;
+const int DEFAULT_MULTI_SAMPLING_LEVEL = -1;
 
 unsigned int GetIntegerEnvironmentVariable( const char* variable, unsigned int defaultValue )
 {
@@ -102,13 +103,15 @@ EnvironmentOptions::EnvironmentOptions()
   mPanMinimumDistance(-1),
   mPanMinimumEvents(-1),
   mGlesCallTime( 0 ),
-  mWindowWidth( 0 ),
-  mWindowHeight( 0 ),
+  mWindowWidth( 0u ),
+  mWindowHeight( 0u ),
   mThreadingMode( ThreadingMode::COMBINED_UPDATE_RENDER ),
-  mRenderRefreshRate( 1 ),
+  mRenderRefreshRate( 1u ),
   mGlesCallAccumulate( false ),
-  mMultiSamplingLevel( 0 ),
+  mMultiSamplingLevel( DEFAULT_MULTI_SAMPLING_LEVEL ),
   mMaxTextureSize( 0 ),
+  mIndicatorVisibleMode( -1 ),
+  mRenderToFboInterval( 0u ),
   mLogFunction( NULL )
 {
   ParseEnvironmentOptions();
@@ -255,7 +258,7 @@ unsigned int EnvironmentOptions::GetRenderRefreshRate() const
   return mRenderRefreshRate;
 }
 
-unsigned int EnvironmentOptions::GetMultiSamplingLevel() const
+int EnvironmentOptions::GetMultiSamplingLevel() const
 {
   return mMultiSamplingLevel;
 }
@@ -265,6 +268,16 @@ unsigned int EnvironmentOptions::GetMaxTextureSize() const
   return mMaxTextureSize;
 }
 
+int EnvironmentOptions::GetIndicatorVisibleMode() const
+{
+  return mIndicatorVisibleMode;
+}
+
+unsigned int EnvironmentOptions::GetRenderToFboInterval() const
+{
+  return mRenderToFboInterval;
+}
+
 bool EnvironmentOptions::PerformanceServerRequired() const
 {
   return ( ( GetPerformanceStatsLoggingOptions() > 0) ||
@@ -410,10 +423,7 @@ void EnvironmentOptions::ParseEnvironmentOptions()
   int multiSamplingLevel( 0 );
   if( GetIntegerEnvironmentVariable( DALI_ENV_MULTI_SAMPLING_LEVEL, multiSamplingLevel ) )
   {
-    if( multiSamplingLevel > 0 )
-    {
-      mMultiSamplingLevel = multiSamplingLevel;
-    }
+    mMultiSamplingLevel = multiSamplingLevel;
   }
 
   int maxTextureSize( 0 );
@@ -424,6 +434,17 @@ void EnvironmentOptions::ParseEnvironmentOptions()
       mMaxTextureSize = maxTextureSize;
     }
   }
+
+  int indicatorVisibleMode( -1 );
+  if( GetIntegerEnvironmentVariable( DALI_ENV_INDICATOR_VISIBLE_MODE, indicatorVisibleMode ) )
+  {
+    if( indicatorVisibleMode > -1 )
+    {
+      mIndicatorVisibleMode = indicatorVisibleMode;
+    }
+  }
+
+  mRenderToFboInterval = GetIntegerEnvironmentVariable( DALI_RENDER_TO_FBO, 0u );
 }
 
 } // Adaptor
index 2ab19a9..080850e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H__
-#define __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H__
+#ifndef DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H
+#define DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H
 
 /*
  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
@@ -38,7 +38,6 @@ namespace Adaptor
  */
 class EnvironmentOptions
 {
-
 public:
 
   /**
@@ -206,13 +205,25 @@ public:
   /**
    * @return The number of samples required in multisample buffers
    */
-  unsigned int GetMultiSamplingLevel() const;
+  int GetMultiSamplingLevel() const;
 
   /**
    * @return The maximum texture size
    */
   unsigned int GetMaxTextureSize() const;
 
+  /**
+   * @return The maximum texture size
+   */
+  int GetIndicatorVisibleMode() const;
+
+  /**
+   * @brief Retrieves the interval of frames to be rendered into the Frame Buffer Object and the Frame Buffer.
+   *
+   * @return The number of frames that are going to be rendered into the Frame Buffer Object but the last one which is going to be rendered into the Frame Buffer.
+   */
+  unsigned int GetRenderToFboInterval() const;
+
 private: // Internal
 
   /**
@@ -248,8 +259,10 @@ private: // Data
   ThreadingMode::Type mThreadingMode;             ///< threading mode
   unsigned int mRenderRefreshRate;                ///< render refresh rate
   bool mGlesCallAccumulate;                       ///< Whether or not to accumulate gles call statistics
-  unsigned int mMultiSamplingLevel;               ///< The number of samples required in multisample buffers
+  int mMultiSamplingLevel;                        ///< The number of samples required in multisample buffers
   unsigned int mMaxTextureSize;                   ///< The maximum texture size that GL can handle
+  int mIndicatorVisibleMode;                      ///< Indicator visible mode
+  unsigned int mRenderToFboInterval;              ///< The number of frames that are going to be rendered into the Frame Buffer Object but the last one which is going to be rendered into the Frame Buffer.
 
   Dali::Integration::Log::LogFunction mLogFunction;
 
@@ -265,4 +278,4 @@ private: // Data
 } // Internal
 } // Dali
 
-#endif // __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H__
+#endif // DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H
index 53fe21b..234ce3c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_VARIABLES_H__
-#define __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_VARIABLES_H__
+#ifndef DALI_INTERNAL_ADAPTOR_ENVIRONMENT_VARIABLES_H
+#define DALI_INTERNAL_ADAPTOR_ENVIRONMENT_VARIABLES_H
 
 /*
  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
@@ -97,10 +97,14 @@ namespace Adaptor
 
 #define DALI_ENV_MAX_TEXTURE_SIZE "DALI_MAX_TEXTURE_SIZE"
 
+#define DALI_ENV_INDICATOR_VISIBLE_MODE "DALI_INDICATOR_VISIBLE_MODE"
+
+#define DALI_RENDER_TO_FBO "DALI_RENDER_TO_FBO"
+
 } // namespace Adaptor
 
 } // namespace Internal
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_VARIABLES_H__
+#endif // DALI_INTERNAL_ADAPTOR_ENVIRONMENT_VARIABLES_H
index c77d2c9..1276078 100644 (file)
@@ -155,15 +155,23 @@ bool RenderHelper::PreRender()
   return true;
 }
 
-void RenderHelper::PostRender()
+void RenderHelper::PostRender( bool renderToFbo )
 {
   // Inform the gl implementation that rendering has finished before informing the surface
   mGLES.PostRender();
 
-  if( mSurface )
+  if( renderToFbo )
+  {
+    mGLES.Flush();
+    mGLES.Finish();
+  }
+  else
   {
-    // Inform the surface that rendering this frame has finished.
-    mSurface->PostRender( *mEGL, mGLES, mDisplayConnection, mSurfaceReplaced, mSurfaceResized );
+    if( mSurface )
+    {
+      // Inform the surface that rendering this frame has finished.
+      mSurface->PostRender( *mEGL, mGLES, mDisplayConnection, mSurfaceReplaced, mSurfaceResized );
+    }
   }
   mSurfaceReplaced = false;
   mSurfaceResized = false;
index 5d26d16..4e12afe 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __DALI_INTERNAL_RENDER_HELPER_H__
-#define __DALI_INTERNAL_RENDER_HELPER_H__
+#ifndef DALI_INTERNAL_RENDER_HELPER_H
+#define DALI_INTERNAL_RENDER_HELPER_H
 
 /*
  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
@@ -128,8 +128,10 @@ public:
    * Called after core has rendered the scene
    *
    * @note Called from render thread
+   *
+   * @param[in] renderToFbo Whether to render to a Frame Buffer Object.
    */
-  void PostRender();
+  void PostRender( bool renderToFbo );
 
 private:
 
@@ -156,4 +158,4 @@ private: // Data
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_RENDER_HELPER_H__
+#endif // DALI_INTERNAL_RENDER_HELPER_H
index 3d8f002..ff84a6e 100644 (file)
@@ -142,7 +142,13 @@ void Adaptor::Initialize( Dali::Configuration::ContextLoss configuration )
 
   EglSyncImplementation* eglSyncImpl = mEglFactory->GetSyncImplementation();
 
-  mCore = Integration::Core::New( *this, *mPlatformAbstraction, *mGLES, *eglSyncImpl, *mGestureManager, dataRetentionPolicy );
+  mCore = Integration::Core::New( *this,
+                                  *mPlatformAbstraction,
+                                  *mGLES,
+                                  *eglSyncImpl,
+                                  *mGestureManager,
+                                  dataRetentionPolicy ,
+                                  0u != mEnvironmentOptions->GetRenderToFboInterval() );
 
   const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
   if( 0u < timeInterval )
@@ -274,8 +280,6 @@ void Adaptor::Start()
   // Initialize the thread controller
   mThreadController->Initialize();
 
-  mState = RUNNING;
-
   ProcessCoreEvents(); // Ensure any startup messages are processed.
 
   for ( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter )
@@ -303,7 +307,6 @@ void Adaptor::Pause()
     }
 
     mThreadController->Pause();
-    mCore->Suspend();
     mState = PAUSED;
   }
 }
@@ -328,8 +331,8 @@ void Adaptor::Resume()
       (*iter)->OnResume();
     }
 
-    // Resume core so it processes any requests as well
-    mCore->Resume();
+    // trigger processing of events queued up while paused
+    mCore->ProcessEvents();
 
     // Do at end to ensure our first update/render after resumption includes the processed messages as well
     mThreadController->Resume();
@@ -348,7 +351,6 @@ void Adaptor::Stop()
     }
 
     mThreadController->Stop();
-    mCore->Suspend();
 
     // Delete the TTS player
     for(int i =0; i < Dali::TtsPlayer::MODE_NUM; i++)
@@ -440,12 +442,12 @@ Dali::TtsPlayer Adaptor::GetTtsPlayer(Dali::TtsPlayer::Mode mode)
   return mTtsPlayers[mode];
 }
 
-bool Adaptor::AddIdle( CallbackBase* callback )
+bool Adaptor::AddIdle( CallbackBase* callback, bool forceAdd )
 {
   bool idleAdded(false);
 
   // Only add an idle if the Adaptor is actually running
-  if( RUNNING == mState )
+  if( RUNNING == mState || forceAdd )
   {
     idleAdded = mCallbackManager->AddIdleCallback( callback );
   }
@@ -657,24 +659,41 @@ void Adaptor::ProcessCoreEvents()
   }
 }
 
-void Adaptor::RequestUpdate()
+void Adaptor::RequestUpdate( bool forceUpdate )
 {
-  // When Dali applications are partially visible behind the lock-screen,
-  // the indicator must be updated (therefore allow updates in the PAUSED state)
-  if ( PAUSED  == mState ||
-       RUNNING == mState )
+  switch( mState )
   {
-    mThreadController->RequestUpdate();
+    case RUNNING:
+    {
+      mThreadController->RequestUpdate();
+      break;
+    }
+    case PAUSED:
+    case PAUSED_WHILE_HIDDEN:
+    {
+      // When Dali applications are partially visible behind the lock-screen,
+      // the indicator must be updated (therefore allow updates in the PAUSED state)
+      if( forceUpdate )
+      {
+        mThreadController->RequestUpdateOnce();
+      }
+      break;
+    }
+    default:
+    {
+      // Do nothing
+      break;
+    }
   }
 }
 
-void Adaptor::RequestProcessEventsOnIdle()
+void Adaptor::RequestProcessEventsOnIdle( bool forceProcess )
 {
   // Only request a notification if the Adaptor is actually running
   // and we haven't installed the idle notification
-  if( ( ! mNotificationOnIdleInstalled ) && ( RUNNING == mState ) )
+  if( ( ! mNotificationOnIdleInstalled ) && ( RUNNING == mState || forceProcess ) )
   {
-    mNotificationOnIdleInstalled = AddIdle( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ) );
+    mNotificationOnIdleInstalled = AddIdle( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess );
   }
 }
 
@@ -694,7 +713,7 @@ void Adaptor::OnWindowShown()
 
 void Adaptor::OnWindowHidden()
 {
-  if ( STOPPED != mState )
+  if ( RUNNING == mState )
   {
     Pause();
 
@@ -707,10 +726,10 @@ void Adaptor::OnWindowHidden()
 void Adaptor::OnDamaged( const DamageArea& area )
 {
   // This is needed for the case where Dali window is partially obscured
-  RequestUpdate();
+  RequestUpdate( false );
 }
 
-void Adaptor::SurfaceResizePrepare( Dali::Adaptor::SurfaceSize surfaceSize )
+void Adaptor::SurfaceResizePrepare( SurfaceSize surfaceSize )
 {
   // let the core know the surface size has changed
   mCore->SurfaceResized( surfaceSize.GetWidth(), surfaceSize.GetHeight() );
@@ -718,7 +737,7 @@ void Adaptor::SurfaceResizePrepare( Dali::Adaptor::SurfaceSize surfaceSize )
   mResizedSignal.Emit( mAdaptor );
 }
 
-void Adaptor::SurfaceResizeComplete( Dali::Adaptor::SurfaceSize surfaceSize )
+void Adaptor::SurfaceResizeComplete( SurfaceSize surfaceSize )
 {
   // flush the event queue to give the update-render thread chance
   // to start processing messages for new camera setup etc as soon as possible
@@ -737,6 +756,8 @@ void Adaptor::NotifySceneCreated()
 
   // process after surface is created (registering to remote surface provider if required)
   SurfaceInitialized();
+
+  mState = RUNNING;
 }
 
 void Adaptor::NotifyLanguageChanged()
@@ -751,12 +772,9 @@ void Adaptor::RenderOnce()
 
 void Adaptor::RequestUpdateOnce()
 {
-  if( PAUSED_WHILE_HIDDEN != mState )
+  if( mThreadController )
   {
-    if( mThreadController )
-    {
-      mThreadController->RequestUpdateOnce();
-    }
+    mThreadController->RequestUpdateOnce();
   }
 }
 
@@ -840,8 +858,8 @@ void Adaptor::SetRootLayoutDirection( std::string locale )
 {
   Dali::Stage stage = Dali::Stage::GetCurrent();
 
-  stage.GetRootLayer().SetProperty( DevelActor::Property::LAYOUT_DIRECTION,
-                                    static_cast< DevelActor::LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
+  stage.GetRootLayer().SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION,
+                                    static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
 }
 
 } // namespace Adaptor
index 3ace87b..31c577b 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali/public-api/common/view-mode.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/signals/callback.h>
+#include <dali/public-api/math/uint-16-pair.h>
 #include <dali/integration-api/render-controller.h>
 
 // INTERNAL INCLUDES
@@ -90,6 +91,8 @@ public:
 
   typedef Dali::Adaptor::AdaptorSignalType AdaptorSignalType;
 
+  typedef Uint16Pair SurfaceSize;          ///< Surface size type
+
   /**
    * Creates a New Adaptor
    * @param[in]  nativeWindow        Native window handle
@@ -208,7 +211,7 @@ public: // AdaptorInternalServices implementation
   /**
    * @copydoc Dali::Adaptor::AddIdle()
    */
-  virtual bool AddIdle( CallbackBase* callback );
+  virtual bool AddIdle( CallbackBase* callback, bool forceAdd );
 
   /**
    * @copydoc Dali::Adaptor::RemoveIdle()
@@ -338,12 +341,12 @@ public:
   /**
    * Informs core the surface size has changed
    */
-  void SurfaceResizePrepare( Dali::Adaptor::SurfaceSize surfaceSize );
+  void SurfaceResizePrepare( SurfaceSize surfaceSize );
 
   /**
    * Informs ThreadController the surface size has changed
    */
-  void SurfaceResizeComplete( Dali::Adaptor::SurfaceSize surfaceSize );
+  void SurfaceResizeComplete( SurfaceSize surfaceSize );
 
   /**
    * Sets layout direction of root by system language
@@ -468,15 +471,14 @@ private: // From Dali::Internal::Adaptor::CoreEventInterface
 private: // From Dali::Integration::RenderController
 
   /**
-   * Called by the Dali core when it requires another update
+   * @copydoc Dali::Integration::RenderController::RequestUpdate()
    */
-  virtual void RequestUpdate();
+  virtual void RequestUpdate( bool forceUpdate );
 
   /**
-   * Called by Dali core when it requires an notification event being sent on idle.
-   * Multi-threading note: this method must be called from the main thread only.
+   * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle()
    */
-  virtual void RequestProcessEventsOnIdle();
+  virtual void RequestProcessEventsOnIdle( bool forceProcess );
 
 private: // From Dali::Internal::Adaptor::WindowVisibilityObserver
 
@@ -574,7 +576,7 @@ private: // Data
 
   Any                                   mNativeWindow;                ///< window identifier
   RenderSurface*                        mSurface;                     ///< Current surface
-  TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction;         ///< Platform abstraction
+  TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction;      ///< Platform abstraction
 
   EventHandler*                         mEventHandler;                ///< event handler
   CallbackManager*                      mCallbackManager;             ///< Used to install callbacks
index 78c33ab..c6cc3fa 100644 (file)
@@ -81,7 +81,7 @@ void Adaptor::Stop()
 
 bool Adaptor::AddIdle( CallbackBase* callback )
 {
-  return mImpl->AddIdle( callback );
+  return mImpl->AddIdle( callback, false );
 }
 
 void Adaptor::RemoveIdle( CallbackBase* callback )
index 5e73d5e..d7bf4f1 100644 (file)
@@ -146,6 +146,12 @@ void Application::CreateWindow()
   const std::string& windowClassName = mEnvironmentOptions.GetWindowClassName();
   mWindow = Dali::Window::New( mWindowPositionSize, mName, windowClassName, mWindowMode == Dali::Application::TRANSPARENT );
 
+  int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
+  if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
+  {
+    GetImplementation( mWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
+  }
+
   // Quit the application when the window is closed
   GetImplementation( mWindow ).DeleteRequestSignal().Connect( mSlotDelegate, &Application::Quit );
 }
@@ -339,18 +345,21 @@ void Application::OnRegionChanged()
   mRegionChangedSignal.Emit( application );
 }
 
-void Application::OnBatteryLow()
+void Application::OnBatteryLow( Dali::DeviceStatus::Battery::Status status )
 {
   Dali::Application application(this);
   mBatteryLowSignal.Emit( application );
+
+  mLowBatterySignal.Emit( status );
 }
 
-void Application::OnMemoryLow()
+void Application::OnMemoryLow( Dali::DeviceStatus::Memory::Status status )
 {
   Dali::Application application(this);
   mMemoryLowSignal.Emit( application );
-}
 
+  mLowMemorySignal.Emit( status );
+}
 void Application::OnResize(Dali::Adaptor& adaptor)
 {
   Dali::Application application(this);
@@ -362,6 +371,16 @@ bool Application::AddIdle( CallbackBase* callback )
   return mAdaptor->AddIdle( callback );
 }
 
+std::string Application::GetRegion() const
+{
+  return mFramework->GetRegion();
+}
+
+std::string Application::GetLanguage() const
+{
+  return mFramework->GetLanguage();
+}
+
 Dali::Adaptor& Application::GetAdaptor()
 {
   return *mAdaptor;
@@ -400,7 +419,13 @@ void Application::ReplaceWindow( const PositionSize& positionSize, const std::st
   Dali::Window newWindow = Dali::Window::New( positionSize, name, mWindowMode == Dali::Application::TRANSPARENT );
   Window& windowImpl = GetImplementation(newWindow);
   windowImpl.SetAdaptor(*mAdaptor);
-  newWindow.ShowIndicator(Dali::Window::INVISIBLE);
+
+  int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
+  if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
+  {
+    GetImplementation( newWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
+  }
+
   Dali::RenderSurface* renderSurface = windowImpl.GetSurface();
 
   Any nativeWindow = newWindow.GetNativeHandle();
index 621facc..8f6e4f8 100644 (file)
@@ -71,6 +71,8 @@ class Application : public BaseObject, public Framework::Observer
 {
 public:
 
+  typedef Dali::Application::LowBatterySignalType LowBatterySignalType;
+  typedef Dali::Application::LowMemorySignalType LowMemorySignalType;
   typedef Dali::Application::AppSignalType AppSignalType;
   typedef Dali::Application::AppControlSignalType AppControlSignalType;
   typedef Dali::Application::WINDOW_MODE WINDOW_MODE;
@@ -125,6 +127,16 @@ public:
   Dali::Window GetWindow();
 
   /**
+   * @copydoc Dali::Application::GetRegion();
+   */
+  std::string GetRegion() const;
+
+  /**
+   * @copydoc Dali::Application::GetLanguage();
+   */
+  std::string GetLanguage() const;
+
+  /**
    * @copydoc Dali::Application::ReplaceWindow();
    */
   void ReplaceWindow( const PositionSize& positionSize, const std::string& name);
@@ -241,12 +253,12 @@ public: // From Framework::Observer
   /**
   * Called when the framework informs the application that the battery level of the device is low.
   */
-  virtual void OnBatteryLow();
+  virtual void OnBatteryLow( Dali::DeviceStatus::Battery::Status status );
 
   /**
   * Called when the framework informs the application that the memory level of the device is low.
   */
-  virtual void OnMemoryLow();
+  virtual void OnMemoryLow( Dali::DeviceStatus::Memory::Status status );
 
 public:
 
@@ -320,6 +332,16 @@ public:  // Signals
   */
   Dali::Application::AppSignalType& MemoryLowSignal() { return mMemoryLowSignal; }
 
+  /**
+  * @copydoc Dali::Application::LowBatterySignal()
+  */
+  Dali::Application::LowBatterySignalType& LowBatterySignal() { return mLowBatterySignal; }
+
+  /**
+  * @copydoc Dali::Application:::LowMemorySignal()
+  */
+  Dali::Application::LowMemorySignalType& LowMemorySignal() { return mLowMemorySignal; }
+
 protected:
 
   /**
@@ -360,17 +382,19 @@ protected:
 
 private:
 
-  AppSignalType                           mInitSignal;
-  AppSignalType                           mTerminateSignal;
-  AppSignalType                           mPauseSignal;
-  AppSignalType                           mResumeSignal;
-  AppSignalType                           mResetSignal;
-  AppSignalType                           mResizeSignal;
-  AppControlSignalType                    mAppControlSignal;
-  AppSignalType                           mLanguageChangedSignal;
-  AppSignalType                           mRegionChangedSignal;
-  AppSignalType                           mBatteryLowSignal;
-  AppSignalType                           mMemoryLowSignal;
+  AppSignalType                         mInitSignal;
+  AppSignalType                         mTerminateSignal;
+  AppSignalType                         mPauseSignal;
+  AppSignalType                         mResumeSignal;
+  AppSignalType                         mResetSignal;
+  AppSignalType                         mResizeSignal;
+  AppControlSignalType                  mAppControlSignal;
+  AppSignalType                         mLanguageChangedSignal;
+  AppSignalType                         mRegionChangedSignal;
+  AppSignalType                         mBatteryLowSignal;
+  AppSignalType                         mMemoryLowSignal;
+  LowBatterySignalType                  mLowBatterySignal;
+  LowMemorySignalType                   mLowMemorySignal;
 
   EventLoop*                            mEventLoop;
   Framework*                            mFramework;
index 681ca16..a05b13f 100644 (file)
 // CLASS HEADER
 #include "timer-impl.h"
 
+// INTERNAL INCLUDES
+#include <adaptor-impl.h>
+
 // EXTERNAL INCLUDES
+#include <dali/public-api/common/dali-common.h>
+
 // Ecore is littered with C style cast
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wold-style-cast"
@@ -74,14 +79,15 @@ Timer::Timer( unsigned int milliSec )
 
 Timer::~Timer()
 {
-  // stop timers
-  Stop();
-
+  ResetTimerData();
   delete mImpl;
 }
 
 void Timer::Start()
 {
+  // Timer should be used in the event thread
+  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
+
   if(mImpl->mId != NULL)
   {
     Stop();
@@ -91,11 +97,10 @@ void Timer::Start()
 
 void Timer::Stop()
 {
-  if (mImpl->mId != NULL)
-  {
-    ecore_timer_del(mImpl->mId);
-    mImpl->mId = NULL;
-  }
+  // Timer should be used in the event thread
+  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
+
+  ResetTimerData();
 }
 
 void Timer::SetInterval( unsigned int interval )
@@ -148,6 +153,15 @@ Dali::Timer::TimerSignalType& Timer::TickSignal()
   return mTickSignal;
 }
 
+void Timer::ResetTimerData()
+{
+  if (mImpl->mId != NULL)
+  {
+    ecore_timer_del(mImpl->mId);
+    mImpl->mId = NULL;
+  }
+}
+
 bool Timer::IsRunning() const
 {
   return mImpl->mId != NULL;
index 6037d57..6b5965a 100644 (file)
@@ -27,6 +27,7 @@
 
 // INTERNAL INCLUDES
 #include <abort-handler.h>
+#include <device-status.h>
 
 namespace Dali
 {
@@ -48,6 +49,7 @@ namespace Adaptor
 class Framework
 {
 public:
+
   enum Type
   {
     NORMAL,       ///<  normal appFramework
@@ -122,12 +124,12 @@ public:
     /**
     * Invoked when the battery level of the device is low.
     */
-    virtual void OnBatteryLow() {}
+    virtual void OnBatteryLow( Dali::DeviceStatus::Battery::Status status ) {}
 
     /**
     * Invoked when the memory level of the device is low.
     */
-    virtual void OnMemoryLow() {}
+    virtual void OnMemoryLow( Dali::DeviceStatus::Memory::Status status ) {}
   };
 
 public:
@@ -187,6 +189,26 @@ public:
    */
   static std::string GetResourcePath();
 
+  /**
+   * Sets system language.
+   */
+  void SetLanguage( const std::string& language );
+
+  /**
+   * Sets system region.
+   */
+  void SetRegion( const std::string& region );
+
+  /**
+   * Gets system language.
+   */
+  std::string GetLanguage() const;
+
+  /**
+   * Gets system region.
+   */
+  std::string GetRegion() const;
+
 private:
 
   // Undefined
index f9cf846..b30621d 100644 (file)
@@ -30,16 +30,12 @@ namespace Internal
 namespace Adaptor
 {
 
-EglFactory::EglFactory( unsigned int multiSamplingLevel )
+EglFactory::EglFactory( int multiSamplingLevel )
 : mEglImplementation(NULL),
   mEglImageExtensions(NULL),
   mEglSync(new EglSyncImplementation), // Created early, as needed by Core constructor
-  mMultiSamplingLevel( 4 )
+  mMultiSamplingLevel( multiSamplingLevel )
 {
-  if( multiSamplingLevel > 0 )
-  {
-    mMultiSamplingLevel = multiSamplingLevel;
-  }
 }
 
 EglFactory::~EglFactory()
index 5b449a1..872f39f 100644 (file)
@@ -39,7 +39,7 @@ public:
   /**
    * Constructor
    */
-  EglFactory( unsigned int multiSamplingLevel );
+  EglFactory( int multiSamplingLevel );
 
   /**
    * Destructor
@@ -84,7 +84,7 @@ private:
   EglImageExtensions* mEglImageExtensions;
   EglSyncImplementation* mEglSync;
 
-  unsigned int mMultiSamplingLevel;
+  int mMultiSamplingLevel;
 };
 
 }
index b55470b..7ca4366 100644 (file)
@@ -52,7 +52,7 @@ namespace Adaptor
   } \
 }
 
-EglImplementation::EglImplementation( unsigned int multiSamplingLevel )
+EglImplementation::EglImplementation( int multiSamplingLevel )
   : mEglNativeDisplay(0),
     mEglNativeWindow(0),
     mCurrentEglNativePixmap(0),
@@ -334,10 +334,13 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   configAttribs.PushBack( EGL_STENCIL_SIZE );
   configAttribs.PushBack( 8 );
 #ifndef DALI_PROFILE_UBUNTU
-  configAttribs.PushBack( EGL_SAMPLES );
-  configAttribs.PushBack( mMultiSamplingLevel );
-  configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
-  configAttribs.PushBack( 1 );
+  if( mMultiSamplingLevel != EGL_DONT_CARE )
+  {
+    configAttribs.PushBack( EGL_SAMPLES );
+    configAttribs.PushBack( mMultiSamplingLevel );
+    configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
+    configAttribs.PushBack( 1 );
+  }
 #endif // DALI_PROFILE_UBUNTU
   configAttribs.PushBack( EGL_NONE );
 
index 003af2b..4081ed3 100644 (file)
@@ -44,7 +44,7 @@ public:
    * Constructor
    * @param environmentOptions To check the envirionment options
    */
-  EglImplementation( unsigned int multiSamplingLevel );
+  EglImplementation( int multiSamplingLevel );
 
   /**
    * Destructor
@@ -195,7 +195,7 @@ private:
   bool                 mIsWindow;
   ColorDepth           mColorDepth;
 
-  unsigned int         mMultiSamplingLevel;
+  int                  mMultiSamplingLevel;
 };
 
 } // namespace Adaptor
index 452367e..36a08cc 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -1509,9 +1509,9 @@ public:
   void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
   {
 #if DALI_GLES_VERSION >= 30
-    // if OpenGL ES 2.0 compatibility is need this can be implemented with
-    // glDiscardFramebufferEXT
     glInvalidateFramebuffer(target,numAttachments,attachments);
+#else
+    mGlExtensions.DiscardFrameBuffer(target, numAttachments, attachments);
 #endif // DALI_GLES_VERSION >= 30
   }
 
index 1de5382..24ea4bc 100644 (file)
@@ -25,6 +25,7 @@
 // INTERNAL INCLUDES
 #include "pixel-manipulation.h"
 #include "alpha-mask.h"
+#include "gaussian-blur.h"
 #include <platform-abstractions/portable/image-operations.h>
 
 namespace Dali
@@ -309,6 +310,22 @@ PixelBufferPtr PixelBuffer::NewResize( const PixelBuffer& inBuffer, ImageDimensi
   return outBuffer;
 }
 
+void PixelBuffer::ApplyGaussianBlur( const float blurRadius )
+{
+  // This method only works for pixel buffer in RGBA format.
+  if( mWidth > 0 && mHeight > 0 && mPixelFormat == Pixel::RGBA8888 )
+  {
+    if ( blurRadius > Math::MACHINE_EPSILON_1 )
+    {
+      PerformGaussianBlurRGBA( *this, blurRadius );
+    }
+  }
+  else
+  {
+    DALI_LOG_ERROR( "Trying to apply gaussian blur to an empty pixel buffer or a pixel buffer not in RGBA format" );
+  }
+}
+
 }// namespace Adaptor
 }// namespace Internal
 }// namespace Dali
index ec7ee2b..3484416 100644 (file)
@@ -150,6 +150,13 @@ public:
    */
   void ApplyMask( const PixelBuffer& mask, float contentScale, bool cropToMask );
 
+  /**
+   * Apply a Gaussian blur to the current buffer with the given radius.
+   *
+   * @param[in] blurRadius The radius for Gaussian blur
+   */
+  void ApplyGaussianBlur( const float blurRadius );
+
 private:
   /*
    * Undefined copy constructor.
index e8bc456..b5b105b 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_TIMER_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -99,6 +99,11 @@ private: // Implementation
   Timer( const Timer& );
   Timer& operator=( const Timer& );
 
+  /**
+   * Resets any stored timer data.
+   */
+  void ResetTimerData();
+
 private: // Data
 
   Dali::Timer::TimerSignalType mTickSignal;
index feab793..7a66095 100644 (file)
@@ -133,7 +133,7 @@ std::string VideoPlayer::GetUrl()
     return mPlugin->GetUrl();
   }
 
-  return std::string( NULL );
+  return std::string();
 }
 
 void VideoPlayer::SetLooping(bool looping)
@@ -289,6 +289,16 @@ void VideoPlayer::Backward( int millisecond )
   }
 }
 
+bool VideoPlayer::IsVideoTextureSupported() const
+{
+  if( mPlugin != NULL )
+  {
+    return mPlugin->IsVideoTextureSupported();
+  }
+
+  return false;
+}
+
 } // namespace Adaptor;
 } // namespace Internal;
 } // namespace Dali;
index e37b5f6..eaaa2fb 100644 (file)
@@ -159,6 +159,11 @@ public:
    */
   void Backward( int millisecond );
 
+  /**
+   * @brief Dali::VideoPlayer::IsVideoTextureSupported()
+   */
+  bool IsVideoTextureSupported() const;
+
 private:
 
   /**
index b0bc55b..b5d74d2 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_VIRTUAL_KEYBOARD_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -94,12 +94,12 @@ Dali::VirtualKeyboard::StatusSignalType& StatusChangedSignal();
 /**
  * @copydox Dali::VirtualKeyboard::ResizedSignal()
  */
-Dali::VirtualKeyboard::VoidSignalType& ResizedSignal();
+Dali::VirtualKeyboard::KeyboardResizedSignalType& ResizedSignal();
 
 /**
  * @copydox Dali::VirtualKeyboard::LanguageChangedSignal()
  */
-Dali::VirtualKeyboard::VoidSignalType& LanguageChangedSignal();
+Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal();
 
 /**
  * @copydoc Dali::VirtualKeyboard::GetTextDirection
index 4207cae..0f95871 100644 (file)
@@ -30,7 +30,6 @@
 #include <orientation.h>
 #include <render-surface.h>
 #include <drag-and-drop-detector.h>
-#include <window-devel.h>
 
 namespace Dali
 {
@@ -59,8 +58,8 @@ class Window : public Dali::BaseObject, public IndicatorInterface::Observer, pub
 {
 public:
   typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
-  typedef Dali::DevelWindow::FocusSignalType FocusSignalType;
-  typedef Dali::DevelWindow::ResizedSignalType ResizedSignalType;
+  typedef Dali::Window::FocusSignalType FocusSignalType;
+  typedef Dali::Window::ResizedSignalType ResizedSignalType;
   typedef Signal< void () > SignalType;
 
   /**
@@ -161,142 +160,142 @@ public:
   Dali::Any GetNativeHandle() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetAcceptFocus()
+   * @copydoc Dali::Window::SetAcceptFocus()
    */
   void SetAcceptFocus( bool accept );
 
   /**
-   * @copydoc Dali::DevelWindow::IsFocusAcceptable()
+   * @copydoc Dali::Window::IsFocusAcceptable()
    */
-  bool IsFocusAcceptable();
+  bool IsFocusAcceptable() const;
 
   /**
-   * @copydoc Dali::DevelWindow::Show()
+   * @copydoc Dali::Window::Show()
    */
   void Show();
 
   /**
-   * @copydoc Dali::DevelWindow::Hide()
+   * @copydoc Dali::Window::Hide()
    */
   void Hide();
 
   /**
-   * @copydoc Dali::DevelWindow::IsVisible() const
+   * @copydoc Dali::Window::IsVisible() const
    */
   bool IsVisible() const;
 
   /**
-   * @copydoc Dali::DevelWindow::GetSupportedAuxiliaryHintCount()
+   * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
    */
-   unsigned int GetSupportedAuxiliaryHintCount();
+   unsigned int GetSupportedAuxiliaryHintCount() const;
 
    /**
-    * @copydoc Dali::DevelWindow::GetSupportedAuxiliaryHint()
+    * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
     */
-  std::string GetSupportedAuxiliaryHint( unsigned int index );
+  std::string GetSupportedAuxiliaryHint( unsigned int index ) const;
 
   /**
-   * @copydoc Dali::DevelWindow::AddAuxiliaryHint()
+   * @copydoc Dali::Window::AddAuxiliaryHint()
    */
   unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value );
 
   /**
-   * @copydoc Dali::DevelWindow::RemoveAuxiliaryHint()
+   * @copydoc Dali::Window::RemoveAuxiliaryHint()
    */
   bool RemoveAuxiliaryHint( unsigned int id );
 
   /**
-   * @copydoc Dali::DevelWindow::SetAuxiliaryHintValue()
+   * @copydoc Dali::Window::SetAuxiliaryHintValue()
    */
   bool SetAuxiliaryHintValue( unsigned int id, const std::string& value );
 
   /**
-   * @copydoc Dali::DevelWindow::GetAuxiliaryHintValue()
+   * @copydoc Dali::Window::GetAuxiliaryHintValue()
    */
   std::string GetAuxiliaryHintValue( unsigned int id ) const;
 
   /**
-   * @copydoc Dali::DevelWindow::GetAuxiliaryHintId()
+   * @copydoc Dali::Window::GetAuxiliaryHintId()
    */
   unsigned int GetAuxiliaryHintId( const std::string& hint ) const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetInputRegion()
+   * @copydoc Dali::Window::SetInputRegion()
    */
   void SetInputRegion( const Rect< int >& inputRegion );
 
   /**
-   * @copydoc Dali::DevelWindow::SetType()
+   * @copydoc Dali::Window::SetType()
    */
-  void SetType( Dali::DevelWindow::Type type );
+  void SetType( Dali::Window::Type type );
 
   /**
-   * @copydoc Dali::DevelWindow::GetType() const
+   * @copydoc Dali::Window::GetType() const
    */
-  Dali::DevelWindow::Type GetType() const;
+  Dali::Window::Type GetType() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetNotificationLevel()
+   * @copydoc Dali::Window::SetNotificationLevel()
    */
-  bool SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level );
+  bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level );
 
   /**
-   * @copydoc Dali::DevelWindow::GetNotificationLevel()
+   * @copydoc Dali::Window::GetNotificationLevel()
    */
-  Dali::DevelWindow::NotificationLevel::Type GetNotificationLevel();
+  Dali::Window::NotificationLevel::Type GetNotificationLevel() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetOpaqueState()
+   * @copydoc Dali::Window::SetOpaqueState()
    */
   void SetOpaqueState( bool opaque );
 
   /**
-   * @copydoc Dali::DevelWindow::IsOpaqueState()
+   * @copydoc Dali::Window::IsOpaqueState()
    */
-  bool IsOpaqueState();
+  bool IsOpaqueState() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetScreenMode()
+   * @copydoc Dali::Window::SetScreenOffMode()
    */
-  bool SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode );
+  bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode);
 
   /**
-   * @copydoc Dali::DevelWindow::GetScreenMode()
+   * @copydoc Dali::Window::GetScreenOffMode()
    */
-  Dali::DevelWindow::ScreenMode::Type GetScreenMode();
+  Dali::Window::ScreenOffMode::Type GetScreenOffMode() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetBrightness()
+   * @copydoc Dali::Window::SetBrightness()
    */
   bool SetBrightness( int brightness );
 
   /**
-   * @copydoc Dali::DevelWindow::GetBrightness()
+   * @copydoc Dali::Window::GetBrightness()
    */
-  int GetBrightness();
+  int GetBrightness() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetSize()
+   * @copydoc Dali::Window::SetSize()
    */
-  void SetSize( Dali::DevelWindow::WindowSize size );
+  void SetSize( Dali::Window::WindowSize size );
 
   /**
-   * @copydoc Dali::DevelWindow::GetSize()
+   * @copydoc Dali::Window::GetSize()
    */
-  Dali::DevelWindow::WindowSize GetSize();
+  Dali::Window::WindowSize GetSize() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetPosition()
+   * @copydoc Dali::Window::SetPosition()
    */
-  void SetPosition( Dali::DevelWindow::WindowPosition position );
+  void SetPosition( Dali::Window::WindowPosition position );
 
   /**
-   * @copydoc Dali::DevelWindow::GetPosition()
+   * @copydoc Dali::Window::GetPosition()
    */
-  Dali::DevelWindow::WindowPosition GetPosition();
+  Dali::Window::WindowPosition GetPosition() const;
 
   /**
-   * @copydoc Dali::DevelWindow::SetTransparency()
+   * @copydoc Dali::Window::SetTransparency()
    */
   void SetTransparency( bool transparent );
 
@@ -305,6 +304,11 @@ public:
    */
   void RotationDone( int orientation, int width, int height );
 
+  /**
+   * Set the indicator visible mode
+   */
+  void SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode );
+
 private:
   /**
    * Private constructor.
@@ -396,12 +400,12 @@ public: // Signals
   IndicatorSignalType& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignal; }
 
   /**
-   * @copydoc Dali::DevelWindow::FocusChangedSignal()
+   * @copydoc Dali::Window::FocusChangedSignal()
    */
   FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
 
   /**
-   * @copydoc Dali::DevelWindow::ResizedSignal()
+   * @copydoc Dali::Window::ResizedSignal()
    */
   ResizedSignalType& ResizedSignal() { return mResizedSignal; }
 
@@ -424,6 +428,7 @@ private:
   bool                             mEcoreEventHander:1;
   bool                             mIsFocusAcceptable:1;
   bool                             mVisible:1;
+  bool                             mIconified:1;
   bool                             mOpaqueState:1;
   bool                             mResizeEnabled:1;
   IndicatorInterface*              mIndicator;
@@ -433,7 +438,7 @@ private:
   Integration::SystemOverlay*      mOverlay;
   Adaptor*                         mAdaptor;
   Dali::DragAndDropDetector        mDragAndDropDetector;
-  Dali::DevelWindow::Type          mType;
+  Dali::Window::Type          mType;
 
   struct EventHandler;
   EventHandler*                    mEventHandler;
index 51b379c..8d8cdac 100644 (file)
@@ -17,7 +17,6 @@
 
 // INTERNAL INCLUDES
 #include <adaptors/devel-api/adaptor-framework/application-devel.h>
-#include <adaptors/devel-api/adaptor-framework/window-devel.h>
 #include <adaptors/common/application-impl.h>
 
 namespace Dali
@@ -26,30 +25,6 @@ namespace Dali
 namespace DevelApplication
 {
 
-Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize )
-{
-  Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
-  if( internal )
-  {
-    if( argc && ( *argc > 0 ) )
-    {
-      internal->GetWindow().SetClass( (*argv)[0], "" );
-    }
-    internal->SetStyleSheet( stylesheet );
-
-    DevelWindow::SetTransparency( internal->GetWindow(), ( windowMode == Application::OPAQUE ? false : true ) );
-    DevelWindow::SetSize( internal->GetWindow(), DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
-    DevelWindow::SetPosition( internal->GetWindow(), DevelWindow::WindowPosition( positionSize.x, positionSize.y ) );
-
-    return Application( internal.Get() );
-  }
-  else
-  {
-    internal = Internal::Adaptor::Application::New( argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL );
-    return Application( internal.Get() );
-  }
-}
-
 void PreInitialize( int* argc, char** argv[] )
 {
   Internal::Adaptor::Application::PreInitialize( argc, argv );
index d29c487..12f5256 100644 (file)
@@ -30,22 +30,6 @@ namespace Dali
 
 namespace DevelApplication
 {
-
-/**
- * @brief This is the constructor for applications.
- *
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_DISPLAY
- * @param[in,out]  argc         A pointer to the number of arguments
- * @param[in,out]  argv         A pointer to the argument list
- * @param[in]      stylesheet   The path to user defined theme file
- * @param[in]      windowMode   A member of WINDOW_MODE
- * @param[in]      positionSize A position and a size of the window
- * @return A handle to the Application
- * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
- */
-DALI_IMPORT_API Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize );
-
 /**
  * @brief This is used to improve application launch performance.
  * It preloads so files, initializes some functions in advance and makes a window in advance.
index a9476e3..cce5f3a 100644 (file)
@@ -104,7 +104,7 @@ void SetMaxTextureSize( unsigned int size );
  *
  * @return The maximum texture size
  */
-unsigned int GetMaxTextureSize();
+DALI_IMPORT_API unsigned int GetMaxTextureSize();
 
 } // Dali
 
index b1498d2..9f305ac 100644 (file)
@@ -108,14 +108,14 @@ void ImfManager::ApplyOptions( const InputMethodOptions& options )
   Internal::Adaptor::ImfManager::GetImplementation(*this).ApplyOptions( options );
 }
 
-void ImfManager::SetInputPanelUserData( const std::string& data )
+void ImfManager::SetInputPanelData( const std::string& data )
 {
-  Internal::Adaptor::ImfManager::GetImplementation(*this).SetInputPanelUserData( data );
+  Internal::Adaptor::ImfManager::GetImplementation(*this).SetInputPanelData( data );
 }
 
-void ImfManager::GetInputPanelUserData( std::string& data )
+void ImfManager::GetInputPanelData( std::string& data )
 {
-  Internal::Adaptor::ImfManager::GetImplementation(*this).GetInputPanelUserData( data );
+  Internal::Adaptor::ImfManager::GetImplementation(*this).GetInputPanelData( data );
 }
 
 Dali::ImfManager::State ImfManager::GetInputPanelState()
@@ -168,12 +168,12 @@ ImfManager::StatusSignalType& ImfManager::StatusChangedSignal()
   return Internal::Adaptor::ImfManager::GetImplementation(*this).StatusChangedSignal();
 }
 
-ImfManager::VoidSignalType& ImfManager::ResizedSignal()
+ImfManager::KeyboardResizedSignalType& ImfManager::ResizedSignal()
 {
   return Internal::Adaptor::ImfManager::GetImplementation(*this).ResizedSignal();
 }
 
-ImfManager::VoidSignalType& ImfManager::LanguageChangedSignal()
+ImfManager::LanguageChangedSignalType& ImfManager::LanguageChangedSignal()
 {
   return Internal::Adaptor::ImfManager::GetImplementation(*this).LanguageChangedSignal();
 }
index c8f20b7..a14380c 100644 (file)
@@ -164,8 +164,10 @@ public:
   typedef Signal< void (ImfManager&) > ImfManagerSignalType; ///< Keyboard actived signal
   typedef Signal< ImfCallbackData ( ImfManager&, const ImfEventData& ) > ImfEventSignalType; ///< keyboard events
   typedef Signal< void () > VoidSignalType;
-  typedef Signal< void (bool) > StatusSignalType;
-  typedef Signal< void (KeyboardType) > KeyboardTypeSignalType; ///< keyboard type
+  typedef Signal< void ( bool ) > StatusSignalType;
+  typedef Signal< void ( KeyboardType ) > KeyboardTypeSignalType; ///< keyboard type
+  typedef Signal< void ( int ) > KeyboardResizedSignalType;  ///< Keyboard resized signal
+  typedef Signal< void ( int ) > LanguageChangedSignalType;  ///< Language changed signal
 
 public:
 
@@ -279,13 +281,17 @@ public:
    * @brief Sets up the input-panel specific data.
    * @param[in] data The specific data to be set to the input panel
    */
-  void SetInputPanelUserData( const std::string& data );
+  void SetInputPanelData( const std::string& data );
 
   /**
    * @brief Gets the specific data of the current active input panel.
+   *
+   * Input Panel Data is not always the data which is set by SetInputPanelData().
+   * Data can be changed internally in the input panel.
+   * It is just used to get a specific data from the input panel to an application.
    * @param[in] data The specific data to be got from the input panel
    */
-  void GetInputPanelUserData( std::string& data );
+  void GetInputPanelData( std::string& data );
 
   /**
    * @brief Gets the state of the current active input panel.
@@ -369,24 +375,28 @@ public:
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName();
+   *   void YourCallbackName( int resolvedResize );
    * @endcode
+   * The parameter sends the resolved resize defined by the IMF.
+   *
    * User can get changed size by using GetInputMethodArea() in the callback
    * @return The signal to connect to.
    */
-  VoidSignalType& ResizedSignal();
+  KeyboardResizedSignalType& ResizedSignal();
 
   /**
    * @brief Connect to this signal to be notified when the virtual keyboard's language is changed.
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName();
+   *   void YourCallbackName( int resolvedLanguage );
    * @endcode
+   * The parameter sends the resolved language defined by the IMF.
+   *
    * User can get the text direction of the language by calling GetTextDirection() in the callback.
    * @return The signal to connect to.
    */
-  VoidSignalType& LanguageChangedSignal();
+  LanguageChangedSignalType& LanguageChangedSignal();
 
   /**
    * @brief Connect to this signal to be notified when the keyboard type is changed.
index 0b366d0..b767d49 100644 (file)
@@ -101,6 +101,11 @@ void PixelBuffer::ApplyMask( PixelBuffer mask, float contentScale, bool cropToMa
   GetImplementation(*this).ApplyMask( GetImplementation( mask ), contentScale, cropToMask );
 }
 
+void PixelBuffer::ApplyGaussianBlur( const float blurRadius )
+{
+  GetImplementation(*this).ApplyGaussianBlur( blurRadius );
+}
+
 } // namespace Devel
 
 } // namespace Dali
index 91c7161..dfe228b 100644 (file)
@@ -170,6 +170,15 @@ public:
    */
   void ApplyMask( PixelBuffer mask, float contentScale=1.0f, bool cropToMask=false );
 
+  /**
+   * Apply a Gaussian blur to this pixel data with the given radius.
+   *
+   * @note A bigger radius will yield a blurrier image. Only works for pixel data in RGBA format.
+   *
+   * @param[in] blurRadius The radius for Gaussian blur. A value of 0 or negative value indicates no blur.
+   */
+  void ApplyGaussianBlur( const float blurRadius );
+
 public:
 
   /**
index 4bbcc04..f1c309b 100644 (file)
@@ -211,6 +211,12 @@ public:
    */
   virtual void Backward( int millisecond ) = 0;
 
+  /**
+   * @brief Checks whether the video texture is supported
+   * @return True if supported, otherwise false.
+   */
+  virtual bool IsVideoTextureSupported() const = 0;
+
 };
 
 } // namespace Dali;
index fb4b2a2..281ae39 100644 (file)
@@ -171,5 +171,10 @@ void VideoPlayer::Backward( int millisecond )
   GetImplementation( *this ).Backward( millisecond );
 }
 
+bool VideoPlayer::IsVideoTextureSupported() const
+{
+  return GetImplementation( *this ).IsVideoTextureSupported();
+}
+
 } // namespace Dali;
 
index 8c69719..f548ab1 100644 (file)
@@ -241,6 +241,12 @@ public:
    */
   void Backward( int millisecond );
 
+  /**
+   * @brief Checks whether the video texture is supported
+   * @return True if supported, otherwise false.
+   */
+  bool IsVideoTextureSupported() const;
+
 private: // Not intended for application developers
 
   /**
index f79d442..905a734 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -82,12 +82,12 @@ StatusSignalType& StatusChangedSignal()
   return Internal::Adaptor::VirtualKeyboard::StatusChangedSignal();
 }
 
-VoidSignalType& ResizedSignal()
+KeyboardResizedSignalType& ResizedSignal()
 {
   return Internal::Adaptor::VirtualKeyboard::ResizedSignal();
 }
 
-VoidSignalType& LanguageChangedSignal()
+LanguageChangedSignalType& LanguageChangedSignal()
 {
   return Internal::Adaptor::VirtualKeyboard::LanguageChangedSignal();
 }
index f0e0a94..cb87cf4 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_VIRTUAL_KEYBOARD_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -45,7 +45,9 @@ namespace VirtualKeyboard
 // Types
 
 typedef Signal< void () > VoidSignalType;
-typedef Signal< void (bool) > StatusSignalType;
+typedef Signal< void ( bool ) > StatusSignalType;
+typedef Signal< void ( int ) > KeyboardResizedSignalType;
+typedef Signal< void ( int ) > LanguageChangedSignalType;
 
 // Enumerations
 
@@ -168,24 +170,28 @@ DALI_IMPORT_API StatusSignalType& StatusChangedSignal();
  *
  * A callback of the following type may be connected:
  * @code
- *   void YourCallbackName();
+ *   void YourCallbackName( int resolvedResize );
  * @endcode
+ * The parameter sends the resolved resize defined by the IMF.
+ *
  * User can get changed size by using GetSizeAndPosition() in the callback
  * @return The signal to connect to.
  */
-DALI_IMPORT_API VoidSignalType& ResizedSignal();
+DALI_IMPORT_API KeyboardResizedSignalType& ResizedSignal();
 
 /**
  * @brief Connect to this signal to be notified when the virtual keyboard's language is changed.
  *
  * A callback of the following type may be connected:
  * @code
- *   void YourCallbackName();
+ *   void YourCallbackName( int resolvedLanguage );
  * @endcode
+ * The parameter sends the resolved language defined by the IMF.
+ *
  * User can get the text direction of the language by calling GetTextDirection() in the callback.
  * @return The signal to connect to.
  */
-DALI_IMPORT_API VoidSignalType& LanguageChangedSignal();
+DALI_IMPORT_API LanguageChangedSignalType& LanguageChangedSignal();
 
 } // namespace VirtualKeyboard
 
diff --git a/adaptors/devel-api/adaptor-framework/window-devel.cpp b/adaptors/devel-api/adaptor-framework/window-devel.cpp
deleted file mode 100644 (file)
index 0094e61..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2017 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <adaptors/devel-api/adaptor-framework/window-devel.h>
-#include <adaptors/common/window-impl.h>
-
-namespace Dali
-{
-
-namespace DevelWindow
-{
-
-FocusSignalType& FocusChangedSignal( Window window )
-{
-  return GetImplementation( window ).FocusChangedSignal();
-}
-
-void SetAcceptFocus( Window window, bool accept )
-{
-  GetImplementation( window ).SetAcceptFocus( accept );
-}
-
-bool IsFocusAcceptable( Window window )
-{
-  return GetImplementation( window ).IsFocusAcceptable();
-}
-
-void Show( Window window )
-{
-  GetImplementation( window ).Show();
-}
-
-void Hide( Window window )
-{
-  GetImplementation( window ).Hide();
-}
-
-bool IsVisible( Window window )
-{
-  return GetImplementation( window ).IsVisible();
-}
-
-unsigned int GetSupportedAuxiliaryHintCount( Window window )
-{
-  return GetImplementation( window ).GetSupportedAuxiliaryHintCount();
-}
-
-std::string GetSupportedAuxiliaryHint( Window window, unsigned int index )
-{
-  return GetImplementation( window ).GetSupportedAuxiliaryHint( index );
-}
-
-unsigned int AddAuxiliaryHint( Window window, const std::string& hint, const std::string& value )
-{
-  return GetImplementation( window ).AddAuxiliaryHint( hint, value );
-}
-
-bool RemoveAuxiliaryHint( Window window, unsigned int id )
-{
-  return GetImplementation( window ).RemoveAuxiliaryHint( id );
-}
-
-bool SetAuxiliaryHintValue( Window window, unsigned int id, const std::string& value )
-{
-  return GetImplementation( window ).SetAuxiliaryHintValue( id, value );
-}
-
-std::string GetAuxiliaryHintValue( Window window, unsigned int id )
-{
-  return GetImplementation( window ).GetAuxiliaryHintValue( id );
-}
-
-unsigned int GetAuxiliaryHintId( Window window, const std::string& hint )
-{
-  return GetImplementation( window ).GetAuxiliaryHintId( hint );
-}
-
-void SetInputRegion( Window window, const Rect< int >& inputRegion )
-{
-  return GetImplementation( window ).SetInputRegion( inputRegion );
-}
-
-void SetType( Window window, Type type )
-{
-  GetImplementation( window ).SetType( type );
-}
-
-Type GetType( Window window )
-{
-  return GetImplementation( window ).GetType();
-}
-
-bool SetNotificationLevel( Window window, NotificationLevel::Type level )
-{
-  return GetImplementation( window ).SetNotificationLevel( level );
-}
-
-NotificationLevel::Type GetNotificationLevel( Window window )
-{
-  return GetImplementation( window ).GetNotificationLevel();
-}
-
-void SetOpaqueState( Window window, bool opaque )
-{
-  GetImplementation( window ).SetOpaqueState( opaque );
-}
-
-bool IsOpaqueState( Window window )
-{
-  return GetImplementation( window ).IsOpaqueState();
-}
-
-bool SetScreenMode( Window window, ScreenMode::Type screenMode )
-{
-  return GetImplementation( window ).SetScreenMode( screenMode );
-}
-
-ScreenMode::Type GetScreenMode( Window window )
-{
-  return GetImplementation( window ).GetScreenMode();
-}
-
-bool SetBrightness( Window window, int brightness )
-{
-  return GetImplementation( window ).SetBrightness( brightness );
-}
-
-int GetBrightness( Window window )
-{
-  return GetImplementation( window ).GetBrightness();
-}
-
-ResizedSignalType& ResizedSignal( Window window )
-{
-  return GetImplementation( window ).ResizedSignal();
-}
-
-void SetSize( Window window, WindowSize size )
-{
-  GetImplementation( window ).SetSize( size );
-}
-
-WindowSize GetSize( Window window )
-{
-  return GetImplementation( window ).GetSize();
-}
-
-void SetPosition( Window window, WindowPosition position )
-{
-  GetImplementation( window ).SetPosition( position );
-}
-
-WindowPosition GetPosition( Window window )
-{
-  return GetImplementation( window ).GetPosition();
-}
-
-void SetTransparency( Window window, bool transparent )
-{
-  GetImplementation( window ).SetTransparency( transparent );
-}
-
-} // namespace DevelWindow
-
-} // namespace Dali
diff --git a/adaptors/devel-api/adaptor-framework/window-devel.h b/adaptors/devel-api/adaptor-framework/window-devel.h
deleted file mode 100644 (file)
index 1c7c3fd..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-#ifndef DALI_WINDOW_DEVEL_H
-#define DALI_WINDOW_DEVEL_H
-
-/*
- * Copyright (c) 2017 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/math/rect.h>
-#include <dali/public-api/math/uint-16-pair.h>
-
-// INTERNAL INCLUDES
-#ifdef DALI_ADAPTOR_COMPILATION  // full path doesn't exist until adaptor is installed so we have to use relative
-#include <window.h>
-#else
-#include <dali/public-api/adaptor-framework/window.h>
-#endif
-
-namespace Dali
-{
-
-namespace DevelWindow
-{
-
-namespace NotificationLevel
-{
-
-/**
- * @brief An enum of notification window's priority level.
- */
-enum Type
-{
-  NONE    = -1,    ///< No notification level. Default level. This value makes the notification window place in the layer of the normal window.
-  BASE    = 10,    ///< Base notification level.
-  MEDIUM  = 20,    ///< Higher notification level than base.
-  HIGH    = 30,    ///< Higher notification level than medium.
-  TOP     = 40     ///< The highest notification level.
-};
-
-} // namespace NotificationLevel
-
-namespace ScreenMode
-{
-
-/**
- * @brief An enum of screen mode.
- */
-enum Type
-{
-  DEFAULT,      ///< The mode which turns the screen off after a timeout.
-  ALWAYS_ON     ///< The mode which keeps the screen turned on.
-};
-
-} // namespace ScreenMode
-
-/**
- * @brief An enum of Window types.
- */
-enum Type
-{
-  NORMAL,           ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type.
-  NOTIFICATION,     ///< A notification window, like a warning about battery life or a new E-Mail received.
-  UTILITY,          ///< A persistent utility window, like a toolbox or palette.
-  DIALOG            ///< Used for simple dialog windows.
-};
-
-typedef Uint16Pair WindowSize;          ///< Window size type
-typedef Uint16Pair WindowPosition;      ///< Window position type
-
-typedef Signal< void ( bool ) > FocusSignalType;         ///< Window focus signal type
-typedef Signal< void ( WindowSize ) > ResizedSignalType; ///< Window resized signal type
-
-/**
- * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
- *
- * A callback of the following type may be connected:
- * @code
- *   void YourCallbackName( bool focusIn );
- * @endcode
- * The parameter is true if window gains focus, otherwise false.
- *
- * @param[in] window The window to get a signal
- * @return The signal to connect to
- */
-DALI_IMPORT_API FocusSignalType& FocusChangedSignal( Window window );
-
-/**
- * @brief Sets whether window accepts focus or not.
- *
- * @param[in] window The window to accept focus
- * @param[in] accept If focus is accepted or not. Default is true.
- */
-DALI_IMPORT_API void SetAcceptFocus( Window window, bool accept );
-
-/**
- * @brief Returns whether window accepts focus or not.
- *
- * @param[in] window The window to accept focus
- * @return True if the window accept focus, false otherwise
- */
-DALI_IMPORT_API bool IsFocusAcceptable( Window window );
-
-/**
- * @brief Shows the window if it is hidden.
- * @param[in] window The window to show
- */
-DALI_IMPORT_API void Show( Window window );
-
-/**
- * @brief Hides the window if it is showing.
- * @param[in] window The window to hide
- */
-DALI_IMPORT_API void Hide( Window window );
-
-/**
- * @brief Returns whether the window is visible or not.
- * @param[in] window The window to query
- * @return True if the window is visible, false otherwise.
- */
-DALI_IMPORT_API bool IsVisible( Window window );
-
-/**
- * @brief Gets the count of supported auxiliary hints of the window.
- * @param[in] window The window to get the hint count
- * @return The number of supported auxiliary hints.
- *
- * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
- * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
- */
-DALI_IMPORT_API unsigned int GetSupportedAuxiliaryHintCount( Window window );
-
-/**
- * @brief Gets the supported auxiliary hint string of the window.
- * @param[in] window The window to get the hint
- * @param[in] index The index of the supported auxiliary hint lists
- * @return The auxiliary hint string of the index.
- *
- * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
- * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
- */
-DALI_IMPORT_API std::string GetSupportedAuxiliaryHint( Window window, unsigned int index );
-
-/**
- * @brief Creates an auxiliary hint of the window.
- * @param[in] window The window to create a hint
- * @param[in] hint The auxiliary hint string.
- * @param[in] value The value string.
- * @return The ID of created auxiliary hint, or @c 0 on failure.
- */
-DALI_IMPORT_API unsigned int AddAuxiliaryHint( Window window, const std::string& hint, const std::string& value );
-
-/**
- * @brief Removes an auxiliary hint of the window.
- * @param[in] window The window to remove a hint
- * @param[in] id The ID of the auxiliary hint.
- * @return True if no error occurred, false otherwise.
- */
-DALI_IMPORT_API bool RemoveAuxiliaryHint( Window window, unsigned int id );
-
-/**
- * @brief Changes a value of the auxiliary hint.
- * @param[in] window The window to set a value
- * @param[in] id The auxiliary hint ID.
- * @param[in] value The value string to be set.
- * @return True if no error occurred, false otherwise.
- */
-DALI_IMPORT_API bool SetAuxiliaryHintValue( Window window, unsigned int id, const std::string& value );
-
-/**
- * @brief Gets a value of the auxiliary hint.
- * @param[in] window The window to get a value
- * @param[in] id The auxiliary hint ID.
- * @return The string value of the auxiliary hint ID, or an empty string if none exists.
- */
-DALI_IMPORT_API std::string GetAuxiliaryHintValue( Window window, unsigned int id );
-
-/**
- * @brief Gets a ID of the auxiliary hint string.
- * @param[in] window The window to get an ID
- * @param[in] hint The auxiliary hint string.
- * @return The ID of the auxiliary hint string, or @c 0 if none exists.
- */
-DALI_IMPORT_API unsigned int GetAuxiliaryHintId( Window window, const std::string& hint );
-
-/**
- * @brief Sets a region to accept input events.
- * @param[in] window The window to set a region
- * @param[in] inputRegion The region to accept input events.
- */
-DALI_IMPORT_API void SetInputRegion( Window window, const Rect< int >& inputRegion );
-
-/**
- * @brief Sets a window type.
- * @param[in] window The window to set a type
- * @param[in] type The window type.
- * @remarks The default window type is NORMAL.
- */
-DALI_IMPORT_API void SetType( Window window, Type type );
-
-/**
- * @brief Gets a window type.
- * @param[in] window The window to get a type
- * @return A window type.
- */
-DALI_IMPORT_API Type GetType( Window window );
-
-/**
- * @brief Sets a priority level for the specified notification window.
- * @param[in] window The window to set a notification level
- * @param[in] level The notification window level.
- * @return True if no error occurred, false otherwise.
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_WINDOW_PRIORITY
- * @remarks This can be used for a notification type window only. The default level is NotificationLevel::NONE.
- */
-DALI_IMPORT_API bool SetNotificationLevel( Window window, NotificationLevel::Type level );
-
-/**
- * @brief Gets a priority level for the specified notification window.
- * @param[in] window The window to get a notification level
- * @return The notification window level.
- * @remarks This can be used for a notification type window only.
- */
-DALI_IMPORT_API NotificationLevel::Type GetNotificationLevel( Window window );
-
-/**
- * @brief Sets a transparent window's visual state to opaque.
- * @details If a visual state of a transparent window is opaque,
- * then the window manager could handle it as an opaque window when calculating visibility.
- * @param[in] window The window to set a state
- * @param[in] opaque Whether the window's visual state is opaque.
- * @remarks This will have no effect on an opaque window.
- * It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
- */
-DALI_IMPORT_API void SetOpaqueState( Window window, bool opaque );
-
-/**
- * @brief Returns whether a transparent window's visual state is opaque or not.
- * @param[in] window The window to get a state
- * @return True if the window's visual state is opaque, false otherwise.
- * @remarks The return value has no meaning on an opaque window.
- */
-DALI_IMPORT_API bool IsOpaqueState( Window window );
-
-/**
- * @brief Sets a window's screen mode.
- * @details This API is useful when the application needs to keep the display turned on.
- * If the application sets the screen mode to #ScreenMode::ALWAYS_ON to its window and the window is shown,
- * the window manager requests the display system to keep the display on as long as the window is shown.
- * If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
- * @param[in] window The window to set a screen mode
- * @param[in] screenMode The screen mode.
- * @return True if no error occurred, false otherwise.
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_DISPLAY
- */
-DALI_IMPORT_API bool SetScreenMode( Window window, ScreenMode::Type screenMode );
-
-/**
- * @brief Gets a screen mode of the window.
- * @param[in] window The window to get a screen mode
- * @return The screen mode.
- */
-DALI_IMPORT_API ScreenMode::Type GetScreenMode( Window window );
-
-/**
- * @brief Sets preferred brightness of the window.
- * @details This API is useful when the application needs to change the brightness of the screen when it is appeared on the screen.
- * If the brightness has been set and the window is shown, the window manager requests the display system to change the brightness to the provided value.
- * If the window is no longer shown, then the window manager requests the display system to go back to default brightness.
- * A value less than 0 results in default brightness and a value greater than 100 results in maximum brightness.
- * @param[in] window The window to set a brightness
- * @param[in] brightness The preferred brightness (0 to 100).
- * @return True if no error occurred, false otherwise.
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_DISPLAY
- */
-DALI_IMPORT_API bool SetBrightness( Window window, int brightness );
-
-/**
- * @brief Gets preffered brightness of the window.
- * @param[in] window The window to get brightness
- * @return The preffered brightness.
- */
-DALI_IMPORT_API int GetBrightness( Window window );
-
-/**
- * @brief This signal is emitted when the window is resized.
- *
- * A callback of the following type may be connected:
- * @code
- *   void YourCallbackName( int width, int height );
- * @endcode
- * The parameters are the resized width and height.
- *
- * @param[in] window The window to get a signal
- * @return The signal to connect to
- */
-DALI_IMPORT_API ResizedSignalType& ResizedSignal( Window window );
-
-/**
- * @brief Sets a size of the window.
- *
- * @param[in] window The window to set a size
- * @param[in] size The new window size
- */
-DALI_IMPORT_API void SetSize( Window window, WindowSize size );
-
-/**
- * @brief Gets a size of the window.
- *
- * @param[in] window The window to get a size
- * @return The size of the window
- */
-DALI_IMPORT_API WindowSize GetSize( Window window );
-
-/**
- * @brief Sets a position of the window.
- *
- * @param[in] window The window to set a position
- * @param[in] position The new window position
- */
-DALI_IMPORT_API void SetPosition( Window window, WindowPosition position );
-
-/**
- * @brief Gets a position of the window.
- *
- * @param[in] window The window to get a position
- * @return The position of the window
- */
-DALI_IMPORT_API WindowPosition GetPosition( Window window );
-
-/**
- * @brief Sets whether the window is transparent or not.
- *
- * @param[in] window The window to set transparency
- * @param[in] transparent Whether the window is transparent
- */
-DALI_IMPORT_API void SetTransparency( Window window, bool transparent );
-
-} // namespace DevelWindow
-
-} // namespace Dali
-
-#endif // DALI_WINDOW_DEVEL_H
index 0ce6e62..4a074a5 100644 (file)
@@ -26,8 +26,7 @@ devel_api_src_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/video-player.cpp \
-  $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp \
-  $(adaptor_devel_api_dir)/adaptor-framework/window-devel.cpp
+  $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp
 
 
 devel_api_adaptor_framework_header_files = \
@@ -65,5 +64,5 @@ devel_api_adaptor_framework_header_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/video-player-plugin.h \
   $(adaptor_devel_api_dir)/adaptor-framework/key-extension-plugin.h \
   $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \
-  $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h \
-  $(adaptor_devel_api_dir)/adaptor-framework/window-devel.h
+  $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h
+
index affbda2..ca137c1 100644 (file)
@@ -290,7 +290,7 @@ Dali::VirtualKeyboard::StatusSignalType& StatusChangedSignal()
   return imfManager.StatusChangedSignal();
 }
 
-Dali::VirtualKeyboard::VoidSignalType& ResizedSignal()
+Dali::VirtualKeyboard::KeyboardResizedSignalType& ResizedSignal()
 {
   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ResizedSignal() is deprecated and will be removed from next release. Use ImfManager.ResizedSignal() instead.\n" );
 
@@ -298,7 +298,7 @@ Dali::VirtualKeyboard::VoidSignalType& ResizedSignal()
   return imfManager.ResizedSignal();
 }
 
-Dali::VirtualKeyboard::VoidSignalType& LanguageChangedSignal()
+Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal()
 {
   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: LanguageChangedSignal() is deprecated and will be removed from next release. Use ImfManager.LanguageChangedSignal() instead.\n" );
 
index 8c15d37..5a950b8 100644 (file)
@@ -39,6 +39,7 @@
 #endif // DALI_ELDBUS_AVAILABLE
 
 #include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/events/device.h>
 #include <dali/public-api/events/touch-point.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/events/wheel-event.h>
@@ -47,7 +48,6 @@
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/events/hover-event-integ.h>
 #include <dali/integration-api/events/wheel-event-integ.h>
-#include <dali/devel-api/events/device.h>
 
 // INTERNAL INCLUDES
 #include <events/gesture-manager.h>
@@ -264,110 +264,122 @@ void GetDeviceName( Ecore_Event_Key* keyEvent, std::string& result )
 /**
  * Get the device class from the provided ecore event
  */
-void GetDeviceClass( Ecore_Device_Class ecoreDeviceClass, DevelDevice::Class::Type& deviceClass )
+void GetDeviceClass( Ecore_Device_Class ecoreDeviceClass, Device::Class::Type& deviceClass )
 {
   switch( ecoreDeviceClass )
   {
     case ECORE_DEVICE_CLASS_SEAT:
     {
-      deviceClass = DevelDevice::Class::USER;
+      deviceClass = Device::Class::USER;
       break;
     }
     case ECORE_DEVICE_CLASS_KEYBOARD:
     {
-      deviceClass = DevelDevice::Class::KEYBOARD;
+      deviceClass = Device::Class::KEYBOARD;
       break;
     }
     case ECORE_DEVICE_CLASS_MOUSE:
     {
-      deviceClass = DevelDevice::Class::MOUSE;
+      deviceClass = Device::Class::MOUSE;
       break;
     }
     case ECORE_DEVICE_CLASS_TOUCH:
     {
-      deviceClass = DevelDevice::Class::TOUCH;
+      deviceClass = Device::Class::TOUCH;
       break;
     }
     case ECORE_DEVICE_CLASS_PEN:
     {
-      deviceClass = DevelDevice::Class::PEN;
+      deviceClass = Device::Class::PEN;
       break;
     }
     case ECORE_DEVICE_CLASS_POINTER:
     {
-      deviceClass = DevelDevice::Class::POINTER;
+      deviceClass = Device::Class::POINTER;
       break;
     }
     case ECORE_DEVICE_CLASS_GAMEPAD:
     {
-      deviceClass = DevelDevice::Class::GAMEPAD;
+      deviceClass = Device::Class::GAMEPAD;
       break;
     }
     default:
     {
-      deviceClass = DevelDevice::Class::NONE;
+      deviceClass = Device::Class::NONE;
       break;
     }
   }
 }
 
-void GetDeviceSubclass( Ecore_Device_Subclass ecoreDeviceSubclass, DevelDevice::Subclass::Type& deviceSubclass )
+void GetDeviceSubclass( Ecore_Device_Subclass ecoreDeviceSubclass, Device::Subclass::Type& deviceSubclass )
 {
   switch( ecoreDeviceSubclass )
   {
     case ECORE_DEVICE_SUBCLASS_FINGER:
     {
-      deviceSubclass = DevelDevice::Subclass::FINGER;
+      deviceSubclass = Device::Subclass::FINGER;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_FINGERNAIL:
     {
-      deviceSubclass = DevelDevice::Subclass::FINGERNAIL;
+      deviceSubclass = Device::Subclass::FINGERNAIL;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_KNUCKLE:
     {
-      deviceSubclass = DevelDevice::Subclass::KNUCKLE;
+      deviceSubclass = Device::Subclass::KNUCKLE;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_PALM:
     {
-      deviceSubclass = DevelDevice::Subclass::PALM;
+      deviceSubclass = Device::Subclass::PALM;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_HAND_SIZE:
     {
-      deviceSubclass = DevelDevice::Subclass::HAND_SIDE;
+      deviceSubclass = Device::Subclass::HAND_SIDE;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_HAND_FLAT:
     {
-      deviceSubclass = DevelDevice::Subclass::HAND_FLAT;
+      deviceSubclass = Device::Subclass::HAND_FLAT;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_PEN_TIP:
     {
-      deviceSubclass = DevelDevice::Subclass::PEN_TIP;
+      deviceSubclass = Device::Subclass::PEN_TIP;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_TRACKPAD:
     {
-      deviceSubclass = DevelDevice::Subclass::TRACKPAD;
+      deviceSubclass = Device::Subclass::TRACKPAD;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_TRACKPOINT:
     {
-      deviceSubclass = DevelDevice::Subclass::TRACKPOINT;
+      deviceSubclass = Device::Subclass::TRACKPOINT;
       break;
     }
     case ECORE_DEVICE_SUBCLASS_TRACKBALL:
     {
-      deviceSubclass = DevelDevice::Subclass::TRACKBALL;
+      deviceSubclass = Device::Subclass::TRACKBALL;
       break;
     }
+#ifdef OVER_TIZEN_VERSION_4
+    case ECORE_DEVICE_SUBCLASS_REMOCON:
+    {
+      deviceSubclass = Device::Subclass::REMOCON;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD:
+    {
+      deviceSubclass = Device::Subclass::VIRTUAL_KEYBOARD;
+      break;
+    }
+#endif
     default:
     {
-      deviceSubclass = DevelDevice::Subclass::NONE;
+      deviceSubclass = Device::Subclass::NONE;
       break;
     }
   }
@@ -492,8 +504,8 @@ struct EventHandler::Impl
         state = PointState::INTERRUPTED;
       }
 
-      DevelDevice::Class::Type deviceClass;
-      DevelDevice::Subclass::Type deviceSubclass;
+      Device::Class::Type deviceClass;
+      Device::Subclass::Type deviceSubclass;
 
       GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
       GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
@@ -524,8 +536,8 @@ struct EventHandler::Impl
 
     if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
     {
-      DevelDevice::Class::Type deviceClass;
-      DevelDevice::Subclass::Type deviceSubclass;
+      Device::Class::Type deviceClass;
+      Device::Subclass::Type deviceSubclass;
 
       GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
       GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
@@ -556,8 +568,8 @@ struct EventHandler::Impl
 
     if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
     {
-      DevelDevice::Class::Type deviceClass;
-      DevelDevice::Subclass::Type deviceSubclass;
+      Device::Class::Type deviceClass;
+      Device::Subclass::Type deviceSubclass;
 
       GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
       GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
@@ -710,8 +722,8 @@ struct EventHandler::Impl
         }
 
         std::string deviceName;
-        DevelDevice::Class::Type deviceClass;
-        DevelDevice::Subclass::Type deviceSubclass;
+        Device::Class::Type deviceClass;
+        Device::Subclass::Type deviceSubclass;
 
         GetDeviceName( keyEvent, deviceName );
         GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
@@ -790,8 +802,8 @@ struct EventHandler::Impl
         }
 
         std::string deviceName;
-        DevelDevice::Class::Type deviceClass;
-        DevelDevice::Subclass::Type deviceSubclass;
+        Device::Class::Type deviceClass;
+        Device::Subclass::Type deviceSubclass;
 
         GetDeviceName( keyEvent, deviceName );
         GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
index edd8899..d253b25 100644 (file)
@@ -185,7 +185,7 @@ void InputPanelLanguageChangeCallback( void* data, Ecore_IMF_Context* context, i
   }
   ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
   // Emit the signal that the language has changed
-  imfManager->LanguageChangedSignal().Emit();
+  imfManager->LanguageChangedSignal().Emit( value );
 }
 
 void InputPanelGeometryChangedCallback ( void *data, Ecore_IMF_Context *context, int value )
@@ -196,7 +196,7 @@ void InputPanelGeometryChangedCallback ( void *data, Ecore_IMF_Context *context,
   }
   ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
   // Emit signal that the keyboard is resized
-  imfManager->ResizedSignal().Emit();
+  imfManager->ResizedSignal().Emit( value );
 }
 
 void InputPanelKeyboardTypeChangedCallback( void *data, Ecore_IMF_Context *context, int value )
@@ -589,16 +589,21 @@ Eina_Bool ImfManager::RetrieveSurrounding( void* data, Ecore_IMF_Context* imfCon
 
   Dali::ImfManager::ImfEventData imfData( Dali::ImfManager::GETSURROUNDING, std::string(), 0, 0 );
   Dali::ImfManager handle( this );
-  mEventSignal.Emit( handle, imfData );
+  Dali::ImfManager::ImfCallbackData callbackData = mEventSignal.Emit( handle, imfData );
 
-  if( text )
+  if( callbackData.update )
   {
-    *text = strdup( mSurroundingText.c_str() );
-  }
+    if( text )
+    {
+      // The memory allocated by strdup() can be freed by ecore_imf_context_surrounding_get() internally.
+      *text = strdup( callbackData.currentText.c_str() );
+    }
 
-  if( cursorPosition )
-  {
-    *cursorPosition = mIMFCursorPosition;
+    if( cursorPosition )
+    {
+      mIMFCursorPosition = static_cast<int>( callbackData.cursorPosition );
+      *cursorPosition = mIMFCursorPosition;
+    }
   }
 
   return EINA_TRUE;
@@ -756,25 +761,28 @@ void ImfManager::ApplyOptions( const InputMethodOptions& options )
   }
 }
 
-void ImfManager::SetInputPanelUserData( const std::string& data )
+void ImfManager::SetInputPanelData( const std::string& data )
 {
-  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetInputPanelUserData\n" );
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetInputPanelData\n" );
 
   if( mIMFContext )
   {
     int length = data.length();
-    ecore_imf_context_input_panel_imdata_set( mIMFContext, &data, length );
+    ecore_imf_context_input_panel_imdata_set( mIMFContext, data.c_str(), length );
   }
 }
 
-void ImfManager::GetInputPanelUserData( std::string& data )
+void ImfManager::GetInputPanelData( std::string& data )
 {
-  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetInputPanelUserData\n" );
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetInputPanelData\n" );
 
   if( mIMFContext )
   {
-    int* length = NULL;
-    ecore_imf_context_input_panel_imdata_get( mIMFContext, &data, length );
+    int length = 4096; // The max length is 4096 bytes
+    Dali::Vector< char > buffer;
+    buffer.Resize( length );
+    ecore_imf_context_input_panel_imdata_get( mIMFContext, &buffer[0], &length );
+    data = std::string( buffer.Begin(), buffer.End() );
   }
 }
 
index 59f1b7a..44637ca 100644 (file)
@@ -49,6 +49,8 @@ public:
   typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
   typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
   typedef Dali::ImfManager::KeyboardTypeSignalType ImfKeyboardTypeSignalType;
+  typedef Dali::ImfManager::KeyboardResizedSignalType KeyboardResizedSignalType;
+  typedef Dali::ImfManager::LanguageChangedSignalType LanguageChangedSignalType;
 
 public:
 
@@ -180,14 +182,14 @@ public:
   void ApplyOptions( const InputMethodOptions& options );
 
   /**
-   * @copydoc Dali::ImfManager::SetInputPanelUserData()
+   * @copydoc Dali::ImfManager::SetInputPanelData()
    */
-  void SetInputPanelUserData( const std::string& data );
+  void SetInputPanelData( const std::string& data );
 
   /**
-   * @copydoc Dali::ImfManager::GetInputPanelUserData()
+   * @copydoc Dali::ImfManager::GetInputPanelData()
    */
-  void GetInputPanelUserData( std::string& data );
+  void GetInputPanelData( std::string& data );
 
   /**
    * @copydoc Dali::ImfManager::GetInputPanelState()
@@ -244,12 +246,12 @@ public:  // Signals
   /**
    * @copydoc Dali::ImfManager::ResizedSignal()
    */
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  KeyboardResizedSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
 
   /**
    * @copydoc Dali::ImfManager::LanguageChangedSignal()
    */
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+  LanguageChangedSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::KeyboardTypeChangedSignal()
@@ -295,8 +297,8 @@ private:
   ImfManagerSignalType       mActivatedSignal;
   ImfEventSignalType         mEventSignal;
   ImfStatusSignalType        mKeyboardStatusSignal;
-  ImfVoidSignalType          mKeyboardResizeSignal;
-  ImfVoidSignalType          mKeyboardLanguageChangedSignal;
+  KeyboardResizedSignalType  mKeyboardResizeSignal;
+  LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   ImfKeyboardTypeSignalType  mKeyboardTypeChangedSignal;
 
 public:
index 6f785d0..d4265b4 100644 (file)
@@ -77,9 +77,9 @@ struct Window::EventHandler
     mNotificationLevel( -1 ),
     mNotificationChangeState( 0 ),
     mNotificationLevelChangeDone( true ),
-    mScreenMode( 0 ),
-    mScreenModeChangeState( 0 ),
-    mScreenModeChangeDone( true ),
+    mScreenOffMode( 0 ),
+    mScreenOffModeChangeState( 0 ),
+    mScreenOffModeChangeDone( true ),
     mBrightness( 0 ),
     mBrightnessChangeState( 0 ),
     mBrightnessChangeDone( true )
@@ -155,12 +155,20 @@ struct Window::EventHandler
       {
         if( iconifyChangedEvent->iconified == EINA_TRUE )
         {
-          observer->OnWindowHidden();
+          handler->mWindow->mIconified = true;
+          if( handler->mWindow->mVisible )
+          {
+            observer->OnWindowHidden();
+          }
           DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Iconfied\n", handler->mEcoreWindow );
         }
         else
         {
-          observer->OnWindowShown();
+          handler->mWindow->mIconified = false;
+          if( handler->mWindow->mVisible )
+          {
+            observer->OnWindowShown();
+          }
           DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Shown\n", handler->mEcoreWindow );
         }
         handled = ECORE_CALLBACK_DONE;
@@ -210,8 +218,17 @@ struct Window::EventHandler
 
     if ( handler && handler->mWindow && transformEvent->output == ecore_wl_window_output_find( handler->mEcoreWindow ) )
     {
+      DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) EcoreEventOutputTransform\n", handler->mEcoreWindow );
+
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
-      wlSurface->OutputTransformed();
+      if( wlSurface )
+      {
+        wlSurface->OutputTransformed();
+
+        PositionSize positionSize = wlSurface->GetPositionSize();
+        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+        handler->mWindow->mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+      }
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -225,8 +242,17 @@ struct Window::EventHandler
 
     if ( handler && handler->mWindow && ignoreTransformEvent->win == handler->mEcoreWindow )
     {
+      DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) EcoreEventIgnoreOutputTransform\n", handler->mEcoreWindow );
+
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
-      wlSurface->OutputTransformed();
+      if( wlSurface )
+      {
+        wlSurface->OutputTransformed();
+
+        PositionSize positionSize = wlSurface->GetPositionSize();
+        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+        handler->mWindow->mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+      }
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -286,9 +312,9 @@ struct Window::EventHandler
   {
     Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
 
-    eventHandler->mScreenMode = mode;
-    eventHandler->mScreenModeChangeState = state;
-    eventHandler->mScreenModeChangeDone = true;
+    eventHandler->mScreenOffMode = mode;
+    eventHandler->mScreenOffModeChangeState = state;
+    eventHandler->mScreenOffModeChangeDone = true;
 
     DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::TizenPolicyScreenModeChangeDone: mode = %d, state = %d\n", mode, state );
   }
@@ -342,9 +368,9 @@ struct Window::EventHandler
   uint32_t mNotificationChangeState;
   bool mNotificationLevelChangeDone;
 
-  int mScreenMode;
-  uint32_t mScreenModeChangeState;
-  bool mScreenModeChangeDone;
+  int mScreenOffMode;
+  uint32_t mScreenOffModeChangeState;
+  bool mScreenOffModeChangeDone;
 
   int mBrightness;
   uint32_t mBrightnessChangeState;
@@ -479,6 +505,7 @@ Window::Window()
   mEcoreEventHander( true ),
   mIsFocusAcceptable( true ),
   mVisible( true ),
+  mIconified( false ),
   mOpaqueState( false ),
   mResizeEnabled( false ),
   mIndicator( NULL ),
@@ -487,7 +514,7 @@ Window::Window()
   mIndicatorOpacityMode( Dali::Window::OPAQUE ),
   mOverlay( NULL ),
   mAdaptor( NULL ),
-  mType( Dali::DevelWindow::NORMAL ),
+  mType( Dali::Window::NORMAL ),
   mEventHandler( NULL ),
   mPreferredOrientation( Dali::Window::PORTRAIT ),
   mSupportedAuxiliaryHints(),
@@ -712,7 +739,8 @@ void Window::SetIndicatorActorRotation()
 
 void Window::Raise()
 {
-  ecore_wl_window_raise( mEventHandler->mEcoreWindow );
+  // Use ecore_wl_window_activate to prevent the window shown without rendering
+  ecore_wl_window_activate( mEventHandler->mEcoreWindow );
 }
 
 void Window::Lower()
@@ -846,7 +874,7 @@ void Window::SetAcceptFocus( bool accept )
   ecore_wl_window_focus_skip_set( mEventHandler->mEcoreWindow, !accept );
 }
 
-bool Window::IsFocusAcceptable()
+bool Window::IsFocusAcceptable() const
 {
   return mIsFocusAcceptable;
 }
@@ -856,10 +884,13 @@ void Window::Show()
   mVisible = true;
   ecore_wl_window_show( mEventHandler->mEcoreWindow );
 
-  // Need an update request
-  if( mAdaptor )
+  if( !mIconified )
   {
-    mAdaptor->RequestUpdateOnce();
+    if( mAdaptor )
+    {
+      WindowVisibilityObserver* observer( mAdaptor );
+      observer->OnWindowShown();
+    }
   }
 }
 
@@ -867,6 +898,15 @@ void Window::Hide()
 {
   mVisible = false;
   ecore_wl_window_hide( mEventHandler->mEcoreWindow );
+
+  if( !mIconified )
+  {
+    if( mAdaptor )
+    {
+      WindowVisibilityObserver* observer( mAdaptor );
+      observer->OnWindowHidden();
+    }
+  }
 }
 
 bool Window::IsVisible() const
@@ -877,22 +917,30 @@ bool Window::IsVisible() const
 void Window::RotationDone( int orientation, int width, int height )
 {
   ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
-  wlSurface->RequestRotation( orientation, width, height );
+  if( wlSurface )
+  {
+    wlSurface->RequestRotation( orientation, width, height );
+  }
 
-  mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) );
+  mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( width, height ) );
 
   // Emit signal
-  mResizedSignal.Emit( Dali::DevelWindow::WindowSize( width, height ) );
+  mResizedSignal.Emit( Dali::Window::WindowSize( width, height ) );
 
-  mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( width, height ) );
+  mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
 }
 
-unsigned int Window::GetSupportedAuxiliaryHintCount()
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
+}
+
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
 {
   return mSupportedAuxiliaryHints.size();
 }
 
-std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
 {
   if( index >= GetSupportedAuxiliaryHintCount() )
   {
@@ -1018,7 +1066,7 @@ void Window::SetInputRegion( const Rect< int >& inputRegion )
   DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetInputRegion: x = %d, y = %d, w = %d, h = %d\n", inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
 }
 
-void Window::SetType( Dali::DevelWindow::Type type )
+void Window::SetType( Dali::Window::Type type )
 {
   Ecore_Wl_Window_Type windowType;
 
@@ -1026,22 +1074,22 @@ void Window::SetType( Dali::DevelWindow::Type type )
   {
     switch( type )
     {
-      case Dali::DevelWindow::NORMAL:
+      case Dali::Window::NORMAL:
       {
         windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
         break;
       }
-      case Dali::DevelWindow::NOTIFICATION:
+      case Dali::Window::NOTIFICATION:
       {
         windowType = ECORE_WL_WINDOW_TYPE_NOTIFICATION;
         break;
       }
-      case Dali::DevelWindow::UTILITY:
+      case Dali::Window::UTILITY:
       {
         windowType = ECORE_WL_WINDOW_TYPE_UTILITY;
         break;
       }
-      case Dali::DevelWindow::DIALOG:
+      case Dali::Window::DIALOG:
       {
         windowType = ECORE_WL_WINDOW_TYPE_DIALOG;
         break;
@@ -1059,14 +1107,14 @@ void Window::SetType( Dali::DevelWindow::Type type )
   mType = type;
 }
 
-Dali::DevelWindow::Type Window::GetType() const
+Dali::Window::Type Window::GetType() const
 {
   return mType;
 }
 
-bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
 {
-  if( mType != Dali::DevelWindow::NOTIFICATION )
+  if( mType != Dali::Window::NOTIFICATION )
   {
     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType );
     return false;
@@ -1081,27 +1129,27 @@ bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type le
 
   switch( level )
   {
-    case Dali::DevelWindow::NotificationLevel::NONE:
+    case Dali::Window::NotificationLevel::NONE:
     {
       notificationLevel = TIZEN_POLICY_LEVEL_NONE;
       break;
     }
-    case Dali::DevelWindow::NotificationLevel::BASE:
+    case Dali::Window::NotificationLevel::BASE:
     {
       notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
       break;
     }
-    case Dali::DevelWindow::NotificationLevel::MEDIUM:
+    case Dali::Window::NotificationLevel::MEDIUM:
     {
       notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
       break;
     }
-    case Dali::DevelWindow::NotificationLevel::HIGH:
+    case Dali::Window::NotificationLevel::HIGH:
     {
       notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
       break;
     }
-    case Dali::DevelWindow::NotificationLevel::TOP:
+    case Dali::Window::NotificationLevel::TOP:
     {
       notificationLevel = TIZEN_POLICY_LEVEL_TOP;
       break;
@@ -1144,12 +1192,12 @@ bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type le
   return true;
 }
 
-Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
+Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
 {
-  if( mType != Dali::DevelWindow::NOTIFICATION )
+  if( mType != Dali::Window::NOTIFICATION )
   {
     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", mType );
-    return Dali::DevelWindow::NotificationLevel::NONE;
+    return Dali::Window::NotificationLevel::NONE;
   }
 
   while( !mEventHandler->mTizenPolicy )
@@ -1169,42 +1217,42 @@ Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
   if( !mEventHandler->mNotificationLevelChangeDone )
   {
     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Error! [%d]\n", mEventHandler->mNotificationChangeState );
-    return Dali::DevelWindow::NotificationLevel::NONE;
+    return Dali::Window::NotificationLevel::NONE;
   }
 
-  Dali::DevelWindow::NotificationLevel::Type level;
+  Dali::Window::NotificationLevel::Type level;
 
   switch( mEventHandler->mNotificationLevel )
   {
     case TIZEN_POLICY_LEVEL_NONE:
     {
-      level = Dali::DevelWindow::NotificationLevel::NONE;
+      level = Dali::Window::NotificationLevel::NONE;
       break;
     }
     case TIZEN_POLICY_LEVEL_DEFAULT:
     {
-      level = Dali::DevelWindow::NotificationLevel::BASE;
+      level = Dali::Window::NotificationLevel::BASE;
       break;
     }
     case TIZEN_POLICY_LEVEL_MEDIUM:
     {
-      level = Dali::DevelWindow::NotificationLevel::MEDIUM;
+      level = Dali::Window::NotificationLevel::MEDIUM;
       break;
     }
     case TIZEN_POLICY_LEVEL_HIGH:
     {
-      level = Dali::DevelWindow::NotificationLevel::HIGH;
+      level = Dali::Window::NotificationLevel::HIGH;
       break;
     }
     case TIZEN_POLICY_LEVEL_TOP:
     {
-      level = Dali::DevelWindow::NotificationLevel::TOP;
+      level = Dali::Window::NotificationLevel::TOP;
       break;
     }
     default:
     {
       DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: invalid level [%d]\n", mEventHandler->mNotificationLevel );
-      level = Dali::DevelWindow::NotificationLevel::NONE;
+      level = Dali::Window::NotificationLevel::NONE;
       break;
     }
   }
@@ -1228,31 +1276,31 @@ void Window::SetOpaqueState( bool opaque )
   DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetOpaqueState: opaque = %d\n", opaque );
 }
 
-bool Window::IsOpaqueState()
+bool Window::IsOpaqueState() const
 {
   return mOpaqueState;
 }
 
-bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
+bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
 {
   while( !mEventHandler->mTizenPolicy )
   {
     wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
   }
 
-  mEventHandler->mScreenModeChangeDone = false;
-  mEventHandler->mScreenModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
+  mEventHandler->mScreenOffModeChangeDone = false;
+  mEventHandler->mScreenOffModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
 
   unsigned int mode = 0;
 
-  switch( screenMode )
+  switch( screenOffMode )
   {
-    case Dali::DevelWindow::ScreenMode::DEFAULT:
+    case Dali::Window::ScreenOffMode::TIMEOUT:
     {
       mode = 0;
       break;
     }
-    case Dali::DevelWindow::ScreenMode::ALWAYS_ON:
+    case Dali::Window::ScreenOffMode::NEVER:
     {
       mode = 1;
       break;
@@ -1263,30 +1311,30 @@ bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
 
   int count = 0;
 
-  while( !mEventHandler->mScreenModeChangeDone && count < 3 )
+  while( !mEventHandler->mScreenOffModeChangeDone && count < 3 )
   {
     ecore_wl_flush();
     wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
     count++;
   }
 
-  if( !mEventHandler->mScreenModeChangeDone )
+  if( !mEventHandler->mScreenOffModeChangeDone )
   {
-    DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Screen mode change is failed [%d, %d]\n", screenMode, mEventHandler->mScreenModeChangeState );
+    DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mEventHandler->mScreenOffModeChangeState );
     return false;
   }
-  else if( mEventHandler->mScreenModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
+  else if( mEventHandler->mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
   {
-    DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Permission denied! [%d]\n", screenMode );
+    DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode );
     return false;
   }
 
-  DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Screen mode is changed [%d]\n", mEventHandler->mScreenMode );
+  DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenOffMode: Screen mode is changed [%d]\n", mEventHandler->mScreenOffMode );
 
   return true;
 }
 
-Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
+Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
 {
   while( !mEventHandler->mTizenPolicy )
   {
@@ -1295,36 +1343,36 @@ Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
 
   int count = 0;
 
-  while( !mEventHandler->mScreenModeChangeDone && count < 3 )
+  while( !mEventHandler->mScreenOffModeChangeDone && count < 3 )
   {
     ecore_wl_flush();
     wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
     count++;
   }
 
-  if( !mEventHandler->mScreenModeChangeDone )
+  if( !mEventHandler->mScreenOffModeChangeDone )
   {
-    DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenMode: Error! [%d]\n", mEventHandler->mScreenModeChangeState );
-    return Dali::DevelWindow::ScreenMode::DEFAULT;
+    DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenOffMode: Error! [%d]\n", mEventHandler->mScreenOffModeChangeState );
+    return Dali::Window::ScreenOffMode::TIMEOUT;
   }
 
-  Dali::DevelWindow::ScreenMode::Type screenMode = Dali::DevelWindow::ScreenMode::DEFAULT;
+  Dali::Window::ScreenOffMode::Type screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
 
-  switch( mEventHandler->mScreenMode )
+  switch( mEventHandler->mScreenOffMode )
   {
     case 0:
     {
-      screenMode = Dali::DevelWindow::ScreenMode::DEFAULT;
+      screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
       break;
     }
     case 1:
     {
-      screenMode = Dali::DevelWindow::ScreenMode::ALWAYS_ON;
+      screenMode = Dali::Window::ScreenOffMode::NEVER;
       break;
     }
   }
 
-  DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenMode: screen mode [%d]\n", mEventHandler->mScreenMode );
+  DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenOffMode: screen mode [%d]\n", mEventHandler->mScreenOffMode );
 
   return screenMode;
 }
@@ -1372,7 +1420,7 @@ bool Window::SetBrightness( int brightness )
   return true;
 }
 
-int Window::GetBrightness()
+int Window::GetBrightness() const
 {
   while( !mEventHandler->mTizenDisplayPolicy )
   {
@@ -1399,7 +1447,7 @@ int Window::GetBrightness()
   return mEventHandler->mBrightness;
 }
 
-void Window::SetSize( Dali::DevelWindow::WindowSize size )
+void Window::SetSize( Dali::Window::WindowSize size )
 {
   if( !mResizeEnabled )
   {
@@ -1416,23 +1464,23 @@ void Window::SetSize( Dali::DevelWindow::WindowSize size )
 
     mSurface->MoveResize( positionSize );
 
-    mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 
     // Emit signal
-    mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
+    mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) );
 
-    mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
   }
 }
 
-Dali::DevelWindow::WindowSize Window::GetSize()
+Dali::Window::WindowSize Window::GetSize() const
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
-  return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
+  return Dali::Window::WindowSize( positionSize.width, positionSize.height );
 }
 
-void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
+void Window::SetPosition( Dali::Window::WindowPosition position )
 {
   if( !mResizeEnabled )
   {
@@ -1451,17 +1499,20 @@ void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
   }
 }
 
-Dali::DevelWindow::WindowPosition Window::GetPosition()
+Dali::Window::WindowPosition Window::GetPosition() const
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
-  return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
+  return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
 }
 
 void Window::SetTransparency( bool transparent )
 {
   ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
-  wlSurface->SetTransparency( transparent );
+  if( wlSurface )
+  {
+    wlSurface->SetTransparency( transparent );
+  }
 }
 
 } // Adaptor
index db97cd5..d8b9be5 100644 (file)
 #include <window-render-surface.h>
 
 // EXTERNAL INCLUDES
-#include <dlfcn.h>
 #include <dali/integration-api/gl-abstraction.h>
 #include <dali/integration-api/debug.h>
-#include <dali/integration-api/gl-defines.h>
 
 // INTERNAL INCLUDES
 #include <wl-types.h>
@@ -143,8 +141,6 @@ void WindowRenderSurface::OutputTransformed()
     transform = ecore_wl_output_transform_get( ecore_wl_window_output_find( mWlWindow ) );
   }
 
-  ecore_wl_window_buffer_transform_set( mWlWindow, transform );
-
   mScreenRotationAngle = transform * 90;
   mScreenRotationFinished = false;
 
@@ -458,7 +454,6 @@ void WindowRenderSurface::CreateWlRenderable()
     Ecore_Wl_Output* output = ecore_wl_window_output_find( mWlWindow );
 
     int transform = ecore_wl_output_transform_get( output );
-    ecore_wl_window_buffer_transform_set( mWlWindow, transform );
 
     mScreenRotationAngle = transform * 90;
     mScreenRotationFinished = false;
index cbb290e..9e87551 100644 (file)
@@ -24,7 +24,6 @@
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/common/view-mode.h>
-#include <dali/public-api/math/uint-16-pair.h>
 
 // INTERNAL INCLUDES
 
@@ -115,8 +114,6 @@ public:
 
   typedef Signal< void (Adaptor&) > AdaptorSignalType; ///< Generic Type for adaptor signals
 
-  typedef Uint16Pair SurfaceSize;          ///< Surface size type
-
 public:
   /**
    * @brief Create a new adaptor using the window.
index d7d0716..b0abec8 100644 (file)
@@ -46,6 +46,8 @@ public:
   typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
   typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
   typedef Dali::ImfManager::KeyboardTypeSignalType ImfKeyboardTypeSignalType;
+  typedef Dali::ImfManager::KeyboardResizedSignalType KeyboardResizedSignalType;
+  typedef Dali::ImfManager::LanguageChangedSignalType LanguageChangedSignalType;
 
 public:
 
@@ -178,14 +180,14 @@ public:
   void ApplyOptions( const InputMethodOptions& options );
 
   /**
-   * @copydoc Dali::ImfManager::SetInputPanelUserData()
+   * @copydoc Dali::ImfManager::SetInputPanelData()
    */
-  void SetInputPanelUserData( const std::string& data );
+  void SetInputPanelData( const std::string& data );
 
   /**
-   * @copydoc Dali::ImfManager::GetInputPanelUserData()
+   * @copydoc Dali::ImfManager::GetInputPanelData()
    */
-  void GetInputPanelUserData( std::string& data );
+  void GetInputPanelData( std::string& data );
 
   /**
    * @copydoc Dali::ImfManager::GetInputPanelState()
@@ -242,12 +244,12 @@ public:  // Signals
   /**
    * @copydoc Dali::ImfManager::ResizedSignal()
    */
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  KeyboardResizedSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
 
   /**
    * @copydoc Dali::ImfManager::LanguageChangedSignal()
    */
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+  LanguageChangedSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::KeyboardTypeChangedSignal()
@@ -289,8 +291,8 @@ private:
   ImfManagerSignalType       mActivatedSignal;
   ImfEventSignalType         mEventSignal;
   ImfStatusSignalType        mKeyboardStatusSignal;
-  ImfVoidSignalType          mKeyboardResizeSignal;
-  ImfVoidSignalType          mKeyboardLanguageChangedSignal;
+  KeyboardResizedSignalType  mKeyboardResizeSignal;
+  LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   ImfKeyboardTypeSignalType  mKeyboardTypeChangedSignal;
 
 public:
index 146c9be..1db99e3 100644 (file)
@@ -84,7 +84,7 @@ Application Application::New( int* argc, char **argv[], const std::string& style
     }
     internal->SetStyleSheet( stylesheet );
 
-    DevelWindow::SetTransparency( internal->GetWindow(), ( windowMode == Application::OPAQUE ? false : true ) );
+    internal->GetWindow().SetTransparency( ( windowMode == Application::OPAQUE ? false : true ) );
 
     return Application( internal.Get() );
   }
@@ -96,6 +96,30 @@ Application Application::New( int* argc, char **argv[], const std::string& style
   }
 }
 
+Application Application::New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize )
+{
+  Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
+  if( internal )
+  {
+    if( argc && ( *argc > 0 ) )
+    {
+      internal->GetWindow().SetClass( (*argv)[0], "" );
+    }
+    internal->SetStyleSheet( stylesheet );
+
+    internal->GetWindow().SetTransparency( ( windowMode == Application::OPAQUE ? false : true ) );
+    internal->GetWindow().SetSize( Window::WindowSize( positionSize.width, positionSize.height ) );
+    internal->GetWindow().SetPosition( Window::WindowPosition( positionSize.x, positionSize.y ) );
+
+    return Application( internal.Get() );
+  }
+  else
+  {
+    internal = Internal::Adaptor::Application::New( argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL );
+    return Application( internal.Get() );
+  }
+}
+
 Application::~Application()
 {
 }
@@ -158,6 +182,16 @@ std::string Application::GetResourcePath()
   return Internal::Adaptor::Application::GetResourcePath();
 }
 
+std::string Application::GetRegion() const
+{
+  return Internal::Adaptor::GetImplementation(*this).GetRegion();
+}
+
+std::string Application::GetLanguage() const
+{
+  return Internal::Adaptor::GetImplementation(*this).GetLanguage();
+}
+
 void Application::SetViewMode( ViewMode viewMode )
 {
   Internal::Adaptor::GetImplementation(*this).SetViewMode( viewMode );
@@ -227,14 +261,26 @@ Application::AppSignalType& Application::RegionChangedSignal()
 
 Application::AppSignalType& Application::BatteryLowSignal()
 {
+  DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: BatteryLowSignal() is deprecated and will be removed from next release. Use Application::LowBatterySignal() instead.\n" );
   return Internal::Adaptor::GetImplementation(*this).BatteryLowSignal();
 }
 
 Application::AppSignalType& Application::MemoryLowSignal()
 {
+  DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: MemoryLowSignal() is deprecated and will be removed from next release. Use Application::LowMemorySignal() instead.\n" );
   return Internal::Adaptor::GetImplementation(*this).MemoryLowSignal();
 }
 
+Application::LowBatterySignalType& Application::LowBatterySignal()
+{
+  return Internal::Adaptor::GetImplementation(*this).LowBatterySignal();
+}
+
+Application::LowMemorySignalType& Application::LowMemorySignal()
+{
+  return Internal::Adaptor::GetImplementation(*this).LowMemorySignal();
+}
+
 Application::Application(Internal::Adaptor::Application* application)
 : BaseHandle(application)
 {
index 9e215c9..483963d 100644 (file)
@@ -24,9 +24,9 @@
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/signals/callback.h>
 
-
 // INTERNAL INCLUDES
 #include "application-configuration.h"
+#include "device-status.h"
 #include "window.h"
 
 namespace Dali
@@ -108,6 +108,8 @@ class DALI_IMPORT_API Application : public BaseHandle
 {
 public:
 
+  typedef Signal< void (DeviceStatus::Battery::Status) > LowBatterySignalType; ///< Application device signal type @SINCE_1_2.62
+  typedef Signal< void (DeviceStatus::Memory::Status) > LowMemorySignalType;   ///< Application device signal type @SINCE_1_2.62
   typedef Signal< void (Application&) > AppSignalType;  ///< Application lifecycle signal and system signal callback type @SINCE_1_0.0
   typedef Signal< void (Application&, void *) > AppControlSignalType; ///< Application control signal callback type @SINCE_1_0.0
 
@@ -174,6 +176,22 @@ public:
   static Application New( int* argc, char **argv[], const std::string& stylesheet, WINDOW_MODE windowMode );
 
   /**
+   * @brief This is the constructor for applications.
+   *
+   * @SINCE_1_2.60
+   * @PRIVLEVEL_PUBLIC
+   * @PRIVILEGE_DISPLAY
+   * @param[in,out]  argc         A pointer to the number of arguments
+   * @param[in,out]  argv         A pointer to the argument list
+   * @param[in]      stylesheet   The path to user defined theme file
+   * @param[in]      windowMode   A member of WINDOW_MODE
+   * @param[in]      positionSize A position and a size of the window
+   * @return A handle to the Application
+   * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
+   */
+  static Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize );
+
+  /**
    * @brief Constructs an empty handle.
    * @SINCE_1_0.0
    */
@@ -284,6 +302,21 @@ public:
    */
   static std::string GetResourcePath();
 
+  /**
+   * @brief This is used to get region information from device.
+   *
+   * @SINCE_1_2.62
+   * @return Region information
+   */
+  std::string GetRegion() const;
+
+  /**
+   * @brief This is used to get language information from device.
+   *
+   * @SINCE_1_2.62
+   * @return Language information
+   */
+  std::string GetLanguage() const;
 
 public: // Stereoscopy
 
@@ -366,7 +399,7 @@ public:  // Signals
    * @SINCE_1_0.0
    * @return The signal to connect to
    */
-  AppSignalType& ResizeSignal();
+  AppSignalType& ResizeSignal() DALI_DEPRECATED_API;
 
   /**
   * @brief This signal is emitted when another application sends a launch request to the application.
@@ -393,18 +426,34 @@ public:  // Signals
   AppSignalType& RegionChangedSignal();
 
   /**
+  * @DEPRECATED_1_2.62 Use LowBatterySignal() instead.
   * @brief This signal is emitted when the battery level of the device is low.
   * @SINCE_1_0.0
   * @return The signal to connect to
   */
-  AppSignalType& BatteryLowSignal();
+  AppSignalType& BatteryLowSignal() DALI_DEPRECATED_API;
 
   /**
+  * @DEPRECATED_1_2.62 Use LowMemorySignal() instead.
   * @brief This signal is emitted when the memory level of the device is low.
   * @SINCE_1_0.0
   * @return The signal to connect to
   */
-  AppSignalType& MemoryLowSignal();
+  AppSignalType& MemoryLowSignal() DALI_DEPRECATED_API;
+
+  /**
+   * @brief This signal is emitted when the battery level of the device is low.
+   * @SINCE_1_2.62
+   * @return The signal to connect to
+   */
+  LowBatterySignalType& LowBatterySignal();
+
+  /**
+   * @brief This signal is emitted when the memory level of the device is low.
+   * @SINCE_1_2.62
+   * @return The signal to connect to
+   */
+  LowMemorySignalType& LowMemorySignal();
 
 public: // Not intended for application developers
   /// @cond internal
diff --git a/adaptors/public-api/adaptor-framework/device-status.h b/adaptors/public-api/adaptor-framework/device-status.h
new file mode 100644 (file)
index 0000000..47d499f
--- /dev/null
@@ -0,0 +1,73 @@
+#ifndef __DALI_DEVICE_STATUS_H__
+#define __DALI_DEVICE_STATUS_H__
+
+/*
+ * Copyright (c) 2017 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.
+ *
+ */
+
+namespace Dali
+{
+/**
+ * @addtogroup dali_adaptor_framework
+ * @{
+ */
+
+namespace DeviceStatus
+{
+/**
+ * @brief Struct for battery of the device.
+ * @SINCE_1_2.62
+ */
+struct Battery
+{
+  /**
+   * @brief Enumeration for battery status.
+   * @SINCE_1_2.62
+   */
+  enum Status
+  {
+    NORMAL,         ///< Battery is over 5% @SINCE_1_2.62
+    CRITICALLY_LOW, ///< Battery is under 5% @SINCE_1_2.62
+    POWER_OFF       ///< Battery is under 1% @SINCE_1_2.62
+  };
+};
+
+/**
+ * @brief Struct for memory of the device.
+ * @SINCE_1_2.62
+ */
+struct Memory
+{
+  /**
+   * @brief Enumeration for memory status.
+   * @SINCE_1_2.62
+   */
+  enum Status
+  {
+    NORMAL,        ///< Normal Status @SINCE_1_2.62
+    LOW,           ///< Memory is low but not critical @SINCE_1_2.62
+    CRITICALLY_LOW ///< Memory is critically low @SINCE_1_2.62
+  };
+};
+
+}// namespace DeviceStatus
+
+/**
+ * @}
+ */
+} // namespace Dali
+
+#endif // __DALI_DEVICE_STATUS_H__
index 85c78ec..ad2f992 100644 (file)
@@ -126,6 +126,156 @@ Any Window::GetNativeHandle() const
   return GetImplementation(*this).GetNativeHandle();
 }
 
+Window::FocusSignalType& Window::FocusChangedSignal()
+{
+  return GetImplementation(*this).FocusChangedSignal();
+}
+
+void Window::SetAcceptFocus( bool accept )
+{
+  GetImplementation(*this).SetAcceptFocus( accept );
+}
+
+bool Window::IsFocusAcceptable() const
+{
+  return GetImplementation(*this).IsFocusAcceptable();
+}
+
+void Window::Show()
+{
+  GetImplementation(*this).Show();
+}
+
+void Window::Hide()
+{
+  GetImplementation(*this).Hide();
+}
+
+bool Window::IsVisible() const
+{
+  return GetImplementation(*this).IsVisible();
+}
+
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
+{
+  return GetImplementation(*this).GetSupportedAuxiliaryHintCount();
+}
+
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
+{
+  return GetImplementation(*this).GetSupportedAuxiliaryHint( index );
+}
+
+unsigned int Window::AddAuxiliaryHint( const std::string& hint, const std::string& value )
+{
+  return GetImplementation(*this).AddAuxiliaryHint( hint, value );
+}
+
+bool Window::RemoveAuxiliaryHint( unsigned int id )
+{
+  return GetImplementation(*this).RemoveAuxiliaryHint( id );
+}
+
+bool Window::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
+{
+  return GetImplementation(*this).SetAuxiliaryHintValue( id, value );
+}
+
+std::string Window::GetAuxiliaryHintValue( unsigned int id ) const
+{
+  return GetImplementation(*this).GetAuxiliaryHintValue( id );
+}
+
+unsigned int Window::GetAuxiliaryHintId( const std::string& hint ) const
+{
+  return GetImplementation(*this).GetAuxiliaryHintId( hint );
+}
+
+void Window::SetInputRegion( const Rect< int >& inputRegion )
+{
+  return GetImplementation(*this).SetInputRegion( inputRegion );
+}
+
+void Window::SetType( Window::Type type )
+{
+  GetImplementation(*this).SetType( type );
+}
+
+Window::Type Window::GetType() const
+{
+  return GetImplementation(*this).GetType();
+}
+
+bool Window::SetNotificationLevel( Window::NotificationLevel::Type level )
+{
+  return GetImplementation(*this).SetNotificationLevel( level );
+}
+
+Window::NotificationLevel::Type Window::GetNotificationLevel() const
+{
+  return GetImplementation(*this).GetNotificationLevel();
+}
+
+void Window::SetOpaqueState( bool opaque )
+{
+  GetImplementation(*this).SetOpaqueState( opaque );
+}
+
+bool Window::IsOpaqueState() const
+{
+  return GetImplementation(*this).IsOpaqueState();
+}
+
+bool Window::SetScreenOffMode(Window::ScreenOffMode::Type screenMode)
+{
+  return GetImplementation(*this).SetScreenOffMode(screenMode);
+}
+
+Window::ScreenOffMode::Type Window::GetScreenOffMode() const
+{
+  return GetImplementation(*this).GetScreenOffMode();
+}
+
+bool Window::SetBrightness( int brightness )
+{
+  return GetImplementation(*this).SetBrightness( brightness );
+}
+
+int Window::GetBrightness() const
+{
+  return GetImplementation(*this).GetBrightness();
+}
+
+Window::ResizedSignalType& Window::ResizedSignal()
+{
+  return GetImplementation(*this).ResizedSignal();
+}
+
+void Window::SetSize( Window::WindowSize size )
+{
+  GetImplementation(*this).SetSize( size );
+}
+
+Window::WindowSize Window::GetSize() const
+{
+  return GetImplementation(*this).GetSize();
+}
+
+void Window::SetPosition( Window::WindowPosition position )
+{
+  GetImplementation(*this).SetPosition( position );
+}
+
+Window::WindowPosition Window::GetPosition() const
+{
+  return GetImplementation(*this).GetPosition();
+}
+
+void Window::SetTransparency( bool transparent )
+{
+  GetImplementation(*this).SetTransparency( transparent );
+}
+
 Window::Window( Internal::Adaptor::Window* window )
 : BaseHandle( window )
 {
index da70b63..fda47e0 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <string>
 #include <dali/public-api/math/rect.h>
+#include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/object/any.h>
@@ -56,7 +57,13 @@ class Orientation;
 class DALI_IMPORT_API Window : public BaseHandle
 {
 public:
+
+  typedef Uint16Pair WindowSize;          ///< Window size type @SINCE_1_2.60
+  typedef Uint16Pair WindowPosition;      ///< Window position type @SINCE_1_2.60
+
   typedef Signal< void (bool) > IndicatorSignalType;  ///< Indicator state signal type @SINCE_1_0.0
+  typedef Signal< void (bool) > FocusSignalType;         ///< Window focus signal type @SINCE_1_2.60
+  typedef Signal< void (WindowSize) > ResizedSignalType; ///< Window resized signal type @SINCE_1_2.60
 
 public:
 
@@ -96,6 +103,57 @@ public:
     AUTO = 2 ///< Hide in default, will show when necessary @SINCE_1_0.0
   };
 
+  /**
+   * @brief An enum of Window types.
+   * @SINCE_1_2.60
+   */
+  enum Type
+  {
+    NORMAL,           ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type. @SINCE_1_2.60
+    NOTIFICATION,     ///< A notification window, like a warning about battery life or a new E-Mail received. @SINCE_1_2.60
+    UTILITY,          ///< A persistent utility window, like a toolbox or palette. @SINCE_1_2.60
+    DIALOG            ///< Used for simple dialog windows. @SINCE_1_2.60
+  };
+
+  /**
+   * @brief An enum of screen mode.
+   * @SINCE_1_2.60
+   */
+  struct NotificationLevel
+  {
+    /**
+     * @brief An enum of screen mode.
+     * @SINCE_1_2.60
+     */
+    enum Type
+    {
+      NONE   = -1,    ///< No notification level. Default level. This value makes the notification window place in the layer of the normal window. @SINCE_1_2.60
+      BASE   = 10,    ///< Base notification level. @SINCE_1_2.60
+      MEDIUM = 20,    ///< Higher notification level than base. @SINCE_1_2.60
+      HIGH   = 30,    ///< Higher notification level than medium. @SINCE_1_2.60
+      TOP    = 40     ///< The highest notification level. @SINCE_1_2.60
+    };
+  };
+
+  /**
+   * @brief An enum of screen mode.
+   * @SINCE_1_2.60
+   */
+  struct ScreenOffMode
+  {
+    /**
+     * @brief An enum of screen mode.
+     * @SINCE_1_2.60
+     */
+    enum Type
+    {
+      TIMEOUT,              ///< The mode which turns the screen off after a timeout. @SINCE_1_2.60
+      NEVER,                ///< The mode which keeps the screen turned on. @SINCE_1_2.60
+    };
+
+    static constexpr Type DEFAULT { TIMEOUT }; ///< The default mode. @SINCE_1_2.60
+  };
+
   // Methods
 
   /**
@@ -248,6 +306,245 @@ public:
    */
   Any GetNativeHandle() const;
 
+  /**
+   * @brief Sets whether window accepts focus or not.
+   *
+   * @SINCE_1_2.60
+   * @param[in] accept If focus is accepted or not. Default is true.
+   */
+  void SetAcceptFocus( bool accept );
+
+  /**
+   * @brief Returns whether window accepts focus or not.
+   *
+   * @SINCE_1_2.60
+   * @return True if the window accept focus, false otherwise
+   */
+  bool IsFocusAcceptable() const;
+
+  /**
+   * @brief Shows the window if it is hidden.
+   * @SINCE_1_2.60
+   */
+  void Show();
+
+  /**
+   * @brief Hides the window if it is showing.
+   * @SINCE_1_2.60
+   */
+  void Hide();
+
+  /**
+   * @brief Returns whether the window is visible or not.
+   * @SINCE_1_2.60
+   * @return True if the window is visible, false otherwise.
+   */
+  bool IsVisible() const;
+
+  /**
+   * @brief Gets the count of supported auxiliary hints of the window.
+   * @SINCE_1_2.60
+   * @return The number of supported auxiliary hints.
+   *
+   * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
+   * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
+   */
+  unsigned int GetSupportedAuxiliaryHintCount() const;
+
+  /**
+   * @brief Gets the supported auxiliary hint string of the window.
+   * @SINCE_1_2.60
+   * @param[in] index The index of the supported auxiliary hint lists
+   * @return The auxiliary hint string of the index.
+   *
+   * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
+   * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
+   */
+  std::string GetSupportedAuxiliaryHint( unsigned int index ) const;
+
+  /**
+   * @brief Creates an auxiliary hint of the window.
+   * @SINCE_1_2.60
+   * @param[in] hint The auxiliary hint string.
+   * @param[in] value The value string.
+   * @return The ID of created auxiliary hint, or @c 0 on failure.
+   */
+  unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value );
+
+  /**
+   * @brief Removes an auxiliary hint of the window.
+   * @SINCE_1_2.60
+   * @param[in] id The ID of the auxiliary hint.
+   * @return True if no error occurred, false otherwise.
+   */
+  bool RemoveAuxiliaryHint( unsigned int id );
+
+  /**
+   * @brief Changes a value of the auxiliary hint.
+   * @SINCE_1_2.60
+   * @param[in] id The auxiliary hint ID.
+   * @param[in] value The value string to be set.
+   * @return True if no error occurred, false otherwise.
+   */
+  bool SetAuxiliaryHintValue( unsigned int id, const std::string& value );
+
+  /**
+   * @brief Gets a value of the auxiliary hint.
+   * @SINCE_1_2.60
+   * @param[in] id The auxiliary hint ID.
+   * @return The string value of the auxiliary hint ID, or an empty string if none exists.
+   */
+  std::string GetAuxiliaryHintValue( unsigned int id ) const;
+
+  /**
+   * @brief Gets a ID of the auxiliary hint string.
+   * @SINCE_1_2.60
+   * @param[in] hint The auxiliary hint string.
+   * @return The ID of the auxiliary hint string, or @c 0 if none exists.
+   */
+  unsigned int GetAuxiliaryHintId( const std::string& hint ) const;
+
+  /**
+   * @brief Sets a region to accept input events.
+   * @SINCE_1_2.60
+   * @param[in] inputRegion The region to accept input events.
+   */
+  void SetInputRegion( const Rect< int >& inputRegion );
+
+  /**
+   * @brief Sets a window type.
+   * @SINCE_1_2.60
+   * @param[in] type The window type.
+   * @remarks The default window type is NORMAL.
+   */
+  void SetType( Type type );
+
+  /**
+   * @brief Gets a window type.
+   * @SINCE_1_2.60
+   * @return A window type.
+   */
+  Type GetType() const;
+
+  /**
+   * @brief Sets a priority level for the specified notification window.
+   * @SINCE_1_2.60
+   * @param[in] level The notification window level.
+   * @return True if no error occurred, false otherwise.
+   * @PRIVLEVEL_PUBLIC
+   * @PRIVILEGE_WINDOW_PRIORITY
+   * @remarks This can be used for a notification type window only. The default level is NotificationLevel::NONE.
+   */
+  bool SetNotificationLevel( NotificationLevel::Type level );
+
+  /**
+   * @brief Gets a priority level for the specified notification window.
+   * @SINCE_1_2.60
+   * @return The notification window level.
+   * @remarks This can be used for a notification type window only.
+   */
+  NotificationLevel::Type GetNotificationLevel() const;
+
+  /**
+   * @brief Sets a transparent window's visual state to opaque.
+   * @details If a visual state of a transparent window is opaque,
+   * then the window manager could handle it as an opaque window when calculating visibility.
+   * @SINCE_1_2.60
+   * @param[in] opaque Whether the window's visual state is opaque.
+   * @remarks This will have no effect on an opaque window.
+   * It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
+   */
+  void SetOpaqueState( bool opaque );
+
+  /**
+   * @brief Returns whether a transparent window's visual state is opaque or not.
+   * @SINCE_1_2.60
+   * @return True if the window's visual state is opaque, false otherwise.
+   * @remarks The return value has no meaning on an opaque window.
+   */
+  bool IsOpaqueState() const;
+
+  /**
+   * @brief Sets a window's screen off mode.
+   * @details This API is useful when the application needs to keep the display turned on.
+   * If the application sets the screen mode to #::Dali::Window::ScreenOffMode::NEVER to its window and the window is shown,
+   * the window manager requests the display system to keep the display on as long as the window is shown.
+   * If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
+   * @SINCE_1_2.60
+   * @param[in] screenOffMode The screen mode.
+   * @return True if no error occurred, false otherwise.
+   * @PRIVLEVEL_PUBLIC
+   * @PRIVILEGE_DISPLAY
+   */
+  bool SetScreenOffMode(ScreenOffMode::Type screenOffMode);
+
+  /**
+   * @brief Gets a screen off mode of the window.
+   * @SINCE_1_2.60
+   * @return The screen off mode.
+   */
+  ScreenOffMode::Type GetScreenOffMode() const;
+
+  /**
+   * @brief Sets preferred brightness of the window.
+   * @details This API is useful when the application needs to change the brightness of the screen when it is appeared on the screen.
+   * If the brightness has been set and the window is shown, the window manager requests the display system to change the brightness to the provided value.
+   * If the window is no longer shown, then the window manager requests the display system to go back to default brightness.
+   * A value less than 0 results in default brightness and a value greater than 100 results in maximum brightness.
+   * @SINCE_1_2.60
+   * @param[in] brightness The preferred brightness (0 to 100).
+   * @return True if no error occurred, false otherwise.
+   * @PRIVLEVEL_PUBLIC
+   * @PRIVILEGE_DISPLAY
+   */
+  bool SetBrightness( int brightness );
+
+  /**
+   * @brief Gets preffered brightness of the window.
+   * @return The preffered brightness.
+   */
+  int GetBrightness() const;
+
+  /**
+   * @brief Sets a size of the window.
+   *
+   * @SINCE_1_2.60
+   * @param[in] size The new window size
+   */
+  void SetSize( WindowSize size );
+
+  /**
+   * @brief Gets a size of the window.
+   *
+   * @SINCE_1_2.60
+   * @return The size of the window
+   */
+  WindowSize GetSize() const;
+
+  /**
+   * @brief Sets a position of the window.
+   *
+   * @SINCE_1_2.60
+   * @param[in] position The new window position
+   */
+  void SetPosition( WindowPosition position );
+
+  /**
+   * @brief Gets a position of the window.
+   *
+   * @SINCE_1_2.60
+   * @return The position of the window
+   */
+  WindowPosition GetPosition() const;
+
+  /**
+   * @brief Sets whether the window is transparent or not.
+   *
+   * @SINCE_1_2.60
+   * @param[in] transparent Whether the window is transparent
+   */
+  void SetTransparency( bool transparent );
+
 public: // Signals
   /**
    * @brief The user should connect to this signal to get a timing when indicator was shown / hidden.
@@ -256,6 +553,34 @@ public: // Signals
    */
   IndicatorSignalType& IndicatorVisibilityChangedSignal();
 
+  /**
+   * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
+   *
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallbackName( bool focusIn );
+   * @endcode
+   * The parameter is true if window gains focus, otherwise false.
+   *
+   * @SINCE_1_2.60
+   * @return The signal to connect to
+   */
+  FocusSignalType& FocusChangedSignal();
+
+  /**
+   * @brief This signal is emitted when the window is resized.
+   *
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallbackName( int width, int height );
+   * @endcode
+   * The parameters are the resized width and height.
+   *
+   * @SINCE_1_2.60
+   * @return The signal to connect to
+   */
+  ResizedSignalType& ResizedSignal();
+
 public: // Not intended for application developers
   /// @cond internal
   /**
index 4f5585c..a1fd1fc 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 56;
+const unsigned int ADAPTOR_MICRO_VERSION = 65;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 240215e..8a37838 100644 (file)
@@ -22,6 +22,7 @@
 
 // Application / UI Framework adaption
 #include <dali/public-api/adaptor-framework/application.h>
+#include <dali/public-api/adaptor-framework/device-status.h>
 #include <dali/public-api/adaptor-framework/input-method.h>
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/adaptor-framework/timer.h>
index dbf643f..4df586a 100644 (file)
@@ -15,6 +15,7 @@ public_api_header_files = \
 public_api_adaptor_framework_header_files = \
   $(adaptor_public_api_dir)/adaptor-framework/application.h \
   $(adaptor_public_api_dir)/adaptor-framework/application-configuration.h \
+  $(adaptor_public_api_dir)/adaptor-framework/device-status.h \
   $(adaptor_public_api_dir)/adaptor-framework/input-method.h \
   $(adaptor_public_api_dir)/adaptor-framework/key.h \
   $(adaptor_public_api_dir)/adaptor-framework/style-change.h \
index aeb25c5..1e5a8e8 100644 (file)
@@ -24,6 +24,7 @@
 #include <Ecore.h>
 
 #include <system_info.h>
+#include <system_settings.h>
 #include <app_control_internal.h>
 #include <bundle_internal.h>
 
@@ -84,6 +85,13 @@ struct Framework::Impl
 #endif
     mApplicationType = type;
     mCallbackManager = CallbackManager::New();
+
+    char* region;
+    char* language;
+    system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &region );
+    system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &language );
+    mRegion = std::string( region );
+    mLanguage = std::string( language );
   }
 
   ~Impl()
@@ -123,11 +131,22 @@ struct Framework::Impl
     }
   }
 
+  std::string GetLanguage() const
+  {
+    return mLanguage;
+  }
+
+  std::string GetRegion() const
+  {
+    return mRegion;
+  }
 
   // Data
   Type mApplicationType;
   CallbackBase* mAbortCallBack;
   CallbackManager *mCallbackManager;
+  std::string mLanguage;
+  std::string mRegion;
 
   Framework* mFramework;
   app_event_handler_h handlers[5];
@@ -291,7 +310,6 @@ struct Framework::Impl
   static void AppLanguageChanged(app_event_info_h event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
     observer->OnLanguageChanged();
   }
 
@@ -302,22 +320,19 @@ struct Framework::Impl
   static void AppRegionChanged(app_event_info_h event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
     observer->OnRegionChanged();
   }
 
   static void AppBatteryLow(app_event_info_h event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
-    observer->OnBatteryLow();
+    observer->OnBatteryLow(Dali::DeviceStatus::Battery::NORMAL);
   }
 
   static void AppMemoryLow(app_event_info_h event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
-    observer->OnMemoryLow();
+    observer->OnMemoryLow(Dali::DeviceStatus::Memory::NORMAL);
   }
 
 private:
@@ -459,6 +474,16 @@ void Framework::AbortCallback( )
   }
 }
 
+std::string Framework::GetLanguage() const
+{
+  return mImpl->GetLanguage();
+}
+
+std::string Framework::GetRegion() const
+{
+  return mImpl->GetRegion();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index f437a92..addc5a7 100644 (file)
@@ -26,6 +26,7 @@
 #include <Ecore.h>
 
 #include <system_info.h>
+#include <system_settings.h>
 #include <bundle_internal.h>
 
 // CONDITIONAL INCLUDES
@@ -168,6 +169,13 @@ struct Framework::Impl
 #endif
     mApplicationType = type;
     mCallbackManager = CallbackManager::New();
+
+    char* region;
+    char* language;
+    system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &region );
+    system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &language );
+    mRegion = std::string( region );
+    mLanguage = std::string( language );
   }
 
   ~Impl()
@@ -207,11 +215,32 @@ struct Framework::Impl
     }
   }
 
+  void SetLanguage( const std::string& language )
+  {
+    mLanguage = language;
+  }
+
+  void SetRegion( const std::string& region )
+  {
+    mRegion = region;
+  }
+
+  std::string GetLanguage() const
+  {
+    return mLanguage;
+  }
+
+  std::string GetRegion() const
+  {
+    return mRegion;
+  }
 
   // Data
   Type mApplicationType;
   CallbackBase* mAbortCallBack;
   CallbackManager *mCallbackManager;
+  std::string mLanguage;
+  std::string mRegion;
 
   Framework* mFramework;
   AppCore::AppEventHandlerPtr handlers[5];
@@ -316,7 +345,7 @@ struct Framework::Impl
     return 0;
   }
 
-  static int AppInit(int argc, char **argv, void *data)
+  static void AppInit(int argc, char **argv, void *data)
   {
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wold-style-cast"
@@ -325,7 +354,6 @@ struct Framework::Impl
     ecore_app_args_set( argc, (const char **)argv );
 
 #pragma GCC diagnostic pop
-    return 0;
   }
 
   static void AppFinish(void)
@@ -351,8 +379,9 @@ struct Framework::Impl
 
   static void AppLanguageChanged(AppCore::AppEventInfoPtr event, void *data)
   {
-    Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
+    Framework* framework = static_cast<Framework*>(data);
+    Observer *observer = &framework->mObserver;
+    framework->SetLanguage( std::string( static_cast<const char *>(event->value) ) );
     observer->OnLanguageChanged();
   }
 
@@ -362,23 +391,65 @@ struct Framework::Impl
 
   static void AppRegionChanged(AppCore::AppEventInfoPtr event, void *data)
   {
-    Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
+    Framework* framework = static_cast<Framework*>(data);
+    Observer *observer = &framework->mObserver;
+    framework->SetRegion( std::string( static_cast<const char *>(event->value) ) );
     observer->OnRegionChanged();
   }
 
   static void AppBatteryLow(AppCore::AppEventInfoPtr event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
+    int status = *static_cast<int *>(event->value);
+    Dali::DeviceStatus::Battery::Status result = Dali::DeviceStatus::Battery::NORMAL;
 
-    observer->OnBatteryLow();
+    // convert to dali battery status
+    switch( status )
+    {
+      case 1:
+      {
+        result = Dali::DeviceStatus::Battery::POWER_OFF;
+        break;
+      }
+      case 2:
+      {
+        result = Dali::DeviceStatus::Battery::CRITICALLY_LOW;
+        break;
+      }
+      default :
+        break;
+    }
+    observer->OnBatteryLow(result);
   }
 
   static void AppMemoryLow(AppCore::AppEventInfoPtr event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
+    int status = *static_cast<int *>(event->value);
+    Dali::DeviceStatus::Memory::Status result = Dali::DeviceStatus::Memory::NORMAL;
 
-    observer->OnMemoryLow();
+    // convert to dali memmory status
+    switch( status )
+    {
+      case 1:
+      {
+        result = Dali::DeviceStatus::Memory::NORMAL;
+        break;
+      }
+      case 2:
+      {
+        result = Dali::DeviceStatus::Memory::LOW;
+        break;
+      }
+      case 4:
+      {
+        result = Dali::DeviceStatus::Memory::CRITICALLY_LOW;
+        break;
+      }
+      default :
+        break;
+    }
+    observer->OnMemoryLow(result);
   }
 
 
@@ -453,34 +524,6 @@ struct Framework::Impl
     observer->OnAmbientChanged(ambient);
   }
 
-  static void WatchAppLanguageChanged(app_event_info_h event, void *data)
-  {
-    Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
-    observer->OnLanguageChanged();
-  }
-
-  static void WatchAppRegionChanged(app_event_info_h event, void *data)
-  {
-    Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
-    observer->OnRegionChanged();
-  }
-
-  static void WatchAppBatteryLow(app_event_info_h event, void *data)
-  {
-    Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
-    observer->OnBatteryLow();
-  }
-
-  static void WatchAppMemoryLow(app_event_info_h event, void *data)
-  {
-    Observer *observer = &static_cast<Framework*>(data)->mObserver;
-
-    observer->OnMemoryLow();
-  }
-
   static void WatchAppControl(app_control_h app_control, void *data)
   {
     Framework* framework = static_cast<Framework*>(data);
@@ -531,10 +574,10 @@ struct Framework::Impl
     mWatchCallback.ambient_tick = WatchAppAmbientTick;
     mWatchCallback.ambient_changed = WatchAppAmbientChanged;
 
-    watch_app_add_event_handler(&watchHandlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, WatchAppBatteryLow, mFramework);
-    watch_app_add_event_handler(&watchHandlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, WatchAppMemoryLow, mFramework);
-    watch_app_add_event_handler(&watchHandlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, WatchAppLanguageChanged, mFramework);
-    watch_app_add_event_handler(&watchHandlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, WatchAppRegionChanged, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::LOW_BATTERY], AppCore::LOW_BATTERY, AppBatteryLow, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::LOW_MEMORY], AppCore::LOW_MEMORY, AppMemoryLow, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::LANGUAGE_CHANGED], AppCore::LANGUAGE_CHANGED, AppLanguageChanged, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::REGION_FORMAT_CHANGED], AppCore::REGION_FORMAT_CHANGED, AppRegionChanged, mFramework);
 
     ret = watch_app_main(*mFramework->mArgc, *mFramework->mArgv, &mWatchCallback, mFramework);
 #endif
@@ -548,7 +591,6 @@ struct Framework::Impl
 #endif
   }
 
-
 private:
   // Undefined
   Impl( const Impl& impl );
@@ -688,6 +730,26 @@ void Framework::AbortCallback( )
   }
 }
 
+void Framework::SetLanguage( const std::string& language )
+{
+  mImpl->SetLanguage( language );
+}
+
+void Framework::SetRegion( const std::string& region )
+{
+  mImpl->SetRegion( region );
+}
+
+std::string Framework::GetLanguage() const
+{
+  return mImpl->GetLanguage();
+}
+
+std::string Framework::GetRegion() const
+{
+  return mImpl->GetRegion();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 22203cc..5fce3b6 100644 (file)
@@ -62,7 +62,9 @@ struct Framework::Impl
 
   Impl(void* data)
   : mAbortCallBack( NULL ),
-    mCallbackManager( CallbackManager::New() )
+    mCallbackManager( CallbackManager::New() ),
+    mLanguage( "NOT_SUPPORTED" ),
+    mRegion( "NOT_SUPPORTED" )
   {
   }
 
@@ -76,10 +78,22 @@ struct Framework::Impl
     delete mCallbackManager;
   }
 
-  // Data
+  std::string GetLanguage() const
+  {
+    return mLanguage;
+  }
 
+  std::string GetRegion() const
+  {
+    return mRegion;
+  }
+
+  // Data
   CallbackBase* mAbortCallBack;
   CallbackManager *mCallbackManager;
+  std::string mLanguage;
+  std::string mRegion;
+
   // Static methods
 
   /**
@@ -270,6 +284,16 @@ void Framework::InitThreads()
   XInitThreads();
 }
 
+std::string Framework::GetLanguage() const
+{
+  return mImpl->GetLanguage();
+}
+
+std::string Framework::GetRegion() const
+{
+  return mImpl->GetRegion();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index ab45e74..ec7cdc7 100644 (file)
@@ -317,11 +317,11 @@ void ImfManager::ApplyOptions(const InputMethodOptions& options)
 {
 }
 
-void ImfManager::SetInputPanelUserData( const std::string& data )
+void ImfManager::SetInputPanelData( const std::string& data )
 {
 }
 
-void ImfManager::GetInputPanelUserData( std::string& data )
+void ImfManager::GetInputPanelData( std::string& data )
 {
 }
 
index f93cfe5..ad4427f 100644 (file)
@@ -58,6 +58,8 @@ public:
   typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
   typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
   typedef Dali::ImfManager::KeyboardTypeSignalType ImfKeyboardTypeSignalType;
+  typedef Dali::ImfManager::KeyboardResizedSignalType KeyboardResizedSignalType;
+  typedef Dali::ImfManager::LanguageChangedSignalType LanguageChangedSignalType;
 
 public:
 
@@ -172,14 +174,14 @@ public:
   void ApplyOptions( const InputMethodOptions& options );
 
   /**
-   * @copydoc Dali::ImfManager::SetInputPanelUserData()
+   * @copydoc Dali::ImfManager::SetInputPanelData()
    */
-  void SetInputPanelUserData( const std::string& data );
+  void SetInputPanelData( const std::string& data );
 
   /**
-   * @copydoc Dali::ImfManager::GetInputPanelUserData()
+   * @copydoc Dali::ImfManager::GetInputPanelData()
    */
-  void GetInputPanelUserData( std::string& data );
+  void GetInputPanelData( std::string& data );
 
   /**
    * @copydoc Dali::ImfManager::GetInputPanelState()
@@ -236,12 +238,12 @@ public:  // Signals
   /**
    * @copydoc Dali::ImfManager::ResizedSignal()
    */
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  KeyboardResizedSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
 
   /**
    * @copydoc Dali::ImfManager::LanguageChangedSignal()
    */
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+  LanguageChangedSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::KeyboardTypeChangedSignal()
@@ -292,8 +294,8 @@ private:
   ImfManagerSignalType       mActivatedSignal;
   ImfEventSignalType         mEventSignal;
   ImfStatusSignalType        mKeyboardStatusSignal;
-  ImfVoidSignalType          mKeyboardResizeSignal;
-  ImfVoidSignalType          mKeyboardLanguageChangedSignal;
+  KeyboardResizedSignalType  mKeyboardResizeSignal;
+  LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   ImfKeyboardTypeSignalType  mKeyboardTypeChangedSignal;
 
   // Undefined
index ab267c2..d507f04 100644 (file)
@@ -111,6 +111,7 @@ Window::Window()
   mWMRotationAppSet( false ),
   mIsFocusAcceptable( true ),
   mVisible( true ),
+  mIconified( false ),
   mOpaqueState( false ),
   mResizeEnabled( true ),
   mIndicator( NULL ),
@@ -119,7 +120,7 @@ Window::Window()
   mIndicatorOpacityMode( Dali::Window::OPAQUE ),
   mOverlay( NULL ),
   mAdaptor( NULL ),
-  mType( Dali::DevelWindow::NORMAL ),
+  mType( Dali::Window::NORMAL ),
   mPreferredOrientation( Dali::Window::PORTRAIT ),
   mSupportedAuxiliaryHints(),
   mAuxiliaryHints(),
@@ -293,7 +294,7 @@ void Window::SetAcceptFocus( bool accept )
   mIsFocusAcceptable = accept;
 }
 
-bool Window::IsFocusAcceptable()
+bool Window::IsFocusAcceptable() const
 {
   return mIsFocusAcceptable;
 }
@@ -318,12 +319,17 @@ void Window::RotationDone( int orientation, int width, int height )
 {
 }
 
-unsigned int Window::GetSupportedAuxiliaryHintCount()
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
+}
+
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
 {
   return 0;
 }
 
-std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
 {
   return std::string();
 }
@@ -357,24 +363,24 @@ void Window::SetInputRegion( const Rect< int >& inputRegion )
 {
 }
 
-void Window::SetType( Dali::DevelWindow::Type type )
+void Window::SetType( Dali::Window::Type type )
 {
   mType = type;
 }
 
-Dali::DevelWindow::Type Window::GetType() const
+Dali::Window::Type Window::GetType() const
 {
   return mType;
 }
 
-bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
 {
   return false;
 }
 
-Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
+Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
 {
-  return Dali::DevelWindow::NotificationLevel::NONE;
+  return Dali::Window::NotificationLevel::NONE;
 }
 
 void Window::SetOpaqueState( bool opaque )
@@ -382,19 +388,19 @@ void Window::SetOpaqueState( bool opaque )
   mOpaqueState = opaque;
 }
 
-bool Window::IsOpaqueState()
+bool Window::IsOpaqueState() const
 {
   return mOpaqueState;
 }
 
-bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
+bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
 {
   return false;
 }
 
-Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
+Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
 {
-  return Dali::DevelWindow::ScreenMode::DEFAULT;
+  return Dali::Window::ScreenOffMode::TIMEOUT;
 }
 
 bool Window::SetBrightness( int brightness )
@@ -402,12 +408,12 @@ bool Window::SetBrightness( int brightness )
   return false;
 }
 
-int Window::GetBrightness()
+int Window::GetBrightness() const
 {
   return 0;
 }
 
-void Window::SetSize( Dali::DevelWindow::WindowSize size )
+void Window::SetSize( Dali::Window::WindowSize size )
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
@@ -418,23 +424,23 @@ void Window::SetSize( Dali::DevelWindow::WindowSize size )
 
     mSurface->MoveResize( positionSize );
 
-    mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 
     // Emit signal
-    mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
+    mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) );
 
-    mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
   }
 }
 
-Dali::DevelWindow::WindowSize Window::GetSize()
+Dali::Window::WindowSize Window::GetSize() const
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
-  return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
+  return Dali::Window::WindowSize( positionSize.width, positionSize.height );
 }
 
-void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
+void Window::SetPosition( Dali::Window::WindowPosition position )
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
@@ -447,11 +453,11 @@ void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
   }
 }
 
-Dali::DevelWindow::WindowPosition Window::GetPosition()
+Dali::Window::WindowPosition Window::GetPosition() const
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
-  return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
+  return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
 }
 
 void Window::SetTransparency( bool transparent )
index 7eea033..e63bf5d 100644 (file)
@@ -52,7 +52,6 @@
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/events/hover-event-integ.h>
 #include <dali/integration-api/events/wheel-event-integ.h>
-#include <dali/devel-api/events/key-event-devel.h>
 
 // INTERNAL INCLUDES
 #include <events/gesture-manager.h>
@@ -89,8 +88,8 @@ namespace
 
 const char * DETENT_DEVICE_NAME = "tizen_detent";
 const std::string DEFAULT_DEVICE_NAME = "";
-const DevelDevice::Class::Type DEFAULT_DEVICE_CLASS = DevelDevice::Class::NONE;
-const DevelDevice::Subclass::Type DEFAULT_DEVICE_SUBCLASS = DevelDevice::Subclass::NONE;
+const Device::Class::Type DEFAULT_DEVICE_CLASS = Device::Class::NONE;
+const Device::Subclass::Type DEFAULT_DEVICE_SUBCLASS = Device::Subclass::NONE;
 
 // DBUS accessibility
 #define A11Y_BUS "org.a11y.Bus"
index c9bef9c..ee60d59 100644 (file)
@@ -445,6 +445,7 @@ Eina_Bool ImfManager::RetrieveSurrounding( void* data, Ecore_IMF_Context* imfCon
   {
     if( text )
     {
+      // The memory allocated by strdup() can be freed by ecore_imf_context_surrounding_get() internally.
       *text = strdup( callbackData.currentText.c_str() );
     }
 
@@ -590,25 +591,28 @@ void ImfManager::ApplyOptions( const InputMethodOptions& options )
   }
 }
 
-void ImfManager::SetInputPanelUserData( const std::string& data )
+void ImfManager::SetInputPanelData( const std::string& data )
 {
-  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetInputPanelUserData\n" );
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetInputPanelData\n" );
 
   if( mIMFContext )
   {
     int length = data.length();
-    ecore_imf_context_input_panel_imdata_set( mIMFContext, &data, length );
+    ecore_imf_context_input_panel_imdata_set( mIMFContext, data.c_str(), length );
   }
 }
 
-void ImfManager::GetInputPanelUserData( std::string& data )
+void ImfManager::GetInputPanelData( std::string& data )
 {
-  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetInputPanelUserData\n" );
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetInputPanelData\n" );
 
   if( mIMFContext )
   {
-    int* length = NULL;
-    ecore_imf_context_input_panel_imdata_get( mIMFContext, &data, length );
+    int length = 4096; // The max length is 4096 bytes
+    Dali::Vector< char > buffer;
+    buffer.Resize( length );
+    ecore_imf_context_input_panel_imdata_get( mIMFContext, &buffer[0], &length );
+    data = std::string( buffer.Begin(), buffer.End() );
   }
 }
 
index 5d2148f..0af5d48 100644 (file)
@@ -348,6 +348,7 @@ Window::Window()
   mEcoreEventHander( true ),
   mIsFocusAcceptable( true ),
   mVisible( true ),
+  mIconified( false ),
   mOpaqueState( false ),
   mResizeEnabled( true ),
   mIndicator( NULL ),
@@ -356,7 +357,7 @@ Window::Window()
   mIndicatorOpacityMode( Dali::Window::OPAQUE ),
   mOverlay( NULL ),
   mAdaptor( NULL ),
-  mType( Dali::DevelWindow::NORMAL ),
+  mType( Dali::Window::NORMAL ),
   mEventHandler( NULL ),
   mPreferredOrientation( Dali::Window::PORTRAIT ),
   mSupportedAuxiliaryHints(),
@@ -740,7 +741,7 @@ void Window::SetAcceptFocus( bool accept )
   mIsFocusAcceptable = accept;
 }
 
-bool Window::IsFocusAcceptable()
+bool Window::IsFocusAcceptable() const
 {
   return mIsFocusAcceptable;
 }
@@ -809,22 +810,27 @@ void Window::RotationDone( int orientation, int width, int height )
                                      ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
                                      ECORE_X_ATOM_CARDINAL, 32, &angles, 2 );
 
-    mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) );
+    mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( width, height ) );
 
     // Emit signal
-    mResizedSignal.Emit( Dali::DevelWindow::WindowSize( width, height ) );
+    mResizedSignal.Emit( Dali::Window::WindowSize( width, height ) );
 
-    mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( width, height ) );
+    mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
 #endif // DALI_PROFILE_UBUNTU
   }
 }
 
-unsigned int Window::GetSupportedAuxiliaryHintCount()
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
+}
+
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
 {
   return 0;
 }
 
-std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
 {
   return std::string();
 }
@@ -858,24 +864,24 @@ void Window::SetInputRegion( const Rect< int >& inputRegion )
 {
 }
 
-void Window::SetType( Dali::DevelWindow::Type type )
+void Window::SetType( Dali::Window::Type type )
 {
   mType = type;
 }
 
-Dali::DevelWindow::Type Window::GetType() const
+Dali::Window::Type Window::GetType() const
 {
   return mType;
 }
 
-bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
 {
   return false;
 }
 
-Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
+Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
 {
-  return Dali::DevelWindow::NotificationLevel::NONE;
+  return Dali::Window::NotificationLevel::NONE;
 }
 
 void Window::SetOpaqueState( bool opaque )
@@ -883,19 +889,19 @@ void Window::SetOpaqueState( bool opaque )
   mOpaqueState = opaque;
 }
 
-bool Window::IsOpaqueState()
+bool Window::IsOpaqueState() const
 {
   return mOpaqueState;
 }
 
-bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
+bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
 {
   return false;
 }
 
-Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
+Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
 {
-  return Dali::DevelWindow::ScreenMode::DEFAULT;
+  return Dali::Window::ScreenOffMode::TIMEOUT;
 }
 
 bool Window::SetBrightness( int brightness )
@@ -903,12 +909,12 @@ bool Window::SetBrightness( int brightness )
   return false;
 }
 
-int Window::GetBrightness()
+int Window::GetBrightness() const
 {
   return 0;
 }
 
-void Window::SetSize( Dali::DevelWindow::WindowSize size )
+void Window::SetSize( Dali::Window::WindowSize size )
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
@@ -919,23 +925,23 @@ void Window::SetSize( Dali::DevelWindow::WindowSize size )
 
     mSurface->MoveResize( positionSize );
 
-    mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 
     // Emit signal
-    mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
+    mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) );
 
-    mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
   }
 }
 
-Dali::DevelWindow::WindowSize Window::GetSize()
+Dali::Window::WindowSize Window::GetSize() const
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
-  return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
+  return Dali::Window::WindowSize( positionSize.width, positionSize.height );
 }
 
-void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
+void Window::SetPosition( Dali::Window::WindowPosition position )
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
@@ -948,11 +954,11 @@ void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
   }
 }
 
-Dali::DevelWindow::WindowPosition Window::GetPosition()
+Dali::Window::WindowPosition Window::GetPosition() const
 {
   PositionSize positionSize = mSurface->GetPositionSize();
 
-  return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
+  return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
 }
 
 void Window::SetTransparency( bool transparent )
index 2292b64..c953ca4 100644 (file)
@@ -31,6 +31,7 @@ LIST(APPEND TC_SOURCES
     ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
     ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
     ../dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp
+    ../dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
 )
 
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
@@ -40,6 +41,7 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
 )
 
 ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror )
+ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
 
 # Shouldn't have to do this!
 # But CMake's new auto-escape quote policy doesn't work right.
index 8f66578..81ee574 100644 (file)
@@ -22,6 +22,7 @@
 #include <Ecore.h>
 #include <dali/dali.h>
 #include <dali-test-suite-utils.h>
+#include <adaptor-test-application.h>
 #include <tilt-sensor-impl.h>
 
 using namespace Dali;
@@ -112,7 +113,7 @@ void tilt_sensor_cleanup(void)
 
 int UtcDaliTiltSensorStart(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorStart");
 
@@ -127,7 +128,7 @@ int UtcDaliTiltSensorStart(void)
 
 int UtcDaliTiltSensorStop(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorStop");
 
@@ -144,7 +145,7 @@ int UtcDaliTiltSensorStop(void)
 
 int UtcDaliTiltSensorIsStarted(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorIsStarted");
 
@@ -158,7 +159,7 @@ int UtcDaliTiltSensorIsStarted(void)
 
 int UtcDaliTiltSensorGetRoll(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorGetRoll");
 
@@ -172,7 +173,7 @@ int UtcDaliTiltSensorGetRoll(void)
 
 int UtcDaliTiltSensorGetPitch(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorGetPitch");
 
@@ -186,7 +187,7 @@ int UtcDaliTiltSensorGetPitch(void)
 
 int UtcDaliTiltSensorGetRotation(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorGetRotation");
 
@@ -208,7 +209,7 @@ int UtcDaliTiltSensorGetRotation(void)
 
 int UtcDaliTiltSensorSignalTilted(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorSignalTilted");
 
@@ -225,7 +226,7 @@ int UtcDaliTiltSensorSignalTilted(void)
 
 int UtcDaliTiltSensorSetUpdateFrequency(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorSetUpdateFrequency");
 
@@ -243,7 +244,7 @@ int UtcDaliTiltSensorSetUpdateFrequency(void)
 
 int UtcDaliTiltSensorSetRotationThreshold01(void)
 {
-  TestApplication application;
+  AdaptorTestApplication application;
 
   tet_infoline("UtcDaliTiltSensorSetRotationThreshold01");
 
index ee64cb2..41cc886 100644 (file)
@@ -34,6 +34,7 @@ LIST(APPEND TC_SOURCES
     dali-test-suite-utils/test-platform-abstraction.cpp
     dali-test-suite-utils/test-render-controller.cpp
     dali-test-suite-utils/test-trace-call-stack.cpp
+    dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
 )
 
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
new file mode 100644 (file)
index 0000000..5b3847a
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017 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 "adaptor-test-adaptor-impl.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+bool Adaptor::mAvailable = false;
+
+bool Adaptor::IsAvailable()
+{
+  return mAvailable;
+}
+
+void Adaptor::SetAvailable()
+{
+  mAvailable = true;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.h
new file mode 100644 (file)
index 0000000..38a8e77
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef __DALI_ADAPTOR_TEST_ADAPTOR_IMPL_H__
+#define __DALI_ADAPTOR_TEST_ADAPTOR_IMPL_H__
+
+/*
+ * Copyright (c) 2017 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.
+ *
+ */
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class Adaptor
+{
+public:
+  static bool IsAvailable();
+  static void SetAvailable();
+
+  Adaptor() {}
+  ~Adaptor() {}
+
+public:
+  static bool mAvailable;
+};
+
+} // Adaptor
+
+} // Internal
+
+} // Dali
+
+#endif  // __DALI_ADAPTOR_TEST_ADAPTOR_IMPL_H__
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h
new file mode 100644 (file)
index 0000000..270ab57
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef __DALI_ADAPTOR_TEST_APPLICATION_H__
+#define __DALI_ADAPTOR_TEST_APPLICATION_H__
+
+/*
+ * Copyright (c) 2017 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include "test-application.h"
+#include "adaptor-test-adaptor-impl.h"
+
+namespace Dali
+{
+
+/**
+ * Adds some functionality on top of TestApplication that is required by the Adaptor.
+ */
+class AdaptorTestApplication : public TestApplication
+{
+public:
+
+  AdaptorTestApplication( size_t surfaceWidth  = DEFAULT_SURFACE_WIDTH,
+                          size_t surfaceHeight = DEFAULT_SURFACE_HEIGHT,
+                          float  horizontalDpi = DEFAULT_HORIZONTAL_DPI,
+                          float  verticalDpi   = DEFAULT_VERTICAL_DPI )
+  : TestApplication( false, surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi )
+  {
+    Initialize();
+
+    Internal::Adaptor::Adaptor::SetAvailable();
+  }
+
+  ~AdaptorTestApplication()
+  {
+  }
+};
+
+} // namespace Dali
+
+#endif // __DALI_ADAPTOR_TEST_APPLICATION_H__
index 8877a50..b38428b 100644 (file)
@@ -117,6 +117,7 @@ void DALI_TEST_EQUALS( const Matrix3& matrix1, const Matrix3& matrix2, const cha
                m1[6],  m1[7], m1[8],   m2[6],  m2[7], m2[8]);
 
     tet_result(TET_FAIL);
+    throw("TET_FAIL");
   }
   else
   {
@@ -147,6 +148,7 @@ void DALI_TEST_EQUALS( const Matrix3& matrix1, const Matrix3& matrix2, float eps
                m1[6],  m1[7], m1[8],   m2[6],  m2[7], m2[8]);
 
     tet_result(TET_FAIL);
+    throw("TET_FAIL");
   }
   else
   {
@@ -183,6 +185,7 @@ void DALI_TEST_EQUALS( const Matrix& matrix1, const Matrix& matrix2, const char*
               m1[12], m1[13], m1[14], m1[15],  m2[12], m2[13], m2[14], m2[15]);
 
     tet_result(TET_FAIL);
+    throw("TET_FAIL");
   }
   else
   {
@@ -214,6 +217,7 @@ void DALI_TEST_EQUALS( const Matrix& matrix1, const Matrix& matrix2, float epsil
               m1[12], m1[13], m1[14], m1[15],  m2[12], m2[13], m2[14], m2[15]);
 
     tet_result(TET_FAIL);
+    throw("TET_FAIL");
   }
   else
   {
@@ -251,6 +255,7 @@ void DALI_TEST_EQUALS( Property::Value& str1, const char* str2, const char* loca
   else
   {
     tet_result(TET_FAIL);
+    throw("TET_FAIL");
   }
 }
 
@@ -265,6 +270,7 @@ void DALI_TEST_ASSERT( DaliException& e, std::string conditionSubString, const c
   {
     fprintf(stderr, "Expected substring '%s' : actual exception string '%s' : location %s\n", conditionSubString.c_str(), e.condition, location );
     tet_result(TET_FAIL);
+    throw("TET_FAIL");
   }
   else
   {
@@ -294,6 +300,7 @@ void ConstraintAppliedCheck::CheckSignalReceived()
   {
     fprintf(stderr,  "Expected Applied signal was not received\n" );
     tet_result( TET_FAIL );
+    throw("TET_FAIL");
   }
   else
   {
@@ -307,6 +314,7 @@ void ConstraintAppliedCheck::CheckSignalNotReceived()
   {
     fprintf(stderr,  "Unexpected Applied signal was received\n" );
     tet_result( TET_FAIL );
+    throw("TET_FAIL");
   }
   else
   {
index 2b84d39..4f71920 100644 (file)
@@ -40,11 +40,24 @@ using namespace Dali;
 #define STRINGIZE_I(text) #text
 #define STRINGIZE(text) STRINGIZE_I(text)
 
-// the following is the other compilers way of token pasting, gcc seems to just concatenate strings automatically
-//#define TOKENPASTE(x,y) x ## y
-#define TOKENPASTE(x,y) x y
-#define TOKENPASTE2(x,y) TOKENPASTE( x, y )
-#define TEST_LOCATION TOKENPASTE2( "Test failed in ", TOKENPASTE2( __FILE__, TOKENPASTE2( ", line ", STRINGIZE(__LINE__) ) ) )
+/**
+ * Inspired by https://stackoverflow.com/questions/1706346/file-macro-manipulation-handling-at-compile-time
+ * answer by Chetan Reddy
+ */
+constexpr int32_t basenameIndex( const char * const path, const int32_t index = 0, const int32_t slashIndex = -1 )
+{
+   return path[ index ]
+       ? ( path[ index ] == '/'
+           ? basenameIndex( path, index + 1, index )
+           : basenameIndex( path, index + 1, slashIndex ) )
+       : ( slashIndex + 1 );
+}
+
+#define __FILELINE__ ( { static const int32_t basenameIdx = basenameIndex( __FILE__ ); \
+                         static_assert (basenameIdx >= 0, "compile-time basename" );   \
+                         __FILE__ ":" STRINGIZE(__LINE__) + basenameIdx ; } )
+
+#define TEST_LOCATION __FILELINE__
 #define TEST_INNER_LOCATION(x) ( std::string(x) + " (" + STRINGIZE(__LINE__) + ")" ).c_str()
 
 #define TET_UNDEF 2
@@ -73,7 +86,7 @@ if ( (condition) )
 }                                                                                         \
 else                                                                                      \
 {                                                                                         \
-  fprintf(stderr, "%s Failed in %s at line %d\n", __PRETTY_FUNCTION__, __FILE__, __LINE__);    \
+  fprintf(stderr, "Test failed in %s, condition: %s\n", __FILELINE__, #condition );       \
   tet_result(TET_FAIL);                                                                   \
   throw("TET_FAIL");                                                                      \
 }
@@ -97,8 +110,9 @@ inline void DALI_TEST_EQUALS(Type value1, Type value2, const char* location)
   {
     std::ostringstream o;
     o << value1 << " == " << value2 << std::endl;
-    fprintf(stderr, "%s, checking %s", location, o.str().c_str());
+    fprintf(stderr, "Test failed in %s, checking %s", location, o.str().c_str());
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else
   {
@@ -106,6 +120,13 @@ inline void DALI_TEST_EQUALS(Type value1, Type value2, const char* location)
   }
 }
 
+/**
+ * Test whether two values are equal.
+ * @param[in] value1 The first value
+ * @param[in] value2 The second value
+ */
+#define DALI_TEST_EQUAL( v1, v2 ) DALI_TEST_EQUALS( v1, v2, __FILELINE__ )
+
 template<typename Type>
 inline void DALI_TEST_EQUALS(Type value1, Type value2, float epsilon, const char* location)
 {
@@ -113,8 +134,9 @@ inline void DALI_TEST_EQUALS(Type value1, Type value2, float epsilon, const char
   {
     std::ostringstream o;
     o << value1 << " == " << value2 << std::endl;
-    fprintf(stderr, "%s, checking %s", location, o.str().c_str());
+    fprintf(stderr, "Test failed in %s, checking %s", location, o.str().c_str());
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else
   {
@@ -129,8 +151,9 @@ inline void DALI_TEST_NOT_EQUALS(Type value1, Type value2, float epsilon, const
   {
     std::ostringstream o;
     o << value1 << " !=  " << value2 << std::endl;
-    fprintf(stderr, "%s, checking %s", location, o.str().c_str());
+    fprintf(stderr, "Test failed in %s, checking %s", location, o.str().c_str());
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else
   {
@@ -151,13 +174,15 @@ inline void DALI_TEST_EQUALS<TimePeriod>( TimePeriod value1, TimePeriod value2,
 {
   if ((fabs(value1.durationSeconds - value2.durationSeconds) > epsilon))
   {
-    fprintf(stderr, "%s, checking durations %f == %f, epsilon %f\n", location, value1.durationSeconds, value2.durationSeconds, epsilon);
+    fprintf(stderr, "Test failed in %s, checking durations %f == %f, epsilon %f\n", location, value1.durationSeconds, value2.durationSeconds, epsilon);
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else if ((fabs(value1.delaySeconds - value2.delaySeconds) > epsilon))
   {
-    fprintf(stderr, "%s, checking delays %f == %f, epsilon %f\n", location, value1.delaySeconds, value2.delaySeconds, epsilon);
+    fprintf(stderr, "Test failed in %s, checking delays %f == %f, epsilon %f\n", location, value1.delaySeconds, value2.delaySeconds, epsilon);
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else
   {
@@ -232,8 +257,9 @@ inline void DALI_TEST_EQUALS<const char*>( const char* str1, const char* str2, c
 {
   if (strcmp(str1, str2))
   {
-    fprintf(stderr, "%s, checking '%s' == '%s'\n", location, str1, str2);
+    fprintf(stderr, "Test failed in %s, checking '%s' == '%s'\n", location, str1, str2);
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else
   {
@@ -289,8 +315,9 @@ void DALI_TEST_GREATER( T value1, T value2, const char* location)
 {
   if (!(value1 > value2))
   {
-    std::cerr << location << ", checking " << value1 <<" > " << value2 << "\n";
+    std::cerr << "Test failed in " << location << ", checking " << value1 <<" > " << value2 << "\n";
     tet_result(TET_FAIL);
+    throw("TET_FAIL");                                                                      \
   }
   else
   {
index 6636676..54a69bb 100644 (file)
@@ -62,13 +62,13 @@ void TestApplication::Initialize()
   // We always need the first update!
   mStatus.keepUpdating = Integration::KeepUpdating::STAGE_KEEP_RENDERING;
 
-  mCore = Dali::Integration::Core::New(
-    mRenderController,
-    mPlatformAbstraction,
-    mGlAbstraction,
-    mGlSyncAbstraction,
-    mGestureManager,
-    mDataRetentionPolicy);
+  mCore = Dali::Integration::Core::New( mRenderController,
+                                        mPlatformAbstraction,
+                                        mGlAbstraction,
+                                        mGlSyncAbstraction,
+                                        mGestureManager,
+                                        mDataRetentionPolicy,
+                                        false );
 
   mCore->ContextCreated();
   mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
@@ -171,7 +171,7 @@ void TestApplication::DoUpdate( unsigned int intervalMilliseconds, const char* l
   unsigned int nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
   float elapsedSeconds = intervalMilliseconds / 1e3f;
 
-  mCore->Update( elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus );
+  mCore->Update( elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false );
 
   GetRenderController().Initialize();
 
index dd6ba24..5870028 100644 (file)
@@ -105,6 +105,15 @@ inline bool CompareType<Degree>(Degree q1, Degree q2, float epsilon)
 }
 
 template <>
+inline bool CompareType<Extents>(Extents extents1, Extents extents2, float epsilon)
+{
+  return (extents1.start == extents2.start) &&
+         (extents1.end == extents2.end) &&
+         (extents1.top == extents2.top) &&
+         (extents1.bottom == extents2.bottom);
+}
+
+template <>
 inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2, float epsilon)
 {
   Property::Type type = q1.GetType();
@@ -191,6 +200,14 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       result = false;
       break;
     }
+    case Property::EXTENTS:
+    {
+      Extents a, b;
+      q1.Get(a);
+      q2.Get(b);
+      result = CompareType<Extents>( a, b, epsilon );
+      break;
+    }
     case Property::NONE:
     {
       result = false;
index c4bc01d..02439bc 100644 (file)
@@ -85,6 +85,7 @@ void TestGlAbstraction::Initialize()
   mEnableDisableTrace.Reset();
   mShaderTrace.Reset();
   mStencilFunctionTrace.Reset();
+  mScissorTrace.Reset();
   mTextureTrace.Reset();
   mTexParamaterTrace.Reset();
   mDrawTrace.Reset();
index 8408b10..b306c3e 100644 (file)
@@ -949,6 +949,15 @@ public:
     mScissorParams.y = y;
     mScissorParams.width = width;
     mScissorParams.height = height;
+
+    std::stringstream out;
+    out << x << ", " << y << ", " << width << ", " << height;
+    TraceCallStack::NamedParams namedParams;
+    namedParams["x"] = ToString( x );
+    namedParams["y"] = ToString( y );
+    namedParams["width"] = ToString( width );
+    namedParams["height"] = ToString( height );
+    mScissorTrace.PushCall( "Scissor", out.str(), namedParams );
   }
 
   inline void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
@@ -1951,6 +1960,11 @@ public: // TEST FUNCTIONS
   inline void ResetStencilFunctionCallStack() { mStencilFunctionTrace.Reset(); }
   inline TraceCallStack& GetStencilFunctionTrace() { return mStencilFunctionTrace; }
 
+  //Methods for Scissor verification
+  inline void EnableScissorCallTrace(bool enable) { mScissorTrace.Enable(enable); }
+  inline void ResetScissorCallStack() { mScissorTrace.Reset(); }
+  inline TraceCallStack& GetScissorTrace() { return mScissorTrace; }
+
   //Methods for Uniform function verification
   inline void EnableSetUniformCallTrace(bool enable) { mSetUniformTrace.Enable(enable); }
   inline void ResetSetUniformCallStack() { mSetUniformTrace.Reset(); }
@@ -2189,6 +2203,7 @@ private:
   TraceCallStack mDrawTrace;
   TraceCallStack mDepthFunctionTrace;
   TraceCallStack mStencilFunctionTrace;
+  TraceCallStack mScissorTrace;
   TraceCallStack mSetUniformTrace;
 
   // Shaders & Uniforms
index 840ef0d..645d74b 100644 (file)
@@ -52,7 +52,14 @@ int RunTestCase( struct ::testcase_s& testCase )
   {
     testCase.startup();
   }
-  result = testCase.function();
+  try
+  {
+    result = testCase.function();
+  }
+  catch( const char* )
+  {
+    // just catch test fail exception, return is already set to EXIT_STATUS_TESTCASE_FAILED
+  }
   if( testCase.cleanup )
   {
     testCase.cleanup();
index f3b04ad..6f845d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -29,12 +29,12 @@ TestRenderController::~TestRenderController()
 {
 }
 
-void TestRenderController::RequestUpdate()
+void TestRenderController::RequestUpdate( bool forceUpdate )
 {
   mRequestUpdateCalled = true;
 }
 
-void TestRenderController::RequestProcessEventsOnIdle()
+void TestRenderController::RequestProcessEventsOnIdle( bool forceProcess )
 {
   mRequestProcessEventsOnIdleCalled = true;
 }
index b00fbf0..3ad63d3 100644 (file)
@@ -2,7 +2,7 @@
 #define __TEST_RENDER_CONTROLLER_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -31,8 +31,8 @@ public:
   TestRenderController();
   ~TestRenderController();
 
-  virtual void RequestUpdate();
-  virtual void RequestProcessEventsOnIdle();
+  virtual void RequestUpdate( bool forceUpdate );
+  virtual void RequestProcessEventsOnIdle( bool forceProcess );
 
   typedef enum
   {
index 829997d..a237f50 100644 (file)
@@ -67,6 +67,14 @@ void ApplicationControlSignalCallback(Application&, void *)
 
 } // unnamed namespace
 
+void LowBatterySignalCallback( Dali::DeviceStatus::Battery::Status status )
+{
+}
+
+void LowMemorySignalCallback( Dali::DeviceStatus::Memory::Status status )
+{
+}
+
 int UtcDaliApplicationNew01(void)
 {
   Application application = Application::New();
@@ -611,6 +619,58 @@ int UtcDaliApplicationMemoryLowSignalN(void)
   END_TEST;
 }
 
+int UtcDaliApplicationLowBatterySignalP(void)
+{
+  Application application = Application::New();
+  application.LowBatterySignal().Connect( &LowBatterySignalCallback );
+  DALI_TEST_CHECK( application );
+
+  END_TEST;
+}
+
+int UtcDaliApplicationLowBatterySignalN(void)
+{
+  Application application;
+
+  try
+  {
+    application.LowBatterySignal().Connect( &LowBatterySignalCallback );
+    DALI_TEST_CHECK( false ); // Should not get here
+  }
+  catch( ... )
+  {
+    DALI_TEST_CHECK( true );
+  }
+
+  END_TEST;
+}
+
+int UtcDaliApplicationLowMemorySignalP(void)
+{
+  Application application = Application::New();
+  application.LowMemorySignal().Connect( &LowMemorySignalCallback );
+  DALI_TEST_CHECK( application );
+
+  END_TEST;
+}
+
+int UtcDaliApplicationLowMemorySignalN(void)
+{
+  Application application;
+
+  try
+  {
+    application.LowMemorySignal().Connect( &LowMemorySignalCallback );
+    DALI_TEST_CHECK( false ); // Should not get here
+  }
+  catch( ... )
+  {
+    DALI_TEST_CHECK( true );
+  }
+
+  END_TEST;
+}
+
 int UtcDaliApplicationGetResourcePathP(void)
 {
   Application application = Application::New();
@@ -621,3 +681,22 @@ int UtcDaliApplicationGetResourcePathP(void)
   END_TEST;
 }
 
+int UtcDaliApplicationGetRegionP(void)
+{
+  Application application = Application::New();
+  std::string result;
+  result = application.GetRegion();
+  DALI_TEST_CHECK( result == "NOT_SUPPORTED" ); // Not supported in UBUNTU
+
+  END_TEST;
+}
+
+int UtcDaliApplicationGetLanguageP(void)
+{
+  Application application = Application::New();
+  std::string result;
+  result = application.GetLanguage();
+  DALI_TEST_CHECK( result == "NOT_SUPPORTED" ); // Not supported in UBUNTU
+
+  END_TEST;
+}
index 24a17d0..709b2c9 100644 (file)
@@ -717,3 +717,36 @@ int UtcDaliPixelBufferMask09(void)
 
   END_TEST;
 }
+
+int UtcDaliPixelBufferGaussianBlur(void)
+{
+  TestApplication application;
+
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( 10, 10, Pixel::RGBA8888 );
+  FillCheckerboard(imageData);
+
+  DALI_TEST_EQUALS( imageData.GetWidth(), 10, TEST_LOCATION ) ;
+  DALI_TEST_EQUALS( imageData.GetHeight(), 10, TEST_LOCATION ) ;
+
+  unsigned char* buffer = imageData.GetBuffer();
+
+  // Test that an even pixel in the odd row has full alpha value
+  DALI_TEST_EQUALS( buffer[43], 0xffu, TEST_LOCATION );
+
+  // Test that an even pixel in the even row has no alpha value
+  DALI_TEST_EQUALS( buffer[55], 0x00u, TEST_LOCATION );
+
+  imageData.ApplyGaussianBlur( 0.0f );
+
+  // Test that the pixels' alpha values are not changed because there is no blur
+  DALI_TEST_EQUALS( buffer[43], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS( buffer[55], 0x00u, TEST_LOCATION );
+
+  imageData.ApplyGaussianBlur( 1.0f );
+
+  // Test that the pixels' alpha values are changed after applying gaussian blur
+  DALI_TEST_EQUALS( buffer[43], 0x7Au, TEST_LOCATION );
+  DALI_TEST_EQUALS( buffer[55], 0x7Eu, TEST_LOCATION );
+
+  END_TEST;
+}
index ecd4638..bbd8555 100644 (file)
@@ -21,6 +21,7 @@
 #include <dali/dali.h>
 #include <Ecore.h>
 #include <dali-test-suite-utils.h>
+#include <adaptor-test-application.h>
 
 using namespace Dali;
 
@@ -116,7 +117,8 @@ public:
 // Positive test case for a method
 int UtcDaliTimerCreation(void)
 {
- // TestApplication application;
+  AdaptorTestApplication application;
+
   tet_printf("timer creation \n");
   Timer timer = Timer::New(300);
 
@@ -129,6 +131,8 @@ int UtcDaliTimerCreation(void)
 
 int UtcDaliTimerUnitializedStart(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("unintialized timer start \n");
 
   Timer *timer = new Timer;
@@ -147,6 +151,8 @@ int UtcDaliTimerUnitializedStart(void)
 
 int UtcDaliTimerUnitializedStop(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("unintialized timer stop \n");
 
   Timer *timer = new Timer;
@@ -165,6 +171,8 @@ int UtcDaliTimerUnitializedStop(void)
 
 int UtcDaliTimerUnitializedGetInterval(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("unintialized get interval \n");
 
   Timer *timer = new Timer;
@@ -183,6 +191,8 @@ int UtcDaliTimerUnitializedGetInterval(void)
 
 int UtcDaliTimerUnitializedSetInterval(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("unintialized set interval \n");
 
   Timer *timer = new Timer;
@@ -201,6 +211,8 @@ int UtcDaliTimerUnitializedSetInterval(void)
 
 int UtcDaliTimerUnitializedIsRunning(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("unintialized is running \n");
 
   Timer *timer = new Timer;
@@ -220,6 +232,8 @@ int UtcDaliTimerUnitializedIsRunning(void)
 
 int UtcDaliTimerUnitializedSignalTick(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("unintialized SignalTick \n");
 
   Timer *timer = new Timer;
@@ -240,6 +254,8 @@ int UtcDaliTimerUnitializedSignalTick(void)
 
 int UtcDaliTimerSetInterval(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("timer set interval \n");
   Timer timer = Timer::New(10);
 
@@ -254,6 +270,8 @@ int UtcDaliTimerSetInterval(void)
 
 int UtcDaliTimerCopyConstructor(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("timer copy constructor \n");
   Timer timer = Timer::New(10);
 
@@ -265,6 +283,8 @@ int UtcDaliTimerCopyConstructor(void)
 
 int UtcDaliTimerAssignmentOperator(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("assignmnet constructor \n");
 
   Timer timer = Timer::New(10);
@@ -294,6 +314,8 @@ int UtcDaliTimerAssignmentOperator(void)
 
 int UtcDaliTimerIsRunning(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("timer is running \n");
 
   Timer timer = Timer::New(100);
@@ -311,6 +333,8 @@ int UtcDaliTimerIsRunning(void)
 
 int UtcDaliTimerSignalTickContinue(void)
 {
+  AdaptorTestApplication application;
+
   tet_printf("timer call back\n");
 
   Timer timer = Timer::New(100);
@@ -329,6 +353,8 @@ int UtcDaliTimerSignalTickContinue(void)
 
 int UtcDaliTimerSignalTickStop(void)
 {
+  AdaptorTestApplication application;
+
   Timer timer = Timer::New(100);
   TimerTestClass testClass(false);
 
@@ -345,6 +371,8 @@ int UtcDaliTimerSignalTickStop(void)
 
 int UtcDaliTimerReset(void)
 {
+  AdaptorTestApplication application;
+
   Timer timer = Timer::New(100);
 
   DALI_TEST_CHECK(timer);
@@ -358,6 +386,8 @@ int UtcDaliTimerReset(void)
 
 int UtcDaliTimerDownCastP(void)
 {
+  AdaptorTestApplication application;
+
   Timer timer = Timer::New(100);
   Timer cast = Timer::DownCast( timer );
 
@@ -368,6 +398,8 @@ int UtcDaliTimerDownCastP(void)
 
 int UtcDaliTimerDownCastN(void)
 {
+  AdaptorTestApplication application;
+
   Timer timer;
   Timer cast = Timer::DownCast( timer );
 
index 4a3639c..36174e8 100644 (file)
@@ -18,7 +18,6 @@
 #include <dali/dali.h>
 #include <Ecore_X.h>
 #include <devel-api/adaptor-framework/drag-and-drop-detector.h>
-#include <devel-api/adaptor-framework/window-devel.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
@@ -351,7 +350,7 @@ int UtcDaliWindowSetAcceptFocusN(void)
   Dali::Window window;
   try
   {
-    DevelWindow::SetAcceptFocus( window, true );
+    window.SetAcceptFocus( true );
     DALI_TEST_CHECK( false ); // Should not reach here!
   }
   catch( ... )
@@ -367,7 +366,7 @@ int UtcDaliWindowIsFocusAcceptableN(void)
   Dali::Window window;
   try
   {
-    DevelWindow::IsFocusAcceptable( window );
+    window.IsFocusAcceptable();
     DALI_TEST_CHECK( false ); // Should not reach here!
   }
   catch( ... )
@@ -399,7 +398,7 @@ int UtcDaliWindowFocusChangedSignalN(void)
   Dali::Window window;
   try
   {
-    DevelWindow::FocusChangedSignal( window );
+    window.FocusChangedSignal();
     DALI_TEST_CHECK( false ); // Should not reach here!
   }
   catch( ... )
index 3705a12..6ad89b6 100644 (file)
@@ -22,6 +22,7 @@ LIST(APPEND TC_SOURCES
     ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
     ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
     ../dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp
+    ../dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
     tct-dali-platform-abstraction-core.cpp
     utc-image-loading-common.cpp
 )
@@ -32,7 +33,7 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
 )
 
 ADD_COMPILE_OPTIONS(-O0 -ggdb --coverage -Wall -Werror)
-
+ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
 
 # Shouldn't have to do this!
 # But CMake's new auto-escape quote policy doesn't work right.
index 98b840c..c0d295d 100644 (file)
@@ -24,15 +24,9 @@ AC_ARG_ENABLE([feedback],
               [enable_feedback=yes],
               [enable_feedback=no])
 
-AC_ARG_ENABLE([videoplayer],
-              [AC_HELP_STRING([ --enable-videoplayer],
-                              [Enable video player plugin])],
-              [enable_videoplayer=yes],
-              [enable_videoplayer=no])
-
 AC_CONFIG_SUBDIRS(adaptor)
 
-if test "x$enable_feedback" = "xyes" || test "x$enable_videoplayer" = "xyes"; then
+if test "x$enable_feedback" = "xyes"; then
   # build dali-adaptor & plugins
   AC_CONFIG_SUBDIRS(plugins)
 fi
index 7e690be..71e55d0 100644 (file)
@@ -31,25 +31,13 @@ if USE_FEEDBACK
 lib_LTLIBRARIES += libdali-feedback-plugin.la
 endif
 
-if WAYLAND
-if USE_VIDEOPLAYER
-lib_LTLIBRARIES += libdali-video-player-plugin.la
-endif
-endif
-
-else
+else # ENABLE_CXX03_ABI
 
 if USE_FEEDBACK
 lib_LTLIBRARIES += libdali-feedback-plugin-cxx11.la
 endif
 
-if WAYLAND
-
-if USE_VIDEOPLAYER
-lib_LTLIBRARIES += libdali-video-player-plugin-cxx11.la
-endif
-endif
-endif
+endif # ENABLE_CXX03_ABI
 
 if USE_FEEDBACK
 dalisounddir = ${dataReadOnlyDir}/plugins/sounds/
@@ -88,42 +76,6 @@ LIBDALI_FEEDBACK_PLUGIN_LA_LIBADD += \
 
 endif
 
-# VideoPlayer
-if WAYLAND
-if USE_VIDEOPLAYER
-
-LIBDALI_VIDEO_PLAYER_PLUGIN_LA_SOURCES = \
-                     $(video_player_plugin_src_files)
-
-libdali_video_player_plugin_la__DEPENDENCIES =
-
-LIBDALI_VIDEO_PLAYER_PLUGIN_LA_CXXFLAGS = -DDALI_COMPILATION \
-                      -DDALI_ADAPTOR_COMPILATION \
-                      $(DLOG_CFLAGS) \
-                      $(DALICORE_CFLAGS) \
-                      $(ECORE_WAYLAND_CFLAGS) \
-                      $(CAPI_MEDIA_PLAYER_CFLAGS) \
-                      $(DALI_PROFILE_CFLAGS) \
-                      $(DALI_ADAPTOR_CFLAGS) \
-                      -I../../../adaptors/public-api \
-                      -I../../../adaptors/devel-api \
-                      -I../../../adaptors/devel-api/adaptor-framework \
-                      -I../../../adaptors/integration-api \
-                      -I../../../adaptors/public-api/adaptor-framework \
-                      -I../../../plugins/video-player \
-                      -Werror -Wall
-
-LIBDALI_VIDEO_PLAYER_PLUGIN_LA_LIBADD = \
-                      $(DLOG_LIBS) \
-                      $(ECORE_WAYLAND_LIBS) \
-                      $(CAPI_MEDIA_PLAYER_LIBS)
-
-LIBDALI_VIDEO_PLAYER_PLUGIN_LA_LDFLAGS = \
-                      -rdynamic
-
-endif # USE_VIDEOPLAYER
-endif # WAYLAND
-
 if ENABLE_CXX03_ABI
 
 if USE_FEEDBACK
@@ -141,23 +93,6 @@ install: install-am
 endif
 endif
 
-if WAYLAND
-if USE_VIDEOPLAYER
-libdali_video_player_plugin_la_SOURCES = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_SOURCES)
-libdali_video_player_plugin_la_CXXFLAGS = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_CXXFLAGS)
-libdali_video_player_plygin_la_LIBADD = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_LIBADD)
-libdali_video_player_plugin_la_LDFLAGS = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_LDFLAGS)
-
-if ENABLE_RENAME_SO
-#rename
-install: install-am
-       rm -rf $(libdir)/libdali_video_player_plugin.so
-       rm -rf $(libdir)/libdali_video_player_plugin-cxx03.so
-       ln -s $(libdir)/libdali_video_player_plugin.so.0.0.* $(libdir)/libdali_video_player_plugin-cxx03.so
-endif
-endif
-endif
-
 else # CXX03
 
 if USE_FEEDBACK
@@ -175,21 +110,4 @@ install: install-am
 endif
 endif
 
-if WAYLAND
-if USE_VIDEOPLAYER
-libdali_video_player_plugin_cxx11_la_SOURCES = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_SOURCES)
-libdali_video_player_plugin_cxx11_la_CXXFLAGS = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_CXXFLAGS)
-libdali_video_player_plygin_cxx11_la_LIBADD = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_LIBADD)
-libdali_video_player_plugin_cxx11_la_LDFLAGS = $(LIBDALI_VIDEO_PLAYER_PLUGIN_LA_LDFLAGS)
-
-if ENABLE_RENAME_SO
-#rename
-install: install-am
-       rm -rf $(libdir)/libdali_video_player_plugin-cxx11.so
-       rm -rf $(libdir)/libdali_video_player_plugin.so
-       ln -s $(libdir)/libdali_video_player_plugin-cxx11.so.0.0.* $(libdir)/libdali_video_player_plugin.so
-endif
-endif
-endif
-
 endif # CXX03
index fc950ba..83b8a95 100644 (file)
@@ -23,7 +23,6 @@ AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
 
 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
-AM_CONDITIONAL([USE_VIDEOPLAYER], [test x$enable_videoplayer = xyes])
 
 AM_CONDITIONAL([ENABLE_CXX03_ABI], [test x$enable_cxx03_abi = xyes])
 AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
@@ -32,15 +31,6 @@ if test "x$enable_cxx03_abi" = "xyes"; then
  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
 fi
 
-if test "x$enable_wayland" = "xyes"; then
-if test "x$enable_videoplayer" = "xyes"; then
-if test "x$enable_profile" != "xUBUNTU"; then
-PKG_CHECK_MODULES(CAPI_MEDIA_PLAYER, capi-media-player)
-PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
-fi
-fi # enable_videoplayer
-fi # enable_wayland
-
 if test "x$enable_feedback" = "xyes"; then
 if test "x$enable_profile" != "xUBUNTU"; then
 
index af5ba44..9f77658 100644 (file)
@@ -19,7 +19,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.2.56
+Version:    1.2.65
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
@@ -115,8 +115,6 @@ BuildRequires:  pkgconfig(utilX)
 %endif
 
 # for dali-adaptor
-BuildRequires:  pkgconfig(evas)
-
 %if 0%{?tizen_version_major} == 3
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(elementary)
@@ -135,10 +133,6 @@ BuildRequires:  pkgconfig(mm-sound)
 BuildRequires:  pkgconfig(feedback)
 %endif
 
-# for videoplayer Plugin
-BuildRequires:  pkgconfig(capi-media-player)
-
-
 # for multiprofile
 Requires:   %{name}-compat = %{version}-%{release}
 Recommends: %{name}-profile_common = %{version}-%{release}
@@ -369,18 +363,6 @@ Requires:   %{name} = %{version}-%{release}
 %description dali-feedback-plugin
 Feedback plugin to play haptic and audio feedback for Dali
 
-##############################
-# Dali VideoPlayer Plugin
-##############################
-%if %{with wayland}
-
-%package dali-video-player-plugin
-Summary:    Plugin to play a video file for Dali
-Group:      System/Libraries
-%description dali-video-player-plugin
-VideoPlayer plugin to play a video file for Dali
-%endif
-
 %if !0%{?disable_cxx03_build}
 ##############################
 # Dali Feedback Plugin cxx03
@@ -393,17 +375,6 @@ Requires:   %{name}-cxx03 = %{version}-%{release}
 %description dali-feedback-plugin-cxx03
 Feedback plugin to play haptic and audio feedback for Dali
 
-##############################
-# Dali VideoPlayer Plugin
-##############################
-%if %{with wayland}
-
-%package dali-video-player-plugin-cxx03
-Summary:    Plugin to play a video file for Dali with cxx03 abi
-Group:      System/Libraries
-%description dali-video-player-plugin-cxx03
-VideoPlayer plugin to play a video file for Dali
-%endif
 %endif
 
 ##############################
@@ -492,7 +463,6 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
@@ -535,7 +505,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
@@ -577,7 +546,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
@@ -619,7 +587,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
@@ -653,7 +620,7 @@ make clean
 %endif
 
 #######################################################################
-# common ( build dali_videoplayer_plugin for common uses )
+# common
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if common ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
@@ -663,7 +630,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
@@ -714,7 +680,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
            --enable-cxx03-abi=yes  \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
@@ -758,7 +723,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
            --enable-cxx03-abi=yes  \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
@@ -801,7 +765,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
            --enable-cxx03-abi=yes \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
@@ -844,7 +807,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
            --enable-cxx03-abi=yes  \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
@@ -877,7 +839,7 @@ make clean
 %endif
 
 #######################################################################
-# common ( build dali_videoplayer_plugin for common uses )
+# common
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if common ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
@@ -888,7 +850,6 @@ make clean
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-           --enable-videoplayer \
            --enable-cxx03-abi=yes  \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
@@ -1024,19 +985,6 @@ exit 0
 /sbin/ldconfig
 exit 0
 
-%if %{with wayland}
-%post dali-video-player-plugin
-/sbin/ldconfig
-exit 0
-%endif
-
-%if %{with wayland}
-%postun dali-video-player-plugin
-/sbin/ldconfig
-exit 0
-%endif
-
-
 ##############################
 
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
@@ -1210,7 +1158,7 @@ exit 0
 %license LICENSE
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if common ||"undefined"
-%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+#%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 %defattr(-,root,root,-)
 %{_libdir}/libdali-adaptor.so.0*
 %{_libdir}/libdali-adaptor-cxx03.so
@@ -1218,15 +1166,7 @@ exit 0
 %exclude %{_libdir}/libdali-adap*.so*.wearable
 %exclude %{_libdir}/libdali-adap*.so*.tv
 %exclude %{_libdir}/libdali-adap*.so*.ivi
-%endif
-
-%if %{with wayland}
-%files dali-video-player-plugin-cxx03
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-video-player-plugin.so*
-%license LICENSE
-%endif
+#%endif
 
 %if 0%{?tizen_version_major} >= 3
 %files dali-feedback-plugin-cxx03
@@ -1239,14 +1179,6 @@ exit 0
 
 #################################################
 
-%if %{with wayland}
-%files dali-video-player-plugin
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-video-player-plugin-cxx11.so*
-%license LICENSE
-%endif
-
 %if 0%{?tizen_version_major} >= 3
 %files dali-feedback-plugin
 %manifest dali-adaptor.manifest
diff --git a/platform-abstractions/portable/gaussian-blur.cpp b/platform-abstractions/portable/gaussian-blur.cpp
new file mode 100644 (file)
index 0000000..443d175
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2017 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 <memory.h>
+
+// INTERNAL INCLUDES
+#include "gaussian-blur.h"
+#include "pixel-buffer-impl.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+
+
+void ConvoluteAndTranspose( unsigned char* inBuffer,
+                            unsigned char* outBuffer,
+                            const unsigned int bufferWidth,
+                            const unsigned int bufferHeight,
+                            const float blurRadius )
+{
+  // Calculate the weights for gaussian blur
+  int radius = static_cast<int>( std::ceil( blurRadius ) );
+  int rows = radius * 2 + 1;
+
+  float sigma = ( blurRadius < Math::MACHINE_EPSILON_1 ) ? 0.0f : blurRadius * 0.4f + 0.6f; // The same equation used by Android
+  float sigma22 = 2.0f * sigma * sigma;
+  float sqrtSigmaPi2 = std::sqrt( 2.0f * Math::PI ) * sigma;
+  float radius2 = radius * radius;
+  float normalizeFactor = 0.0f;
+
+  float* weightMatrix = new float[rows];
+  int index = 0;
+
+  for ( int row = -radius; row <= radius; row++ )
+  {
+    float distance = row * row;
+    if ( distance > radius2 )
+    {
+      weightMatrix[index] = 0.0f;
+    }
+    else
+    {
+      weightMatrix[index] = static_cast<float>( std::exp( -( distance ) / sigma22 ) / sqrtSigmaPi2 );
+    }
+    normalizeFactor += weightMatrix[index];
+    index++;
+  }
+
+  for ( int i = 0; i < rows; i++ )
+  {
+    weightMatrix[i] /= normalizeFactor;
+  }
+
+  // Perform the convolution and transposition using the weights
+  int columns = rows;
+  int columns2 = columns / 2;
+  for ( unsigned int y = 0; y < bufferHeight; y++ )
+  {
+    unsigned int targetPixelIndex = y;
+    unsigned int ioffset = y * bufferWidth;
+    for ( unsigned int x = 0; x < bufferWidth; x++ )
+    {
+      float r = 0.0f, g = 0.0f, b = 0.0f, a = 0.0f;
+      int weightColumnOffset = columns2;
+      for ( int column = -columns2; column <= columns2; column++ )
+      {
+        float weight = weightMatrix[weightColumnOffset + column];
+        if ( fabsf( weight ) > Math::MACHINE_EPSILON_1 )
+        {
+          int ix = x + column;
+          ix = std::max( 0, std::min( ix, static_cast<int>( bufferWidth - 1 ) ) );
+          unsigned int sourcePixelIndex = ioffset + ix;
+          r += weight * inBuffer[sourcePixelIndex*4];
+          g += weight * inBuffer[sourcePixelIndex*4+1];
+          b += weight * inBuffer[sourcePixelIndex*4+2];
+          a += weight * inBuffer[sourcePixelIndex*4+3];
+        }
+      }
+
+      outBuffer[targetPixelIndex*4] = std::max( 0, std::min( static_cast<int>( r + 0.5f ), 255 ) );
+      outBuffer[targetPixelIndex*4+1] = std::max( 0, std::min( static_cast<int>( g + 0.5f ), 255 ) );
+      outBuffer[targetPixelIndex*4+2] = std::max( 0, std::min( static_cast<int>( b + 0.5f ), 255 ) );
+      outBuffer[targetPixelIndex*4+3] = std::max( 0, std::min( static_cast<int>( a + 0.5f ), 255 ) );
+
+      targetPixelIndex += bufferHeight;
+    }
+  }
+
+  delete [] weightMatrix;
+}
+
+void PerformGaussianBlurRGBA( PixelBuffer& buffer, const float blurRadius )
+{
+  unsigned int bufferWidth = buffer.GetWidth();
+  unsigned int bufferHeight = buffer.GetHeight();
+
+  // Create a temporary buffer for the two-pass blur
+  PixelBufferPtr softShadowImageBuffer = PixelBuffer::New( bufferWidth, bufferHeight, Pixel::RGBA8888 );
+  memcpy( softShadowImageBuffer->GetBuffer(), buffer.GetBuffer(), 4u * bufferWidth * bufferHeight );
+
+  // We perform the blur first but write its output image buffer transposed, so that we
+  // can just do it in two passes. The first pass blurs horizontally and transposes, the
+  // second pass does the same, but as the image is now transposed, it's really doing a
+  // vertical blur. The second transposition makes the image the right way up again. This
+  // is much faster than doing a 2D convolution.
+  ConvoluteAndTranspose( buffer.GetBuffer(), softShadowImageBuffer->GetBuffer(), bufferWidth, bufferHeight, blurRadius );
+  ConvoluteAndTranspose( softShadowImageBuffer->GetBuffer(), buffer.GetBuffer(), bufferHeight, bufferWidth, blurRadius );
+
+  // On leaving scope, softShadowImageBuffer will get destroyed.
+}
+
+} //namespace Adaptor
+
+}// namespace Internal
+
+}// namespace Dali
diff --git a/platform-abstractions/portable/gaussian-blur.h b/platform-abstractions/portable/gaussian-blur.h
new file mode 100644 (file)
index 0000000..d55308d
--- /dev/null
@@ -0,0 +1,61 @@
+#ifndef DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
+#define DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
+
+/*
+ * Copyright (c) 2017 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 "pixel-buffer-impl.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * Perform a one dimension Gaussian blur convolution and write its output buffer transposed.
+ *
+ * @param[in] inBuffer The input buffer with the source image
+ * @param[in] outBuffer The output buffer with the Gaussian blur applied and transposed
+ * @param[in] bufferWidth The width of the buffer
+ * @param[in] bufferHeight The height of the buffer
+ * @param[in] blurRadius The radius for Gaussian blur
+ */
+void ConvoluteAndTranspose( unsigned char* inBuffer, unsigned char* outBuffer, const unsigned int bufferWidth, const unsigned int bufferHeight, const float blurRadius );
+
+/**
+ * Perform Gaussian blur on a buffer.
+ *
+ * A Gaussian blur is generated by replacing each pixel’s color values with the average of the surrounding pixels’
+ * colors. This region is a circle with the given radius. Thus, a bigger radius yields a blurrier image.
+ *
+ * @note The pixel format of the buffer must be RGBA8888
+ *
+ * @param[in] buffer The buffer to apply the Gaussian blur to
+ * @param[in] blurRadius The radius for Gaussian blur
+ */
+void PerformGaussianBlurRGBA( PixelBuffer& buffer, const float blurRadius );
+
+} //namespace Adaptor
+
+} //namespace Internal
+
+} //namespace Dali
+
+#endif // DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
index 2c5da3b..e9a94cc 100644 (file)
@@ -475,7 +475,7 @@ ImageDimensions CalculateDesiredDimensions( unsigned int bitmapWidth, unsigned i
   // If both dimensions have values requested, use them both:
   if( requestedWidth != 0 && requestedHeight != 0 )
   {
-    if( requestedWidth <= maxSize && requestedWidth <= maxSize )
+    if( requestedWidth <= maxSize && requestedHeight <= maxSize )
     {
       return ImageDimensions( requestedWidth, requestedHeight );
     }
index ef2defc..58e482e 100644 (file)
@@ -66,6 +66,8 @@ bool HasChannel( Dali::Pixel::Format pixelFormat, Channel channel )
     case Dali::Pixel::RGB888:
     case Dali::Pixel::RGB8888:
     case Dali::Pixel::BGR8888:
+    case Dali::Pixel::RGB16F:
+    case Dali::Pixel::RGB32F:
     {
       return ( channel == RED || channel == GREEN || channel == BLUE );
     }
index bb4e908..5233f6e 100755 (executable)
@@ -19,7 +19,8 @@ tizen_platform_abstraction_src_files = \
   \
   $(portable_platform_abstraction_src_dir)/image-operations.cpp \
   $(portable_platform_abstraction_src_dir)/pixel-manipulation.cpp \
-  $(portable_platform_abstraction_src_dir)/alpha-mask.cpp
+  $(portable_platform_abstraction_src_dir)/alpha-mask.cpp \
+  $(portable_platform_abstraction_src_dir)/gaussian-blur.cpp
 
 # Add public headers here:
 
index 89bca77..2b2309e 100755 (executable)
@@ -162,37 +162,33 @@ bool LoadBitmapFromPng( const ImageLoader::Input& input, Integration::Bitmap& bi
 
   png_byte colortype = png_get_color_type(png, info);
 
-  if(colortype == PNG_COLOR_TYPE_GRAY)
+  if( colortype == PNG_COLOR_TYPE_GRAY ||
+      colortype == PNG_COLOR_TYPE_GRAY_ALPHA )
   {
-    switch( colordepth )
+    if( colortype == PNG_COLOR_TYPE_GRAY )
     {
-      case 8:
-      {
-        pixelFormat = Pixel::L8;
-        valid = true;
-        break;
-      }
-      default:
+      pixelFormat = Pixel::L8;
+      if( png_get_valid(png, info, PNG_INFO_tRNS) )
       {
-        break;
+        colortype = PNG_COLOR_TYPE_GRAY_ALPHA;
+        /* expand transparency entry -> alpha channel if present */
+        png_set_tRNS_to_alpha(png);
+        pixelFormat = Pixel::LA88;
       }
     }
-  }
-  else if(colortype == PNG_COLOR_TYPE_GRAY_ALPHA)
-  {
-    switch(colordepth)
+    else
     {
-      case 8:
-      {
-        pixelFormat = Pixel::LA88;
-        valid = true;
-        break;
-      }
-      default:
-      {
-        break;
-      }
+      pixelFormat = Pixel::LA88;
+    }
+
+    if( colordepth < 8 )
+    {
+      /* expand gray (w/reduced bits) -> 8-bit RGB if necessary */
+      png_set_expand_gray_1_2_4_to_8(png);
+      /* pack all pixels to byte boundaries */
+      png_set_packing(png);
     }
+    valid = true;
   }
   else if(colortype == PNG_COLOR_TYPE_RGB )
   {
index 80f8b58..80ab92b 100644 (file)
@@ -2,6 +2,3 @@
 
 feedback_plugin_src_files = \
    $(plugin_src_dir)/dali-feedback.cpp
-
-video_player_plugin_src_files = \
-   $(plugin_src_dir)/video-player/tizen-video-player.cpp
diff --git a/plugins/video-player/tizen-video-player.cpp b/plugins/video-player/tizen-video-player.cpp
deleted file mode 100644 (file)
index f7baa50..0000000
+++ /dev/null
@@ -1,736 +0,0 @@
-/*
- * Copyright (c) 2016 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 <tizen-video-player.h>
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/common/stage.h>
-#include <dali/devel-api/threading/mutex.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-
-// The plugin factories
-extern "C" DALI_EXPORT_API Dali::VideoPlayerPlugin* CreateVideoPlayerPlugin( void )
-{
-  return new Dali::Plugin::TizenVideoPlayer;
-}
-
-extern "C" DALI_EXPORT_API void DestroyVideoPlayerPlugin( Dali::VideoPlayerPlugin* plugin )
-{
-  if( plugin != NULL )
-  {
-    delete plugin;
-  }
-}
-
-namespace Dali
-{
-
-namespace Plugin
-{
-
-namespace
-{
-
-const int TIMER_INTERVAL( 20 );
-
-static void MediaPacketVideoDecodedCb( media_packet_h packet, void* user_data )
-{
-  TizenVideoPlayer* player = static_cast< TizenVideoPlayer* >( user_data );
-
-  if( player == NULL )
-  {
-    DALI_LOG_ERROR( "Decoded callback got Null pointer as user_data.\n" );
-    return;
-  }
-
-  player->PushPacket( packet );
-}
-
-static void EmitPlaybackFinishedSignal( void* user_data )
-{
-  TizenVideoPlayer* player = static_cast< TizenVideoPlayer* >( user_data );
-  DALI_LOG_ERROR( "EmitPlaybackFinishedSignal.\n" );
-
-  if( player == NULL )
-  {
-    DALI_LOG_ERROR( "Decoded callback got Null pointer as user_data.\n" );
-    return;
-  }
-
-  DALI_LOG_ERROR( "EmitPlaybackFinishedSignal.\n" );
-
-  if( !player->mFinishedSignal.Empty() )
-  {
-    DALI_LOG_ERROR( "EmitPlaybackFinishedSignal.3\n" );
-    player->mFinishedSignal.Emit();
-  }
-
-  player->Stop();
-}
-
-// ToDo: VD player_set_play_position() doesn't work when callback pointer is NULL.
-// We should check whether this callback is needed in platform.
-static void PlayerSeekCompletedCb( void* data )
-{
-}
-
-void LogPlayerError( int error )
-{
-  if( error != PLAYER_ERROR_NONE )
-  {
-    switch( error )
-    {
-      case PLAYER_ERROR_OUT_OF_MEMORY:
-      {
-        DALI_LOG_ERROR( "Player error: Out of memory\n" );
-        return;
-      }
-      case PLAYER_ERROR_INVALID_PARAMETER:
-      {
-        DALI_LOG_ERROR( "Player error: Invalid parameter\n" );
-        return;
-      }
-      case PLAYER_ERROR_NO_SUCH_FILE:
-      {
-        DALI_LOG_ERROR( "Player error: No such file\n" );
-        return;
-      }
-      case PLAYER_ERROR_INVALID_OPERATION:
-      {
-        DALI_LOG_ERROR( "Player error: Invalid operation\n" );
-        return;
-      }
-      case PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE:
-      {
-        DALI_LOG_ERROR( "Player error: No space on device\n" );
-        return;
-      }
-      case PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE:
-      {
-        DALI_LOG_ERROR( "Player error: Not supported feature on device\n" );
-        return;
-      }
-      case PLAYER_ERROR_SEEK_FAILED:
-      {
-        DALI_LOG_ERROR( "Player error: Seek failed\n" );
-        return;
-      }
-      case PLAYER_ERROR_INVALID_STATE:
-      {
-        DALI_LOG_ERROR( "Player error: Invalid state\n" );
-        return;
-      }
-      case PLAYER_ERROR_NOT_SUPPORTED_FILE:
-      {
-        DALI_LOG_ERROR( "Player error: Not supported file\n" );
-        return;
-      }
-      case PLAYER_ERROR_INVALID_URI:
-      {
-        DALI_LOG_ERROR( "Player error: Invalid uri\n" );
-        return;
-      }
-      case PLAYER_ERROR_SOUND_POLICY:
-      {
-        DALI_LOG_ERROR( "Player error: Sound policy\n" );
-        return;
-      }
-      case PLAYER_ERROR_CONNECTION_FAILED:
-      {
-        DALI_LOG_ERROR( "Player error: Connection failed\n" );
-        return;
-      }
-      case PLAYER_ERROR_VIDEO_CAPTURE_FAILED:
-      {
-        DALI_LOG_ERROR( "Player error: Video capture failed\n" );
-        return;
-      }
-      case PLAYER_ERROR_DRM_EXPIRED:
-      {
-        DALI_LOG_ERROR( "Player error: DRM expired\n" );
-        return;
-      }
-      case PLAYER_ERROR_DRM_NO_LICENSE:
-      {
-        DALI_LOG_ERROR( "Player error: No license\n" );
-        return;
-      }
-      case PLAYER_ERROR_DRM_FUTURE_USE:
-      {
-        DALI_LOG_ERROR( "Player error: License for future use\n" );
-        return;
-      }
-      case PLAYER_ERROR_DRM_NOT_PERMITTED:
-      {
-        DALI_LOG_ERROR( "Player error: Format not permitted\n" );
-        return;
-      }
-      case PLAYER_ERROR_RESOURCE_LIMIT:
-      {
-        DALI_LOG_ERROR( "Player error: Resource limit\n" );
-        return;
-      }
-      case PLAYER_ERROR_PERMISSION_DENIED:
-      {
-        DALI_LOG_ERROR( "Player error: Permission denied\n" );
-        return;
-      }
-      case PLAYER_ERROR_SERVICE_DISCONNECTED:
-      {
-        DALI_LOG_ERROR( "Player error: Service disconnected\n" );
-        return;
-      }
-      case PLAYER_ERROR_BUFFER_SPACE:
-      {
-        DALI_LOG_ERROR( "Player error: Buffer space\n" );
-        return;
-      }
-    }
-  }
-}
-
-} // unnamed namespace
-
-TizenVideoPlayer::TizenVideoPlayer()
-: mPlayer( NULL ),
-  mPlayerState( PLAYER_STATE_NONE ),
-  mTbmSurface( NULL ),
-  mPacket( NULL ),
-  mTargetType( NativeImage ),
-  mAlphaBitChanged( false )
-{
-}
-
-TizenVideoPlayer::~TizenVideoPlayer()
-{
-}
-
-void TizenVideoPlayer::GetPlayerState( player_state_e* state )
-{
-  if( mPlayer != NULL && player_get_state( mPlayer, state ) != PLAYER_ERROR_NONE )
-  {
-    DALI_LOG_ERROR( "player_get_state error: Invalid parameter\n" );
-    *state = PLAYER_STATE_NONE;
-  }
-}
-
-void TizenVideoPlayer::SetUrl( const std::string& url )
-{
-  if( mUrl != url )
-  {
-    mUrl = url;
-
-    GetPlayerState( &mPlayerState );
-
-    if( mPlayerState != PLAYER_STATE_NONE && mPlayerState != PLAYER_STATE_IDLE )
-    {
-      Stop();
-      int error = player_unprepare( mPlayer );
-      LogPlayerError( error );
-    }
-
-    if( mPlayerState == PLAYER_STATE_IDLE )
-    {
-      int error = player_set_uri( mPlayer, mUrl.c_str() );
-      LogPlayerError( error );
-
-      error = player_prepare( mPlayer );
-      LogPlayerError( error );
-    }
-  }
-}
-
-std::string TizenVideoPlayer::GetUrl()
-{
-  return mUrl;
-}
-
-void TizenVideoPlayer::SetRenderingTarget( Any target )
-{
-  int error;
-  if( mPlayerState != PLAYER_STATE_NONE )
-  {
-    GetPlayerState( &mPlayerState );
-
-    if( mPlayerState != PLAYER_STATE_IDLE )
-    {
-      Stop();
-      error = player_unprepare( mPlayer );
-      LogPlayerError( error );
-    }
-
-    error = player_destroy( mPlayer );
-    LogPlayerError( error );
-    mPlayerState = PLAYER_STATE_NONE;
-    mPlayer = NULL;
-    mUrl = "";
-  }
-
-  mNativeImageSourcePtr = NULL;
-  mEcoreWlWindow = NULL;
-
-  if( target.GetType() == typeid( Dali::NativeImageSourcePtr ) )
-  {
-    mTargetType = TizenVideoPlayer::NativeImage;
-
-    Dali::NativeImageSourcePtr nativeImageSourcePtr = AnyCast< Dali::NativeImageSourcePtr >( target );
-
-    InitializeTextureStreamMode( nativeImageSourcePtr );
-  }
-  else if( target.GetType() == typeid( Ecore_Wl_Window* ) )
-  {
-    mTargetType = TizenVideoPlayer::WindowSurface;
-
-    Ecore_Wl_Window* nativeWindow = Dali::AnyCast< Ecore_Wl_Window* >( target );
-    InitializeUnderlayMode( nativeWindow );
-  }
-  else
-  {
-    DALI_LOG_ERROR( "Video rendering target is unknown\n" );
-  }
-}
-
-void TizenVideoPlayer::SetLooping( bool looping )
-{
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState != PLAYER_STATE_NONE )
-  {
-    int error = player_set_looping( mPlayer, looping );
-    LogPlayerError( error );
-  }
-}
-
-bool TizenVideoPlayer::IsLooping()
-{
-  GetPlayerState( &mPlayerState );
-
-  bool looping = false;
-  if( mPlayerState != PLAYER_STATE_NONE )
-  {
-    int error = player_is_looping( mPlayer, &looping );
-    LogPlayerError( error );
-  }
-
-  return looping;
-}
-
-void TizenVideoPlayer::Play()
-{
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_READY || mPlayerState == PLAYER_STATE_PAUSED )
-  {
-    if( mNativeImageSourcePtr != NULL && mTimer )
-    {
-      mTimer.Start();
-    }
-
-    int error = player_start( mPlayer );
-    LogPlayerError( error );
-  }
-}
-
-void TizenVideoPlayer::Pause()
-{
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_PLAYING )
-  {
-    int error = player_pause( mPlayer );
-    LogPlayerError( error );
-
-    if( mNativeImageSourcePtr != NULL && mTimer )
-    {
-      mTimer.Stop();
-      DestroyPackets();
-    }
-  }
-}
-
-void TizenVideoPlayer::Stop()
-{
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_PLAYING || mPlayerState == PLAYER_STATE_PAUSED )
-  {
-    int error = player_stop( mPlayer );
-    LogPlayerError( error );
-  }
-
-  if( mNativeImageSourcePtr != NULL && mTimer )
-  {
-    mTimer.Stop();
-    DestroyPackets();
-  }
-}
-
-void TizenVideoPlayer::SetMute( bool muted )
-{
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_IDLE ||
-      mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-    )
-  {
-    int error = player_set_mute( mPlayer, muted );
-    LogPlayerError( error );
-  }
-}
-
-bool TizenVideoPlayer::IsMuted()
-{
-  GetPlayerState( &mPlayerState );
-  bool muted = false;
-
-   if( mPlayerState == PLAYER_STATE_IDLE ||
-      mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-    )
-  {
-    int error = player_is_muted( mPlayer, &muted );
-    LogPlayerError( error );
-  }
-
-  return muted;
-}
-
-void TizenVideoPlayer::SetVolume( float left, float right )
-{
-  GetPlayerState( &mPlayerState );
-
-  int error = player_set_volume( mPlayer, left, right );
-  LogPlayerError( error );
-}
-
-void TizenVideoPlayer::GetVolume( float& left, float& right )
-{
-  GetPlayerState( &mPlayerState );
-
-  int error = player_get_volume( mPlayer, &left, &right );
-  LogPlayerError( error );
-}
-
-void TizenVideoPlayer::SetPlayPosition( int millisecond )
-{
-  int error;
-
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-  )
-  {
-    error = player_set_play_position( mPlayer, millisecond, false, PlayerSeekCompletedCb, NULL );
-    LogPlayerError( error );
-  }
-}
-
-int TizenVideoPlayer::GetPlayPosition()
-{
-  int error;
-  int millisecond = 0;
-
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_IDLE ||
-      mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-  )
-  {
-    error = player_get_play_position( mPlayer, &millisecond );
-    LogPlayerError( error );
-  }
-
-  return millisecond;
-}
-
-void TizenVideoPlayer::SetDisplayRotation( Dali::VideoPlayerPlugin::DisplayRotation rotation )
-{
-  if( mNativeImageSourcePtr != NULL )
-  {
-    DALI_LOG_ERROR( "SetDisplayRotation is only for window rendering target.\n" );
-    return;
-  }
-
-  int error;
-  if( mPlayerState != PLAYER_STATE_NONE )
-  {
-    error = player_set_display_rotation( mPlayer, static_cast< player_display_rotation_e >( rotation ) );
-    LogPlayerError( error );
-  }
-}
-
-Dali::VideoPlayerPlugin::DisplayRotation TizenVideoPlayer::GetDisplayRotation()
-{
-  if( mNativeImageSourcePtr != NULL )
-  {
-    DALI_LOG_ERROR( "GetDisplayRotation is only for window rendering target.\n" );
-    return Dali::VideoPlayerPlugin::ROTATION_NONE;
-  }
-
-  int error;
-  player_display_rotation_e rotation = PLAYER_DISPLAY_ROTATION_NONE;
-  if( mPlayerState != PLAYER_STATE_NONE )
-  {
-    error = player_get_display_rotation( mPlayer, &rotation );
-    LogPlayerError( error );
-  }
-  return static_cast< Dali::VideoPlayerPlugin::DisplayRotation >( rotation );
-}
-
-Dali::VideoPlayerPlugin::VideoPlayerSignalType& TizenVideoPlayer::FinishedSignal()
-{
-  return mFinishedSignal;
-}
-
-void TizenVideoPlayer::InitializeTextureStreamMode( Dali::NativeImageSourcePtr nativeImageSourcePtr )
-{
-  int error;
-
-  mNativeImageSourcePtr = nativeImageSourcePtr;
-
-  if( mAlphaBitChanged )
-  {
-    ecore_wl_window_alpha_set( mEcoreWlWindow, false );
-    mAlphaBitChanged = false;
-  }
-
-  if( mPlayerState == PLAYER_STATE_NONE )
-  {
-    error = player_create( &mPlayer );
-    LogPlayerError( error );
-  }
-
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_IDLE )
-  {
-    error = player_set_completed_cb( mPlayer, EmitPlaybackFinishedSignal, this );
-    LogPlayerError( error );
-
-    error = player_set_media_packet_video_frame_decoded_cb( mPlayer, MediaPacketVideoDecodedCb, this );
-    LogPlayerError( error );
-
-    error = player_set_sound_type( mPlayer, SOUND_TYPE_MEDIA );
-    LogPlayerError( error );
-
-    error = player_set_display_mode( mPlayer, PLAYER_DISPLAY_MODE_FULL_SCREEN );
-    LogPlayerError( error );
-
-    error = player_set_display( mPlayer, PLAYER_DISPLAY_TYPE_NONE, NULL );
-    LogPlayerError( error );
-
-    error = player_set_display_visible( mPlayer, true );
-    LogPlayerError( error );
-
-    mTimer = Dali::Timer::New( TIMER_INTERVAL );
-    mTimer.TickSignal().Connect( this, &TizenVideoPlayer::Update );
-  }
-}
-
-void TizenVideoPlayer::InitializeUnderlayMode( Ecore_Wl_Window* ecoreWlWindow )
-{
-  int error;
-  if( mPlayerState == PLAYER_STATE_NONE )
-  {
-    error = player_create( &mPlayer );
-    LogPlayerError( error );
-  }
-
-  GetPlayerState( &mPlayerState );
-  mEcoreWlWindow = ecoreWlWindow;
-
-  if( mPlayerState == PLAYER_STATE_IDLE )
-  {
-    error = player_set_completed_cb( mPlayer, EmitPlaybackFinishedSignal, this );
-    LogPlayerError( error );
-
-    error = player_set_sound_type( mPlayer, SOUND_TYPE_MEDIA );
-    LogPlayerError( error );
-
-    error = player_set_display_mode( mPlayer, PLAYER_DISPLAY_MODE_DST_ROI );
-    LogPlayerError( error );
-
-    error = player_set_display_roi_area( mPlayer, 0, 0, 1, 1 );
-
-    int width, height;
-    mAlphaBitChanged = ( ecore_wl_window_alpha_get( mEcoreWlWindow ) )? false: true;
-    ecore_wl_screen_size_get( &width, &height );
-
-    if( mAlphaBitChanged )
-    {
-      ecore_wl_window_alpha_set( mEcoreWlWindow, true );
-    }
-    error = player_set_ecore_wl_display( mPlayer, PLAYER_DISPLAY_TYPE_OVERLAY, mEcoreWlWindow, 0, 0, width, height );
-    LogPlayerError( error );
-
-    error = player_set_display_visible( mPlayer, true );
-    LogPlayerError( error );
-  }
-}
-
-bool TizenVideoPlayer::Update()
-{
-  Dali::Mutex::ScopedLock lock( mPacketMutex );
-
-  int error;
-
-  if( mPacket != NULL )
-  {
-    error = media_packet_destroy( mPacket );
-    if( error != MEDIA_PACKET_ERROR_NONE )
-    {
-      DALI_LOG_ERROR( "Media packet destroy error: %d\n", error );
-    }
-    mPacket = NULL;
-  }
-
-  if( !mPacketVector.Empty() )
-  {
-    mPacket = static_cast< media_packet_h >( mPacketVector[0] );
-    mPacketVector.Remove( mPacketVector.Begin() );
-  }
-
-  if( mPacket == NULL )
-  {
-    return true;
-  }
-
-  error = media_packet_get_tbm_surface( mPacket, &mTbmSurface );
-  if( error != MEDIA_PACKET_ERROR_NONE )
-  {
-    media_packet_destroy( mPacket );
-    mPacket = NULL;
-    DALI_LOG_ERROR( " error: %d\n", error );
-    return true;
-  }
-
-  Any source( mTbmSurface );
-  mNativeImageSourcePtr->SetSource( source );
-  Dali::Stage::GetCurrent().KeepRendering( 0.0f );
-
-  return true;
-}
-
-void TizenVideoPlayer::DestroyPackets()
-{
-  int error;
-  if( mPacket != NULL )
-  {
-    error = media_packet_destroy( mPacket );
-    DALI_LOG_ERROR( "Media packet destroy error: %d\n", error );
-    mPacket = NULL;
-  }
-
-  for(unsigned int i = 0; i < mPacketVector.Size(); ++i)
-  {
-    mPacket = static_cast< media_packet_h >( mPacketVector[i] );
-    error = media_packet_destroy( mPacket );
-    DALI_LOG_ERROR( "Media packet destroy error: %d\n", error );
-    mPacket = NULL;
-  }
-  mPacketVector.Clear();
-}
-
-void TizenVideoPlayer::PushPacket( media_packet_h packet )
-{
-  Dali::Mutex::ScopedLock lock( mPacketMutex );
-  mPacketVector.PushBack( packet );
-}
-
-void TizenVideoPlayer::SetDisplayArea( DisplayArea area )
-{
-  GetPlayerState( &mPlayerState );
-
-  if( mNativeImageSourcePtr != NULL )
-  {
-    DALI_LOG_ERROR( "SetDisplayArea is only for window surface target.\n" );
-    return;
-  }
-
-  if( mPlayerState == PLAYER_STATE_IDLE ||
-      mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-
-  )
-  {
-    int error = player_set_display_roi_area( mPlayer, area.x, area.y, area.width, area.height );
-    LogPlayerError( error );
-  }
-}
-
-void TizenVideoPlayer::Forward( int millisecond )
-{
-  int error;
-
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-  )
-  {
-    int currentPosition = 0;
-    int nextPosition = 0;
-
-    error = player_get_play_position( mPlayer, &currentPosition );
-    LogPlayerError( error );
-
-    nextPosition = currentPosition + millisecond;
-
-    error = player_set_play_position( mPlayer, nextPosition, false, PlayerSeekCompletedCb, NULL );
-    LogPlayerError( error );
-  }
-}
-
-void TizenVideoPlayer::Backward( int millisecond )
-{
-  int error;
-
-  GetPlayerState( &mPlayerState );
-
-  if( mPlayerState == PLAYER_STATE_READY ||
-      mPlayerState == PLAYER_STATE_PLAYING ||
-      mPlayerState == PLAYER_STATE_PAUSED
-  )
-  {
-    int currentPosition = 0;
-    int nextPosition = 0;
-
-    error = player_get_play_position( mPlayer, &currentPosition );
-    LogPlayerError( error );
-
-    nextPosition = currentPosition - millisecond;
-    nextPosition = ( nextPosition < 0 )? 0 : nextPosition;
-
-    error = player_set_play_position( mPlayer, nextPosition, false, PlayerSeekCompletedCb, NULL );
-    LogPlayerError( error );
-  }
-}
-
-} // namespace Plugin
-} // namespace Dali;
diff --git a/plugins/video-player/tizen-video-player.h b/plugins/video-player/tizen-video-player.h
deleted file mode 100644 (file)
index 9f870cc..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-#ifndef __DALI_TIZEN_VIDEO_PLAYER_PLUGIN_H__
-#define __DALI_TIZEN_VIDEO_PLAYER_PLUGIN_H__
-
-/*
- * Copyright (c) 2016 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 <dali/devel-api/threading/mutex.h>
-#include <player.h>
-#include <string>
-
-#ifndef HAVE_WAYLAND
-#define HAVE_WAYLAND
-#endif
-#include <player_internal.h>
-
-// INTERNAL INCLUDES
-#include <native-image-source.h>
-#include <video-player-plugin.h>
-#include <timer.h>
-
-namespace Dali
-{
-
-namespace Plugin
-{
-
-/**
- * @brief Implementation of the Tizen video player class which has Tizen platform dependency.
- * @SINCE_1_1.38
- */
-class TizenVideoPlayer : public Dali::VideoPlayerPlugin, public Dali::ConnectionTracker
-{
-public:
-
-  /**
-   * @brief Video rendering target type
-   * @SINCE_1_1.38
-   */
-  enum RenderingTargetType
-  {
-    WindowSurface, ///< HW underlay
-    NativeImage ///< texture stream
-  };
-
-  /**
-   * @brief Constructor.
-   * @SINCE_1_1.38
-   */
-  TizenVideoPlayer();
-
-  /**
-   * @brief Destructor.
-   * @SINCE_1_1.38
-   */
-  virtual ~TizenVideoPlayer();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetUrl()
-   */
-  virtual void SetUrl( const std::string& url );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::GetUrl()
-   */
-  virtual std::string GetUrl();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetLooping()
-   */
-  virtual void SetLooping(bool looping);
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::IsLooping()
-   */
-  virtual bool IsLooping();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::Play()
-   */
-  virtual void Play();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::Pause()
-   */
-  virtual void Pause();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::Stop()
-   */
-  virtual void Stop();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetMute()
-   */
-  virtual void SetMute( bool mute );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::IsMute()
-   */
-  virtual bool IsMuted();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetVolume()
-   */
-  virtual void SetVolume( float left, float right );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::GetVolume()
-   */
-  virtual void GetVolume( float& left, float& right );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetRenderingTarget()
-   */
-  void SetRenderingTarget( Any target );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetPlayPosition()
-   */
-  virtual void SetPlayPosition( int millisecond );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::GetPlayPosition()
-   */
-  virtual int GetPlayPosition();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetDisplayArea()
-   */
-  virtual void SetDisplayArea( DisplayArea area );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::SetDisplayRotation()
-   */
-  virtual void SetDisplayRotation( Dali::VideoPlayerPlugin::DisplayRotation rotation );
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::GetDisplayRotation()
-   */
-  virtual Dali::VideoPlayerPlugin::DisplayRotation GetDisplayRotation();
-
-  /**
-   * @copydoc Dali::VideoPlayerPlugin::FinishedSignal()
-   */
-  virtual Dali::VideoPlayerPlugin::VideoPlayerSignalType& FinishedSignal();
-
-  /**
-   * @brief Push media packet with video frame image
-   */
-  void PushPacket( media_packet_h packet );
-
-  /**
-   * @brief Dali::VideoPlayer::Forward()
-   */
-  void Forward( int millisecond );
-
-  /**
-   * @brief Dali::VideoPlayer::Backward()
-   */
-  void Backward( int millisecond );
-
-private:
-
-  /**
-   * @brief Updates video frame image by timer if rendering targe is native image source
-   */
-  bool Update();
-
-  /**
-   * @brief Gets current player state
-   */
-  void GetPlayerState( player_state_e* state );
-
-  /**
-   * @brief Destroy all packests, which this plugin stores
-   */
-  void DestroyPackets();
-
-  /**
-   * @brief Initializes player for video rendering using native image source
-   */
-  void InitializeTextureStreamMode( Dali::NativeImageSourcePtr nativeImageSourcePtr );
-
-  /**
-   * @brief Initializes player for video rendering using wayland window surface
-   */
-  void InitializeUnderlayMode( Ecore_Wl_Window* ecoreWlWindow );
-
-private:
-
-  std::string mUrl; ///< The video file path
-  player_h mPlayer; ///< Tizen player handle
-  player_state_e mPlayerState; ///< Tizen player state
-  tbm_surface_h mTbmSurface; ///< tbm surface handle
-  media_packet_h mPacket; ///< Media packet handle with tbm surface of current video frame image
-  Dali::NativeImageSourcePtr mNativeImageSourcePtr; ///< native image source for video rendering
-  Dali::Timer mTimer; ///< Timer for texture streaming rendering
-  Dali::Vector4 mBackgroundColor; ///< Current background color, which texturestream mode needs.
-  RenderingTargetType mTargetType; ///< Current rendering target type
-
-  Dali::Mutex mPacketMutex;
-  Dali::Vector< media_packet_h > mPacketVector; ///< Container for media packet handle from Tizen player callback
-
-  Ecore_Wl_Window* mEcoreWlWindow;
-
-  bool mAlphaBitChanged; ///< True if underlay rendering initialization changes window alpha
-
-public:
-
-  Dali::VideoPlayerPlugin::VideoPlayerSignalType mFinishedSignal;
-};
-
-} // namespace Plugin
-} // namespace Dali;
-
-#endif
index 9c56a45..90470d2 100644 (file)
@@ -182,14 +182,14 @@ bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ
   return GetImplementation(*this).GetGlyphMetrics( array, size, type, horizontal );
 }
 
-void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data )
+void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data, int outlineWidth )
 {
-  GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data );
+  GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data, outlineWidth );
 }
 
-PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
 {
-  return GetImplementation(*this).CreateBitmap( fontId, glyphIndex );
+  return GetImplementation(*this).CreateBitmap( fontId, glyphIndex, outlineWidth );
 }
 
 void FontClient::CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight )
index 0a8474d..8c8cfca 100644 (file)
@@ -353,18 +353,20 @@ public:
    * @param[in] fontId The identifier of the font.
    * @param[in] glyphIndex The index of a glyph within the specified font.
    * @param[out] data The bitmap data.
+   * @param[in] outlineWidth The width of the glyph outline in pixels.
    */
-  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data );
+  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data, int outlineWidth );
 
   /**
    * @brief Create a bitmap representation of a glyph.
    *
    * @param[in] fontId The identifier of the font.
    * @param[in] glyphIndex The index of a glyph within the specified font.
+   * @param[in] outlineWidth The width of the glyph outline in pixels.
    *
    * @return A valid BufferImage, or an empty handle if the glyph could not be rendered.
    */
-  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex );
+  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth );
 
   /**
    * @brief Create a vector representation of a glyph.
index 2c9948b..4ab90bf 100644 (file)
@@ -246,18 +246,18 @@ bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ
   return mPlugin->GetGlyphMetrics( array, size, type, horizontal );
 }
 
-void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data )
+void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth )
 {
   CreatePlugin();
 
-  mPlugin->CreateBitmap( fontId, glyphIndex, data );
+  mPlugin->CreateBitmap( fontId, glyphIndex, data, outlineWidth );
 }
 
-PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
 {
   CreatePlugin();
 
-  return mPlugin->CreateBitmap( fontId, glyphIndex );
+  return mPlugin->CreateBitmap( fontId, glyphIndex, outlineWidth );
 }
 
 void FontClient::CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight )
index a13715c..cfa3a20 100644 (file)
@@ -169,14 +169,14 @@ public:
   bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal );
 
   /**
-   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data )
+   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth )
    */
-  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data );
+  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth );
 
   /**
-   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
    */
-  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex );
+  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth );
 
   /**
    * @copydoc Dali::TextAbstraction::FontClient::CreateVectorBlob()
index 6e7d294..a1e4cc6 100644 (file)
@@ -1084,7 +1084,7 @@ bool FontClient::Plugin::GetVectorMetrics( GlyphInfo* array,
 #endif
 }
 
-void FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data )
+void FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth )
 {
   if( ( fontId > 0 ) &&
       ( fontId - 1u < mFontCache.size() ) )
@@ -1114,6 +1114,33 @@ void FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dal
       {
         if( glyph->format != FT_GLYPH_FORMAT_BITMAP )
         {
+          // Check whether we should create a bitmap for the outline
+          if( glyph->format == FT_GLYPH_FORMAT_OUTLINE && outlineWidth > 0 )
+          {
+            // Set up a stroker
+            FT_Stroker stroker;
+            error = FT_Stroker_New(mFreeTypeLibrary, &stroker );
+
+            if ( FT_Err_Ok == error )
+            {
+              FT_Stroker_Set( stroker, outlineWidth * 64, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINEJOIN_ROUND, 0 );
+              error = FT_Glyph_StrokeBorder( &glyph, stroker, 0, 1 );
+
+              if ( FT_Err_Ok == error )
+              {
+                FT_Stroker_Done( stroker );
+              }
+              else
+              {
+                DALI_LOG_ERROR( "FT_Glyph_StrokeBorder Failed with error: %d\n", error );
+              }
+            }
+            else
+            {
+              DALI_LOG_ERROR( "FT_Stroker_New Failed with error: %d\n", error );
+            }
+          }
+
           error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, 0, 1 );
           if ( FT_Err_Ok == error )
           {
@@ -1141,12 +1168,11 @@ void FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dal
   }
 }
 
-PixelData FontClient::Plugin::CreateBitmap( FontId fontId,
-                                            GlyphIndex glyphIndex )
+PixelData FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
 {
   TextAbstraction::FontClient::GlyphBufferData data;
 
-  CreateBitmap( fontId, glyphIndex, data );
+  CreateBitmap( fontId, glyphIndex, data, outlineWidth );
 
   return PixelData::New( data.buffer,
                          data.width * data.height * Pixel::GetBytesPerPixel( data.format ),
index d0601e7..c1e158f 100644 (file)
@@ -33,6 +33,8 @@ class VectorFontCache;
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
+#include FT_OUTLINE_H
+#include FT_STROKER_H
 
 // forward declarations of font config types.
 struct _FcCharSet;
@@ -295,14 +297,14 @@ struct FontClient::Plugin
   bool GetVectorMetrics( GlyphInfo* array, uint32_t size, bool horizontal );
 
   /**
-   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data )
+   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth )
    */
-  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data );
+  void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth );
 
   /**
-   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+   * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
    */
-  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex );
+  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth );
 
   /**
    * @copydoc Dali::TextAbstraction::FontClient::CreateVectorBlob()