Merge branch 'devel/master' into tizen 49/159949/1 accepted/tizen/unified/20171117.124953 submit/tizen/20171115.014233 submit/tizen/20171115.054905
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 14 Nov 2017 01:21:24 +0000 (10:21 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 14 Nov 2017 01:21:55 +0000 (10:21 +0900)
Change-Id: I1b50e5122be9c9229a012306b59f4503f95411b5

120 files changed:
builder/dali-builder.cpp
com.samsung.dali-demo.xml
examples-reel/dali-examples-reel.cpp
examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp
examples/animated-images/animated-images-example.cpp
examples/animated-shapes/animated-shapes-example.cpp
examples/benchmark/benchmark.cpp
examples/blocks/blocks-example.cpp
examples/bubble-effect/bubble-effect-example.cpp
examples/buttons/buttons-example.cpp
examples/clipping-draw-order/clipping-draw-order.cpp
examples/clipping/clipping-example.cpp
examples/clipping/clipping-item-factory.cpp
examples/compressed-texture-formats/compressed-texture-formats-example.cpp
examples/contact-cards/contact-card.cpp
examples/cube-transition-effect/cube-transition-effect-example.cpp
examples/dissolve-effect/dissolve-effect-example.cpp
examples/effects-view/effects-view-example.cpp
examples/flex-container/flex-container-example.cpp
examples/focus-integration/focus-integration.cpp
examples/fpp-game/fpp-game-example.cpp
examples/fpp-game/fpp-game-tutorial-controller.cpp
examples/gradients/gradients-example.cpp
examples/hello-world/hello-world-example.cpp
examples/homescreen-benchmark/homescreen-benchmark.cpp
examples/image-policies/image-policies-example.cpp [new file with mode: 0644]
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp
examples/image-view-pixel-area/image-view-pixel-area-example.cpp
examples/image-view-svg/image-view-svg-example.cpp
examples/image-view-url/image-view-url-example.cpp [new file with mode: 0644]
examples/image-view/image-view-example.cpp
examples/item-view/item-view-example.cpp
examples/line-mesh/line-mesh-example.cpp
examples/logging/logging-example.cpp [deleted file]
examples/magnifier/magnifier-example.cpp
examples/mesh-morph/mesh-morph-example.cpp
examples/mesh-sorting/mesh-sorting-example.cpp [deleted file]
examples/mesh-visual/mesh-visual-example.cpp
examples/model3d-view/model3d-view-example.cpp
examples/motion-blur/motion-blur-example.cpp
examples/motion-stretch/motion-stretch-example.cpp
examples/native-image-source/native-image-source-example.cpp
examples/perf-scroll/perf-scroll.cpp
examples/pivot/pivot-example.cpp
examples/point-mesh/point-mesh-example.cpp
examples/popup/popup-example.cpp
examples/primitive-shapes/primitive-shapes-example.cpp
examples/progress-bar/progress-bar-example.cpp
examples/property-notification/property-notification-example.cpp
examples/ray-marching/ray-marching-example.cpp
examples/refraction-effect/refraction-effect-example.cpp
examples/remote-image-loading/remote-image-loading-example.cpp
examples/renderer-stencil/renderer-stencil-example.cpp
examples/rendering-basic-light/rendering-basic-light-example.cpp
examples/rendering-basic-pbr/ktx-loader.cpp
examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp
examples/rendering-cube/rendering-cube.cpp
examples/rendering-line/rendering-line.cpp
examples/rendering-radial-progress/radial-progress.cpp
examples/rendering-skybox/rendering-skybox.cpp
examples/rendering-textured-cube/rendering-textured-cube.cpp
examples/rendering-triangle/rendering-triangle.cpp
examples/shadows-and-lights/shadows-and-lights-example.cpp
examples/simple-visuals-control/my-control-impl.cpp
examples/simple-visuals-control/simple-visuals-application.cpp
examples/simple-visuals-control/simple-visuals-example.cpp
examples/size-negotiation/size-negotiation-example.cpp
examples/sparkle/sparkle-effect-example.cpp
examples/styling/image-channel-control-impl.cpp
examples/styling/style-example.cpp
examples/styling/styling-application.cpp
examples/text-editor/text-editor-example.cpp
examples/text-field/text-field-example.cpp
examples/text-fonts/text-fonts-example.cpp
examples/text-label-emojis/text-label-emojis.cpp
examples/text-label-multi-language/text-label-multi-language-example.cpp
examples/text-label/text-label-example.cpp
examples/text-memory-profiling/text-memory-profiling-example.cpp [new file with mode: 0644]
examples/text-overlap/text-overlap-example.cpp
examples/text-scrolling/text-scrolling-example.cpp
examples/textured-mesh/textured-mesh-example.cpp
examples/tilt/tilt-example.cpp
examples/tooltip/tooltip-example.cpp
examples/transitions/shadow-button-impl.cpp
examples/transitions/transition-application.cpp
examples/transitions/transition-example.cpp
examples/video-view/video-view-example.cpp
examples/visual-transitions/beat-control-impl.cpp
examples/visual-transitions/beat-control-impl.h
examples/visual-transitions/transition-application.cpp
examples/visual-transitions/transition-example.cpp
packaging/com.samsung.dali-demo.spec
resources/images/DarkStyleDisabledArrowButton.png [new file with mode: 0644]
resources/images/DarkStyleGreenArrowButton.png [new file with mode: 0755]
resources/images/DarkStyleGreyArrowButton.png [new file with mode: 0755]
resources/images/FontStyleButton_Colour.png [new file with mode: 0755]
resources/images/FontStyleButton_Main.png [new file with mode: 0755]
resources/images/FontStyleButton_OK_02.png [new file with mode: 0755]
resources/images/FontStyleButton_OK_03.png [new file with mode: 0755]
resources/images/FontStyleButton_Outline.png [new file with mode: 0755]
resources/images/FontStyleButton_Shadow.png [new file with mode: 0755]
resources/images/animatedLoading.gif [new file with mode: 0644]
resources/images/keyboard-Landscape.jpg [new file with mode: 0644]
resources/images/keyboard-LandscapeCopy.jpg [new file with mode: 0644]
resources/images/loading.png [new file with mode: 0644]
resources/po/as.po
resources/po/de.po
resources/po/en_GB.po
resources/po/en_US.po
resources/po/es.po
resources/po/fi.po
resources/po/ko.po
resources/po/ml.po
resources/po/ur.po
resources/po/zn_CH.po
shared/dali-demo-strings.h
shared/dali-table-view.cpp
shared/utility.h

index ac2b1df..4481c3d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -295,7 +295,7 @@ private:
 //
 //
 //------------------------------------------------------------------------------
-int main(int argc, char **argv)
+int DALI_EXPORT_API main(int argc, char **argv)
 {
 
   Application dali_app = Application::New(&argc, &argv, DEMO_THEME_PATH);
index fa6cd12..43f0ac1 100644 (file)
        <ui-application appid="text-fonts.example" exec="/usr/apps/com.samsung.dali-demo/bin/text-fonts.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
                <label>Text Fonts</label>
        </ui-application>
+       <ui-application appid="text-memory-profiling.example" exec="/usr/apps/com.samsung.dali-demo/bin/text-memory-profiling.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
+               <label>Text Memory Profiling</label>
+       </ui-application>
        <ui-application appid="text-scrolling.example" exec="/usr/apps/com.samsung.dali-demo/bin/text-scrolling.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
                <label>Text Scrolling</label>
        </ui-application>
-       <ui-application appid="logging.example" exec="/usr/apps/com.samsung.dali-demo/bin/logging.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
-               <label>Logging</label>
-       </ui-application>
        <ui-application appid="animated-shapes.example" exec="/usr/apps/com.samsung.dali-demo/bin/animated-shapes.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
                <label>Animated shapes</label>
        </ui-application>
        <ui-application appid="property-notification.example" exec="/usr/apps/com.samsung.dali-demo/bin/property-notification.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
                <label>Property Notification</label>
        </ui-application>
+       <ui-application appid="image-policies.example" exec="/usr/apps/com.samsung.dali-demo/bin/image-policies.example" nodisplay="true" multiple="false" taskmanage="true" type="c++app">
+               <label>Image Policies</label></ui-application>
        <privileges>
                <privilege>http://tizen.org/privilege/mediastorage</privilege>
                <privilege>http://tizen.org/privilege/externalstorage</privilege>
index 170d695..a90d8f0 100644 (file)
@@ -48,17 +48,17 @@ int DALI_EXPORT_API main(int argc, char **argv)
   demo.AddExample(Example("flex-container.example", DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND));
   demo.AddExample(Example("focus-integration.example", DALI_DEMO_STR_TITLE_FOCUS_INTEGRATION));
   demo.AddExample(Example("gradients.example", DALI_DEMO_STR_TITLE_COLOR_GRADIENT));
+  demo.AddExample(Example("image-policies.example", DALI_DEMO_STR_TITLE_IMAGE_POLICIES));
   demo.AddExample(Example("image-scaling-and-filtering.example", DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING));
   demo.AddExample(Example("image-scaling-irregular-grid.example", DALI_DEMO_STR_TITLE_IMAGE_SCALING));
   demo.AddExample(Example("image-view.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW));
   demo.AddExample(Example("image-view-alpha-blending.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_ALPHA_BLENDING));
   demo.AddExample(Example("image-view-pixel-area.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_PIXEL_AREA));
   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));
@@ -81,6 +81,7 @@ int DALI_EXPORT_API main(int argc, char **argv)
   demo.AddExample(Example("text-label.example", DALI_DEMO_STR_TITLE_TEXT_LABEL));
   demo.AddExample(Example("text-label-multi-language.example", DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE));
   demo.AddExample(Example("text-label-emojis.example", DALI_DEMO_STR_TITLE_EMOJI_TEXT));
+  demo.AddExample(Example("text-memory-profiling.example", DALI_DEMO_STR_TITLE_TEXT_MEMORY_PROFILING));
   demo.AddExample(Example("text-overlap.example", DALI_DEMO_STR_TITLE_TEXT_OVERLAP));
   demo.AddExample(Example("text-scrolling.example", DALI_DEMO_STR_TITLE_TEXT_SCROLLING));
   demo.AddExample(Example("remote-image-loading.example", DALI_DEMO_STR_TITLE_REMOTE_IMAGE));
index 35a71fc..f58e33f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,8 +16,6 @@
  */
 
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 #include <cstring>
 
 using namespace Dali;
@@ -112,17 +110,17 @@ private:
     Property::Map map;
     map.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::Type::IMAGE );
     map.Add( Toolkit::ImageVisual::Property::URL, image );
-    map.Add( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, mask );
+    map.Add( Toolkit::ImageVisual::Property::ALPHA_MASK_URL, mask );
 
     if( mImageCombinationIndex%2 == 0 )
     {
-      map.Add( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, 1.f );
-      map.Add( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, false );
+      map.Add( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, 1.f );
+      map.Add( Toolkit::ImageVisual::Property::CROP_TO_MASK, false );
     }
     else
     {
-      map.Add( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, 1.6f );
-      map.Add( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, true );
+      map.Add( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, 1.6f );
+      map.Add( Toolkit::ImageVisual::Property::CROP_TO_MASK, true );
     }
 
     mImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map );
@@ -152,20 +150,10 @@ private:
   int mImageCombinationIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewAlphaBlendApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewAlphaBlendApp test( application );
+  application.MainLoop();
   return 0;
 }
index 102470c..fab53de 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 #include "shared/utility.h"
 
 using namespace Dali;
@@ -361,9 +360,9 @@ public:
     if( type == IMAGE_ARRAY )
     {
       map
-        .Add( Toolkit::DevelImageVisual::Property::BATCH_SIZE, 4 )
-        .Add( Toolkit::DevelImageVisual::Property::CACHE_SIZE, 10 )
-        .Add( Toolkit::DevelImageVisual::Property::FRAME_DELAY, 150 );
+        .Add( Toolkit::ImageVisual::Property::BATCH_SIZE, 4 )
+        .Add( Toolkit::ImageVisual::Property::CACHE_SIZE, 10 )
+        .Add( Toolkit::ImageVisual::Property::FRAME_DELAY, 150 );
     }
   }
 
@@ -377,7 +376,6 @@ private:
   ImageType mImageType;
 };
 
-// Entry point for Linux & Tizen applications
 //
 int DALI_EXPORT_API main( int argc, char **argv )
 {
index dd79982..b4b8a39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -114,7 +114,7 @@ public:
     background.SetParentOrigin( Dali::ParentOrigin::CENTER );
     background.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
     Dali::Property::Map map;
-    map.Insert( Visual::Property::TYPE,  Visual::GRADIENT );
+    map.Insert( Toolkit::Visual::Property::TYPE,  Visual::GRADIENT );
     Property::Array stopOffsets;
     stopOffsets.PushBack( 0.0f );
     stopOffsets.PushBack( 1.0f );
@@ -460,16 +460,10 @@ private:
 
 };
 
-void RunTest( Application& application )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
+  Application application = Application::New( &argc, &argv );
   AnimatedShapesExample test( application );
   application.MainLoop();
-}
-
-int main( int argc, char **argv )
-{
-  Application application = Application::New( &argc, &argv );
-  RunTest( application );
-
   return 0;
 }
index 546e8e5..8ad4c5b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 // INTERNAL INCLUDES
@@ -465,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 );
@@ -503,7 +493,8 @@ int DALI_EXPORT_API main( int argc, char **argv )
     }
   }
 
-  RunTest( application );
+  Benchmark test( application );
+  application.MainLoop();
 
   return 0;
 }
index e22260d..dc3b208 100644 (file)
@@ -862,18 +862,10 @@ private:
   int mBrickCount;                                      ///< Total bricks on screen.
 };
 
-void RunTest(Application& app)
-{
-  ExampleController test(app);
-
-  app.MainLoop();
-}
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  ExampleController test(app);
+  app.MainLoop();
   return 0;
 }
index 66c02b8..d76b3a8 100644 (file)
@@ -306,20 +306,10 @@ private:
 
 /*****************************************************************************/
 
-static void
-RunTest(Application& app)
-{
-  BubbleEffectExample theApp(app);
-  app.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  BubbleEffectExample theApp(app);
+  app.MainLoop();
   return 0;
 }
index a21e2f2..ce59368 100644 (file)
@@ -509,20 +509,10 @@ private:
   Toolkit::ImageView mImage;
 };
 
-void RunTest( Application& application )
-{
-  ButtonsController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ButtonsController test( application );
+  application.MainLoop();
   return 0;
 }
index 1dd0e03..68ca7df 100644 (file)
@@ -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;
 }
index 6598b68..884bc18 100644 (file)
@@ -19,8 +19,6 @@
 #include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/devel-api/actors/actor-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
 // INTERNAL INCLUDES
 #include "clipping-item-factory.h"
@@ -121,7 +119,7 @@ private:
     border.SetParentOrigin( ParentOrigin::CENTER );
     border.SetAnchorPoint( AnchorPoint::CENTER );
     border.SetProperty( Control::Property::BACKGROUND,
-                        Property::Map().Add( Visual::Property::TYPE, Visual::BORDER )
+                        Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER )
                                        .Add( BorderVisual::Property::COLOR, Color::WHITE )
                                        .Add( BorderVisual::Property::SIZE, 2.0f )
                                        .Add( BorderVisual::Property::ANTI_ALIASING, true ) );
index 50ec810..1233831 100644 (file)
@@ -112,7 +112,7 @@ Actor ClippingItemFactory::NewItem( unsigned int itemId )
   borderActor.SetSizeModeFactor( Vector3( 2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f ) );
   borderActor.SetColorMode( USE_PARENT_COLOR );
   borderActor.SetProperty( ImageView::Property::IMAGE,
-                           Property::Map().Add( Visual::Property::TYPE, Visual::BORDER )
+                           Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER )
                                           .Add( BorderVisual::Property::COLOR, Color::WHITE )
                                           .Add( BorderVisual::Property::SIZE, ITEM_BORDER_SIZE )
                                           .Add( BorderVisual::Property::ANTI_ALIASING, true ) );
index 9363805..606f8cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/dali.h>
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 // INTERNAL INCLUDES
@@ -203,20 +202,10 @@ private:
   Application&  mApplication;
 };
 
-void RunTest( Application& application )
-{
-  CompressedTextureFormatsController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  CompressedTextureFormatsController test( application );
+  application.MainLoop();
   return 0;
 }
