Commit 312470da17142a335f5f743630b7fc19c0061ead
1 parent
f959c3a6
Removed redundant RunTest methods from all examples
Change-Id: I863826a7a7c31e7027843dfffbad08e2b7501722
Showing
70 changed files
with
145 additions
and
698 deletions
builder/dali-builder.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2014 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -295,7 +295,7 @@ private: |
| 295 | 295 | // |
| 296 | 296 | // |
| 297 | 297 | //------------------------------------------------------------------------------ |
| 298 | -int main(int argc, char **argv) | |
| 298 | +int DALI_EXPORT_API main(int argc, char **argv) | |
| 299 | 299 | { |
| 300 | 300 | |
| 301 | 301 | Application dali_app = Application::New(&argc, &argv, DEMO_THEME_PATH); | ... | ... |
examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp
| ... | ... | @@ -150,20 +150,10 @@ private: |
| 150 | 150 | int mImageCombinationIndex; |
| 151 | 151 | }; |
| 152 | 152 | |
| 153 | -void RunTest( Application& application ) | |
| 154 | -{ | |
| 155 | - ImageViewAlphaBlendApp test( application ); | |
| 156 | - | |
| 157 | - application.MainLoop(); | |
| 158 | -} | |
| 159 | - | |
| 160 | -// Entry point for Linux & Tizen applications | |
| 161 | -// | |
| 162 | 153 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 163 | 154 | { |
| 164 | 155 | Application application = Application::New( &argc, &argv ); |
| 165 | - | |
| 166 | - RunTest( application ); | |
| 167 | - | |
| 156 | + ImageViewAlphaBlendApp test( application ); | |
| 157 | + application.MainLoop(); | |
| 168 | 158 | return 0; |
| 169 | 159 | } | ... | ... |
examples/animated-images/animated-images-example.cpp
examples/animated-shapes/animated-shapes-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -460,16 +460,10 @@ private: |
| 460 | 460 | |
| 461 | 461 | }; |
| 462 | 462 | |
| 463 | -void RunTest( Application& application ) | |
| 463 | +int DALI_EXPORT_API main( int argc, char **argv ) | |
| 464 | 464 | { |
| 465 | + Application application = Application::New( &argc, &argv ); | |
| 465 | 466 | AnimatedShapesExample test( application ); |
| 466 | 467 | application.MainLoop(); |
| 467 | -} | |
| 468 | - | |
| 469 | -int main( int argc, char **argv ) | |
| 470 | -{ | |
| 471 | - Application application = Application::New( &argc, &argv ); | |
| 472 | - RunTest( application ); | |
| 473 | - | |
| 474 | 468 | return 0; |
| 475 | 469 | } | ... | ... |
examples/benchmark/benchmark.cpp
| ... | ... | @@ -464,15 +464,6 @@ private: |
| 464 | 464 | Animation mHide; |
| 465 | 465 | }; |
| 466 | 466 | |
| 467 | -void RunTest( Application& application ) | |
| 468 | -{ | |
| 469 | - Benchmark test( application ); | |
| 470 | - | |
| 471 | - application.MainLoop(); | |
| 472 | -} | |
| 473 | - | |
| 474 | -// Entry point for Linux & Tizen applications | |
| 475 | -// | |
| 476 | 467 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 477 | 468 | { |
| 478 | 469 | Application application = Application::New( &argc, &argv ); |
| ... | ... | @@ -502,7 +493,8 @@ int DALI_EXPORT_API main( int argc, char **argv ) |
| 502 | 493 | } |
| 503 | 494 | } |
| 504 | 495 | |
| 505 | - RunTest( application ); | |
| 496 | + Benchmark test( application ); | |
| 497 | + application.MainLoop(); | |
| 506 | 498 | |
| 507 | 499 | return 0; |
| 508 | 500 | } | ... | ... |
examples/blocks/blocks-example.cpp
| ... | ... | @@ -862,18 +862,10 @@ private: |
| 862 | 862 | int mBrickCount; ///< Total bricks on screen. |
| 863 | 863 | }; |
| 864 | 864 | |
| 865 | -void RunTest(Application& app) | |
| 866 | -{ | |
| 867 | - ExampleController test(app); | |
| 868 | - | |
| 869 | - app.MainLoop(); | |
| 870 | -} | |
| 871 | - | |
| 872 | 865 | int DALI_EXPORT_API main(int argc, char **argv) |
| 873 | 866 | { |
| 874 | 867 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 875 | - | |
| 876 | - RunTest(app); | |
| 877 | - | |
| 868 | + ExampleController test(app); | |
| 869 | + app.MainLoop(); | |
| 878 | 870 | return 0; |
| 879 | 871 | } | ... | ... |
examples/bubble-effect/bubble-effect-example.cpp
| ... | ... | @@ -306,20 +306,10 @@ private: |
| 306 | 306 | |
| 307 | 307 | /*****************************************************************************/ |
| 308 | 308 | |
| 309 | -static void | |
| 310 | -RunTest(Application& app) | |
| 311 | -{ | |
| 312 | - BubbleEffectExample theApp(app); | |
| 313 | - app.MainLoop(); | |
| 314 | -} | |
| 315 | - | |
| 316 | -/*****************************************************************************/ | |
| 317 | - | |
| 318 | 309 | int DALI_EXPORT_API main(int argc, char **argv) |
| 319 | 310 | { |
| 320 | 311 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 321 | - | |
| 322 | - RunTest(app); | |
| 323 | - | |
| 312 | + BubbleEffectExample theApp(app); | |
| 313 | + app.MainLoop(); | |
| 324 | 314 | return 0; |
| 325 | 315 | } | ... | ... |
examples/buttons/buttons-example.cpp
| ... | ... | @@ -509,20 +509,10 @@ private: |
| 509 | 509 | Toolkit::ImageView mImage; |
| 510 | 510 | }; |
| 511 | 511 | |
| 512 | -void RunTest( Application& application ) | |
| 513 | -{ | |
| 514 | - ButtonsController test( application ); | |
| 515 | - | |
| 516 | - application.MainLoop(); | |
| 517 | -} | |
| 518 | - | |
| 519 | -// Entry point for Linux & Tizen applications | |
| 520 | -// | |
| 521 | 512 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 522 | 513 | { |
| 523 | 514 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 524 | - | |
| 525 | - RunTest( application ); | |
| 526 | - | |
| 515 | + ButtonsController test( application ); | |
| 516 | + application.MainLoop(); | |
| 527 | 517 | return 0; |
| 528 | 518 | } | ... | ... |
examples/clipping-draw-order/clipping-draw-order.cpp
examples/compressed-texture-formats/compressed-texture-formats-example.cpp
| ... | ... | @@ -202,20 +202,10 @@ private: |
| 202 | 202 | Application& mApplication; |
| 203 | 203 | }; |
| 204 | 204 | |
| 205 | -void RunTest( Application& application ) | |
| 206 | -{ | |
| 207 | - CompressedTextureFormatsController test( application ); | |
| 208 | - | |
| 209 | - application.MainLoop(); | |
| 210 | -} | |
| 211 | - | |
| 212 | -// Entry point for Linux & Tizen applications | |
| 213 | -// | |
| 214 | 205 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 215 | 206 | { |
| 216 | 207 | Application application = Application::New( &argc, &argv ); |
| 217 | - | |
| 218 | - RunTest( application ); | |
| 219 | - | |
| 208 | + CompressedTextureFormatsController test( application ); | |
| 209 | + application.MainLoop(); | |
| 220 | 210 | return 0; |
| 221 | 211 | } | ... | ... |
examples/cube-transition-effect/cube-transition-effect-example.cpp
| ... | ... | @@ -413,7 +413,6 @@ void CubeTransitionApp::OnKeyEvent(const KeyEvent& event) |
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | -// Entry point for Linux & Tizen applications | |
| 417 | 416 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 418 | 417 | { |
| 419 | 418 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); | ... | ... |
examples/dissolve-effect/dissolve-effect-example.cpp
| ... | ... | @@ -436,7 +436,6 @@ bool DissolveEffectApp::OnTimerTick() |
| 436 | 436 | return false; //return false to stop the timer |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | -// Entry point for Linux & Tizen applications | |
| 440 | 439 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 441 | 440 | { |
| 442 | 441 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); | ... | ... |
examples/effects-view/effects-view-example.cpp
| ... | ... | @@ -245,20 +245,10 @@ void EffectsViewApp::OnKeyEvent(const KeyEvent& event) |
| 245 | 245 | |
| 246 | 246 | /*****************************************************************************/ |
| 247 | 247 | |
| 248 | -static void RunTest( Application& application ) | |
| 249 | -{ | |
| 250 | - EffectsViewApp test( application ); | |
| 251 | - | |
| 252 | - application.MainLoop(); | |
| 253 | -} | |
| 254 | - | |
| 255 | -/*****************************************************************************/ | |
| 256 | - | |
| 257 | 248 | int DALI_EXPORT_API main(int argc, char **argv) |
| 258 | 249 | { |
| 259 | 250 | Application application = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 260 | - | |
| 261 | - RunTest(application); | |
| 262 | - | |
| 251 | + EffectsViewApp test( application ); | |
| 252 | + application.MainLoop(); | |
| 263 | 253 | return 0; |
| 264 | 254 | } | ... | ... |
examples/flex-container/flex-container-example.cpp
| ... | ... | @@ -367,18 +367,10 @@ private: |
| 367 | 367 | Toolkit::PushButton mAlignContentButton; |
| 368 | 368 | }; |
| 369 | 369 | |
| 370 | -void RunTest(Application& app) | |
| 371 | -{ | |
| 372 | - FlexContainerExample test(app); | |
| 373 | - | |
| 374 | - app.MainLoop(); | |
| 375 | -} | |
| 376 | - | |
| 377 | 370 | int DALI_EXPORT_API main(int argc, char **argv) |
| 378 | 371 | { |
| 379 | 372 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 380 | - | |
| 381 | - RunTest(app); | |
| 382 | - | |
| 373 | + FlexContainerExample test(app); | |
| 374 | + app.MainLoop(); | |
| 383 | 375 | return 0; |
| 384 | 376 | } | ... | ... |
examples/focus-integration/focus-integration.cpp
examples/fpp-game/fpp-game-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -135,20 +135,10 @@ private: |
| 135 | 135 | FppGameTutorialController mTutorialController; |
| 136 | 136 | }; |
| 137 | 137 | |
| 138 | -void RunTest( Application& application ) | |
| 139 | -{ | |
| 140 | - GameController test( application ); | |
| 141 | - | |
| 142 | - application.MainLoop(); | |
| 143 | -} | |
| 144 | - | |
| 145 | -// Entry point for Linux & Tizen applications | |
| 146 | -// | |
| 147 | 138 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 148 | 139 | { |
| 149 | 140 | Application application = Application::New( &argc, &argv ); |
| 150 | - | |
| 151 | - RunTest( application ); | |
| 152 | - | |
| 141 | + GameController test( application ); | |
| 142 | + application.MainLoop(); | |
| 153 | 143 | return 0; |
| 154 | 144 | } | ... | ... |
examples/gradients/gradients-example.cpp
| ... | ... | @@ -161,20 +161,10 @@ private: |
| 161 | 161 | unsigned mIndex; |
| 162 | 162 | }; |
| 163 | 163 | |
| 164 | -void RunTest( Application& application ) | |
| 165 | -{ | |
| 166 | - GradientController test( application ); | |
| 167 | - | |
| 168 | - application.MainLoop(); | |
| 169 | -} | |
| 170 | - | |
| 171 | -// Entry point for Linux & Tizen applications | |
| 172 | -// | |
| 173 | 164 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 174 | 165 | { |
| 175 | 166 | Application application = Application::New( &argc, &argv ); |
| 176 | - | |
| 177 | - RunTest( application ); | |
| 178 | - | |
| 167 | + GradientController test( application ); | |
| 168 | + application.MainLoop(); | |
| 179 | 169 | return 0; |
| 180 | 170 | } | ... | ... |
examples/hello-world/hello-world-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2014 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -65,20 +65,10 @@ private: |
| 65 | 65 | Application& mApplication; |
| 66 | 66 | }; |
| 67 | 67 | |
| 68 | -void RunTest( Application& application ) | |
| 69 | -{ | |
| 70 | - HelloWorldController test( application ); | |
| 71 | - | |
| 72 | - application.MainLoop(); | |
| 73 | -} | |
| 74 | - | |
| 75 | -// Entry point for Linux & Tizen applications | |
| 76 | -// | |
| 77 | 68 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 78 | 69 | { |
| 79 | 70 | Application application = Application::New( &argc, &argv ); |
| 80 | - | |
| 81 | - RunTest( application ); | |
| 82 | - | |
| 71 | + HelloWorldController test( application ); | |
| 72 | + application.MainLoop(); | |
| 83 | 73 | return 0; |
| 84 | 74 | } | ... | ... |
examples/homescreen-benchmark/homescreen-benchmark.cpp
| ... | ... | @@ -454,26 +454,6 @@ private: |
| 454 | 454 | int mCurrentPage; |
| 455 | 455 | }; |
| 456 | 456 | |
| 457 | -void RunTest( Application& application, const HomescreenBenchmark::Config& config, bool printHelpAndExit ) | |
| 458 | -{ | |
| 459 | - HomescreenBenchmark test( application, config ); | |
| 460 | - | |
| 461 | - if( printHelpAndExit ) | |
| 462 | - { | |
| 463 | - PrintHelp( "c<num>", " Number of columns" ); | |
| 464 | - PrintHelp( "r<num>", " Number of rows" ); | |
| 465 | - PrintHelp( "p<num>", " Number of pages ( must be greater than 1 )" ); | |
| 466 | - PrintHelp( "-disable-tableview", " Disables the use of TableView for layouting" ); | |
| 467 | - PrintHelp( "-disable-icon-labels", " Disables labels for each icon" ); | |
| 468 | - PrintHelp( "-use-checkbox", " Uses checkboxes for icons" ); | |
| 469 | - PrintHelp( "-use-text-label", " Uses TextLabel instead of a TextVisual" ); | |
| 470 | - return; | |
| 471 | - } | |
| 472 | - | |
| 473 | - application.MainLoop(); | |
| 474 | -} | |
| 475 | - | |
| 476 | -// Entry point for Linux & Tizen applications. | |
| 477 | 457 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 478 | 458 | { |
| 479 | 459 | // Default settings. |
| ... | ... | @@ -519,8 +499,21 @@ int DALI_EXPORT_API main( int argc, char **argv ) |
| 519 | 499 | } |
| 520 | 500 | |
| 521 | 501 | Application application = Application::New( &argc, &argv ); |
| 502 | + HomescreenBenchmark test( application, config ); | |
| 522 | 503 | |
| 523 | - RunTest( application, config, printHelpAndExit ); | |
| 504 | + if( printHelpAndExit ) | |
| 505 | + { | |
| 506 | + PrintHelp( "c<num>", " Number of columns" ); | |
| 507 | + PrintHelp( "r<num>", " Number of rows" ); | |
| 508 | + PrintHelp( "p<num>", " Number of pages ( must be greater than 1 )" ); | |
| 509 | + PrintHelp( "-disable-tableview", " Disables the use of TableView for layouting" ); | |
| 510 | + PrintHelp( "-disable-icon-labels", " Disables labels for each icon" ); | |
| 511 | + PrintHelp( "-use-checkbox", " Uses checkboxes for icons" ); | |
| 512 | + PrintHelp( "-use-text-label", " Uses TextLabel instead of a TextVisual" ); | |
| 513 | + return 0; | |
| 514 | + } | |
| 515 | + | |
| 516 | + application.MainLoop(); | |
| 524 | 517 | |
| 525 | 518 | return 0; |
| 526 | 519 | } | ... | ... |
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
| ... | ... | @@ -723,19 +723,10 @@ private: |
| 723 | 723 | |
| 724 | 724 | }; |
| 725 | 725 | |
| 726 | -void RunTest( Application& application ) | |
| 727 | -{ | |
| 728 | - ImageScalingAndFilteringController test( application ); | |
| 729 | - | |
| 730 | - application.MainLoop(); | |
| 731 | -} | |
| 732 | - | |
| 733 | -// Entry point for Linux & Tizen applications | |
| 734 | 726 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 735 | 727 | { |
| 736 | 728 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 737 | - | |
| 738 | - RunTest( application ); | |
| 739 | - | |
| 729 | + ImageScalingAndFilteringController test( application ); | |
| 730 | + application.MainLoop(); | |
| 740 | 731 | return 0; |
| 741 | 732 | } | ... | ... |
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
| ... | ... | @@ -644,19 +644,10 @@ private: |
| 644 | 644 | unsigned int mImagesLoaded; ///< How many images have been loaded |
| 645 | 645 | }; |
| 646 | 646 | |
| 647 | -void RunTest( Application& application ) | |
| 648 | -{ | |
| 649 | - ImageScalingIrregularGridController test( application ); | |
| 650 | - | |
| 651 | - application.MainLoop(); | |
| 652 | -} | |
| 653 | - | |
| 654 | -/** Entry point for Linux & Tizen applications */ | |
| 655 | 647 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 656 | 648 | { |
| 657 | 649 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 658 | - | |
| 659 | - RunTest( application ); | |
| 660 | - | |
| 650 | + ImageScalingIrregularGridController test( application ); | |
| 651 | + application.MainLoop(); | |
| 661 | 652 | return 0; |
| 662 | 653 | } | ... | ... |
examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2015 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -117,20 +117,10 @@ private: |
| 117 | 117 | unsigned int mIndex; |
| 118 | 118 | }; |
| 119 | 119 | |
| 120 | -void RunTest( Application& application ) | |
| 121 | -{ | |
| 122 | - ImageViewAlphaBlendApp test( application ); | |
| 123 | - | |
| 124 | - application.MainLoop(); | |
| 125 | -} | |
| 126 | - | |
| 127 | -// Entry point for Linux & Tizen applications | |
| 128 | -// | |
| 129 | 120 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 130 | 121 | { |
| 131 | 122 | Application application = Application::New( &argc, &argv ); |
| 132 | - | |
| 133 | - RunTest( application ); | |
| 134 | - | |
| 123 | + ImageViewAlphaBlendApp test( application ); | |
| 124 | + application.MainLoop(); | |
| 135 | 125 | return 0; |
| 136 | 126 | } | ... | ... |
examples/image-view-pixel-area/image-view-pixel-area-example.cpp
| ... | ... | @@ -234,20 +234,10 @@ private: |
| 234 | 234 | unsigned int mIndex; |
| 235 | 235 | }; |
| 236 | 236 | |
| 237 | -void RunTest( Application& application ) | |
| 238 | -{ | |
| 239 | - ImageViewPixelAreaApp test( application ); | |
| 240 | - | |
| 241 | - application.MainLoop(); | |
| 242 | -} | |
| 243 | - | |
| 244 | -// Entry point for Linux & Tizen applications | |
| 245 | -// | |
| 246 | 237 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 247 | 238 | { |
| 248 | 239 | Application application = Application::New( &argc, &argv ); |
| 249 | - | |
| 250 | - RunTest( application ); | |
| 251 | - | |
| 240 | + ImageViewPixelAreaApp test( application ); | |
| 241 | + application.MainLoop(); | |
| 252 | 242 | return 0; |
| 253 | 243 | } | ... | ... |
examples/image-view-svg/image-view-svg-example.cpp
| ... | ... | @@ -232,20 +232,10 @@ private: |
| 232 | 232 | unsigned int mIndex; |
| 233 | 233 | }; |
| 234 | 234 | |
| 235 | -void RunTest( Application& application ) | |
| 236 | -{ | |
| 237 | - ImageSvgController test( application ); | |
| 238 | - | |
| 239 | - application.MainLoop(); | |
| 240 | -} | |
| 241 | - | |
| 242 | -// Entry point for Linux & Tizen applications | |
| 243 | -// | |
| 244 | 235 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 245 | 236 | { |
| 246 | 237 | Application application = Application::New( &argc, &argv ); |
| 247 | - | |
| 248 | - RunTest( application ); | |
| 249 | - | |
| 238 | + ImageSvgController test( application ); | |
| 239 | + application.MainLoop(); | |
| 250 | 240 | return 0; |
| 251 | 241 | } | ... | ... |
examples/image-view-url/image-view-url-example.cpp
| ... | ... | @@ -198,20 +198,10 @@ private: |
| 198 | 198 | Texture mOutputTexture; |
| 199 | 199 | }; |
| 200 | 200 | |
| 201 | -void RunTest( Application& application ) | |
| 202 | -{ | |
| 203 | - ImageViewUrlApp test( application ); | |
| 204 | - | |
| 205 | - application.MainLoop(); | |
| 206 | -} | |
| 207 | - | |
| 208 | -// Entry point for Linux & Tizen applications | |
| 209 | -// | |
| 210 | 201 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 211 | 202 | { |
| 212 | 203 | Application application = Application::New( &argc, &argv ); |
| 213 | - | |
| 214 | - RunTest( application ); | |
| 215 | - | |
| 204 | + ImageViewUrlApp test( application ); | |
| 205 | + application.MainLoop(); | |
| 216 | 206 | return 0; |
| 217 | 207 | } | ... | ... |
examples/image-view/image-view-example.cpp
| ... | ... | @@ -226,20 +226,10 @@ private: |
| 226 | 226 | |
| 227 | 227 | }; |
| 228 | 228 | |
| 229 | -void RunTest( Application& application ) | |
| 230 | -{ | |
| 231 | - ImageViewController test( application ); | |
| 232 | - | |
| 233 | - application.MainLoop(); | |
| 234 | -} | |
| 235 | - | |
| 236 | -// Entry point for Linux & Tizen applications | |
| 237 | -// | |
| 238 | 229 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 239 | 230 | { |
| 240 | 231 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 241 | - | |
| 242 | - RunTest( application ); | |
| 243 | - | |
| 232 | + ImageViewController test( application ); | |
| 233 | + application.MainLoop(); | |
| 244 | 234 | return 0; |
| 245 | 235 | } | ... | ... |
examples/item-view/item-view-example.cpp
| ... | ... | @@ -994,18 +994,10 @@ private: |
| 994 | 994 | LongPressGestureDetector mLongPressDetector; |
| 995 | 995 | }; |
| 996 | 996 | |
| 997 | -void RunTest(Application& app) | |
| 998 | -{ | |
| 999 | - ItemViewExample test(app); | |
| 1000 | - | |
| 1001 | - app.MainLoop(); | |
| 1002 | -} | |
| 1003 | - | |
| 1004 | 997 | int DALI_EXPORT_API main(int argc, char **argv) |
| 1005 | 998 | { |
| 1006 | 999 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 1007 | - | |
| 1008 | - RunTest(app); | |
| 1009 | - | |
| 1000 | + ItemViewExample test(app); | |
| 1001 | + app.MainLoop(); | |
| 1010 | 1002 | return 0; |
| 1011 | 1003 | } | ... | ... |
examples/line-mesh/line-mesh-example.cpp
| ... | ... | @@ -391,20 +391,10 @@ private: |
| 391 | 391 | int mMaxIndexCount; |
| 392 | 392 | }; |
| 393 | 393 | |
| 394 | -void RunTest( Application& application ) | |
| 395 | -{ | |
| 396 | - ExampleController test( application ); | |
| 397 | - | |
| 398 | - application.MainLoop(); | |
| 399 | -} | |
| 400 | - | |
| 401 | -// Entry point for Linux & SLP applications | |
| 402 | -// | |
| 403 | 394 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 404 | 395 | { |
| 405 | 396 | Application application = Application::New( &argc, &argv ); |
| 406 | - | |
| 407 | - RunTest( application ); | |
| 408 | - | |
| 397 | + ExampleController test( application ); | |
| 398 | + application.MainLoop(); | |
| 409 | 399 | return 0; |
| 410 | 400 | } | ... | ... |
examples/magnifier/magnifier-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -402,20 +402,10 @@ private: |
| 402 | 402 | |
| 403 | 403 | }; |
| 404 | 404 | |
| 405 | -void RunTest( Application& application ) | |
| 406 | -{ | |
| 407 | - ExampleController test( application ); | |
| 408 | - | |
| 409 | - application.MainLoop(); | |
| 410 | -} | |
| 411 | - | |
| 412 | -// Entry point for Linux & Tizen applications | |
| 413 | -// | |
| 414 | 405 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 415 | 406 | { |
| 416 | 407 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 417 | - | |
| 418 | - RunTest( application ); | |
| 419 | - | |
| 408 | + ExampleController test( application ); | |
| 409 | + application.MainLoop(); | |
| 420 | 410 | return 0; |
| 421 | 411 | } | ... | ... |
examples/mesh-morph/mesh-morph-example.cpp
| ... | ... | @@ -348,20 +348,10 @@ private: |
| 348 | 348 | Timer mMorphTimer; |
| 349 | 349 | }; |
| 350 | 350 | |
| 351 | -void RunTest( Application& application ) | |
| 352 | -{ | |
| 353 | - ExampleController test( application ); | |
| 354 | - | |
| 355 | - application.MainLoop(); | |
| 356 | -} | |
| 357 | - | |
| 358 | -// Entry point for Linux & SLP applications | |
| 359 | -// | |
| 360 | 351 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 361 | 352 | { |
| 362 | 353 | Application application = Application::New( &argc, &argv ); |
| 363 | - | |
| 364 | - RunTest( application ); | |
| 365 | - | |
| 354 | + ExampleController test( application ); | |
| 355 | + application.MainLoop(); | |
| 366 | 356 | return 0; |
| 367 | 357 | } | ... | ... |
examples/mesh-visual/mesh-visual-example.cpp
| ... | ... | @@ -603,9 +603,7 @@ private: |
| 603 | 603 | bool mLightFront; //Bool for light being in front or behind the models. |
| 604 | 604 | }; |
| 605 | 605 | |
| 606 | -// Entry point for Linux & Tizen applications | |
| 607 | -// | |
| 608 | -int main( int argc, char **argv ) | |
| 606 | +int DALI_EXPORT_API main( int argc, char **argv ) | |
| 609 | 607 | { |
| 610 | 608 | Application application = Application::New( &argc, &argv ); |
| 611 | 609 | MeshVisualController test( application ); | ... | ... |
examples/model3d-view/model3d-view-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -294,20 +294,10 @@ private: |
| 294 | 294 | bool mScaled; |
| 295 | 295 | }; |
| 296 | 296 | |
| 297 | -void RunTest( Application& application ) | |
| 298 | -{ | |
| 299 | - Model3dViewController test( application ); | |
| 300 | - | |
| 301 | - application.MainLoop(); | |
| 302 | -} | |
| 303 | - | |
| 304 | -// Entry point for Linux & Tizen applications | |
| 305 | -// | |
| 306 | 297 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 307 | 298 | { |
| 308 | 299 | Application application = Application::New( &argc, &argv ); |
| 309 | - | |
| 310 | - RunTest( application ); | |
| 311 | - | |
| 300 | + Model3dViewController test( application ); | |
| 301 | + application.MainLoop(); | |
| 312 | 302 | return 0; |
| 313 | 303 | } | ... | ... |
examples/motion-blur/motion-blur-example.cpp
| ... | ... | @@ -451,20 +451,10 @@ private: |
| 451 | 451 | Animation mRotateAnimation; ///< Animation for rotating between landscape and portrait. |
| 452 | 452 | }; |
| 453 | 453 | |
| 454 | -void RunTest(Application& app) | |
| 455 | -{ | |
| 456 | - MotionBlurExampleApp test(app); | |
| 457 | - | |
| 458 | - app.MainLoop(); | |
| 459 | -} | |
| 460 | - | |
| 461 | -// Entry point for Linux & Tizen applications | |
| 462 | -// | |
| 463 | 454 | int DALI_EXPORT_API main(int argc, char **argv) |
| 464 | 455 | { |
| 465 | 456 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 466 | - | |
| 467 | - RunTest(app); | |
| 468 | - | |
| 457 | + MotionBlurExampleApp test(app); | |
| 458 | + app.MainLoop(); | |
| 469 | 459 | return 0; |
| 470 | 460 | } | ... | ... |
examples/motion-stretch/motion-stretch-example.cpp
| ... | ... | @@ -427,20 +427,10 @@ private: |
| 427 | 427 | |
| 428 | 428 | }; |
| 429 | 429 | |
| 430 | -void RunTest(Application& app) | |
| 431 | -{ | |
| 432 | - MotionStretchExampleApp test(app); | |
| 433 | - | |
| 434 | - app.MainLoop(); | |
| 435 | -} | |
| 436 | - | |
| 437 | -// Entry point for Linux & Tizen applications | |
| 438 | -// | |
| 439 | 430 | int DALI_EXPORT_API main(int argc, char **argv) |
| 440 | 431 | { |
| 441 | 432 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 442 | - | |
| 443 | - RunTest(app); | |
| 444 | - | |
| 433 | + MotionStretchExampleApp test(app); | |
| 434 | + app.MainLoop(); | |
| 445 | 435 | return 0; |
| 446 | 436 | } | ... | ... |
examples/native-image-source/native-image-source-example.cpp
| ... | ... | @@ -432,20 +432,10 @@ private: |
| 432 | 432 | bool mRefreshAlways; |
| 433 | 433 | }; |
| 434 | 434 | |
| 435 | -void RunTest( Application& application ) | |
| 436 | -{ | |
| 437 | - NativeImageSourceController test( application ); | |
| 438 | - | |
| 439 | - application.MainLoop(); | |
| 440 | -} | |
| 441 | - | |
| 442 | -// Entry point for Linux & Tizen applications | |
| 443 | -// | |
| 444 | 435 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 445 | 436 | { |
| 446 | 437 | Application application = Application::New( &argc, &argv ); |
| 447 | - | |
| 448 | - RunTest( application ); | |
| 449 | - | |
| 438 | + NativeImageSourceController test( application ); | |
| 439 | + application.MainLoop(); | |
| 450 | 440 | return 0; |
| 451 | 441 | } | ... | ... |
examples/perf-scroll/perf-scroll.cpp
| ... | ... | @@ -451,15 +451,6 @@ private: |
| 451 | 451 | Animation mHide; |
| 452 | 452 | }; |
| 453 | 453 | |
| 454 | -void RunTest( Application& application ) | |
| 455 | -{ | |
| 456 | - PerfScroll test( application ); | |
| 457 | - | |
| 458 | - application.MainLoop(); | |
| 459 | -} | |
| 460 | - | |
| 461 | -// Entry point for Linux & Tizen applications | |
| 462 | -// | |
| 463 | 454 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 464 | 455 | { |
| 465 | 456 | Application application = Application::New( &argc, &argv ); |
| ... | ... | @@ -481,7 +472,8 @@ int DALI_EXPORT_API main( int argc, char **argv ) |
| 481 | 472 | } |
| 482 | 473 | } |
| 483 | 474 | |
| 484 | - RunTest( application ); | |
| 475 | + PerfScroll test( application ); | |
| 476 | + application.MainLoop(); | |
| 485 | 477 | |
| 486 | 478 | return 0; |
| 487 | 479 | } | ... | ... |
examples/point-mesh/point-mesh-example.cpp
| ... | ... | @@ -227,20 +227,10 @@ private: |
| 227 | 227 | Timer mChangeImageTimer; |
| 228 | 228 | }; |
| 229 | 229 | |
| 230 | -void RunTest( Application& application ) | |
| 231 | -{ | |
| 232 | - ExampleController test( application ); | |
| 233 | - | |
| 234 | - application.MainLoop(); | |
| 235 | -} | |
| 236 | - | |
| 237 | -// Entry point for Linux & SLP applications | |
| 238 | -// | |
| 239 | 230 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 240 | 231 | { |
| 241 | 232 | Application application = Application::New( &argc, &argv ); |
| 242 | - | |
| 243 | - RunTest( application ); | |
| 244 | - | |
| 233 | + ExampleController test( application ); | |
| 234 | + application.MainLoop(); | |
| 245 | 235 | return 0; |
| 246 | 236 | } | ... | ... |
examples/popup/popup-example.cpp
| ... | ... | @@ -732,19 +732,10 @@ private: |
| 732 | 732 | |
| 733 | 733 | }; |
| 734 | 734 | |
| 735 | -void RunTest( Application& application ) | |
| 736 | -{ | |
| 737 | - PopupExample test( application ); | |
| 738 | - | |
| 739 | - application.MainLoop(); | |
| 740 | -} | |
| 741 | - | |
| 742 | -// Entry point for Linux & SLP applications | |
| 743 | 735 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 744 | 736 | { |
| 745 | 737 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 746 | - | |
| 747 | - RunTest( application ); | |
| 748 | - | |
| 738 | + PopupExample test( application ); | |
| 739 | + application.MainLoop(); | |
| 749 | 740 | return 0; |
| 750 | 741 | } | ... | ... |
examples/primitive-shapes/primitive-shapes-example.cpp
| ... | ... | @@ -706,20 +706,10 @@ private: |
| 706 | 706 | Vector2 mRotation; ///< Keeps track of model rotation. |
| 707 | 707 | }; |
| 708 | 708 | |
| 709 | -void RunTest( Application& application ) | |
| 709 | +int DALI_EXPORT_API main( int argc, char **argv ) | |
| 710 | 710 | { |
| 711 | + Application application = Application::New( &argc, &argv ); | |
| 711 | 712 | PrimitiveShapesController test( application ); |
| 712 | - | |
| 713 | 713 | application.MainLoop(); |
| 714 | -} | |
| 715 | - | |
| 716 | -// Entry point for Linux & Tizen applications | |
| 717 | -// | |
| 718 | -int main( int argc, char **argv ) | |
| 719 | -{ | |
| 720 | - Application application = Application::New( &argc, &argv ); | |
| 721 | - | |
| 722 | - RunTest( application ); | |
| 723 | - | |
| 724 | 714 | return 0; |
| 725 | 715 | } | ... | ... |
examples/ray-marching/ray-marching-example.cpp
| ... | ... | @@ -211,20 +211,10 @@ private: |
| 211 | 211 | ToolBar mToolBar; |
| 212 | 212 | }; |
| 213 | 213 | |
| 214 | -void RunTest( Application& application ) | |
| 215 | -{ | |
| 216 | - RayMarchingExample test( application ); | |
| 217 | - | |
| 218 | - application.MainLoop(); | |
| 219 | -} | |
| 220 | - | |
| 221 | -// Entry point for Linux & Tizen applications | |
| 222 | -// | |
| 223 | 214 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 224 | 215 | { |
| 225 | 216 | Application application = Application::New( &argc, &argv ); |
| 226 | - | |
| 227 | - RunTest( application ); | |
| 228 | - | |
| 217 | + RayMarchingExample test( application ); | |
| 218 | + application.MainLoop(); | |
| 229 | 219 | return 0; |
| 230 | 220 | } | ... | ... |
examples/refraction-effect/refraction-effect-example.cpp
| ... | ... | @@ -588,20 +588,10 @@ private: |
| 588 | 588 | |
| 589 | 589 | /*****************************************************************************/ |
| 590 | 590 | |
| 591 | -static void | |
| 592 | -RunTest(Application& app) | |
| 593 | -{ | |
| 594 | - RefractionEffectExample theApp(app); | |
| 595 | - app.MainLoop(); | |
| 596 | -} | |
| 597 | - | |
| 598 | -/*****************************************************************************/ | |
| 599 | - | |
| 600 | 591 | int DALI_EXPORT_API main(int argc, char **argv) |
| 601 | 592 | { |
| 602 | 593 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 603 | - | |
| 604 | - RunTest(app); | |
| 605 | - | |
| 594 | + RefractionEffectExample theApp(app); | |
| 595 | + app.MainLoop(); | |
| 606 | 596 | return 0; |
| 607 | 597 | } | ... | ... |
examples/remote-image-loading/remote-image-loading-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -208,18 +208,10 @@ private: |
| 208 | 208 | |
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | -void RunTest(Application &application) | |
| 212 | -{ | |
| 213 | - MyTester test(application); | |
| 214 | - application.MainLoop(); | |
| 215 | -} | |
| 216 | - | |
| 217 | -// Entry point for Linux & Tizen applications | |
| 218 | 211 | int DALI_EXPORT_API main(int argc, char **argv) |
| 219 | 212 | { |
| 220 | - | |
| 221 | 213 | Application application = Application::New(&argc, &argv, ""); |
| 222 | - RunTest(application); | |
| 223 | - | |
| 214 | + MyTester test(application); | |
| 215 | + application.MainLoop(); | |
| 224 | 216 | return 0; |
| 225 | 217 | } | ... | ... |
examples/renderer-stencil/renderer-stencil-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -753,29 +753,10 @@ private: |
| 753 | 753 | Actor mCubes[2]; ///< The cube object containers |
| 754 | 754 | }; |
| 755 | 755 | |
| 756 | - | |
| 757 | -/** | |
| 758 | - * @brief Creates an instance of the example object and runs it. | |
| 759 | - * @param[in] application The DALi application object | |
| 760 | - */ | |
| 761 | -void RunExample( Application& application ) | |
| 762 | -{ | |
| 763 | - RendererStencilExample example( application ); | |
| 764 | - | |
| 765 | - application.MainLoop(); | |
| 766 | -} | |
| 767 | - | |
| 768 | -/** | |
| 769 | - * @brief Entry point for Linux & Tizen applications | |
| 770 | - * @param[in] argc The executables argument count | |
| 771 | - * @param[in] argv The executables argument vector | |
| 772 | - * @return The executables exit code (0) | |
| 773 | - */ | |
| 774 | 756 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 775 | 757 | { |
| 776 | 758 | Application application = Application::New( &argc, &argv ); |
| 777 | - | |
| 778 | - RunExample( application ); | |
| 779 | - | |
| 759 | + RendererStencilExample example( application ); | |
| 760 | + application.MainLoop(); | |
| 780 | 761 | return 0; |
| 781 | 762 | } | ... | ... |
examples/rendering-basic-light/rendering-basic-light-example.cpp
| ... | ... | @@ -409,20 +409,10 @@ private: |
| 409 | 409 | Animation mAnimation; |
| 410 | 410 | }; |
| 411 | 411 | |
| 412 | -void RunTest( Application& application ) | |
| 413 | -{ | |
| 414 | - BasicLightController test( application ); | |
| 415 | - | |
| 416 | - application.MainLoop(); | |
| 417 | -} | |
| 418 | - | |
| 419 | -// Entry point for Linux & Tizen applications | |
| 420 | -// | |
| 421 | 412 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 422 | 413 | { |
| 423 | 414 | Application application = Application::New( &argc, &argv, BASIC_LIGHT_THEME); |
| 424 | - | |
| 425 | - RunTest( application ); | |
| 426 | - | |
| 415 | + BasicLightController test( application ); | |
| 416 | + application.MainLoop(); | |
| 427 | 417 | return 0; |
| 428 | 418 | } | ... | ... |
examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp
| ... | ... | @@ -451,20 +451,10 @@ private: |
| 451 | 451 | |
| 452 | 452 | }; |
| 453 | 453 | |
| 454 | -void RunTest( Application& application ) | |
| 455 | -{ | |
| 456 | - BasicPbrController test( application ); | |
| 457 | - | |
| 458 | - application.MainLoop(); | |
| 459 | -} | |
| 460 | - | |
| 461 | -// Entry point for Linux & Tizen applications | |
| 462 | -// | |
| 463 | 454 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 464 | 455 | { |
| 465 | 456 | Application application = Application::New( &argc, &argv); |
| 466 | - | |
| 467 | - RunTest( application ); | |
| 468 | - | |
| 457 | + BasicPbrController test( application ); | |
| 458 | + application.MainLoop(); | |
| 469 | 459 | return 0; |
| 470 | 460 | } | ... | ... |
examples/rendering-cube/rendering-cube.cpp
| ... | ... | @@ -278,20 +278,10 @@ private: |
| 278 | 278 | Animation mAnimation; |
| 279 | 279 | }; |
| 280 | 280 | |
| 281 | -void RunTest( Application& application ) | |
| 282 | -{ | |
| 283 | - DrawCubeController test( application ); | |
| 284 | - | |
| 285 | - application.MainLoop(); | |
| 286 | -} | |
| 287 | - | |
| 288 | -// Entry point for Linux & Tizen applications | |
| 289 | -// | |
| 290 | 281 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 291 | 282 | { |
| 292 | 283 | Application application = Application::New( &argc, &argv ); |
| 293 | - | |
| 294 | - RunTest( application ); | |
| 295 | - | |
| 284 | + DrawCubeController test( application ); | |
| 285 | + application.MainLoop(); | |
| 296 | 286 | return 0; |
| 297 | 287 | } | ... | ... |
examples/rendering-line/rendering-line.cpp
| ... | ... | @@ -186,20 +186,10 @@ private: |
| 186 | 186 | Actor mActor; |
| 187 | 187 | }; |
| 188 | 188 | |
| 189 | -void RunTest( Application& application ) | |
| 190 | -{ | |
| 191 | - DrawLineController test( application ); | |
| 192 | - | |
| 193 | - application.MainLoop(); | |
| 194 | -} | |
| 195 | - | |
| 196 | -// Entry point for Linux & Tizen applications | |
| 197 | -// | |
| 198 | 189 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 199 | 190 | { |
| 200 | 191 | Application application = Application::New( &argc, &argv ); |
| 201 | - | |
| 202 | - RunTest( application ); | |
| 203 | - | |
| 192 | + DrawLineController test( application ); | |
| 193 | + application.MainLoop(); | |
| 204 | 194 | return 0; |
| 205 | 195 | } | ... | ... |
examples/rendering-radial-progress/radial-progress.cpp
examples/rendering-skybox/rendering-skybox.cpp
| ... | ... | @@ -484,20 +484,10 @@ private: |
| 484 | 484 | Actor mSkyboxActor; |
| 485 | 485 | }; |
| 486 | 486 | |
| 487 | -void RunTest( Application& application ) | |
| 488 | -{ | |
| 489 | - TexturedCubeController test( application ); | |
| 490 | - | |
| 491 | - application.MainLoop(); | |
| 492 | -} | |
| 493 | - | |
| 494 | -// Entry point for Linux & Tizen applications | |
| 495 | -// | |
| 496 | 487 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 497 | 488 | { |
| 498 | 489 | Application application = Application::New( &argc, &argv ); |
| 499 | - | |
| 500 | - RunTest( application ); | |
| 501 | - | |
| 490 | + TexturedCubeController test( application ); | |
| 491 | + application.MainLoop(); | |
| 502 | 492 | return 0; |
| 503 | 493 | } | ... | ... |
examples/rendering-textured-cube/rendering-textured-cube.cpp
| ... | ... | @@ -297,20 +297,10 @@ private: |
| 297 | 297 | Animation mAnimation; |
| 298 | 298 | }; |
| 299 | 299 | |
| 300 | -void RunTest( Application& application ) | |
| 301 | -{ | |
| 302 | - TexturedCubeController test( application ); | |
| 303 | - | |
| 304 | - application.MainLoop(); | |
| 305 | -} | |
| 306 | - | |
| 307 | -// Entry point for Linux & Tizen applications | |
| 308 | -// | |
| 309 | 300 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 310 | 301 | { |
| 311 | 302 | Application application = Application::New( &argc, &argv ); |
| 312 | - | |
| 313 | - RunTest( application ); | |
| 314 | - | |
| 303 | + TexturedCubeController test( application ); | |
| 304 | + application.MainLoop(); | |
| 315 | 305 | return 0; |
| 316 | 306 | } | ... | ... |
examples/rendering-triangle/rendering-triangle.cpp
| ... | ... | @@ -187,20 +187,10 @@ private: |
| 187 | 187 | Actor mActor; |
| 188 | 188 | }; |
| 189 | 189 | |
| 190 | -void RunTest( Application& application ) | |
| 191 | -{ | |
| 192 | - DrawTriangleController test( application ); | |
| 193 | - | |
| 194 | - application.MainLoop(); | |
| 195 | -} | |
| 196 | - | |
| 197 | -// Entry point for Linux & Tizen applications | |
| 198 | -// | |
| 199 | 190 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 200 | 191 | { |
| 201 | 192 | Application application = Application::New( &argc, &argv ); |
| 202 | - | |
| 203 | - RunTest( application ); | |
| 204 | - | |
| 193 | + DrawTriangleController test( application ); | |
| 194 | + application.MainLoop(); | |
| 205 | 195 | return 0; |
| 206 | 196 | } | ... | ... |
examples/shadows-and-lights/shadows-and-lights-example.cpp
| ... | ... | @@ -511,20 +511,10 @@ private: |
| 511 | 511 | |
| 512 | 512 | /*****************************************************************************/ |
| 513 | 513 | |
| 514 | -static void | |
| 515 | -RunTest(Application& app) | |
| 516 | -{ | |
| 517 | - TestApp theApp(app); | |
| 518 | - app.MainLoop(); | |
| 519 | -} | |
| 520 | - | |
| 521 | -/*****************************************************************************/ | |
| 522 | - | |
| 523 | 514 | int DALI_EXPORT_API main(int argc, char **argv) |
| 524 | 515 | { |
| 525 | 516 | Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); |
| 526 | - | |
| 527 | - RunTest(app); | |
| 528 | - | |
| 517 | + TestApp theApp(app); | |
| 518 | + app.MainLoop(); | |
| 529 | 519 | return 0; |
| 530 | 520 | } | ... | ... |
examples/simple-visuals-control/simple-visuals-example.cpp
| ... | ... | @@ -31,7 +31,6 @@ namespace |
| 31 | 31 | const char* SIMPLE_DEMO_THEME( DEMO_STYLE_DIR "simple-example-theme.json" ); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -/// Entry point for applications | |
| 35 | 34 | int DALI_EXPORT_API main( int argc, char** argv ) |
| 36 | 35 | { |
| 37 | 36 | Application application = Application::New( &argc, &argv, SIMPLE_DEMO_THEME ); // Use the above defined style sheet for this application. | ... | ... |
examples/size-negotiation/size-negotiation-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -819,19 +819,10 @@ private: |
| 819 | 819 | |
| 820 | 820 | }; |
| 821 | 821 | |
| 822 | -void RunTest( Application& application ) | |
| 823 | -{ | |
| 824 | - SizeNegotiationController test( application ); | |
| 825 | - | |
| 826 | - application.MainLoop(); | |
| 827 | -} | |
| 828 | - | |
| 829 | -// Entry point for Linux & SLP applications | |
| 830 | 822 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 831 | 823 | { |
| 832 | 824 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 833 | - | |
| 834 | - RunTest( application ); | |
| 835 | - | |
| 825 | + SizeNegotiationController test( application ); | |
| 826 | + application.MainLoop(); | |
| 836 | 827 | return 0; |
| 837 | 828 | } | ... | ... |
examples/sparkle/sparkle-effect-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -548,21 +548,11 @@ private: |
| 548 | 548 | std::map< Animation, int > mTapAnimationIndexPair; |
| 549 | 549 | }; |
| 550 | 550 | |
| 551 | -void RunTest( Application& application ) | |
| 552 | -{ | |
| 553 | - SparkleEffectExample theApp( application ); | |
| 554 | - | |
| 555 | - application.MainLoop(); | |
| 556 | -} | |
| 557 | - | |
| 558 | -// Entry point for Linux & Tizen applications | |
| 559 | -// | |
| 560 | 551 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 561 | 552 | { |
| 562 | 553 | Application application = Application::New( &argc, &argv ); |
| 563 | - | |
| 564 | - RunTest( application ); | |
| 565 | - | |
| 554 | + SparkleEffectExample theApp( application ); | |
| 555 | + application.MainLoop(); | |
| 566 | 556 | return 0; |
| 567 | 557 | } |
| 568 | 558 | ... | ... |
examples/styling/style-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -26,7 +26,6 @@ |
| 26 | 26 | #include "styling-application.h" |
| 27 | 27 | |
| 28 | 28 | |
| 29 | -/// Entry point for applications | |
| 30 | 29 | int DALI_EXPORT_API main( int argc, char** argv ) |
| 31 | 30 | { |
| 32 | 31 | const char* themeName = Demo::StylingApplication::DEMO_THEME_ONE_PATH; | ... | ... |
examples/text-editor/text-editor-example.cpp
| ... | ... | @@ -295,20 +295,11 @@ private: |
| 295 | 295 | Toolkit::TableView mButtonContainer; |
| 296 | 296 | }; |
| 297 | 297 | |
| 298 | -void RunTest( Application& application ) | |
| 299 | -{ | |
| 300 | - TextEditorExample test( application ); | |
| 301 | - | |
| 302 | - application.MainLoop(); | |
| 303 | -} | |
| 304 | - | |
| 305 | -/** Entry point for Linux & Tizen applications */ | |
| 306 | -int main( int argc, char **argv ) | |
| 298 | +int DALI_EXPORT_API main( int argc, char **argv ) | |
| 307 | 299 | { |
| 308 | 300 | // DALI_DEMO_THEME_PATH not passed to Application so TextEditor example uses default Toolkit style sheet. |
| 309 | 301 | Application application = Application::New( &argc, &argv ); |
| 310 | - | |
| 311 | - RunTest( application ); | |
| 312 | - | |
| 302 | + TextEditorExample test( application ); | |
| 303 | + application.MainLoop(); | |
| 313 | 304 | return 0; |
| 314 | 305 | } | ... | ... |
examples/text-field/text-field-example.cpp
| ... | ... | @@ -211,20 +211,11 @@ private: |
| 211 | 211 | Popup mPopup; |
| 212 | 212 | }; |
| 213 | 213 | |
| 214 | -void RunTest( Application& application ) | |
| 215 | -{ | |
| 216 | - TextFieldExample test( application ); | |
| 217 | - | |
| 218 | - application.MainLoop(); | |
| 219 | -} | |
| 220 | - | |
| 221 | -/** Entry point for Linux & Tizen applications */ | |
| 222 | 214 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 223 | 215 | { |
| 224 | 216 | // DALI_DEMO_THEME_PATH not passed to Application so TextField example uses default Toolkit style sheet. |
| 225 | 217 | Application application = Application::New( &argc, &argv ); |
| 226 | - | |
| 227 | - RunTest( application ); | |
| 228 | - | |
| 218 | + TextFieldExample test( application ); | |
| 219 | + application.MainLoop(); | |
| 229 | 220 | return 0; |
| 230 | 221 | } | ... | ... |
examples/text-fonts/text-fonts-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2015 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -245,19 +245,10 @@ private: |
| 245 | 245 | bool mToggle; |
| 246 | 246 | }; |
| 247 | 247 | |
| 248 | -void RunTest( Application& application ) | |
| 249 | -{ | |
| 250 | - TextFontsExample test( application ); | |
| 251 | - | |
| 252 | - application.MainLoop(); | |
| 253 | -} | |
| 254 | - | |
| 255 | -/** Entry point for Linux & Tizen applications */ | |
| 256 | 248 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 257 | 249 | { |
| 258 | 250 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 259 | - | |
| 260 | - RunTest( application ); | |
| 261 | - | |
| 251 | + TextFontsExample test( application ); | |
| 252 | + application.MainLoop(); | |
| 262 | 253 | return 0; |
| 263 | 254 | } | ... | ... |
examples/text-label-emojis/text-label-emojis.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -132,20 +132,10 @@ private: |
| 132 | 132 | float mLastPoint; |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | -void RunTest( Application& application ) | |
| 136 | -{ | |
| 137 | - EmojiExample test( application ); | |
| 138 | - | |
| 139 | - application.MainLoop(); | |
| 140 | -} | |
| 141 | - | |
| 142 | -// Entry point for Linux & SLP applications | |
| 143 | -// | |
| 144 | 135 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 145 | 136 | { |
| 146 | 137 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 147 | - | |
| 148 | - RunTest( application ); | |
| 149 | - | |
| 138 | + EmojiExample test( application ); | |
| 139 | + application.MainLoop(); | |
| 150 | 140 | return 0; |
| 151 | 141 | } | ... | ... |
examples/text-label-multi-language/text-label-multi-language-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2015 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -134,19 +134,10 @@ private: |
| 134 | 134 | float mLastPoint; |
| 135 | 135 | }; |
| 136 | 136 | |
| 137 | -void RunTest( Application& application ) | |
| 138 | -{ | |
| 139 | - TextLabelMultiLanguageExample test( application ); | |
| 140 | - | |
| 141 | - application.MainLoop(); | |
| 142 | -} | |
| 143 | - | |
| 144 | -/** Entry point for Linux & Tizen applications */ | |
| 145 | 137 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 146 | 138 | { |
| 147 | 139 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 148 | - | |
| 149 | - RunTest( application ); | |
| 150 | - | |
| 140 | + TextLabelMultiLanguageExample test( application ); | |
| 141 | + application.MainLoop(); | |
| 151 | 142 | return 0; |
| 152 | 143 | } | ... | ... |
examples/text-label/text-label-example.cpp
| ... | ... | @@ -582,19 +582,10 @@ private: |
| 582 | 582 | Property::Index mOverrideMixColorIndex; |
| 583 | 583 | }; |
| 584 | 584 | |
| 585 | -void RunTest( Application& application ) | |
| 586 | -{ | |
| 587 | - TextLabelExample test( application ); | |
| 588 | - | |
| 589 | - application.MainLoop(); | |
| 590 | -} | |
| 591 | - | |
| 592 | -/** Entry point for Linux & Tizen applications */ | |
| 593 | 585 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 594 | 586 | { |
| 595 | 587 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 596 | - | |
| 597 | - RunTest( application ); | |
| 598 | - | |
| 588 | + TextLabelExample test( application ); | |
| 589 | + application.MainLoop(); | |
| 599 | 590 | return 0; |
| 600 | 591 | } | ... | ... |
examples/text-memory-profiling/text-memory-profiling-example.cpp
| ... | ... | @@ -419,18 +419,10 @@ private: |
| 419 | 419 | unsigned int mCurrentTextStyle; |
| 420 | 420 | }; |
| 421 | 421 | |
| 422 | -void RunTest( Application& application ) | |
| 423 | -{ | |
| 424 | - TextMemoryProfilingExample test( application ); | |
| 425 | - | |
| 426 | - application.MainLoop(); | |
| 427 | -} | |
| 428 | - | |
| 429 | -/** Entry point for Linux & Tizen applications */ | |
| 430 | 422 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 431 | 423 | { |
| 432 | 424 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 433 | - RunTest( application ); | |
| 434 | - | |
| 425 | + TextMemoryProfilingExample test( application ); | |
| 426 | + application.MainLoop(); | |
| 435 | 427 | return 0; |
| 436 | 428 | } | ... | ... |
examples/text-overlap/text-overlap-example.cpp
| ... | ... | @@ -137,8 +137,7 @@ void TextOverlapController::OnKeyEvent( const KeyEvent& keyEvent ) |
| 137 | 137 | |
| 138 | 138 | } // namespace Demo |
| 139 | 139 | |
| 140 | - | |
| 141 | -int main( int argc, char** argv ) | |
| 140 | +int DALI_EXPORT_API main( int argc, char** argv ) | |
| 142 | 141 | { |
| 143 | 142 | { |
| 144 | 143 | Application app = Application::New( &argc, &argv ); | ... | ... |
examples/text-scrolling/text-scrolling-example.cpp
| ... | ... | @@ -404,19 +404,10 @@ private: |
| 404 | 404 | bool mToggleColor; |
| 405 | 405 | }; |
| 406 | 406 | |
| 407 | -void RunTest( Application& application ) | |
| 408 | -{ | |
| 409 | - TextScrollingExample test( application ); | |
| 410 | - | |
| 411 | - application.MainLoop(); | |
| 412 | -} | |
| 413 | - | |
| 414 | -/** Entry point for Linux & Tizen applications */ | |
| 415 | 407 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 416 | 408 | { |
| 417 | 409 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 418 | - | |
| 419 | - RunTest( application ); | |
| 420 | - | |
| 410 | + TextScrollingExample test( application ); | |
| 411 | + application.MainLoop(); | |
| 421 | 412 | return 0; |
| 422 | 413 | } | ... | ... |
examples/textured-mesh/textured-mesh-example.cpp
| ... | ... | @@ -241,20 +241,10 @@ private: |
| 241 | 241 | Timer mChangeImageTimer; |
| 242 | 242 | }; |
| 243 | 243 | |
| 244 | -void RunTest( Application& application ) | |
| 245 | -{ | |
| 246 | - ExampleController test( application ); | |
| 247 | - | |
| 248 | - application.MainLoop(); | |
| 249 | -} | |
| 250 | - | |
| 251 | -// Entry point for Linux & SLP applications | |
| 252 | -// | |
| 253 | 244 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 254 | 245 | { |
| 255 | 246 | Application application = Application::New( &argc, &argv ); |
| 256 | - | |
| 257 | - RunTest( application ); | |
| 258 | - | |
| 247 | + ExampleController test( application ); | |
| 248 | + application.MainLoop(); | |
| 259 | 249 | return 0; |
| 260 | 250 | } | ... | ... |
examples/tilt/tilt-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -112,8 +112,6 @@ private: |
| 112 | 112 | TextLabel mTextLabel; |
| 113 | 113 | }; |
| 114 | 114 | |
| 115 | -// Entry point for Linux & Tizen applications | |
| 116 | -// | |
| 117 | 115 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 118 | 116 | { |
| 119 | 117 | Application application = Application::New( &argc, &argv ); | ... | ... |
examples/transitions/transition-example.cpp
examples/video-view/video-view-example.cpp
| ... | ... | @@ -352,20 +352,10 @@ private: |
| 352 | 352 | Property::Map mNativeImageTarget; |
| 353 | 353 | }; |
| 354 | 354 | |
| 355 | -void RunTest( Application& application ) | |
| 356 | -{ | |
| 357 | - VideoViewController test( application ); | |
| 358 | - | |
| 359 | - application.MainLoop(); | |
| 360 | -} | |
| 361 | - | |
| 362 | -// Entry point for Linux & Tizen applications | |
| 363 | -// | |
| 364 | 355 | int DALI_EXPORT_API main( int argc, char **argv ) |
| 365 | 356 | { |
| 366 | 357 | Application application = Application::New( &argc, &argv, DEMO_THEME_PATH ); |
| 367 | - | |
| 368 | - RunTest( application ); | |
| 369 | - | |
| 358 | + VideoViewController test( application ); | |
| 359 | + application.MainLoop(); | |
| 370 | 360 | return 0; |
| 371 | 361 | } | ... | ... |
examples/visual-transitions/transition-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2016 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -26,7 +26,6 @@ |
| 26 | 26 | #include "transition-application.h" |
| 27 | 27 | |
| 28 | 28 | |
| 29 | -/// Entry point for applications | |
| 30 | 29 | int DALI_EXPORT_API main( int argc, char** argv ) |
| 31 | 30 | { |
| 32 | 31 | const char* themeName = Demo::TransitionApplication::DEMO_THEME_ONE_PATH; | ... | ... |