[4.0] Add an environment variable to set the default indicator visible mode 41/153541/1
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 27 Sep 2017 07:31:19 +0000 (16:31 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Thu, 28 Sep 2017 17:38:43 +0000 (02:38 +0900)
Change-Id: I5a86d1bb8ffc3f21ec2a57af9b000bf958e2a327

adaptors/base/environment-options.cpp
adaptors/base/environment-options.h
adaptors/base/environment-variables.h
adaptors/common/application-impl.cpp
adaptors/common/window-impl.h
adaptors/ecore/wayland/window-impl-ecore-wl.cpp
adaptors/wayland/window-impl-wl.cpp
adaptors/x11/window-impl-x.cpp

index fef700dc437c64c36f9cb5a51dd2aa5c86a67c0a..c96edeb673da66d445b937348d9da205eaf24ef4 100644 (file)
@@ -109,6 +109,7 @@ EnvironmentOptions::EnvironmentOptions()
   mGlesCallAccumulate( false ),
   mMultiSamplingLevel( 0 ),
   mMaxTextureSize( 0 ),
+  mIndicatorVisibleMode( -1 ),
   mLogFunction( NULL )
 {
   ParseEnvironmentOptions();
@@ -265,6 +266,11 @@ unsigned int EnvironmentOptions::GetMaxTextureSize() const
   return mMaxTextureSize;
 }
 
+int EnvironmentOptions::GetIndicatorVisibleMode() const
+{
+  return mIndicatorVisibleMode;
+}
+
 bool EnvironmentOptions::PerformanceServerRequired() const
 {
   return ( ( GetPerformanceStatsLoggingOptions() > 0) ||
@@ -424,6 +430,15 @@ void EnvironmentOptions::ParseEnvironmentOptions()
       mMaxTextureSize = maxTextureSize;
     }
   }
+
+  int indicatorVisibleMode( -1 );
+  if( GetIntegerEnvironmentVariable( DALI_ENV_INDICATOR_VISIBLE_MODE, indicatorVisibleMode ) )
+  {
+    if( indicatorVisibleMode > -1 )
+    {
+      mIndicatorVisibleMode = indicatorVisibleMode;
+    }
+  }
 }
 
 } // Adaptor
index 2ab19a9a6708d9eee875d6da2048ddf33f78aaa1..42022fd9dd958c5bd3a49192206a78f9296266c5 100644 (file)
@@ -213,6 +213,11 @@ public:
    */
   unsigned int GetMaxTextureSize() const;
 
+  /**
+   * @return The maximum texture size
+   */
+  int GetIndicatorVisibleMode() const;
+
 private: // Internal
 
   /**
@@ -250,6 +255,7 @@ private: // Data
   bool mGlesCallAccumulate;                       ///< Whether or not to accumulate gles call statistics
   unsigned int mMultiSamplingLevel;               ///< The number of samples required in multisample buffers
   unsigned int mMaxTextureSize;                   ///< The maximum texture size that GL can handle
+  int mIndicatorVisibleMode;                      ///< Indicator visible mode
 
   Dali::Integration::Log::LogFunction mLogFunction;
 
index 53fe21b3bd5d5da13f64ec60e09c77433d4689e5..72b48340d7399dc2ea17b5d6a57854365233c158 100644 (file)
@@ -97,6 +97,8 @@ namespace Adaptor
 
 #define DALI_ENV_MAX_TEXTURE_SIZE "DALI_MAX_TEXTURE_SIZE"
 
+#define DALI_ENV_INDICATOR_VISIBLE_MODE "DALI_INDICATOR_VISIBLE_MODE"
+
 } // namespace Adaptor
 
 } // namespace Internal
index c44cdfb3e1b994668116505cb55236b2ccacda1f..d4ef798858918779fd5e7e3df9d8eee445a07e68 100644 (file)
@@ -146,6 +146,12 @@ void Application::CreateWindow()
   const std::string& windowClassName = mEnvironmentOptions.GetWindowClassName();
   mWindow = Dali::Window::New( mWindowPositionSize, mName, windowClassName, mWindowMode == Dali::Application::TRANSPARENT );
 
+  int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
+  if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
+  {
+    GetImplementation( mWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
+  }
+
   // Quit the application when the window is closed
   GetImplementation( mWindow ).DeleteRequestSignal().Connect( mSlotDelegate, &Application::Quit );
 }
@@ -413,7 +419,13 @@ void Application::ReplaceWindow( const PositionSize& positionSize, const std::st
   Dali::Window newWindow = Dali::Window::New( positionSize, name, mWindowMode == Dali::Application::TRANSPARENT );
   Window& windowImpl = GetImplementation(newWindow);
   windowImpl.SetAdaptor(*mAdaptor);
-  newWindow.ShowIndicator(Dali::Window::INVISIBLE);
+
+  int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
+  if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
+  {
+    GetImplementation( newWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
+  }
+
   Dali::RenderSurface* renderSurface = windowImpl.GetSurface();
 
   Any nativeWindow = newWindow.GetNativeHandle();
index 4207caec2ef2e08f5f04ad659c3ae0953f1e513f..72d0b72ed9bf697a82922a4846764a0bf5b8eabc 100644 (file)
@@ -305,6 +305,11 @@ public:
    */
   void RotationDone( int orientation, int width, int height );
 
+  /**
+   * Set the indicator visible mode
+   */
+  void SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode );
+
 private:
   /**
    * Private constructor.
index 39aa172313c791e76f363f9ce452dc0cc94d0637..0552fe0eb34407d06eceecb3d0b7cd7977e64c3b 100644 (file)
@@ -908,6 +908,11 @@ void Window::RotationDone( int orientation, int width, int height )
   mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
 }
 
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
+}
+
 unsigned int Window::GetSupportedAuxiliaryHintCount()
 {
   return mSupportedAuxiliaryHints.size();
index 0a6a018d9d3a6b17c3c65937f0ed31c4a356a881..b122285b06da77a6a06c632addad905e238d1897 100644 (file)
@@ -318,6 +318,11 @@ void Window::RotationDone( int orientation, int width, int height )
 {
 }
 
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
+}
+
 unsigned int Window::GetSupportedAuxiliaryHintCount()
 {
   return 0;
index 63e023b75976fc0c4d37ea7d81f1d96a03f9799e..d760aa808907e561c37bfd2e75cdf11c7b1bac32 100644 (file)
@@ -819,6 +819,11 @@ void Window::RotationDone( int orientation, int width, int height )
   }
 }
 
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
+}
+
 unsigned int Window::GetSupportedAuxiliaryHintCount()
 {
   return 0;