index eb89a6c..61fd38e 100644 (file)
@@ -104,7 +104,7 @@ ContactCard::ContactCard(
   // Create a control which will be used for the background and to clip the contents
   mContactCard = Control::New();
   mContactCard.SetProperty( Control::Property::BACKGROUND,
-                            Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+                            Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
                                            .Add( ColorVisual::Property::MIX_COLOR, Color::WHITE ) );
   mContactCard.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
   mContactCard.SetParentOrigin( ParentOrigin::TOP_LEFT );
@@ -117,7 +117,7 @@ ContactCard::ContactCard(
   mHeader = Control::New();
   mHeader.SetSize( mContactCardLayoutInfo.headerSize );
   mHeader.SetProperty( Control::Property::BACKGROUND,
-                       Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+                       Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
                                       .Add( ColorVisual::Property::MIX_COLOR, HEADER_COLOR ) );
   mHeader.SetParentOrigin( ParentOrigin::TOP_LEFT );
   mHeader.SetAnchorPoint( AnchorPoint::TOP_LEFT );
index 8d8acbd..f728418 100644 (file)
@@ -413,7 +413,6 @@ void CubeTransitionApp::OnKeyEvent(const KeyEvent& event)
   }
 }
 
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
index ed47bd5..185c65f 100644 (file)
@@ -436,7 +436,6 @@ bool DissolveEffectApp::OnTimerTick()
   return false;   //return false to stop the timer
 }
 
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
index e4c0373..1404e22 100644 (file)
@@ -245,20 +245,10 @@ void EffectsViewApp::OnKeyEvent(const KeyEvent& event)
 
 /*****************************************************************************/
 
-static void RunTest( Application& application )
-{
-  EffectsViewApp test( application );
-
-  application.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application application = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(application);
-
+  EffectsViewApp test( application );
+  application.MainLoop();
   return 0;
 }
index 4178991..4da35ea 100644 (file)
@@ -367,18 +367,10 @@ private:
   Toolkit::PushButton mAlignContentButton;
 };
 
-void RunTest(Application& app)
-{
-  FlexContainerExample test(app);
-
-  app.MainLoop();
-}
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  FlexContainerExample test(app);
+  app.MainLoop();
   return 0;
 }
index 2e80a96..f2d2bf0 100644 (file)
@@ -193,7 +193,6 @@ private:
   Layer             mContentLayer;                      ///< Content layer.
 };
 
-// Entry point for Linux & Tizen applications
 //
 int DALI_EXPORT_API main( int argc, char **argv )
 {
index 211028f..c409dc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -135,20 +135,10 @@ private:
   FppGameTutorialController mTutorialController;
 };
 
-void RunTest( Application& application )
-{
-  GameController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  GameController test( application );
+  application.MainLoop();
   return 0;
 }
index 61af0c1..8141986 100644 (file)
@@ -115,7 +115,7 @@ void FppGameTutorialController::DisplayTutorial()
   mLeftLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
   mLeftLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) );
   mLeftLabel.SetProperty( Toolkit::Control::Property::BACKGROUND,
-                          Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+                          Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
                                          .Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.0, 0.0, 0.7, 0.2 ) ) );
   mLeftLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) ); // White.
   mLeftLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
@@ -128,7 +128,7 @@ void FppGameTutorialController::DisplayTutorial()
   mRightLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
   mRightLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) );
   mRightLabel.SetProperty( Toolkit::Control::Property::BACKGROUND,
-                           Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+                           Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
                                           .Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.5, 0.0, 0.0, 0.2 ) ) );
   mRightLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) ); // White.
   mRightLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
index 9a92d2e..78480f6 100644 (file)
@@ -78,7 +78,7 @@ public:
 
 // ---- Gradient for background
 
-    mGradientMap.Insert( Visual::Property::TYPE,  Visual::GRADIENT );
+    mGradientMap.Insert( Toolkit::Visual::Property::TYPE,  Visual::GRADIENT );
 
     Property::Array stopOffsets;
     stopOffsets.PushBack( 0.0f );
@@ -161,20 +161,10 @@ private:
   unsigned mIndex;
 };
 
-void RunTest( Application& application )
-{
-  GradientController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  GradientController test( application );
+  application.MainLoop();
   return 0;
 }
index 89670a1..39fa54c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -65,20 +65,10 @@ private:
   Application&  mApplication;
 };
 
-void RunTest( Application& application )
-{
-  HelloWorldController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  HelloWorldController test( application );
+  application.MainLoop();
   return 0;
 }
index c0cb012..ab4fb8b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,8 +22,6 @@
 #include <iostream>
 
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
 using namespace Dali;
 using Dali::Toolkit::TextLabel;
@@ -323,7 +321,7 @@ public:
           else
           {
             Property::Map map;
-            map.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ).
+            map.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ).
               Add( Toolkit::TextVisual::Property::TEXT, DEMO_APPS_NAMES[currentIconIndex] ).
               Add( Toolkit::TextVisual::Property::TEXT_COLOR, Color::WHITE ).
               Add( Toolkit::TextVisual::Property::POINT_SIZE, ( ( static_cast<float>( ROW_HEIGHT * LABEL_AREA ) * 72.0f )  / dpi.y ) * 0.25f ).
@@ -456,26 +454,6 @@ private:
   int                         mCurrentPage;
 };
 
-void RunTest( Application& application, const HomescreenBenchmark::Config& config, bool printHelpAndExit )
-{
-  HomescreenBenchmark test( application, config );
-
-  if( printHelpAndExit )
-  {
-    PrintHelp( "c<num>",               " Number of columns" );
-    PrintHelp( "r<num>",               " Number of rows" );
-    PrintHelp( "p<num>",               " Number of pages ( must be greater than 1 )" );
-    PrintHelp( "-disable-tableview",   " Disables the use of TableView for layouting" );
-    PrintHelp( "-disable-icon-labels", " Disables labels for each icon" );
-    PrintHelp( "-use-checkbox",        " Uses checkboxes for icons" );
-    PrintHelp( "-use-text-label",      " Uses TextLabel instead of a TextVisual" );
-    return;
-  }
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications.
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   // Default settings.
@@ -521,8 +499,21 @@ int DALI_EXPORT_API main( int argc, char **argv )
   }
 
   Application application = Application::New( &argc, &argv );
+  HomescreenBenchmark test( application, config );
 
-  RunTest( application, config, printHelpAndExit );
+  if( printHelpAndExit )
+  {
+    PrintHelp( "c<num>",               " Number of columns" );
+    PrintHelp( "r<num>",               " Number of rows" );
+    PrintHelp( "p<num>",               " Number of pages ( must be greater than 1 )" );
+    PrintHelp( "-disable-tableview",   " Disables the use of TableView for layouting" );
+    PrintHelp( "-disable-icon-labels", " Disables labels for each icon" );
+    PrintHelp( "-use-checkbox",        " Uses checkboxes for icons" );
+    PrintHelp( "-use-text-label",      " Uses TextLabel instead of a TextVisual" );
+    return 0;
+  }
+
+  application.MainLoop();
 
   return 0;
 }
