Add GetMouseButton to identify right/left mouse button click 17/180717/2
authordongsug.song <dongsug.song@samsung.com>
Fri, 1 Jun 2018 09:29:09 +0000 (18:29 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Wed, 20 Jun 2018 02:06:00 +0000 (11:06 +0900)
Change-Id: I7b8937b6225b197530255c612884d03b16ecd878
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
dali-csharp-binder/src/dali_wrap.cpp

index 4965b8b..24e86f1 100755 (executable)
@@ -469,6 +469,8 @@ void SWIG_CSharpException(int code, const char *msg) {
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 
+#include <dali/public-api/events/mouse-button.h>
+
 // add here SWIG version check
 
 #if defined(_MSC_VER)         // Microsoft Visual C++ 6.0
@@ -30268,6 +30270,41 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Touch_GetAngle(void * jarg1, unsigned
 }
 
 
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Touch_GetMouseButton(void * jarg1, unsigned long jarg2) {
+  int jresult ;
+  Dali::TouchData *arg1 = (Dali::TouchData *) 0 ;
+  std::size_t arg2 ;
+  Dali::MouseButton::Type result;
+
+  arg1 = (Dali::TouchData *)jarg1;
+  arg2 = (std::size_t)jarg2;
+  {
+    try {
+      result = ((Dali::TouchData const *)arg1)->GetMouseButton(arg2);
+    } 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 = static_cast< int >(result);
+  return jresult;
+}
+
+
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_GestureDetector__SWIG_0() {
   void * jresult ;
   Dali::GestureDetector *result = 0 ;