Merge "Added UIThreadLoader to GLIB framework" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 21 Sep 2023 15:36:59 +0000 (15:36 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 21 Sep 2023 15:36:59 +0000 (15:36 +0000)
46 files changed:
dali/devel-api/adaptor-framework/accessibility-bridge.h
dali/devel-api/adaptor-framework/drag-and-drop.cpp
dali/devel-api/adaptor-framework/drag-and-drop.h
dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/integration-api/adaptor-framework/scene-holder-impl.cpp
dali/integration-api/adaptor-framework/scene-holder-impl.h
dali/internal/accessibility/bridge/bridge-impl.cpp
dali/internal/accessibility/bridge/dummy/dummy-atspi.h
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp
dali/internal/drag-and-drop/common/drag-and-drop-impl.h
dali/internal/drag-and-drop/generic/drag-and-drop-impl-generic.cpp
dali/internal/drag-and-drop/generic/drag-and-drop-impl-generic.h
dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp
dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.h
dali/internal/imaging/android/native-image-source-impl-android.cpp
dali/internal/imaging/android/native-image-source-impl-android.h
dali/internal/imaging/common/native-bitmap-buffer-impl.cpp
dali/internal/imaging/common/native-bitmap-buffer-impl.h
dali/internal/imaging/common/native-image-source-impl.h
dali/internal/imaging/macos/native-image-source-factory-mac.cpp
dali/internal/imaging/macos/native-image-source-factory-mac.h
dali/internal/imaging/macos/native-image-source-impl-mac.cpp
dali/internal/imaging/macos/native-image-source-impl-mac.h
dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp
dali/internal/imaging/tizen/native-image-source-impl-tizen.h
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h
dali/internal/imaging/windows/native-image-source-factory-win.cpp
dali/internal/imaging/windows/native-image-source-factory-win.h
dali/internal/imaging/windows/native-image-source-impl-win.cpp
dali/internal/imaging/windows/native-image-source-impl-win.h
dali/internal/system/common/async-task-manager-impl.cpp
dali/internal/system/windows/callback-manager-win.cpp
dali/internal/system/windows/callback-manager-win.h
dali/internal/text/text-abstraction/bidirectional-support-impl.cpp
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/public-api/adaptor-framework/native-image-source.cpp
dali/public-api/adaptor-framework/native-image-source.h
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 22dbb5e..38ccd70 100644 (file)
@@ -160,6 +160,13 @@ struct DALI_ADAPTOR_API Bridge
   virtual Accessible* FindByPath(const std::string& path) const = 0;
 
   /**
+   * @brief Notifies accessibility dbus that window has just been created.
+   *
+   * @param[in] window The window to be created
+   */
+  virtual void WindowCreated(Window window) = 0;
+
+  /**
    * @brief Notifies accessibility dbus that window has just been shown.
    *
    * @param[in] window The window to be shown
index 707f691..9a7a5b4 100644 (file)
@@ -54,4 +54,14 @@ bool DragAndDrop::RemoveListener(Dali::Actor target)
   return GetImplementation(*this).RemoveListener(target);
 }
 
+bool DragAndDrop::AddListener(Dali::Window target, DragAndDropFunction callback)
+{
+  return GetImplementation(*this).AddListener(target, callback);
+}
+
+bool DragAndDrop::RemoveListener(Dali::Window target)
+{
+  return GetImplementation(*this).RemoveListener(target);
+}
+
 } // namespace Dali
index eb2dc89..6e66a33 100644 (file)
@@ -211,6 +211,23 @@ public:
    */
   bool RemoveListener(Dali::Actor target);
 
+  /**
+   * @brief Add the listener for receiving the drag and drop events.
+   *
+   * @param[in] target The drop target object.
+   * @param[in] callback A drag and drop event callback.
+   * @return bool true if the listener is added successfully.
+   */
+  bool AddListener(Dali::Window target, DragAndDropFunction callback);
+
+  /**
+   * @brief Remove the listener.
+   *
+   * @param[in] target The drop target object.
+   * @return bool true if the listener is removed successfully.
+   */
+  bool RemoveListener(Dali::Window target);
+
 public:
   /**
    * @brief This constructor is used by Adaptor::GetDragAndDrop().
index 765e66c..32ce990 100644 (file)
@@ -299,6 +299,11 @@ const TouchEvent& GetLastTouchEvent(Window window)
   return GetImplementation(window).GetLastTouchEvent();
 }
 
+const HoverEvent& GetLastHoverEvent(Window window)
+{
+  return GetImplementation(window).GetLastHoverEvent();
+}
+
 bool PointerConstraintsLock(Window window)
 {
   return GetImplementation(window).PointerConstraintsLock();
index 2f4e99a..eaed6a7 100644 (file)
@@ -33,6 +33,7 @@ namespace Dali
 {
 class KeyEvent;
 class TouchEvent;
+class HoverEvent;
 class WheelEvent;
 class RenderTaskList;
 struct TouchPoint;
@@ -540,6 +541,15 @@ DALI_ADAPTOR_API const KeyEvent& GetLastKeyEvent(Window window);
 DALI_ADAPTOR_API const TouchEvent& GetLastTouchEvent(Window window);
 
 /**
+ * @brief Gets the last hover event the window gets.
+ *
+ * @param[in] window The window instance.
+ * @return The last hover event the window gets.
+ * @note It returns the raw event the window gets. There is no hit-actor and local position information.
+ */
+DALI_ADAPTOR_API const HoverEvent& GetLastHoverEvent(Window window);
+
+/**
  * @brief Sets the pointer constraints lock.
  *
  * @param[in] window The window instance.
index e56b7ff..e5703e4 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali/integration-api/events/hover-event-integ.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/touch-integ.h>
 #include <dali/integration-api/events/wheel-event-integ.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/layer.h>
@@ -74,6 +75,8 @@ private:
 
 SceneHolder::SceneHolder()
 : mLifeCycleObserver(new SceneHolderLifeCycleObserver(mAdaptor)),
+  mLastTouchEvent(),
+  mLastHoverEvent(),
   mId(mSceneHolderCounter++),
   mSurface(nullptr),
   mAdaptor(nullptr),
@@ -307,11 +310,13 @@ void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp)
     // First the touch and/or hover event & related gesture events are queued
     if(type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH)
     {
+      mLastTouchEvent = Dali::Integration::NewTouchEvent(timeStamp, point);
       mScene.QueueEvent(touchEvent);
     }
 
     if(type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH)
     {
+      mLastHoverEvent = Dali::Integration::NewHoverEvent(timeStamp, point);
       mScene.QueueEvent(hoverEvent);
     }
 
@@ -320,6 +325,16 @@ void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp)
   }
 }
 
+const Dali::TouchEvent& SceneHolder::GetLastTouchEvent() const
+{
+  return mLastTouchEvent;
+}
+
+const Dali::HoverEvent& SceneHolder::GetLastHoverEvent() const
+{
+  return mLastHoverEvent;
+}
+
 void SceneHolder::FeedWheelEvent(Dali::Integration::WheelEvent& wheelEvent)
 {
   // Signals can be emitted while processing core events, and the scene holder could be deleted in the signal callback.
index c2e6c93..c4e8cdd 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/graphics-api/graphics-controller.h>
+#include <dali/integration-api/events/hover-event-integ.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/point.h>
 #include <dali/integration-api/events/touch-event-combiner.h>
 #include <dali/integration-api/scene.h>
 #include <dali/public-api/common/intrusive-ptr.h>
+#include <dali/public-api/events/hover-event.h>
+#include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/object/base-object.h>
 #include <atomic>
@@ -189,6 +192,20 @@ public:
   void FeedTouchPoint(Dali::Integration::Point& point, int timeStamp);
 
   /**
+   * @brief Get the Last Touch Event
+   *
+   * @return Dali::TouchEvent
+   */
+  const Dali::TouchEvent& GetLastTouchEvent() const;
+
+  /**
+   * @brief Get the Last Hover Event
+   *
+   * @return Dali::HoverEvent
+   */
+  const Dali::HoverEvent& GetLastHoverEvent() const;
+
+  /**
    * @copydoc Dali::Integration::SceneHolder::FeedWheelEvent
    */
   void FeedWheelEvent(Dali::Integration::WheelEvent& wheelEvent);
@@ -375,6 +392,8 @@ private:
 
   class SceneHolderLifeCycleObserver;
   std::unique_ptr<SceneHolderLifeCycleObserver> mLifeCycleObserver; ///< The adaptor life cycle observer
+  Dali::TouchEvent                              mLastTouchEvent;
+  Dali::HoverEvent                              mLastHoverEvent;
 
 protected:
   uint32_t                 mId;    ///< A unique ID to identify the SceneHolder starting from 0
index f76a0ea..2ebc048 100644 (file)
@@ -368,6 +368,21 @@ public:
   }
 
   /**
+   * @brief Sends a signal to dbus that the window is created.
+   *
+   * @param[in] window The window to be created
+   * @see BridgeObject::Emit()
+   */
+  void EmitCreated(Dali::Window window)
+  {
+    auto windowAccessible = mApplication.GetWindowAccessible(window);
+    if(windowAccessible)
+    {
+      windowAccessible->Emit(WindowEvent::CREATE, 0);
+    }
+  }
+
+  /**
    * @brief Sends a signal to dbus that the window is shown.
    *
    * @param[in] window The window to be shown
@@ -474,6 +489,17 @@ public:
   }
 
   /**
+   * @copydoc Dali::Accessibility::Bridge::WindowCreated()
+   */
+  void WindowCreated(Dali::Window window) override
+  {
+    if(IsUp())
+    {
+      EmitCreated(window);
+    }
+  }
+
+  /**
    * @copydoc Dali::Accessibility::Bridge::WindowShown()
    */
   void WindowShown(Dali::Window window) override
