Removed redundant RunTest methods from all examples 01/154101/3
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 6 Oct 2017 13:45:06 +0000 (14:45 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 9 Oct 2017 14:21:05 +0000 (15:21 +0100)
Change-Id: I863826a7a7c31e7027843dfffbad08e2b7501722

70 files changed:
builder/dali-builder.cpp
examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp
examples/animated-images/animated-images-example.cpp
examples/animated-shapes/animated-shapes-example.cpp
examples/benchmark/benchmark.cpp
examples/blocks/blocks-example.cpp
examples/bubble-effect/bubble-effect-example.cpp
examples/buttons/buttons-example.cpp
examples/clipping-draw-order/clipping-draw-order.cpp
examples/compressed-texture-formats/compressed-texture-formats-example.cpp
examples/cube-transition-effect/cube-transition-effect-example.cpp
examples/dissolve-effect/dissolve-effect-example.cpp
examples/effects-view/effects-view-example.cpp
examples/flex-container/flex-container-example.cpp
examples/focus-integration/focus-integration.cpp
examples/fpp-game/fpp-game-example.cpp
examples/gradients/gradients-example.cpp
examples/hello-world/hello-world-example.cpp
examples/homescreen-benchmark/homescreen-benchmark.cpp
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp
examples/image-view-pixel-area/image-view-pixel-area-example.cpp
examples/image-view-svg/image-view-svg-example.cpp
examples/image-view-url/image-view-url-example.cpp
examples/image-view/image-view-example.cpp
examples/item-view/item-view-example.cpp
examples/line-mesh/line-mesh-example.cpp
examples/magnifier/magnifier-example.cpp
examples/mesh-morph/mesh-morph-example.cpp
examples/mesh-visual/mesh-visual-example.cpp
examples/model3d-view/model3d-view-example.cpp
examples/motion-blur/motion-blur-example.cpp
examples/motion-stretch/motion-stretch-example.cpp
examples/native-image-source/native-image-source-example.cpp
examples/perf-scroll/perf-scroll.cpp
examples/point-mesh/point-mesh-example.cpp
examples/popup/popup-example.cpp
examples/primitive-shapes/primitive-shapes-example.cpp
examples/ray-marching/ray-marching-example.cpp
examples/refraction-effect/refraction-effect-example.cpp
examples/remote-image-loading/remote-image-loading-example.cpp
examples/renderer-stencil/renderer-stencil-example.cpp
examples/rendering-basic-light/rendering-basic-light-example.cpp
examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp
examples/rendering-cube/rendering-cube.cpp
examples/rendering-line/rendering-line.cpp
examples/rendering-radial-progress/radial-progress.cpp
examples/rendering-skybox/rendering-skybox.cpp
examples/rendering-textured-cube/rendering-textured-cube.cpp
examples/rendering-triangle/rendering-triangle.cpp
examples/shadows-and-lights/shadows-and-lights-example.cpp
examples/simple-visuals-control/simple-visuals-example.cpp
examples/size-negotiation/size-negotiation-example.cpp
examples/sparkle/sparkle-effect-example.cpp
examples/styling/style-example.cpp
examples/text-editor/text-editor-example.cpp
examples/text-field/text-field-example.cpp
examples/text-fonts/text-fonts-example.cpp
examples/text-label-emojis/text-label-emojis.cpp
examples/text-label-multi-language/text-label-multi-language-example.cpp
examples/text-label/text-label-example.cpp
examples/text-memory-profiling/text-memory-profiling-example.cpp
examples/text-overlap/text-overlap-example.cpp
examples/text-scrolling/text-scrolling-example.cpp
examples/textured-mesh/textured-mesh-example.cpp
examples/tilt/tilt-example.cpp
examples/transitions/transition-example.cpp
examples/video-view/video-view-example.cpp
examples/visual-transitions/transition-example.cpp

index ac2b1df..4481c3d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -295,7 +295,7 @@ private:
 //
 //
 //------------------------------------------------------------------------------
-int main(int argc, char **argv)
+int DALI_EXPORT_API main(int argc, char **argv)
 {
 
   Application dali_app = Application::New(&argc, &argv, DEMO_THEME_PATH);
index 8c30f84..f58e33f 100644 (file)
@@ -150,20 +150,10 @@ private:
   int mImageCombinationIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewAlphaBlendApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewAlphaBlendApp test( application );
+  application.MainLoop();
   return 0;
 }
index ddcbc99..fab53de 100644 (file)
@@ -376,7 +376,6 @@ private:
   ImageType mImageType;
 };
 
