[ATSPI] Add C# binding of EmitScrollStartedEvent/EmitScrollFinishedEvent 26/284126/5
authorHosang Kim <hosang12.kim@samsung.com>
Thu, 10 Nov 2022 05:50:04 +0000 (14:50 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Thu, 10 Nov 2022 09:10:14 +0000 (18:10 +0900)
- Added `EmitScrollStartedEvent` to notify scroll is started.
- Added `EmitScrollFinishedEvent` to notify scroll is finished.

This patch is using below interface.
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-adaptor/+/284124/

Change-Id: I43a4e6b898c208030033817e15407eae1cd3c4e4

dali-csharp-binder/src/control-devel-wrap.cpp

index d43c5f682c80a86df87d5c352dac3bde8f30cfd5..53fcab31a7cd2fdb793d28f89b234a7113049dc1 100644 (file)
@@ -420,6 +420,40 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitTextCursorMovedEvent(
   }));
 }
 
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitScrollStartedEvent(void* arg1_actor)
+{
+  GUARD_ON_NULL_RET(arg1_actor);
+  try_catch(([&]() {
+    Dali::Actor* control    = (Dali::Actor*)arg1_actor;
+    auto         accessible = Dali::Accessibility::Accessible::Get(*control);
+    if(accessible)
+    {
+      accessible->EmitScrollStarted();
+    }
+    else
+    {
+      SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
+    }
+  }));
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitScrollFinishedEvent(void* arg1_actor)
+{
+  GUARD_ON_NULL_RET(arg1_actor);
+  try_catch(([&]() {
+    Dali::Actor* control    = (Dali::Actor*)arg1_actor;
+    auto         accessible = Dali::Accessibility::Accessible::Get(*control);
+    if(accessible)
+    {
+      accessible->EmitScrollFinished();
+    }
+    else
+    {
+      SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
+    }
+  }));
+}
+
 SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Accessibility_IsSuppressedEvent(void* arg1, int32_t atspiEvent)
 {
   bool result = false;