Move more public-api headers to devel-api. PART 3
[platform/core/uifw/dali-demo.git] / examples / magnifier / magnifier-example.cpp
index 791935d..d20cd6b 100644 (file)
@@ -21,7 +21,7 @@
 #include "shared/view.h"
 
 #include <dali-toolkit/dali-toolkit.h>
-
+#include <dali-toolkit/devel-api/controls/magnifier/magnifier.h>
 using namespace Dali;
 
 namespace
@@ -225,7 +225,7 @@ public:
     Stage::GetCurrent().Add(overlay);
 
     mMagnifier = Toolkit::Magnifier::New();
-    mMagnifier.SetSourceActor( mView.GetBackgroundLayer() );
+    mMagnifier.SetSourceActor( mView.GetChildAt( 0 ) );
     mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width );  // Size of magnifier is in relation to stage width
     mMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR );
     mMagnifier.SetScale(Vector3::ZERO);
@@ -242,7 +242,7 @@ public:
 
     // Create bouncing magnifier automatically bounces around screen.
     mBouncingMagnifier = Toolkit::Magnifier::New();
-    mBouncingMagnifier.SetSourceActor( mView.GetBackgroundLayer() );
+    mBouncingMagnifier.SetSourceActor( mView.GetChildAt( 0 ) );
     mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
     mBouncingMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR );
     overlay.Add( mBouncingMagnifier );
@@ -344,7 +344,7 @@ public:
     if(!mMagnifierShown)
     {
       Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
-      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ONE, AlphaFunctions::EaseIn);
+      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ONE, AlphaFunction::EASE_IN);
       animation.Play();
       mMagnifierShown = true;
     }
@@ -358,7 +358,7 @@ public:
     if(mMagnifierShown)
     {
       Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
-      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ZERO, AlphaFunctions::EaseOut);
+      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ZERO, AlphaFunction::EASE_OUT);
       animation.Play();
       mMagnifierShown = false;
     }
@@ -393,7 +393,7 @@ public:
 private:
 
   Application&  mApplication;                             ///< Application instance
-  Toolkit::View mView;                                    ///< The view
+  Toolkit::Control mView;                                 ///< The view
   Layer mContent;                                         ///< The content layer
   Toolkit::Magnifier mMagnifier;                          ///< The manually controlled magnifier
   Toolkit::Magnifier mBouncingMagnifier;                  ///< The animating magnifier (swirly animation)