From 312470da17142a335f5f743630b7fc19c0061ead Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Fri, 6 Oct 2017 14:45:06 +0100 Subject: [PATCH] Removed redundant RunTest methods from all examples Change-Id: I863826a7a7c31e7027843dfffbad08e2b7501722 --- builder/dali-builder.cpp | 4 +-- .../alpha-blending-cpu-example.cpp | 14 ++------- .../animated-images/animated-images-example.cpp | 1 - .../animated-shapes/animated-shapes-example.cpp | 12 ++------ examples/benchmark/benchmark.cpp | 12 ++------ examples/blocks/blocks-example.cpp | 12 ++------ examples/bubble-effect/bubble-effect-example.cpp | 14 ++------- examples/buttons/buttons-example.cpp | 14 ++------- .../clipping-draw-order/clipping-draw-order.cpp | 1 - .../compressed-texture-formats-example.cpp | 14 ++------- .../cube-transition-effect-example.cpp | 1 - .../dissolve-effect/dissolve-effect-example.cpp | 1 - examples/effects-view/effects-view-example.cpp | 14 ++------- examples/flex-container/flex-container-example.cpp | 12 ++------ examples/focus-integration/focus-integration.cpp | 1 - examples/fpp-game/fpp-game-example.cpp | 16 ++-------- examples/gradients/gradients-example.cpp | 14 ++------- examples/hello-world/hello-world-example.cpp | 16 ++-------- .../homescreen-benchmark/homescreen-benchmark.cpp | 35 +++++++++------------- .../image-scaling-and-filtering-example.cpp | 13 ++------ .../image-scaling-irregular-grid-example.cpp | 13 ++------ .../image-view-alpha-blending-example.cpp | 16 ++-------- .../image-view-pixel-area-example.cpp | 14 ++------- examples/image-view-svg/image-view-svg-example.cpp | 14 ++------- examples/image-view-url/image-view-url-example.cpp | 14 ++------- examples/image-view/image-view-example.cpp | 14 ++------- examples/item-view/item-view-example.cpp | 12 ++------ examples/line-mesh/line-mesh-example.cpp | 14 ++------- examples/magnifier/magnifier-example.cpp | 16 ++-------- examples/mesh-morph/mesh-morph-example.cpp | 14 ++------- examples/mesh-visual/mesh-visual-example.cpp | 4 +-- examples/model3d-view/model3d-view-example.cpp | 16 ++-------- examples/motion-blur/motion-blur-example.cpp | 14 ++------- examples/motion-stretch/motion-stretch-example.cpp | 14 ++------- .../native-image-source-example.cpp | 14 ++------- examples/perf-scroll/perf-scroll.cpp | 12 ++------ examples/point-mesh/point-mesh-example.cpp | 14 ++------- examples/popup/popup-example.cpp | 13 ++------ .../primitive-shapes/primitive-shapes-example.cpp | 14 ++------- examples/ray-marching/ray-marching-example.cpp | 14 ++------- .../refraction-effect-example.cpp | 14 ++------- .../remote-image-loading-example.cpp | 14 ++------- .../renderer-stencil/renderer-stencil-example.cpp | 25 ++-------------- .../rendering-basic-light-example.cpp | 14 ++------- .../rendering-basic-pbr-example.cpp | 14 ++------- examples/rendering-cube/rendering-cube.cpp | 14 ++------- examples/rendering-line/rendering-line.cpp | 14 ++------- .../rendering-radial-progress/radial-progress.cpp | 1 - examples/rendering-skybox/rendering-skybox.cpp | 14 ++------- .../rendering-textured-cube.cpp | 14 ++------- examples/rendering-triangle/rendering-triangle.cpp | 14 ++------- .../shadows-and-lights-example.cpp | 14 ++------- .../simple-visuals-example.cpp | 1 - .../size-negotiation/size-negotiation-example.cpp | 15 ++-------- examples/sparkle/sparkle-effect-example.cpp | 16 ++-------- examples/styling/style-example.cpp | 3 +- examples/text-editor/text-editor-example.cpp | 15 ++-------- examples/text-field/text-field-example.cpp | 13 ++------ examples/text-fonts/text-fonts-example.cpp | 15 ++-------- examples/text-label-emojis/text-label-emojis.cpp | 16 ++-------- .../text-label-multi-language-example.cpp | 15 ++-------- examples/text-label/text-label-example.cpp | 13 ++------ .../text-memory-profiling-example.cpp | 12 ++------ examples/text-overlap/text-overlap-example.cpp | 3 +- examples/text-scrolling/text-scrolling-example.cpp | 13 ++------ examples/textured-mesh/textured-mesh-example.cpp | 14 ++------- examples/tilt/tilt-example.cpp | 4 +-- examples/transitions/transition-example.cpp | 1 - examples/video-view/video-view-example.cpp | 14 ++------- examples/visual-transitions/transition-example.cpp | 3 +- 70 files changed, 145 insertions(+), 698 deletions(-) diff --git a/builder/dali-builder.cpp b/builder/dali-builder.cpp index ac2b1df..4481c3d 100644 --- a/builder/dali-builder.cpp +++ b/builder/dali-builder.cpp @@ -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); diff --git a/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp b/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp index 8c30f84..f58e33f 100644 --- a/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp +++ b/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp @@ -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; } diff --git a/examples/animated-images/animated-images-example.cpp b/examples/animated-images/animated-images-example.cpp index ddcbc99..fab53de 100644 --- a/examples/animated-images/animated-images-example.cpp +++ b/examples/animated-images/animated-images-example.cpp @@ -376,7 +376,6 @@ private: ImageType mImageType; }; -// Entry point for Linux & Tizen applications // int DALI_EXPORT_API main( int argc, char **argv ) { diff --git a/examples/animated-shapes/animated-shapes-example.cpp b/examples/animated-shapes/animated-shapes-example.cpp index 206bacb..b4b8a39 100644 --- a/examples/animated-shapes/animated-shapes-example.cpp +++ b/examples/animated-shapes/animated-shapes-example.cpp @@ -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; } diff --git a/examples/benchmark/benchmark.cpp b/examples/benchmark/benchmark.cpp index cd3c332..8ad4c5b 100644 --- a/examples/benchmark/benchmark.cpp +++ b/examples/benchmark/benchmark.cpp @@ -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; } diff --git a/examples/blocks/blocks-example.cpp b/examples/blocks/blocks-example.cpp index e22260d..dc3b208 100644 --- a/examples/blocks/blocks-example.cpp +++ b/examples/blocks/blocks-example.cpp @@ -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; } diff --git a/examples/bubble-effect/bubble-effect-example.cpp b/examples/bubble-effect/bubble-effect-example.cpp index 66c02b8..d76b3a8 100644 --- a/examples/bubble-effect/bubble-effect-example.cpp +++ b/examples/bubble-effect/bubble-effect-example.cpp @@ -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; } diff --git a/examples/buttons/buttons-example.cpp b/examples/buttons/buttons-example.cpp index a21e2f2..ce59368 100644 --- a/examples/buttons/buttons-example.cpp +++ b/examples/buttons/buttons-example.cpp @@ -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; } diff --git a/examples/clipping-draw-order/clipping-draw-order.cpp b/examples/clipping-draw-order/clipping-draw-order.cpp index a2a48a4..68ca7df 100644 --- a/examples/clipping-draw-order/clipping-draw-order.cpp +++ b/examples/clipping-draw-order/clipping-draw-order.cpp @@ -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 ); diff --git a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp index d53b8cf..606f8cd 100644 --- a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp +++ b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp @@ -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; } diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index 8d8acbd..f728418 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -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 ); diff --git a/examples/dissolve-effect/dissolve-effect-example.cpp b/examples/dissolve-effect/dissolve-effect-example.cpp index ed47bd5..185c65f 100644 --- a/examples/dissolve-effect/dissolve-effect-example.cpp +++ b/examples/dissolve-effect/dissolve-effect-example.cpp @@ -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 ); diff --git a/examples/effects-view/effects-view-example.cpp b/examples/effects-view/effects-view-example.cpp index e4c0373..1404e22 100644 --- a/examples/effects-view/effects-view-example.cpp +++ b/examples/effects-view/effects-view-example.cpp @@ -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; } diff --git a/examples/flex-container/flex-container-example.cpp b/examples/flex-container/flex-container-example.cpp index 4178991..4da35ea 100644 --- a/examples/flex-container/flex-container-example.cpp +++ b/examples/flex-container/flex-container-example.cpp @@ -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; } diff --git a/examples/focus-integration/focus-integration.cpp b/examples/focus-integration/focus-integration.cpp index 2e80a96..f2d2bf0 100644 --- a/examples/focus-integration/focus-integration.cpp +++ b/examples/focus-integration/focus-integration.cpp @@ -193,7 +193,6 @@ private: Layer mContentLayer; ///< Content layer. }; -// Entry point for Linux & Tizen applications // int DALI_EXPORT_API main( int argc, char **argv ) { diff --git a/examples/fpp-game/fpp-game-example.cpp b/examples/fpp-game/fpp-game-example.cpp index 211028f..c409dc2 100644 --- a/examples/fpp-game/fpp-game-example.cpp +++ b/examples/fpp-game/fpp-game-example.cpp @@ -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; } diff --git a/examples/gradients/gradients-example.cpp b/examples/gradients/gradients-example.cpp index 822caef..78480f6 100644 --- a/examples/gradients/gradients-example.cpp +++ b/examples/gradients/gradients-example.cpp @@ -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; } diff --git a/examples/hello-world/hello-world-example.cpp b/examples/hello-world/hello-world-example.cpp index 89670a1..39fa54c 100644 --- a/examples/hello-world/hello-world-example.cpp +++ b/examples/hello-world/hello-world-example.cpp @@ -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; } diff --git a/examples/homescreen-benchmark/homescreen-benchmark.cpp b/examples/homescreen-benchmark/homescreen-benchmark.cpp index 64ff1ad..ab4fb8b 100644 --- a/examples/homescreen-benchmark/homescreen-benchmark.cpp +++ b/examples/homescreen-benchmark/homescreen-benchmark.cpp @@ -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", " Number of columns" ); - PrintHelp( "r", " Number of rows" ); - PrintHelp( "p", " 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", " Number of columns" ); + PrintHelp( "r", " Number of rows" ); + PrintHelp( "p", " 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; } diff --git a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp index 6219742..cdd8ee6 100644 --- a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp +++ b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp @@ -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; } diff --git a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp index cbac87a..0ef5961 100644 --- a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp +++ b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp @@ -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; } diff --git a/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp b/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp index 3a4ce7f..011e7c6 100644 --- a/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp +++ b/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp @@ -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; } diff --git a/examples/image-view-pixel-area/image-view-pixel-area-example.cpp b/examples/image-view-pixel-area/image-view-pixel-area-example.cpp index 362ced1..2fc7caf 100644 --- a/examples/image-view-pixel-area/image-view-pixel-area-example.cpp +++ b/examples/image-view-pixel-area/image-view-pixel-area-example.cpp @@ -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; } diff --git a/examples/image-view-svg/image-view-svg-example.cpp b/examples/image-view-svg/image-view-svg-example.cpp index fa89c05..62cde6e 100644 --- a/examples/image-view-svg/image-view-svg-example.cpp +++ b/examples/image-view-svg/image-view-svg-example.cpp @@ -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; } diff --git a/examples/image-view-url/image-view-url-example.cpp b/examples/image-view-url/image-view-url-example.cpp index 3522929..ce98781 100644 --- a/examples/image-view-url/image-view-url-example.cpp +++ b/examples/image-view-url/image-view-url-example.cpp @@ -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; } diff --git a/examples/image-view/image-view-example.cpp b/examples/image-view/image-view-example.cpp index a772665..d057aa7 100644 --- a/examples/image-view/image-view-example.cpp +++ b/examples/image-view/image-view-example.cpp @@ -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; } diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index c9f4e97..d7e7b9b 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -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; } diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index e2cb540..24d1504 100644 --- a/examples/line-mesh/line-mesh-example.cpp +++ b/examples/line-mesh/line-mesh-example.cpp @@ -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; } diff --git a/examples/magnifier/magnifier-example.cpp b/examples/magnifier/magnifier-example.cpp index 2221bf1..d319540 100644 --- a/examples/magnifier/magnifier-example.cpp +++ b/examples/magnifier/magnifier-example.cpp @@ -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; } diff --git a/examples/mesh-morph/mesh-morph-example.cpp b/examples/mesh-morph/mesh-morph-example.cpp index ebf3654..4fa17bb 100644 --- a/examples/mesh-morph/mesh-morph-example.cpp +++ b/examples/mesh-morph/mesh-morph-example.cpp @@ -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; } diff --git a/examples/mesh-visual/mesh-visual-example.cpp b/examples/mesh-visual/mesh-visual-example.cpp index 682c243..4a039df 100644 --- a/examples/mesh-visual/mesh-visual-example.cpp +++ b/examples/mesh-visual/mesh-visual-example.cpp @@ -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 ); diff --git a/examples/model3d-view/model3d-view-example.cpp b/examples/model3d-view/model3d-view-example.cpp index 08cb8fa..865c8ed 100644 --- a/examples/model3d-view/model3d-view-example.cpp +++ b/examples/model3d-view/model3d-view-example.cpp @@ -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; } diff --git a/examples/motion-blur/motion-blur-example.cpp b/examples/motion-blur/motion-blur-example.cpp index 9c80f5c..cce7410 100644 --- a/examples/motion-blur/motion-blur-example.cpp +++ b/examples/motion-blur/motion-blur-example.cpp @@ -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; } diff --git a/examples/motion-stretch/motion-stretch-example.cpp b/examples/motion-stretch/motion-stretch-example.cpp index b0105de..a059723 100644 --- a/examples/motion-stretch/motion-stretch-example.cpp +++ b/examples/motion-stretch/motion-stretch-example.cpp @@ -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; } diff --git a/examples/native-image-source/native-image-source-example.cpp b/examples/native-image-source/native-image-source-example.cpp index 35d08fc..d8271eb 100644 --- a/examples/native-image-source/native-image-source-example.cpp +++ b/examples/native-image-source/native-image-source-example.cpp @@ -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; } diff --git a/examples/perf-scroll/perf-scroll.cpp b/examples/perf-scroll/perf-scroll.cpp index 9283dce..6740eee 100644 --- a/examples/perf-scroll/perf-scroll.cpp +++ b/examples/perf-scroll/perf-scroll.cpp @@ -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; } diff --git a/examples/point-mesh/point-mesh-example.cpp b/examples/point-mesh/point-mesh-example.cpp index 747f07f..7d9fe0b 100644 --- a/examples/point-mesh/point-mesh-example.cpp +++ b/examples/point-mesh/point-mesh-example.cpp @@ -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; } diff --git a/examples/popup/popup-example.cpp b/examples/popup/popup-example.cpp index 49a15c9..cde668c 100644 --- a/examples/popup/popup-example.cpp +++ b/examples/popup/popup-example.cpp @@ -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; } diff --git a/examples/primitive-shapes/primitive-shapes-example.cpp b/examples/primitive-shapes/primitive-shapes-example.cpp index 8f43722..82772a3 100644 --- a/examples/primitive-shapes/primitive-shapes-example.cpp +++ b/examples/primitive-shapes/primitive-shapes-example.cpp @@ -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; } diff --git a/examples/ray-marching/ray-marching-example.cpp b/examples/ray-marching/ray-marching-example.cpp index 4a924a6..6bf0c20 100644 --- a/examples/ray-marching/ray-marching-example.cpp +++ b/examples/ray-marching/ray-marching-example.cpp @@ -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; } diff --git a/examples/refraction-effect/refraction-effect-example.cpp b/examples/refraction-effect/refraction-effect-example.cpp index f713ee9..14c4878 100644 --- a/examples/refraction-effect/refraction-effect-example.cpp +++ b/examples/refraction-effect/refraction-effect-example.cpp @@ -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; } diff --git a/examples/remote-image-loading/remote-image-loading-example.cpp b/examples/remote-image-loading/remote-image-loading-example.cpp index 2733d3d..2dbcadb 100644 --- a/examples/remote-image-loading/remote-image-loading-example.cpp +++ b/examples/remote-image-loading/remote-image-loading-example.cpp @@ -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; } diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp index 55939d5..f3aec24 100644 --- a/examples/renderer-stencil/renderer-stencil-example.cpp +++ b/examples/renderer-stencil/renderer-stencil-example.cpp @@ -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; } diff --git a/examples/rendering-basic-light/rendering-basic-light-example.cpp b/examples/rendering-basic-light/rendering-basic-light-example.cpp index aafa991..a5fdcb3 100644 --- a/examples/rendering-basic-light/rendering-basic-light-example.cpp +++ b/examples/rendering-basic-light/rendering-basic-light-example.cpp @@ -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; } diff --git a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp index b461ce4..920a7b8 100644 --- a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp +++ b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp @@ -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; } diff --git a/examples/rendering-cube/rendering-cube.cpp b/examples/rendering-cube/rendering-cube.cpp index 9d745bd..d8b24d9 100644 --- a/examples/rendering-cube/rendering-cube.cpp +++ b/examples/rendering-cube/rendering-cube.cpp @@ -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; } diff --git a/examples/rendering-line/rendering-line.cpp b/examples/rendering-line/rendering-line.cpp index d16f8e6..1bbaf84 100644 --- a/examples/rendering-line/rendering-line.cpp +++ b/examples/rendering-line/rendering-line.cpp @@ -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; } diff --git a/examples/rendering-radial-progress/radial-progress.cpp b/examples/rendering-radial-progress/radial-progress.cpp index 75087ea..eb0fb7e 100644 --- a/examples/rendering-radial-progress/radial-progress.cpp +++ b/examples/rendering-radial-progress/radial-progress.cpp @@ -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 ); diff --git a/examples/rendering-skybox/rendering-skybox.cpp b/examples/rendering-skybox/rendering-skybox.cpp index 420ac61..cb8590d 100644 --- a/examples/rendering-skybox/rendering-skybox.cpp +++ b/examples/rendering-skybox/rendering-skybox.cpp @@ -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; } diff --git a/examples/rendering-textured-cube/rendering-textured-cube.cpp b/examples/rendering-textured-cube/rendering-textured-cube.cpp index c2abc59..3434d63 100644 --- a/examples/rendering-textured-cube/rendering-textured-cube.cpp +++ b/examples/rendering-textured-cube/rendering-textured-cube.cpp @@ -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; } diff --git a/examples/rendering-triangle/rendering-triangle.cpp b/examples/rendering-triangle/rendering-triangle.cpp index 00b4ff1..76fae81 100644 --- a/examples/rendering-triangle/rendering-triangle.cpp +++ b/examples/rendering-triangle/rendering-triangle.cpp @@ -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; } diff --git a/examples/shadows-and-lights/shadows-and-lights-example.cpp b/examples/shadows-and-lights/shadows-and-lights-example.cpp index 6dac9fa..65a8859 100644 --- a/examples/shadows-and-lights/shadows-and-lights-example.cpp +++ b/examples/shadows-and-lights/shadows-and-lights-example.cpp @@ -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; } diff --git a/examples/simple-visuals-control/simple-visuals-example.cpp b/examples/simple-visuals-control/simple-visuals-example.cpp index 1011243..4c20557 100644 --- a/examples/simple-visuals-control/simple-visuals-example.cpp +++ b/examples/simple-visuals-control/simple-visuals-example.cpp @@ -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. diff --git a/examples/size-negotiation/size-negotiation-example.cpp b/examples/size-negotiation/size-negotiation-example.cpp index 4de690c..4856360 100644 --- a/examples/size-negotiation/size-negotiation-example.cpp +++ b/examples/size-negotiation/size-negotiation-example.cpp @@ -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; } diff --git a/examples/sparkle/sparkle-effect-example.cpp b/examples/sparkle/sparkle-effect-example.cpp index 1cc465a..9cb180a 100644 --- a/examples/sparkle/sparkle-effect-example.cpp +++ b/examples/sparkle/sparkle-effect-example.cpp @@ -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; } diff --git a/examples/styling/style-example.cpp b/examples/styling/style-example.cpp index cbdecf6..dfd2d11 100644 --- a/examples/styling/style-example.cpp +++ b/examples/styling/style-example.cpp @@ -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; diff --git a/examples/text-editor/text-editor-example.cpp b/examples/text-editor/text-editor-example.cpp index 866bded..6e25686 100644 --- a/examples/text-editor/text-editor-example.cpp +++ b/examples/text-editor/text-editor-example.cpp @@ -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; } diff --git a/examples/text-field/text-field-example.cpp b/examples/text-field/text-field-example.cpp index 36fd1db..9451fdf 100644 --- a/examples/text-field/text-field-example.cpp +++ b/examples/text-field/text-field-example.cpp @@ -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; } diff --git a/examples/text-fonts/text-fonts-example.cpp b/examples/text-fonts/text-fonts-example.cpp index be78963..1519b87 100644 --- a/examples/text-fonts/text-fonts-example.cpp +++ b/examples/text-fonts/text-fonts-example.cpp @@ -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; } diff --git a/examples/text-label-emojis/text-label-emojis.cpp b/examples/text-label-emojis/text-label-emojis.cpp index 8e13fff..c98e206 100644 --- a/examples/text-label-emojis/text-label-emojis.cpp +++ b/examples/text-label-emojis/text-label-emojis.cpp @@ -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; } diff --git a/examples/text-label-multi-language/text-label-multi-language-example.cpp b/examples/text-label-multi-language/text-label-multi-language-example.cpp index 8005b58..ba54b57 100644 --- a/examples/text-label-multi-language/text-label-multi-language-example.cpp +++ b/examples/text-label-multi-language/text-label-multi-language-example.cpp @@ -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; } diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index 759a684..bb9c36b 100644 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -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; } diff --git a/examples/text-memory-profiling/text-memory-profiling-example.cpp b/examples/text-memory-profiling/text-memory-profiling-example.cpp index 693b0d4..09e6f69 100644 --- a/examples/text-memory-profiling/text-memory-profiling-example.cpp +++ b/examples/text-memory-profiling/text-memory-profiling-example.cpp @@ -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; } diff --git a/examples/text-overlap/text-overlap-example.cpp b/examples/text-overlap/text-overlap-example.cpp index f5609bd..85d12db 100644 --- a/examples/text-overlap/text-overlap-example.cpp +++ b/examples/text-overlap/text-overlap-example.cpp @@ -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 ); diff --git a/examples/text-scrolling/text-scrolling-example.cpp b/examples/text-scrolling/text-scrolling-example.cpp index 5a4ff9e..6b3f047 100644 --- a/examples/text-scrolling/text-scrolling-example.cpp +++ b/examples/text-scrolling/text-scrolling-example.cpp @@ -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; } diff --git a/examples/textured-mesh/textured-mesh-example.cpp b/examples/textured-mesh/textured-mesh-example.cpp index 510e34d..a0ca655 100644 --- a/examples/textured-mesh/textured-mesh-example.cpp +++ b/examples/textured-mesh/textured-mesh-example.cpp @@ -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; } diff --git a/examples/tilt/tilt-example.cpp b/examples/tilt/tilt-example.cpp index 783acbe..dec8078 100644 --- a/examples/tilt/tilt-example.cpp +++ b/examples/tilt/tilt-example.cpp @@ -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 ); diff --git a/examples/transitions/transition-example.cpp b/examples/transitions/transition-example.cpp index 9bf3cd2..0047bfb 100644 --- a/examples/transitions/transition-example.cpp +++ b/examples/transitions/transition-example.cpp @@ -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; diff --git a/examples/video-view/video-view-example.cpp b/examples/video-view/video-view-example.cpp index 894adf1..09f909d 100644 --- a/examples/video-view/video-view-example.cpp +++ b/examples/video-view/video-view-example.cpp @@ -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; } diff --git a/examples/visual-transitions/transition-example.cpp b/examples/visual-transitions/transition-example.cpp index adc4563..0047bfb 100644 --- a/examples/visual-transitions/transition-example.cpp +++ b/examples/visual-transitions/transition-example.cpp @@ -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; -- 2.7.4