[dali_1.4.28] Merge branch 'devel/master' 40/209940/1
authorRichard Huang <r.huang@samsung.com>
Fri, 12 Jul 2019 10:18:56 +0000 (11:18 +0100)
committerRichard Huang <r.huang@samsung.com>
Fri, 12 Jul 2019 10:18:56 +0000 (11:18 +0100)
Change-Id: If75de4ed4ff3bdf3e9cc6022a4475bb98e18f5ae

dali-csharp-binder/src/application.cpp
dali-csharp-binder/src/dali_wrap.cpp
dali-csharp-binder/src/flex-layout.cpp
packaging/dali-csharp-binder.spec

index ec1e507..516a2bd 100755 (executable)
@@ -22,6 +22,7 @@
 #include "string"
 #include <dali/public-api/adaptor-framework/application.h>
 #include <dali/devel-api/adaptor-framework/application-devel.h>
+#include <dali/integration-api/adaptors/adaptor.h>
 
 /* Callback for returning strings to C# without leaking memory */
 typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *);
@@ -703,6 +704,63 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_GetWindow(void * jarg1) {
   return jresult;
 }
 
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Application_GetWindowsListSize() {
+  unsigned int jresult ;
+  Dali::WindowContainer result;
+  {
+    try {
+      result = Dali::Adaptor::Get().GetWindows();
+      jresult = result.size();
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
+      };
+    } catch (Dali::DaliException e) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
+      };
+    }
+  }
+  return jresult;
+}
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_GetWindowsFromList(uint jarg1) {
+  void * jresult ;
+  uint index = jarg1;
+  Dali::WindowContainer result;
+
+  {
+    try {
+      result = Dali::Adaptor::Get().GetWindows();
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
+      };
+    } catch (Dali::DaliException e) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
+      };
+    }
+  }
+  jresult = new Dali::Window((const Dali::Window &)result[index]);
+  return jresult;
+}
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Application_ReplaceWindow(void * jarg1, void * jarg2, char * jarg3) {
   Dali::Application *arg1 = (Dali::Application *) 0 ;
index d64274c..3e3ed97 100755 (executable)
@@ -476,6 +476,7 @@ void SWIG_CSharpException(int code, const char *msg) {
 #include <dali-toolkit/devel-api/controls/web-view/web-view.h>
 #include "web-view-signal-converter.h"
 
+#include <dali/integration-api/debug.h>
 
 // add here SWIG version check
 
@@ -2567,7 +2568,7 @@ Dali::Actor SwigDirector_CustomAlgorithmInterface::GetNextFocusableActor(Dali::A
     jdirection = (int)direction;
     jresult = (void *) swig_callbackGetNextFocusableActor(jcurrent, jproposed, jdirection);
     if (!jresult) {
-      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type Dali::Actor", 0);
+      DALI_LOG_ERROR("[ERROR][%s line:%d] Unexpected null return for type Dali::Actor! Next focus will be NULL, please be cautious to handle the keyboard foucs! ", __FILE__, __LINE__);
       return c_result;
     }
     c_result = *(Dali::Actor *)jresult;
@@ -89239,21 +89240,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GaussianBlurView_Deactivate(void * jarg1
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GaussianBlurView_SetUserImageAndOutputRenderTarget(void * jarg1, void * jarg2, void * jarg3) {
   Dali::Toolkit::GaussianBlurView *arg1 = (Dali::Toolkit::GaussianBlurView *) 0 ;
-  Dali::Image arg2 ;
-  Dali::FrameBufferImage arg3 ;
-  Dali::Image *argp2 ;
-  Dali::FrameBufferImage *argp3 ;
+  Dali::Texture arg2 ;
+  Dali::FrameBuffer arg3 ;
+  Dali::Texture *argp2 ;
+  Dali::FrameBuffer *argp3 ;
 
   arg1 = (Dali::Toolkit::GaussianBlurView *)jarg1;
-  argp2 = (Dali::Image *)jarg2;
+  argp2 = (Dali::Texture *)jarg2;
   if (!argp2) {
-    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Image", 0);
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Texture", 0);
     return ;
   }
   arg2 = *argp2;
-  argp3 = (Dali::FrameBufferImage *)jarg3;
+  argp3 = (Dali::FrameBuffer *)jarg3;
   if (!argp3) {
-    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::FrameBufferImage", 0);
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::FrameBuffer", 0);
     return ;
   }
   arg3 = *argp3;
@@ -89318,7 +89319,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_GaussianBlurView_GetBlurStrengthPropertyI
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_GaussianBlurView_GetBlurredRenderTarget(void * jarg1) {
   void * jresult ;
   Dali::Toolkit::GaussianBlurView *arg1 = (Dali::Toolkit::GaussianBlurView *) 0 ;
-  Dali::FrameBufferImage result;
+  Dali::FrameBuffer result;
 
   arg1 = (Dali::Toolkit::GaussianBlurView *)jarg1;
   {
@@ -89343,7 +89344,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_GaussianBlurView_GetBlurredRenderTarge
     }
   }
 
-  jresult = new Dali::FrameBufferImage((const Dali::FrameBufferImage &)result);
+  jresult = new Dali::FrameBuffer((const Dali::FrameBuffer &)result);
   return jresult;
 }
 
@@ -103471,13 +103472,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_EvaluateJavaScript(void * jarg1,
   std::string jarg2_str = std::string(jarg2);
   arg2 = &jarg2_str;
 
-  void (*handler)(char*) = (void (*)(char*)) jarg3;
-
   {
     try {
-      (arg1)->EvaluateJavaScript((std::string const &)*arg2, [handler](const std::string& result) {
-        handler(SWIG_csharp_string_callback(result.c_str()));
-      });
+      if (jarg3) {
+        void (*handler)(char*) = (void (*)(char*)) jarg3;
+        (arg1)->EvaluateJavaScript((std::string const &)*arg2, [handler](const std::string& result) {
+          handler(SWIG_csharp_string_callback(result.c_str()));
+        });
+      } else {
+        (arg1)->EvaluateJavaScript((std::string const &)*arg2);
+      }
     } catch (std::out_of_range& e) {
       {
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
index e39eb0a..cfd5d2e 100755 (executable)
@@ -12,9 +12,7 @@ extern "C" {
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_FlexLayout_New()
 {
-  void * jresult ;
-  Dali::Toolkit::Flex::Node* result;
-
+  Dali::Toolkit::Flex::Node* result = (Dali::Toolkit::Flex::Node*)0;
   {
     try {
       result = new Dali::Toolkit::Flex::Node();
@@ -32,8 +30,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_FlexLayout_New()
       };
     }
   }
-  jresult = (void *)result;
-  return result;
+  return (void *)result;
 }
 
 
index 6897d89..d3839d7 100755 (executable)
@@ -21,7 +21,7 @@
 
 Name: dali-csharp-binder
 Summary: The DALI Csharp Binder
-Version: 1.4.27
+Version: 1.4.28
 Release: 1
 Group: uifw/graphic
 License: Apache-2.0 and BSD-3-Clause and MIT