Removed SetOnStage/SetOffStage from visual-base.h
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / video-view / video-view-impl.cpp
index 0b431fc..bd03bf2 100644 (file)
@@ -29,6 +29,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/video-view/video-view.h>
+#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
 
 namespace Dali
 {
@@ -73,7 +74,7 @@ const char* const NATIVE_IMAGE_TARGET( "nativeImageTarget" );
 } // anonymous namepsace
 
 VideoView::VideoView()
-: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
+: Control( ControlBehaviour( ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS ) ),
   mCurrentVideoPlayPosition( 0 ),
   mSetRenderingTarget( false ),
   mIsPlay( false ),
@@ -120,7 +121,7 @@ void VideoView::SetPropertyMap( Property::Map map )
   mPropertyMap = map;
 
   Actor self( Self() );
-  InitializeControlRenderer( self, mRenderer, mPropertyMap );
+  Internal::InitializeVisual( self, mVisual, mPropertyMap );
 
   Property::Value* widthValue = mPropertyMap.Find( "width" );
   if( widthValue )
@@ -430,9 +431,9 @@ Property::Value VideoView::GetProperty( BaseObject* object, Property::Index prop
 
 void VideoView::SetDepthIndex( int depthIndex )
 {
-  if( mRenderer )
+  if( mVisual )
   {
-    mRenderer.SetDepthIndex( depthIndex );
+    mVisual.SetDepthIndex( depthIndex );
   }
 }
 
@@ -440,19 +441,19 @@ void VideoView::OnStageConnection( int depth )
 {
   Control::OnStageConnection( depth );
 
-  if( mRenderer )
+  if( mVisual )
   {
     CustomActor self = Self();
-    mRenderer.SetOnStage( self );
+    Toolkit::GetImplementation(mVisual).SetOnStage( self );
   }
 }
 
 void VideoView::OnStageDisconnection()
 {
-  if( mRenderer )
+  if( mVisual )
   {
     CustomActor self = Self();
-    mRenderer.SetOffStage( self );
+    Toolkit::GetImplementation(mVisual).SetOffStage( self );
   }
 
   Control::OnStageDisconnection();
@@ -505,7 +506,7 @@ void VideoView::SetWindowSurfaceTarget()
   int curPos = mVideoPlayer.GetPlayPosition();
 
   mSetRenderingTarget = true;
-  mRenderer.RemoveAndReset( self );
+  mVisual.RemoveAndReset( self );
 
   mVideoPlayer.SetRenderingTarget( Dali::Adaptor::Get().GetNativeWindowHandle() );
   mVideoPlayer.SetUrl( mUrl );
@@ -538,7 +539,7 @@ void VideoView::SetNativeImageTarget()
   mVideoPlayer.SetUrl( mUrl );
   mVideoPlayer.FinishedSignal().Connect( this, &VideoView::EmitSignalFinish );
 
-  InitializeControlRenderer( self, mRenderer, mNativeImage );
+  Internal::InitializeVisual( self, mVisual, mNativeImage );
 
   if( mIsPlay )
   {