diff --git a/examples/image-policies/image-policies-example.cpp b/examples/image-policies/image-policies-example.cpp
new file mode 100644 (file)
index 0000000..7f7acc8
--- /dev/null
@@ -0,0 +1,551 @@
+/*
+ * 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 <string>
+#include "shared/view.h"
+#include <dali/dali.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
+#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+
+using namespace Dali;
+using namespace Toolkit;
+
+namespace
+{
+const char* NEXT_BUTTON_IMAGE( DEMO_IMAGE_DIR "DarkStyleGreenArrowButton.png" );
+const char* NEXT_BUTTON_PRESSED_IMAGE( DEMO_IMAGE_DIR "DarkStyleGreyArrowButton.png" );
+const char* NEXT_BUTTON_DISABLED_IMAGE( DEMO_IMAGE_DIR "DarkStyleDisabledArrowButton.png" );
+const char* OK_IMAGE_IMAGE( DEMO_IMAGE_DIR "FontStyleButton_OK_02.png" );
+const char* LOADING_IMAGE( DEMO_IMAGE_DIR "animatedLoading.gif" );
+
+const char* IMAGE_PATH[] = {
+    DEMO_IMAGE_DIR "gallery-small-23.jpg",
+    DEMO_IMAGE_DIR "woodEffect.jpg",
+    DEMO_IMAGE_DIR "heartsframe.9.png",
+    DEMO_IMAGE_DIR "keyboard-Landscape.jpg",
+    DEMO_IMAGE_DIR "keyboard-LandscapeCopy.jpg",
+};
+
+/**
+ * Enums that refer to the row in the main table view.
+ * Aids in placement of content so easy to see which type of content belongs to each row.
+ */
+enum TableRowPlacement
+{
+  TITLE,
+  INSTRUCTIONS,
+  IMAGE,
+  NEXT_BUTTON,
+  LOADING_STATUS,
+  NUMBER_OF_ROWS
+};
+
+}  // namespace
+
+/**
+ * Examples showing the various polices of ImageVisual in use.
+ * image release polcy, image loading policy and exif data are currently demonstrated.
+ * Large images are used to cause loading time to be long enough to show differences.
+ * If hardware causes loading time improve then remote images or larger images may be required in future.
+ */
+class ImagePolicies: public ConnectionTracker
+{
+ public:
+
+  /**
+   * Constructor
+   */
+  ImagePolicies( Application& application )
+    : mApplication( application ),
+      mExampleIndex( 0 )
+  {
+    // Connect to the Application's Init signal
+    mApplication.InitSignal().Connect( this, &ImagePolicies::Create );
+  }
+
+  /**
+   * To prevent the next button being pressed before an Image has loaded the Button can br disabled.
+   * This function allows the control (Image view in this case) to attached to the Image loading signal
+   * and re-enable the button after Image has loaded.
+   */
+  void ResourceReadySignal( Control control )
+  {
+    mNextButton.SetProperty( Button::Property::DISABLED, false );
+  }
+
+  /**
+   * Helper function to create ImageViews used by this example, preventing the duplication of code.
+   * param[in] correctionEnabled  Set true if Exif orientation correction should be applied.
+   * param[in] loadPolicy Which LoadPolicy to use.
+   * param[in] releasePolicy Which ReleasePolicy to use
+   * param[in] synchronousLoading If the Image should be loaded synchronously
+   * param[in] imageFilenameId Which image to load, referring to the array of filenames for this example.
+   */
+  ImageView CreateImageView( bool correctionEnabled, DevelImageVisual::LoadPolicy::Type loadPolicy, DevelImageVisual::ReleasePolicy::Type releasePolicy, bool synchronousLoading, unsigned int imageFilenameId )
+  {
+    ImageView imageView = ImageView::New( );
+    Property::Map imagePropertyMap;
+    imagePropertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
+    imagePropertyMap.Insert( ImageVisual::Property::URL,  IMAGE_PATH[imageFilenameId ]  );
+    imagePropertyMap.Insert( DevelImageVisual::Property::ORIENTATION_CORRECTION, correctionEnabled  );
+    imagePropertyMap.Insert( DevelImageVisual::Property::LOAD_POLICY,  loadPolicy  );
+    imagePropertyMap.Insert( DevelImageVisual::Property::RELEASE_POLICY,  releasePolicy  );
+    if( synchronousLoading )
+    {
+      imagePropertyMap.Insert( DevelImageVisual::Property::SYNCHRONOUS_LOADING,  true  );
+    }
+    imageView.SetProperty(ImageView::Property::IMAGE , imagePropertyMap );
+
+    imageView.SetParentOrigin( ParentOrigin::CENTER );
+    imageView.SetAnchorPoint( AnchorPoint::CENTER );
+    imageView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+
+    return imageView;
+  }
+
+  /**
+   * To prevent the next button being pressed before an Image has loaded the Button can br disabled.
+   * This function will disable the next button.
+   * Connecting to the ResourceReady signal with ( ResourceReadySignal( Control control ) ) will allow enabling of the button again.
+   */
+
+  void DisableButtonWhilstLoading()
+  {
+    mNextButton.SetProperty( Button::Property::DISABLED, true );
+  }
+
+  /**
+   * Example shows loading an Image with exif orientation data but not applying automatic orientation correction
+   */
+  void OrientationCorrectionExampleNoCorrection()
+  {
+
+    mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT,  "Orientation Correction" );
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Orientation Correction not applied");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    DisableButtonWhilstLoading();
+    ImageView imageView01 = CreateImageView( false, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    mTable.AddChild( imageView01, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+  }
+
+  /**
+   * Example shows loading an Image with exif orientation data and automatically correcting the orientation to match the exif data.
+   */
+  void OrientationCorrectionExampleWithCorrection()
+  {
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Orientation Correction applied based on Exif data, now shown in landscape");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    DisableButtonWhilstLoading();
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+    mTable.AddChild( imageView01, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+  }
+
+  /**
+   * Part One of the Immediate loading example, displays instructions on what will be shown and starts loading of the Immediate image before it
+   * is staged.
+   */
+  void LoadPolicyImmediateExampleInstructions()
+  {
+    mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT,  "Immediate Loading Policy");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Loading Image before staging, press next to see it in right column");
+    TableView dualImageViewTable = TableView::New( 1, 2 );
+    dualImageViewTable.SetAnchorPoint( AnchorPoint::CENTER );
+    dualImageViewTable.SetName("dualTable");
+    dualImageViewTable.SetParentOrigin( ParentOrigin::CENTER );
+    dualImageViewTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    dualImageViewTable.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+    TextLabel attached = TextLabel::New("ATTACHED loaded image \nWill appear here");
+    attached.SetProperty( TextLabel::Property::MULTI_LINE, true );
+    TextLabel immediate = TextLabel::New("IMMEDIATE loaded image \nWill appear here");
+    immediate.SetProperty( TextLabel::Property::MULTI_LINE, true );
+
+    dualImageViewTable.AddChild( attached, TableView::CellPosition( 0, 0 ) );
+    dualImageViewTable.AddChild( immediate, TableView::CellPosition( 0, 1 ) );
+    mTable.AddChild( dualImageViewTable, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    mPersistantImageView = CreateImageView( true, DevelImageVisual::LoadPolicy::IMMEDIATE, DevelImageVisual::ReleasePolicy::DESTROYED, false, 4 );
+  }
+
+  /**
+   * Part Two of the Immediate loading example and here the Image is staged, shown to be instant (if previously step gave enough time to load).
+   */
+  void LoadPolicyImmediateExample()
+  {
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Immediate loading policy on only second column hence image load was almost instant.");
+    DisableButtonWhilstLoading();
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    TableView dualImageViewTable = TableView::New( 2, 2 );
+    dualImageViewTable.SetAnchorPoint( AnchorPoint::CENTER );
+    dualImageViewTable.SetName("dualTable");
+    dualImageViewTable.SetParentOrigin( ParentOrigin::CENTER );
+    dualImageViewTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    dualImageViewTable.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+
+    TextLabel attached = TextLabel::New("ATTACHED");
+    TextLabel immediate = TextLabel::New("IMMEDIATE");
+    dualImageViewTable.AddChild( attached, TableView::CellPosition( 1, 0 ) );
+    dualImageViewTable.AddChild( immediate, TableView::CellPosition( 1, 1 ) );
+    dualImageViewTable.SetFitHeight( 1 );
+
+    mTable.AddChild( dualImageViewTable, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    ImageView imageView02 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView02.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+    dualImageViewTable.AddChild( imageView02, TableView::CellPosition( 0, 0 ) );
+    dualImageViewTable.AddChild( mPersistantImageView, TableView::CellPosition( 0, 1 ) );
+  }
+
+  /**
+   * Part one of an example of loading time when an Image is destroyed with the ReleasePolicy DESTROYED.
+   */
+  void LoadPolicyDestroyedExample()
+  {
+    mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, "Release Policy DESTROYED");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    mPersistantImageView.Reset();
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "ReleasePolicy::DESTROYED shown in first column, press next to destroy it.");
+    DisableButtonWhilstLoading();
+    TableView dualImageViewTable = TableView::New( 1, 2 );
+    dualImageViewTable.SetAnchorPoint( AnchorPoint::CENTER );
+    dualImageViewTable.SetParentOrigin( ParentOrigin::CENTER );
+    dualImageViewTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    dualImageViewTable.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+
+    mTable.AddChild( dualImageViewTable, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    dualImageViewTable.AddChild( imageView01, TableView::CellPosition( 0, 0 ) );
+  }
+
+  /**
+   * Part two of the Destroyed example, the image is staged again but to the second column, it shows the loading takes the same amount of time as
+   * when first loaded.
+   */
+  void LoadPolicyDestroyedExample02()
+  {
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Destroyed first image and reloaded in second column (loading took some time)");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    DisableButtonWhilstLoading();
+    TableView dualImageViewTable = TableView::New( 1, 2 );
+    dualImageViewTable.SetAnchorPoint( AnchorPoint::CENTER );
+    dualImageViewTable.SetParentOrigin( ParentOrigin::CENTER );
+    dualImageViewTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    dualImageViewTable.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+
+    mTable.AddChild( dualImageViewTable, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    dualImageViewTable.AddChild( imageView01, TableView::CellPosition( 0, 1 ) );
+  }
+
+  /**
+   * Part one the second Release policy example showing detachment of a visual with the Destroyed policy and loading instantly when re-used.
+   */
+  void ReleasePolicyDestroyedExample03()
+  {
+    mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, "Detaching with DESTROYED Policy");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Image with ReleasePolicy::DESTROYED shown in first column, Image will be detached, reusing it will be fast");
+    DisableButtonWhilstLoading();
+    TableView dualImageViewTable = TableView::New( 1, 2 );
+    dualImageViewTable.SetAnchorPoint( AnchorPoint::CENTER );
+    dualImageViewTable.SetParentOrigin( ParentOrigin::CENTER );
+    dualImageViewTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    dualImageViewTable.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+
+    mTable.AddChild( dualImageViewTable, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    dualImageViewTable.AddChild( imageView01, TableView::CellPosition( 0, 0 ) );
+  }
+
+  /**
+   * Second part of the second Release policy example, the detached visual is used again in the second column and shown nearly instantly.
+   */
+  void ReleasePolicyDestroyedExample04()
+  {
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Detached first image and reloaded in second column, loading should have seemed instant");
+    DisableButtonWhilstLoading();
+    TableView dualImageViewTable = TableView::DownCast( mTable.GetChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) ) );
+    ImageView imageViewDetached = ImageView::DownCast( dualImageViewTable.GetChildAt( TableView::CellPosition( 0, 0 ) ) );
+    dualImageViewTable.RemoveChildAt( TableView::CellPosition( 0, 0 ) );
+
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    dualImageViewTable.AddChild( imageView01, TableView::CellPosition( 0, 1 ) );
+  }
+
+  /**
+   * Part one of an example of loading time when an Image is detached with the ReleasePolicy Detached.
+   */
+  void ReleasePolicyDestroyedExample05()
+  {
+    mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, "Detaching with DETACHED Policy");
+    mTable.RemoveChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Image with ReleasePolicy::DETACHED shown in first column, will be detached and reloaded");
+    DisableButtonWhilstLoading();
+    TableView dualImageViewTable = TableView::New( 1, 2 );
+    dualImageViewTable.SetAnchorPoint( AnchorPoint::CENTER );
+    dualImageViewTable.SetParentOrigin( ParentOrigin::CENTER );
+    dualImageViewTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    dualImageViewTable.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+
+    mTable.AddChild( dualImageViewTable, TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) );
+
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DETACHED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    dualImageViewTable.AddChild( imageView01, TableView::CellPosition( 0, 0 ) );
+  }
+
+  /**
+   * Part two of the Detached example, the image is staged again but to the second column, it shows the loading takes the same amount of time as
+   * when first loaded.
+   */
+  void ReleasePolicyDestroyedExample06()
+  {
+    mInstructions.SetProperty( TextLabel::Property::TEXT, "Detached first image and reloaded in second column, loading took some time");
+    DisableButtonWhilstLoading();
+    TableView dualImageViewTable = TableView::DownCast( mTable.GetChildAt( TableView::CellPosition( TableRowPlacement::IMAGE, 0 ) ) );
+    ImageView imageViewDetached = ImageView::DownCast( dualImageViewTable.GetChildAt( TableView::CellPosition( 0, 0 ) ) );
+    dualImageViewTable.RemoveChildAt( TableView::CellPosition( 0, 0 ) );
+
+    ImageView imageView01 = CreateImageView( true, DevelImageVisual::LoadPolicy::ATTACHED, DevelImageVisual::ReleasePolicy::DESTROYED, false, 3 );
+    imageView01.ResourceReadySignal().Connect( this, &ImagePolicies::ResourceReadySignal );
+
+    dualImageViewTable.AddChild( imageView01, TableView::CellPosition( 0, 1 ) );
+  }
+
+  /**
+   * Created a gradient property map that will produce a Gradient Visual
+   * param[out] gradientMap the output property map
+   */
+  void CreateGradient( Property::Map& gradientMap )
+  {
+    gradientMap.Insert( Toolkit::Visual::Property::TYPE,  Visual::GRADIENT );
+
+    Property::Array stopOffsets;
+    stopOffsets.PushBack( 0.0f );
+    stopOffsets.PushBack( 0.6f );
+    stopOffsets.PushBack( 1.0f );
+    gradientMap.Insert( GradientVisual::Property::STOP_OFFSET, stopOffsets );
+
+    Property::Array stopColors;
+    stopColors.PushBack( Vector4( 54.f, 140.f, 207.f, 223.f )/255.f );
+    stopColors.PushBack( Vector4( 54.f, 170.f, 207.f, 123.f )/255.f );
+    stopColors.PushBack( Vector4( 54.f, 189.f, 207.f, 123.f )/255.f );
+    gradientMap.Insert( GradientVisual::Property::STOP_COLOR, stopColors );
+
+    gradientMap.Insert( GradientVisual::Property::START_POSITION, Vector2(  0.5f,  0.5f ) );
+    gradientMap.Insert( GradientVisual::Property::END_POSITION,  Vector2( -0.5f, -0.5f ) );
+  }
+
+  /**
+   * Start of this example, called once when the application is initiated
+   */
+  void Create( Application& application )
+  {
+    Property::Map gradientBackground;
+    CreateGradient( gradientBackground );
+
+    // Get a handle to the stage
+    Stage stage = Stage::GetCurrent();
+
+    // Create default View.
+    Toolkit::Control view = Toolkit::Control::New();
+    view.SetAnchorPoint( Dali::AnchorPoint::CENTER );
+    view.SetParentOrigin( Dali::ParentOrigin::CENTER );
+    view.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
+    view.SetProperty( Toolkit::Control::Property::BACKGROUND , gradientBackground );
+    stage.Add( view );
+
+    // Create a table view to show a pair of buttons above each image.
+    mTable = TableView::New( TableRowPlacement::NUMBER_OF_ROWS, 1 );
+    mTable.SetAnchorPoint( AnchorPoint::CENTER );
+    mTable.SetParentOrigin( ParentOrigin::CENTER );
+    mTable.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    Vector3 offset( 0.9f, 0.90f, 0.0f );
+    mTable.SetSizeModeFactor( offset );
+    mTable.SetFitHeight( TableRowPlacement::NEXT_BUTTON );
+    mTable.SetFitHeight( TableRowPlacement::LOADING_STATUS );
+    view.Add( mTable );
+
+    // Create Next button
+    mNextButton = PushButton::New();
+    Property::Map imagePropertyMap;
+    imagePropertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
+    imagePropertyMap.Insert( ImageVisual::Property::URL, NEXT_BUTTON_IMAGE );
+    mNextButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, imagePropertyMap );
+    imagePropertyMap.Clear();
+    imagePropertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
+    imagePropertyMap.Insert( ImageVisual::Property::URL, NEXT_BUTTON_PRESSED_IMAGE );
+    mNextButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, imagePropertyMap );
+    mNextButton.SetProperty( DevelButton::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, LOADING_IMAGE );
+    mNextButton.SetProperty( DevelButton::Property::DISABLED_SELECTED_BACKGROUND_VISUAL, NEXT_BUTTON_DISABLED_IMAGE );
+    mNextButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+    mNextButton.SetY( -50.0f );
+    mNextButton.SetSize( 100.0f, 100.0f );
+    mNextButton.ClickedSignal().Connect( this, &ImagePolicies::ChangeImageClicked );
+    mTable.AddChild( mNextButton, TableView::CellPosition( TableRowPlacement::NEXT_BUTTON, 0 ) );
+    mTable.SetCellPadding( Vector2( 2.0f, 2.0f ) );
+
+    Stage::GetCurrent().KeyEventSignal().Connect(this, &ImagePolicies::OnKeyEvent);
+
+    // Outline Map for Labels
+    Property::Map outlineMap;
+    outlineMap["color"] = Color::BLACK;
+    outlineMap["width"] = 1.0f;
+
+    // Create Title Label
+    mTitle  = TextLabel::New("Image Polices");
+    mTitle.SetProperty( TextLabel::Property::TEXT_COLOR, Color::CYAN );
+    mTable.AddChild( mTitle, TableView::CellPosition( TableRowPlacement::TITLE, 0 ) );
+    mTable.SetFitHeight( TableRowPlacement::TITLE );
+
+    // Create Instructions label
+    mInstructions = TextLabel::New("This is an explaination of each example");
+    mInstructions.SetProperty( TextLabel::Property::MULTI_LINE, true );
+    mInstructions.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE );
+    mInstructions.SetProperty( TextLabel::Property::OUTLINE, outlineMap );
+    mInstructions.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    mTable.AddChild( mInstructions, TableView::CellPosition( TableRowPlacement::INSTRUCTIONS, 0 ) );
+    float value = mInstructions.GetProperty<float>( TextLabel::Property::PIXEL_SIZE );
+    mTable.SetFixedHeight( TableRowPlacement::INSTRUCTIONS, value * 5 ); // Space allocated for example instructions
+
+    ChangeImageClicked( mNextButton );  // Start examples ( 0 )
+  }
+
+private:
+
+  /**
+   * Callback to the button clicked signal and starts the next example.
+   */
+  bool ChangeImageClicked( Button button )
+  {
+    switch ( mExampleIndex++ )
+    {
+      case 0 :
+      {
+        OrientationCorrectionExampleNoCorrection();
+        break;
+      }
+      case 1 :
+      {
+        OrientationCorrectionExampleWithCorrection();
+        break;
+      }
+      case 2 :
+      {
+        LoadPolicyImmediateExampleInstructions();
+        break;
+      }
+      case 3 :
+      {
+        LoadPolicyImmediateExample();
+        break;
+      }
+      case 4 :
+      {
+        LoadPolicyDestroyedExample();
+        break;
+      }
+      case 5 :
+      {
+        LoadPolicyDestroyedExample02();
+        break;
+      }
+      case 6 :
+      {
+        ReleasePolicyDestroyedExample03();
+        break;
+      }
+      case 7 :
+      {
+        ReleasePolicyDestroyedExample04();
+        break;
+      }
+      case 8 :
+      {
+        ReleasePolicyDestroyedExample05();
+        break;
+      }
+      case 9 :
+      {
+        ReleasePolicyDestroyedExample06();
+        // Change Next button to complete button ( will quit app once pressed )
+        button.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, OK_IMAGE_IMAGE );
+        button.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, OK_IMAGE_IMAGE );
+        break;
+      }
+      default:
+      {
+        mApplication.Quit();
+        break;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Main key event handler
+   */
+  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;
+
+  TableView    mTable;
+  TextLabel    mInstructions;
+  TextLabel    mTitle;
+  PushButton   mNextButton;
+  ImageView    mPersistantImageView;
+
+  unsigned int mExampleIndex;
+};
+
+int DALI_EXPORT_API main( int argc, char **argv )
+{
+  Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
+  ImagePolicies test( application );
+  application.MainLoop();
+  return 0;
+}
index c6941b4..cdd8ee6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
 #include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
-#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 #include "shared/view.h"
 #include <iostream>
 
@@ -724,19 +723,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  ImageScalingAndFilteringController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ImageScalingAndFilteringController test( application );
+  application.MainLoop();
   return 0;
 }
index 69f5931..0ef5961 100644 (file)
@@ -477,7 +477,7 @@ public:
       image.SetPosition( Vector3( imagePosition.x, imagePosition.y, 0 ) );
       image.SetSize( imageSize );
       image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage );
-      Toolkit::DevelControl::ResourceReadySignal( image).Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal);
+      image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal );
       mFittingModes[image.GetId()] = fittingMode;
       mResourceUrls[image.GetId()] = imageSource.configuration.path;
       mSizes[image.GetId()] = imageSize;
@@ -644,19 +644,10 @@ private:
   unsigned int mImagesLoaded;         ///< How many images have been loaded
 };
 
-void RunTest( Application& application )
-{
-  ImageScalingIrregularGridController test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ImageScalingIrregularGridController test( application );
+  application.MainLoop();
   return 0;
 }
index 3a4ce7f..011e7c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -117,20 +117,10 @@ private:
   unsigned int mIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewAlphaBlendApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewAlphaBlendApp test( application );
+  application.MainLoop();
   return 0;
 }
index 362ced1..2fc7caf 100644 (file)
@@ -234,20 +234,10 @@ private:
   unsigned int mIndex;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewPixelAreaApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewPixelAreaApp test( application );
+  application.MainLoop();
   return 0;
 }
index a264ca5..62cde6e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -123,8 +123,8 @@ public:
     mPinchGestureDetector.Attach( mStageBackground);
     mPinchGestureDetector.DetectedSignal().Connect(this, &ImageSvgController::OnPinch);
 
-    DevelActor::RaiseToTop(changeButton);
-    DevelActor::RaiseToTop(resetButton);
+    changeButton.RaiseToTop();
+    resetButton.RaiseToTop();
   }
 
   // Callback of push button, for changing image set
