[dali_2.3.24] Merge branch 'devel/master' 09/311309/1 master
authorDavid Steele <david.steele@samsung.com>
Fri, 17 May 2024 11:11:40 +0000 (12:11 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 17 May 2024 11:11:40 +0000 (12:11 +0100)
Change-Id: Ia6b0346935629a927b4e7868178f676a639d86bd

60 files changed:
automated-tests/src/dali-graphics/CMakeLists.txt
automated-tests/src/dali-graphics/utc-Dali-GraphicsShader.cpp [new file with mode: 0644]
build/tizen/deps-check.cmake
dali/devel-api/adaptor-framework/accessibility.cpp
dali/devel-api/adaptor-framework/actor-accessible.cpp
dali/devel-api/adaptor-framework/actor-accessible.h
dali/devel-api/adaptor-framework/clipboard.cpp
dali/devel-api/adaptor-framework/clipboard.h
dali/devel-api/adaptor-framework/proxy-accessible.h
dali/devel-api/atspi-interfaces/accessible.h
dali/internal/accessibility/bridge/bridge-base.cpp
dali/internal/accessibility/bridge/bridge-base.h
dali/internal/accessibility/bridge/bridge-object.cpp
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/clipboard/common/clipboard-impl.h
dali/internal/clipboard/generic/clipboard-impl-generic.cpp
dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp
dali/internal/clipboard/ubuntu-x11/clipboard-impl-x.cpp
dali/internal/graphics/android/egl-sync-implementation-android.cpp
dali/internal/graphics/generic/egl-sync-implementation.cpp
dali/internal/graphics/gles-impl/gles-graphics-shader.cpp
dali/internal/graphics/gles-impl/gles-graphics-shader.h
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/gles/gl-implementation.cpp
dali/internal/graphics/macos/egl-sync-implementation-macos.cpp
dali/internal/graphics/tizen/egl-sync-implementation-tizen.cpp
dali/internal/graphics/windows-gl/egl-sync-implementation-windows.cpp
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp
dali/internal/system/android/logging-android.cpp
dali/internal/system/common/async-task-manager-impl.cpp
dali/internal/system/common/async-task-manager-impl.h
dali/internal/system/common/environment-variables.h
dali/internal/system/tizen-wayland/logging-tizen.cpp
dali/internal/system/ubuntu-x11/logging-x.cpp
dali/internal/system/windows/logging-win.cpp
dali/internal/text/file.list
dali/internal/text/text-abstraction/plugin/font-client-plugin-cache-handler.cpp
dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp
dali/internal/text/text-abstraction/text-renderer-impl.cpp
dali/internal/trace/android/trace-manager-impl-android.cpp
dali/internal/trace/generic/trace-manager-impl-generic.cpp
dali/internal/trace/streamline/trace-manager-impl-streamline.cpp
dali/internal/trace/tizen/trace-manager-impl-tizen.cpp
dali/internal/window-system/android/window-base-android.cpp
dali/internal/window-system/android/window-system-android.cpp
dali/internal/window-system/macos/window-base-mac.mm
dali/internal/window-system/macos/window-system-mac.mm
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp
dali/internal/window-system/windows/window-base-win.cpp
dali/internal/window-system/windows/window-system-win.cpp
dali/internal/window-system/x11/window-base-x.cpp
dali/internal/window-system/x11/window-system-x.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 1dee934..8ec9991 100644 (file)
@@ -14,6 +14,7 @@ SET(TC_SOURCES
     utc-Dali-GraphicsNativeImage.cpp
     utc-Dali-GraphicsProgram.cpp
     utc-Dali-GraphicsSampler.cpp
+    utc-Dali-GraphicsShader.cpp
     utc-Dali-GraphicsTexture.cpp
 )
 
diff --git a/automated-tests/src/dali-graphics/utc-Dali-GraphicsShader.cpp b/automated-tests/src/dali-graphics/utc-Dali-GraphicsShader.cpp
new file mode 100644 (file)
index 0000000..e2ec99e
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2024 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-test-suite-utils.h>
+#include <dali/dali.h>
+#include <dali/integration-api/testing.h>
+#include <dali/internal/graphics/gles-impl/gles-graphics-shader.h>
+#include <test-graphics-application.h>
+
+int UtcDaliGlesStripLegacyCodeIfNeededTest1(void)
+{
+  TestGraphicsApplication application;
+
+  {
+    Dali::Graphics::ShaderCreateInfo info;
+    info.SetPipelineStage(Dali::Graphics::PipelineStage::VERTEX_SHADER);
+    std::string vertexShader =
+      "//@version 100\n"
+      "some code\n";
+
+    info.SetShaderVersion(100);
+    info.SetSourceData(vertexShader.data());
+    info.SetSourceSize(vertexShader.size());
+    info.SetSourceMode(Dali::Graphics::ShaderSourceMode::TEXT);
+
+    size_t dataSize  = 0;
+    size_t dataIndex = 0;
+    Graphics::GLES::ShaderImpl::StripLegacyCodeIfNeeded(info, dataIndex, dataSize);
+
+    DALI_TEST_EQUALS(dataIndex, 0, TEST_LOCATION);
+    DALI_TEST_EQUALS(dataSize, vertexShader.size(), TEST_LOCATION);
+  }
+
+  END_TEST;
+}
+
+int UtcDaliGlesStripLegacyCodeTestDifferentPrefix(void)
+{
+  TestGraphicsApplication application;
+
+  std::string vertexShader =
+    "//@version 100\n"
+    "some code\n";
+
+  std::string somePrefix =
+    "This is some prefix\n";
+
+  auto newVertexPrefix = Dali::Integration::Test::GenerateTaggedShaderPrefix(somePrefix);
+  {
+    Dali::Graphics::ShaderCreateInfo info;
+    info.SetPipelineStage(Dali::Graphics::PipelineStage::VERTEX_SHADER);
+
+    std::string prefixedVertexShader = newVertexPrefix + vertexShader;
+
+    info.SetShaderVersion(100);
+    info.SetSourceData(prefixedVertexShader.data());
+    info.SetSourceSize(prefixedVertexShader.size());
+    info.SetSourceMode(Dali::Graphics::ShaderSourceMode::TEXT);
+
+    size_t dataSize  = 0;
+    size_t dataIndex = 0;
+    Graphics::GLES::ShaderImpl::StripLegacyCodeIfNeeded(info, dataIndex, dataSize);
+
+    auto index = prefixedVertexShader.find("//@version");
+
+    DALI_TEST_EQUALS(dataIndex, index, TEST_LOCATION);
+
+    // should match original shader size
+    DALI_TEST_EQUALS(dataSize, vertexShader.size(), TEST_LOCATION);
+  }
+
+  END_TEST;
+}
+
+int UtcDaliGlesStripLegacyCodeIfNeededTest2(void)
+{
+  TestGraphicsApplication application;
+
+  std::string vertexShader =
+    "//@version 100\n"
+    "some code\n";
+
+  auto vertexPrefix = Dali::Shader::GetVertexShaderPrefix();
+
+  {
+    Dali::Graphics::ShaderCreateInfo info;
+    info.SetPipelineStage(Dali::Graphics::PipelineStage::VERTEX_SHADER);
+
+    std::string prefixedVertexShader = Dali::Shader::GetVertexShaderPrefix() + vertexShader;
+
+    info.SetShaderVersion(100);
+    info.SetSourceData(prefixedVertexShader.data());
+    info.SetSourceSize(prefixedVertexShader.size());
+    info.SetSourceMode(Dali::Graphics::ShaderSourceMode::TEXT);
+
+    size_t dataSize  = 0;
+    size_t dataIndex = 0;
+    Graphics::GLES::ShaderImpl::StripLegacyCodeIfNeeded(info, dataIndex, dataSize);
+
+    DALI_TEST_EQUALS(dataIndex, vertexPrefix.length(), TEST_LOCATION);
+
+    // should match original shader size
+    DALI_TEST_EQUALS(dataSize, vertexShader.size(), TEST_LOCATION);
+  }
+
+  END_TEST;
+}
\ No newline at end of file
index be3798b..59e1cd0 100755 (executable)
@@ -107,6 +107,7 @@ CHECK_MODULE_AND_SET( X11 x11 [] )
 CHECK_MODULE_AND_SET( XDAMAGE xdamage [] )
 CHECK_MODULE_AND_SET( XFIXES xfixes [] )
 CHECK_MODULE_AND_SET( XINPUT xi [] )
+CHECK_MODULE_AND_SET( XRENDER xrender [] )
 
 CHECK_MODULE_AND_SET( CAPI_SYSTEM_INFO capi-system-info [] )
 CHECK_MODULE_AND_SET( CAPI_SYSTEM_SENSOR capi-system-sensor capi_system_sensor_support )
@@ -377,6 +378,7 @@ IF(X11_REQUIRED)
     ${XDAMAGE_CFLAGS}
     ${XFIXES_CFLAGS}
     ${XINPUT_CFLAGS}
+    ${XRENDER_CFLAGS}
     )
 
   SET( DALI_LDFLAGS ${DALI_LDFLAGS}
@@ -384,6 +386,7 @@ IF(X11_REQUIRED)
     ${XDAMAGE_LDFLAGS}
     ${XFIXES_LDFLAGS}
     ${XINPUT_LDFLAGS}
+    ${XRENDER_LDFLAGS}
     )
 
 ELSE()
index 8b7a10f..f69c96c 100644 (file)
@@ -306,6 +306,13 @@ void Accessible::SetCurrentlyHighlightedActor(Dali::Actor actor)
   }
 }
 
+bool Accessible::IsHighlighted() const
+{
+  Dali::Actor self = GetInternalActor();
+
+  return self && self == GetCurrentlyHighlightedActor();
+}
+
 Dali::Actor Accessible::GetHighlightActor()
 {
   return IsUp() ? Bridge::GetCurrentBridge()->mData->mHighlightActor : Dali::Actor{};
@@ -412,15 +419,14 @@ public:
       return false;
     }
 
-    auto self = Self();
-    if(self != GetCurrentlyHighlightedActor())
+    if(!IsHighlighted())
     {
       return false;
     }
 
     SetCurrentlyHighlightedActor({});
 
-    auto                             window     = Dali::DevelWindow::Get(self);
+    auto                             window     = Dali::DevelWindow::Get(Self());
     Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation(window);
     windowImpl.EmitAccessibilityHighlightSignal(false);
 
index 6f940a7..9a82d13 100644 (file)
@@ -108,7 +108,7 @@ std::size_t ActorAccessible::GetIndexInParent()
   throw std::domain_error{"actor is not a child of its parent"};
 }
 
-Dali::Actor ActorAccessible::GetInternalActor()
+Dali::Actor ActorAccessible::GetInternalActor() const
 {
   return Self();
 }
index 1cf3812..c885e6d 100644 (file)
@@ -77,7 +77,7 @@ public:
   /**
    * @copydoc Dali::Accessibility::Accessible::GetInternalActor()
    */
