Merge "Add FreeReleasedBuffers method to NativeImageSourceQueue" into devel/master
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 8 Dec 2022 01:07:28 +0000 (01:07 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 8 Dec 2022 01:07:28 +0000 (01:07 +0000)
dali/devel-api/adaptor-framework/accessibility-bridge.h
dali/devel-api/adaptor-framework/accessibility.h
dali/devel-api/atspi-interfaces/accessible.h
dali/internal/accessibility/bridge/accessible.cpp
dali/internal/accessibility/bridge/bridge-object.cpp
dali/internal/accessibility/bridge/bridge-object.h
dali/internal/accessibility/bridge/dummy/dummy-atspi.cpp
dali/internal/accessibility/bridge/dummy/dummy-atspi.h
dali/internal/system/common/async-task-manager-impl.cpp

index 798aead..0737c69 100644 (file)
@@ -290,6 +290,20 @@ struct DALI_ADAPTOR_API Bridge
   virtual void EmitSocketAvailable(Accessible* obj) = 0;
 
   /**
+   * @brief Emits ScrollStarted event on at-spi bus.
+   *
+   * @param obj Accessible Object
+   */
+  virtual void EmitScrollStarted(Accessible *obj) = 0;
+
+    /**
+   * @brief Emits ScrollFinished event on at-spi bus.
+   *
+   * @param obj Accessible Object
+   */
+  virtual void EmitScrollFinished(Accessible *obj) = 0;
+
+  /**
    * @brief Emits state-changed event on at-spi bus.
    *
    * @param[in] obj The accessible object
index a3a8df4..cf26136 100644 (file)
@@ -506,6 +506,8 @@ enum class AtspiEvent
   ATTRIBUTES_CHANGED,\r
   MOVED_OUT,\r
   WINDOW_CHANGED,\r
+  SCROLL_STARTED,\r
+  SCROLL_FINISHED,\r
   MAX_COUNT\r
 };\r
 \r
index edac6d9..0156cc9 100644 (file)
@@ -139,6 +139,18 @@ public:
   void EmitSocketAvailable();
 
   /**
+   * @brief Emits "ScrollStarted" event.
+   *
+   */
+  void EmitScrollStarted();
+
+  /**
+   * @brief Emits "ScrollFinished" event.
+   *
+   */
+  void EmitScrollFinished();
+
+  /**
    * @brief Emits "highlighted" event.
    *
    * @param[in] event The enumerated window event
index c2a62b3..d0e2700 100644 (file)
@@ -125,6 +125,22 @@ void Accessible::EmitSocketAvailable()
   }
 }
 
+void Accessible::EmitScrollStarted()
+{
+  if(auto bridgeData = GetBridgeData())
+  {
+    bridgeData->mBridge->EmitScrollStarted(this);
+  }
+}
+
+void Accessible::EmitScrollFinished()
+{
+  if(auto bridgeData = GetBridgeData())
+  {
+    bridgeData->mBridge->EmitScrollFinished(this);
+  }
+}
+
 void Accessible::Emit(WindowEvent event, unsigned int detail)
 {
   if(auto bridgeData = GetBridgeData())
index 26b697c..d9c6d84 100644 (file)
@@ -315,3 +315,31 @@ void BridgeObject::EmitSocketAvailable(Accessible* obj)
     obj->GetAddress(),
     {"", "root"});
 }
+
+void BridgeObject::EmitScrollStarted(Accessible* obj)
+{
+  if(!IsUp() || obj->IsHidden() || obj->GetSuppressedEvents()[AtspiEvent::SCROLL_STARTED])
+  {
+    return;
+  }
+
+  mDbusServer.emit2<Address>(
+    GetAccessiblePath(obj),
+    Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
+    "ScrollStarted",
+    {"", "root"});
+}
+
+void BridgeObject::EmitScrollFinished(Accessible* obj)
+{
+  if(!IsUp() || obj->IsHidden() || obj->GetSuppressedEvents()[AtspiEvent::SCROLL_FINISHED])
+  {
+    return;
+  }
+
+  mDbusServer.emit2<Address>(
+    GetAccessiblePath(obj),
+    Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
+    "ScrollFinished",
+    {"", "root"});
+}
\ No newline at end of file
index 9784469..1b6637d 100644 (file)
@@ -90,6 +90,16 @@ protected:
    */
   void EmitSocketAvailable(Dali::Accessibility::Accessible* obj) override;
 
+  /**
+   * @copydoc Dali::Accessibility::Bridge::EmitScrollStarted()
+   */
+  void EmitScrollStarted(Dali::Accessibility::Accessible* obj) override;
+
+  /**
+   * @copydoc Dali::Accessibility::Bridge::EmitScrollFinished()
+   */
+  void EmitScrollFinished(Dali::Accessibility::Accessible* obj) override;
+
 protected:
   DBus::DBusInterfaceDescription::SignalId mStateChanged;
 };
