[dali_1.4.43] Merge branch 'devel/master' 81/216481/1
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Fri, 25 Oct 2019 09:30:49 +0000 (10:30 +0100)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Fri, 25 Oct 2019 09:30:49 +0000 (10:30 +0100)
Change-Id: I2829cfe1ec68923f0cf5e41668a0268312c66ffe

14 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-LogicalModel.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h
automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
dali-toolkit/internal/text/rendering/text-typesetter.cpp
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 833b546..4fe4876 100755 (executable)
@@ -301,7 +301,7 @@ bool GetLogicalCharacterIndexTest( const GetLogicalCharacterIndexData& data )
 
 bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data )
 {
-  std::cout << "  testing : " << data.description << std::endl;
+  tet_printf( "  testing : %s\n", data.description.c_str() );
 
   // Load some fonts.
   TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
@@ -346,7 +346,7 @@ bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data )
 
     if( logicalModel->mBidirectionalLineIndex != data.cachedBidiLine[index] )
     {
-      std::cout << "  test : " << index << ", different cached line index : " << logicalModel->mBidirectionalLineIndex << ", expected : " << data.cachedBidiLine[index] << std::endl;
+      tet_printf( "  test : %d, different cached line index : %d, expected : %d\n", index, logicalModel->mBidirectionalLineIndex, data.cachedBidiLine[index] );
       return false;
     }
 
@@ -355,7 +355,7 @@ bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data )
 
     if( logicalCursorIndex != data.logicalCursorIndex[index] )
     {
-      std::cout << "  test : " << index << ", visual index : " << visualCharacterIndex << ", different logical cursor index : " << logicalCursorIndex << ", expected : " << data.logicalCursorIndex[index] << std::endl;
+      tet_printf( "  test : %d, visual index : %d, different logical cursor index :%d, expected : %d", index, visualCharacterIndex, logicalCursorIndex, data.logicalCursorIndex[index] );
       return false;
     }
   }
index e581626..e1787c9 100755 (executable)
@@ -258,6 +258,9 @@ int UtcDaliTextControllerImfEvent(void)
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello ", text, TEST_LOCATION );
 
+  // for coverage
+  inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::UNDERLINE );
+
   // Send PRE_EDIT event
   imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "wo", 6, 2 );
   controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
index 74a2bd5..f316e50 100755 (executable)
@@ -59,6 +59,8 @@ public:
   const std::string& GetSurroundingText() const;
   void ApplyOptions( const InputMethodOptions& options );
   bool FilterEventKey( const Dali::KeyEvent& keyEvent );
+  void SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type );
+  Dali::InputMethodContext::PreeditStyle GetPreeditStyle() const;
 
 public:  // Signals
   ActivatedSignalType& ActivatedSignal() { return mActivatedSignal; }
@@ -85,6 +87,7 @@ private:
   bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.
   bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.
   InputMethodOptions        mOptions;
+  Dali::InputMethodContext::PreeditStyle mPreeditStyle;
 
   ActivatedSignalType      mActivatedSignal;
   KeyboardEventSignalType  mEventSignal;
@@ -125,7 +128,8 @@ InputMethodContext::InputMethodContext( /*Ecore_X_Window ecoreXwin*/ )
 : mIMFCursorPosition( 0 ),
   mSurroundingText(),
   mRestoreAfterFocusLost( false ),
-  mIdleCallbackConnected( false )
+  mIdleCallbackConnected( false ),
+  mPreeditStyle( Dali::InputMethodContext::PreeditStyle::NONE )
 {
   CreateContext( /*ecoreXwin*/ );
   ConnectCallbacks();
@@ -212,6 +216,16 @@ bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent )
 {
   return false;
 }
+
+void InputMethodContext::SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type )
+{
+  mPreeditStyle = type;
+}
+
+Dali::InputMethodContext::PreeditStyle InputMethodContext::GetPreeditStyle() const
+{
+  return mPreeditStyle;
+}
 } // Adaptor
 
 } // Internal
@@ -308,6 +322,17 @@ bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent )
   return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey( keyEvent );
 }
 