-  Dali::Actor GetInternalActor() final;
+  Dali::Actor GetInternalActor() const final;
 
   /**
    * @copydoc Dali::Accessibility::Component::GetLayer()
index e69c0a7..a070d00 100644 (file)
@@ -61,6 +61,11 @@ Clipboard::DataSelectedSignalType& Clipboard::DataSelectedSignal()
   return GetImplementation(*this).DataSelectedSignal();
 }
 
+bool Clipboard::HasType(const std::string& mimeType)
+{
+  return GetImplementation(*this).HasType(mimeType);
+}
+
 bool Clipboard::SetData(const ClipData& clipData)
 {
   return GetImplementation(*this).SetData(clipData);
index 3096b2d..707b936 100644 (file)
@@ -139,6 +139,13 @@ public:
   DataSelectedSignalType& DataSelectedSignal();
 
   /**
+   * @brief Check if there is data in the clipboard with a given mime type.
+   * @param[in] mimeType mime type to search for.
+   * @return bool true if there is data, otherwise false.
+   */
+  bool HasType(const std::string& mimeType);
+
+  /**
    * @brief Send the given data to the clipboard.
    * @param[in] clipData data to send to the clipboard
    * @return bool true if the internal clipboard sending was successful.
index 33e6b1b..35aaf45 100644 (file)
@@ -129,7 +129,7 @@ public:
     return {};
   }
 
-  Dali::Actor GetInternalActor() override
+  Dali::Actor GetInternalActor() const override
   {
     return Dali::Actor{};
   }
index ae97750..f34f9e3 100644 (file)
@@ -283,6 +283,13 @@ public:
   virtual bool IsProxy() const;
 
   /**
+   * @brief Checks if this is highlighted
+   *
+   * @return True if highlighted, false otherwise
+   */
+  bool IsHighlighted() const;
+
+  /**
    * @brief Gets unique address on accessibility bus.
    *
    * @return The Address class containing address
@@ -325,7 +332,7 @@ public:
    *
    * @return The internal Actor
    */
-  virtual Dali::Actor GetInternalActor() = 0;
+  virtual Dali::Actor GetInternalActor() const = 0;
 
   /**
    * @brief Sets whether to listen for post render callback.
index a819f25..30e6cf4 100644 (file)
@@ -174,6 +174,8 @@ BridgeBase::ForceUpResult BridgeBase::ForceUp()
 void BridgeBase::ForceDown()
 {
   Bridge::ForceDown();
+  tickTimer.Reset();
+  mCoalescableMessages.clear();
   mRegistry      = {};
   mDbusServer    = {};
   mConnectionPtr = {};
index ab79723..6c72399 100644 (file)
@@ -160,7 +160,7 @@ public:
     return {};
   }
 
-  Dali::Actor GetInternalActor() override
+  Dali::Actor GetInternalActor() const override
   {
     return Dali::Actor{};
   }
@@ -286,6 +286,10 @@ enum class CoalescableMessages
   BOUNDS_CHANGED, ///< Bounds changed
   SET_OFFSET, ///< Set offset
   POST_RENDER, ///< Post render
+  STATE_CHANGED_BEGIN = 500, ///< State changed (begin of reserved range)
+  STATE_CHANGED_END   = STATE_CHANGED_BEGIN + 99, ///< State changed (end of reserved range)
+  PROPERTY_CHANGED_BEGIN, ///< Property changed (begin of reserved range)
+  PROPERTY_CHANGED_END = PROPERTY_CHANGED_BEGIN + 99, ///< Property changed (end of reserved range)
 };
 
 // Custom specialization of std::hash
index c3e5de5..d1f553e 100644 (file)
@@ -85,15 +85,17 @@ void BridgeObject::Emit(Accessible* obj, ObjectPropertyChangeEvent event)
 
   if(eventName != eventMap.end())
   {
-    mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
-      GetAccessiblePath(obj),
-      Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
-      "PropertyChange",
-      std::string{eventName->second},
-      0,
-      0,
-      {0},
-      {"", "root"});
+    AddCoalescableMessage(static_cast<CoalescableMessages>(static_cast<int>(CoalescableMessages::PROPERTY_CHANGED_BEGIN) + static_cast<int>(event)), obj, 1.0f, [=]() {
+      mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
+        GetAccessiblePath(obj),
+        Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
+        "PropertyChange",
+        std::string{eventName->second},
+        0,
+        0,
+        {0},
+        {"", "root"});
+    });
   }
 }
 
@@ -203,15 +205,17 @@ void BridgeObject::EmitStateChanged(Accessible* obj, State state, int newValue,
 
   if(stateName != stateMap.end())
   {
-    mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
-      GetAccessiblePath(obj),
-      Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
-      "StateChanged",
-      std::string{stateName->second},
-      newValue,
-      reserved,
-      {0},
-      {"", "root"});
+    AddCoalescableMessage(static_cast<CoalescableMessages>(static_cast<int>(CoalescableMessages::STATE_CHANGED_BEGIN) + static_cast<int>(state)), obj, 1.0f, [=]() {
+      mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
+        GetAccessiblePath(obj),
+        Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
+        "StateChanged",
+        std::string{stateName->second},
+        newValue,
+        reserved,
+        {0},
+        {"", "root"});
+    });
   }
 }
 
@@ -240,6 +244,11 @@ void BridgeObject::EmitBoundsChanged(Accessible* obj, Dali::Rect<> rect)
 
 void BridgeObject::EmitPostRender(Accessible *obj)
 {
+  if(!IsUp() || obj->IsHidden())
+  {
+    return;
+  }
+
   AddCoalescableMessage(CoalescableMessages::POST_RENDER, obj, 0.5f, [=]() {
     Emit(obj, WindowEvent::POST_RENDER);
   });
index 7b5c5b3..a411c12 100644 (file)
@@ -95,8 +95,6 @@ namespace
 thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer to allow Adaptor::Get
 
 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
-
-const char* ENABLE_IMAGE_LOADER_PLUGIN_ENV = "DALI_ENABLE_IMAGE_LOADER_PLUGIN";
 } // unnamed namespace
 
 Dali::Adaptor* Adaptor::New(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode)
@@ -416,7 +414,7 @@ void Adaptor::Start()
   ProcessCoreEvents(); // Ensure any startup messages are processed.
 
   // Initialize the image loader plugin
-  auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV);
+  auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ENABLE_IMAGE_LOADER_PLUGIN);
   bool enablePlugin       = enablePluginString ? std::atoi(enablePluginString) : false;
   if(enablePlugin)
   {
@@ -540,7 +538,7 @@ void Adaptor::Stop()
     }
 
     // Destroy the image loader plugin
-    auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV);
+    auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ENABLE_IMAGE_LOADER_PLUGIN);
     bool enablePlugin       = enablePluginString ? std::atoi(enablePluginString) : false;
     if(enablePlugin)
     {
index 3858d4a..93c7a0e 100644 (file)
@@ -830,6 +830,10 @@ void CombinedUpdateRenderController::UpdateRenderThread()
         }
       }
     }
+    else
+    {
+      DALI_LOG_RELEASE_INFO("DALI Rendering skip (upload only)\n");
+    }
 
     TRACE_UPDATE_RENDER_BEGIN("DALI_POST_RENDER");
     if(!uploadOnly)
index d4e36c1..cf508ea 100644 (file)
@@ -35,6 +35,10 @@ namespace Adaptor
  */
 class Clipboard : public Dali::BaseObject, public ConnectionTracker
 {
+const char* MIME_TYPE_TEXT_PLAIN = "text/plain;charset=utf-8";
+const char* MIME_TYPE_HTML       = "application/xhtml+xml";
+const char* MIME_TYPE_TEXT_URI   = "text/uri-list";
+
 public:
   struct Impl;
 
@@ -75,6 +79,11 @@ public:
   Dali::Clipboard::DataSelectedSignalType& DataSelectedSignal();
 
   /**
+   * @copydoc Dali::Clipboard::HasType()
+   */
+  bool HasType(const std::string& mimeType);
+
+  /**
    * @copydoc Dali::Clipboard::SetData()
    */
   bool SetData(const Dali::Clipboard::ClipData& clipData);
index c4bef69..ce788bd 100644 (file)
@@ -97,6 +97,11 @@ Dali::Clipboard::DataSelectedSignalType& Clipboard::DataSelectedSignal()
   return mImpl->mDataSelectedSignal;
 }
 
+bool Clipboard::HasType(const std::string& mimeType)
+{
+  return true;
+}
+
 bool Clipboard::SetData(const Dali::Clipboard::ClipData& clipData)
 {
   return true;
index fdd3657..0dc2949 100644 (file)
@@ -50,6 +50,32 @@ struct Clipboard::Impl
     ecore_event_handler_del(mSelectionHanlder);
   }
 
+  bool HasType(const std::string& mimeType)
+  {
+    Ecore_Wl2_Display* display = ecore_wl2_connected_display_get(NULL);
+    Ecore_Wl2_Input*   input   = ecore_wl2_input_default_input_get(display);
+    Ecore_Wl2_Offer*   offer   = ecore_wl2_dnd_selection_get(input);
+
+    if(!offer)
+    {
+      DALI_LOG_ERROR("selection_get fail, request type:%s\n", mimeType.c_str());
+      return false;
+    }
+
+    Eina_Array*  availableTypes = ecore_wl2_offer_mimes_get(offer);
+    unsigned int typeCount      = (unsigned int)eina_array_count((Eina_Array *)availableTypes);
+
+    for(unsigned int i = 0; i < typeCount; ++i)
+    {
+      char* availableType = (char*)eina_array_data_get((Eina_Array *)availableTypes, i);
+      if(!mimeType.compare(availableType))
+      {
+        return true;
+      }
+    }
+    return false;
+  }
+
   bool SetData(const Dali::Clipboard::ClipData& clipData)
   {
     mMimeType = clipData.GetMimeType();
@@ -395,6 +421,11 @@ Dali::Clipboard::DataSelectedSignalType& Clipboard::DataSelectedSignal()
   return mImpl->mDataSelectedSignal;
 }
 
+bool Clipboard::HasType(const std::string& mimeType)
+{
+  return mImpl->HasType(mimeType);
+}
+
 bool Clipboard::SetData(const Dali::Clipboard::ClipData& clipData)
 {
   return mImpl->SetData(clipData);
@@ -407,8 +438,8 @@ uint32_t Clipboard::GetData(const std::string &mimeType)
 
 size_t Clipboard::NumberOfItems()
 {
-  // TODO: We should to check if the data is empty in the clipboard service.
-  return 1u;
+  bool isItem = HasType(MIME_TYPE_TEXT_PLAIN) || HasType(MIME_TYPE_HTML) || HasType(MIME_TYPE_TEXT_URI);
+  return isItem ? 1u : 0u;
 }
 
 void Clipboard::ShowClipboard()
index 2681ea9..9c15021 100644 (file)
@@ -43,6 +43,11 @@ struct Clipboard::Impl
     mApplicationWindow = ecoreXwin;
   }
 
+  bool HasType(const std::string& mimeType)
+  {
+    return mMimeType == mimeType ? true : false;
+  }
+
   bool SetData(const Dali::Clipboard::ClipData& clipData)
   {
     mMimeType = clipData.GetMimeType();
@@ -173,6 +178,11 @@ Dali::Clipboard::DataSelectedSignalType& Clipboard::DataSelectedSignal()
   return mImpl->mDataSelectedSignal;
 }
 
