Merge branch 'devel/master' into tizen accepted/tizen/unified/20190725.042902 submit/tizen/20190724.075137
authorSunghyun kim <scholb.kim@samsung.com>
Wed, 24 Jul 2019 05:02:17 +0000 (14:02 +0900)
committerSunghyun kim <scholb.kim@samsung.com>
Wed, 24 Jul 2019 05:02:40 +0000 (14:02 +0900)
Change-Id: I79fba179669ba9c76bef447d08f29ff61c548155

14 files changed:
com.samsung.dali-demo.xml
examples-reel/dali-examples-reel.cpp
examples/animated-gradient-call-active/animated-gradient-call-active.cpp
examples/bezier-curve/bezier-curve-example.cpp
examples/bloom-view/bloom-view-example.cpp [new file with mode: 0644]
examples/effects-view/effects-view-example.cpp
examples/homescreen-benchmark/homescreen-benchmark.cpp
examples/super-blur-view/super-blur-view-example.cpp
packaging/com.samsung.dali-demo.spec
resources/images/UI-Leather-DIFF.png [new file with mode: 0644]
resources/images/desktop_background_1440x2560.png [new file with mode: 0644]
resources/po/en_GB.po
resources/po/en_US.po
shared/dali-demo-strings.h

index 5d2901b..c0ea54a 100644 (file)
        <ui-application appid="super-blur-view.example" exec="/usr/apps/com.samsung.dali-demo/bin/super-blur-view.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
                <label>Super Blur</label>
        </ui-application>
+       <ui-application appid="bloom-view.example" exec="/usr/apps/com.samsung.dali-demo/bin/bloom-view.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
+               <label>Bloom</label>
+       </ui-application>
 
        <privileges>
                <privilege>http://tizen.org/privilege/mediastorage</privilege>
index 92d05e9..cc401a9 100644 (file)
@@ -40,6 +40,7 @@ int DALI_EXPORT_API main(int argc, char **argv)
   demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES));
   demo.AddExample(Example("animated-vector-images.example", DALI_DEMO_STR_TITLE_ANIMATED_VECTOR_IMAGES));
   demo.AddExample(Example("alpha-blending-cpu.example", DALI_DEMO_STR_TITLE_ALPHA_BLENDING_CPU));
+  demo.AddExample(Example("bloom-view.example", DALI_DEMO_STR_TITLE_BLOOM_VIEW));
   demo.AddExample(Example("builder.example", DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI));
   demo.AddExample(Example("buttons.example", DALI_DEMO_STR_TITLE_BUTTONS));
   demo.AddExample(Example("clipping.example", DALI_DEMO_STR_TITLE_CLIPPING));
index 88c86e8..8d17735 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2017 Samsung Electronics Co., Ltd.
+* Copyright (c) 2019 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.
@@ -212,7 +212,7 @@ private:
     mCallStartButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE );
     mCallStartButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE );
     mCallStartButton.SetProperty( Control::Property::BACKGROUND, ICON_CALL_IMAGE );
-    mCallStartButton.SetLabelText("");
+    mCallStartButton.SetProperty( Button::Property::LABEL, "" );
 
     mStage.Add( mCallStartButton );
     mStage.Add( mButtonIconDecall );
@@ -293,7 +293,7 @@ private:
     mCallEndButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, "" );
     mCallEndButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, "" );
     mCallEndButton.SetStyleName( DECLINE_BUTTON_STYLE_STR );
-    mCallEndButton.SetLabelText("");
+    mCallEndButton.SetProperty( Button::Property::LABEL, "" );
 
     mButtonClip.Add( mCallEndButton );
     mButtonClip.Add( mButtonIcon );
index f06f942..8fddca7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -212,7 +212,7 @@ public:
     PushButton play = PushButton::New();
     play.SetName("Play");
     play.SetParentOrigin(ParentOrigin::CENTER);
-    play.SetLabelText("Play");
+    play.SetProperty( Button::Property::LABEL, "Play");
     play.ClickedSignal().Connect( this, &BezierCurveExample::OnPlayClicked );
 
     contentLayout.Add( play );
diff --git a/examples/bloom-view/bloom-view-example.cpp b/examples/bloom-view/bloom-view-example.cpp
new file mode 100644 (file)
index 0000000..dd64493
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2019 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/dali.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+namespace
+{
+
+const char* BACKGROUND_IMAGE_PATH( DEMO_IMAGE_DIR "desktop_background_1440x2560.png" );
+const char* UI_DIFFUSE_IMAGE( DEMO_IMAGE_DIR "UI-Leather-DIFF.png" );
+
+const Rect<int> UI_PIXEL_AREA( 0, 0, 720, 1280 );
+
+const Rect<int> PANEL1_PIXEL_AREA( 0, 0, 720,  39 );
+const Rect<int> PANEL2_PIXEL_AREA( 0, 39, 720, 100 );
+
+const unsigned int NUM_MOVEMENT_ANIMATIONS = 2;
+
+// for animating bloom intensity on tap gesture
+const float PULSE_BLOOM_INCREASE_ANIM_TIME = 1.175;
+const float PULSE_BLOOM_DECREASE_ANIM_TIME = 2.4;
+const float PULSE_BLOOM_TOTAL_ANIM_TIME = PULSE_BLOOM_INCREASE_ANIM_TIME + PULSE_BLOOM_DECREASE_ANIM_TIME;
+const float PULSE_BLOOM_INTENSITY_DEFAULT = 1.0f;
+const float PULSE_BLOOM_INTENSITY_INCREASE = 3.0f;
+
+// These values depend on the button background image
+const Vector4 BUTTON_IMAGE_BORDER(16.0f, 16.0f, 16.0f, 20.0f);
+
+const float UI_MARGIN = 4.0f;                              ///< Screen Margin for placement of UI buttons
+const Vector3 BUTTON_SIZE_CONSTRAINT( 0.24f, 0.09f, 1.0f );
+
+} // namespace
+
+/**
+ * This example demonstrates a bloom effect.
+ */
+class BloomExample : public ConnectionTracker
+{
+public:
+
+  BloomExample( Application &application )
+  : mApplication(application),
+    mCurrentAnimation(0)
+  {
+    application.InitSignal().Connect( this, &BloomExample::Create );
+  }
+
+  ~BloomExample()
+  {
+  }
+
+public:
+
+  void Create( Application& application )
+  {
+    Stage stage = Stage::GetCurrent();
+    Vector2 stageSize = stage.GetSize();
+    Vector2 viewSize( stageSize );
+
+    mRootActor = Actor::New();
+    mRootActor.SetParentOrigin( ParentOrigin::CENTER );
+    mRootActor.SetSize( stageSize );
+    stage.Add( mRootActor );
+
+    // Create the object that will perform the blooming work
+    mBloomView = Dali::Toolkit::BloomView::New();
+    mBloomView.SetParentOrigin( ParentOrigin::CENTER );
+    mBloomView.SetSize( viewSize );
+    mRootActor.Add( mBloomView );
+    mBloomView.Activate();
+
+    Layer backgroundLayer = Layer::New();
+    backgroundLayer.SetSize( viewSize );
+    backgroundLayer.SetParentOrigin( ParentOrigin::CENTER );
+    mBloomView.Add( backgroundLayer );
+
+    // Create the background image
+    ImageView backgroundImage = ImageView::New( BACKGROUND_IMAGE_PATH );
+    backgroundImage.SetParentOrigin( ParentOrigin::CENTER );
+    backgroundImage.SetSize( viewSize );
+    backgroundLayer.Add( backgroundImage );
+
+    Layer foregroundLayer = Layer::New();
+    foregroundLayer.SetSize( viewSize );
+    foregroundLayer.SetParentOrigin( ParentOrigin::CENTER );
+    mBloomView.Add( foregroundLayer );
+
+    // Create visible actors
+    mObjectRootActor = Actor::New();
+    mObjectRootActor.SetParentOrigin( ParentOrigin::CENTER );
+    mObjectRootActor.SetSize( viewSize );
+    foregroundLayer.Add( mObjectRootActor );
+
+    ImageView imageView = ImageView::New( UI_DIFFUSE_IMAGE );
+    imageView.SetParentOrigin( ParentOrigin::CENTER );
+    imageView.SetSize( viewSize );
+    mObjectRootActor.Add( imageView );
+
+    imageView = ImageView::New( UI_DIFFUSE_IMAGE );
+    imageView.SetParentOrigin( ParentOrigin::CENTER );
+    imageView.SetSize( stageSize * 0.5f );
+    imageView.SetPosition( 0.0f, 0.0f, 100.0f );
+    mObjectRootActor.Add( imageView );
+
+    AnimateBloomView();
+    PulseBloomIntensity();
+
+    // Respond to key events
+    stage.KeyEventSignal().Connect( this, &BloomExample::OnKeyEvent );
+  }
+
+  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();
+      }
+    }
+  }
+
+  void AnimateBloomView()
+  {
+    if(mRotationAnimation)
+    {
+      mRotationAnimation.Stop();
+    }
+    if(mResizeAnimation)
+    {
+      mResizeAnimation.Stop();
+    }
+    if(mTranslationAnimation)
+    {
+      mTranslationAnimation.Stop();
+    }
+    if(mBlurAnimation)
+    {
+      mBlurAnimation.Stop();
+    }
+
+    // ROTATE
+    mRotationAnimation = Animation::New( 5.0f );
+    mRotationAnimation.AnimateBy( Property( mObjectRootActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( 360 )), Vector3::YAXIS ), AlphaFunction::EASE_IN_OUT );
+    mRotationAnimation.SetEndAction( Animation::Discard );
+    mRotationAnimation.SetLooping( true );
+    mRotationAnimation.Play();
+
+    // TRANSLATE
+    mTranslationAnimation = Animation::New( 7.5f );
+    mTranslationAnimation.AnimateBy( Property(mObjectRootActor, Actor::Property::POSITION), Vector3(100.0f, 0.0f, 0.0f), AlphaFunction::BOUNCE, TimePeriod(2.5f) );
+    mTranslationAnimation.AnimateBy( Property(mObjectRootActor, Actor::Property::POSITION), Vector3(300.0f, 0.0f, 0.0f), AlphaFunction::BOUNCE, TimePeriod(2.5f, 2.5f) );
+    mTranslationAnimation.AnimateBy( Property(mObjectRootActor, Actor::Property::POSITION), Vector3(0.0f, 0.0f, 0.0f),   AlphaFunction::BOUNCE, TimePeriod(5.0f, 2.5f) );
+    mTranslationAnimation.SetEndAction( Animation::Discard );
+    mTranslationAnimation.SetLooping( true );
+    //mTranslationAnimation.Play();
+
+    // BLUR
+    mBlurAnimation = Animation::New( 4.0f );
+    mBlurAnimation.AnimateTo( Property( mBloomView, mBloomView.GetBlurStrengthPropertyIndex() ), 0.0f, AlphaFunction::LINEAR, TimePeriod(0.0f, 0.5f) );
+    mBlurAnimation.AnimateTo( Property( mBloomView, mBloomView.GetBlurStrengthPropertyIndex() ), 1.0f, AlphaFunction::LINEAR, TimePeriod(2.0f, 0.5f) );
+    mBlurAnimation.SetEndAction( Animation::Discard );
+    mBlurAnimation.SetLooping( true );
+    mBlurAnimation.Play();
+  }
+
+  void PulseBloomIntensity()
+  {
+    mPulseBloomIntensityAnim = Animation::New( 2.5f );
+    mPulseBloomIntensityAnim.AnimateTo( Property(mBloomView, mBloomView.GetBloomIntensityPropertyIndex()), 3.0f, AlphaFunction::BOUNCE, TimePeriod(2.5f) );
+    mPulseBloomIntensityAnim.SetEndAction( Animation::Discard );
+    mPulseBloomIntensityAnim.SetLooping( true );
+    mPulseBloomIntensityAnim.Play();
+  }
+
+private:
+
+  Application& mApplication;
+
+  Actor mRootActor;
+
+  Actor mObjectRootActor;
+
+  unsigned int mCurrentAnimation;
+  Animation mRotationAnimation;
+  Animation mResizeAnimation;
+  Animation mTranslationAnimation;
+  Animation mBlurAnimation;
+  Animation mPulseBloomIntensityAnim;
+
+  BloomView mBloomView;
+};
+
+int main(int argc, char **argv)
+{
+  Application application = Application::New( &argc, &argv );
+
+  BloomExample theApp( application );
+  application.MainLoop();
+
+  return 0;
+}
index 1404e22..f225800 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2017 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
+/*
+ * Copyright (c) 2019 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
 
index 36fa3a8..c32aaf7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -199,22 +199,18 @@ public:
   Actor AddPage()
   {
     // Create root page actor.
-    Actor pageActor;
+    Toolkit::Control pageActor;
 
     if( mConfig.mTableViewEnabled )
     {
-      Toolkit::TableView tableView = Toolkit::TableView::New( mConfig.mRows, mConfig.mCols );
-
-      // Create geometry batcher for table view.
-      tableView.SetBackgroundColor( Vector4( 0.0f, 0.0f, 0.0f, 0.5f ) );
-      pageActor = tableView;
+      pageActor = Toolkit::TableView::New( mConfig.mRows, mConfig.mCols );
     }
     else
     {
       pageActor = Toolkit::Control::New();
-      pageActor.SetProperty( Toolkit::Control::Property::BACKGROUND_COLOR, Vector4( 0.0f, 0.0f, 0.0f, 0.5f ) );
     }
 
+    pageActor.SetBackgroundColor( Vector4( 0.0f, 0.0f, 0.0f, 0.5f ) );
     pageActor.SetParentOrigin( ParentOrigin::CENTER );
     pageActor.SetAnchorPoint( AnchorPoint::CENTER );
     pageActor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
index d90b248..c687de3 100644 (file)
@@ -71,7 +71,7 @@ private:
     mPushButton = PushButton::New();
     mPushButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
     mPushButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
-    mPushButton.SetProperty( Button::Property::LABEL_TEXT, "Blur" );
+    mPushButton.SetProperty( Button::Property::LABEL, "Blur" );
     mPushButton.PressedSignal().Connect( this, &SuperBlurViewExample::OnButtonPressed );
     mPushButton.ReleasedSignal().Connect( this, &SuperBlurViewExample::OnButtonReleased );
     stage.Add( mPushButton );
index bf1ceee..15e9dd3 100755 (executable)
@@ -2,7 +2,7 @@
 
 Name:       com.samsung.dali-demo
 Summary:    The OpenGLES Canvas Core Demo
-Version:    1.4.28
+Version:    1.4.29
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
diff --git a/resources/images/UI-Leather-DIFF.png b/resources/images/UI-Leather-DIFF.png
new file mode 100644 (file)
index 0000000..b04d0ac
Binary files /dev/null and b/resources/images/UI-Leather-DIFF.png differ
diff --git a/resources/images/desktop_background_1440x2560.png b/resources/images/desktop_background_1440x2560.png
new file mode 100644 (file)
index 0000000..738703d
Binary files /dev/null and b/resources/images/desktop_background_1440x2560.png differ
index cff2764..d51cd5e 100755 (executable)
@@ -19,6 +19,9 @@ msgstr "Bezier Curve"
 msgid "DALI_DEMO_STR_TITLE_BLOCKS"
 msgstr "Blocks"
 
+msgid "DALI_DEMO_STR_TITLE_BLOOM_VIEW"
+msgstr "Bloom"
+
 msgid "DALI_DEMO_STR_TITLE_BUBBLES"
 msgstr "Bubbles"
 
index 4e8a9c8..ea1c39e 100755 (executable)
@@ -19,6 +19,9 @@ msgstr "Bezier Curve"
 msgid "DALI_DEMO_STR_TITLE_BLOCKS"
 msgstr "Blocks"
 
+msgid "DALI_DEMO_STR_TITLE_BLOOM_VIEW"
+msgstr "Bloom"
+
 msgid "DALI_DEMO_STR_TITLE_BUBBLES"
 msgstr "Bubbles"
 
index c680a15..6678f87 100644 (file)
@@ -40,6 +40,7 @@ extern "C"
 #define DALI_DEMO_STR_TITLE_BENCHMARK                   dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BENCHMARK")
 #define DALI_DEMO_STR_TITLE_BEZIER_CURVE                dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BEZIER_CURVE")
 #define DALI_DEMO_STR_TITLE_BLOCKS                      dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BLOCKS")
+#define DALI_DEMO_STR_TITLE_BLOOM_VIEW                  dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BLOOM_VIEW")
 #define DALI_DEMO_STR_TITLE_BUBBLES                     dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BUBBLES")
 #define DALI_DEMO_STR_TITLE_BUTTONS                     dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BUTTONS")
 #define DALI_DEMO_STR_TITLE_CALL_ACTIVE                 dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_CALL_ACTIVE")
@@ -135,6 +136,7 @@ extern "C"
 #define DALI_DEMO_STR_TITLE_BENCHMARK                   "ImageView Benchmark"
 #define DALI_DEMO_STR_TITLE_BEZIER_CURVE                "Alpha Function Bezier Curve"
 #define DALI_DEMO_STR_TITLE_BLOCKS                      "Blocks"
+#define DALI_DEMO_STR_TITLE_BLOOM_VIEW                  "Bloom"
 #define DALI_DEMO_STR_TITLE_BUBBLES                     "Bubbles"
 #define DALI_DEMO_STR_TITLE_BUTTONS                     "Buttons"
 #define DALI_DEMO_STR_TITLE_CALL_ACTIVE                 "Call Active"