+void InputMethodContext::SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type )
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetPreeditStyle( type );
+}
+
+Dali::InputMethodContext::PreeditStyle InputMethodContext::GetPreeditStyle() const
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle();
+}
+
+// Signals
 InputMethodContext::ActivatedSignalType& InputMethodContext::ActivatedSignal()
 {
   return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ActivatedSignal();
index cf174cf..a56ea81 100755 (executable)
@@ -47,7 +47,16 @@ class InputMethodContext : public BaseHandle
 public:
 
   /**
-   * @brief Events that are generated by the input method context.
+  * @brief The direction of text.
+  */
+  enum TextDirection
+  {
+    LeftToRight,
+    RightToLeft,
+  };
+
+  /**
+   * @brief Events that are generated by the InputMethodContext.
    */
   enum EventType
   {
@@ -60,7 +69,47 @@ public:
   };
 
   /**
-   * @brief This structure is used to pass on data from the input method cotext regarding predictive text.
+   * @brief Enumeration for state of the input panel.
+   */
+  enum State
+  {
+    DEFAULT = 0,   ///< Unknown state
+    SHOW,          ///< Input panel is shown
+    HIDE,          ///< Input panel is hidden
+    WILL_SHOW      ///< Input panel in process of being shown
+  };
+
+  /**
+   * @brief Enumeration for the type of Keyboard.
+   */
+  enum KeyboardType
+  {
+    SOFTWARE_KEYBOARD,  ///< Software keyboard (Virtual keyboard) is default
+    HARDWARE_KEYBOARD   ///< Hardware keyboard
+  };
+
+  /**
+   * @brief Enumeration for the language mode of the input panel.
+   */
+  enum class InputPanelLanguage
+  {
+    AUTOMATIC,    ///< IME Language automatically set depending on the system display
+    ALPHABET      ///< Latin alphabet at all times
+  };
+
+  /**
+   * @brief Enumeration for the preedit style types.
+   */
+  enum class PreeditStyle
+  {
+    NONE,         ///< None style
+    UNDERLINE,    ///< Underline substring style
+    REVERSE,      ///< Reverse substring style
+    HIGHLIGHT     ///< Highlight substring style
+  };
+
+  /**
+   * @brief This structure is used to pass on data from the InputMethodContext regarding predictive text.
    */
   struct EventData
   {
@@ -252,6 +301,20 @@ public:
    */
   bool FilterEventKey( const Dali::KeyEvent& keyEvent );
 
+  /**
+   * @brief Sets the preedit type.
+   *
+   * @param[in] type The preedit style type
+   */
+  void SetPreeditStyle( PreeditStyle type );
+
+  /**
+   * @brief Gets the preedit type.
+   *
+   * @return The preedit style type
+   */
+  PreeditStyle GetPreeditStyle() const;
+
 public:
 
   // Signals
index 1615e62..cf2ccef 100644 (file)
@@ -44,6 +44,7 @@ public:
   virtual ~Window() = default;
   static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent);
   FocusChangeSignalType mFocusChangeSignal;
+  DevelWindow::VisibilityChangedSignalType mVisibilityChangedSignal;
 };
 
 } // namespace Adaptor
index 9849f60..5ee2dcb 100644 (file)
@@ -48,7 +48,9 @@ namespace Adaptor
 {
 
 Window::Window( const PositionSize& positionSize )
-: SceneHolder( positionSize )
+: SceneHolder( positionSize ),
+  mFocusChangeSignal(),
+  mVisibilityChangedSignal()
 {
 }
 
@@ -155,6 +157,11 @@ void Window::Raise()
   GetImplementation( *this ).mFocusChangeSignal.Emit(*this, true);
 }
 
+void Window::Hide()
+{
+  GetImplementation( *this ).mVisibilityChangedSignal.Emit( *this, false );
+}
+
 FocusChangeSignalType& Window::FocusChangeSignal()
 {
   return GetImplementation( *this ).mFocusChangeSignal;
@@ -210,6 +217,11 @@ WheelEventSignalType& WheelEventSignal( Window window )
   return GetImplementation( window ).WheelEventSignal();
 }
 
+VisibilityChangedSignalType& VisibilityChangedSignal( Window window )
+{
+  return GetImplementation( window ).mVisibilityChangedSignal;
+}
+
 } // namespace DevelWindow
 
 } // Dali
index f261051..271f885 100644 (file)
@@ -67,6 +67,7 @@ public:
   void SetBackgroundColor( const Vector4& color );
   Vector4 GetBackgroundColor() const;
   void Raise();