@@ -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
new file mode 100644 (file)
index 0000000..ce98781
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+ * 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 <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
+
+#include "shared/view.h"
+
+using namespace Dali;
+
+namespace
+{
+const char* BIG_TEST_IMAGE( DEMO_IMAGE_DIR "book-landscape-cover.jpg" );
+
+const char * const APPLICATION_TITLE( "Image View URL" );
+const char * const TOOLBAR_IMAGE( DEMO_IMAGE_DIR "top-bar.png" );
+const char * const BUTTON_ICON( DEMO_IMAGE_DIR "icon-change.png" );
+const char * const BUTTON_ICON_SELECTED( DEMO_IMAGE_DIR "icon-change-selected.png" );
+
+const char* FILTER_FRAGMENT_SOURCE =
+{
+ "precision highp float;\n"
+ "varying mediump vec2 vTexCoord;\n"
+ "uniform sampler2D sTexture;\n"
+ "uniform mediump float uDelta;\n"
+ "void main()\n"
+ "{\n"
+ "  vec4 color = vec4(0.0);\n"
+ "  vec2 texCoord = vTexCoord * 2. - 1.;\n"
+ "  mat2 rotation = mat2(cos(uDelta), -sin(uDelta), sin(uDelta), cos(uDelta));"
+ "  texCoord = (rotation * texCoord) * .5 + .5;\n"
+ "  color += texture2D( sTexture, texCoord );\n"
+ "  gl_FragColor = color;\n"
+ "}\n"
+};
+
+const char* DELTA_UNIFORM_NAME = "uDelta";
+
+const Vector2 TARGET_SIZE(800.f, 800.f);
+}
+
+class ImageViewUrlApp : public ConnectionTracker
+{
+public:
+  ImageViewUrlApp( Application& application )
+  : mApplication( application )
+  {
+    // Connect to the Application's Init signal
+    mApplication.InitSignal().Connect( this, &ImageViewUrlApp::Create );
+  }
+
+  ~ImageViewUrlApp() = default;
+
+private:
+  // The Init signal is received once (only) during the Application lifetime
+  void Create( Application& application )
+  {
+    // Get a handle to the stage
+    Stage stage = Stage::GetCurrent();
+    stage.KeyEventSignal().Connect(this, &ImageViewUrlApp::OnKeyEvent);
+
+    Toolkit::ToolBar toolBar;
+    Toolkit::Control background;
+    // Creates a default view with a default tool bar.
+    mContent = DemoHelper::CreateView( application,
+                                            background,
+                                            toolBar,
+                                            "",
+                                            TOOLBAR_IMAGE,
+                                            APPLICATION_TITLE );
+
+    // Add a button to switch the scene. (right of toolbar)
+    Toolkit::PushButton switchButton = Toolkit::PushButton::New();
+    switchButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, BUTTON_ICON );
+    switchButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, BUTTON_ICON_SELECTED );
+    switchButton.ClickedSignal().Connect( this, &ImageViewUrlApp::OnButtonClicked );
+    toolBar.AddControl( switchButton,
+                        DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage,
+                        Toolkit::Alignment::HorizontalRight,
+                        DemoHelper::DEFAULT_MODE_SWITCH_PADDING  );
+
+    CreateRenderTask(  );
+    CreateScene( );
+  }
+
+  void CreateRenderTask()
+  {
+    auto rootActor = Stage::GetCurrent().GetRootLayer();
+
+    auto cameraActor = CameraActor::New(TARGET_SIZE);
+    cameraActor.SetParentOrigin(ParentOrigin::CENTER);
+    cameraActor.SetInvertYAxis(true);
+    rootActor.Add(cameraActor);
+
+    {
+      // create actor to render input with applied shader
+      mActorForInput = Toolkit::ImageView::New(BIG_TEST_IMAGE);
+      mActorForInput.SetParentOrigin(ParentOrigin::CENTER);
+      mActorForInput.SetSize(TARGET_SIZE);
+      Property::Map customShader;
+      customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = FILTER_FRAGMENT_SOURCE;
+      Property::Map visualMap;
+      visualMap.Insert(Toolkit::Visual::Property::SHADER, customShader);
+      mActorForInput.SetProperty(Toolkit::ImageView::Property::IMAGE, visualMap);
+
+      mDeltaPropertyIndex = mActorForInput.RegisterProperty(DELTA_UNIFORM_NAME, 0.f);
+
+      rootActor.Add(mActorForInput);
+
+      RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+      // perform a horizontal blur targeting the internal buffer
+      auto renderTask = taskList.CreateTask();
+      renderTask.SetRefreshRate(RenderTask::REFRESH_ALWAYS);
+      renderTask.SetSourceActor(mActorForInput);
+      renderTask.SetExclusive(true);
+      renderTask.SetInputEnabled(false);
+      renderTask.SetClearColor(Vector4(1.,0.,0.,1.));
+      renderTask.SetClearEnabled(true);
+      renderTask.SetCameraActor(cameraActor);
+
+      mOutputTexture = Texture::New(TextureType::TEXTURE_2D,
+                                    Pixel::RGB888,
+                                    unsigned(TARGET_SIZE.width),
+                                    unsigned(TARGET_SIZE.height));
+      auto framebuffer = FrameBuffer::New(TARGET_SIZE.width, TARGET_SIZE.height, Pixel::RGB888);
+      framebuffer.AttachColorTexture(mOutputTexture);
+
+      renderTask.SetFrameBuffer(framebuffer);
+    }
+    {
+      // animate the shader uniform
+      mAnimation = Animation::New(10.f);
+
+      mActorForInput.SetProperty( mDeltaPropertyIndex, 0.f );
+      mAnimation.AnimateTo( Property( mActorForInput, mDeltaPropertyIndex ), Math::PI * 2.f );
+      mAnimation.SetLooping(true);
+      mAnimation.Play();
+    }
+  }
+
+  void CreateScene( )
+  {
+    auto url = Dali::Toolkit::TextureManager::AddTexture(mOutputTexture);
+    mImageView = Toolkit::ImageView::New(url);
+
+    mImageView.SetParentOrigin(ParentOrigin::CENTER);
+    mImageView.SetAnchorPoint(AnchorPoint::CENTER);
+    mContent.Add(mImageView);
+  }
+
+  bool OnButtonClicked(Toolkit::Button button)
+  {
+    if(mAnimation.GetState() == Animation::State::PLAYING)
+    {
+      mAnimation.Pause();
+    }
+    else
+    {
+      mAnimation.Play();
+    }
+    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;
+  Layer mContent;
+  Toolkit::ImageView mImageView;
+  Animation mAnimation;
+  Actor mActorForInput;
+  Property::Index mDeltaPropertyIndex;
+  Texture mOutputTexture;
+};
+
+int DALI_EXPORT_API main( int argc, char **argv )
+{
+  Application application = Application::New( &argc, &argv );
+  ImageViewUrlApp test( application );
+  application.MainLoop();
+  return 0;
+}
index 3447c84..afb3fe1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,8 @@
 #include "shared/view.h"
 #include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
+#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
 
 using namespace Dali;
 
@@ -143,7 +144,13 @@ class ImageViewController: public ConnectionTracker
       button2.SetName( s );
       mTable.AddChild( button2, Toolkit::TableView::CellPosition( CellPlacement::LOWER_BUTTON, x )  );
 
-      mImageViews[x] = Toolkit::ImageView::New( IMAGE_PATH[ 0 ] );
+      mImageViews[x] = Toolkit::ImageView::New( );
+      Property::Map imagePropertyMap;
+      imagePropertyMap.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::Visual::IMAGE );
+      imagePropertyMap.Insert( Toolkit::ImageVisual::Property::URL,  IMAGE_PATH[ 0 ]  );
+      mImageViews[x].SetProperty(Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
+
+
       mImageViews[x].SetParentOrigin( ParentOrigin::CENTER );
       mImageViews[x].SetAnchorPoint( AnchorPoint::CENTER );
       mImageViews[x].SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -159,6 +166,15 @@ class ImageViewController: public ConnectionTracker
 
 private:
 
+  void ImmediateLoadImage( const char* urlToLoad )
+  {
+    Property::Map imagePropertyMap;
+    imagePropertyMap.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::Visual::IMAGE );
+    imagePropertyMap.Insert( Toolkit::ImageVisual::Property::URL, urlToLoad );
+    Toolkit::Visual::Base visual =  Toolkit::VisualFactory::Get().CreateVisual( imagePropertyMap );
+    visual.Reset();
+  }
+
   bool ToggleImageOnStage( Toolkit::Button button )
   {
     unsigned int buttonIndex = GetButtonIndex( button );
@@ -185,7 +201,10 @@ private:
 
     if (  mImageViews[buttonIndex].OnStage() )
     {
-      mImageViews[buttonIndex].SetImage( IMAGE_PATH[ mImageViewImageIndexStatus[buttonIndex] ] );
+      Property::Map imagePropertyMap;
+      imagePropertyMap.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::Visual::IMAGE );
+      imagePropertyMap.Insert( Toolkit::ImageVisual::Property::URL,  IMAGE_PATH[ mImageViewImageIndexStatus[buttonIndex] ]  );
+      mImageViews[buttonIndex].SetProperty(Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
 
       ++mImageViewImageIndexStatus[buttonIndex];
 
@@ -227,20 +246,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  ImageViewController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ImageViewController test( application );
+  application.MainLoop();
   return 0;
 }
index 9b13be3..d7e7b9b 100644 (file)
@@ -879,7 +879,7 @@ public: // From ItemFactory
     borderActor.SetColorMode( USE_PARENT_COLOR );
 
     Property::Map borderProperty;
-    borderProperty.Insert( Visual::Property::TYPE, Visual::BORDER );
+    borderProperty.Insert( Toolkit::Visual::Property::TYPE, Visual::BORDER );
     borderProperty.Insert( BorderVisual::Property::COLOR, Color::WHITE );
     borderProperty.Insert( BorderVisual::Property::SIZE, ITEM_BORDER_SIZE );
     borderProperty.Insert( BorderVisual::Property::ANTI_ALIASING, true );
@@ -903,7 +903,7 @@ public: // From ItemFactory
     checkbox.SetZ( 0.1f );
 
     Property::Map solidColorProperty;
-    solidColorProperty.Insert( Visual::Property::TYPE, Visual::COLOR );
+    solidColorProperty.Insert( Toolkit::Visual::Property::TYPE, Visual::COLOR );
     solidColorProperty.Insert( ColorVisual::Property::MIX_COLOR, Vector4(0.f, 0.f, 0.f, 0.6f) );
     checkbox.SetProperty( ImageView::Property::IMAGE, solidColorProperty );
 
@@ -994,18 +994,10 @@ private:
   LongPressGestureDetector mLongPressDetector;
 };
 
-void RunTest(Application& app)
-{
-  ItemViewExample test(app);
-
-  app.MainLoop();
-}
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  ItemViewExample test(app);
+  app.MainLoop();
   return 0;
 }
index 922da41..24d1504 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
 // INTERNAL INCLUDES
 #include "shared/view.h"
@@ -246,7 +243,7 @@ public:
 
       radio.SetProperty( Toolkit::Button::Property::LABEL,
                                  Property::Map()
-                                  .Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+                                  .Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
                                   .Add( Toolkit::TextVisual::Property::TEXT, labels[i] )
                                   .Add( Toolkit::TextVisual::Property::TEXT_COLOR, Vector4( 0.8f, 0.8f, 0.8f, 1.0f ) )
                                );
@@ -394,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 (file)
index 21e1ef5..0000000
+++ /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 <dali/dali.h>
-#include <dali-toolkit/dali-toolkit.h>
-#include <dali/devel-api/adaptor-framework/performance-logger.h>
-#include <sstream>
-
-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<bool>();
-    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<bool>();
-    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;
-}
index 2221bf1..d319540 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -402,20 +402,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 7b59146..4fa17bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 // INTERNAL INCLUDES
@@ -349,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 (file)
index 0b94968..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 2016 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 <dali/public-api/rendering/renderer.h>
-#include <dali-toolkit/dali-toolkit.h>
-#include <stdio.h>
-#include <sstream>
-#include <cstring>
-
-// 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<NUMBER_OF_SAMPLES; ++i)
-    {
-      Texture texture = DemoHelper::LoadTexture( IMAGES[i] );
-      TextureSet textureSet = TextureSet::New();
-      textureSet.SetTexture( 0u, texture );
-      if( i==0 ) { firstTextureSet = textureSet; }
-
-      Renderer renderer = Renderer::New( mGeometry, mShader );
-      renderer.SetTextures( textureSet );
-      Actor meshActor = Actor::New();
-      mActors[i] = meshActor;
-      meshActor.AddRenderer( renderer );
-      meshActor.SetSize(175, 175);
-      meshActor.RegisterProperty("index", (int)i);
-
-      renderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 );
-      // Test with actor alpha
-      meshActor.SetParentOrigin( ParentOrigin::CENTER );
-      meshActor.SetAnchorPoint( AnchorPoint::CENTER );
-      meshActor.SetPosition( 40.0f*(i-(NUMBER_OF_SAMPLES*0.5f)), 40.0f*(i-(NUMBER_OF_SAMPLES*0.5f)), i*10 );
-
-      meshActor.SetOpacity( i%2?0.7f:1.0f );
-
-      meshActor.RegisterProperty("uHue", i/(float)NUMBER_OF_SAMPLES);
-
-      meshActor.TouchSignal().Connect(this, &ExampleController::OnTouched);
-      std::ostringstream oss;
-      oss << "Mesh Actor " << i;
-      meshActor.SetName(oss.str());
-      stage.Add( meshActor );
-    }
-
-    mActors[NUMBER_OF_SAMPLES-2].GetRendererAt(0).SetTextures( firstTextureSet );
-
-    stage.GetRootLayer().TouchSignal().Connect(this, &ExampleController::OnStageTouched);
-  }
-
-  void PrintDepths()
-  {
-    switch( mZMode )
-    {
-      case 0:
-      {
-        printf("Children Z ordered back to front\n");
-        break;
-      }
-      case 1:
-      {
-        printf("All children set to same Z=0\n");
-        break;
-      }
-      case 2:
-      {
-        printf("Children Z ordered front to back\n");
-        break;
-      }
-    }
-
-    for( unsigned i=0; i<NUMBER_OF_SAMPLES; ++i)
-    {
-      printf("DepthIndex[%d]=%d\n", i, mDepthIndices[i]);
-    }
-    printf("\n");
-  }
-
-  bool OnTouched( Actor actor, const TouchData& event )
-  {
-    if( event.GetState( 0 ) == PointState::UP )
-    {
-      int index = actor.GetProperty<int>(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;
-}
index 4b9fb23..4a039df 100644 (file)
@@ -1,7 +1,4 @@
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/property-map.h>
-#include <dali-toolkit/devel-api/align-enums.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -312,7 +309,7 @@ public:
     }
 
     Property::Map lightMap;
-    lightMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+    lightMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
     lightMap.Insert( ImageVisual::Property::URL, imageUrl );
     mLightSource.SetProperty( Control::Property::BACKGROUND, Property::Value( lightMap ) );
   }
@@ -322,10 +319,10 @@ public:
   {
     //Create mesh property map
     Property::Map map;
-    map.Insert( Visual::Property::TYPE,  Visual::MESH );
-    map.Insert( DevelVisual::Property::TRANSFORM,
-                Property::Map().Add( DevelVisual::Transform::Property::ORIGIN, Align::CENTER )
-                               .Add( DevelVisual::Transform::Property::ANCHOR_POINT, Align::CENTER ) );
+    map.Insert( Toolkit::Visual::Property::TYPE,  Visual::MESH );
+    map.Insert( Visual::Property::TRANSFORM,
+                Property::Map().Add( Visual::Transform::Property::ORIGIN, Align::CENTER )
+                               .Add( Visual::Transform::Property::ANCHOR_POINT, Align::CENTER ) );
     map.Insert( MeshVisual::Property::OBJECT_URL, MODEL_FILE_TABLE[mModelIndex] );
     map.Insert( MeshVisual::Property::MATERIAL_URL, MATERIAL_FILE_TABLE[mModelIndex] );
     map.Insert( MeshVisual::Property::TEXTURES_PATH, TEXTURES_PATH );
@@ -606,9 +603,7 @@ private:
   bool mLightFront; //Bool for light being in front or behind the models.
 };
 
-// Entry point for Linux & Tizen applications
-//
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
   MeshVisualController test( application );
index 08cb8fa..865c8ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -294,20 +294,10 @@ private:
   bool mScaled;
 };
 
-void RunTest( Application& application )
-{
-  Model3dViewController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  Model3dViewController test( application );
+  application.MainLoop();
   return 0;
 }
index 9c80f5c..cce7410 100644 (file)
@@ -451,20 +451,10 @@ private:
   Animation mRotateAnimation;                   ///< Animation for rotating between landscape and portrait.
 };
 
-void RunTest(Application& app)
-{
-  MotionBlurExampleApp test(app);
-
-  app.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  MotionBlurExampleApp test(app);
+  app.MainLoop();
   return 0;
 }
index b0105de..a059723 100644 (file)
@@ -427,20 +427,10 @@ private:
 
 };
 
-void RunTest(Application& app)
-{
-  MotionStretchExampleApp test(app);
-
-  app.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  MotionStretchExampleApp test(app);
+  app.MainLoop();
   return 0;
 }
index 267452a..d8271eb 100644 (file)
@@ -18,8 +18,6 @@
 // EXTERNAL INCLUDES
 #include <dali/dali.h>
 #include <dali/devel-api/images/native-image-interface-extension.h>
-#include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/rendering/frame-buffer.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <cstring>
 
@@ -434,20 +432,10 @@ private:
   bool mRefreshAlways;
 };
 
-void RunTest( Application& application )
-{
-  NativeImageSourceController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  NativeImageSourceController test( application );
+  application.MainLoop();
   return 0;
 }
index 3bfdda5..6740eee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
  *
  */
 
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 #include "shared/utility.h"
@@ -452,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 );
@@ -482,7 +472,8 @@ int DALI_EXPORT_API main( int argc, char **argv )
     }
   }
 
-  RunTest( application );
+  PerfScroll test( application );
+  application.MainLoop();
 
   return 0;
 }
index 9ea5f47..fe62dcf 100644 (file)
@@ -116,7 +116,7 @@ private:
   void OnTap( Actor actor, const TapGesture& /* tap */ )
   {
     // Raise the actor to the top.
-    DevelActor::RaiseToTop( actor );
+    actor.RaiseToTop();
 
     // Create the animation to rotate and scale our actor.
     Animation animation = Animation::New( 1.0f );
index 86e2d71..7d9fe0b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 // INTERNAL INCLUDES
@@ -228,20 +227,10 @@ private:
   Timer    mChangeImageTimer;
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 49a15c9..cde668c 100644 (file)
@@ -732,19 +732,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  PopupExample test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  PopupExample test( application );
+  application.MainLoop();
   return 0;
 }
index cce4f3c..82772a3 100644 (file)
  */
 
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/property-map.h>
-#include <dali-toolkit/devel-api/align-enums.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/public-api/controls/slider/slider.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -355,11 +351,11 @@ public:
 
     //Visual map for model
     mVisualMap.Clear();
-    mVisualMap[ Visual::Property::TYPE           ] = Visual::PRIMITIVE;
+    mVisualMap[ Toolkit::Visual::Property::TYPE           ] = Visual::PRIMITIVE;
     mVisualMap[ PrimitiveVisual::Property::MIX_COLOR ] = mColor;
-    mVisualMap[ DevelVisual::Property::TRANSFORM ] =
-        Property::Map().Add( DevelVisual::Transform::Property::ORIGIN, Align::CENTER )
-                       .Add( DevelVisual::Transform::Property::ANCHOR_POINT, Align::CENTER );
+    mVisualMap[ Visual::Property::TRANSFORM ] =
+        Property::Map().Add( Visual::Transform::Property::ORIGIN, Align::CENTER )
+                       .Add( Visual::Transform::Property::ANCHOR_POINT, Align::CENTER );
   }
 
   //Sets the 3D model to a sphere and modifies the sliders appropriately.