+bool Clipboard::HasType(const std::string& mimeType)
+{
+  return mImpl->HasType(mimeType);
+}
+
 bool Clipboard::SetData(const Dali::Clipboard::ClipData& clipData)
 {
   return mImpl->SetData(clipData);
@@ -185,8 +195,8 @@ uint32_t Clipboard::GetData(const std::string &mimeType)
 
 size_t Clipboard::NumberOfItems()
 {
-  // TODO: We should to check if the data is empty in the clipboard service.
-  return 1u;
+  bool isItem = HasType(MIME_TYPE_TEXT_PLAIN) || HasType(MIME_TYPE_HTML) || HasType(MIME_TYPE_TEXT_URI);
+  return isItem ? 1u : 0u;
 }
 
 void Clipboard::ShowClipboard()
index df12970..a035e8a 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index 842407f..1615078 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
   EGLDisplay display = mEglImplementation.GetDisplay();
index ab265a7..897a50d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -32,16 +32,23 @@ struct ShaderImpl::Impl
     createInfo.pipelineStage  = _createInfo.pipelineStage;
     createInfo.shaderlanguage = _createInfo.shaderlanguage;
     createInfo.sourceMode     = _createInfo.sourceMode;
-    createInfo.sourceSize     = _createInfo.sourceSize;
+    createInfo.shaderVersion  = _createInfo.shaderVersion;
 
-    // Make a copy of source code
-    source.resize(_createInfo.sourceSize);
-    std::copy(reinterpret_cast<const uint8_t*>(_createInfo.sourceData),
-              reinterpret_cast<const uint8_t*>(_createInfo.sourceData) + _createInfo.sourceSize,
+    // Make a copy of source code. if code is meant to be used
+    // by modern parser, skip the prefix part
+    size_t dataStartIndex = 0;
+    size_t dataSize;
+
+    ShaderImpl::StripLegacyCodeIfNeeded( _createInfo, dataStartIndex, dataSize );
+
+    source.resize(dataSize);
+    std::copy(reinterpret_cast<const uint8_t*>(_createInfo.sourceData) + dataStartIndex,
+              reinterpret_cast<const uint8_t*>(_createInfo.sourceData) + dataSize,
               source.data());
 
     // Substitute pointer
     createInfo.sourceData = source.data();
+    createInfo.sourceSize = dataSize;
   }
 
   ~Impl(){};
@@ -209,6 +216,28 @@ const ShaderCreateInfo& ShaderImpl::GetCreateInfo() const
   return mImpl->controller;
 }
 
+void ShaderImpl::StripLegacyCodeIfNeeded(const ShaderCreateInfo& info, size_t& startIndex, size_t& finalDataSize)
+{
+  // Make a copy of source code. if code is meant to be used
+  // by modern parser, skip the prefix part
+  if(info.shaderVersion != 0)
+  {
+    auto text = reinterpret_cast<const char*>(info.sourceData);
+    auto result = std::string_view(text).find("//@legacy-prefix-end");
+    if(result != 0 && result != std::string::npos)
+    {
+      DALI_LOG_ERROR("Shader processing: @legacy-prefix-end must be a very first statement!\n");
+    }
+    else if(result == 0)
+    {
+      char* end;
+      startIndex = std::strtoul(reinterpret_cast<const char*>(info.sourceData) + 21, &end, 10);
+    }
+  }
+
+  finalDataSize = info.sourceSize - startIndex;
+}
+
 Shader::~Shader()
 {
   if(!mShader->Release())
index 28c7370..45fce49 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GRAPHICS_GLES_SHADER_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -76,6 +76,14 @@ public:
 
   [[nodiscard]] EglGraphicsController& GetController() const;
 
+  /**
+   * Strips legacy prefix fromt he GLSL source code if necessary
+   * @param info valid ShaderCreateInfo strucutre
+   * @param[out] startIndex Start index of the source code
+   * @param[out] finalDataSize Size of trimmed data
+   */
+  static void StripLegacyCodeIfNeeded(const ShaderCreateInfo& info, size_t& startIndex, size_t& finalDataSize);
+
 private:
   friend class Shader;
   struct Impl;
index b47898c..ab424cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -29,6 +29,7 @@
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/internal/graphics/gles/egl-debug.h>
 #include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/system/common/time-service.h>
 #include <dali/public-api/dali-adaptor-common.h>
 
@@ -50,14 +51,11 @@ const char*    EGL_KHR_CREATE_CONTEXT                  = "EGL_KHR_create_context
 const char*    EGL_KHR_PARTIAL_UPDATE                  = "EGL_KHR_partial_update";
 const char*    EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE        = "EGL_KHR_swap_buffers_with_damage";
 
-// Threshold time in miliseconds
-constexpr auto PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME";
-
 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_EGL, true);
 
 static uint32_t GetPerformanceLogThresholdTime()
 {
-  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(PERFORMANCE_LOG_THRESHOLD_TIME_ENV);
+  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_EGL_PERFORMANCE_LOG_THRESHOLD_TIME);
   uint32_t time       = timeString ? static_cast<uint32_t>(std::atoi(timeString)) : std::numeric_limits<uint32_t>::max();
   return time;
 }
index ac45214..4a0bc42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -21,6 +21,9 @@
 // EXTERNAL INCLUDES
 #include <limits>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace Internal
@@ -54,12 +57,9 @@ static constexpr const char* OES_EGL_IMAGE_EXTERNAL_STRING = "#extension GL_OES_
 
 static constexpr const char* OES_EGL_IMAGE_EXTERNAL_STRING_ESSL3 = "#extension GL_OES_EGL_image_external_essl3:require\n";
 
-// Threshold time in miliseconds
-constexpr auto PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME";
-
 static uint32_t GetPerformanceLogThresholdTime()
 {
-  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(PERFORMANCE_LOG_THRESHOLD_TIME_ENV);
+  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_EGL_PERFORMANCE_LOG_THRESHOLD_TIME);
   uint32_t time       = timeString ? static_cast<uint32_t>(std::atoi(timeString)) : std::numeric_limits<uint32_t>::max();
   return time;
 }
index df12970..a035e8a 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index d840015..41c771a 100644 (file)
@@ -221,7 +221,8 @@ void EglSyncImplementation::InitializeEglSync()
 #else
 
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index df12970..a035e8a 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index 602ce31..5307d34 100644 (file)
@@ -29,6 +29,7 @@
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 #include <dali/internal/graphics/gles/egl-graphics.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -57,11 +58,10 @@ const char* SAMPLER_TYPE = "samplerExternalOES";
 constexpr int32_t NUM_FORMATS_BLENDING_REQUIRED = 18;
 
 constexpr int32_t DEFAULT_TBM_SURFACE_QUEUE_SIZE = 3u;
-constexpr auto    TBM_SURFACE_QUEUE_SIZE         = "DALI_TBM_SURFACE_QUEUE_SIZE";
 
 int32_t GetTbmSurfaceQueueSize()
 {
-  static auto    queueSizeString = EnvironmentVariable::GetEnvironmentVariable(TBM_SURFACE_QUEUE_SIZE);
+  static auto    queueSizeString = EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TBM_SURFACE_QUEUE_SIZE);
   static int32_t queueSize       = queueSizeString ? std::atoi(queueSizeString) : DEFAULT_TBM_SURFACE_QUEUE_SIZE;
   return queueSize;
 }
index 2ceb29f..9fa63cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
 #include <dali/internal/system/common/logging.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <log.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::INFO;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
+
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
 
   switch(level)
   {
index 2f2a2bf..21d86b6 100644 (file)
@@ -25,6 +25,9 @@
 #include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <dali/integration-api/debug.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 #include <unordered_map>
 
 namespace Dali
@@ -38,24 +41,22 @@ namespace
 constexpr auto FORCE_TRIGGER_THRESHOLD = 128u; ///< Trigger TasksCompleted() forcely if the number of completed task contain too much.
 
 constexpr auto DEFAULT_NUMBER_OF_ASYNC_THREADS = size_t{8u};
-constexpr auto NUMBER_OF_ASYNC_THREADS_ENV     = "DALI_ASYNC_MANAGER_THREAD_POOL_SIZE";
 
 // The number of threads for low priority task.
 constexpr auto DEFAULT_NUMBER_OF_LOW_PRIORITY_THREADS = size_t{6u};
-constexpr auto NUMBER_OF_LOW_PRIORITY_THREADS_ENV     = "DALI_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE";
 
-size_t GetNumberOfThreads(const char* environmentVariable, size_t defaultValue)
+size_t GetNumberOfThreads(size_t defaultValue)
 {
-  auto           numberString          = EnvironmentVariable::GetEnvironmentVariable(environmentVariable);
+  auto           numberString          = EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ASYNC_MANAGER_THREAD_POOL_SIZE);
   auto           numberOfThreads       = numberString ? std::strtoul(numberString, nullptr, 10) : 0;
   constexpr auto MAX_NUMBER_OF_THREADS = 16u;
   DALI_ASSERT_DEBUG(numberOfThreads <= MAX_NUMBER_OF_THREADS);
   return (numberOfThreads > 0 && numberOfThreads <= MAX_NUMBER_OF_THREADS) ? numberOfThreads : defaultValue;
 }
 
-size_t GetNumberOfLowPriorityThreads(const char* environmentVariable, size_t defaultValue, size_t maxValue)
+size_t GetNumberOfLowPriorityThreads(size_t defaultValue, size_t maxValue)
 {
-  auto numberString    = EnvironmentVariable::GetEnvironmentVariable(environmentVariable);
+  auto numberString    = EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE);
   auto numberOfThreads = numberString ? std::strtoul(numberString, nullptr, 10) : 0;
   DALI_ASSERT_DEBUG(numberOfThreads <= maxValue);
   return (numberOfThreads > 0 && numberOfThreads <= maxValue) ? numberOfThreads : std::min(defaultValue, maxValue);
@@ -608,8 +609,8 @@ Dali::AsyncTaskManager AsyncTaskManager::Get()
 }
 
 AsyncTaskManager::AsyncTaskManager()
-: mTasks(GetNumberOfThreads(NUMBER_OF_ASYNC_THREADS_ENV, DEFAULT_NUMBER_OF_ASYNC_THREADS), [&]() { return TaskHelper(*this); }),
-  mAvaliableLowPriorityTaskCounts(GetNumberOfLowPriorityThreads(NUMBER_OF_LOW_PRIORITY_THREADS_ENV, DEFAULT_NUMBER_OF_LOW_PRIORITY_THREADS, mTasks.GetElementCount())),
+: mTasks(GetNumberOfThreads(DEFAULT_NUMBER_OF_ASYNC_THREADS), [&]() { return TaskHelper(*this); }),
+  mAvaliableLowPriorityTaskCounts(GetNumberOfLowPriorityThreads(DEFAULT_NUMBER_OF_LOW_PRIORITY_THREADS, mTasks.GetElementCount())),
   mWaitingHighProirityTaskCounts(0u),
   mTrigger(new EventThreadCallback(MakeCallback(this, &AsyncTaskManager::TasksCompleted))),
   mTasksCompletedImpl(new TasksCompletedImpl(*this, mTrigger.get())),
@@ -670,17 +671,20 @@ void AsyncTaskManager::AddTask(AsyncTaskPtr task)
     }
   }
 