+  void Hide();
   FocusChangeSignalType& FocusChangeSignal();
 
 public:
@@ -83,6 +84,7 @@ typedef Signal< void (const KeyEvent&) > KeyEventSignalType;
 typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;
 typedef Signal< void (const TouchData&) > TouchSignalType;
 typedef Signal< void (const WheelEvent&) > WheelEventSignalType;
+typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType;
 
 Dali::Window Get( Actor actor );
 Dali::Window DownCast(  BaseHandle handle );
@@ -92,6 +94,7 @@ KeyEventSignalType& KeyEventSignal( Dali::Window window );
 KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Dali::Window window );
 TouchSignalType& TouchSignal( Dali::Window window );
 WheelEventSignalType& WheelEventSignal( Window window );
+VisibilityChangedSignalType& VisibilityChangedSignal( Window window );
 }
 
 } // namespace Dali
index 096b960..9f4ac84 100644 (file)
@@ -29,6 +29,7 @@
 #include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h>
 #include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-signals-devel.h>
 #include <dali/devel-api/rendering/renderer-devel.h>
+#include <dali/devel-api/adaptor-framework/window-devel.h>
 #include "dummy-control.h"
 
 using namespace Dali;
@@ -1230,10 +1231,10 @@ int UtcDaliAnimatedVectorImageVisualMultipleInstances(void)
   END_TEST;
 }
 
-int UtcDaliAnimatedVectorImageVisualVisibilityChanged(void)
+int UtcDaliAnimatedVectorImageVisualControlVisibilityChanged(void)
 {
   ToolkitTestApplication application;
-  tet_infoline( "UtcDaliAnimatedVectorImageVisualVisibilityChanged" );
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualControlVisibilityChanged" );
 
   Property::Map propertyMap;
   propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
@@ -1273,3 +1274,48 @@ int UtcDaliAnimatedVectorImageVisualVisibilityChanged(void)
 
   END_TEST;
 }
+
+int UtcDaliAnimatedVectorImageVisualWindowVisibilityChanged(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualWindowVisibilityChanged" );
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
+             .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  Vector2 controlSize( 20.f, 30.f );
+  actor.SetSize( controlSize );
+
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  Property::Map attributes;
+  DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
+
+  // Check rendering behavior
+  DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
+  Renderer renderer = actor.GetRendererAt( 0u );
+  DALI_TEST_CHECK( renderer );
+  DALI_TEST_CHECK( renderer.GetProperty< int >( DevelRenderer::Property::RENDERING_BEHAVIOR ) == DevelRenderer::Rendering::CONTINUOUSLY );
+
+  Window window = DevelWindow::Get( actor );
+  window.Hide();
+
+  application.SendNotification();
+  application.Render();
+
+  // Check rendering behavior again
+  DALI_TEST_CHECK( renderer.GetProperty< int >( DevelRenderer::Property::RENDERING_BEHAVIOR ) == DevelRenderer::Rendering::IF_REQUIRED );
+
+  END_TEST;
+}
index 20ea5f7..5b424be 100755 (executable)
@@ -683,6 +683,7 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
         // Don't render outline for other styles
         outlineWidth = 0.0f;
       }
+
       if( style != Typesetter::STYLE_UNDERLINE )
       {
         fontClient.CreateBitmap( glyphInfo->fontId,
@@ -693,15 +694,30 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
                                  static_cast<int>( outlineWidth ) );
       }
 