index 447ba4d..9e0035a 100644 (file)
@@ -77,6 +77,10 @@ struct DummyBridge : Dali::Accessibility::Bridge
     return nullptr;
   }
 
+  void WindowCreated(Window window) override
+  {
+  }
+
   void WindowShown(Window window) override
   {
   }
index 0f0b98e..648ef81 100644 (file)
@@ -601,7 +601,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     }
 
     //////////////////////////////
-    // TextureUploadRequest
+    // TextureUploadRequest (phase #1)
     //////////////////////////////
 
     // Upload requested resources after resource context activated.
@@ -686,8 +686,16 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       }
     }
 
+    //////////////////////////////
+    // TextureUploadRequest (phase #2)
+    //////////////////////////////
+
+    // Upload requested resources after resource context activated.
     graphics.ActivateResourceContext();
 
+    // Since uploadOnly value used at Update side, we should not change uploadOnly value now even some textures are uploaded.
+    mTextureUploadManager.ResourceUpload();
+
     if(mFirstFrameAfterResume)
     {
       // mFirstFrameAfterResume is set to true when the thread is resumed
index d2bfa43..7b6e4c9 100644 (file)
@@ -290,7 +290,7 @@ struct Clipboard::Impl
     mDataSelectedSignal.Emit(selectedType);
   }
 
-  uint32_t             mSerial{0u};
+  uint32_t             mSerial{std::numeric_limits<uint32_t>::max()};
   std::string          mMimeType;
   std::string          mData;
   Ecore_Event_Handler* mSendHandler{nullptr};
index 0a8c679..358beec 100644 (file)
@@ -63,6 +63,16 @@ public:
   virtual bool RemoveListener(Dali::Actor target) = 0;
 
   /**
+   * @copydoc Dali::DragAndDrop::AddListener()
+   */
+  virtual bool AddListener(Dali::Window window, Dali::DragAndDrop::DragAndDropFunction callback) = 0;
+
+  /**
+   * @copydoc Dali::DragAndDrop::RemoveListener()
+   */
+  virtual bool RemoveListener(Dali::Window target) = 0;
+
+  /**
    * @copydoc Dali::DragAndDrop::SendData()
    */
   virtual void SendData(void* event) = 0;
index 18abea7..3eecfdc 100644 (file)
@@ -76,6 +76,16 @@ bool DragAndDropGeneric::RemoveListener(Dali::Actor target)
   return true;
 }
 
+bool DragAndDropGeneric::AddListener(Dali::Window target, Dali::DragAndDrop::DragAndDropFunction callback)
+{
+  return true;
+}
+
+bool DragAndDropGeneric::RemoveListener(Dali::Window target)
+{
+  return true;
+}
+
 void DragAndDropGeneric::SendData(void* event)
 {
   return;
index 434f234..94ac7c8 100644 (file)
@@ -62,6 +62,16 @@ public:
   bool RemoveListener(Dali::Actor target) override;
 
   /**
+   * @copydoc Dali::DragAndDrop::AddListener()
+   */
+  bool AddListener(Dali::Window target, Dali::DragAndDrop::DragAndDropFunction callback) override;
+
+  /**
+   * @copydoc Dali::DragAndDrop::RemoveListener()
+   */
+  bool RemoveListener(Dali::Window target) override;
+
+  /**
    * @copydoc Dali::DragAndDrop::SendData()
    */
   void SendData(void* event) override;
index 43258d2..49c45ff 100644 (file)
@@ -261,6 +261,37 @@ bool DragAndDropEcoreWl::AddListener(Dali::Actor target, Dali::DragAndDrop::Drag
   return true;
 }
 
+bool DragAndDropEcoreWl::AddListener(Dali::Window target, Dali::DragAndDrop::DragAndDropFunction callback)
+{
+  std::vector<DropWindowTarget>::iterator itr;
+  for(itr = mDropWindowTargets.begin(); itr < mDropWindowTargets.end(); itr++)
+  {
+    if((*itr).target == target)
+    {
+      return false;
+    }
+  }
+
+  int windowId = INVALID_ECORE_WL2_WINDOW_ID;
+
+  Ecore_Wl2_Window* window = AnyCast<Ecore_Wl2_Window*>(target.GetNativeHandle());
+  if(window == nullptr)
+  {
+    return false;
+  }
+  windowId = ecore_wl2_window_id_get(window);
+
+  DropWindowTarget targetData;
+  targetData.target   = target;
+  targetData.callback = callback;
+  targetData.inside   = false;
+  targetData.windowId = windowId;
+
+  mDropWindowTargets.push_back(targetData);
+
+  return true;
+}
+
 bool DragAndDropEcoreWl::RemoveListener(Dali::Actor target)
 {
   std::vector<DropTarget>::iterator itr;
@@ -276,6 +307,21 @@ bool DragAndDropEcoreWl::RemoveListener(Dali::Actor target)
   return true;
 }
 
+bool DragAndDropEcoreWl::RemoveListener(Dali::Window target)
+{
+  std::vector<DropWindowTarget>::iterator itr;
+  for(itr = mDropWindowTargets.begin(); itr < mDropWindowTargets.end(); itr++)
+  {
+    if((*itr).target == target)
+    {
+      mDropWindowTargets.erase(itr);
+      break;
+    }
+  }
+
+  return true;
+}
+
 void DragAndDropEcoreWl::CallSourceEvent(Dali::DragAndDrop::SourceEventType type)
 {
   if(mSourceCallback)
@@ -302,6 +348,19 @@ void DragAndDropEcoreWl::ResetDropTargets()
     }
     mDropTargets[i].inside = false;
   }
+
+  for(std::size_t i = 0; i < mDropWindowTargets.size(); i++)
+  {
+    if(mDropWindowTargets[i].inside)
+    {
+      Dali::DragAndDrop::DragEvent dragEvent;
+      dragEvent.SetAction(Dali::DragAndDrop::DragType::LEAVE);
+      Dali::Vector2 position(DEFAULT_POSITION, DEFAULT_POSITION);
+      dragEvent.SetPosition(position);
+      mDropWindowTargets[i].callback(dragEvent);
+    }
+    mDropWindowTargets[i].inside = false;
+  }
 }
 
 void DragAndDropEcoreWl::SendData(void* event)
@@ -355,9 +414,17 @@ void DragAndDropEcoreWl::ReceiveData(void* event)
     Dali::DragAndDrop::DragEvent dragEvent(Dali::DragAndDrop::DragType::DROP, mPosition, ev->mimetype, ev->data);
     mDropTargets[mTargetIndex].callback(dragEvent);
     mDropTargets[mTargetIndex].inside = false;
-    ecore_wl2_offer_finish(ev->offer);
   }
   mTargetIndex = -1;
+
+  if(mWindowTargetIndex != -1)
+  {
+    Dali::DragAndDrop::DragEvent dragEvent(Dali::DragAndDrop::DragType::DROP, mWindowPosition, ev->mimetype, ev->data);
+    mDropWindowTargets[mWindowTargetIndex].callback(dragEvent);
+    mDropWindowTargets[mWindowTargetIndex].inside = false;
+  }
+  mWindowTargetIndex = -1;
+
 }
 
 Vector2 DragAndDropEcoreWl::RecalculatePositionByOrientation(int x, int y, Dali::Window window)
@@ -449,6 +516,50 @@ bool DragAndDropEcoreWl::CalculateDragEvent(void* event)
     }
   }
 
+  for(std::size_t i = 0; i < mDropWindowTargets.size(); i++)
+  {
+    if(ev->win != mDropWindowTargets[i].windowId)
+    {
+      continue;
+    }
+
+    // Recalculate Cursor by Orientation
+    Dali::Window window = mDropWindowTargets[i].target;
+    Dali::Window::WindowPosition position = window.GetPosition();
+    Dali::Window::WindowSize size = window.GetSize();
+
+    bool currentInside = IsIntersection(ev->x + position.GetX(), ev->y + position.GetY(), position.GetX(), position.GetY(), size.GetWidth(), size.GetHeight());
+
+    // Calculate Drag Enter, Leave, Move Event
+    if(currentInside && !mDropWindowTargets[i].inside)
+    {
+      mDropWindowTargets[i].inside = true;
+      // Call Enter Event
+      dragEvent.SetAction(Dali::DragAndDrop::DragType::ENTER);
+      dragEvent.SetPosition(curPosition);
+      mDropWindowTargets[i].callback(dragEvent);
+      // Accept Offer
+      ecore_wl2_offer_mimes_set(ev->offer, ecore_wl2_offer_mimes_get(ev->offer));
+    }
+    else if(!currentInside && mDropWindowTargets[i].inside)
+    {
+      mDropWindowTargets[i].inside = false;
+      // Call Leave Event
+      dragEvent.SetAction(Dali::DragAndDrop::DragType::LEAVE);
+      dragEvent.SetPosition(curPosition);
+      mDropWindowTargets[i].callback(dragEvent);
+      // Reject Offer
+      ecore_wl2_offer_accept(ev->offer, NULL);
+    }
+    else if(currentInside && mDropWindowTargets[i].inside)
+    {
+      // Call Move Event
+      dragEvent.SetAction(Dali::DragAndDrop::DragType::MOVE);
+      dragEvent.SetPosition(curPosition);
+      mDropWindowTargets[i].callback(dragEvent);
+    }
+  }
+
   return true;
 }
 
