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/com.samsung.dali-demo.xml b/com.samsung.dali-demo.xml
index df0424c..7dcb04c 100644
--- a/com.samsung.dali-demo.xml
+++ b/com.samsung.dali-demo.xml
@@ -109,9 +109,6 @@
-
-
-
diff --git a/examples-reel/dali-examples-reel.cpp b/examples-reel/dali-examples-reel.cpp
index f2691e2..ee7a9d7 100644
--- a/examples-reel/dali-examples-reel.cpp
+++ b/examples-reel/dali-examples-reel.cpp
@@ -56,10 +56,8 @@ int DALI_EXPORT_API main(int argc, char **argv)
demo.AddExample(Example("image-view-svg.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG));
demo.AddExample(Example("image-view-url.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_URL));
demo.AddExample(Example("line-mesh.example", DALI_DEMO_STR_TITLE_LINE_MESH));
- demo.AddExample(Example("logging.example", DALI_DEMO_STR_TITLE_LOGGING));
demo.AddExample(Example("magnifier.example", DALI_DEMO_STR_TITLE_MAGNIFIER));
demo.AddExample(Example("mesh-morph.example", DALI_DEMO_STR_TITLE_MESH_MORPH));
- demo.AddExample(Example("mesh-sorting.example", DALI_DEMO_STR_TITLE_MESH_SORTING));
demo.AddExample(Example("motion-stretch.example", DALI_DEMO_STR_TITLE_MOTION_STRETCH));
demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE));
demo.AddExample(Example("popup.example", DALI_DEMO_STR_TITLE_POPUP));
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 1dd0e03..68ca7df 100644
--- a/examples/clipping-draw-order/clipping-draw-order.cpp
+++ b/examples/clipping-draw-order/clipping-draw-order.cpp
@@ -52,6 +52,9 @@ public:
Stage stage = Stage::GetCurrent();
stage.SetBackgroundColor( Color::WHITE );
+ // Connect to the stage's key signal to allow Back and Escape to exit.
+ stage.KeyEventSignal().Connect( this, &ClippingDrawOrderVerification::OnKeyEvent );
+
// Create the title label.
TextLabel title = TextLabel::New( "Clipping draw order verification" );
title.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
@@ -204,23 +207,31 @@ public:
return true;
}
+ /**
+ * @brief Called when any key event is received
+ *
+ * Will use this to quit the application if Back or the Escape key is received
+ * @param[in] event The key event information
+ */
+ void OnKeyEvent( const KeyEvent& event )
+ {
+ if( event.state == KeyEvent::Down )
+ {
+ if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
+ {
+ mApplication.Quit();
+ }
+ }
+ }
+
private:
Application& mApplication;
};
-void RunVerification( Application& application )
-{
- ClippingDrawOrderVerification verification( application );
-
- application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications.
int DALI_EXPORT_API main( int argc, char **argv )
{
Application application = Application::New( &argc, &argv );
-
- RunVerification( application );
-
+ ClippingDrawOrderVerification verification( application );
+ application.MainLoop();
return 0;
}
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/logging/logging-example.cpp b/examples/logging/logging-example.cpp
deleted file mode 100644
index 21e1ef5..0000000
--- a/examples/logging/logging-example.cpp
+++ /dev/null
@@ -1,712 +0,0 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "shared/view.h"
-#include
-#include
-#include
-#include
-
-using namespace Dali;
-
-// Define this so that it is interchangeable
-// "DP" stands for Device independent Pixels
-#define DP(x) x
-
-//enum ButtonType
-//{
-// PUSH_BUTTON,
-// TOGGLE_BUTTON
-//};
-//
-//struct ButtonItem
-//{
-// ButtonType type;
-// const char* name;
-// const char* text;
-// const char* altText;
-//};
-
-namespace
-{
-
-const char* const BACKGROUND_IMAGE = DEMO_IMAGE_DIR "background-gradient.jpg";
-const char* const TOOLBAR_IMAGE = DEMO_IMAGE_DIR "top-bar.png";
-
-const char* const TOOLBAR_TITLE = "Logging";
-//const int TOOLBAR_HEIGHT = 62;
-
-const int MARGIN_SIZE = 10;
-const int TOP_MARGIN = 85;
-
-const int LOGGER_GROUP_HEIGHT = 84;
-const int LOGGER_RADIO_GROUP_HEIGHT = 200;
-
-const int LOGGER_RADIO_SPACING = 48;
-
-const int CONSOLE_HEIGHT = 84;
-
-const int BUTTON_WIDTH = 200;
-const int BUTTON_HEIGHT = LOGGER_GROUP_HEIGHT - MARGIN_SIZE * 2;
-
-const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f );
-
-// Button IDs
-const char* const LOGGER_1_RADIO_ID = "LOGGER_1_RADIO";
-const char* const LOGGER_2_RADIO_ID = "LOGGER_2_RADIO";
-const char* const LOGGER_3_RADIO_ID = "LOGGER_3_RADIO";
-
-const char* const FREQUENCY_1_RADIO_ID = "FREQUENCY_1_RADIO";
-const char* const FREQUENCY_2_RADIO_ID = "FREQUENCY_2_RADIO";
-const char* const FREQUENCY_3_RADIO_ID = "FREQUENCY_3_RADIO";
-
-const char* const CREATE_BUTTON_ID = "CREATE_BUTTON";
-const char* const DELETE_BUTTON_ID = "DELETE_BUTTON";
-const char* const START_BUTTON_ID = "START_BUTTON";
-const char* const STOP_BUTTON_ID = "STOP_BUTTON";
-const char* const HIGH_FREQ_BUTTON_ID = "INC_FREQ_BUTTON";
-const char* const LOW_FREQ_BUTTON_ID = "DEC_FREQ_BUTTON";
-const char* const ENABLE_BUTTON_ID = "ENABLE_BUTTON";
-const char* const DISABLE_BUTTON_ID = "DISABLE_BUTTON";
-const char* const VSYNC_BUTTON_ID = "VSYNC_BUTTON";
-
-const char* const CREATE_BUTTON_TEXT = "Create";
-const char* const DELETE_BUTTON_TEXT = "Delete";
-const char* const START_BUTTON_TEXT = "Start";
-const char* const STOP_BUTTON_TEXT = "Stop";
-const char* const ENABLE_BUTTON_TEXT = "Enable";
-const char* const DISABLE_BUTTON_TEXT = "Disable";
-const char* const VSYNC_BUTTON_TEXT = "Vsync";
-
-const char* const FREQUENCY_1_RADIO_TEXT = "1";
-const char* const FREQUENCY_2_RADIO_TEXT = "2";
-const char* const FREQUENCY_3_RADIO_TEXT = "10";
-
-const char* const LOGGER_TEXT = "Logger:";
-const char* const FREQUENCY_TEXT = "Frequency (sec):";
-
-const unsigned int NUM_LOGGERS = 3;
-
-const unsigned int HIGH_FREQUENCY = 1; // Seconds
-const unsigned int MEDIUM_FREQUENCY = 2; // Seconds
-const unsigned int LOW_FREQUENCY = 10; // Seconds
-const unsigned int NUM_FREQUENCIES = 3;
-
-} // namespace
-
-/**
- * This example is a test harness for performance loggers.
- *
- * Press one of the create buttons to create a logger. This will output on vsync at the default frequency (2 seconds).
- * In case nothing appears in the log, force a vsync by touching anywhere on the screen. Loggers can be deleted
- * with the delete buttons. They can be enabled or disabled in which case logging will appear or disappear in the console
- * respectively. To record information in a logger press the start and then stop button in succession quickly in between
- * the time period when it would print to the console. This is necessary as the logger is cleared of information when
- * it prints. The output will contain the smallest and largest times between start and stop recorded (minimum and maximum),
- * the total time recorded by the logger as well as the average and standard deviation of all the times recorded. The
- * frequency of log output can be set to high frequency (every 1 second) or low frequency (every 10 seconds).
- */
-class LoggingController: public ConnectionTracker
-{
- public:
-
- LoggingController( Application& application )
- : mApplication( application ),
- mView(),
- mToolBar(),
- mContentLayer(),
- mAnimation(),
- mPerformanceLoggerNames(),
- mPerformanceLoggers(),
- mCurrentLogger( 0 ),
- mLoggerStates(),
- mLogRadioButtons(),
- mFrequencyRadioButtons()
- {
- // Connect to the Application's Init signal
- mApplication.InitSignal().Connect( this, &LoggingController::Create );
- }
-
- ~LoggingController()
- {
- // Nothing to do here
- }
-
- void Create( Application& application )
- {
- // The Init signal is received once (only) during the Application lifetime
-
- mCurrentLogger = 0;
- mPerformanceLoggers.reserve( NUM_LOGGERS );
- mPerformanceLoggers.resize( NUM_LOGGERS );
-
- mPerformanceLoggerNames.reserve( NUM_LOGGERS );
- mPerformanceLoggerNames.resize( NUM_LOGGERS );
-
- mLoggerStates.reserve( NUM_LOGGERS );
- mLoggerStates.resize( NUM_LOGGERS );
-
- mLogRadioButtons.reserve( NUM_LOGGERS );
- mLogRadioButtons.resize( NUM_LOGGERS );
-
- mFrequencyRadioButtons.reserve( NUM_FREQUENCIES );
- mFrequencyRadioButtons.resize( NUM_FREQUENCIES );
-
- // Respond to key events
- Stage::GetCurrent().KeyEventSignal().Connect(this, &LoggingController::OnKeyEvent);
-
- // Creates a default view with a default tool bar.
- // The view is added to the stage.
- mContentLayer = DemoHelper::CreateView( application,
- mView,
- mToolBar,
- BACKGROUND_IMAGE,
- TOOLBAR_IMAGE,
- TOOLBAR_TITLE );
-
- Toolkit::TableView contentTable = Toolkit::TableView::New( 6, 1 );
- contentTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- contentTable.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- contentTable.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- contentTable.SetParentOrigin( ParentOrigin::TOP_LEFT );
- contentTable.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
-
- for( unsigned int i = 0; i < contentTable.GetRows(); ++i )
- {
- contentTable.SetFitHeight( i );
- }
-
- contentTable.SetPosition( 0.0f, TOP_MARGIN );
-
- mContentLayer.Add( contentTable );
-
-
- // Logger selector radio group
- Toolkit::TableView radioGroupBackground = Toolkit::TableView::New( 2, 1 );
- radioGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- radioGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- radioGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
- radioGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );
- radioGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- radioGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
-
- contentTable.Add( radioGroupBackground );
-
- // Label
- {
- Toolkit::TextLabel label = Toolkit::TextLabel::New( LOGGER_TEXT );
- label.SetParentOrigin( ParentOrigin::TOP_LEFT );
- label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- label.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );
- label.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
-
- radioGroupBackground.Add( label );
- radioGroupBackground.SetFitHeight( 0 );
- }
-
- // Radio group
- Toolkit::TableView radioButtonsGroup = Toolkit::TableView::New( 3, 1 );
- radioButtonsGroup.SetCellPadding( Size( 0.0f, MARGIN_SIZE * 0.5f ) );
- radioButtonsGroup.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- for( unsigned int i = 0; i < radioButtonsGroup.GetRows(); ++i )
- {
- radioButtonsGroup.SetFitHeight( i );
- }
- radioButtonsGroup.SetFitWidth( 0 );
-
- radioGroupBackground.Add( radioButtonsGroup );
- radioGroupBackground.SetFitHeight( 1 );
-
- int radioX = 0;
- int radioY = 0;
-
- // Radio 1
- {
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::New();
- radioButton.SetName( LOGGER_1_RADIO_ID );
- radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
- radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- radioButton.SetPosition( DP(radioX), DP(radioY) );
- radioButton.SetProperty( Toolkit::Button::Property::SELECTED, true );
-
- radioButton.StateChangedSignal().Connect( this, &LoggingController::LoggingRadioSelect );
-
- radioButtonsGroup.Add( radioButton );
- mLogRadioButtons[0] = radioButton;
- }
-
- // Radio 2
- {
- radioY += LOGGER_RADIO_SPACING;
-
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::New();
- radioButton.SetName( LOGGER_2_RADIO_ID );
- radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
- radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- radioButton.SetPosition( DP(radioX), DP(radioY) );
-
- radioButton.StateChangedSignal().Connect( this, &LoggingController::LoggingRadioSelect );
-
- radioButtonsGroup.Add( radioButton );
- mLogRadioButtons[1] = radioButton;
- }
-
- // Radio 3
- {
- radioY += LOGGER_RADIO_SPACING;
-
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::New();
- radioButton.SetName( LOGGER_3_RADIO_ID );
- radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
- radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- radioButton.SetPosition( DP(radioX), DP(radioY) );
-
- radioButton.StateChangedSignal().Connect( this, &LoggingController::LoggingRadioSelect );
-
- radioButtonsGroup.Add( radioButton );
- mLogRadioButtons[2] = radioButton;
- }
-
- // Create/delete/disable group
- Toolkit::TableView createGroupBackground = Toolkit::TableView::New( 1, 2 );
- createGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- createGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- createGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
- createGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
- createGroupBackground.SetFitHeight( 0 );
-
- contentTable.Add( createGroupBackground );
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( CREATE_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, CREATE_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- createGroupBackground.Add( button );
- }
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( DELETE_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, DELETE_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- createGroupBackground.Add( button );
- }
-
- // Start/stop group
-
- Toolkit::TableView timingGroupBackground = Toolkit::TableView::New( 1, 2 );
- timingGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- timingGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- timingGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
- timingGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
- timingGroupBackground.SetFitHeight( 0 );
-
- contentTable.Add( timingGroupBackground );
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( START_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, START_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- timingGroupBackground.Add( button );
- }
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( STOP_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, STOP_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- timingGroupBackground.Add( button );
- }
-
- // Enable/disable group
- Toolkit::TableView enableGroupBackground = Toolkit::TableView::New( 1, 2 );
- enableGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- enableGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- enableGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
- enableGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
- enableGroupBackground.SetFitHeight( 0 );
-
- contentTable.Add( enableGroupBackground );
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( ENABLE_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, ENABLE_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- enableGroupBackground.Add( button );
- }
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( DISABLE_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, DISABLE_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- enableGroupBackground.Add( button );
- }
-
- // Logger selector radio group
- Toolkit::TableView frequencyRadioGroupBackground = Toolkit::TableView::New( 2, 1 );
- frequencyRadioGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- frequencyRadioGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- frequencyRadioGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
- frequencyRadioGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
- frequencyRadioGroupBackground.SetFitHeight( 0 );
- frequencyRadioGroupBackground.SetFitHeight( 1 );
-
- contentTable.Add( frequencyRadioGroupBackground );
-
- // Label
- {
- Toolkit::TextLabel label = Toolkit::TextLabel::New( FREQUENCY_TEXT );
-
- frequencyRadioGroupBackground.Add( label );
- }
-
- // Radio group
- Toolkit::TableView frequencyRadioButtonsGroup = Toolkit::TableView::New( 1, 3 );
- frequencyRadioButtonsGroup.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- frequencyRadioButtonsGroup.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- frequencyRadioButtonsGroup.SetFitHeight( 0 );
- frequencyRadioButtonsGroup.SetPadding( Padding( 0.0f, 0.0f, MARGIN_SIZE, 0.0f ) );
-
- frequencyRadioGroupBackground.Add( frequencyRadioButtonsGroup );
-
- // Radio 1
- {
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_1_RADIO_TEXT );
- radioButton.SetName( FREQUENCY_1_RADIO_ID );
-
- radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect );
-
- frequencyRadioButtonsGroup.Add( radioButton );
- mFrequencyRadioButtons[0] = radioButton;
- }
-
- // Radio 2
- {
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_2_RADIO_TEXT );
- radioButton.SetName( FREQUENCY_2_RADIO_ID );
-
- radioButton.SetProperty( Toolkit::Button::Property::SELECTED, true );
-
- radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect );
-
- frequencyRadioButtonsGroup.Add( radioButton );
- mFrequencyRadioButtons[1] = radioButton;
- }
-
- // Radio 3
- {
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_3_RADIO_TEXT );
- radioButton.SetName( FREQUENCY_3_RADIO_ID );
-
- radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect );
-
- frequencyRadioButtonsGroup.Add( radioButton );
- mFrequencyRadioButtons[2] = radioButton;
- }
-
- // Vsync group
- Toolkit::TableView vsyncGroupBackground = Toolkit::TableView::New( 1, 1 );
- vsyncGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- vsyncGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- vsyncGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
- vsyncGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
- vsyncGroupBackground.SetFitHeight( 0 );
-
- contentTable.Add( vsyncGroupBackground );
-
- {
- Toolkit::PushButton button = Toolkit::PushButton::New();
- button.SetName( VSYNC_BUTTON_ID );
- button.SetProperty( Toolkit::Button::Property::LABEL, VSYNC_BUTTON_TEXT);
- button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
-
- vsyncGroupBackground.Add( button );
- }
-
- WriteConsole();
- }
-
- void WriteConsole()
- {
- for( unsigned int i = 0; i < NUM_LOGGERS; ++i)
- {
- std::stringstream ss;
- ss << (i + 1) << ") " << ((mPerformanceLoggers[i]) ? "Created" : "Deleted")
- << ", " << ((mLoggerStates[i].isTiming) ? "Started" : "Stopped")
- << ", " << ((mLoggerStates[i].isEnabled) ? "Enabled" : "Disabled");
-
- mLogRadioButtons[i].SetProperty( Toolkit::Button::Property::LABEL, ss.str() );
- }
- }
-
- bool LoggingRadioSelect( Toolkit::Button button )
- {
- bool isSelected = button.GetProperty( Toolkit::Button::Property::SELECTED ).Get();
- if( !isSelected )
- {
- return true;
- }
-
- if( button.GetName() == LOGGER_1_RADIO_ID )
- {
- mCurrentLogger = 0;
- }
- else if( button.GetName() == LOGGER_2_RADIO_ID )
- {
- mCurrentLogger = 1;
- }
- else if( button.GetName() == LOGGER_3_RADIO_ID )
- {
- mCurrentLogger = 2;
- }
-
- UpdateState();
-
- return true;
- }
-
- void UpdateState()
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- const unsigned int frequency = mLoggerStates[mCurrentLogger].frequency;
- if( frequency == HIGH_FREQUENCY )
- {
- mFrequencyRadioButtons[0].SetProperty( Toolkit::Button::Property::SELECTED, true );
- }
- else if( frequency == MEDIUM_FREQUENCY )
- {
- mFrequencyRadioButtons[1].SetProperty( Toolkit::Button::Property::SELECTED, true );
- }
- else if( frequency == LOW_FREQUENCY )
- {
- mFrequencyRadioButtons[2].SetProperty( Toolkit::Button::Property::SELECTED, true );
- }
- }
-
- bool FrequencyRadioSelect( Toolkit::Button button )
- {
- bool isSelected = button.GetProperty( Toolkit::Button::Property::SELECTED ).Get();
- if( !isSelected )
- {
- return true;
- }
-
- if( button.GetName() == FREQUENCY_1_RADIO_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].SetLoggingFrequency( HIGH_FREQUENCY );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].frequency = HIGH_FREQUENCY;
- }
- }
- else if( button.GetName() == FREQUENCY_2_RADIO_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].SetLoggingFrequency( MEDIUM_FREQUENCY );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].frequency = MEDIUM_FREQUENCY;
- }
- }
- else if( button.GetName() == FREQUENCY_3_RADIO_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].SetLoggingFrequency( LOW_FREQUENCY );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].frequency = LOW_FREQUENCY;
- }
- }
-
- return true;
- }
-
- void OnKeyEvent( const KeyEvent& event )
- {
- if( event.state == KeyEvent::Down )
- {
- if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) )
- {
- // Exit application when click back or escape.
- mApplication.Quit();
- }
- }
- }
-
- bool OnButtonClicked(Toolkit::Button button)
- {
- if( button.GetName() == CREATE_BUTTON_ID )
- {
- std::stringstream ss;
- ss << "Test logger " << (mCurrentLogger + 1);
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggerNames.size() );
- mPerformanceLoggerNames[mCurrentLogger] = ss.str();
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger] = Dali::PerformanceLogger::New( mPerformanceLoggerNames[mCurrentLogger].c_str() );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].isTiming = false;
- mLoggerStates[mCurrentLogger].isEnabled = true;
- mLoggerStates[mCurrentLogger].frequency = MEDIUM_FREQUENCY;
-
- UpdateState();
- }
- else if ( button.GetName() == DELETE_BUTTON_ID )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].Reset();
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].isTiming = false;
- mLoggerStates[mCurrentLogger].isEnabled = true;
- mLoggerStates[mCurrentLogger].frequency = MEDIUM_FREQUENCY;
-
- UpdateState();
- }
- else if ( button.GetName() == START_BUTTON_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].AddMarker( Dali::PerformanceLogger::START_EVENT );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].isTiming = true;
- }
- }
- else if ( button.GetName() == STOP_BUTTON_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].AddMarker( Dali::PerformanceLogger::END_EVENT );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].isTiming = false;
- }
- }
- else if ( button.GetName() == ENABLE_BUTTON_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].EnableLogging( true );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].isEnabled = true;
- }
- }
- else if ( button.GetName() == DISABLE_BUTTON_ID )
- {
- if( mPerformanceLoggers[mCurrentLogger] )
- {
- DALI_ASSERT_DEBUG( mCurrentLogger < mPerformanceLoggers.size() );
- mPerformanceLoggers[mCurrentLogger].EnableLogging( false );
-
- DALI_ASSERT_DEBUG( mCurrentLogger < mLoggerStates.size() );
- mLoggerStates[mCurrentLogger].isEnabled = false;
- }
- }
-
- WriteConsole();
-
- return true;
- }
-
-private:
-
- struct LoggerState
- {
- LoggerState() : frequency( 0 ), isTiming( false ), isEnabled( true ) {}
-
- unsigned int frequency;
- bool isTiming;
- bool isEnabled;
- };
-
- Application& mApplication;
- Toolkit::Control mView; ///< The View instance.
- Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
- Layer mContentLayer; ///< Content layer
-
- Animation mAnimation;
-
- typedef std::vector< std::string > Strings;
- Strings mPerformanceLoggerNames;
-
- typedef std::vector< Dali::PerformanceLogger > PerformanceLoggers;
- PerformanceLoggers mPerformanceLoggers;
- unsigned int mCurrentLogger;
-
- typedef std::vector< LoggerState > LoggerStates;
- LoggerStates mLoggerStates;
-
- typedef std::vector< Toolkit::RadioButton > RadioButtons;
- RadioButtons mLogRadioButtons;
- RadioButtons mFrequencyRadioButtons;
-};
-
-void RunTest( Application& application )
-{
- LoggingController 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 );
-
- 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-sorting/mesh-sorting-example.cpp b/examples/mesh-sorting/mesh-sorting-example.cpp
deleted file mode 100644
index 35300d5..0000000
--- a/examples/mesh-sorting/mesh-sorting-example.cpp
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include
-#include
-#include
-#include
-
-// INTERNAL INCLUDES
-#include "shared/view.h"
-#include "shared/utility.h"
-
-using namespace Dali;
-
-namespace
-{
-
-const char* IMAGES[] =
-{
- DEMO_IMAGE_DIR "people-medium-1.jpg",
- DEMO_IMAGE_DIR "people-medium-4.jpg",
- DEMO_IMAGE_DIR "people-medium-11.jpg",
- DEMO_IMAGE_DIR "people-small-16.jpg",
- DEMO_IMAGE_DIR "people-medium-15.jpg",
- DEMO_IMAGE_DIR "people-medium-6.jpg",
-};
-const unsigned int NUMBER_OF_SAMPLES(sizeof(IMAGES)/sizeof(const char*));
-
-
-#define MAKE_SHADER(A)#A
-
-const char* VERTEX_SHADER = MAKE_SHADER(
-uniform highp float uHue;
-attribute mediump vec2 aPosition;
-attribute highp vec2 aTexCoord;
-varying mediump vec2 vTexCoord;
-uniform mediump mat4 uMvpMatrix;
-uniform mediump vec3 uSize;
-varying mediump vec3 vGlobColor;
-
-vec3 hsv2rgb(vec3 c)
-{
- vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
- vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
- return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
-}
-
-void main()
-{
- mediump vec4 vertexPosition = vec4(aPosition, 0.0, 1.0);
- vertexPosition.xyz *= uSize;
- vertexPosition = uMvpMatrix * vertexPosition;
- vGlobColor = hsv2rgb( vec3( clamp(uHue, 0.0, 1.0), 1.0, 1.0 ) );
-
- vTexCoord = aTexCoord;
- gl_Position = vertexPosition;
-}
-);
-
-const char* FRAGMENT_SHADER = MAKE_SHADER(
-varying mediump vec2 vTexCoord;
-varying mediump vec3 vGlobColor;
-uniform lowp vec4 uColor;
-uniform sampler2D sTexture;
-
-void main()
-{
- gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * vec4(vGlobColor, 1.0) ;
-}
-);
-
-} // anonymous namespace
-
-// This example shows how to use a simple mesh
-//
-class ExampleController : public ConnectionTracker
-{
-public:
-
- /**
- * The example controller constructor.
- * @param[in] application The application instance
- */
- ExampleController( Application& application )
- : mApplication( application ),
- mZMode(0)
- {
- // Connect to the Application's Init signal
- mApplication.InitSignal().Connect( this, &ExampleController::Create );
- memset(mDepthIndices, 0, sizeof(mDepthIndices));
- }
-
- /**
- * The example controller destructor
- */
- ~ExampleController()
- {
- // Nothing to do here;
- }
-
- /**
- * Invoked upon creation of application
- * @param[in] application The application instance
- */
- void Create( Application& application )
- {
- Stage stage = Stage::GetCurrent();
- stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
-
- mStageSize = stage.GetSize();
-
- // The Init signal is received once (only) during the Application lifetime
-
- // Hide the indicator bar
- application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
-
- mShader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
- mGeometry = DemoHelper::CreateTexturedQuad();
-
- TextureSet firstTextureSet;
-
- for( unsigned i=0; i(actor.GetPropertyIndex("index"));
-
- int newDepthIndex = (mDepthIndices[index] + 10) % 30;
- mDepthIndices[index] = newDepthIndex;
-
- Renderer renderer = actor.GetRendererAt(0);
- renderer.SetProperty( Renderer::Property::DEPTH_INDEX, newDepthIndex);
-
- PrintDepths();
- }
- return true;
- }
-
- bool OnStageTouched( Actor rootLayer, const TouchData& event )
- {
- if( event.GetState( 0 ) == PointState::UP )
- {
- switch( mZMode )
- {
- case 0:
- {
- mZMode = 1;
- for(unsigned int i=1; i < rootLayer.GetChildCount(); ++i)
- {
- Actor child = rootLayer.GetChildAt(i);
- child.SetZ( 0.0f );
- }
- PrintDepths();
- break;
- }
- case 1:
- {
- mZMode = 2;
- for(unsigned int i=1; i < rootLayer.GetChildCount(); ++i)
- {
- Actor child = rootLayer.GetChildAt(i);
- child.SetZ( 100-i*10 );
- }
- PrintDepths();
- break;
- }
- case 2:
- {
- mZMode = 0;
- for(unsigned int i=1; i < rootLayer.GetChildCount(); ++i)
- {
- Actor child = rootLayer.GetChildAt(i);
- child.SetZ( i*10 );
- }
- PrintDepths();
- break;
- }
- }
- }
- return true;
- }
-
- /**
- * Invoked whenever the quit button is clicked
- * @param[in] button the quit button
- */
- bool OnQuitButtonClicked( Toolkit::Button button )
- {
- // quit the application
- mApplication.Quit();
- return true;
- }
-
- void OnKeyEvent(const KeyEvent& event)
- {
- if(event.state == KeyEvent::Down)
- {
- if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) )
- {
- mApplication.Quit();
- }
- }
- }
-
-private:
-
- Application& mApplication; ///< Application instance
- Vector3 mStageSize; ///< The size of the stage
-
- Shader mShader;
- Geometry mGeometry;
-
- int mDepthIndices[NUMBER_OF_SAMPLES];
- Actor mActors[NUMBER_OF_SAMPLES];
- int mZMode;
-};
-
-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 );
-
- 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 69d6e46..eb0fb7e 100644
--- a/examples/rendering-radial-progress/radial-progress.cpp
+++ b/examples/rendering-radial-progress/radial-progress.cpp
@@ -127,6 +127,9 @@ public:
Stage stage = Stage::GetCurrent();
stage.SetBackgroundColor( Color::BLACK );
+ // Connect to the stage's key signal to allow Back and Escape to exit.
+ stage.KeyEventSignal().Connect( this, &RadialProgressController::OnKeyEvent );
+
// 1. Create actor to show the effect
mActor = Actor::New();
mActor.SetAnchorPoint( AnchorPoint::CENTER );
@@ -283,6 +286,23 @@ public:
return renderer;
}
+ /**
+ * @brief Called when any key event is received
+ *
+ * Will use this to quit the application if Back or the Escape key is received
+ * @param[in] event The key event information
+ */
+ void OnKeyEvent( const KeyEvent& event )
+ {
+ if( event.state == KeyEvent::Down )
+ {
+ if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
+ {
+ mApplication.Quit();
+ }
+ }
+ }
+
private:
Application& mApplication;
@@ -290,20 +310,10 @@ private:
Actor mActor;
};
-void RunTest( Application& application )
-{
- RadialProgressController 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 );
-
+ RadialProgressController test( application );
+ application.MainLoop();
return 0;
}
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;
diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec
index eccd985..9218782 100755
--- a/packaging/com.samsung.dali-demo.spec
+++ b/packaging/com.samsung.dali-demo.spec
@@ -2,7 +2,7 @@
Name: com.samsung.dali-demo
Summary: The OpenGLES Canvas Core Demo
-Version: 1.2.60
+Version: 1.2.61
Release: 1
Group: System/Libraries
License: Apache-2.0
diff --git a/resources/po/as.po b/resources/po/as.po
index 7fcdee2..54b478d 100755
--- a/resources/po/as.po
+++ b/resources/po/as.po
@@ -67,18 +67,12 @@ msgstr "ছাঁয়া"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "অঁকোৱা-পকোৱা"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "Logging"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "পৰিবৰ্দ্ধক"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "মেশ অঙ্কুৰিত"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "মেশ অসংযোগ"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "3D অনুগামী"
diff --git a/resources/po/de.po b/resources/po/de.po
index 5c72910..f0aad71 100755
--- a/resources/po/de.po
+++ b/resources/po/de.po
@@ -67,18 +67,12 @@ msgstr "Licht und Schatten"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "Linien"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "Logging"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "Bildschirmlupe"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "Mesh Veränderung"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "Mesh Sortierung"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "3D-Modelle"
diff --git a/resources/po/en_GB.po b/resources/po/en_GB.po
index a864a77..5d30473 100755
--- a/resources/po/en_GB.po
+++ b/resources/po/en_GB.po
@@ -73,18 +73,12 @@ msgstr "Lights and Shadows"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "Mesh Line"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "Logging"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "Magnifier"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "Mesh Morph"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "Mesh Sorting"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "Mesh Visual"
diff --git a/resources/po/en_US.po b/resources/po/en_US.po
index 4015058..1296053 100755
--- a/resources/po/en_US.po
+++ b/resources/po/en_US.po
@@ -76,18 +76,12 @@ msgstr "Lights and Shadows"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "Mesh Line"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "Logging"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "Magnifier"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "Mesh Morph"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "Mesh Sorting"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "Mesh Visual"
diff --git a/resources/po/es.po b/resources/po/es.po
index fb2da25..4d5ae43 100755
--- a/resources/po/es.po
+++ b/resources/po/es.po
@@ -67,18 +67,12 @@ msgstr "Luces y sombras"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "Lineas"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "Control de entrada"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "Lupa"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "Transformacion de geometrias"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "Ordenacion de geometrias"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "Gemeotria 3D"
diff --git a/resources/po/fi.po b/resources/po/fi.po
index 2742866..b56ef25 100755
--- a/resources/po/fi.po
+++ b/resources/po/fi.po
@@ -67,18 +67,12 @@ msgstr "Valot ja Varjot"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "Viivapolygoniverkko"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "Loggaus"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "Suurennuslasi"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "Polygoniverkon Muodonmuutos"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "Polygoniverkon Lajittelu"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "Polygoniverkkovisuaali"
diff --git a/resources/po/ko.po b/resources/po/ko.po
index 2e3fe5c..cece01b 100755
--- a/resources/po/ko.po
+++ b/resources/po/ko.po
@@ -70,18 +70,12 @@ msgstr "빛과 그림자"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "라인 메쉬"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "로깅"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "돋보기"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "메쉬 형태"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "메쉬 분류"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "메쉬 비주얼"
diff --git a/resources/po/ml.po b/resources/po/ml.po
index 5b8dd41..a1f7e83 100755
--- a/resources/po/ml.po
+++ b/resources/po/ml.po
@@ -67,18 +67,12 @@ msgstr "നിഴല്"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "വര"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "ലോഗിംഗ്"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "ഭൂതക്കണ്ണാടി"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "മോർഫ് mesh"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "തരംതിരിക്കലിനായി mesh"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "3D മോഡലിങ്"
diff --git a/resources/po/ur.po b/resources/po/ur.po
index aa864e5..c3c76ad 100755
--- a/resources/po/ur.po
+++ b/resources/po/ur.po
@@ -67,18 +67,12 @@ msgstr "روشنی اور سائے"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "لکیریں"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "لاگنگ"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "مکبر"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "میش کی تبدیلی"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "میش کی چھنٹائی"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "3D میش"
diff --git a/resources/po/zn_CH.po b/resources/po/zn_CH.po
index c889949..f5aafe8 100755
--- a/resources/po/zn_CH.po
+++ b/resources/po/zn_CH.po
@@ -67,18 +67,12 @@ msgstr "阴影"
msgid "DALI_DEMO_STR_TITLE_LINE_MESH"
msgstr "线条"
-msgid "DALI_DEMO_STR_TITLE_LOGGING"
-msgstr "记录"
-
msgid "DALI_DEMO_STR_TITLE_MAGNIFIER"
msgstr "放大鏡"
msgid "DALI_DEMO_STR_TITLE_MESH_MORPH"
msgstr "网格变形"
-msgid "DALI_DEMO_STR_TITLE_MESH_SORTING"
-msgstr "网格排序"
-
msgid "DALI_DEMO_STR_TITLE_MESH_VISUAL"
msgstr "3D模型"
diff --git a/shared/dali-demo-strings.h b/shared/dali-demo-strings.h
index 480c81c..7ce0182 100644
--- a/shared/dali-demo-strings.h
+++ b/shared/dali-demo-strings.h
@@ -60,10 +60,8 @@ extern "C"
#define DALI_DEMO_STR_TITLE_ITEM_VIEW dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_ITEM_VIEW")
#define DALI_DEMO_STR_TITLE_LIGHTS_AND_SHADOWS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_LIGHTS_AND_SHADOWS")
#define DALI_DEMO_STR_TITLE_LINE_MESH dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_LINE_MESH")
-#define DALI_DEMO_STR_TITLE_LOGGING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_LOGGING")
#define DALI_DEMO_STR_TITLE_MAGNIFIER dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_MAGNIFIER")
#define DALI_DEMO_STR_TITLE_MESH_MORPH dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_MESH_MORPH")
-#define DALI_DEMO_STR_TITLE_MESH_SORTING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_MESH_SORTING")
#define DALI_DEMO_STR_TITLE_MESH_VISUAL dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_MESH_VISUAL")
#define DALI_DEMO_STR_TITLE_MOTION_BLUR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_MOTION_BLUR")
#define DALI_DEMO_STR_TITLE_MOTION_STRETCH dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_MOTION_STRETCH")
@@ -132,10 +130,8 @@ extern "C"
#define DALI_DEMO_STR_TITLE_ITEM_VIEW "Item View"
#define DALI_DEMO_STR_TITLE_LIGHTS_AND_SHADOWS "Lights and shadows"
#define DALI_DEMO_STR_TITLE_LINE_MESH "Mesh Line"
-#define DALI_DEMO_STR_TITLE_LOGGING "Logging"
#define DALI_DEMO_STR_TITLE_MAGNIFIER "Magnifier"
#define DALI_DEMO_STR_TITLE_MESH_MORPH "Mesh Morph"
-#define DALI_DEMO_STR_TITLE_MESH_SORTING "Mesh Sorting"
#define DALI_DEMO_STR_TITLE_MESH_VISUAL "Mesh Visual"
#define DALI_DEMO_STR_TITLE_MOTION_BLUR "Motion Blur"
#define DALI_DEMO_STR_TITLE_MOTION_STRETCH "Motion Stretch"