-
       // Sets the glyph's bitmap into the bitmap of the whole text.
       if( NULL != glyphData.glyphBitmap.buffer )
       {
+        if ( style == Typesetter::STYLE_OUTLINE )
+        {
+          // Set the position offset for the current glyph
+          glyphData.horizontalOffset -= glyphData.glyphBitmap.outlineOffsetX;
+          glyphData.verticalOffset -= glyphData.glyphBitmap.outlineOffsetY;
+        }
+
+        // Set the buffer of the glyph's bitmap into the final bitmap's buffer
         TypesetGlyph( glyphData,
                       position,
                       &color,
                       style,
                       pixelFormat);
+
+        if ( style == Typesetter::STYLE_OUTLINE )
+        {
+          // Reset the position offset for the next glyph
+          glyphData.horizontalOffset += glyphData.glyphBitmap.outlineOffsetX;
+          glyphData.verticalOffset += glyphData.glyphBitmap.outlineOffsetY;
+        }
+
         // delete the glyphBitmap.buffer as it is now copied into glyphData.bitmapBuffer
         delete []glyphData.glyphBitmap.buffer;
         glyphData.glyphBitmap.buffer = NULL;
index 2686153..2c9a78d 100755 (executable)
@@ -1072,21 +1072,35 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired )
       mEventData->mPreEditFlag &&
       ( 0u != mModel->mVisualModel->mCharactersToGlyph.Count() ) )
   {
-    // Add the underline for the pre-edit text.
-    const GlyphIndex* const charactersToGlyphBuffer = mModel->mVisualModel->mCharactersToGlyph.Begin();
-    const Length* const glyphsPerCharacterBuffer = mModel->mVisualModel->mGlyphsPerCharacter.Begin();
+    Dali::InputMethodContext::PreeditStyle type = mEventData->mInputMethodContext.GetPreeditStyle();
 
-    const GlyphIndex glyphStart = *( charactersToGlyphBuffer + mEventData->mPreEditStartPosition );
-    const CharacterIndex lastPreEditCharacter = mEventData->mPreEditStartPosition + ( ( mEventData->mPreEditLength > 0u ) ? mEventData->mPreEditLength - 1u : 0u );
-    const Length numberOfGlyphsLastCharacter = *( glyphsPerCharacterBuffer + lastPreEditCharacter );
-    const GlyphIndex glyphEnd = *( charactersToGlyphBuffer + lastPreEditCharacter ) + ( numberOfGlyphsLastCharacter > 1u ? numberOfGlyphsLastCharacter - 1u : 0u );
+    switch( type )
+    {
+      case Dali::InputMethodContext::PreeditStyle::UNDERLINE:
+      {
+        // Add the underline for the pre-edit text.
+        const GlyphIndex* const charactersToGlyphBuffer = mModel->mVisualModel->mCharactersToGlyph.Begin();
+        const Length* const glyphsPerCharacterBuffer = mModel->mVisualModel->mGlyphsPerCharacter.Begin();
 
-    GlyphRun underlineRun;
-    underlineRun.glyphIndex = glyphStart;
-    underlineRun.numberOfGlyphs = 1u + glyphEnd - glyphStart;
+        const GlyphIndex glyphStart = *( charactersToGlyphBuffer + mEventData->mPreEditStartPosition );
+        const CharacterIndex lastPreEditCharacter = mEventData->mPreEditStartPosition + ( ( mEventData->mPreEditLength > 0u ) ? mEventData->mPreEditLength - 1u : 0u );
+        const Length numberOfGlyphsLastCharacter = *( glyphsPerCharacterBuffer + lastPreEditCharacter );
+        const GlyphIndex glyphEnd = *( charactersToGlyphBuffer + lastPreEditCharacter ) + ( numberOfGlyphsLastCharacter > 1u ? numberOfGlyphsLastCharacter - 1u : 0u );
 
-    // TODO: At the moment the underline runs are only for pre-edit.
-    mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+        GlyphRun underlineRun;
+        underlineRun.glyphIndex = glyphStart;
+        underlineRun.numberOfGlyphs = 1u + glyphEnd - glyphStart;
+
+        mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+        break;
+      }
+      // TODO :  At this moment, other styles for preedit are not implemented yet.
+      case Dali::InputMethodContext::PreeditStyle::REVERSE:
+      case Dali::InputMethodContext::PreeditStyle::HIGHLIGHT:
+      case Dali::InputMethodContext::PreeditStyle::NONE:
+      default:
+        break;
+    }
   }
 
   // The estimated number of lines. Used to avoid reallocations when layouting.
index 16203e7..ea4dee5 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
 #include <dali/devel-api/rendering/renderer-devel.h>
+#include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -309,21 +310,23 @@ void AnimatedVectorImageVisual::DoSetOnStage( Actor& actor )
   mSizeNotification = actor.AddPropertyNotification( Actor::Property::SIZE, StepCondition( 3.0f ) );
   mSizeNotification.NotifySignal().Connect( this, &AnimatedVectorImageVisual::OnSizeNotification );
 