@@ -458,6 +569,7 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event)
 
   // Check the target object region
   mTargetIndex = -1;
+  mWindowTargetIndex = -1;
 
   for(std::size_t i = 0; i < mDropTargets.size(); i++)
   {
@@ -492,6 +604,36 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event)
     }
   }
 
+  for(std::size_t i = 0; i < mDropWindowTargets.size(); i++)
+  {
+    if(ev->win != mDropWindowTargets[i].windowId)
+    {
+      continue;
+    }
+
+    // Recalculate Cursor by Orientation
+    Dali::Window window = mDropWindowTargets[i].target;
+    Dali::Window::WindowPosition position = window.GetPosition();
+    Dali::Window::WindowSize size = window.GetSize();
+
+    // If the drop position is in the target object region, request drop data to the source object
+    if(IsIntersection(ev->x + position.GetX(), ev->y + position.GetY(), position.GetX(), position.GetY(), size.GetWidth(), size.GetHeight()))
+    {
+      mWindowTargetIndex = i;
+      mWindowPosition  = Dali::Vector2(position.GetX(), position.GetY());
+
+      char* mimetype = (char*)eina_array_data_get(ecore_wl2_offer_mimes_get(ev->offer), 0);
+      if(mimetype)
+      {
+        ecore_wl2_offer_receive(ev->offer, mimetype);
+        Ecore_Wl2_Display* display = ecore_wl2_connected_display_get(NULL);
+        Ecore_Wl2_Input*   input   = ecore_wl2_input_default_input_get(display);
+        ecore_wl2_display_flush(ecore_wl2_input_display_get(input));
+      }
+      return true;
+    }
+  }
+
   return false;
 }
 
index 18a0f7b..341f68e 100644 (file)
@@ -38,6 +38,14 @@ struct DropTarget
   int                                    parentWindowId;
 };
 
+struct DropWindowTarget
+{
+  Dali::Window                            target;
+  Dali::DragAndDrop::DragAndDropFunction  callback;
+  bool                                    inside;
+  int                                     windowId;
+};
+
 /**
  * DragAndDrop Implementation
  */
@@ -66,11 +74,21 @@ public:
   bool AddListener(Dali::Actor target, Dali::DragAndDrop::DragAndDropFunction callback) override;
 
   /**
+   * @copydoc Dali::DragAndDrop::AddListener()
+   */
+  bool AddListener(Dali::Window target, Dali::DragAndDrop::DragAndDropFunction callback) override;
+
+  /**
    * @copydoc Dali::DragAndDrop::RemoveListener()
    */
   bool RemoveListener(Dali::Actor target) override;
 
   /**
+   * @copydoc Dali::DragAndDrop::RemoveListener()
+   */
+  bool RemoveListener(Dali::Window target) override;
+
+  /**
    * @copydoc Dali::DragAndDrop::SendData()
    */
   void SendData(void* event) override;
@@ -125,7 +143,7 @@ private:
 
 private:
   Dali::Window                      mDragWindow;
-  uint32_t                          mSerial{0u};
+  uint32_t                          mSerial{std::numeric_limits<uint32_t>::max()};
   Ecore_Event_Handler*              mSendHandler{nullptr};
   Ecore_Event_Handler*              mSourceEndHandler{nullptr};
   Ecore_Event_Handler*              mSourceDropHandler{nullptr};
@@ -134,13 +152,16 @@ private:
   Ecore_Event_Handler*              mDropHandler{nullptr};
   Ecore_Event_Handler*              mEnterHandler{nullptr};
   Ecore_Event_Handler*              mLeaveHandler{nullptr};
-  int                               mTargetIndex{0};
+  int                               mTargetIndex{-1};
+  int                               mWindowTargetIndex{-1};
   std::string                       mMimeType;
   std::string                       mData;
   int                               mDataSize{0};
   Dali::Vector2                     mPosition;
+  Dali::Vector2                     mWindowPosition;
   Dali::DragAndDrop::SourceFunction mSourceCallback{nullptr};
   std::vector<DropTarget>           mDropTargets;
+  std::vector<DropWindowTarget>     mDropWindowTargets;
 }; // class DragAndDropEcoreWl
 
 } // namespace Adaptor
index 1b25af1..96a9f4f 100644 (file)
@@ -132,9 +132,9 @@ Any NativeImageSourceAndroid::GetNativeImageSource() const
   return Any(mPixmap);
 }
 