@@ -710,20 +706,10 @@ private:
   Vector2                   mRotation;              ///< Keeps track of model rotation.
 };
 
-void RunTest( Application& application )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
+  Application application = Application::New( &argc, &argv );
   PrimitiveShapesController test( application );
-
   application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
-int main( int argc, char **argv )
-{
-  Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
   return 0;
 }
index f12fd28..049b559 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
 
 #include "shared/view.h"
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/progress-bar/progress-bar.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
index 3d3b6d6..8748533 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -68,16 +67,16 @@ public:
     mTextLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     mTextLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
     mTextLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
-    mTextLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::BLACK );
+    mTextLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
     stage.Add( mTextLabel );
 
     // Create an animation and animate the text color to red
     Animation animation = Animation::New( COLOR_ANIMATION_DURATION );
-    animation.AnimateTo( Property( mTextLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED );
+    animation.AnimateTo( Property( mTextLabel, TextLabel::Property::TEXT_COLOR ), Color::RED );
     animation.Play();
 
     // Set up a property notification so we are notified when the red component of the text-color reaches 50%
-    PropertyNotification notification = mTextLabel.AddPropertyNotification( DevelTextLabel::Property::TEXT_COLOR_RED, GreaterThanCondition( 0.5f ) );
+    PropertyNotification notification = mTextLabel.AddPropertyNotification( TextLabel::Property::TEXT_COLOR_RED, GreaterThanCondition( 0.5f ) );
     notification.NotifySignal().Connect( this, &PropertyNotificationController::RedComponentNotification );
   }
 
index 4a924a6..6bf0c20 100644 (file)
@@ -211,20 +211,10 @@ private:
   ToolBar mToolBar;
 };
 
-void RunTest( Application& application )
-{
-  RayMarchingExample test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  RayMarchingExample test( application );
+  application.MainLoop();
   return 0;
 }
index 4150ac8..14c4878 100644 (file)
@@ -17,7 +17,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/dali.h>
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 
@@ -589,20 +588,10 @@ private:
 
 /*****************************************************************************/
 
-static void
-RunTest(Application& app)
-{
-  RefractionEffectExample theApp(app);
-  app.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  RefractionEffectExample theApp(app);
+  app.MainLoop();
   return 0;
 }
index 2733d3d..2dbcadb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -208,18 +208,10 @@ private:
 
 };
 
-void RunTest(Application &application)
-{
-  MyTester test(application);
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
 int DALI_EXPORT_API main(int argc, char **argv)
 {
-
   Application application = Application::New(&argc, &argv, "");
-  RunTest(application);
-
+  MyTester test(application);
+  application.MainLoop();
   return 0;
 }
index 55939d5..f3aec24 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -753,29 +753,10 @@ private:
   Actor            mCubes[2];          ///< The cube object containers
 };
 
-
-/**
- * @brief Creates an instance of the example object and runs it.
- * @param[in] application The DALi application object
- */
-void RunExample( Application& application )
-{
-  RendererStencilExample example( application );
-
-  application.MainLoop();
-}
-
-/**
- * @brief Entry point for Linux & Tizen applications
- * @param[in] argc The executables argument count
- * @param[in] argv The executables argument vector
- * @return The executables exit code (0)
- */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunExample( application );
-
+  RendererStencilExample example( application );
+  application.MainLoop();
   return 0;
 }
index aafa991..a5fdcb3 100644 (file)
@@ -409,20 +409,10 @@ private:
   Animation mAnimation;
 };
 
-void RunTest( Application& application )
-{
-  BasicLightController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, BASIC_LIGHT_THEME);
-
-  RunTest( application );
-
+  BasicLightController test( application );
+  application.MainLoop();
   return 0;
 }
index 1c3268d..b54704c 100644 (file)
@@ -19,8 +19,6 @@
 #include "ktx-loader.h"
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/images/pixel-devel.h>
-#include <dali/devel-api/images/pixel-data-devel.h>
 #include <memory.h>
 #include <stdio.h>
 #include <stdint.h>
@@ -49,38 +47,38 @@ struct KtxFileHeader
 /**
  * Convert KTX format to Dali::Pixel::Format
  */
-bool ConvertPixelFormat(const uint32_t ktxPixelFormat, Dali::DevelPixel::Format& format)
+bool ConvertPixelFormat(const uint32_t ktxPixelFormat, Dali::Pixel::Format& format)
 {
   switch( ktxPixelFormat )
   {
     case 0x93B0: // GL_COMPRESSED_RGBA_ASTC_4x4_KHR
     {
-      format = Dali::DevelPixel::COMPRESSED_RGBA_ASTC_4x4_KHR;
+      format = Dali::Pixel::COMPRESSED_RGBA_ASTC_4x4_KHR;
       break;
     }
     case 0x881B:// GL_RGB16F
     {
-      format = Dali::DevelPixel::RGB16F;
+      format = Dali::Pixel::RGB16F;
       break;
     }
     case 0x8815: // GL_RGB32F
     {
-      format = Dali::DevelPixel::RGB32F;
+      format = Dali::Pixel::RGB32F;
       break;
     }
     case 0x8C3A: // GL_R11F_G11F_B10F
     {
-      format = Dali::DevelPixel::RGB32F;
+      format = Dali::Pixel::RGB32F;
       break;
     }
     case 0x8D7C: // GL_RGBA8UI
     {
-      format = Dali::DevelPixel::RGBA8888;
+      format = Dali::Pixel::RGBA8888;
       break;
     }
     case 0x8D7D: // GL_RGB8UI
     {
-      format = Dali::DevelPixel::RGB888;
+      format = Dali::Pixel::RGB888;
       break;
     }
     default:
@@ -162,7 +160,7 @@ bool LoadCubeMapFromKtxFile( const std::string& path, CubeData& cubedata )
     header.pixelHeight = 1u;
   }
 
-  Dali::DevelPixel::Format daliformat = DevelPixel::RGB888;
+  Dali::Pixel::Format daliformat = Pixel::RGB888;
 
   ConvertPixelFormat(header.glInternalFormat, daliformat);
 
@@ -185,7 +183,7 @@ bool LoadCubeMapFromKtxFile( const std::string& path, CubeData& cubedata )
         memcpy(img[face],imgPointer,byteSize);
         imgSize[face] = byteSize;
         imgPointer += byteSize;
-        cubedata.img[face][mipmapLevel] = DevelPixelData::New( img[face], imgSize[face], header.pixelWidth , header.pixelHeight , daliformat, PixelData::FREE );
+        cubedata.img[face][mipmapLevel] = PixelData::New( img[face], imgSize[face], header.pixelWidth , header.pixelHeight , daliformat, PixelData::FREE );
       }
     }
     header.pixelHeight/=2u;
index b461ce4..920a7b8 100644 (file)
@@ -451,20 +451,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  BasicPbrController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv);
-
-  RunTest( application );
-
+  BasicPbrController test( application );
+  application.MainLoop();
   return 0;
 }
index 9d745bd..d8b24d9 100644 (file)
@@ -278,20 +278,10 @@ private:
   Animation mAnimation;
 };
 
-void RunTest( Application& application )
-{
-  DrawCubeController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  DrawCubeController test( application );
+  application.MainLoop();
   return 0;
 }
index d16f8e6..1bbaf84 100644 (file)
@@ -186,20 +186,10 @@ private:
   Actor mActor;
 };
 
-void RunTest( Application& application )
-{
-  DrawLineController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  DrawLineController test( application );
+  application.MainLoop();
   return 0;
 }
index 69d6e46..eb0fb7e 100644 (file)
@@ -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;
 }
index 420ac61..cb8590d 100644 (file)
@@ -484,20 +484,10 @@ private:
   Actor mSkyboxActor;
 };
 
-void RunTest( Application& application )
-{
-  TexturedCubeController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TexturedCubeController test( application );
+  application.MainLoop();
   return 0;
 }
index c2abc59..3434d63 100644 (file)
@@ -297,20 +297,10 @@ private:
   Animation mAnimation;
 };
 
-void RunTest( Application& application )
-{
-  TexturedCubeController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TexturedCubeController test( application );
+  application.MainLoop();
   return 0;
 }
index 00b4ff1..76fae81 100644 (file)
@@ -187,20 +187,10 @@ private:
   Actor mActor;
 };
 
-void RunTest( Application& application )
-{
-  DrawTriangleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  DrawTriangleController test( application );
+  application.MainLoop();
   return 0;
 }
index 6dac9fa..65a8859 100644 (file)
@@ -511,20 +511,10 @@ private:
 
 /*****************************************************************************/
 
-static void
-RunTest(Application& app)
-{
-  TestApp theApp(app);
-  app.MainLoop();
-}
-
-/*****************************************************************************/
-
 int DALI_EXPORT_API main(int argc, char **argv)
 {
   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
-
-  RunTest(app);
-
+  TestApp theApp(app);
+  app.MainLoop();
   return 0;
 }
index 9a2aa51..b297aea 100644 (file)
 
 // EXTERNAL INCLUDES
 
-#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/devel-api/scripting/enum-helper.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 
 using namespace Dali;
index a698f17..2b9d93c 100644 (file)
@@ -19,8 +19,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <cstdio>
index 1011243..4c20557 100644 (file)
@@ -31,7 +31,6 @@ namespace
 const char* SIMPLE_DEMO_THEME( DEMO_STYLE_DIR "simple-example-theme.json" );
 }
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   Application application = Application::New( &argc, &argv, SIMPLE_DEMO_THEME ); // Use the above defined style sheet for this application.
index 4de690c..4856360 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -819,19 +819,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  SizeNegotiationController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  SizeNegotiationController test( application );
+  application.MainLoop();
   return 0;
 }
index 1cc465a..9cb180a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -548,21 +548,11 @@ private:
   std::map< Animation, int > mTapAnimationIndexPair;
 };
 
-void RunTest( Application& application )
-{
-  SparkleEffectExample theApp( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  SparkleEffectExample theApp( application );
+  application.MainLoop();
   return 0;
 }
 
index b0d9dbb..155e145 100644 (file)
 
 #include "image-channel-control-impl.h"
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/type-registry-helper.h>
-#include <dali-toolkit/devel-api/align-enums.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 #include <cstdio>
 
+
 using namespace Dali; // Needed for macros
 
 namespace Demo
@@ -182,12 +180,12 @@ void ImageChannelControl::OnSizeSet( const Vector3& targetSize )
     Vector2 size( targetSize );
     Property::Map transformMap;
     transformMap
-      .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
-      .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
-      .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
-      .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
-      .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) )
-      .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
+      .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
+      .Add( Toolkit::Visual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
+      .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
+      .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
+      .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) )
+      .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) );
 
     mVisual.SetTransformAndSize( transformMap, size );
   }
index cbdecf6..dfd2d11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
 #include "styling-application.h"
 
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   const char* themeName = Demo::StylingApplication::DEMO_THEME_ONE_PATH;
index 2a4d7b6..ff88750 100644 (file)
@@ -25,8 +25,6 @@
 // External includes
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include "image-channel-control.h"
 #include <cstdio>
 #include <sstream>
index 44b08c8..6e25686 100644 (file)
@@ -130,7 +130,7 @@ public:
     // Add border to highlight harder-to-see colors.
     // We use a color rather than border visual as the container will always be behind the button.
     Property::Map colorMap;
-    colorMap.Insert( Visual::Property::TYPE, Visual::COLOR);
+    colorMap.Insert( Toolkit::Visual::Property::TYPE, Visual::COLOR);
     colorMap.Insert( ColorVisual::Property::MIX_COLOR, Color::BLACK );
     mColorContainer.SetProperty( Control::Property::BACKGROUND, colorMap );
 
@@ -276,7 +276,7 @@ public:
   void SetButtonColor( Button& button, const Vector4& color )
   {
     Property::Map colorVisualMap;
-    colorVisualMap.Add( Visual::Property::TYPE, Visual::COLOR )
+    colorVisualMap.Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
                   .Add( ColorVisual::Property::MIX_COLOR, color );
 
     button.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, colorVisualMap );
@@ -295,20 +295,11 @@ private:
   Toolkit::TableView  mButtonContainer;
 };
 
-void RunTest( Application& application )
-{
-  TextEditorExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
   // DALI_DEMO_THEME_PATH not passed to Application so TextEditor example uses default Toolkit style sheet.
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TextEditorExample test( application );
+  application.MainLoop();
   return 0;
 }
index 9462657..9451fdf 100644 (file)
@@ -25,7 +25,6 @@
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
 #include <iostream>
-#include <dali/public-api/events/touch-point.h>
 
 // INTERNAL INCLUDES
 #include "shared/multi-language-strings.h"
@@ -212,20 +211,11 @@ private:
   Popup mPopup;
 };
 
-void RunTest( Application& application )
-{
-  TextFieldExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   // DALI_DEMO_THEME_PATH not passed to Application so TextField example uses default Toolkit style sheet.
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  TextFieldExample test( application );
+  application.MainLoop();
   return 0;
 }
index be78963..1519b87 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -245,19 +245,10 @@ private:
   bool mToggle;
 };
 
-void RunTest( Application& application )
-{
-  TextFontsExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextFontsExample test( application );
+  application.MainLoop();
   return 0;
 }
index 8e13fff..c98e206 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -132,20 +132,10 @@ private:
   float          mLastPoint;
 };
 
-void RunTest( Application& application )
-{
-  EmojiExample test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  EmojiExample test( application );
+  application.MainLoop();
   return 0;
 }
index 8005b58..ba54b57 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -134,19 +134,10 @@ private:
   float          mLastPoint;
 };
 
-void RunTest( Application& application )
-{
-  TextLabelMultiLanguageExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextLabelMultiLanguageExample test( application );
+  application.MainLoop();
   return 0;
 }
index 5952d59..ef80ced 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
 // EXTERNAL INCLUDES
 #include <dali/devel-api/object/handle-devel.h>
 #include <dali/devel-api/actors/actor-devel.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <iostream>
 