-// Entry point for Linux & Tizen applications
 //
 int DALI_EXPORT_API main( int argc, char **argv )
 {
index 206bacb..b4b8a39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -460,16 +460,10 @@ private:
 
 };
 
-void RunTest( Application& application )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
+  Application application = Application::New( &argc, &argv );
   AnimatedShapesExample test( application );
   application.MainLoop();
-}
-
-int main( int argc, char **argv )
-{
-  Application application = Application::New( &argc, &argv );
-  RunTest( application );
-
   return 0;
 }
index cd3c332..8ad4c5b 100644 (file)
@@ -464,15 +464,6 @@ private:
   Animation           mHide;
 };
 
-void RunTest( Application& application )
-{
-  Benchmark test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
@@ -502,7 +493,8 @@ int DALI_EXPORT_API main( int argc, char **argv )
     }
   }
 
-  RunTest( application );
+  Benchmark test( application );
+  application.MainLoop();
 
   return 0;
 }
index e22260d..dc3b208 100644 (file)
@@ -862,18 +862,10 @@ private:
   int mBrickCount;                                      ///< Total bricks on screen.
 };
 
-void RunTest(Application& app)
-{
-  ExampleController test(app);
-
-  app.MainLoop();
-}
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  ExampleController test(app);
+  app.MainLoop();
   return 0;
 }
index 66c02b8..d76b3a8 100644 (file)
@@ -306,20 +306,10 @@ private:
 
 /*****************************************************************************/
 
-static void
-RunTest(Application& app)
-{
-  BubbleEffectExample theApp(app);
-  app.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  BubbleEffectExample theApp(app);
+  app.MainLoop();
   return 0;
 }
index a21e2f2..ce59368 100644 (file)
@@ -509,20 +509,10 @@ private:
   Toolkit::ImageView mImage;
 };
 
-void RunTest( Application& application )
-{
-  ButtonsController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ButtonsController test( application );
+  application.MainLoop();
   return 0;
 }
index a2a48a4..68ca7df 100644 (file)
@@ -228,7 +228,6 @@ private:
   Application&  mApplication;
 };
 
-// Entry point for Linux & Tizen applications.
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
index d53b8cf..606f8cd 100644 (file)
@@ -202,20 +202,10 @@ private:
   Application&  mApplication;
 };
 
-void RunTest( Application& application )
-{
-  CompressedTextureFormatsController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  CompressedTextureFormatsController test( application );
+  application.MainLoop();
   return 0;
 }
index 8d8acbd..f728418 100644 (file)
@@ -413,7 +413,6 @@ void CubeTransitionApp::OnKeyEvent(const KeyEvent& event)
   }
 }
 
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
index ed47bd5..185c65f 100644 (file)
@@ -436,7 +436,6 @@ bool DissolveEffectApp::OnTimerTick()
   return false;   //return false to stop the timer
 }
 
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
index e4c0373..1404e22 100644 (file)
@@ -245,20 +245,10 @@ void EffectsViewApp::OnKeyEvent(const KeyEvent& event)
 
 /*****************************************************************************/
 
-static void RunTest( Application& application )
-{
-  EffectsViewApp test( application );
-
-  application.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application application = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(application);
-
+  EffectsViewApp test( application );
+  application.MainLoop();
   return 0;
 }
index 4178991..4da35ea 100644 (file)
@@ -367,18 +367,10 @@ private:
   Toolkit::PushButton mAlignContentButton;
 };
 
-void RunTest(Application& app)
-{
-  FlexContainerExample test(app);
-
-  app.MainLoop();
-}
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  FlexContainerExample test(app);
+  app.MainLoop();
   return 0;
 }
index 2e80a96..f2d2bf0 100644 (file)
@@ -193,7 +193,6 @@ private:
   Layer             mContentLayer;                      ///< Content layer.
 };
 