-bool NativeImageSourceAndroid::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceAndroid::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
 {
-  DALI_ASSERT_DEBUG(sizeof(unsigned) == 4);
+  DALI_ASSERT_DEBUG(sizeof(uint32_t) == 4);
   bool success = false;
 
   width  = mWidth;
@@ -182,8 +182,8 @@ bool NativeImageSourceAndroid::GetPixels(std::vector<unsigned char>& pixbuf, uns
     uint32_t size      = dstStride * bufferDescription.height;
     pixbuf.resize(size);
     //copy each row over
-    const unsigned char* ptrSrc = reinterpret_cast<const unsigned char*>(buffer);
-    unsigned char*       ptrDst = pixbuf.data();
+    const uint8_t* ptrSrc = reinterpret_cast<const uint8_t*>(buffer);
+    uint8_t*       ptrDst = pixbuf.data();
     for(int y = 0; y < bufferDescription.height; y++, ptrSrc += srcStride, ptrDst += dstStride)
     {
       memcpy(ptrDst, ptrSrc, dstStride);
index d735456..3da39a8 100644 (file)
@@ -64,7 +64,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
-  bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
+  bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
index cc7051b..3e7d7c0 100644 (file)
@@ -32,7 +32,7 @@ namespace Internal
 {
 namespace Adaptor
 {
-NativeBitmapBuffer::NativeBitmapBuffer(Adaptor* adaptor, unsigned int width, unsigned int height, Pixel::Format pFormat)
+NativeBitmapBuffer::NativeBitmapBuffer(Adaptor* adaptor, uint32_t width, uint32_t height, Pixel::Format pFormat)
 : mGlAbstraction(nullptr),
   mWidth(width),
   mHeight(height),
@@ -60,7 +60,7 @@ void NativeBitmapBuffer::PrepareTexture()
 
   Integration::ConvertToGlFormat(mPixelFormat, pixelDataType, pixelFormat);
 
-  const unsigned char* buf = mBuffer->Read();
+  const uint8_t* buf = mBuffer->Read();
 
   if(buf && buf != mLastReadBuffer) // Prevent same buffer being uploaded multiple times
   {
@@ -71,7 +71,7 @@ void NativeBitmapBuffer::PrepareTexture()
   }
 }
 
-void NativeBitmapBuffer::Write(const unsigned char* src, size_t size)
+void NativeBitmapBuffer::Write(const uint8_t* src, size_t size)
 {
   mBuffer->Write(src, size); // Write will cause LocklessBuffer to switch to the other buffer
 }
@@ -85,17 +85,17 @@ void NativeBitmapBuffer::DestroyResource()
 {
 }
 
-unsigned int NativeBitmapBuffer::TargetTexture()
+uint32_t NativeBitmapBuffer::TargetTexture()
 {
   return 0;
 }
 
-unsigned int NativeBitmapBuffer::GetWidth() const
+uint32_t NativeBitmapBuffer::GetWidth() const
 {
   return mWidth;
 }
 
-unsigned int NativeBitmapBuffer::GetHeight() const
+uint32_t NativeBitmapBuffer::GetHeight() const
 {
   return mHeight;
 }
index 64122cc..aa8f632 100644 (file)
@@ -51,7 +51,7 @@ public:
    * @param height height of image
    * @param pixelFormat pixel format for image
    */
-  NativeBitmapBuffer(Adaptor* adaptor, unsigned int width, unsigned int height, Pixel::Format pixelFormat);
+  NativeBitmapBuffer(Adaptor* adaptor, uint32_t width, uint32_t height, Pixel::Format pixelFormat);
 
   /**
    * virtual destructor
@@ -64,7 +64,7 @@ public:
    * @param[in] size size of data in bytes
    * @return true if successful, false if currently reading from buffer in render thread
    */
-  void Write(const unsigned char* src, size_t size);
+  void Write(const uint8_t* src, size_t size);
 
 public:
   /**
@@ -80,7 +80,7 @@ public:
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
    */
-  unsigned int TargetTexture() override;
+  uint32_t TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::PrepareTexture()
@@ -90,12 +90,12 @@ public:
   /**
    * @copydoc Dali::NativeImageInterface::GetWidth()
    */
-  unsigned int GetWidth() const override;
+  uint32_t GetWidth() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetHeight()
    */
-  unsigned int GetHeight() const override;
+  uint32_t GetHeight() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::RequiresBlending()
@@ -144,10 +144,10 @@ private:
   Integration::GlAbstraction* mGlAbstraction; ///< GlAbstraction used
 
   Integration::LocklessBuffer* mBuffer;         ///< bitmap data double buffered
-  unsigned int                 mWidth;          ///< Image width
-  unsigned int                 mHeight;         ///< Image height
+  uint32_t                     mWidth;          ///< Image width
+  uint32_t                     mHeight;         ///< Image height
   Pixel::Format                mPixelFormat;    ///< Image pixelformat
-  const unsigned char*         mLastReadBuffer; ///< last buffer that was read
+  const uint8_t*               mLastReadBuffer; ///< last buffer that was read
 };
 
 } // namespace Adaptor
index d990c62..6b90eb8 100644 (file)
@@ -58,7 +58,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
-  virtual bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const = 0;
+  virtual bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const = 0;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
index 04182e9..6584e98 100644 (file)
@@ -26,8 +26,8 @@ namespace Dali::Internal::Adaptor
 {
 std::unique_ptr<NativeImageSource>
 NativeImageSourceFactoryCocoa::CreateNativeImageSource(
-  unsigned int                        width,
-  unsigned int                        height,
+  uint32_t                            width,
+  uint32_t                            height,
   Dali::NativeImageSource::ColorDepth depth,
   Any                                 nativeImageSource)
 {
@@ -40,8 +40,8 @@ NativeImageSourceFactoryCocoa::CreateNativeImageSource(
 
 std::unique_ptr<NativeImageSourceQueue>
 NativeImageSourceFactoryCocoa::CreateNativeImageSourceQueue(
-  unsigned int                              width,
-  unsigned int                              height,
+  uint32_t                                  width,
+  uint32_t                                  height,
   Dali::NativeImageSourceQueue::ColorFormat colorFormat,
   Any                                       nativeImageSourceQueue)
 {
index afb0d89..d78de43 100644 (file)
@@ -26,14 +26,14 @@ class NativeImageSourceFactoryCocoa : public NativeImageSourceFactory
 {
 public:
   std::unique_ptr<NativeImageSource> CreateNativeImageSource(
-    unsigned int                        width,
-    unsigned int                        height,
+    uint32_t                            width,
+    uint32_t                            height,
     Dali::NativeImageSource::ColorDepth depth,
     Any                                 nativeImageSource) override;
 
   std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(
-    unsigned int                              width,
-    unsigned int                              height,
+    uint32_t                                  width,
+    uint32_t                                  height,
     Dali::NativeImageSourceQueue::ColorFormat colorFormat,
     Any                                       nativeImageSourceQueue) override;
 };
index f6ad654..21a9931 100644 (file)
@@ -32,8 +32,8 @@ namespace Dali::Internal::Adaptor
 using Dali::Integration::PixelBuffer;
 
 NativeImageSourceCocoa* NativeImageSourceCocoa::New(
-  unsigned int                        width,
-  unsigned int                        height,
+  uint32_t                            width,
+  uint32_t                            height,
   Dali::NativeImageSource::ColorDepth depth,
   Any                                 nativeImageSource)
 {
@@ -41,8 +41,8 @@ NativeImageSourceCocoa* NativeImageSourceCocoa::New(
 }
 
 NativeImageSourceCocoa::NativeImageSourceCocoa(
-  unsigned int                        width,
-  unsigned int                        height,
+  uint32_t                            width,
+  uint32_t                            height,
   Dali::NativeImageSource::ColorDepth depth,
   Any                                 nativeImageSource)
 : mImage(MakeRef<CGImageRef>(nullptr)),
@@ -119,12 +119,12 @@ Any NativeImageSourceCocoa::GetNativeImageSource() const
 
 bool NativeImageSourceCocoa::GetPixels(
   std::vector<uint8_t>& pixbuf,
-  unsigned&             width,
-  unsigned&             height,
+  uint32_t&             width,
+  uint32_t&             height,
   Pixel::Format&        pixelFormat) const
 {
-  width  = CGImageGetWidth(mImage.get());
-  height = CGImageGetHeight(mImage.get());
+  width  = static_cast<uint32_t>(CGImageGetWidth(mImage.get()));
+  height = static_cast<uint32_t>(CGImageGetHeight(mImage.get()));
   return true;
 }
 
@@ -146,7 +146,7 @@ void NativeImageSourceCocoa::DestroyResource()
 {
 }
 
-unsigned int NativeImageSourceCocoa::TargetTexture()
+uint32_t NativeImageSourceCocoa::TargetTexture()
 {
   return 0;
 }
@@ -175,14 +175,14 @@ Any NativeImageSourceCocoa::GetNativeImageHandle() const
   return Any(mImage.get());
 }
 
-unsigned int NativeImageSourceCocoa::GetWidth() const
+uint32_t NativeImageSourceCocoa::GetWidth() const
 {
-  return CGImageGetWidth(mImage.get());
+  return static_cast<uint32_t>(CGImageGetWidth(mImage.get()));
 }
 
-unsigned int NativeImageSourceCocoa::GetHeight() const
+uint32_t NativeImageSourceCocoa::GetHeight() const
 {
-  return CGImageGetHeight(mImage.get());
+  return static_cast<uint32_t>(CGImageGetHeight(mImage.get()));
 }
 
 bool NativeImageSourceCocoa::RequiresBlending() const
index 100fa74..864e3f9 100644 (file)
@@ -44,8 +44,8 @@ public:
    * @return A smart-pointer to a newly allocated image.
    */
   static NativeImageSourceCocoa* New(
-    unsigned int                        width,
-    unsigned int                        height,
+    uint32_t                            width,
+    uint32_t                            height,
     Dali::NativeImageSource::ColorDepth depth,
     Any                                 nativeImageSource);
 
@@ -58,10 +58,10 @@ public:
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
   bool GetPixels(
-    std::vector<unsigned char>& pixbuf,
-    unsigned int&               width,
-    unsigned int&               height,
-    Pixel::Format&              pixelFormat) const override;
+    std::vector<uint8_t>& pixbuf,
+    uint32_t&             width,
+    uint32_t&             height,
+    Pixel::Format&        pixelFormat) const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
@@ -91,7 +91,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
    */
-  unsigned int TargetTexture() override;
+  uint32_t TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageSource::PrepareTexture()
@@ -101,12 +101,12 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetWidth()
    */
-  unsigned int GetWidth() const override;
+  uint32_t GetWidth() const override;
 
   /**
    * @copydoc Dali::NativeImageSource::GetHeight()
    */
-  unsigned int GetHeight() const override;
+  uint32_t GetHeight() const override;
 
   /**
    * @copydoc Dali::NativeImageSource::RequiresBlending()
@@ -183,8 +183,8 @@ private:
    * @param[in] nativeImageSource contains either: pixmap of type Win32 Pixmap , a WinPixmap or is empty
    */
   NativeImageSourceCocoa(
-    unsigned int                        width,
-    unsigned int                        height,
+    uint32_t                            width,
+    uint32_t                            height,
     Dali::NativeImageSource::ColorDepth depth,
     Any                                 nativeImageSource);
 
index e5936b3..93d2861 100644 (file)
@@ -220,7 +220,7 @@ Any NativeImageSourceTizen::GetNativeImageSource() const
   return Any(mTbmSurface);
 }
 
-bool NativeImageSourceTizen::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceTizen::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
 {
   std::scoped_lock lock(mMutex);
   if(mTbmSurface != NULL)
@@ -237,9 +237,9 @@ bool NativeImageSourceTizen::GetPixels(std::vector<unsigned char>& pixbuf, unsig
       return false;
     }
 
-    tbm_format     format = surface_info.format;
-    uint32_t       stride = surface_info.planes[0].stride;
-    unsigned char* ptr    = surface_info.planes[0].ptr;
+    tbm_format format = surface_info.format;
+    uint32_t   stride = surface_info.planes[0].stride;
+    uint8_t*   ptr    = surface_info.planes[0].ptr;
 
     width  = mWidth;
     height = mHeight;
@@ -254,11 +254,11 @@ bool NativeImageSourceTizen::GetPixels(std::vector<unsigned char>& pixbuf, unsig
         lineSize    = width * 3;
         pixelFormat = Pixel::RGB888;
         pixbuf.resize(lineSize * height);
-        unsigned char* bufptr = &pixbuf[0];
+        uint8_t* bufptr = &pixbuf[0];
 
-        for(unsigned int r = 0; r < height; ++r, bufptr += lineSize)
+        for(uint32_t r = 0; r < height; ++r, bufptr += lineSize)
         {
-          for(unsigned int c = 0; c < width; ++c)
+          for(uint32_t c = 0; c < width; ++c)
           {
             cOffset                 = c * 3;
             offset                  = cOffset + r * stride;
@@ -274,11 +274,11 @@ bool NativeImageSourceTizen::GetPixels(std::vector<unsigned char>& pixbuf, unsig
         lineSize    = width * 4;
         pixelFormat = Pixel::RGBA8888;
         pixbuf.resize(lineSize * height);
-        unsigned char* bufptr = &pixbuf[0];
+        uint8_t* bufptr = &pixbuf[0];
 
-        for(unsigned int r = 0; r < height; ++r, bufptr += lineSize)
+        for(uint32_t r = 0; r < height; ++r, bufptr += lineSize)
         {
-          for(unsigned int c = 0; c < width; ++c)
+          for(uint32_t c = 0; c < width; ++c)
           {
             cOffset                 = c * 4;
             offset                  = cOffset + r * stride;
@@ -295,11 +295,11 @@ bool NativeImageSourceTizen::GetPixels(std::vector<unsigned char>& pixbuf, unsig
         lineSize    = width * 4;
         pixelFormat = Pixel::RGBA8888;
         pixbuf.resize(lineSize * height);
-        unsigned char* bufptr = &pixbuf[0];
+        uint8_t* bufptr = &pixbuf[0];
 
-        for(unsigned int r = 0; r < height; ++r, bufptr += lineSize)
+        for(uint32_t r = 0; r < height; ++r, bufptr += lineSize)
         {
-          for(unsigned int c = 0; c < width; ++c)
+          for(uint32_t c = 0; c < width; ++c)
           {
             cOffset                 = c * 4;
             offset                  = cOffset + r * stride;
@@ -397,7 +397,7 @@ bool NativeImageSourceTizen::IsColorDepthSupported(Dali::NativeImageSource::Colo
 
   if(tbm_surface_query_formats(&formats, &formatNum))
   {
-    for(unsigned int i = 0; i < formatNum; i++)
+    for(uint32_t i = 0; i < formatNum; i++)
     {
       if(formats[i] == format)
       {
@@ -534,8 +534,8 @@ Rect<uint32_t> NativeImageSourceTizen::GetUpdatedArea()
       return updatedArea;
     }
 
-    unsigned char* srcBuffer = info.planes[0].ptr;
-    unsigned char* dstBuffer = backBufferInfo.planes[0].ptr;
+    uint8_t* srcBuffer = info.planes[0].ptr;
+    uint8_t* dstBuffer = backBufferInfo.planes[0].ptr;
 
     uint32_t stride        = info.planes[0].stride;
     uint32_t bytesPerPixel = info.bpp >> 3;
index e2d1881..70f0340 100644 (file)
@@ -65,7 +65,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
-  bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
+  bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
index 144b826..3cf8ff8 100644 (file)
@@ -266,7 +266,7 @@ uint8_t* NativeImageSourceQueueTizen::DequeueBuffer(uint32_t& width, uint32_t& h
     return NULL;
   }
 
-  unsigned char* buffer = info.planes[0].ptr;
+  uint8_t* buffer = info.planes[0].ptr;
   if(!buffer)
   {
     DALI_LOG_ERROR("tbm buffer pointer is null! [%p]\n", tbmSurface);
index 16dcf9f..cbd5aa7 100644 (file)
@@ -197,8 +197,8 @@ private:
   bool CheckBlending(int format);
 
 private:
-  typedef std::pair<tbm_surface_h, void*> EglImagePair;
-  typedef std::pair<tbm_surface_h, void*> BufferPair;
+  typedef std::pair<tbm_surface_h, void*>    EglImagePair;
+  typedef std::pair<tbm_surface_h, uint8_t*> BufferPair;
 
   Dali::Mutex               mMutex;              ///< Mutex
   uint32_t                  mWidth;              ///< image width
index 49aeef5..7c86a3e 100644 (file)
@@ -147,9 +147,9 @@ Any NativeImageSourceX::GetNativeImageSource() const
   return Any(mPixmap);
 }
 
-bool NativeImageSourceX::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceX::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
 {
-  DALI_ASSERT_DEBUG(sizeof(unsigned) == 4);
+  DALI_ASSERT_DEBUG(sizeof(uint32_t) == 4);
   bool success = false;
   width        = mWidth;
   height       = mHeight;
@@ -184,18 +184,18 @@ bool NativeImageSourceX::GetPixels(std::vector<unsigned char>& pixbuf, unsigned&
       {
         pixelFormat = Pixel::RGB888;
         pixbuf.resize(width * height * 3);
-        unsigned char* bufPtr = &pixbuf[0];
+        uint8_t* bufPtr = &pixbuf[0];
 
-        for(unsigned y = 0; y < height; ++y)
+        for(uint32_t y = 0; y < height; ++y)
         {
-          for(unsigned x = 0; x < width; ++x, bufPtr += 3)
+          for(uint32_t x = 0; x < width; ++x, bufPtr += 3)
           {
-            const unsigned pixel = XGetPixel(pXImage, x, y);
+            const uint32_t pixel = XGetPixel(pXImage, x, y);
 
             // store as RGB
-            const unsigned blue  = pixel & 0xFFU;
-            const unsigned green = (pixel >> 8) & 0xFFU;
-            const unsigned red   = (pixel >> 16) & 0xFFU;
+            const uint32_t blue  = pixel & 0xFFU;
+            const uint32_t green = (pixel >> 8) & 0xFFU;
+            const uint32_t red   = (pixel >> 16) & 0xFFU;
 
             *bufPtr       = red;
             *(bufPtr + 1) = green;
@@ -212,12 +212,12 @@ bool NativeImageSourceX::GetPixels(std::vector<unsigned char>& pixbuf, unsigned&
           // Sweep through the image, doing a vertical flip, but handling each scanline as
           // an inlined intrinsic/builtin memcpy (should be fast):
           pixbuf.resize(width * height * 4);
-          unsigned*      bufPtr        = reinterpret_cast<unsigned*>(&pixbuf[0]);
-          const unsigned xDataLineSkip = pXImage->bytes_per_line;
+          uint32_t*      bufPtr        = reinterpret_cast<uint32_t*>(&pixbuf[0]);
+          const uint32_t xDataLineSkip = pXImage->bytes_per_line;
           const size_t   copy_count    = static_cast<size_t>(width) * 4;
           pixelFormat                  = Pixel::BGRA8888;
 
-          for(unsigned y = 0; y < height; ++y, bufPtr += width)
+          for(uint32_t y = 0; y < height; ++y, bufPtr += width)
           {
             const char* const in = pXImage->data + xDataLineSkip * y;
 
index 6890f0e..6745c64 100644 (file)
@@ -62,7 +62,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
-  bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
+  bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
index 75746d1..9cd362d 100644 (file)
@@ -28,12 +28,12 @@ namespace Internal
 {
 namespace Adaptor
 {
-std::unique_ptr<NativeImageSource> NativeImageSourceFactoryWin::CreateNativeImageSource(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+std::unique_ptr<NativeImageSource> NativeImageSourceFactoryWin::CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
 {
   return std::unique_ptr<NativeImageSource>(NativeImageSourceWin::New(width, height, depth, nativeImageSource));
 }
 
-std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
+std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
   return std::unique_ptr<NativeImageSourceQueue>(nullptr);
 }
index 05c882f..acae63b 100644 (file)
@@ -30,9 +30,9 @@ namespace Adaptor
 class NativeImageSourceFactoryWin : public NativeImageSourceFactory
 {
 public:
-  std::unique_ptr<NativeImageSource> CreateNativeImageSource(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
+  std::unique_ptr<NativeImageSource> CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
 
-  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
+  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
 };
 
 } // namespace Adaptor
index 181204e..11a8a87 100644 (file)
@@ -36,7 +36,7 @@ namespace Adaptor
 {
 using Dali::Integration::PixelBuffer;
 
-NativeImageSourceWin* NativeImageSourceWin::New(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+NativeImageSourceWin* NativeImageSourceWin::New(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
 {
   NativeImageSourceWin* image = new NativeImageSourceWin(width, height, depth, nativeImageSource);
   DALI_ASSERT_DEBUG(image && "NativeImageSource allocation failed.");
@@ -50,7 +50,7 @@ NativeImageSourceWin* NativeImageSourceWin::New(unsigned int width, unsigned int
   return image;
 }
 
-NativeImageSourceWin::NativeImageSourceWin(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+NativeImageSourceWin::NativeImageSourceWin(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
 : mWidth(width),
   mHeight(height),
   mOwnPixmap(true),
@@ -104,9 +104,9 @@ Any NativeImageSourceWin::GetNativeImageSource() const
   return Any(mPixmap);
 }
 
-bool NativeImageSourceWin::GetPixels(std::vector<uint8_t>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+bool NativeImageSourceWin::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
 {
-  DALI_ASSERT_DEBUG(sizeof(unsigned) == 4);
+  DALI_ASSERT_DEBUG(sizeof(uint32_t) == 4);
   bool success = false;
   width        = mWidth;
   height       = mHeight;
@@ -165,7 +165,7 @@ void NativeImageSourceWin::DestroyResource()
   }
 }
 
-unsigned int NativeImageSourceWin::TargetTexture()
+uint32_t NativeImageSourceWin::TargetTexture()
 {
   mEglImageExtensions->TargetTextureKHR(mEglImageKHR);
 
index d590782..88059d6 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/adaptor-framework/native-image-source.h>
 
 #include <dali/internal/imaging/common/native-image-source-impl.h>
+#include <cstdint>
 
 namespace Dali
 {
@@ -47,8 +48,8 @@ public:
    * @param[in] nativeImageSource contains either: pixmap of type Win32 Pixmap , a WinPixmap or is empty
    * @return A smart-pointer to a newly allocated image.
    */
-  static NativeImageSourceWin* New(unsigned int                        width,
-                                   unsigned int                        height,
+  static NativeImageSourceWin* New(uint32_t                            width,
+                                   uint32_t                            height,
                                    Dali::NativeImageSource::ColorDepth depth,
                                    Any                                 nativeImageSource);
   /**
@@ -59,7 +60,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
-  bool GetPixels(std::vector<unsigned char>& pixbuf, unsigned int& width, unsigned int& height, Pixel::Format& pixelFormat) const override;
+  bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
@@ -89,7 +90,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
    */
-  unsigned int TargetTexture() override;
+  uint32_t TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageSource::PrepareTexture()
@@ -99,7 +100,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetWidth()
    */
-  unsigned int GetWidth() const override
+  uint32_t GetWidth() const override
   {
     return mWidth;
   }
@@ -107,7 +108,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetHeight()
    */
-  unsigned int GetHeight() const override
+  uint32_t GetHeight() const override
   {
     return mHeight;
   }
@@ -189,8 +190,8 @@ private:
    * @param[in] colour depth of the image.
    * @param[in] nativeImageSource contains either: pixmap of type Win32 Pixmap , a WinPixmap or is empty
    */
-  NativeImageSourceWin(unsigned int                        width,
-                       unsigned int                        height,
+  NativeImageSourceWin(uint32_t                            width,
+                       uint32_t                            height,
                        Dali::NativeImageSource::ColorDepth depth,
                        Any                                 nativeImageSource);
 
@@ -220,8 +221,8 @@ private:
   void GetPixmapDetails();
 
 private:
-  unsigned int                         mWidth;                       ///< image width
-  unsigned int                         mHeight;                      ///< image heights
+  uint32_t                             mWidth;                       ///< image width
+  uint32_t                             mHeight;                      ///< image heights
   bool                                 mOwnPixmap;                   ///< Whether we created pixmap or not
   unsigned int                         mPixmap;                      ///< From Windows
   bool                                 mBlendingRequired;            ///< Whether blending is required
index 1c6ded4..6a3eaf1 100644 (file)
@@ -35,6 +35,8 @@ namespace Adaptor
 {
 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";
 
@@ -591,7 +593,7 @@ void AsyncTaskManager::CompleteTask(AsyncTaskPtr&& task)
 
   if(task)
   {
-    const bool needTrigger = task->GetCallbackInvocationThread() == AsyncTask::ThreadType::MAIN_THREAD;
+    bool needTrigger = (task->GetCallbackInvocationThread() == AsyncTask::ThreadType::MAIN_THREAD);
 
     // Lock while check validation of task.
     {
@@ -655,6 +657,11 @@ void AsyncTaskManager::CompleteTask(AsyncTaskPtr&& task)
           CacheImpl::EraseTaskCache(mCacheImpl->mRunningTasksCache, task, iter);
           mRunningTasks.erase(iter);
 
+          if(!needTrigger)
+          {
+            needTrigger |= (mCompletedTasks.size() >= FORCE_TRIGGER_THRESHOLD);
+          }
+
           // Now, task is invalidate.
           task.Reset();
         }
index f57945a..6614ff3 100644 (file)
@@ -36,9 +36,40 @@ namespace Internal
 {\r
 namespace Adaptor\r
 {\r
+/**\r
+ * Structure contains the callback function and control options\r
+ */\r
+struct WindowsCallbackData\r
+{\r
+  /**\r
+   * Constructor\r
+   */\r
+  WindowsCallbackData(CallbackBase* callback, bool hasReturnValue)\r
+  : mCallback(callback),\r
+    mHasReturnValue(hasReturnValue)\r
+  {\r
+  }\r
+  /**\r
+   * Destructor\r
+   */\r
+  ~WindowsCallbackData()\r
+  {\r
+    delete mCallback;\r
+  }\r
+\r
+  CallbackBase* mCallback;       ///< call back\r
+  bool          mHasReturnValue; ///< true if the callback function has a return value.\r
+};\r
+\r
 WinCallbackManager::WinCallbackManager()\r
 : mRunning(false)\r
 {\r
+  mSelfCallback = MakeCallback(this, &WinCallbackManager::ProcessIdleFromFramework);\r
+}\r
+\r
+WinCallbackManager::~WinCallbackManager()\r
+{\r
+  delete mSelfCallback;\r
 }\r
 \r
 void WinCallbackManager::Start()\r
@@ -52,6 +83,8 @@ void WinCallbackManager::Stop()
   // make sure we're not called twice\r
   DALI_ASSERT_DEBUG(mRunning == true);\r
 \r
+  ClearIdleCallbacks();\r
+\r
   mRunning = false;\r
 }\r
 \r
@@ -62,35 +95,97 @@ bool WinCallbackManager::AddIdleCallback(CallbackBase* callback, bool hasReturnV
     return false;\r
   }\r
 \r
-  mCallbacks.insert(callback);\r
+  WindowsCallbackData* callbackData = new WindowsCallbackData(callback, hasReturnValue);\r
 \r
-  WindowsPlatform::PostWinThreadMessage(WIN_CALLBACK_EVENT, reinterpret_cast<uint64_t>(callback), 0);\r
+  mCallbackContainer.push_back(callbackData);\r
+\r
+  if(!mSelfCallbackRegistered)\r
+  {\r
+    // Post only one times.\r
+    mSelfCallbackRegistered = true;\r
+    WindowsPlatform::PostWinThreadMessage(WIN_CALLBACK_EVENT, reinterpret_cast<uint64_t>(mSelfCallback), 0);\r
+  }\r
 \r
   return true;\r
 }\r
 \r
 void WinCallbackManager::RemoveIdleCallback(CallbackBase* callback)\r
 {\r
-  //Wait for deal\r
+  for(auto iter = mCallbackContainer.begin(), endIter = mCallbackContainer.end(); iter != endIter; ++iter)\r
+  {\r
+    auto* callbackData = *iter;\r
+\r
+    if(callbackData->mCallback == callback)\r
+    {\r
+      // delete our data\r
+      delete callbackData;\r
+\r
+      // Set stored value as nullptr. It will be removed from container after ProcessIdle()\r
+      (*iter) = nullptr;\r
+\r
+      return;\r
+    }\r
+  }\r
 }\r
 \r
 bool WinCallbackManager::ProcessIdle()\r
 {\r
-  const bool idleProcessed = !mCallbacks.empty();\r
+  mSelfCallbackRegistered = false;\r
+\r
+  const bool idleProcessed = !mCallbackContainer.empty();\r
+\r
+  for(auto iter = mCallbackContainer.begin(); iter != mCallbackContainer.end();)\r
+  {\r
+    auto* callbackData = *iter;\r
+    bool  removed      = true;\r
+    if(callbackData)\r
+    {\r
+      if(callbackData->mHasReturnValue)\r
+      {\r
+        const bool retValue = Dali::CallbackBase::ExecuteReturn<bool>(*(callbackData->mCallback));\r
+\r
+        // Do not remove callback if return value is true.\r
+        removed = !retValue;\r
+      }\r
+      else\r
+      {\r
+        Dali::CallbackBase::Execute(*(callbackData->mCallback));\r
+      }\r
+    }\r
+\r
+    if(removed)\r
+    {\r
+      delete (*iter);\r
+      iter = mCallbackContainer.erase(iter);\r
+    }\r
+    else\r
+    {\r
+      ++iter;\r
+    }\r
+  }\r
 \r
-  // @todo : Need to consider callback with return & don't erase callback when it return true.\r
-  for(CallbackBase* cb : mCallbacks)\r
+  // Re-register WIN_CALLBACK_EVENT when some idle callback remained.\r
+  if(!mCallbackContainer.empty())\r
   {\r
-    Dali::CallbackBase::Execute(*cb);\r
+    if(!mSelfCallbackRegistered)\r
+    {\r
+      // Post only one times.\r
+      mSelfCallbackRegistered = true;\r
+      WindowsPlatform::PostWinThreadMessage(WIN_CALLBACK_EVENT, reinterpret_cast<uint64_t>(mSelfCallback), 0);\r
+    }\r
   }\r
-  mCallbacks.clear();\r
 \r
   return idleProcessed;\r
 }\r
 \r
 void WinCallbackManager::ClearIdleCallbacks()\r
 {\r
-  mCallbacks.clear();\r
+  for(auto iter = mCallbackContainer.begin(), endIter = mCallbackContainer.end(); iter != endIter; ++iter)\r
+  {\r
+    auto* callbackData = *iter;\r
+    delete callbackData;\r
+  }\r
+  mCallbackContainer.clear();\r
 }\r
 \r
 bool WinCallbackManager::AddIdleEntererCallback(CallbackBase* callback)\r
@@ -100,6 +195,12 @@ bool WinCallbackManager::AddIdleEntererCallback(CallbackBase* callback)
 \r
 void WinCallbackManager::RemoveIdleEntererCallback(CallbackBase* callback)\r
 {\r
+  RemoveIdleCallback(callback);\r
+}\r
+\r
+void WinCallbackManager::ProcessIdleFromFramework()\r
+{\r
+  ProcessIdle();\r
 }\r
 \r
 } // namespace Adaptor\r
index b648425..f92d551 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <set>
+#include <dali/public-api/common/list-wrapper.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/system/common/callback-manager.h>
@@ -30,8 +30,10 @@ namespace Internal
 {
 namespace Adaptor
 {
+struct WindowsCallbackData;
+
 /**
- * @brief LibUV callback manager used to install call backs in the applications main loop.
+ * @brief Windows callback manager used to install call backs in the applications main loop.
  * The manager keeps track of all callbacks, so that if Stop() is called it can remove them.
  */
 class WinCallbackManager : public CallbackManager
@@ -45,9 +47,7 @@ public:
   /**
    * @brief destructor
    */
-  ~WinCallbackManager()
-  {
-  }
+  ~WinCallbackManager();
 
   /**
    * @copydoc CallbackManager::AddIdleCallback()
@@ -110,9 +110,20 @@ private:
   WinCallbackManager(const WinCallbackManager&) = delete;
   WinCallbackManager& operator=(WinCallbackManager&) = delete;
 
+  /**
+   * @brief Callback function comes from framework.
+   * It will be self callback.
+   */
+  void ProcessIdleFromFramework();
+
 private:
-  std::set<CallbackBase*> mCallbacks;
-  bool                    mRunning; ///< flag is set to true if when running
+  CallbackBase* mSelfCallback{nullptr};
+  bool          mSelfCallbackRegistered{false}; ///< flag is set to true if we send processIdle callback register.
+
+  typedef std::list<WindowsCallbackData*> CallbackList;
+
+  CallbackList mCallbackContainer;
+  bool         mRunning; ///< flag is set to true if when running
 };
 
 } // namespace Adaptor
index afa9d7e..726ac92 100644 (file)
@@ -63,30 +63,6 @@ bool GetBidiParagraphDirection(FriBidiParType paragraphDirection)
 
   return false;
 }
-
-BidiDirection GetBidiCharacterDirection(FriBidiCharType characterDirection)
-{
-  switch(characterDirection)
-  {
-    case FRIBIDI_TYPE_LTR: // Left-To-Right letter.
-    {
-      return LEFT_TO_RIGHT;
-    }
-    case FRIBIDI_TYPE_AL:  // Arabic Letter.
-    case FRIBIDI_TYPE_RTL: // Right-To-Left letter.
-    {
-      return RIGHT_TO_LEFT;
-    }
-    case FRIBIDI_TYPE_AN: // Arabic Numeral.
-    case FRIBIDI_TYPE_ES: // European number Separator.
-    case FRIBIDI_TYPE_ET: // European number Terminator.
-    case FRIBIDI_TYPE_EN: // European Numeral.
-    default:
-    {
-      return NEUTRAL;
-    }
-  }
-}
 } // namespace
 
 struct BidirectionalSupport::Plugin
@@ -96,9 +72,10 @@ struct BidirectionalSupport::Plugin
    */
   struct BidirectionalInfo
   {
-    FriBidiCharType* characterTypes;     ///< The type of each character (right, left, neutral, ...)
-    FriBidiLevel*    embeddedLevels;     ///< Embedded levels.
-    FriBidiParType   paragraphDirection; ///< The paragraph's direction.
+    FriBidiCharType*    characterTypes;     ///< The type of each character (right, left, neutral, ...)
+    FriBidiBracketType* bracketTypes;       ///< Input list of bracket types as returned by fribidi_get_bracket_types().
+    FriBidiLevel*       embeddedLevels;     ///< Embedded levels.
+    FriBidiParType      paragraphDirection; ///< The paragraph's direction.
   };
 
   Plugin()
@@ -119,6 +96,7 @@ struct BidirectionalSupport::Plugin
 
       free(info->embeddedLevels);
       free(info->characterTypes);
+      free(info->bracketTypes);
       delete info;
     }
   }
@@ -152,10 +130,21 @@ struct BidirectionalSupport::Plugin
     // Retrieve the paragraph's direction.
     bidirectionalInfo->paragraphDirection = matchLayoutDirection == true ? (layoutDirection == LayoutDirection::RIGHT_TO_LEFT ? FRIBIDI_PAR_RTL : FRIBIDI_PAR_LTR) : (fribidi_get_par_direction(bidirectionalInfo->characterTypes, numberOfCharacters));
 
+    bidirectionalInfo->bracketTypes = reinterpret_cast<FriBidiBracketType*>(malloc(numberOfCharacters * sizeof(FriBidiBracketType)));
+    if(!bidirectionalInfo->bracketTypes)
+    {
+      free(bidirectionalInfo->bracketTypes);
+      delete bidirectionalInfo;
+      return 0;
+    }
+
+    fribidi_get_bracket_types(paragraph, numberOfCharacters, bidirectionalInfo->characterTypes, bidirectionalInfo->bracketTypes);
+
     // Retrieve the embedding levels.
-    if(fribidi_get_par_embedding_levels(bidirectionalInfo->characterTypes, numberOfCharacters, &bidirectionalInfo->paragraphDirection, bidirectionalInfo->embeddedLevels) == 0)
+    if(fribidi_get_par_embedding_levels_ex(bidirectionalInfo->characterTypes, bidirectionalInfo->bracketTypes, numberOfCharacters, &bidirectionalInfo->paragraphDirection, bidirectionalInfo->embeddedLevels) == 0)
     {
       free(bidirectionalInfo->characterTypes);
+      free(bidirectionalInfo->bracketTypes);
       delete bidirectionalInfo;
       return 0;
     }
@@ -198,6 +187,7 @@ struct BidirectionalSupport::Plugin
       // Free resources and destroy the container.
       free(bidirectionalInfo->embeddedLevels);
       free(bidirectionalInfo->characterTypes);
+      free(bidirectionalInfo->bracketTypes);
       delete bidirectionalInfo;
 
       *it = NULL;
@@ -289,64 +279,24 @@ struct BidirectionalSupport::Plugin
   {
     const BidirectionalInfo* const bidirectionalInfo = *(mParagraphBidirectionalInfo.Begin() + bidiInfoIndex);
 
-    const CharacterDirection paragraphDirection = GetBidiParagraphDirection(bidirectionalInfo->paragraphDirection);
-    CharacterDirection       previousDirection  = paragraphDirection;
-
     for(CharacterIndex index = 0u; index < numberOfCharacters; ++index)
     {
       CharacterDirection& characterDirection = *(directions + index);
-      CharacterDirection  nextDirection      = false;
-
-      characterDirection = false;
-
-      // Get the bidi direction.
-      const BidiDirection bidiDirection = GetBidiCharacterDirection(*(bidirectionalInfo->characterTypes + index));
-
-      if(RIGHT_TO_LEFT == bidiDirection)
-      {
-        characterDirection = true;
-        nextDirection      = true;
-      }
-      else if(NEUTRAL == bidiDirection)
-      {
-        // For neutral characters it check's the next and previous directions.
-        // If they are equals set that direction. If they are not, sets the paragraph's direction.
-        // If there is no next, sets the paragraph's direction.
-        nextDirection = paragraphDirection;
-
-        // Look for the next non-neutral character.
-        Length nextIndex = index + 1u;
-        for(; nextIndex < numberOfCharacters; ++nextIndex)
-        {
-          BidiDirection nextBidiDirection = GetBidiCharacterDirection(*(bidirectionalInfo->characterTypes + nextIndex));
-          if(nextBidiDirection != NEUTRAL)
-          {
-            nextDirection = RIGHT_TO_LEFT == nextBidiDirection;
-            break;
-          }
-        }
-
-        // Calculate the direction for all the neutral characters.
-        characterDirection = previousDirection == nextDirection ? previousDirection : paragraphDirection;
-
-        // Set the direction to all the neutral characters.
-        // The indices from currentIndex + 1u to nextIndex - 1u are neutral characters.
-        ++index;
-
-        for(; index < nextIndex; ++index)
-        {
-          CharacterDirection& nextCharacterDirection = *(directions + index);
-          nextCharacterDirection                     = characterDirection;
-        }
-
-        // Set the direction of the next non-neutral character.
-        if(nextIndex < numberOfCharacters)
-        {
-          *(directions + nextIndex) = nextDirection;
-        }
-      }
 
-      previousDirection = nextDirection;
+      // Checks if the character is rtl oriented.
+      // I.e even a neutral character can become rtl if surrounded by rtl characters.
+      characterDirection = FRIBIDI_IS_RTL(*(bidirectionalInfo->embeddedLevels + index));
+
+      // NOTE
+      // We are discontinuing the previous character direction determination logic.
+      // The previous logic was too heuristic and had many shortcomings in handling various RTL cases.
+      // The key change in this update is that character direction is determined based on embedding levels,
+      // including bracket information.
+      // The character direction determined here will affect the behavior of the GetMirroredText() function.
+      // BTW, Harfbuzz(hb_shape) also supports text mirroring.
+      // To use this, we need to pass the character direction at the embedding level to hb_buffer_set_direction,
+      // which is currently challenging for us.
+      // If this is implemented, we will no longer need to perform GetMirroredText().
     }
   }
 
index 99fab49..0169aed 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/devel-api/events/key-event-devel.h>
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/actors/layer.h>
@@ -98,7 +97,6 @@ Window::Window()
   mInsetsChangedSignal(),
   mPointerConstraintsSignal(),
   mLastKeyEvent(),
-  mLastTouchEvent(),
   mIsTransparent(false),
   mIsFocusAcceptable(true),
   mIconified(false),
@@ -107,7 +105,8 @@ Window::Window()
   mWindowRotationAcknowledgement(false),
   mFocused(false),
   mIsWindowRotating(false),
-  mIsEnabledUserGeometry(false)
+  mIsEnabledUserGeometry(false),
+  mIsEmittedWindowCreatedEvent(false)
 {
 }
 
@@ -229,20 +228,19 @@ void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
 
   // Add Window to bridge for ATSPI
   auto bridge = Accessibility::Bridge::GetCurrentBridge();
-  if(bridge->IsUp())
-  {
-    auto rootLayer  = mScene.GetRootLayer();
-    auto accessible = Accessibility::Accessible::Get(rootLayer);
-    bridge->AddTopLevelWindow(accessible);
-
-    // Emit Window create event
-    // Create and Destory signal only emit in multi-window environment, so it does not emit on default layer.
-    bridge->Emit(accessible, Accessibility::WindowEvent::CREATE);
-  }
 
   bridge->EnabledSignal().Connect(this, &Window::OnAccessibilityEnabled);
   bridge->DisabledSignal().Connect(this, &Window::OnAccessibilityDisabled);
 
+  if(bridge->IsUp())
+  {
+    OnAccessibilityEnabled();
+  }
+  else
+  {
+    OnAccessibilityDisabled();
+  }
+
   // If you call the 'Show' before creating the adaptor, the application cannot know the app resource id.
   // The show must be called after the adaptor is initialized.
   Show();
@@ -1061,7 +1059,6 @@ void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize)
 
 void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp)
 {
-  mLastTouchEvent = Dali::Integration::NewTouchEvent(timeStamp, point);
   FeedTouchPoint(point, timeStamp);
 }
 
@@ -1168,16 +1165,26 @@ void Window::OnAccessibilityEnabled()
   auto accessible = Accessibility::Accessible::Get(rootLayer);
   bridge->AddTopLevelWindow(accessible);
 
+  DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Accessibility is enabled\n", this, mNativeWindowId);
+
+  Dali::Window handle(this);
+  if(!mIsEmittedWindowCreatedEvent)
+  {
+    DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Emit Accessbility Window Created Event\n", this, mNativeWindowId);
+    bridge->WindowCreated(handle);
+    mIsEmittedWindowCreatedEvent = true;
+  }
+
   if(!mVisible || mIconified)
   {
     return;
   }
 
-  Dali::Window handle(this);
   bridge->WindowShown(handle);
 
   if(mFocused)
   {
+    DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Emit Accessbility Window Focused Event\n", this, mNativeWindowId);
     bridge->WindowFocused(handle);
   }
 }
@@ -1188,6 +1195,7 @@ void Window::OnAccessibilityDisabled()
   auto rootLayer  = mScene.GetRootLayer();
   auto accessible = Accessibility::Accessible::Get(rootLayer);
   bridge->RemoveTopLevelWindow(accessible);
+  DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Accessibility is disabled\n", this, mNativeWindowId);
 }
 
 void Window::OnMoveCompleted(Dali::Window::WindowPosition& position)
@@ -1400,11 +1408,6 @@ const Dali::KeyEvent& Window::GetLastKeyEvent() const
   return mLastKeyEvent;
 }
 
-const Dali::TouchEvent& Window::GetLastTouchEvent() const
-{
-  return mLastTouchEvent;
-}
-
 void Window::SetUserGeometryPolicy()
 {
   if(mIsEnabledUserGeometry == true)
index 6bee6d3..e294770 100644 (file)
@@ -508,11 +508,6 @@ public: // Dali::Internal::Adaptor::SceneHolder
   const Dali::KeyEvent& GetLastKeyEvent() const;
 
   /**
-   * @copydoc Dali::DevelWindow::GetLastTouchEvent()
-   */
-  const Dali::TouchEvent& GetLastTouchEvent() const;
-
-  /**
    * @copydoc Dali::DevelWindow::PointerConstraintsLock()
    */
   bool PointerConstraintsLock();
@@ -952,8 +947,7 @@ private:
   InsetsChangedSignalType                 mInsetsChangedSignal;
   PointerConstraintsSignalType            mPointerConstraintsSignal;
 
-  Dali::KeyEvent   mLastKeyEvent;
-  Dali::TouchEvent mLastTouchEvent;
+  Dali::KeyEvent mLastKeyEvent;
 
   bool mIsTransparent : 1;
   bool mIsFocusAcceptable : 1;
@@ -964,6 +958,7 @@ private:
   bool mFocused : 1;
   bool mIsWindowRotating : 1;      ///< The window rotating flag.
   bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag.
+  bool mIsEmittedWindowCreatedEvent : 1; ///< The Window Created Event emit flag for accessibility.
 };
 
 } // namespace Adaptor
index f28dc34..add39ec 100644 (file)
@@ -1516,7 +1516,16 @@ void WindowBaseEcoreWl2::OnKeyDown(void* data, int type, void* event)
     GetDeviceClass(ecore_device_class_get(keyEvent->dev), deviceClass);
     GetDeviceSubclass(ecore_device_subclass_get(keyEvent->dev), deviceSubclass);
 
+    bool isRepeat = false;
+#if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 25)
+    if(keyEvent->event_flags & ECORE_EVENT_FLAG_REPEAT)
+    {
+      isRepeat = true;
+    }
+#endif // Since ecore 1.25 version
+
     Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass);
+    keyEvent.isRepeat = isRepeat;
 
     mKeyEventSignal.Emit(keyEvent);
   }
index 1eae664..d86a705 100644 (file)
@@ -27,7 +27,7 @@
 
 namespace Dali
 {
-NativeImageSourcePtr NativeImageSource::New(unsigned int width, unsigned int height, ColorDepth depth)
+NativeImageSourcePtr NativeImageSource::New(uint32_t width, uint32_t height, ColorDepth depth)
 {
   Any                  empty;
   NativeImageSourcePtr image = new NativeImageSource(width, height, depth, empty);
@@ -45,7 +45,7 @@ NativeImageSourcePtr NativeImageSource::New(Any nativeImageSource)
   return image;
 }
 
-bool NativeImageSource::GetPixels(std::vector<unsigned char>& pixbuf, unsigned int& width, unsigned int& height, Pixel::Format& pixelFormat) const
+bool NativeImageSource::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const
 {
   return mImpl->GetPixels(pixbuf, width, height, pixelFormat);
 }
@@ -75,7 +75,7 @@ void NativeImageSource::DestroyResource()
   mImpl->DestroyResource();
 }
 
-unsigned int NativeImageSource::TargetTexture()
+uint32_t NativeImageSource::TargetTexture()
 {
   return mImpl->TargetTexture();
 }
@@ -85,12 +85,12 @@ void NativeImageSource::PrepareTexture()
   mImpl->PrepareTexture();
 }
 
-unsigned int NativeImageSource::GetWidth() const
+uint32_t NativeImageSource::GetWidth() const
 {
   return mImpl->GetWidth();
 }
 
-unsigned int NativeImageSource::GetHeight() const
+uint32_t NativeImageSource::GetHeight() const
 {
   return mImpl->GetHeight();
 }
@@ -135,7 +135,7 @@ NativeImageInterface::Extension* NativeImageSource::GetExtension()
   return mImpl->GetNativeImageInterfaceExtension();
 }
 
-NativeImageSource::NativeImageSource(unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSource)
+NativeImageSource::NativeImageSource(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSource)
 {
   auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
   mImpl        = factory->CreateNativeImageSource(width, height, depth, nativeImageSource).release();
index 2e4c752..8959242 100644 (file)
@@ -88,7 +88,7 @@ public:
    * @param[in] depth color depth of the image
    * @return A smart-pointer to a newly allocated image
    */
-  static NativeImageSourcePtr New(unsigned int width, unsigned int height, ColorDepth depth);
+  static NativeImageSourcePtr New(uint32_t width, uint32_t height, ColorDepth depth);
 
   /**
    * @brief Creates a new NativeImageSource from an existing native image source.
@@ -120,7 +120,7 @@ public:
    * @param[out] pixelFormat pixel format used by image
    * @return     @c true if the pixels were gotten, and @c false otherwise
    */
-  bool GetPixels(std::vector<unsigned char>& pixbuf, unsigned int& width, unsigned int& height, Pixel::Format& pixelFormat) const;
+  bool GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const;
 
   /**
    * @brief Converts the current pixel contents to either a JPEG or PNG format
@@ -151,6 +151,17 @@ public:
    */
   bool IsColorDepthSupported(ColorDepth colorDepth);
 
+public: // native image
+  /**
+   * @copydoc Dali::NativeImageInterface::GetWidth()
+   */
+  uint32_t GetWidth() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetHeight()
+   */
+  uint32_t GetHeight() const override;
+
   /**
    * @copydoc Dali::NativeImageInterface::GetTextureTarget()
    */
@@ -180,7 +191,7 @@ private: // native image
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
    */
-  unsigned int TargetTexture() override;
+  uint32_t TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::PrepareTexture()
@@ -188,16 +199,6 @@ private: // native image
   void PrepareTexture() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GetWidth()
-   */
-  unsigned int GetWidth() const override;
-
-  /**
-   * @copydoc Dali::NativeImageInterface::GetHeight()
-   */
-  unsigned int GetHeight() const override;
-
-  /**
    * @copydoc Dali::NativeImageInterface::RequiresBlending()
    */
   bool RequiresBlending() const override;
@@ -232,7 +233,7 @@ private:
    * @param[in] depth color depth of the image
    * @param[in] nativeImageSource contains either: native image source or is empty
    */
-  DALI_INTERNAL NativeImageSource(unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSource);
+  DALI_INTERNAL NativeImageSource(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSource);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
index a775b80..d6e1e52 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 43;
+const unsigned int ADAPTOR_MICRO_VERSION = 44;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index a73d0d0..132c3f6 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.2.43
+Version:    2.2.44
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT