Merge "Fix issue that LoadContents of WebView cound not be called with null arguments...
authordongsug song <dongsug.song@samsung.com>
Wed, 20 Jul 2022 08:11:36 +0000 (08:11 +0000)
committerGerrit Code Review <gerrit@review>
Wed, 20 Jul 2022 08:11:36 +0000 (08:11 +0000)
dali-csharp-binder/src/application-wrap.cpp
dali-csharp-binder/src/canvas-view-wrap.cpp
dali-csharp-binder/src/control-devel-wrap.cpp
dali-csharp-binder/src/dali-wrap.cpp
dali-csharp-binder/src/devel-property-wrap.cpp
dali-csharp-binder/src/nui-view-accessible.cpp
dali-csharp-binder/src/nui-view-accessible.h
dali-csharp-binder/src/web-view-wrap.cpp
packaging/dali-csharp-binder.spec

index e799e3d..b37d01f 100755 (executable)
@@ -674,6 +674,121 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_LowMemorySignal(void * jar
   return jresult;
 }
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskInitSignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::AppSignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::AppSignalType *) &(application)->TaskInitSignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void *)result;
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskTerminateSignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::AppSignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::AppSignalType *) &(application)->TaskTerminateSignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void *)result;
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskAppControlSignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::AppControlSignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::AppControlSignalType *) &(application)->TaskAppControlSignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void *)result;
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskLanguageChangedSignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::AppSignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::AppSignalType *) &(application)->TaskLanguageChangedSignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void *)result;
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskRegionChangedSignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::AppSignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::AppSignalType *) &(application)->TaskRegionChangedSignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void *)result;
+  return jresult;
+}
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskLowBatterySignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::LowBatterySignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::LowBatterySignalType *) &(application)->TaskLowBatterySignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void *)result;
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_TaskLowMemorySignal(void * app) {
+  void * jresult ;
+  Dali::Application *application = (Dali::Application *) 0 ;
+  Dali::Application::LowMemorySignalType *result = 0 ;
+
+  application = (Dali::Application *)app;
+  {
+    try {
+      result = (Dali::Application::LowMemorySignalType *) &(application)->TaskLowMemorySignal();
+    } CALL_CATCH_EXCEPTION(0);
+  }
+  jresult = (void *)result;
+  return jresult;
+}
 
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Application_LowBatterySignalType_Empty(void * jarg1) {
   unsigned int jresult ;
@@ -782,7 +897,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Application_delete_LowBatterySignalType(
   }
 }
 