@@ -38,6 +38,16 @@ using namespace MultiLanguageStrings;
 namespace
 {
 const char* const BACKGROUND_IMAGE = DEMO_IMAGE_DIR "grab-handle.png";
+const char* const STYLES_IMAGE = DEMO_IMAGE_DIR "FontStyleButton_Main.png";
+const char* const TICK_IMAGE_IMAGE = DEMO_IMAGE_DIR "FontStyleButton_OK_02.png";
+const char* const STYLE_SELECTED_IMAGE = DEMO_IMAGE_DIR "FontStyleButton_OK_03.png";
+
+const char* BUTTON_IMAGES[] =
+{
+  DEMO_IMAGE_DIR "FontStyleButton_Colour.png",
+  DEMO_IMAGE_DIR "FontStyleButton_Outline.png",
+  DEMO_IMAGE_DIR "FontStyleButton_Shadow.png"
+};
 
 const unsigned int KEY_ZERO = 10;
 const unsigned int KEY_ONE = 11;
@@ -70,6 +80,24 @@ const char* V_ALIGNMENT_STRING_TABLE[] =
 
 const unsigned int V_ALIGNMENT_STRING_COUNT = sizeof( V_ALIGNMENT_STRING_TABLE ) / sizeof( V_ALIGNMENT_STRING_TABLE[0u] );
 
+enum StyleType
+{
+  TEXT_COLOR = 0,
+  OUTLINE,
+  SHADOW,
+  NUMBER_OF_STYLES
+};
+
+const Vector4 AVAILABLE_COLORS[] =
+{
+  Color::GREEN,
+  Color::BLUE,
+  Color::RED,
+  Color::CYAN
+};
+
+const unsigned int NUMBER_OF_COLORS = sizeof( AVAILABLE_COLORS ) / sizeof( AVAILABLE_COLORS[0u] );
+
 int ConvertToEven(int value)
 {
   return (value % 2 == 0) ? value : (value + 1);
@@ -101,6 +129,12 @@ struct HSVColorConstraint
   float value;
 };
 
+const float STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE = 0.9f;
+const float BUTTON_SIZE_RATIO_TO_STAGE = 0.1f;
+const float OUTLINE_WIDTH = 2.0f;
+const Vector2 SHADOW_OFFSET = Vector2( 2.0f, 2.0f );
+
+
 } // anonymous namespace
 
 /**
@@ -113,6 +147,9 @@ public:
   TextLabelExample( Application& application )
   : mApplication( application ),
     mLabel(),
+    mShadowActive( false ),
+    mOutlineActive( false ),
+    mSelectedColor(AVAILABLE_COLORS[0]),
     mContainer(),
     mGrabCorner(),
     mBorder(),
@@ -122,6 +159,7 @@ public:
     mAlignment( 0u ),
     mHueAngleIndex( Property::INVALID_INDEX ),
     mOverrideMixColorIndex( Property::INVALID_INDEX )
+
   {
     // Connect to the Application's Init signal
     mApplication.InitSignal().Connect( this, &TextLabelExample::Create );
@@ -140,12 +178,14 @@ public:
     Stage stage = Stage::GetCurrent();
 
     stage.KeyEventSignal().Connect(this, &TextLabelExample::OnKeyEvent);
-    Vector2 stageSize = stage.GetSize();
+    mStageSize = stage.GetSize();
+
+    mButtonSize = Size( mStageSize.height * 0.1, mStageSize.height * 0.1 ); // Button size 1/10 of stage height
 
     mContainer = Control::New();
     mContainer.SetName( "Container" );
     mContainer.SetParentOrigin( ParentOrigin::CENTER );
-    mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f);
+    mLayoutSize = Vector2(mStageSize.width*0.6f, mStageSize.width*0.6f);
     mContainer.SetSize( mLayoutSize );
     mContainer.SetDrawMode( DrawMode::OVERLAY_2D );
     stage.Add( mContainer );
@@ -162,18 +202,27 @@ public:
     mPanGestureDetector.Attach( mGrabCorner );
     mPanGestureDetector.DetectedSignal().Connect( this, &TextLabelExample::OnPan );
 
-    mLabel = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" );
+    mLabel = TextLabel::New( "\xF0\x9F\x98\x89 A Quick Brown Fox Jumps Over The Lazy Dog" );
 
     mLabel.SetName( "TextLabel" );
     mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
     mLabel.SetSize(mLayoutSize);
     mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
-    mLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::GREEN );
-    mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) );
-    mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );
+    mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN );
     mLabel.SetBackgroundColor( Color::WHITE );
     mContainer.Add( mLabel );
 
+    // Create style activate button
+    mStyleMenuButton = PushButton::New();
+    mStyleMenuButton.SetPosition( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE );
+    mStyleMenuButton.SetSize( mButtonSize );
+    mStyleMenuButton.SetProperty( Button::Property::TOGGLABLE, true );
+    mStyleMenuButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, STYLES_IMAGE );
+    mStyleMenuButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, TICK_IMAGE_IMAGE );
+
+    mStyleMenuButton.ClickedSignal().Connect( this, &TextLabelExample::OnStyleButtonClicked );
+    stage.Add( mStyleMenuButton );
+
     // Add a border for the container so you can see the container is being resized while grabbing the handle.
     mBorder = Control::New();
     mBorder.SetAnchorPoint( AnchorPoint::TOP_LEFT );
@@ -181,14 +230,14 @@ public:
     mBorder.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
 
     Dali::Property::Map border;
-    border.Insert( Visual::Property::TYPE,  Visual::BORDER );
+    border.Insert( Toolkit::Visual::Property::TYPE,  Visual::BORDER );
     border.Insert( BorderVisual::Property::COLOR,  Color::WHITE );
     border.Insert( BorderVisual::Property::SIZE,  2.f );
     mBorder.SetProperty( Control::Property::BACKGROUND, border );
     mContainer.Add( mBorder );
     mBorder.SetVisible(false);
 
-    DevelActor::RaiseToTop(mGrabCorner);
+    mGrabCorner.RaiseToTop();
 
     mHueAngleIndex = mLabel.RegisterProperty( "hue", 0.0f );
     Renderer bgRenderer = mLabel.GetRendererAt(0);
@@ -204,9 +253,9 @@ public:
     anim.SetLooping(true);
     anim.Play();
 
-    // Animate the text color 3 times from source color to RED
+    // Animate the text color 3 times from source color to Yellow
     Animation animation = Animation::New( 2.f );
-    animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::YELLOW, AlphaFunction::SIN );
+    animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::YELLOW, AlphaFunction::SIN );
     animation.SetLoopCount( 3 );
     animation.Play();
 
@@ -214,6 +263,139 @@ public:
     std::cout << "Displaying text: \"" << labelText.Get< std::string >() << "\"" << std::endl;
   }
 
+  // Depending on button pressed, apply the style to the text label
+  bool OnStyleSelected( Toolkit::Button button )
+  {
+    if( button == mStyleButtons[ StyleType::TEXT_COLOR ] )
+    {
+      Animation animation = Animation::New( 2.f );
+      animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), mSelectedColor, AlphaFunction::LINEAR );
+      animation.Play();
+    }
+    else if( button == mStyleButtons[ StyleType::OUTLINE ] )
+    {
+      Property::Map outlineMap;
+      float outlineWidth = OUTLINE_WIDTH;
+
+      if( mOutlineActive )
+      {
+        outlineWidth = ( mOutlineColor == mSelectedColor ) ? 0.0f : OUTLINE_WIDTH ;  // toggles outline on/off
+      }
+      mOutlineActive = ( outlineWidth > 0.0f ) ? true : false;
+
+      mOutlineColor = mSelectedColor;
+      outlineMap["color"] = mOutlineColor;
+      outlineMap["width"] = outlineWidth;
+      mLabel.SetProperty( TextLabel::Property::OUTLINE, outlineMap );
+    }
+    else if( button == mStyleButtons[ StyleType::SHADOW ] )
+    {
+      Vector2 shadowOffset( SHADOW_OFFSET ); // Will be set to zeros if color already set
+      Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR  );
+      Vector4 currentShadowColor;
+      value.Get( currentShadowColor );
+
+      if ( mShadowActive )
+      {
+        // toggle shadow off ( zero offset ) if color is already set
+        shadowOffset = ( currentShadowColor == mSelectedColor ) ? Vector2::ZERO : Vector2( SHADOW_OFFSET );
+      }
+
+      mShadowActive = ( shadowOffset == Vector2::ZERO ) ? false : true;
+
+      Property::Map shadowMap;
+      shadowMap.Insert( "offset", shadowOffset );
+      shadowMap.Insert( "color", mSelectedColor );
+      shadowMap.Insert( "blurRadius", 2.0f );
+      mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
+    }
+    return true;
+  }
+
+  bool OnColorSelected( Toolkit::Button button )
+  {
+    for( unsigned int index = 0; index < NUMBER_OF_COLORS; index++)
+    {
+      if ( mColorButtons[index] == button )
+      {
+        mSelectedColor = AVAILABLE_COLORS[ index ];
+        return true;
+      }
+    }
+    return true;
+  }
+
+  void ShowColorButtons()
+  {
+    for( unsigned int index = 0; index < NUMBER_OF_COLORS; index++)
+    {
+      mColorButtons[index] = RadioButton::New();
+      mColorButtons[index].SetPosition( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE - ( mButtonSize.width * (index+1) ) );
+      mColorButtons[index].SetSize( mButtonSize );
+      mColorButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnColorSelected );
+      mColorButtons[index].SetProperty( Button::Property::TOGGLABLE, true );
+      Property::Map propertyMap;
+      propertyMap.Insert(Visual::Property::TYPE,  Visual::COLOR);
+      propertyMap.Insert(ColorVisual::Property::MIX_COLOR, AVAILABLE_COLORS[ index ]);
+      mColorButtons[index].SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, propertyMap );
+      mColorButtons[index].SetProperty( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, propertyMap );
+
+      propertyMap.Insert(Visual::Property::TYPE,  Visual::COLOR);
+      propertyMap.Insert(ColorVisual::Property::MIX_COLOR, AVAILABLE_COLORS[ index ]);
+      mColorButtons[index].SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, propertyMap );
+
+      mColorButtons[index].SetProperty( Toolkit::DevelButton::Property::SELECTED_VISUAL,
+                          Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER )
+                                         .Add( BorderVisual::Property::COLOR, Color::WHITE )
+                                         .Add( BorderVisual::Property::SIZE, 2.0f )
+                                         .Add( BorderVisual::Property::ANTI_ALIASING, true ) );
+
+      Stage::GetCurrent().Add( mColorButtons[index] );
+    }
+  }
+
+
+  void HideColorButtons()
+  {
+    for( unsigned int index = 0; index < NUMBER_OF_COLORS; index++)
+    {
+       UnparentAndReset( mColorButtons[index] );
+    }
+  }
+
+  void HideStyleButtons()
+  {
+    for( unsigned int index = 0; index < NUMBER_OF_STYLES; index++)
+    {
+       UnparentAndReset( mStyleButtons[index] );
+    }
+  }
+
+  bool OnStyleButtonClicked( Toolkit::Button button )
+  {
+    if ( button.GetProperty( Toolkit::Button::Property::SELECTED ).Get<bool>() )
+    {
+      for ( unsigned int index = 0; index < NUMBER_OF_STYLES; index++ )
+      {
+        mStyleButtons[index] = PushButton::New();
+        mStyleButtons[index].SetPosition( mButtonSize.width + ( mButtonSize.width * (index+1) ), mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE );
+        mStyleButtons[index].SetSize( mButtonSize );
+        mStyleButtons[index].SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, BUTTON_IMAGES[ index ] );
+        mStyleButtons[index].SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, STYLE_SELECTED_IMAGE );
+        mStyleButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnStyleSelected );
+        Stage::GetCurrent().Add( mStyleButtons[index] );
+      }
+      ShowColorButtons();
+    }
+    else
+    {
+      // hide menu and colors
+      HideColorButtons();
+      HideStyleButtons();
+    }
+    return true;
+  }
+
   // Resize the text-label with pan gesture
   void OnPan( Actor actor, const PanGesture& gesture )
   {
@@ -240,6 +422,9 @@ public:
     if( mLayoutSize.x >= 2.0f ||
         mLayoutSize.y >= 2.0f )
     {
+      mLayoutSize.x = std::min ( mLayoutSize.x, mStageSize.width );
+      mLayoutSize.y = std::min ( mLayoutSize.y, mStageSize.height*.9f );
+
       // Avoid pixel mis-alignment issue
       Vector2 clampedSize = Vector2( std::max( ConvertToEven( static_cast<int>( mLayoutSize.x )), 2 ),
                                      std::max( ConvertToEven( static_cast<int>( mLayoutSize.y )), 2 ) );
@@ -280,7 +465,7 @@ public:
           case KEY_A: // Animate text colour
           {
             Animation animation = Animation::New( 2.f );
-            animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED, AlphaFunction::SIN );
+            animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::RED, AlphaFunction::SIN );
             animation.SetLoopCount( 3 );
             animation.Play();
             break;
@@ -375,6 +560,14 @@ private:
 
   TextLabel mLabel;
 
+  PushButton mStyleMenuButton;
+  PushButton mStyleButtons[ NUMBER_OF_STYLES ];
+  bool mShadowActive;
+  bool mOutlineActive;
+  Vector4 mSelectedColor;
+  Vector4 mOutlineColor; // Store outline as Vector4 whilst TextLabel Outline Property returns a string when using GetProperty
+  Button mColorButtons[ NUMBER_OF_COLORS ];
+
   Control mContainer;
   Control mGrabCorner;
   Control mBorder;
@@ -383,25 +576,19 @@ private:
 
   Vector2 mLayoutSize;
 
+  Size mStageSize;
+  Size mButtonSize;
+
   unsigned int mLanguageId;
   unsigned int mAlignment;
   Property::Index mHueAngleIndex;
   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
new file mode 100644 (file)
index 0000000..09e6f69
--- /dev/null
@@ -0,0 +1,428 @@
+/*
+ * 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.
+ *
+ */
+
+/**
+ * @file text-memory-profiling-example.cpp
+ * @brief Memory consumption profiling for TextLabel
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+#include <dali-toolkit/devel-api/controls/navigation-view/navigation-view.h>
+
+// INTERNAL INCLUDES
+#include "shared/view.h"
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+namespace
+{
+
+enum TextType
+{
+  SINGLE_COLOR_TEXT,
+  SINGLE_COLOR_TEXT_WITH_STYLE,
+  SINGLE_COLOR_TEXT_WITH_EMOJI,
+  SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI,
+  MULTI_COLOR_TEXT,
+  MULTI_COLOR_TEXT_WITH_STYLE,
+  MULTI_COLOR_TEXT_WITH_EMOJI,
+  MULTI_COLOR_TEXT_WITH_STYLE_EMOJI,
+  NUMBER_OF_TYPES
+};
+
+std::string TEXT_TYPE_STRING[ NUMBER_OF_TYPES ] =
+{
+  "Single color text",
+  "Single color text with style",
+  "Single color text with emoji",
+  "Single color text with style and emoji",
+  "Multi color text",
+  "Multi color text with style",
+  "Multi color text with emoji",
+  "Multi color text with style and emoji"
+};
+
+const int NUMBER_OF_LABELS = 500;
+
+const char* BACKGROUND_IMAGE( "" );
+const char* TOOLBAR_IMAGE( DEMO_IMAGE_DIR "top-bar.png" );
+const char* BACK_IMAGE( DEMO_IMAGE_DIR "icon-change.png" );
+const char* BACK_IMAGE_SELECTED( DEMO_IMAGE_DIR "icon-change-selected.png" );
+const char* INDICATOR_IMAGE( DEMO_IMAGE_DIR "loading.png" );
+
+} // anonymous namespace
+
+/**
+ * @brief The main class of the demo.
+ */
+class TextMemoryProfilingExample : public ConnectionTracker, public Toolkit::ItemFactory
+{
+public:
+
+  TextMemoryProfilingExample( Application& application )
+  : mApplication( application ),
+    mCurrentTextStyle( SINGLE_COLOR_TEXT )
+  {
+    // Connect to the Application's Init signal
+    mApplication.InitSignal().Connect( this, &TextMemoryProfilingExample::Create );
+  }
+
+  ~TextMemoryProfilingExample()
+  {
+    // Nothing to do here.
+  }
+
+  /**
+   * @brief Create a text label in the given type
+   */
+  TextLabel SetupTextLabel( int type )
+  {
+    TextLabel label = TextLabel::New();
+    label.SetAnchorPoint( ParentOrigin::TOP_LEFT );
+    label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+    label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
+    label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f );
+    label.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::YELLOW );
+    label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
+
+    Vector2 stageSize = Stage::GetCurrent().GetSize();
+    label.SetPosition( Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) );
+
+    switch ( type )
+    {
+      case SINGLE_COLOR_TEXT:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+        break;
+      }
+      case SINGLE_COLOR_TEXT_WITH_STYLE:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+        break;
+      }
+      case SINGLE_COLOR_TEXT_WITH_EMOJI:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+        break;
+      }
+      case SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+        break;
+      }
+      case MULTI_COLOR_TEXT:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+        break;
+      }
+      case MULTI_COLOR_TEXT_WITH_STYLE:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+        break;
+      }
+      case MULTI_COLOR_TEXT_WITH_EMOJI:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+        break;
+      }
+      case MULTI_COLOR_TEXT_WITH_STYLE_EMOJI:
+      {
+        label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
+        label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+        break;
+      }
+      default:
+        break;
+    }
+
+    return label;
+  }
+
+  /**
+   * @brief Create the main menu
+   */
+  void CreateMainMenu()
+  {
+    Stage stage = Stage::GetCurrent();
+    Vector2 stageSize = stage.GetSize();
+
+    mTapDetector = TapGestureDetector::New();
+    mTapDetector.DetectedSignal().Connect( this, &TextMemoryProfilingExample::OnTap );
+
+    // Create an item view for the main menu
+    mItemView = ItemView::New( *this );
+
+    mItemView.SetParentOrigin( ParentOrigin::CENTER );
+    mItemView.SetAnchorPoint( AnchorPoint::CENTER );
+
+    mLayout = DefaultItemLayout::New( DefaultItemLayout::LIST );
+    mLayout->SetItemSize( Vector3( stageSize.width, 60.0f, 0.0f ) );
+
+    mItemView.AddLayout( *mLayout );
+
+    // Activate the layout
+    mItemView.ActivateLayout( 0, Vector3( stageSize ), 0.0f );
+  }
+
+  /**
+   * @brief Return the number of items in the main menu
+   */
+  virtual unsigned int GetNumberOfItems()
+  {
+    return NUMBER_OF_TYPES;
+  }
+
+  /**
+   * @brief Create new item for the main menu
+   */
+  virtual Actor NewItem( unsigned int itemId )
+  {
+    TextLabel label = TextLabel::New( TEXT_TYPE_STRING[itemId] );
+    label.SetStyleName( "BuilderLabel" );
+    label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
+
+    // Hook up tap detector
+    mTapDetector.Attach( label );
+
+    return label;
+  }
+
+  /**
+   * @brief Create text labels for memory profiling
+   */
+  void CreateTextLabels( int type )
+  {
+    Stage stage = Stage::GetCurrent();
+
+    // Render tasks may have been setup last load so remove them
+    RenderTaskList taskList = stage.GetRenderTaskList();
+    if( taskList.GetTaskCount() > 1 )
+    {
+      typedef std::vector<RenderTask> Collection;
+      typedef Collection::iterator ColIter;
+      Collection tasks;
+
+      for( unsigned int i = 1; i < taskList.GetTaskCount(); ++i )
+      {
+        tasks.push_back( taskList.GetTask(i) );
+      }
+
+      for( ColIter iter = tasks.begin(); iter != tasks.end(); ++iter )
+      {
+        taskList.RemoveTask(*iter);
+      }
+
+      RenderTask defaultTask = taskList.GetTask( 0 );
+      defaultTask.SetSourceActor( stage.GetRootLayer() );
+      defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
+    }
+
+    // Delete any existing text labels
+    unsigned int numChildren = mLayer.GetChildCount();
+
+    for( unsigned int i = 0; i < numChildren; ++i )
+    {
+      mLayer.Remove( mLayer.GetChildAt( 0 ) );
+    }
+
+    mLayer.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+    mLayer.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+    mLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
+    mLayer.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::HEIGHT );
+    mLayer.SetSizeModeFactor( Vector3( 0.0f, -DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight, 0.0f ) );
+
+    mNavigationView.Push( mLayer );
+
+    // Create new text labels
+    for ( int i = 0; i < NUMBER_OF_LABELS; i++ )
+    {
+      TextLabel label = SetupTextLabel( type );
+      mLayer.Add( label );
+    }
+
+    mTitle.SetProperty( TextLabel::Property::TEXT, "Run memps on target" );
+  }
+
+  /**
+   * @brief One-time setup in response to Application InitSignal.
+   */
+  void Create( Application& application )
+  {
+    Stage stage = Stage::GetCurrent();
+
+    stage.KeyEventSignal().Connect(this, &TextMemoryProfilingExample::OnKeyEvent);
+
+    Layer contents = DemoHelper::CreateView( mApplication,
+                                             mView,
+                                             mToolBar,
+                                             BACKGROUND_IMAGE,
+                                             TOOLBAR_IMAGE,
+                                             "" );
+
+    mTitle = DemoHelper::CreateToolBarLabel( "" );
+    mTitle.SetProperty( TextLabel::Property::TEXT, "Select the type of text" );
+
+    // Add title to the tool bar.
+    mToolBar.AddControl( mTitle, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
+
+    // Create a layer to contain dynamically created text labels
+    mLayer = Layer::New();
+
+    mIndicator = Toolkit::ImageView::New(INDICATOR_IMAGE);
+    mIndicator.SetParentOrigin( ParentOrigin::CENTER );
+    mIndicator.SetAnchorPoint( AnchorPoint::CENTER );
+    mIndicator.SetProperty( Actor::Property::VISIBLE, false );
+
+    // Create a back button in the left of toolbar
+    PushButton backButton = PushButton::New();
+    backButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, BACK_IMAGE );
+    backButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, BACK_IMAGE_SELECTED );
+    backButton.ClickedSignal().Connect( this, &TextMemoryProfilingExample::OnBackButtonPressed );
+    backButton.SetLeaveRequired( true );
+    mToolBar.AddControl( backButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
+
+    // Create a navigation view to navigate different types of text labels
+    mNavigationView = NavigationView::New();
+    mNavigationView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+    mNavigationView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+    mNavigationView.SetBackgroundColor( Color::WHITE );
+    stage.Add( mNavigationView );
+
+    CreateMainMenu();
+    mNavigationView.Push( mItemView );
+
+    mItemView.Add(mIndicator);
+
+    PropertyNotification notification = mIndicator.AddPropertyNotification( Actor::Property::VISIBLE, GreaterThanCondition(0.01f) );
+    notification.NotifySignal().Connect( this, &TextMemoryProfilingExample::OnIndicatorVisible );
+  }
+
+  /**
+   * @brief Main key event handler
+   */
+  void OnKeyEvent( const KeyEvent& event )
+  {
+    if( event.state == KeyEvent::Down )
+    {
+      if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
+      {
+        ReturnToPreviousScreen();
+      }
+    }
+  }
+
+  /**
+   * @brief Tap gesture handler
+   */
+  void OnTap( Actor actor, const TapGesture& tap )
+  {
+    mCurrentTextStyle = mItemView.GetItemId( actor );
+
+    // Show the loading indicator
+    mIndicator.SetProperty( Actor::Property::VISIBLE, true );
+
+    if ( mAnimation )
+    {
+      mAnimation.Clear();
+      mAnimation.Reset();
+    }
+
+    mAnimation = Animation::New( 0.8f );
+    mAnimation.AnimateBy( Property( mIndicator, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(180.0f) ), Vector3::ZAXIS ) );
+    mAnimation.SetLooping( true );
+    mAnimation.Play();
+  }
+
+  /**
+   * @brief Property notification handler
+   */
+  void OnIndicatorVisible( PropertyNotification& source )
+  {
+    CreateTextLabels( mCurrentTextStyle );
+
+    // Hide the loading indicator
+    mAnimation.Stop();
+    mIndicator.SetProperty( Actor::Property::VISIBLE, false );
+  }
+
+  /**
+   * @brief Button signal handler
+   */
+  bool OnBackButtonPressed( Toolkit::Button button )
+  {
+    ReturnToPreviousScreen();
+    return true;
+  }
+
+  /**
+   * @brief Returns to the previous screen
+   */
+  void ReturnToPreviousScreen()
+  {
+    if ( mItemView.OnStage() )
+    {
+      // Quit the application if it is in the main menu
+      mApplication.Quit();
+    }
+    else
+    {
+      // Return to the main menu
+      mNavigationView.Pop();
+
+      mTitle.SetProperty( TextLabel::Property::TEXT, "Select type of text to test" );
+    }
+  }
+
+private:
+
+  Application& mApplication;
+
+  ItemLayoutPtr mLayout;
+  ItemView mItemView;
+  NavigationView mNavigationView;
+
+  Control mView;
+  ToolBar mToolBar;
+  TextLabel mTitle;
+  ImageView mIndicator;
+  Animation mAnimation;
+
+  Layer mLayer;
+
+  TapGestureDetector mTapDetector;
+
+  unsigned int mCurrentTextStyle;
+};
+
+int DALI_EXPORT_API main( int argc, char **argv )
+{
+  Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
+  TextMemoryProfilingExample test( application );
+  application.MainLoop();
+  return 0;
+}
index 560ebe0..85d12db 100644 (file)
@@ -113,7 +113,7 @@ void TextOverlapController::Destroy( Application& app )
 bool TextOverlapController::OnClicked( Button button )
 {
   mTopmostLabel = 1-mTopmostLabel; // toggles between 0 and 1
-  DevelActor::RaiseToTop(mLabels[mTopmostLabel]);
+  mLabels[mTopmostLabel].RaiseToTop();
   return false;
 }
 
@@ -137,8 +137,7 @@ void TextOverlapController::OnKeyEvent( const KeyEvent& keyEvent )
 
 } // namespace Demo
 
-
-int main( int argc, char** argv )
+int DALI_EXPORT_API main( int argc, char** argv )
 {
   {
     Application app = Application::New( &argc, &argv );
index 872f289..6b3f047 100644 (file)
@@ -23,7 +23,6 @@
 // EXTERNAL INCLUDES
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -87,7 +86,7 @@ public:
     parent.Add( box );
 
     Dali::Property::Map border;
-    border.Insert( Visual::Property::TYPE,  Visual::BORDER );
+    border.Insert( Toolkit::Visual::Property::TYPE,  Visual::BORDER );
     border.Insert( BorderVisual::Property::COLOR,  Color::BLUE );
     border.Insert( BorderVisual::Property::SIZE,  1.f );
     box.SetProperty( Control::Property::BACKGROUND, border );
@@ -190,8 +189,8 @@ public:
     Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New();
     scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl );
     CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton );
-    mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
-    mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f );
+    mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
+    mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f );
 
     CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE );
     boxE.SetPosition( 0.0f, -100.0f, 1.0f );
@@ -201,7 +200,7 @@ public:
     mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500);
     mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500);
     mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3);
-    mRtlLongLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
+    mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
 
     mPanGestureDetector = PanGestureDetector::New();
     mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture );
@@ -209,8 +208,8 @@ public:
 
     Toolkit::PushButton colorButton = Toolkit::PushButton::New();
     colorButton.SetProperty( Button::Property::TOGGLABLE, true );
-    colorButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, Property::Map().Add ( Visual::Property::TYPE, Visual::COLOR ).Add( ColorVisual::Property::MIX_COLOR, Color::RED ) );
-    colorButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, Property::Map().Add ( Visual::Property::TYPE, Visual::COLOR ).Add( ColorVisual::Property::MIX_COLOR, Color::BLACK ) );
+    colorButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, Property::Map().Add ( Toolkit::Visual::Property::TYPE, Visual::COLOR ).Add( ColorVisual::Property::MIX_COLOR, Color::RED ) );
+    colorButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, Property::Map().Add ( Toolkit::Visual::Property::TYPE, Visual::COLOR ).Add( ColorVisual::Property::MIX_COLOR, Color::BLACK ) );
     colorButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
     colorButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
     colorButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
@@ -405,19 +404,10 @@ private:
   bool mToggleColor;
 };
 
-void RunTest( Application& application )
-{
-  TextScrollingExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextScrollingExample test( application );
+  application.MainLoop();
   return 0;
 }
index 288e880..a0ca655 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/renderer.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 // INTERNAL INCLUDES
@@ -242,20 +241,10 @@ private:
   Timer    mChangeImageTimer;
 };
 
-void RunTest( Application& application )
-{
-  ExampleController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ExampleController test( application );
+  application.MainLoop();
   return 0;
 }
index 783acbe..dec8078 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -112,8 +112,6 @@ private:
   TextLabel mTextLabel;
 };
 
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
index 3af4e11..885c55e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -97,9 +95,9 @@ private:
     Layout( customFromCode, stageSize );
     customFromCode.SetProperty( DevelControl::Property::TOOLTIP,
                                 Property::Map().Add( Tooltip::Property::CONTENT,
-                                                     Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+                                                     Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
                                                                                            .Add( ImageVisual::Property::URL, DEMO_IMAGE_DIR "Logo-for-demo.png" ) )
-                                                                      .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                                                                      .Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
                                                                                            .Add( TextVisual::Property::TEXT_COLOR, Color::WHITE )
                                                                                            .Add( TextVisual::Property::TEXT, "Custom coded style\nat hover point" )
                                                                                            .Add( TextVisual::Property::MULTI_LINE, true )
@@ -140,7 +138,7 @@ private:
     if( control )
     {
       control.SetProperty( Button::Property::LABEL,
-                           Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                           Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
                                           .Add( TextVisual::Property::TEXT, label ) );
     }
   }
index 135ea16..4273bcc 100644 (file)
 
 #include "shadow-button-impl.h"
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/devel-api/scripting/enum-helper.h>
-#include <dali-toolkit/devel-api/align-enums.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 
 #include <cstdio>
@@ -374,7 +371,7 @@ void ShadowButton::ResetVisual(
     }
 
     // Extract transform maps out of the visual definition and store them
-    Property::Value* value = map->Find( DevelVisual::Property::TRANSFORM, "transform");
+    Property::Value* value = map->Find( Visual::Property::TRANSFORM, "transform");
     if( value )
     {
       Property::Map* transformMap = value->GetMap();
index d3acd98..d2697d5 100644 (file)
@@ -25,8 +25,6 @@
 // External includes
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include "shadow-button.h"
 #include <cstdio>
 #include <sstream>
index 9bf3cd2..0047bfb 100644 (file)
@@ -26,7 +26,6 @@
 #include "transition-application.h"
 
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   const char* themeName = Demo::TransitionApplication::DEMO_THEME_ONE_PATH;
index 894adf1..09f909d 100644 (file)
@@ -352,20 +352,10 @@ private:
   Property::Map mNativeImageTarget;
 };
 
-void RunTest( Application& application )
-{
-  VideoViewController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  VideoViewController test( application );
+  application.MainLoop();
   return 0;
 }
index 54ae6b0..dc88985 100644 (file)
 
 #include "beat-control-impl.h"
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/type-registry-helper.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 using namespace Dali; // Needed for macros
 using namespace Dali::Toolkit;
@@ -212,9 +210,9 @@ void BeatControl::RelayoutVisuals( const Vector2& targetSize )
       Property::Map transformMap;
       // Make the visual half the size of the control, but leave
       // origin and anchor point at center, position is relative, but Zer0
-      transformMap[ DevelVisual::Transform::Property::SIZE ] = mTransformSize;
-      transformMap[ DevelVisual::Transform::Property::ORIGIN ] = mTransformOrigin;
-      transformMap[ DevelVisual::Transform::Property::ANCHOR_POINT ] = mTransformAnchorPoint;
+      transformMap[ Visual::Transform::Property::SIZE ] = mTransformSize;
+      transformMap[ Visual::Transform::Property::ORIGIN ] = mTransformOrigin;
+      transformMap[ Visual::Transform::Property::ANCHOR_POINT ] = mTransformAnchorPoint;
       mVisual.SetTransformAndSize( transformMap, size );
     }
   }
