[ATSPI] Blocking unwanted emission of "MoveOuted" signal 37/261237/9
authorLukasz Oleksak <l.oleksak@samsung.com>
Tue, 13 Jul 2021 16:28:40 +0000 (18:28 +0200)
committerLukasz Oleksak <l.oleksak@samsung.com>
Mon, 26 Jul 2021 10:39:59 +0000 (10:39 +0000)
This patch is blocking unwanted emission of "MoveOuted" signal to dbus
when auto-scroll feature moves highlighted object into the screen.

This patch is required following dali-toolkit patch:
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-toolkit/+/261238/

Change-Id: Ie3b7371376d4b11f1490e46a04d7d2bbd29a3064

dali/devel-api/adaptor-framework/accessibility-impl.h
dali/devel-api/adaptor-framework/accessibility.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-atspi.cpp
dali/internal/accessibility/bridge/dummy-atspi.h

index bce6135..262e555 100644 (file)
@@ -171,7 +171,7 @@ struct DALI_ADAPTOR_API Bridge
     {
       return ForceUpResult::ALREADY_UP;
     }
-    mData = std::make_shared<Data>();
+    mData          = std::make_shared<Data>();
     mData->mBridge = this;
     return ForceUpResult::JUST_STARTED;
   }
@@ -223,7 +223,7 @@ struct DALI_ADAPTOR_API Bridge
    * @param[in] obj Accessible object
    * @param[in] type Direction type when an Accessible object moves out of screen
    **/
-  virtual void EmitMovedOutOfScreen(Accessible* obj, MovedOutOfScreenType type) = 0;
+  virtual void EmitMovedOutOfScreen(Accessible* obj, ScreenRelativeMoveType type) = 0;
 
   /**
    * @brief Emits state-changed event on at-spi bus.
@@ -546,7 +546,7 @@ public:
    *
    * @param[in] type moved out of screen type
    */
-  void EmitMovedOutOfScreen(MovedOutOfScreenType type);
+  void EmitMovedOutOfScreen(ScreenRelativeMoveType type);
 
   /**
    * @brief Emits "highlighted" event.
index 3196176..1f49d2b 100644 (file)
@@ -42,13 +42,14 @@ namespace Dali
 namespace Accessibility\r
 {\r
 /**\r
- * @brief Enumeration describing signal that occurs when object moves out of screen.\r
+ * @brief Enumeration describing type of object move relative to the screen. Only outgoing moves are signalled to AT-clients.\r
  */\r
-enum class MovedOutOfScreenType\r
+enum class ScreenRelativeMoveType\r
 {\r
-  NONE,\r
-  TOP_LEFT,     ///< Object moves out of top(or left) side of screen\r
-  BOTTOM_RIGHT ///< Object moves out of bottom(or right) side of screen\r
+  OUTSIDE               = 0, ///< Object moves outside of the screen\r
+  OUTGOING_TOP_LEFT     = 1, ///< Object moves out through the top(or left) side of the screen. Maps to: ATSPI_MOVE_OUTED_TOP_LEFT\r
+  OUTGOING_BOTTOM_RIGHT = 2, ///< Object moves out through the bottom(or right) side of the screen. Maps to: ATSPI_MOVE_OUTED_BOTTOM_RIGHT\r
+  INSIDE                     ///< Object moves into the screen or moves inside the screen\r
 };\r
 \r
 /**\r
index 95814c2..9cd65a3 100644 (file)
@@ -144,7 +144,7 @@ void Accessible::EmitTextCursorMoved(unsigned int cursorPosition)
   }
 }
 
-void Accessible::EmitMovedOutOfScreen(MovedOutOfScreenType type)
+void Accessible::EmitMovedOutOfScreen(ScreenRelativeMoveType type)
 {
   if(auto bridgeData = GetBridgeData())
   {
@@ -191,7 +191,7 @@ std::shared_ptr<Bridge::Data> Accessible::GetBridgeData()
   if(!handle)
   {
     auto bridge = Bridge::GetCurrentBridge();
-    handle = bridge->mData;
+    handle      = bridge->mData;
   }
   return handle;
 }
index fad8c2c..8ac1569 100644 (file)
@@ -572,7 +572,7 @@ void BridgeObject::EmitTextChanged(Accessible* obj, TextChangedState state, unsi
   }
 }
 
-void BridgeObject::EmitMovedOutOfScreen(Accessible* obj, MovedOutOfScreenType type)
+void BridgeObject::EmitMovedOutOfScreen(Accessible* obj, ScreenRelativeMoveType type)
 {
   auto        addr = obj->GetAddress();
   std::string p    = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
index 8b32ac3..62f7f3a 100644 (file)
@@ -44,7 +44,7 @@ protected:
   void Emit(Dali::Accessibility::Accessible* obj, Dali::Accessibility::WindowEvent event, unsigned int detail) override;
   void Emit(Dali::Accessibility::Accessible* obj, Dali::Accessibility::ObjectPropertyChangeEvent we) override;
   void EmitBoundsChanged(Dali::Accessibility::Accessible* obj, Dali::Rect<> rect) override;
-  void EmitMovedOutOfScreen(Dali::Accessibility::Accessible* obj, Dali::Accessibility::MovedOutOfScreenType type) override;
+  void EmitMovedOutOfScreen(Dali::Accessibility::Accessible* obj, Dali::Accessibility::ScreenRelativeMoveType type) override;
 };
 
 #endif // DALI_INTERNAL_ACCESSIBILITY_BRIDGE_OBJECT_H
index 8cb4119..faa861d 100644 (file)
@@ -126,7 +126,7 @@ void Accessibility::Accessible::EmitActiveDescendantChanged(Accessibility::Acces
 {
 }
 
-void Accessibility::Accessible::EmitMovedOutOfScreen(Accessibility::MovedOutOfScreenType type)
+void Accessibility::Accessible::EmitMovedOutOfScreen(Accessibility::ScreenRelativeMoveType type)
 {
 }
 
index 7ea43d3..55b5495 100644 (file)
@@ -102,7 +102,7 @@ struct DummyBridge : Dali::Accessibility::Bridge
   {
   }
 
-  void EmitMovedOutOfScreen(Accessibility::Accessible* obj, MovedOutOfScreenType type) override
+  void EmitMovedOutOfScreen(Accessibility::Accessible* obj, ScreenRelativeMoveType type) override
   {
   }