-
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Application_LowMemorySignalType_Empty(void * jarg1) {
   unsigned int jresult ;
   Dali::Signal< void (Dali::DeviceStatus::Memory::Status) > *arg1 = (Dali::Signal< void (Dali::DeviceStatus::Memory::Status) > *) 0 ;
@@ -1112,7 +1226,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_ApplicationControlSignal(void * j
 
 }
 
-
 /*application-devel binding*/
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_4(int jarg1, char * jarg3, int jarg4, void * jarg5) {
@@ -1242,6 +1355,72 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_5(int jarg1, cha
   return jresult;
 }
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_6(int nuiArgc, char * nuiStyleSheet, int nuiWindowMode, void * nuiPositionSize, bool nuiUseUiThread) {
+  void * jresult ;
+  int *argc = (int *) 0 ;
+  char ***argv ;
+  Dali::Application::WINDOW_MODE windowMode ;
+  Dali::PositionSize positionSize ;
+  Dali::PositionSize *positionSizeP ;
+  bool useUiThread;
+  Dali::Application result;
+
+  {
+    // Todo generate argv data from the C# args
+    char **array;         // two dimensional array
+    int numStrings = 1;     // number of strings
+    int stringLength = 30;      // max string length.
+    array = (char **)malloc( (numStrings + 1 )* sizeof(char *) );
+    if(!array) {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "array is null", 0);
+      return 0;
+    }
+    gArgV = array;
+
+    // allocate the string data
+    for( int i=0; i < numStrings; i++)
+    {
+      array[i]=(char *)malloc( stringLength * sizeof(char) );
+    }
+    array[ numStrings ] =  NULL; // we allocated +1 for hold the NULL part
+
+    std::string temp = "dali-csharp-app";
+
+    if(!array[0]) {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "array[0] is null", 0);
+      return 0;
+    }
+    array[0][temp.copy(array[0], strlen(array[0])-1)] = '\0';
+
+    argc = &gArgC;
+    argv = &gArgV;
+  }
+  if (!nuiStyleSheet) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  std::string styleSheet(nuiStyleSheet);
+  windowMode = (Dali::Application::WINDOW_MODE)nuiWindowMode;
+  positionSizeP = (Dali::PositionSize *)nuiPositionSize;
+  useUiThread = nuiUseUiThread;
+
+  if (!positionSizeP) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::PositionSize", 0);
+    return 0;
+  }
+
+  positionSize = *positionSizeP;
+  {
+    try {
+      result = Dali::Application::New(argc, argv, styleSheet, windowMode, positionSize, useUiThread);
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = new Dali::Application((const Dali::Application &)result);
+
+  return jresult;
+}
+
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New_WithWindowSizePosition(int jarg1, char * jarg2, char * jarg3, int jarg4, void * jarg5) {
  void * jresult ;
  int *arg1 = (int *) 0 ;
index f11d29c..8b8b24b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/canvas-renderer-drawable-group.h>
-#include <dali/devel-api/adaptor-framework/canvas-renderer-gradient.h>
-#include <dali/devel-api/adaptor-framework/canvas-renderer-linear-gradient.h>
-#include <dali/devel-api/adaptor-framework/canvas-renderer-picture.h>
-#include <dali/devel-api/adaptor-framework/canvas-renderer-radial-gradient.h>
+#include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-drawable-group.h>
+#include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-gradient.h>
+#include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-linear-gradient.h>
+#include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-picture.h>
+#include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-radial-gradient.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/canvas-view/canvas-view.h>
 
index 1bc95d9..174cd41 100644 (file)
@@ -202,39 +202,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_ClearAccessibilityR
   }));
 }
 
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AppendAccessibilityAttribute(void* arg1, char* arg2, char* arg3)
-{
-  GUARD_ON_NULL_RET(arg1);
-  GUARD_ON_NULL_RET(arg2);
-  GUARD_ON_NULL_RET(arg3);
-  try_catch(([&]() {
-    auto*             control = (Dali::Toolkit::Control*)arg1;
-    const std::string key(arg2);
-    const std::string value(arg3);
-    AppendAccessibilityAttribute(*control, key, value);
-  }));
-}
-
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_RemoveAccessibilityAttribute(void* arg1, char* arg2)
-{
-  GUARD_ON_NULL_RET(arg1);
-  GUARD_ON_NULL_RET(arg2);
-  try_catch(([&]() {
-    auto*             control = (Dali::Toolkit::Control*)arg1;
-    const std::string key(arg2);
-    RemoveAccessibilityAttribute(*control, key);
-  }));
-}
-
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_ClearAccessibilityAttributes(void* arg1)
-{
-  GUARD_ON_NULL_RET(arg1);
-  try_catch(([&]() {
-    auto* control = (Dali::Toolkit::Control*)arg1;
-    ClearAccessibilityAttributes(*control);
-  }));
-}
-
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_SetAccessibilityReadingInfoType2(void* arg1, int arg2)
 {
   using namespace Dali::Accessibility;
index b8f7765..9eb7a6c 100755 (executable)
@@ -10529,6 +10529,50 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Property_Value_Assign(void * jarg1, vo
 }
 
 
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Property_Value_EqualTo(void * jarg1, void * jarg2) {
+  bool jresult;
+  Dali::Property::Value *arg1 = (Dali::Property::Value *) 0 ;
+  Dali::Property::Value *arg2 = 0 ;
+  bool result;
+
+  arg1 = (Dali::Property::Value *)jarg1;
+  arg2 = (Dali::Property::Value *)jarg2;
+  if (!arg2) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Property::Value const & type is null", 0);
+    return 0;
+  }
+  {
+    try {
+      result = (bool)((Dali::Property::Value const *)arg1)->operator ==((Dali::Property::Value const &)*arg2);
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = result;
+  return jresult;
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Property_Value_NotEqualTo(void * jarg1, void * jarg2) {
+  bool jresult;
+  Dali::Property::Value *arg1 = (Dali::Property::Value *) 0 ;
+  Dali::Property::Value *arg2 = 0 ;
+  bool result;
+
+  arg1 = (Dali::Property::Value *)jarg1;
+  arg2 = (Dali::Property::Value *)jarg2;
+  if (!arg2) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Property::Value const & type is null", 0);
+    return 0;
+  }
+  {
+    try {
+      result = (bool)((Dali::Property::Value const *)arg1)->operator !=((Dali::Property::Value const &)*arg2);
+    } CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = result;
+  return jresult;
+}
+
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_Property_Value(void * jarg1) {
   Dali::Property::Value *arg1 = (Dali::Property::Value *) 0 ;
 
index 1243d9e..ede01ad 100755 (executable)
@@ -79,6 +79,12 @@ CSharp_Actor_Property_CAPTURE_ALL_TOUCH_AFTER_START_get() {
   return Dali::DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START;
 }
 
+SWIGEXPORT int SWIGSTDCALL
+CSharp_Actor_Property_ALLOW_ONLY_OWN_TOUCH_get() {
+
+  return Dali::DevelActor::Property::ALLOW_ONLY_OWN_TOUCH;
+}
+
 SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_BLEND_EQUATION_get() {
 
   return Dali::DevelActor::Property::BLEND_EQUATION;
index 88140ec..457db61 100644 (file)
@@ -29,6 +29,17 @@ using namespace Dali::Toolkit;
 
 using Interface = Accessibility::AtspiInterface;
 
+namespace
+{
+void GetAttributesCallback(const char* key, const char* value, Accessibility::Attributes* attributes)
+{
+  attributes->insert_or_assign(key, value);
+}
+
+using GetAttributesCallbackType = decltype(&GetAttributesCallback);
+
+} // unnamed namespace
+
 // Keep this structure layout binary compatible with the respective C# structure!
 struct NUIViewAccessible::AccessibilityDelegate
 {
@@ -71,6 +82,7 @@ struct NUIViewAccessible::AccessibilityDelegate
   bool                  (*clearSelection)          (RefObject*);                   // 34
   bool                  (*deselectChild)           (RefObject*, int);              // 35
   Rect<int>*            (*getRangeExtents)         (RefObject*, int, int, int);    // 36
+  void                  (*getAttributes)           (RefObject*, GetAttributesCallbackType, Accessibility::Attributes*); // 37
   // clang-format on
 };
 
@@ -193,6 +205,15 @@ Accessibility::States NUIViewAccessible::CalculateStates()
   return Accessibility::States{states};
 }
 
+Accessibility::Attributes NUIViewAccessible::GetAttributes() const
+{
+  auto attributes = ControlAccessible::GetAttributes();
+
+  CallMethod<Interface::ACCESSIBLE>(mTable->getAttributes, &GetAttributesCallback, &attributes);
+
+  return attributes;
+}
+
 Property::Index NUIViewAccessible::GetNamePropertyIndex()
 {
   return Property::INVALID_INDEX;
index f99c09e..4aad8cf 100644 (file)
@@ -65,6 +65,8 @@ public:
 
   Dali::Accessibility::States CalculateStates() override;
 
+  Dali::Accessibility::Attributes GetAttributes() const override;
+
   Dali::Property::Index GetNamePropertyIndex() override;
 
   Dali::Property::Index GetDescriptionPropertyIndex() override;
index 642823c..f62b458 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
-#include <dali/devel-api/adaptor-framework/web-engine-certificate.h>
-#include <dali/devel-api/adaptor-framework/web-engine-context-menu.h>
-#include <dali/devel-api/adaptor-framework/web-engine-context-menu-item.h>
-#include <dali/devel-api/adaptor-framework/web-engine-console-message.h>
-#include <dali/devel-api/adaptor-framework/web-engine-form-repost-decision.h>
-#include <dali/devel-api/adaptor-framework/web-engine-frame.h>
-#include <dali/devel-api/adaptor-framework/web-engine-hit-test.h>
-#include <dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h>
-#include <dali/devel-api/adaptor-framework/web-engine-load-error.h>
-#include <dali/devel-api/adaptor-framework/web-engine-policy-decision.h>
-#include <dali/devel-api/adaptor-framework/web-engine-request-interceptor.h>
-#include <dali/devel-api/adaptor-framework/web-engine-security-origin.h>
-#include <dali/devel-api/adaptor-framework/web-engine-back-forward-list-item.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-certificate.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-context-menu.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-context-menu-item.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-console-message.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-form-repost-decision.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-frame.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-hit-test.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-http-auth-handler.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-load-error.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-policy-decision.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-request-interceptor.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-security-origin.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-back-forward-list-item.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
index be5b98f..1c3dbfd 100644 (file)
@@ -21,7 +21,7 @@
 
 Name: dali2-csharp-binder
 Summary: The DALI Csharp Binder
-Version: 2.1.29
+Version: 2.1.31
 Release: 1
 Group: uifw/graphic
 License: Apache-2.0 and BSD-3-Clause and MIT