-  DevelActor::VisibilityChangedSignal( actor ).Connect( this, &AnimatedVectorImageVisual::OnVisibilityChanged );
+  DevelActor::VisibilityChangedSignal( actor ).Connect( this, &AnimatedVectorImageVisual::OnControlVisibilityChanged );
+
+  Window window = DevelWindow::Get( actor );
+  if( window )
+  {
+    DevelWindow::VisibilityChangedSignal( window ).Connect( this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged );
+  }
 
   DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnStage [%p]\n", this );
 }
 
 void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
 {
-  mVectorAnimationTask->PauseAnimation();
-
-  mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+  PauseAnimation();
 
   if( mImpl->mRenderer )
   {
-    mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
-
     actor.RemoveRenderer( mImpl->mRenderer );
     mImpl->mRenderer.Reset();
 
@@ -334,7 +337,13 @@ void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
   actor.RemovePropertyNotification( mScaleNotification );
   actor.RemovePropertyNotification( mSizeNotification );
 
-  DevelActor::VisibilityChangedSignal( actor ).Connect( this, &AnimatedVectorImageVisual::OnVisibilityChanged );
+  DevelActor::VisibilityChangedSignal( actor ).Disconnect( this, &AnimatedVectorImageVisual::OnControlVisibilityChanged );
+
+  Window window = DevelWindow::Get( actor );
+  if( window )
+  {
+    DevelWindow::VisibilityChangedSignal( window ).Disconnect( this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged );
+  }
 
   mPlacementActor.Reset();
 
@@ -542,6 +551,21 @@ void AnimatedVectorImageVisual::SetVectorImageSize()
   }
 }
 
+void AnimatedVectorImageVisual::PauseAnimation()
+{
+  if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+  {
+    mVectorAnimationTask->PauseAnimation();
+
+    mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+
+    if( mImpl->mRenderer )
+    {
+      mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
+    }
+  }
+}
+
 void AnimatedVectorImageVisual::OnScaleNotification( PropertyNotification& source )
 {
   Actor actor = mPlacementActor.GetHandle();
@@ -572,23 +596,23 @@ void AnimatedVectorImageVisual::OnSizeNotification( PropertyNotification& source
   }
 }
 
-void AnimatedVectorImageVisual::OnVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type )
+void AnimatedVectorImageVisual::OnControlVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type )
 {
   if( !visible )
   {
-    if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
-    {
-      mVectorAnimationTask->PauseAnimation();
+    PauseAnimation();
 
-      if( mImpl->mRenderer )
-      {
-        mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
-      }
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this );
+  }
+}
 
-      mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+void AnimatedVectorImageVisual::OnWindowVisibilityChanged( Window window, bool visible )
+{
+  if( !visible )
+  {
+    PauseAnimation();
 
-      DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnVisibilityChanged: invisibile. Pause animation [%p]\n", this );
-    }
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this );
   }
 }
 
index 78848d0..9143299 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali/public-api/object/weak-handle.h>
 #include <dali/public-api/object/property-notification.h>
 #include <dali/devel-api/actors/actor-devel.h>
+#include <dali/public-api/adaptor-framework/window.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
@@ -167,6 +168,11 @@ private:
   void SetVectorImageSize();
 
   /**
+   * @brief Pause the animation.
+   */
+  void PauseAnimation();
+
+  /**
    * @brief Callback when the world scale factor changes.
    */
   void OnScaleNotification( PropertyNotification& source );
@@ -179,7 +185,12 @@ private:
   /**
    * @brief Callback when the visibility of the actor is changed.
    */
-  void OnVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type );
+  void OnControlVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type );
+
+  /**
+   * @brief Callback when the visibility of the window is changed.
+   */
+  void OnWindowVisibilityChanged( Window window, bool visible );
 
   // Undefined
   AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete;
index 7590f4c..97fbe7c 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 4;
-const unsigned int TOOLKIT_MICRO_VERSION = 42;
+const unsigned int TOOLKIT_MICRO_VERSION = 43;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 303aced..e332703 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.4.42
+Version:    1.4.43
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
@@ -16,6 +16,9 @@ BuildRequires:  pkgconfig(dali-core)
 BuildRequires:  pkgconfig(dali-adaptor)
 BuildRequires:  gettext
 BuildRequires:  pkgconfig(libtzplatform-config)
+Provides: libdali-toolkit-cxx11.so
+Provides: libdali-toolkit-cxx11.so.0
+Provides: libdali-toolkit-cxx11.so.0.0.0
 
 #############################
 # profile setup