[AT-SPI] Squashed implementation
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / effects-view / effects-view-impl.cpp
index 0c34673..dee09e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
-#include <dali/public-api/common/stage.h>
+#include <dali/devel-api/common/stage.h>
 #include <dali/public-api/object/property.h>
 #include <dali/public-api/object/property-map.h>
 #include <dali/public-api/object/type-registry.h>
@@ -36,6 +36,7 @@
 #include <dali-toolkit/internal/filters/emboss-filter.h>
 #include <dali-toolkit/internal/filters/spread-filter.h>
 #include <dali-toolkit/internal/controls/control/control-renderers.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 
 namespace Dali
 {
@@ -147,6 +148,10 @@ EffectsView::EffectsView()
   mEnabled( false ),
   mRefreshOnDemand( EFFECTS_VIEW_REFRESH_ON_DEMAND )
 {
+  DevelControl::SetAccessibilityConstructor( Self(), []( Dali::Actor actor ) {
+    return std::unique_ptr< Dali::Accessibility::Accessible >(
+      new Control::Impl::AccessibleImpl( actor, Dali::Accessibility::Role::FILLER ) );
+  } );
 }
 
 EffectsView::~EffectsView()
@@ -265,7 +270,7 @@ int EffectsView::GetEffectSize()
 void EffectsView::OnInitialize()
 {
   CustomActor self = Self();
-  mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
+  mChildrenRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   self.Add( mChildrenRoot );
 }
 
@@ -283,12 +288,12 @@ void EffectsView::OnSizeSet(const Vector3& targetSize)
     Enable();
   }
 
-  mChildrenRoot.SetSize( targetSize );
+  mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize );
 
   Control::OnSizeSet( targetSize );
 }
 
-void EffectsView::OnStageConnection( int depth )
+void EffectsView::OnSceneConnection( int depth )
 {
   Actor self( Self() );
 
@@ -303,10 +308,10 @@ void EffectsView::OnStageConnection( int depth )
 
   Enable();
 
-  Control::OnStageConnection( depth );
+  Control::OnSceneConnection( depth );
 }
 
-void EffectsView::OnStageDisconnection()
+void EffectsView::OnSceneDisconnection()
 {
   Actor self( Self() );
 
@@ -325,7 +330,7 @@ void EffectsView::OnStageDisconnection()
   self.RemoveRenderer( mRendererPostFilter );
   mRendererPostFilter.Reset();
 
-  Control::OnStageDisconnection();
+  Control::OnSceneDisconnection();
 }
 
 void EffectsView::OnChildAdd( Actor& child )
@@ -450,7 +455,7 @@ void EffectsView::SetupCameras()
   {
     // Create a camera for the children render, corresponding to its render target size
     mCameraForChildren = CameraActor::New(mTargetSize);
-    mCameraForChildren.SetParentOrigin(ParentOrigin::CENTER);
+    mCameraForChildren.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
     mCameraForChildren.SetInvertYAxis( true );
     Self().Add( mCameraForChildren );
   }
@@ -462,8 +467,8 @@ void EffectsView::SetupCameras()
     mCameraForChildren.SetNearClippingPlane(1.0f);
     mCameraForChildren.SetAspectRatio(mTargetSize.width / mTargetSize.height);
     mCameraForChildren.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
-    mCameraForChildren.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosScale);
-    mCameraForChildren.SetZ( mTargetSize.height * cameraPosScale );
+    mCameraForChildren.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, mTargetSize.height * cameraPosScale ) );
+    mCameraForChildren.SetProperty( Actor::Property::POSITION_Z,  mTargetSize.height * cameraPosScale );
   }
 }