index 713dd3c..b5e253b 100644 (file)
@@ -141,6 +141,14 @@ void Accessibility::Accessible::EmitSocketAvailable()
 {
 }
 
+void Accessibility::Accessible::EmitScrollStarted()
+{
+}
+
+void Accessibility::Accessible::EmitScrollFinished()
+{
+}
+
 void Accessibility::Accessible::NotifyAccessibilityStateChange(Accessibility::States states, bool isRecursive)
 {
 }
index 12c817b..0bbaccd 100644 (file)
@@ -142,6 +142,14 @@ struct DummyBridge : Dali::Accessibility::Bridge
   {
   }
 
+  void EmitScrollStarted(Accessibility::Accessible* obj) override
+  {
+  }
+
+  void EmitScrollFinished(Accessibility::Accessible* obj) override
+  {
+  }
+
   void EmitStateChanged(Accessibility::Accessible* obj, Accessibility::State state, int newValue, int reserved) override
   {
   }
index 22e274c..828d98e 100644 (file)
@@ -19,9 +19,9 @@
 #include "async-task-manager-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/common/singleton-service.h>
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/devel-api/adaptor-framework/thread-settings.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <dali/integration-api/debug.h>
 
@@ -123,7 +123,7 @@ void AsyncTaskThread::Run()
 Dali::AsyncTaskManager AsyncTaskManager::Get()
 {
   Dali::AsyncTaskManager manager;
-  SingletonService singletonService(SingletonService::Get());
+  SingletonService       singletonService(SingletonService::Get());
   if(singletonService)
   {
     // Check whether the async task manager is already created
@@ -138,7 +138,7 @@ Dali::AsyncTaskManager AsyncTaskManager::Get()
     {
       // If not, create the async task manager and register it as a singleton
       Internal::Adaptor::AsyncTaskManager* internalAsyncTaskManager = new Internal::Adaptor::AsyncTaskManager();
-      manager = Dali::AsyncTaskManager(internalAsyncTaskManager);
+      manager                                                       = Dali::AsyncTaskManager(internalAsyncTaskManager);
       singletonService.Register(typeid(manager), manager);
     }
   }
@@ -154,7 +154,7 @@ AsyncTaskManager::AsyncTaskManager()
 
 AsyncTaskManager::~AsyncTaskManager()
 {
-  if(mProcessorRegistered)
+  if(mProcessorRegistered && Dali::Adaptor::IsAvailable())
   {
     Dali::Adaptor::Get().UnregisterProcessor(*this);
   }
@@ -189,7 +189,7 @@ void AsyncTaskManager::AddTask(AsyncTaskPtr task)
     // If all threads are busy, then it's ok just to push the task because they will try to get the next job.
   }
 
-  if(!mProcessorRegistered)
+  if(!mProcessorRegistered && Dali::Adaptor::IsAvailable())
   {
     Dali::Adaptor::Get().RegisterProcessor(*this);
     mProcessorRegistered = true;
@@ -314,7 +314,7 @@ void AsyncTaskManager::CompleteTask(AsyncTaskPtr task)
 
 void AsyncTaskManager::UnregisterProcessor()
 {
-  if(mProcessorRegistered)
+  if(mProcessorRegistered && Dali::Adaptor::IsAvailable())
   {
     Mutex::ScopedLock lock(mMutex);
     if(mWaitingTasks.empty() && mCompletedTasks.empty() && mRunningTasks.empty())
@@ -329,7 +329,7 @@ void AsyncTaskManager::TasksCompleted()
 {
   while(AsyncTaskPtr task = PopNextCompletedTask())
   {
-    CallbackBase::Execute(*(task->GetCompletedCallback()),task);
+    CallbackBase::Execute(*(task->GetCompletedCallback()), task);
   }
 
   UnregisterProcessor();