-  size_t count = mTasks.GetElementCount();
-  size_t index = 0;
-  while(index++ < count)
   {
-    auto processHelperIt = mTasks.GetNext();
-    DALI_ASSERT_ALWAYS(processHelperIt != mTasks.End());
-    if(processHelperIt->Request())
+    Mutex::ScopedLock lock(mTasksMutex);
+    size_t            count = mTasks.GetElementCount();
+    size_t            index = 0;
+    while(index++ < count)
     {
-      break;
+      auto processHelperIt = mTasks.GetNext();
+      DALI_ASSERT_ALWAYS(processHelperIt != mTasks.End());
+      if(processHelperIt->Request())
+      {
+        break;
+      }
+      // If all threads are busy, then it's ok just to push the task because they will try to get the next job.
     }
-    // If all threads are busy, then it's ok just to push the task because they will try to get the next job.
   }
 
   // Register Process (Since mTrigger execute too late timing if event thread running a lots of events.)
index 7729ff5..4edf538 100644 (file)
@@ -270,6 +270,7 @@ private:
   Dali::Mutex mWaitingTasksMutex;   ///< Mutex for mWaitingTasks. We can lock mRunningTasksMutex and mCompletedTasksMutex under this scope.
   Dali::Mutex mRunningTasksMutex;   ///< Mutex for mRunningTasks. We can lock mCompletedTasksMutex under this scope.
   Dali::Mutex mCompletedTasksMutex; ///< Mutex for mCompletedTasks. We cannot lock any mutex under this scope.
+  Dali::Mutex mTasksMutex;          ///< Mutex for mTasks.        We cannot lock any mutex under this scope.
 
   std::unique_ptr<EventThreadCallback> mTrigger;
 
index 63ea73f..30c0102 100644 (file)
@@ -151,9 +151,31 @@ namespace Adaptor
 
 #define DALI_ENV_DISABLE_VSYNC_RENDER "DALI_DISABLE_VSYNC_RENDER"
 
+#define DALI_ENV_ENABLE_IMAGE_LOADER_PLUGIN "DALI_ENABLE_IMAGE_LOADER_PLUGIN"
+
+// Threshold time in miliseconds when we want to print the egl performance as a warning.
+#define DALI_ENV_EGL_PERFORMANCE_LOG_THRESHOLD_TIME "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME"
+
+#define DALI_ENV_TBM_SURFACE_QUEUE_SIZE "DALI_TBM_SURFACE_QUEUE_SIZE"
+
+#define DALI_ENV_ASYNC_MANAGER_THREAD_POOL_SIZE "DALI_ASYNC_MANAGER_THREAD_POOL_SIZE"
+
+#define DALI_ENV_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE "DALI_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE"
+
+// Glyph Cache
+#define DALI_ENV_MAX_NUMBER_OF_GLYPH_CACHE "DALI_GLYPH_CACHE_MAX"
+
+#define DALI_ENV_ENABLE_CACHE_RENDERED_GLYPH "DALI_ENABLE_CACHE_RENDERED_GLYPH"
+
+#define DALI_ENV_RENDERED_GLYPH_COMPRESS_POLICY "DALI_RENDERED_GLYPH_COMPRESS_POLICY"
+
 // Debug relative environments
 #define DALI_ENV_CURLOPT_VERBOSE_MODE "DALI_CURLOPT_VERBOSE_MODE"
 
+#define DALI_ENV_PRINT_LOG_LEVEL "DALI_PRINT_LOG_LEVEL"
+
+#define DALI_ENV_TRACE_ENABLE_PRINT_LOG "DALI_TRACE_ENABLE_PRINT_LOG"
+
 } // namespace Adaptor
 
 } // namespace Internal