-// Entry point for Linux & Tizen applications
 //
 int DALI_EXPORT_API main( int argc, char **argv )
 {
index 211028f..c409dc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -135,20 +135,10 @@ private:
   FppGameTutorialController mTutorialController;
 };
 
-void RunTest( Application& application )
-{
-  GameController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  GameController test( application );
+  application.MainLoop();
   return 0;
 }
index 822caef..78480f6 100644 (file)
@@ -161,20 +161,10 @@ private:
   unsigned mIndex;
 };
 
-void RunTest( Application& application )
-{
-  GradientController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  GradientController test( application );
+  application.MainLoop();
   return 0;
 }
index 89670a1..39fa54c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -65,20 +65,10 @@ private:
   Application&  mApplication;
 };
 
-void RunTest( Application& application )
-{
-  HelloWorldController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  HelloWorldController test( application );
+  application.MainLoop();
   return 0;
 }
index 64ff1ad..ab4fb8b 100644 (file)
@@ -454,26 +454,6 @@ private:
   int                         mCurrentPage;
 };
 
-void RunTest( Application& application, const HomescreenBenchmark::Config& config, bool printHelpAndExit )
-{
-  HomescreenBenchmark test( application, config );
-
-  if( printHelpAndExit )
-  {
-    PrintHelp( "c<num>",               " Number of columns" );
-    PrintHelp( "r<num>",               " Number of rows" );
-    PrintHelp( "p<num>",               " Number of pages ( must be greater than 1 )" );
-    PrintHelp( "-disable-tableview",   " Disables the use of TableView for layouting" );
-    PrintHelp( "-disable-icon-labels", " Disables labels for each icon" );
-    PrintHelp( "-use-checkbox",        " Uses checkboxes for icons" );
-    PrintHelp( "-use-text-label",      " Uses TextLabel instead of a TextVisual" );
-    return;
-  }
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications.
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   // Default settings.
@@ -519,8 +499,21 @@ int DALI_EXPORT_API main( int argc, char **argv )
   }
 
   Application application = Application::New( &argc, &argv );
+  HomescreenBenchmark test( application, config );
 
-  RunTest( application, config, printHelpAndExit );
+  if( printHelpAndExit )
+  {
+    PrintHelp( "c<num>",               " Number of columns" );
+    PrintHelp( "r<num>",               " Number of rows" );
+    PrintHelp( "p<num>",               " Number of pages ( must be greater than 1 )" );
+    PrintHelp( "-disable-tableview",   " Disables the use of TableView for layouting" );
+    PrintHelp( "-disable-icon-labels", " Disables labels for each icon" );
+    PrintHelp( "-use-checkbox",        " Uses checkboxes for icons" );
+    PrintHelp( "-use-text-label",      " Uses TextLabel instead of a TextVisual" );
+    return 0;
+  }
+
+  application.MainLoop();
 
   return 0;
 }
index 6219742..cdd8ee6 100644 (file)
@@ -723,19 +723,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  ImageScalingAndFilteringController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ImageScalingAndFilteringController test( application );
+  application.MainLoop();
   return 0;
 }
index cbac87a..0ef5961 100644 (file)
@@ -644,19 +644,10 @@ private:
   unsigned int mImagesLoaded;         ///< How many images have been loaded
 };
 
-void RunTest( Application& application )
-{
-  ImageScalingIrregularGridController test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ImageScalingIrregularGridController test( application );
+  application.MainLoop();
   return 0;
 }
index 3a4ce7f..011e7c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -117,20 +117,10 @@ private:
   unsigned int mIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewAlphaBlendApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewAlphaBlendApp test( application );
+  application.MainLoop();
   return 0;
 }
index 362ced1..2fc7caf 100644 (file)
@@ -234,20 +234,10 @@ private:
   unsigned int mIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewPixelAreaApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewPixelAreaApp test( application );
+  application.MainLoop();
   return 0;
 }
index fa89c05..62cde6e 100644 (file)
@@ -232,20 +232,10 @@ private:
   unsigned int        mIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageSvgController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageSvgController test( application );
+  application.MainLoop();
   return 0;
 }
index 3522929..ce98781 100644 (file)
@@ -198,20 +198,10 @@ private:
   Texture mOutputTexture;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewUrlApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewUrlApp test( application );
+  application.MainLoop();
   return 0;
 }
index a772665..d057aa7 100644 (file)
@@ -226,20 +226,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  ImageViewController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ImageViewController test( application );
+  application.MainLoop();
   return 0;
 }
index c9f4e97..d7e7b9b 100644 (file)
@@ -994,18 +994,10 @@ private:
   LongPressGestureDetector mLongPressDetector;
 };
 
-void RunTest(Application& app)
-{
-  ItemViewExample test(app);
-
-  app.MainLoop();
-}
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  ItemViewExample test(app);
+  app.MainLoop();
   return 0;
 }
index e2cb540..24d1504 100644 (file)
@@ -391,20 +391,10 @@ private:
   int      mMaxIndexCount;
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 2221bf1..d319540 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -402,20 +402,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index ebf3654..4fa17bb 100644 (file)
@@ -348,20 +348,10 @@ private:
   Timer    mMorphTimer;
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 682c243..4a039df 100644 (file)
@@ -603,9 +603,7 @@ private:
   bool mLightFront; //Bool for light being in front or behind the models.
 };
 
-// Entry point for Linux & Tizen applications
-//
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
   MeshVisualController test( application );
index 08cb8fa..865c8ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -294,20 +294,10 @@ private:
   bool mScaled;
 };
 
-void RunTest( Application& application )
-{
-  Model3dViewController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  Model3dViewController test( application );
+  application.MainLoop();
   return 0;
 }
index 9c80f5c..cce7410 100644 (file)
@@ -451,20 +451,10 @@ private:
   Animation mRotateAnimation;                   ///< Animation for rotating between landscape and portrait.
 };
 
-void RunTest(Application& app)
-{
-  MotionBlurExampleApp test(app);
-
-  app.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  MotionBlurExampleApp test(app);
+  app.MainLoop();
   return 0;
 }
index b0105de..a059723 100644 (file)
@@ -427,20 +427,10 @@ private:
 
 };
 
-void RunTest(Application& app)
-{
-  MotionStretchExampleApp test(app);
-
-  app.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  MotionStretchExampleApp test(app);
+  app.MainLoop();
   return 0;
 }
index 35d08fc..d8271eb 100644 (file)
@@ -432,20 +432,10 @@ private:
   bool mRefreshAlways;
 };
 
-void RunTest( Application& application )
-{
-  NativeImageSourceController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  NativeImageSourceController test( application );
+  application.MainLoop();
   return 0;
 }
index 9283dce..6740eee 100644 (file)
@@ -451,15 +451,6 @@ private:
   Animation           mHide;
 };
 
-void RunTest( Application& application )
-{
-  PerfScroll test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
@@ -481,7 +472,8 @@ int DALI_EXPORT_API main( int argc, char **argv )
     }
   }
 
-  RunTest( application );
+  PerfScroll test( application );
+  application.MainLoop();
 
   return 0;
 }
index 747f07f..7d9fe0b 100644 (file)
@@ -227,20 +227,10 @@ private:
   Timer    mChangeImageTimer;
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 49a15c9..cde668c 100644 (file)
@@ -732,19 +732,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  PopupExample test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  PopupExample test( application );
+  application.MainLoop();
   return 0;
 }
index 8f43722..82772a3 100644 (file)
@@ -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;
 }
index 4a924a6..6bf0c20 100644 (file)
@@ -211,20 +211,10 @@ private:
   ToolBar mToolBar;
 };
 
-void RunTest( Application& application )
-{
-  RayMarchingExample test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  RayMarchingExample test( application );
+  application.MainLoop();
   return 0;
 }
index f713ee9..14c4878 100644 (file)
@@ -588,20 +588,10 @@ private:
 
 /*****************************************************************************/
 
-static void
-RunTest(Application& app)
-{
-  RefractionEffectExample theApp(app);
-  app.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  RefractionEffectExample theApp(app);
+  app.MainLoop();
   return 0;
 }
index 2733d3d..2dbcadb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -208,18 +208,10 @@ private:
 
 };
 
-void RunTest(Application &application)
-{
-  MyTester test(application);
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main(int argc, char **argv)
 {
-
   Application application = Application::New(&argc, &argv, "");
-  RunTest(application);
-
+  MyTester test(application);
+  application.MainLoop();
   return 0;
 }
index 55939d5..f3aec24 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -753,29 +753,10 @@ private:
   Actor            mCubes[2];          ///< The cube object containers
 };
 
-
-/**
- * @brief Creates an instance of the example object and runs it.
- * @param[in] application The DALi application object
- */
-void RunExample( Application& application )
-{
-  RendererStencilExample example( application );
-
-  application.MainLoop();
-}
-
-/**
- * @brief Entry point for Linux & Tizen applications
- * @param[in] argc The executables argument count
- * @param[in] argv The executables argument vector
- * @return The executables exit code (0)
- */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunExample( application );
-
+  RendererStencilExample example( application );
+  application.MainLoop();
   return 0;
 }
index aafa991..a5fdcb3 100644 (file)
@@ -409,20 +409,10 @@ private:
   Animation mAnimation;
 };
 
-void RunTest( Application& application )
-{
-  BasicLightController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, BASIC_LIGHT_THEME);
-
-  RunTest( application );
-
+  BasicLightController test( application );
+  application.MainLoop();
   return 0;
 }
index b461ce4..920a7b8 100644 (file)
@@ -451,20 +451,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  BasicPbrController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv);
-
-  RunTest( application );
-
+  BasicPbrController test( application );
+  application.MainLoop();
   return 0;
 }
index 9d745bd..d8b24d9 100644 (file)
@@ -278,20 +278,10 @@ private:
   Animation mAnimation;
 };
 
-void RunTest( Application& application )
-{
-  DrawCubeController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  DrawCubeController test( application );
+  application.MainLoop();
   return 0;
 }
index d16f8e6..1bbaf84 100644 (file)
@@ -186,20 +186,10 @@ private:
   Actor mActor;
 };
 
-void RunTest( Application& application )
-{
-  DrawLineController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  DrawLineController test( application );
+  application.MainLoop();
   return 0;
 }
index 75087ea..eb0fb7e 100644 (file)
@@ -310,7 +310,6 @@ private:
   Actor mActor;
 };
 
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
index 420ac61..cb8590d 100644 (file)
@@ -484,20 +484,10 @@ private:
   Actor mSkyboxActor;
 };
 
-void RunTest( Application& application )
-{
-  TexturedCubeController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TexturedCubeController test( application );
+  application.MainLoop();
   return 0;
 }
index c2abc59..3434d63 100644 (file)
@@ -297,20 +297,10 @@ private:
   Animation mAnimation;
 };
 
-void RunTest( Application& application )
-{
-  TexturedCubeController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TexturedCubeController test( application );
+  application.MainLoop();
   return 0;
 }
index 00b4ff1..76fae81 100644 (file)
@@ -187,20 +187,10 @@ private:
   Actor mActor;
 };
 
-void RunTest( Application& application )
-{
-  DrawTriangleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  DrawTriangleController test( application );
+  application.MainLoop();
   return 0;
 }
index 6dac9fa..65a8859 100644 (file)
@@ -511,20 +511,10 @@ private:
 
 /*****************************************************************************/
 
-static void
-RunTest(Application& app)
-{
-  TestApp theApp(app);
-  app.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  TestApp theApp(app);
+  app.MainLoop();
   return 0;
 }
index 1011243..4c20557 100644 (file)
@@ -31,7 +31,6 @@ namespace
 const char* SIMPLE_DEMO_THEME( DEMO_STYLE_DIR "simple-example-theme.json" );
 }
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   Application application = Application::New( &argc, &argv, SIMPLE_DEMO_THEME ); // Use the above defined style sheet for this application.
index 4de690c..4856360 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -819,19 +819,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  SizeNegotiationController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  SizeNegotiationController test( application );
+  application.MainLoop();
   return 0;
 }
index 1cc465a..9cb180a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -548,21 +548,11 @@ private:
   std::map< Animation, int > mTapAnimationIndexPair;
 };
 
-void RunTest( Application& application )
-{
-  SparkleEffectExample theApp( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  SparkleEffectExample theApp( application );
+  application.MainLoop();
   return 0;
 }
 
index cbdecf6..dfd2d11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -26,7 +26,6 @@
 #include "styling-application.h"
 
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   const char* themeName = Demo::StylingApplication::DEMO_THEME_ONE_PATH;
index 866bded..6e25686 100644 (file)
@@ -295,20 +295,11 @@ private:
   Toolkit::TableView  mButtonContainer;
 };
 
-void RunTest( Application& application )
-{
-  TextEditorExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
   // DALI_DEMO_THEME_PATH not passed to Application so TextEditor example uses default Toolkit style sheet.
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TextEditorExample test( application );
+  application.MainLoop();
   return 0;
 }
index 36fd1db..9451fdf 100644 (file)
@@ -211,20 +211,11 @@ private:
   Popup mPopup;
 };
 
-void RunTest( Application& application )
-{
-  TextFieldExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   // DALI_DEMO_THEME_PATH not passed to Application so TextField example uses default Toolkit style sheet.
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TextFieldExample test( application );
+  application.MainLoop();
   return 0;
 }
index be78963..1519b87 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -245,19 +245,10 @@ private:
   bool mToggle;
 };
 
-void RunTest( Application& application )
-{
-  TextFontsExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextFontsExample test( application );
+  application.MainLoop();
   return 0;
 }
index 8e13fff..c98e206 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -132,20 +132,10 @@ private:
   float          mLastPoint;
 };
 
-void RunTest( Application& application )
-{
-  EmojiExample test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  EmojiExample test( application );
+  application.MainLoop();
   return 0;
 }
index 8005b58..ba54b57 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -134,19 +134,10 @@ private:
   float          mLastPoint;
 };
 
-void RunTest( Application& application )
-{
-  TextLabelMultiLanguageExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextLabelMultiLanguageExample test( application );
+  application.MainLoop();
   return 0;
 }
index 759a684..bb9c36b 100644 (file)
@@ -582,19 +582,10 @@ private:
   Property::Index mOverrideMixColorIndex;
 };
 
-void RunTest( Application& application )
-{
-  TextLabelExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextLabelExample test( application );
+  application.MainLoop();
   return 0;
 }
index 693b0d4..09e6f69 100644 (file)
@@ -419,18 +419,10 @@ private:
   unsigned int mCurrentTextStyle;
 };
 
-void RunTest( Application& application )
-{
-  TextMemoryProfilingExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-  RunTest( application );
-
+  TextMemoryProfilingExample test( application );
+  application.MainLoop();
   return 0;
 }
index f5609bd..85d12db 100644 (file)
@@ -137,8 +137,7 @@ void TextOverlapController::OnKeyEvent( const KeyEvent& keyEvent )
 
 } // namespace Demo
 
-
-int main( int argc, char** argv )
+int DALI_EXPORT_API main( int argc, char** argv )
 {
   {
     Application app = Application::New( &argc, &argv );
index 5a4ff9e..6b3f047 100644 (file)
@@ -404,19 +404,10 @@ private:
   bool mToggleColor;
 };
 
-void RunTest( Application& application )
-{
-  TextScrollingExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextScrollingExample test( application );
+  application.MainLoop();
   return 0;
 }
index 510e34d..a0ca655 100644 (file)
@@ -241,20 +241,10 @@ private:
   Timer    mChangeImageTimer;
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 783acbe..dec8078 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -112,8 +112,6 @@ private:
   TextLabel mTextLabel;
 };
 
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
index 9bf3cd2..0047bfb 100644 (file)
@@ -26,7 +26,6 @@
 #include "transition-application.h"
 
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   const char* themeName = Demo::TransitionApplication::DEMO_THEME_ONE_PATH;
index 894adf1..09f909d 100644 (file)
@@ -352,20 +352,10 @@ private:
   Property::Map mNativeImageTarget;
 };
 
-void RunTest( Application& application )
-{
-  VideoViewController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  VideoViewController test( application );
+  application.MainLoop();
   return 0;
 }
index adc4563..0047bfb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -26,7 +26,6 @@
 #include "transition-application.h"
 
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   const char* themeName = Demo::TransitionApplication::DEMO_THEME_ONE_PATH;