Remove deprecated APIs in Tizen 3.0
[platform/core/uifw/dali-demo.git] / examples / primitive-shapes / primitive-shapes-example.cpp
index 8f43722..346869c 100644 (file)
@@ -28,7 +28,7 @@ namespace
   {
     DEMO_IMAGE_DIR "sphere-button.png",
     DEMO_IMAGE_DIR "cone-button.png",
-    DEMO_IMAGE_DIR "conical-frustrum-button.png",
+    DEMO_IMAGE_DIR "conical-frustum-button.png",
     DEMO_IMAGE_DIR "cylinder-button.png",
     DEMO_IMAGE_DIR "cube-button.png",
     DEMO_IMAGE_DIR "bevelled-cube-button.png",
@@ -95,7 +95,7 @@ public:
     layer.SetParentOrigin( ParentOrigin::CENTER );
     layer.SetAnchorPoint( AnchorPoint::CENTER );
     layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-    layer.SetBehavior( Layer::LAYER_2D ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
+    layer.SetBehavior( Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
     layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so.
     stage.Add( layer );
 
@@ -413,13 +413,13 @@ public:
     mShapeTitle.SetProperty( TextLabel::Property::TEXT, SHAPE_TITLE_PREFIX + "Cone" );
   }
 
-  //Sets the 3D model to a conical frustrum and modifies the sliders appropriately.
-  void LoadConicalFrustrum()
+  //Sets the 3D model to a conical frustum and modifies the sliders appropriately.
+  void LoadConicalFrustum()
   {
     InitialiseSlidersAndModel();
 
     //Set up specific visual properties.
-    mVisualMap[ PrimitiveVisual::Property::SHAPE               ] = PrimitiveVisual::Shape::CONICAL_FRUSTRUM;
+    mVisualMap[ PrimitiveVisual::Property::SHAPE               ] = PrimitiveVisual::Shape::CONICAL_FRUSTUM;
     mVisualMap[ PrimitiveVisual::Property::SCALE_TOP_RADIUS    ] = DEFAULT_SCALE_TOP_RADIUS;
     mVisualMap[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = DEFAULT_SCALE_BOTTOM_RADIUS;
     mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT        ] = DEFAULT_SCALE_HEIGHT;
@@ -439,7 +439,7 @@ public:
     mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
 
     //Update title.
-    mShapeTitle.SetProperty( TextLabel::Property::TEXT, SHAPE_TITLE_PREFIX + "Conical Frustrum" );
+    mShapeTitle.SetProperty( TextLabel::Property::TEXT, SHAPE_TITLE_PREFIX + "Conical Frustum" );
   }
 
   //Sets the 3D model to a cylinder and modifies the sliders appropriately.
@@ -589,7 +589,7 @@ public:
       }
       case 2:
       {
-        LoadConicalFrustrum();
+        LoadConicalFrustum();
         break;
       }
       case 3:
@@ -706,20 +706,10 @@ private:
   Vector2                   mRotation;              ///< Keeps track of model rotation.
 };
 
-void RunTest( Application& application )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
+  Application application = Application::New( &argc, &argv );
   PrimitiveShapesController test( application );
-
   application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
-int main( int argc, char **argv )
-{
-  Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
   return 0;
 }