index 5428f1a..b535cbc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
 // Dlog uses C style casts internally
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wold-style-cast"
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dlog.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::DEBUG;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
 
   switch(level)
   {
index 5ba89b6..4063aef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
 #include <dali/internal/system/common/logging.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <cstdio>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::INFO;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
 
   const char* format = NULL;
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
+
   switch(level)
   {
     case Dali::Integration::Log::DEBUG: ///< Gray color
index b3131bf..552330c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
 #include <dali/internal/system/common/logging.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <cstdio>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::INFO;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
+
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
 
   const char* format = NULL;
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
+
   switch(level)
   {
     case Dali::Integration::Log::DEBUG: ///< Gray color
index 4d04419..b734d8e 100644 (file)
@@ -2,7 +2,6 @@
 # module: text, backend: common
 SET( adaptor_text_common_src_files
     ${adaptor_text_dir}/text-abstraction/bidirectional-support-impl.cpp
-    ${adaptor_text_dir}/text-abstraction/cairo-renderer.cpp
     ${adaptor_text_dir}/text-abstraction/font-client-impl.cpp
     ${adaptor_text_dir}/text-abstraction/segmentation-impl.cpp
     ${adaptor_text_dir}/text-abstraction/shaping-impl.cpp
index d1d24a1..501bc5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -27,6 +27,7 @@
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/devel-api/adaptor-framework/file-loader.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/system/common/logging.h>
 #include <dali/internal/text/text-abstraction/font-client-impl.h>
 #include <dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.h>
@@ -81,7 +82,6 @@ extern Dali::Integration::Log::Filter* gFontClientLogFilter;
 
 namespace
 {
-
 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_FONT_PERFORMANCE_MARKER, false);
 
 /**
@@ -100,8 +100,7 @@ constexpr auto MAX_NUMBER_OF_GLYPH_CACHE_ENV = "DALI_GLYPH_CACHE_MAX";
  */
 inline size_t GetMaxNumberOfGlyphCache()
 {
-  using Dali::EnvironmentVariable::GetEnvironmentVariable;
-  static auto numberString = GetEnvironmentVariable(MAX_NUMBER_OF_GLYPH_CACHE_ENV);
+  static auto numberString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_MAX_NUMBER_OF_GLYPH_CACHE);
   static auto number       = numberString ? std::strtoul(numberString, nullptr, 10) : DEFAULT_GLYPH_CACHE_MAX;
   return (number < MINIMUM_SIZE_OF_GLYPH_CACHE_MAX) ? MINIMUM_SIZE_OF_GLYPH_CACHE_MAX : number;
 }
@@ -742,12 +741,12 @@ void FontClient::Plugin::CacheHandler::ValidateFont(const FontDescription& fontD
 
   if(matched && (nullptr != characterSet))
   {
-    #if defined(TRACE_ENABLED)
+#if defined(TRACE_ENABLED)
     if(gTraceFilter && gTraceFilter->IsTraceEnabled())
     {
       DALI_LOG_DEBUG_INFO("DALI_TEXT_VALIDATE_FONT : FcFontMatch : %s, style : %s, %s, %s\n", fontDescription.family.c_str(), FontWidth::Name[fontDescription.width], FontWeight::Name[fontDescription.weight], FontSlant::Name[fontDescription.slant]);
     }
-    #endif
+#endif
 
     // Add the path to the cache.
     description.type = FontDescription::FACE_FONT;
@@ -825,12 +824,12 @@ void FontClient::Plugin::CacheHandler::CacheFallbackFontList(FontDescription&&
 
   DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_FALLBACK_FONTLIST");
 
-  #if defined(TRACE_ENABLED)
+#if defined(TRACE_ENABLED)
   if(gTraceFilter && gTraceFilter->IsTraceEnabled())
   {
     DALI_LOG_DEBUG_INFO("DALI_TEXT_FALLBACK_FONTLIST : FcFontSort : %s\n", fontDescription.family.c_str());
   }
-  #endif
+#endif
 
   fontList         = new FontList;
   characterSetList = new CharacterSetList;
index c1d4bc8..18c5b97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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,6 +19,7 @@
 
 // INTERNAL HEADERS
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/text/text-abstraction/plugin/font-client-utils.h>
 #include <dali/internal/text/text-abstraction/plugin/font-face-cache-item.h>
 
@@ -44,7 +45,6 @@ constexpr float MAXIMUM_RATE_OF_BITMAP_GLYPH_CACHE_RESIZE = 1.5f;
  * @brief Behavior about cache the rendered glyph cache.
  */
 constexpr bool DEFAULT_ENABLE_CACHE_RENDERED_GLYPH = true;
-constexpr auto ENABLE_CACHE_RENDERED_GLYPH_ENV     = "DALI_ENABLE_CACHE_RENDERED_GLYPH";
 
 /**
  * @brief Get whether we allow to cache rendered glyph from environment.
@@ -54,8 +54,7 @@ constexpr auto ENABLE_CACHE_RENDERED_GLYPH_ENV     = "DALI_ENABLE_CACHE_RENDERED
  */
 inline bool EnableCacheRenderedGlyph()
 {
-  using Dali::EnvironmentVariable::GetEnvironmentVariable;
-  static auto numberString = GetEnvironmentVariable(ENABLE_CACHE_RENDERED_GLYPH_ENV);
+  static auto numberString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ENABLE_CACHE_RENDERED_GLYPH);
   static auto number       = numberString ? (std::strtoul(numberString, nullptr, 10) ? true : false) : DEFAULT_ENABLE_CACHE_RENDERED_GLYPH;
   return number;
 }
@@ -70,7 +69,6 @@ constexpr auto DEFAULT_RENDERED_GLYPH_COMPRESS_POLICY =
 #else
   GlyphCacheManager::CompressionPolicyType::SPEED; // If not tizen target
 #endif
-constexpr auto RENDERED_GLYPH_COMPRESS_POLICY_ENV = "DALI_RENDERED_GLYPH_COMPRESS_POLICY";
 
 /**
  * @brief Get whether we allow to cache rendered glyph from environment.
@@ -80,8 +78,7 @@ constexpr auto RENDERED_GLYPH_COMPRESS_POLICY_ENV = "DALI_RENDERED_GLYPH_COMPRES
  */
 inline GlyphCacheManager::CompressionPolicyType GetRenderedGlyphCompressPolicy()
 {
-  using Dali::EnvironmentVariable::GetEnvironmentVariable;
-  static auto policyString = GetEnvironmentVariable(RENDERED_GLYPH_COMPRESS_POLICY_ENV);
+  static auto policyString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_RENDERED_GLYPH_COMPRESS_POLICY);
 
   static auto policy = policyString ? policyString[0] == 's' || policyString[0] == 'S'   ? GlyphCacheManager::CompressionPolicyType::SPEED
                                       : policyString[0] == 'm' || policyString[0] == 'M' ? GlyphCacheManager::CompressionPolicyType::MEMORY
index 1b29267..34ac1ff 100644 (file)
@@ -65,7 +65,15 @@ TextAbstraction::TextRenderer TextRenderer::Get()
 
 Devel::PixelBuffer TextRenderer::Render(const TextAbstraction::TextRenderer::Parameters& parameters)
 {
-  return RenderTextCairo(parameters);
+  Dali::Pixel::Format      pixelFormat = parameters.pixelFormat == Dali::TextAbstraction::TextRenderer::Parameters::A8 ? Dali::Pixel::A8 : Dali::Pixel::RGBA8888;
+  Dali::Devel::PixelBuffer pixelBuffer = Dali::Devel::PixelBuffer::New(parameters.width,
+                                                                       parameters.height,
+                                                                       pixelFormat);
+  return pixelBuffer;
+
+  // This function allows you to render text using Cairo
+  // NOTE : Due to cairo being deprecated, this section is currently inactive.
+  // return RenderTextCairo(parameters);
 }
 
 } // namespace Internal
index c6dcc38..40dc8a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -33,9 +34,8 @@ namespace Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-static bool gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+static bool gTraceManagerEnablePrintLog = false;
 } // namespace
 
 TraceManagerAndroid* TraceManagerAndroid::traceManagerAndroid = nullptr;
@@ -43,7 +43,7 @@ TraceManagerAndroid* TraceManagerAndroid::traceManagerAndroid = nullptr;
 TraceManagerAndroid::TraceManagerAndroid(PerformanceInterface* performanceInterface)
 : TraceManager(performanceInterface)
 {
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 8fc85b9..912e0c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -33,9 +34,8 @@ namespace Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-static bool gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+static bool gTraceManagerEnablePrintLog = false;
 } // namespace
 
 TraceManagerGeneric* TraceManagerGeneric::traceManagerGeneric = nullptr;
@@ -43,7 +43,7 @@ TraceManagerGeneric* TraceManagerGeneric::traceManagerGeneric = nullptr;
 TraceManagerGeneric::TraceManagerGeneric(PerformanceInterface* performanceInterface)
 : TraceManager(performanceInterface)
 {
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 63536d5..a635153 100644 (file)
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/trace/streamline/streamline_annotate.h>
 
 ANNOTATE_DEFINE;
@@ -32,9 +33,8 @@ namespace Dali::Internal::Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-bool        gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+bool        gTraceManagerEnablePrintLog = false;
 } // namespace
 
 TraceManagerStreamline* TraceManagerStreamline::traceManagerStreamline = nullptr;
@@ -43,7 +43,7 @@ TraceManagerStreamline::TraceManagerStreamline(PerformanceInterface* performance
 : TraceManager(performanceInterface)
 {
   ANNOTATE_SETUP;
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 8061215..23988ec 100644 (file)
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -33,16 +34,15 @@ namespace Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-static bool gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+static bool gTraceManagerEnablePrintLog = false;
 
 } // namespace
 
 TraceManagerTizen::TraceManagerTizen(PerformanceInterface* performanceInterface)
 : TraceManager(performanceInterface)
 {
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 821da58..0d1e69d 100644 (file)
@@ -68,7 +68,10 @@ void WindowBaseAndroid::Initialize(PositionSize positionSize, Any surface, bool
 
 void WindowBaseAndroid::OnDeleteRequest()
 {
-  mDeleteRequestSignal.Emit();
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mDeleteRequestSignal.Emit();
+  }
 }
 
 void WindowBaseAndroid::OnFocusIn(void* data, int type, void* event)
index f3fdb2f..2b1e5c5 100644 (file)
@@ -91,8 +91,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -103,6 +102,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 52a049b..674ef63 100644 (file)
@@ -135,7 +135,10 @@ struct WindowBaseCocoa::Impl final
 
   void OnFocus(bool focus)
   {
-    mThis->mFocusChangedSignal.Emit(focus);
+    if(Dali::Adaptor::IsAvailable())
+    {
+      mThis->mFocusChangedSignal.Emit(focus);
+    }
   }
 
   // Handle mouse events
@@ -146,7 +149,10 @@ struct WindowBaseCocoa::Impl final
 
   void OnRedraw(void)
   {
-    mThis->mWindowRedrawRequestSignal.Emit();
+    if(Dali::Adaptor::IsAvailable())
+    {
+      mThis->mWindowRedrawRequestSignal.Emit();
+    }
   }
 
 private:
@@ -195,113 +201,125 @@ WindowBaseCocoa::Impl::~Impl()
 
 void WindowBaseCocoa::Impl::OnMouse(NSEvent *event, PointState::Type state)
 {
-  Integration::Point point;
-  point.SetDeviceId(event.deviceID);
-  point.SetState(state);
-  auto p = [event locationInWindow];
-  auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
-  point.SetScreenPosition(Vector2(x, y));
-  point.SetRadius(std::sqrt(x*x + y*y));
-  point.SetPressure(event.pressure);
-
-  if (x == 0.0)
+  if(Dali::Adaptor::IsAvailable())
   {
-    point.SetAngle(Degree(0.0));
-  }
-  else
-  {
-    point.SetAngle(Radian(std::atan(y/x)));
-  }
-
-  DALI_LOG_INFO(
-    gWindowBaseLogFilter,
-    Debug::Verbose,
-    "WindowBaseCocoa::Impl::OnMouse(%.1f, %.1f)\n",
-    x,
-    y
-  );
+    Integration::Point point;
+    point.SetDeviceId(event.deviceID);
+    point.SetState(state);
+    auto p = [event locationInWindow];
+    auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
+    point.SetScreenPosition(Vector2(x, y));
+    point.SetRadius(std::sqrt(x*x + y*y));
+    point.SetPressure(event.pressure);
+
+    if (x == 0.0)
+    {
+      point.SetAngle(Degree(0.0));
+    }
+    else
+    {
+      point.SetAngle(Radian(std::atan(y/x)));
+    }
+
+    DALI_LOG_INFO(
+      gWindowBaseLogFilter,
+      Debug::Verbose,
+      "WindowBaseCocoa::Impl::OnMouse(%.1f, %.1f)\n",
+      x,
+      y
+    );
 
-  // timestamp is given in seconds, the signal expects it in milliseconds
-  mThis->mTouchEventSignal.Emit(point, event.timestamp * 1000);
+    // timestamp is given in seconds, the signal expects it in milliseconds
+    mThis->mTouchEventSignal.Emit(point, event.timestamp * 1000);
+  }
 }
 
 void WindowBaseCocoa::Impl::OnMouseWheel(NSEvent *event)
 {
-  auto p = [event locationInWindow];
-  auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
-
-  const auto modifiers = GetKeyModifiers(event);
-  const Vector2 vec(x, y);
-  const auto timestamp = event.timestamp * 1000;
-
-  if (event.scrollingDeltaY)
+  if(Dali::Adaptor::IsAvailable())
   {
-    Integration::WheelEvent wheelEvent(
-      Integration::WheelEvent::MOUSE_WHEEL,
-      0,
-      modifiers,
-      vec,
-      event.scrollingDeltaY < 0 ? -1 : 1,
-      timestamp
-    );
+    auto p = [event locationInWindow];
+    auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
 
-    mThis->mWheelEventSignal.Emit(wheelEvent);
-  }
+    const auto modifiers = GetKeyModifiers(event);
+    const Vector2 vec(x, y);
+    const auto timestamp = event.timestamp * 1000;
 
-  if (event.scrollingDeltaX)
-  {
-    Integration::WheelEvent wheelEvent(
-      Integration::WheelEvent::MOUSE_WHEEL,
-      0,
-      modifiers,
-      vec,
-      event.scrollingDeltaX < 0 ? -1 : 1,
-      timestamp
-    );
-
-    mThis->mWheelEventSignal.Emit(wheelEvent);
+    if (event.scrollingDeltaY)
+    {
+      Integration::WheelEvent wheelEvent(
+        Integration::WheelEvent::MOUSE_WHEEL,
+        0,
+        modifiers,
+        vec,
+        event.scrollingDeltaY < 0 ? -1 : 1,
+        timestamp
+      );
+
+      mThis->mWheelEventSignal.Emit(wheelEvent);
+    }
+
+    if (event.scrollingDeltaX)
+    {
+      Integration::WheelEvent wheelEvent(
+        Integration::WheelEvent::MOUSE_WHEEL,
+        0,
+        modifiers,
+        vec,
+        event.scrollingDeltaX < 0 ? -1 : 1,
+        timestamp
+      );
+
+      mThis->mWheelEventSignal.Emit(wheelEvent);
+    }
   }
 }
 
 void WindowBaseCocoa::Impl::OnKey(NSEvent *event, Integration::KeyEvent::State keyState)
 {
-  const std::string empty;
-
-  Integration::KeyEvent keyEvent(
-    GetKeyName(event),
-    empty,
-    [event.characters UTF8String],
-    event.keyCode,
-    GetKeyModifiers(event),
-    event.timestamp * 1000,
-    keyState,
-    empty,
-    empty,
-    Device::Class::NONE,
-    Device::Subclass::NONE
-  );
+  if(Dali::Adaptor::IsAvailable())
+  {
+    const std::string empty;
+
+    Integration::KeyEvent keyEvent(
+      GetKeyName(event),
+      empty,
+      [event.characters UTF8String],
+      event.keyCode,
+      GetKeyModifiers(event),
+      event.timestamp * 1000,
+      keyState,
+      empty,
+      empty,
+      Device::Class::NONE,
+      Device::Subclass::NONE
+    );
 
-  DALI_LOG_INFO(
-    gWindowBaseLogFilter,
-    Debug::Verbose,
-    "WindowBaseCocoa::Impl::OnKey(%s)\n",
-    [event.characters UTF8String]
-  );
-  keyEvent.windowId = mThis->GetNativeWindowId();
+    DALI_LOG_INFO(
+      gWindowBaseLogFilter,
+      Debug::Verbose,
+      "WindowBaseCocoa::Impl::OnKey(%s)\n",
+      [event.characters UTF8String]
+    );
+    keyEvent.windowId = mThis->GetNativeWindowId();
 
-  mThis->mKeyEventSignal.Emit(keyEvent);
+    mThis->mKeyEventSignal.Emit(keyEvent);
+  }
 }
 
 void WindowBaseCocoa::Impl::OnWindowDamaged(const NSRect &rect)
 {
-  const DamageArea area(
-    rect.origin.x,
-    rect.origin.y,
-    rect.size.width,
-    rect.size.height
-  );
+  if(Dali::Adaptor::IsAvailable())
+  {
+    const DamageArea area(
+      rect.origin.x,
+      rect.origin.y,
+      rect.size.width,
+      rect.size.height
+    );
 
-  mThis->mWindowDamagedSignal.Emit(area);
+    mThis->mWindowDamagedSignal.Emit(area);
+  }
 }
 
 uint32_t WindowBaseCocoa::Impl::GetKeyModifiers(NSEvent *event) const noexcept
index f5e4acf..aae3152 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -84,8 +84,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest != enable)
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -96,6 +95,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 7c44c06..b394260 100644 (file)
@@ -712,7 +712,7 @@ Eina_Bool WindowBaseEcoreWl::OnIconifyStateChanged(void* data, int type, void* e
   Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent(static_cast<Ecore_Wl_Event_Window_Iconify_State_Change*>(event));
   Eina_Bool                                   handled(ECORE_CALLBACK_PASS_ON);
 
-  if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     if(iconifyChangedEvent->iconified == EINA_TRUE)
     {
@@ -732,7 +732,7 @@ Eina_Bool WindowBaseEcoreWl::OnFocusIn(void* data, int type, void* event)
 {
   Ecore_Wl_Event_Focus_In* focusInEvent(static_cast<Ecore_Wl_Event_Focus_In*>(event));
 
-  if(focusInEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(focusInEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n");
 
@@ -746,7 +746,7 @@ Eina_Bool WindowBaseEcoreWl::OnFocusOut(void* data, int type, void* event)
 {
   Ecore_Wl_Event_Focus_Out* focusOutEvent(static_cast<Ecore_Wl_Event_Focus_Out*>(event));
 
-  if(focusOutEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(focusOutEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n");
 
@@ -760,7 +760,7 @@ Eina_Bool WindowBaseEcoreWl::OnOutputTransform(void* data, int type, void* event
 {
   Ecore_Wl_Event_Output_Transform* transformEvent(static_cast<Ecore_Wl_Event_Output_Transform*>(event));
 
-  if(transformEvent->output == ecore_wl_window_output_find(mEcoreWindow))
+  if(transformEvent->output == ecore_wl_window_output_find(mEcoreWindow) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventOutputTransform\n", mEcoreWindow);
 
@@ -774,7 +774,7 @@ Eina_Bool WindowBaseEcoreWl::OnIgnoreOutputTransform(void* data, int type, void*
 {
   Ecore_Wl_Event_Ignore_Output_Transform* ignoreTransformEvent(static_cast<Ecore_Wl_Event_Ignore_Output_Transform*>(event));
 
-  if(ignoreTransformEvent->win == mEcoreWindow)
+  if(ignoreTransformEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow);
 
@@ -788,7 +788,7 @@ void WindowBaseEcoreWl::OnRotation(void* data, int type, void* event)
 {
   Ecore_Wl_Event_Window_Rotate* ev(static_cast<Ecore_Wl_Event_Window_Rotate*>(event));
 
-  if(ev->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(ev->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::OnRotation, angle: %d, width: %d, height: %d\n", ev->angle, ev->w, ev->h);
 
@@ -815,7 +815,7 @@ void WindowBaseEcoreWl::OnMouseButtonDown(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     PointState::Type state(PointState::DOWN);
 
@@ -851,7 +851,7 @@ void WindowBaseEcoreWl::OnMouseButtonUp(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     Device::Class::Type    deviceClass;
     Device::Subclass::Type deviceSubclass;
@@ -877,7 +877,7 @@ void WindowBaseEcoreWl::OnMouseButtonMove(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     Device::Class::Type    deviceClass;
     Device::Subclass::Type deviceSubclass;
@@ -903,7 +903,7 @@ void WindowBaseEcoreWl::OnMouseButtonCancel(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     Device::Class::Type    deviceClass;
     Device::Subclass::Type deviceSubclass;
@@ -931,7 +931,7 @@ void WindowBaseEcoreWl::OnMouseWheel(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
 
-  if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
 
@@ -943,23 +943,26 @@ void WindowBaseEcoreWl::OnMouseWheel(void* data, int type, void* event)
 
 void WindowBaseEcoreWl::OnDetentRotation(void* data, int type, void* event)
 {
-  Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
 
-  DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n");
+    DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n");
 
-  int direction = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
-  int timeStamp = detentEvent->timestamp;
+    int direction = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
+    int timeStamp = detentEvent->timestamp;
 
-  Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2(0.0f, 0.0f), direction, timeStamp);
+    Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2(0.0f, 0.0f), direction, timeStamp);
 
-  mWheelEventSignal.Emit(wheelEvent);
+    mWheelEventSignal.Emit(wheelEvent);
+  }
 }
 
 void WindowBaseEcoreWl::OnKeyDown(void* data, int type, void* event)
 {
   Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
 
-  if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n");
 
@@ -1014,7 +1017,7 @@ void WindowBaseEcoreWl::OnKeyUp(void* data, int type, void* event)
 {
   Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
 
-  if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+  if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n");
 
@@ -1076,22 +1079,34 @@ void WindowBaseEcoreWl::OnKeyUp(void* data, int type, void* event)
 
 void WindowBaseEcoreWl::OnDataSend(void* data, int type, void* event)
 {
-  mSelectionDataSendSignal.Emit(event);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mSelectionDataSendSignal.Emit(event);
+  }
 }
 
 void WindowBaseEcoreWl::OnDataReceive(void* data, int type, void* event)
 {
-  mSelectionDataReceivedSignal.Emit(event);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mSelectionDataReceivedSignal.Emit(event);
+  }
 }
 
 void WindowBaseEcoreWl::OnFontNameChanged()
 {
-  mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+  }
 }
 
 void WindowBaseEcoreWl::OnFontSizeChanged()
 {
-  mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+  }
 }
 
 void WindowBaseEcoreWl::RegistryGlobalCallback(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version)
index 105cf0f..d767e5b 100644 (file)
@@ -94,8 +94,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -106,6 +105,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index f63cd23..e263c32 100644 (file)
@@ -1108,7 +1108,7 @@ Eina_Bool WindowBaseEcoreWl2::OnIconifyStateChanged(void* data, int type, void*
   Ecore_Wl2_Event_Window_Iconify_State_Change* iconifyChangedEvent(static_cast<Ecore_Wl2_Event_Window_Iconify_State_Change*>(event));
   Eina_Bool                                    handled(ECORE_CALLBACK_PASS_ON);
 
-  if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     if(iconifyChangedEvent->iconified == EINA_TRUE)
     {
@@ -1130,7 +1130,7 @@ Eina_Bool WindowBaseEcoreWl2::OnFocusIn(void* data, int type, void* event)
 {
   Ecore_Wl2_Event_Focus_In* focusInEvent(static_cast<Ecore_Wl2_Event_Focus_In*>(event));
 
-  if(focusInEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(focusInEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnFocusIn, Window (%p) EcoreEventWindowFocusIn\n", mEcoreWindow);
 
@@ -1144,7 +1144,7 @@ Eina_Bool WindowBaseEcoreWl2::OnFocusOut(void* data, int type, void* event)
 {
   Ecore_Wl2_Event_Focus_Out* focusOutEvent(static_cast<Ecore_Wl2_Event_Focus_Out*>(event));
 
-  if(focusOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(focusOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnFocusOut, Window (%p) EcoreEventWindowFocusOut\n", mEcoreWindow);
 
@@ -1158,7 +1158,7 @@ Eina_Bool WindowBaseEcoreWl2::OnOutputTransform(void* data, int type, void* even
 {
   Ecore_Wl2_Event_Output_Transform* transformEvent(static_cast<Ecore_Wl2_Event_Output_Transform*>(event));
 
-  if(transformEvent->output == ecore_wl2_window_output_find(mEcoreWindow))
+  if(transformEvent->output == ecore_wl2_window_output_find(mEcoreWindow) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnOutputTransform, Window (%p) EcoreEventOutputTransform\n", mEcoreWindow);
 
@@ -1174,7 +1174,7 @@ Eina_Bool WindowBaseEcoreWl2::OnIgnoreOutputTransform(void* data, int type, void
 {
   Ecore_Wl2_Event_Ignore_Output_Transform* ignoreTransformEvent(static_cast<Ecore_Wl2_Event_Ignore_Output_Transform*>(event));
 
-  if(ignoreTransformEvent->win == mEcoreWindow)
+  if(ignoreTransformEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnIgnoreOutputTransform, Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow);
 
@@ -1190,7 +1190,7 @@ void WindowBaseEcoreWl2::OnRotation(void* data, int type, void* event)
 {
   Ecore_Wl2_Event_Window_Rotation* ev(static_cast<Ecore_Wl2_Event_Window_Rotation*>(event));
 
-  if(ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnRotation, Window (%p), angle: %d, width: %d, height: %d\n", mEcoreWindow, ev->angle, ev->w, ev->h);
 
@@ -1226,7 +1226,7 @@ void WindowBaseEcoreWl2::OnConfiguration(void* data, int type, void* event)
 {
   Ecore_Wl2_Event_Window_Configure* ev(static_cast<Ecore_Wl2_Event_Window_Configure*>(event));
 
-  if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     // Note: To comply with the wayland protocol, Dali should make an ack_configure
     // by calling ecore_wl2_window_commit
@@ -1278,7 +1278,7 @@ void WindowBaseEcoreWl2::OnMouseButtonDown(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_DOWN");
 
@@ -1320,7 +1320,7 @@ void WindowBaseEcoreWl2::OnMouseButtonUp(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_UP");
 
@@ -1349,7 +1349,7 @@ void WindowBaseEcoreWl2::OnMouseButtonMove(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_MOVE");
 
@@ -1378,7 +1378,7 @@ void WindowBaseEcoreWl2::OnMouseButtonRelativeMove(void* data, int type, void* e
 {
   Ecore_Event_Mouse_Relative_Move* relativeMoveEvent = static_cast<Ecore_Event_Mouse_Relative_Move*>(event);
 
-  if(relativeMoveEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(relativeMoveEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_RELATIVE_MOVE");
 
@@ -1399,7 +1399,7 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_CANCEL");
 
@@ -1430,7 +1430,7 @@ void WindowBaseEcoreWl2::OnPointerConstraints(void* data, int type, void* event)
 {
   Ecore_Wl2_Event_Pointer_Constraints* constraintsEvent = static_cast<Ecore_Wl2_Event_Pointer_Constraints*>(event);
 
-  if(constraintsEvent && constraintsEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(constraintsEvent && constraintsEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_POINTER_CONSTRAINTS");
     Dali::Int32Pair position(constraintsEvent->x, constraintsEvent->y);
@@ -1445,7 +1445,7 @@ void WindowBaseEcoreWl2::OnMouseWheel(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
 
-  if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_WHEEL");
 
@@ -1461,7 +1461,7 @@ void WindowBaseEcoreWl2::OnMouseInOut(void* data, int type, void* event, Dali::D
 {
   Ecore_Event_Mouse_IO* mouseInOutEvent = static_cast<Ecore_Event_Mouse_IO*>(event);
 
-  if(mouseInOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(mouseInOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_IN_OUT");
 
@@ -1484,19 +1484,21 @@ void WindowBaseEcoreWl2::OnDetentRotation(void* data, int type, void* event)
   Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
 
   DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnDetentRotation, Window (%p)\n", mEcoreWindow);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    int32_t clockwise = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
 
-  int32_t clockwise = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
-
-  Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, detentEvent->direction, 0, Vector2(0.0f, 0.0f), clockwise, detentEvent->timestamp);
+    Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, detentEvent->direction, 0, Vector2(0.0f, 0.0f), clockwise, detentEvent->timestamp);
 
-  mWheelEventSignal.Emit(wheelEvent);
+    mWheelEventSignal.Emit(wheelEvent);
+  }
 }
 
 void WindowBaseEcoreWl2::OnKeyDown(void* data, int type, void* event)
 {
   Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
 
-  if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     std::string keyName(keyEvent->keyname);
     std::string logicalKey("");
@@ -1568,7 +1570,7 @@ void WindowBaseEcoreWl2::OnKeyUp(void* data, int type, void* event)
 {
   Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
 
-  if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
 #if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23)
     // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything.
@@ -1638,162 +1640,190 @@ void WindowBaseEcoreWl2::OnKeyUp(void* data, int type, void* event)
 
 void WindowBaseEcoreWl2::OnDataSend(void* data, int type, void* event)
 {
-  mSelectionDataSendSignal.Emit(event);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mSelectionDataSendSignal.Emit(event);
+  }
 }
 
 void WindowBaseEcoreWl2::OnDataReceive(void* data, int type, void* event)
 {
-  mSelectionDataReceivedSignal.Emit(event);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mSelectionDataReceivedSignal.Emit(event);
+  }
 }
 
 void WindowBaseEcoreWl2::OnFontNameChanged()
 {
-  mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+  }
 }
 
 void WindowBaseEcoreWl2::OnFontSizeChanged()
 {
-  mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+  }
 }
 
 void WindowBaseEcoreWl2::OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type)
 {
   DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnTransitionEffectEvent, Window (%p)\n", mEcoreWindow);
-  mTransitionEffectEventSignal.Emit(state, type);
+
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mTransitionEffectEventSignal.Emit(state, type);
+  }
 }
 
 void WindowBaseEcoreWl2::OnKeyboardRepeatSettingsChanged()
 {
-  mKeyboardRepeatSettingsChangedSignal.Emit();
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mKeyboardRepeatSettingsChangedSignal.Emit();
+  }
 }
 
 void WindowBaseEcoreWl2::OnEcoreEventWindowRedrawRequest()
 {
-  mWindowRedrawRequestSignal.Emit();
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mWindowRedrawRequestSignal.Emit();
+  }
 }
 
 void WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage(void* event)
 {
-  Ecore_Wl2_Event_Aux_Message* message = static_cast<Ecore_Wl2_Event_Aux_Message*>(event);
-  if(message)
+  if(Dali::Adaptor::IsAvailable())
   {
-    DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), key:%s, value:%s \n", mEcoreWindow, message->key, message->val);
-    std::string           key(message->key);
-    std::string           value(message->val);
-    Dali::Property::Array options;
-
-    if(message->options)
+    Ecore_Wl2_Event_Aux_Message* message = static_cast<Ecore_Wl2_Event_Aux_Message*>(event);
+    if(message)
     {
-      Eina_List* l;
-      void*      data;
-      EINA_LIST_FOREACH(message->options, l, data)
+      DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), key:%s, value:%s \n", mEcoreWindow, message->key, message->val);
+      std::string           key(message->key);
+      std::string           value(message->val);
+      Dali::Property::Array options;
+
+      if(message->options)
       {
-        DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), option: %s\n", mEcoreWindow, (char*)data);
-        std::string option(static_cast<char*>(data));
-        options.Add(option);
+        Eina_List* l;
+        void*      data;
+        EINA_LIST_FOREACH(message->options, l, data)
+        {
+          DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), option: %s\n", mEcoreWindow, (char*)data);
+          std::string option(static_cast<char*>(data));
+          options.Add(option);
+        }
       }
-    }
 
-    mAuxiliaryMessageSignal.Emit(key, value, options);
+      mAuxiliaryMessageSignal.Emit(key, value, options);
+    }
   }
 }
 
 void WindowBaseEcoreWl2::OnEcoreEventConformantChange(void* event)
 {
-  Ecore_Wl2_Event_Conformant_Change* ev = static_cast<Ecore_Wl2_Event_Conformant_Change*>(event);
-  if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(Dali::Adaptor::IsAvailable())
   {
-    WindowInsetsPartType partType = WindowInsetsPartType::STATUS_BAR;
+    Ecore_Wl2_Event_Conformant_Change* ev = static_cast<Ecore_Wl2_Event_Conformant_Change*>(event);
+    if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+    {
+      WindowInsetsPartType partType = WindowInsetsPartType::STATUS_BAR;
 
-    int x = 0;
-    int y = 0;
-    int w = 0;
-    int h = 0;
+      int x = 0;
+      int y = 0;
+      int w = 0;
+      int h = 0;
 
-    switch(ev->part_type)
-    {
-      case ECORE_WL2_INDICATOR_PART:
-      {
-        partType = WindowInsetsPartType::STATUS_BAR;
-        ecore_wl2_window_indicator_geometry_get(mEcoreWindow, &x, &y, &w, &h);
-        break;
-      }
-      case ECORE_WL2_KEYBOARD_PART:
+      switch(ev->part_type)
       {
-        partType = WindowInsetsPartType::KEYBOARD;
-        ecore_wl2_window_keyboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
-        break;
-      }
-      case ECORE_WL2_CLIPBOARD_PART:
-      {
-        partType = WindowInsetsPartType::CLIPBOARD;
-        ecore_wl2_window_clipboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
-        break;
-      }
-      default:
-      {
-        break;
+        case ECORE_WL2_INDICATOR_PART:
+        {
+          partType = WindowInsetsPartType::STATUS_BAR;
+          ecore_wl2_window_indicator_geometry_get(mEcoreWindow, &x, &y, &w, &h);
+          break;
+        }
+        case ECORE_WL2_KEYBOARD_PART:
+        {
+          partType = WindowInsetsPartType::KEYBOARD;
+          ecore_wl2_window_keyboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
+          break;
+        }
+        case ECORE_WL2_CLIPBOARD_PART:
+        {
+          partType = WindowInsetsPartType::CLIPBOARD;
+          ecore_wl2_window_clipboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
+          break;
+        }
+        default:
+        {
+          break;
+        }
       }
-    }
 
-    WindowInsetsPartState partState = WindowInsetsPartState::INVISIBLE;
+      WindowInsetsPartState partState = WindowInsetsPartState::INVISIBLE;
 
-    int left   = 0;
-    int right  = 0;
-    int top    = 0;
-    int bottom = 0;
+      int left   = 0;
+      int right  = 0;
+      int top    = 0;
+      int bottom = 0;
 
-    // Insets are applied only if system UI(e.g. virtual keyboard) satisfies the following 2 conditions.
-    // 1. System UI fits to the window width or height.
-    // 2. System UI begins or ends from the edge of window.
-    // Otherwise, we should not resize window content because there would be empty space around system UI.
-    bool applyInsets = false;
+      // Insets are applied only if system UI(e.g. virtual keyboard) satisfies the following 2 conditions.
+      // 1. System UI fits to the window width or height.
+      // 2. System UI begins or ends from the edge of window.
+      // Otherwise, we should not resize window content because there would be empty space around system UI.
+      bool applyInsets = false;
 
-    // Zero insets are applied if state is invisible
-    if(!ev->state)
-    {
-      applyInsets = true;
-    }
-    else
-    {
-      partState = WindowInsetsPartState::VISIBLE;
-
-      int winX = mWindowPositionSize.x;
-      int winY = mWindowPositionSize.y;
-      int winW = mWindowPositionSize.width;
-      int winH = mWindowPositionSize.height;
-
-      if((x <= winX) && (x + w >= winX + winW))
+      // Zero insets are applied if state is invisible
+      if(!ev->state)
       {
-        if((y <= winY) && (y + h >= winY) && (y + h <= winY + winH))
-        {
-          top         = y + h - winY;
-          applyInsets = true;
-        }
-        else if((y + h >= winY + winH) && (y >= winY) && (y <= winY + winH))
-        {
-          bottom      = winY + winH - y;
-          applyInsets = true;
-        }
+        applyInsets = true;
       }
-      else if((y <= winY) && (y + h >= winY + winH))
+      else
       {
-        if((x <= winX) && (x + w >= winX) && (x + w <= winX + winW))
+        partState = WindowInsetsPartState::VISIBLE;
+
+        int winX = mWindowPositionSize.x;
+        int winY = mWindowPositionSize.y;
+        int winW = mWindowPositionSize.width;
+        int winH = mWindowPositionSize.height;
+
+        if((x <= winX) && (x + w >= winX + winW))
         {
-          left        = x + w - winX;
-          applyInsets = true;
+          if((y <= winY) && (y + h >= winY) && (y + h <= winY + winH))
+          {
+            top         = y + h - winY;
+            applyInsets = true;
+          }
+          else if((y + h >= winY + winH) && (y >= winY) && (y <= winY + winH))
+          {
+            bottom      = winY + winH - y;
+            applyInsets = true;
+          }
         }
-        else if((x + w >= winX + winW) && (x >= winX) && (x <= winX + winW))
+        else if((y <= winY) && (y + h >= winY + winH))
         {
-          right       = winX + winW - x;
-          applyInsets = true;
+          if((x <= winX) && (x + w >= winX) && (x + w <= winX + winW))
+          {
+            left        = x + w - winX;
+            applyInsets = true;
+          }
+          else if((x + w >= winX + winW) && (x >= winX) && (x <= winX + winW))
+          {
+            right       = winX + winW - x;
+            applyInsets = true;
+          }
         }
       }
-    }
 
-    if(applyInsets)
-    {
-      mInsetsChangedSignal.Emit(partType, partState, Extents(left, right, top, bottom));
+      if(applyInsets)
+      {
+        mInsetsChangedSignal.Emit(partType, partState, Extents(left, right, top, bottom));
+      }
     }
   }
 }
@@ -1812,7 +1842,7 @@ void WindowBaseEcoreWl2::KeymapChanged(void* data, int type, void* event)
 void WindowBaseEcoreWl2::OnMoveCompleted(void* event)
 {
   Ecore_Wl2_Event_Window_Interactive_Move_Done* movedDoneEvent = static_cast<Ecore_Wl2_Event_Window_Interactive_Move_Done*>(event);
-  if(movedDoneEvent && movedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(movedDoneEvent && movedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     Dali::PositionSize orgPositionSize(movedDoneEvent->x, movedDoneEvent->y, movedDoneEvent->w, movedDoneEvent->h);
     Dali::PositionSize newPositionSize = RecalculatePositionSizeToCurrentOrientation(orgPositionSize);
@@ -1825,7 +1855,7 @@ void WindowBaseEcoreWl2::OnMoveCompleted(void* event)
 void WindowBaseEcoreWl2::OnResizeCompleted(void* event)
 {
   Ecore_Wl2_Event_Window_Interactive_Resize_Done* resizedDoneEvent = static_cast<Ecore_Wl2_Event_Window_Interactive_Resize_Done*>(event);
-  if(resizedDoneEvent && resizedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)))
+  if(resizedDoneEvent && resizedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
   {
     Dali::PositionSize orgPositionSize(resizedDoneEvent->x, resizedDoneEvent->y, resizedDoneEvent->w, resizedDoneEvent->h);
     Dali::PositionSize newPositionSize = RecalculatePositionSizeToCurrentOrientation(orgPositionSize);
index 2b07113..24a5afa 100644 (file)
@@ -231,8 +231,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -243,6 +242,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index daf5247..fdcfa56 100644 (file)
@@ -351,7 +351,7 @@ void WindowBaseEcoreX::Initialize(PositionSize positionSize, Any surface, bool i
 void WindowBaseEcoreX::OnWindowConfigure(void* event)
 {
   auto configure = static_cast<Ecore_X_Event_Window_Configure*>(event);
-  if(configure->win == mEcoreWindow)
+  if(configure->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     Dali::PositionSize positionSize;
     positionSize.x      = configure->x;
@@ -367,7 +367,7 @@ Eina_Bool WindowBaseEcoreX::OnWindowPropertyChanged(void* data, int type, void*
   Ecore_X_Event_Window_Property* propertyChangedEvent = static_cast<Ecore_X_Event_Window_Property*>(event);
   Eina_Bool                      handled(ECORE_CALLBACK_PASS_ON);
 
-  if(propertyChangedEvent->win == mEcoreWindow)
+  if(propertyChangedEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     Ecore_X_Window_State_Hint state(ecore_x_icccm_state_get(propertyChangedEvent->win));
 
@@ -407,14 +407,17 @@ Eina_Bool WindowBaseEcoreX::OnWindowPropertyChanged(void* data, int type, void*
 
 void WindowBaseEcoreX::OnDeleteRequest()
 {
-  mDeleteRequestSignal.Emit();
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mDeleteRequestSignal.Emit();
+  }
 }
 
 void WindowBaseEcoreX::OnFocusIn(void* data, int type, void* event)
 {
   Ecore_X_Event_Window_Focus_In* focusInEvent = static_cast<Ecore_X_Event_Window_Focus_In*>(event);
 
-  if(focusInEvent->win == mEcoreWindow)
+  if(focusInEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n");
 
@@ -427,7 +430,7 @@ void WindowBaseEcoreX::OnFocusOut(void* data, int type, void* event)
   Ecore_X_Event_Window_Focus_Out* focusOutEvent = static_cast<Ecore_X_Event_Window_Focus_Out*>(event);
 
   // If the window loses focus then hide the keyboard.
-  if(focusOutEvent->win == mEcoreWindow)
+  if(focusOutEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n");
 
@@ -439,7 +442,7 @@ void WindowBaseEcoreX::OnWindowDamaged(void* data, int type, void* event)
 {
   Ecore_X_Event_Window_Damage* windowDamagedEvent = static_cast<Ecore_X_Event_Window_Damage*>(event);
 
-  if(windowDamagedEvent->win == mEcoreWindow)
+  if(windowDamagedEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DamageArea area;
     area.x      = windowDamagedEvent->x;
@@ -455,7 +458,7 @@ void WindowBaseEcoreX::OnMouseButtonDown(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == mEcoreWindow)
+  if(touchEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     PointState::Type state(PointState::DOWN);
 
@@ -479,7 +482,7 @@ void WindowBaseEcoreX::OnMouseButtonUp(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
 
-  if(touchEvent->window == mEcoreWindow)
+  if(touchEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     Integration::Point point;
     point.SetDeviceId(touchEvent->multi.device);
@@ -501,7 +504,7 @@ void WindowBaseEcoreX::OnMouseButtonMove(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
 
-  if(touchEvent->window == mEcoreWindow)
+  if(touchEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     Integration::Point point;
     point.SetDeviceId(touchEvent->multi.device);
@@ -519,7 +522,7 @@ void WindowBaseEcoreX::OnMouseWheel(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
 
-  if(mouseWheelEvent->window == mEcoreWindow)
+  if(mouseWheelEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
 
@@ -533,7 +536,7 @@ void WindowBaseEcoreX::OnKeyDown(void* data, int type, void* event)
 {
   Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
 
-  if(keyEvent->window == mEcoreWindow)
+  if(keyEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::OnKeyDown\n");
 
@@ -575,7 +578,7 @@ void WindowBaseEcoreX::OnKeyUp(void* data, int type, void* event)
 {
   Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
 
-  if(keyEvent->window == mEcoreWindow)
+  if(keyEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, " WindowBaseEcoreX::OnKeyUp\n");
 
@@ -632,7 +635,7 @@ void WindowBaseEcoreX::OnSelectionNotify(void* data, int type, void* event)
 {
   Ecore_X_Event_Selection_Notify* selectionNotifyEvent = static_cast<Ecore_X_Event_Selection_Notify*>(event);
 
-  if(selectionNotifyEvent->win == mEcoreWindow)
+  if(selectionNotifyEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, " WindowBaseEcoreX::OnSelectionNotify\n");
 
index 1812f24..daf0dc5 100644 (file)
@@ -90,8 +90,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -102,6 +101,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 7621a02..28f67a1 100644 (file)
@@ -82,7 +82,10 @@ void WindowBaseWin::Initialize(PositionSize positionSize, Any surface, bool isTr
 
 void WindowBaseWin::OnDeleteRequest()
 {
-  mDeleteRequestSignal.Emit();
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mDeleteRequestSignal.Emit();
+  }
 }
 
 void WindowBaseWin::OnFocusIn(int type, TWinEventInfo* event)
@@ -97,7 +100,7 @@ void WindowBaseWin::OnWindowDamaged(int type, TWinEventInfo* event)
 {
   Event_Mouse_Button* windowDamagedEvent((Event_Mouse_Button*)event);
 
-  if(windowDamagedEvent->window == mWin32Window)
+  if(windowDamagedEvent->window == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     DamageArea area;
     area.x = 0;
@@ -116,7 +119,7 @@ void WindowBaseWin::OnMouseButtonDown(int type, TWinEventInfo* event)
   touchEvent.y                  = HIWORD(event->lParam);
   touchEvent.multi.device       = DEVICE_MOUSE;
 
-  if(touchEvent.window == mWin32Window)
+  if(touchEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     PointState::Type state(PointState::DOWN);
 
@@ -140,7 +143,7 @@ void WindowBaseWin::OnMouseButtonUp(int type, TWinEventInfo* event)
   touchEvent.y                  = HIWORD(event->lParam);
   touchEvent.multi.device       = DEVICE_MOUSE;
 
-  if(touchEvent.window == mWin32Window)
+  if(touchEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     PointState::Type state(PointState::UP);
 
@@ -164,7 +167,7 @@ void WindowBaseWin::OnMouseButtonMove(int type, TWinEventInfo* event)
   touchEvent.y                  = HIWORD(event->lParam);
   touchEvent.multi.device       = DEVICE_MOUSE;
 
-  if(touchEvent.window == mWin32Window)
+  if(touchEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     PointState::Type state(PointState::MOTION);
 
@@ -184,7 +187,7 @@ void WindowBaseWin::OnMouseWheel(int type, TWinEventInfo* event)
 {
   Event_Mouse_Wheel mouseWheelEvent = *((Event_Mouse_Wheel*)(event));
 
-  if(mouseWheelEvent.window == mWin32Window)
+  if(mouseWheelEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent.direction, mouseWheelEvent.modifiers, mouseWheelEvent.x, mouseWheelEvent.y, mouseWheelEvent.z);
 
@@ -196,7 +199,7 @@ void WindowBaseWin::OnMouseWheel(int type, TWinEventInfo* event)
 
 void WindowBaseWin::OnKeyDown(int type, TWinEventInfo* event)
 {
-  if(event->mWindow == mWin32Window)
+  if(event->mWindow == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n");
 
@@ -220,7 +223,7 @@ void WindowBaseWin::OnKeyDown(int type, TWinEventInfo* event)
 
 void WindowBaseWin::OnKeyUp(int type, TWinEventInfo* event)
 {
-  if(event->mWindow == mWin32Window)
+  if(event->mWindow == mWin32Window && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n");
 
index 863d166..c11109e 100644 (file)
@@ -84,8 +84,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -96,6 +95,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index ab62841..da239ee 100644 (file)
@@ -357,7 +357,7 @@ bool WindowBaseX::OnWindowPropertyChanged(void* data, WindowSystemBase::Event ty
   bool handled(false);
 
   auto propertyNotifyEvent = static_cast<WindowSystem::WindowSystemX::X11PropertyNotifyEvent*>(event);
-  if(propertyNotifyEvent->window == mWindow)
+  if(propertyNotifyEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     WindowSystemX::WindowState state = WindowSystem::GetImplementation().GetWindowState(mWindow);
 
@@ -398,7 +398,7 @@ bool WindowBaseX::OnWindowPropertyChanged(void* data, WindowSystemBase::Event ty
 void WindowBaseX::OnConfigure(WindowSystemBase::EventBase* event)
 {
   auto configureEvent = static_cast<WindowSystemX::X11ConfigureNotifyEvent*>(event);
-  if(configureEvent->window == mWindow)
+  if(configureEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::OnConfigureNotify\n");
     Dali::PositionSize positionSize;
@@ -413,14 +413,17 @@ void WindowBaseX::OnConfigure(WindowSystemBase::EventBase* event)
 
 void WindowBaseX::OnDeleteRequest()
 {
-  mDeleteRequestSignal.Emit();
+  if(Dali::Adaptor::IsAvailable())
+  {
+    mDeleteRequestSignal.Emit();
+  }
 }
 
 void WindowBaseX::OnFocusIn(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
 {
   auto x11Event = static_cast<WindowSystemX::X11Event*>(event);
 
-  if(x11Event->window == mWindow)
+  if(x11Event->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::OnFocusIn\n");
 
@@ -432,7 +435,7 @@ void WindowBaseX::OnFocusOut(void* data, WindowSystemBase::Event, WindowSystemBa
 {
   auto x11Event = static_cast<WindowSystemX::X11Event*>(event);
   // If the window loses focus then hide the keyboard.
-  if(x11Event->window == mWindow)
+  if(x11Event->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::FocusOut\n");
 
@@ -443,7 +446,7 @@ void WindowBaseX::OnFocusOut(void* data, WindowSystemBase::Event, WindowSystemBa
 void WindowBaseX::OnWindowDamaged(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
 {
   auto windowExposeEvent = static_cast<WindowSystemX::X11ExposeEvent*>(event);
-  if(windowExposeEvent->window == mWindow)
+  if(windowExposeEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DamageArea area;
     area.x      = windowExposeEvent->x;
@@ -459,7 +462,7 @@ void WindowBaseX::OnMouseButtonDown(void* data, WindowSystemBase::Event type, Wi
 {
   auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
 
-  if(touchEvent->window == mWindow)
+  if(touchEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::ButtonDown\n");
     PointState::Type state(PointState::DOWN);
@@ -484,7 +487,7 @@ void WindowBaseX::OnMouseButtonUp(void* data, WindowSystemBase::Event type, Wind
 {
   auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
 
-  if(touchEvent->window == mWindow)
+  if(touchEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::ButtonUp\n");
     Integration::Point point;
@@ -507,7 +510,7 @@ void WindowBaseX::OnMouseButtonMove(void* data, WindowSystemBase::Event type, Wi
 {
   auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
 
-  if(touchEvent->window == mWindow)
+  if(touchEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     Integration::Point point;
     point.SetDeviceId(touchEvent->device);
@@ -525,7 +528,7 @@ void WindowBaseX::OnMouseWheel(void* data, WindowSystemBase::Event type, WindowS
 {
   auto mouseWheelEvent = static_cast<WindowSystemX::X11MouseWheelEvent*>(event);
 
-  if(mouseWheelEvent->window == mWindow)
+  if(mouseWheelEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseX::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
 
@@ -567,7 +570,7 @@ void WindowBaseX::OnKeyDown(void* data, WindowSystemBase::Event type, WindowSyst
 {
   auto keyEvent = static_cast<WindowSystemX::X11KeyEvent*>(event);
 
-  if(keyEvent->window == mWindow)
+  if(keyEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseX::OnKeyDown\n");
 
@@ -581,7 +584,7 @@ void WindowBaseX::OnKeyUp(void* data, WindowSystemBase::Event type, WindowSystem
 {
   auto keyEvent = static_cast<WindowSystemX::X11KeyEvent*>(event);
 
-  if(keyEvent->window == mWindow)
+  if(keyEvent->window == mWindow && Dali::Adaptor::IsAvailable())
   {
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, " WindowBaseX::OnKeyUp\n");
 
index 239c581..e626c5f 100644 (file)
@@ -1150,8 +1150,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -1162,6 +1161,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index a7c9768..9feb344 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 3;
-const unsigned int ADAPTOR_MICRO_VERSION = 20;
+const unsigned int ADAPTOR_MICRO_VERSION = 24;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 9e20008..de89f20 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.3.20
+Version:    2.3.24
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
@@ -67,8 +67,6 @@ BuildRequires:  fribidi-devel
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(capi-system-sensor)
 
-BuildRequires:  pkgconfig(cairo)
-
 BuildRequires:  pkgconfig(wayland-egl)
 BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  pkgconfig(input-method-client)