@@ -262,7 +260,7 @@ void BeatControl::SetProperty( BaseObject* object, Property::Index index, const
         Property::Map* map = value.GetMap();
         if( map )
         {
-          Property::Value* value = map->Find( DevelVisual::Property::TRANSFORM, "transform" );
+          Property::Value* value = map->Find( Visual::Property::TRANSFORM, "transform" );
           if( value )
           {
             Property::Map* transformMap = value->GetMap();
@@ -272,14 +270,14 @@ void BeatControl::SetProperty( BaseObject* object, Property::Index index, const
               // If there are more properties in the transform map, then we need to create a new visual
               unsigned int sizeAndPositionPropertyCount = 0;
 
-              Property::Value* sizeValue = transformMap->Find( DevelVisual::Transform::Property::SIZE, "size" );
+              Property::Value* sizeValue = transformMap->Find( Visual::Transform::Property::SIZE, "size" );
               if( sizeValue )
               {
                 sizeValue->Get( impl.mTransformSize );
                 ++sizeAndPositionPropertyCount;
               }
 
-              Property::Value* originValue = transformMap->Find( DevelVisual::Transform::Property::ORIGIN, "origin" );
+              Property::Value* originValue = transformMap->Find( Visual::Transform::Property::ORIGIN, "origin" );
               if( originValue )
               {
                 int intValue = 0;
@@ -290,7 +288,7 @@ void BeatControl::SetProperty( BaseObject* object, Property::Index index, const
                 }
               }
 
-              Property::Value* anchorPointValue = transformMap->Find( DevelVisual::Transform::Property::ANCHOR_POINT, "anchorPoint" );
+              Property::Value* anchorPointValue = transformMap->Find( Visual::Transform::Property::ANCHOR_POINT, "anchorPoint" );
               if( anchorPointValue )
               {
                 int intValue = 0;
index 7e77def..95596a3 100644 (file)
@@ -20,9 +20,9 @@
 #include "beat-control.h"
 #include <dali/public-api/animation/animation.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/devel-api/align-enums.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
 
 namespace Demo
 {
index 87a69d5..5192396 100644 (file)
@@ -24,8 +24,6 @@
 
 // External includes
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include "beat-control.h"
 #include <cstdio>
 #include <sstream>
@@ -101,8 +99,8 @@ void TransitionApplication::Create( Application& application )
   mBeatControl = BeatControl::New();
   mBeatControl.SetName("BeatControl");
   mBeatControl.SetProperty( BeatControl::Property::BEAT_VISUAL, Property::Map()
-                            .Add( DevelVisual::Property::TRANSFORM, Property::Map()
-                                  .Add( DevelVisual::Transform::Property::SIZE, Vector2(0.5f, 0.5f) ) ) );
+                            .Add( Visual::Property::TRANSFORM, Property::Map()
+                                  .Add( Visual::Transform::Property::SIZE, Vector2(0.5f, 0.5f) ) ) );
 
   mBeatControl.SetAnchorPoint( AnchorPoint::CENTER );
   mBeatControl.SetParentOrigin( ParentOrigin::CENTER );
@@ -123,8 +121,8 @@ void TransitionApplication::Create( Application& application )
   {
     Property::Map map;
     CreateVisualMap( i, map );
-    map.Add( DevelVisual::Property::TRANSFORM, Property::Map()
-             .Add( DevelVisual::Transform::Property::SIZE, Vector2(0.8f, 0.8f) )  );
+    map.Add( Visual::Property::TRANSFORM, Property::Map()
+             .Add( Visual::Transform::Property::SIZE, Vector2(0.8f, 0.8f) )  );
     mVisualButtons[i] = BeatControl::New();
     mVisualButtons[i].SetProperty( BeatControl::Property::BEAT_VISUAL, map );
     mVisualButtons[i].SetName("VisualButton");
@@ -176,20 +174,20 @@ void TransitionApplication::CreateVisualMap( int index, Property::Map& map )
   {
     case 0:
     {
-      map[ Visual::Property::TYPE ] = Visual::COLOR;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR;
       map[ ColorVisual::Property::MIX_COLOR ] = Color::YELLOW;
       break;
     }
     case 1:
     {
-      map[ Visual::Property::TYPE ] = Visual::BORDER;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER;
       map[ BorderVisual::Property::COLOR ] = Color::GREEN;
       map[ BorderVisual::Property::SIZE ] = 5;
       break;
     }
     case 2:
     {
-      map[ Visual::Property::TYPE ] = Visual::GRADIENT;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::GRADIENT;
 
       Property::Array stopOffsets;
       stopOffsets.PushBack( 0.0f );
@@ -212,21 +210,21 @@ void TransitionApplication::CreateVisualMap( int index, Property::Map& map )
     }
     case 3:
     {
-      map[ Visual::Property::TYPE ] = Visual::IMAGE;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE;
       map[ ImageVisual::Property::URL ] = DALI_LOGO_PATH;
       break;
     }
     case 4:
     {
-      map[ Visual::Property::TYPE ] = Visual::IMAGE;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE;
       map[ ImageVisual::Property::URL ] = DEMO_IMAGE_DIR "preMultAlpha.png";
-      map[ DevelVisual::Property::PREMULTIPLIED_ALPHA ] = true;
+      map[ Visual::Property::PREMULTIPLIED_ALPHA ] = true;
       break;
     }
 
     case 5:
     {
-      map[ Visual::Property::TYPE ] = Visual::MESH;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::MESH;
       map[ MeshVisual::Property::OBJECT_URL ] = DALI_ROBOT_MODEL_PATH;
       map[ MeshVisual::Property::MATERIAL_URL ] = DALI_ROBOT_MATERIAL_PATH;
       map[ MeshVisual::Property::TEXTURES_PATH ] = DEMO_IMAGE_DIR;
@@ -236,7 +234,7 @@ void TransitionApplication::CreateVisualMap( int index, Property::Map& map )
 
     case 6:
     {
-      map[ Visual::Property::TYPE ] = Visual::PRIMITIVE;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::PRIMITIVE;
 
       map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::BEVELLED_CUBE;
       map[ PrimitiveVisual::Property::BEVEL_PERCENTAGE ] = 0.3f;
@@ -250,21 +248,21 @@ void TransitionApplication::CreateVisualMap( int index, Property::Map& map )
     case 7:
     {
       // NPatch
-      map[ Visual::Property::TYPE ] = Visual::IMAGE;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE;
       map[ ImageVisual::Property::URL ] = DEMO_IMAGE_DIR "button-up-16.9.png";
       break;
     }
     case 8:
     {
       // SVG
-      map[ Visual::Property::TYPE ] = Visual::IMAGE;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE;
       map[ ImageVisual::Property::URL ] = DEMO_IMAGE_DIR "Kid1.svg";
       break;
     }
 
     case 9:
     {
-      map[ Visual::Property::TYPE ] = DevelVisual::TEXT;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::TEXT;
       map[ TextVisual::Property::TEXT ] = "Text";
       map[ TextVisual::Property::TEXT_COLOR ] = Color::CYAN;
       map[ TextVisual::Property::POINT_SIZE ] = 10;
@@ -273,7 +271,7 @@ void TransitionApplication::CreateVisualMap( int index, Property::Map& map )
 
     default:
     {
-      map[ Visual::Property::TYPE ] = Visual::COLOR;
+      map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR;
       map[ ColorVisual::Property::MIX_COLOR ] = Color::MAGENTA;
       break;
     }
@@ -287,8 +285,8 @@ bool TransitionApplication::OnVisualButtonClicked( Actor actor, const TouchData&
     int visual = actor.GetProperty<int>( mVisualIndex );
     Property::Map map;
     CreateVisualMap( visual, map );
-    map.Add( DevelVisual::Property::TRANSFORM, Property::Map()
-             .Add( DevelVisual::Transform::Property::SIZE, Vector2( 0.5f, 0.5f ) ) );
+    map.Add( Visual::Property::TRANSFORM, Property::Map()
+             .Add( Visual::Transform::Property::SIZE, Vector2( 0.5f, 0.5f ) ) );
     mBeatControl.SetProperty( BeatControl::Property::BEAT_VISUAL, map );
   }
   return true;
index adc4563..0047bfb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
 #include "transition-application.h"
 
 
-/// Entry point for applications
 int DALI_EXPORT_API main( int argc, char** argv )
 {
   const char* themeName = Demo::TransitionApplication::DEMO_THEME_ONE_PATH;
index 0e9e86b..5b0b244 100755 (executable)
@@ -2,7 +2,7 @@
 
 Name:       com.samsung.dali-demo
 Summary:    The OpenGLES Canvas Core Demo
-Version:    1.2.56
+Version:    1.2.65
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
diff --git a/resources/images/DarkStyleDisabledArrowButton.png b/resources/images/DarkStyleDisabledArrowButton.png
new file mode 100644 (file)
index 0000000..7d7d271
Binary files /dev/null and b/resources/images/DarkStyleDisabledArrowButton.png differ
diff --git a/resources/images/DarkStyleGreenArrowButton.png b/resources/images/DarkStyleGreenArrowButton.png
new file mode 100755 (executable)
index 0000000..4149109
Binary files /dev/null and b/resources/images/DarkStyleGreenArrowButton.png differ
diff --git a/resources/images/DarkStyleGreyArrowButton.png b/resources/images/DarkStyleGreyArrowButton.png
new file mode 100755 (executable)
index 0000000..204f3ec
Binary files /dev/null and b/resources/images/DarkStyleGreyArrowButton.png differ
diff --git a/resources/images/FontStyleButton_Colour.png b/resources/images/FontStyleButton_Colour.png
new file mode 100755 (executable)
index 0000000..f7f5afc
Binary files /dev/null and b/resources/images/FontStyleButton_Colour.png differ
diff --git a/resources/images/FontStyleButton_Main.png b/resources/images/FontStyleButton_Main.png
new file mode 100755 (executable)
index 0000000..b2b76c8
Binary files /dev/null and b/resources/images/FontStyleButton_Main.png differ
diff --git a/resources/images/FontStyleButton_OK_02.png b/resources/images/FontStyleButton_OK_02.png
new file mode 100755 (executable)
index 0000000..07f2dc7
Binary files /dev/null and b/resources/images/FontStyleButton_OK_02.png differ
diff --git a/resources/images/FontStyleButton_OK_03.png b/resources/images/FontStyleButton_OK_03.png
new file mode 100755 (executable)
index 0000000..d5255e1
Binary files /dev/null and b/resources/images/FontStyleButton_OK_03.png differ
diff --git a/resources/images/FontStyleButton_Outline.png b/resources/images/FontStyleButton_Outline.png
new file mode 100755 (executable)
index 0000000..7f1bfdf
Binary files /dev/null and b/resources/images/FontStyleButton_Outline.png differ
diff --git a/resources/images/FontStyleButton_Shadow.png b/resources/images/FontStyleButton_Shadow.png
new file mode 100755 (executable)
index 0000000..a1defbe
Binary files /dev/null and b/resources/images/FontStyleButton_Shadow.png differ
diff --git a/resources/images/animatedLoading.gif b/resources/images/animatedLoading.gif
new file mode 100644 (file)
index 0000000..48f65ad
Binary files /dev/null and b/resources/images/animatedLoading.gif differ
diff --git a/resources/images/keyboard-Landscape.jpg b/resources/images/keyboard-Landscape.jpg
new file mode 100644 (file)
index 0000000..47e7e3d
Binary files /dev/null and b/resources/images/keyboard-Landscape.jpg differ
diff --git a/resources/images/keyboard-LandscapeCopy.jpg b/resources/images/keyboard-LandscapeCopy.jpg
new file mode 100644 (file)
index 0000000..c90d87d
Binary files /dev/null and b/resources/images/keyboard-LandscapeCopy.jpg differ
diff --git a/resources/images/loading.png b/resources/images/loading.png
new file mode 100644 (file)
index 0000000..d794364
Binary files /dev/null and b/resources/images/loading.png differ
index 7fcdee2..54b478d 100755 (executable)
@@ -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 অনুগামী"
 
index 5c72910..f0aad71 100755 (executable)
@@ -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"
 
index e2447d3..4664da6 100755 (executable)
@@ -49,6 +49,9 @@ msgstr "Flexbox Playground"
 msgid "DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING"
 msgstr "Image Fitting and Sampling"
 
+msgid "DALI_DEMO_STR_TITLE_IMAGE_POLICIES"
+msgstr "Image Policies"
+
 msgid "DALI_DEMO_STR_TITLE_IMAGE_SCALING"
 msgstr "Image Scaling Grid"
 
@@ -73,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"
 
@@ -151,6 +148,9 @@ msgstr "Text Field"
 msgid "DALI_DEMO_STR_TITLE_TEXT_LABEL"
 msgstr "Text Label"
 
+msgid "DALI_DEMO_STR_TITLE_TEXT_MEMORY_PROFILING"
+msgstr "Text Memory Profiling"
+
 msgid "DALI_DEMO_STR_TITLE_TEXT_OVERLAP"
 msgstr "Text Overlap"
 
index fd64d2a..604da3a 100755 (executable)
@@ -46,6 +46,9 @@ msgstr "Emoji Text"
 msgid "DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND"
 msgstr "Flexbox Playground"
 
+msgid "DALI_DEMO_STR_TITLE_IMAGE_POLICIES"
+msgstr "Image Policies"
+
 msgid "DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING"
 msgstr "Image Fitting and Sampling"
 
@@ -64,6 +67,9 @@ msgstr "Image View Pixel Area"
 msgid "DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG"
 msgstr "Image View SVG"
 
+msgid "DALI_DEMO_STR_TITLE_IMAGE_VIEW_URL"
+msgstr "Image View URL"
+
 msgid "DALI_DEMO_STR_TITLE_ITEM_VIEW"
 msgstr "Item View"
 
@@ -73,18 +79,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"
 
@@ -151,6 +151,9 @@ msgstr "Text Field"
 msgid "DALI_DEMO_STR_TITLE_TEXT_LABEL"
 msgstr "Text Label"
 
+msgid "DALI_DEMO_STR_TITLE_TEXT_MEMORY_PROFILING"
+msgstr "Text Memory Profiling"
+
 msgid "DALI_DEMO_STR_TITLE_TEXT_OVERLAP"
 msgstr "Text Overlap"
 
index fb2da25..4d5ae43 100755 (executable)
@@ -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"
 
index 2742866..b56ef25 100755 (executable)
@@ -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"
 
index 2e3fe5c..cece01b 100755 (executable)
@@ -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 "메쉬 비주얼"
 
index 5b8dd41..a1f7e83 100755 (executable)
@@ -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 മോഡലിങ്"
 
index aa864e5..c3c76ad 100755 (executable)
@@ -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 میش"
 
index c889949..f5aafe8 100755 (executable)
@@ -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模型"
 
index e95d469..b73ac73 100644 (file)
@@ -50,19 +50,19 @@ extern "C"
 #define DALI_DEMO_STR_TITLE_FPP_GAME                    dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FPP_GAME")
 #define DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND          dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND")
 #define DALI_DEMO_STR_TITLE_FOCUS_INTEGRATION           dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FOCUS_INTEGRATION")
+#define DALI_DEMO_STR_TITLE_IMAGE_POLICIES              dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_POLICIES")
 #define DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING      dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING")
 #define DALI_DEMO_STR_TITLE_IMAGE_SCALING               dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_SCALING")
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW                  dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_VIEW")
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW_ALPHA_BLENDING   dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_VIEW_ALPHA_BLENDING")
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW_PIXEL_AREA       dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_VIEW_PIXEL_AREA")
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG              dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG")
+#define DALI_DEMO_STR_TITLE_IMAGE_VIEW_URL              dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_VIEW_URL")
 #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")
@@ -93,6 +93,7 @@ extern "C"
 #define DALI_DEMO_STR_TITLE_TEXT_EDITOR                 dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_EDITOR")
 #define DALI_DEMO_STR_TITLE_TEXT_FIELD                  dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_FIELD")
 #define DALI_DEMO_STR_TITLE_TEXT_LABEL                  dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_LABEL")
+#define DALI_DEMO_STR_TITLE_TEXT_MEMORY_PROFILING       dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_MEMORY_PROFILING")
 #define DALI_DEMO_STR_TITLE_TEXT_OVERLAP                dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_OVERLAP")
 #define DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE   dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE")
 #define DALI_DEMO_STR_TITLE_TEXT_SCROLLING              dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_SCROLLING")
@@ -120,19 +121,19 @@ extern "C"
 #define DALI_DEMO_STR_TITLE_FPP_GAME                    "First Person Game"
 #define DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND          "Flexbox Playground"
 #define DALI_DEMO_STR_TITLE_FOCUS_INTEGRATION           "Focus Integration"
+#define DALI_DEMO_STR_TITLE_IMAGE_POLICIES              "Image Policies"
 #define DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING      "Image Fitting and Sampling"
 #define DALI_DEMO_STR_TITLE_IMAGE_SCALING               "Image Scaling Grid"
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW                  "Image View"
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW_ALPHA_BLENDING   "Image View Alpha Blending"
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW_PIXEL_AREA       "Image View Pixel Area"
 #define DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG              "Image View SVG"
+#define DALI_DEMO_STR_TITLE_IMAGE_VIEW_URL              "Image View URL"
 #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"
@@ -163,6 +164,7 @@ extern "C"
 #define DALI_DEMO_STR_TITLE_TEXT_EDITOR                 "Text Editor"
 #define DALI_DEMO_STR_TITLE_TEXT_FIELD                  "Text Field"
 #define DALI_DEMO_STR_TITLE_TEXT_LABEL                  "Text Label"
+#define DALI_DEMO_STR_TITLE_TEXT_MEMORY_PROFILING       "Text Memory Profiling"
 #define DALI_DEMO_STR_TITLE_TEXT_OVERLAP                "Text Overlap"
 #define DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE   "Text Scripts"
 #define DALI_DEMO_STR_TITLE_TEXT_SCROLLING              "Text Scrolling"
index cae9fb1..84737d0 100644 (file)
@@ -753,7 +753,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count )
     Dali::Property::Map effect = Toolkit::CreateDistanceFieldEffect();
     Property::Map imageMap;
     imageMap.Add( ImageVisual::Property::URL, SHAPE_IMAGE_TABLE[ shapeType ] );
-    imageMap.Add( Visual::Property::SHADER, effect );
+    imageMap.Add( Toolkit::Visual::Property::SHADER, effect );
     dfActor.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
 
     dfActor.SetColor( BUBBLE_COLOR[ i%NUMBER_OF_BUBBLE_COLOR ] );
index 3ecab6d..f3ba3e7 100644 (file)
@@ -29,9 +29,10 @@ namespace DemoHelper
 Dali::Texture LoadTexture( const char* imagePath,
                            Dali::ImageDimensions size = Dali::ImageDimensions(),
                            Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT,
-                           Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT )
+                           Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT,
+                           bool orientationCorrection = true )
 {
-  Dali::Devel::PixelBuffer pixelBuffer = LoadImageFromFile(imagePath, size, fittingMode, samplingMode);
+  Dali::Devel::PixelBuffer pixelBuffer = LoadImageFromFile(imagePath, size, fittingMode, samplingMode, orientationCorrection );
   Dali::Texture texture  = Dali::Texture::New( Dali::TextureType::TEXTURE_2D,
                                                pixelBuffer.GetPixelFormat(),
                                                pixelBuffer.GetWidth(),