From 2c9c33257f4c0cf3d903a9c8fc34fda23a7ed067 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 8 Sep 2020 11:17:25 +0100 Subject: [PATCH] Add bidning for devel apis to create valid handle for Gesture classes Change-Id: I16b1c721c89c9b54aa90a214a55572c18d0f8673 --- dali-csharp-binder/src/dali_wrap.cpp | 83 ++++++++++++++++++++++++++---------- dali-csharp-binder/src/gestures.cpp | 34 +++++++++++++++ 2 files changed, 95 insertions(+), 22 deletions(-) diff --git a/dali-csharp-binder/src/dali_wrap.cpp b/dali-csharp-binder/src/dali_wrap.cpp index 036d515..a90e345 100644 --- a/dali-csharp-binder/src/dali_wrap.cpp +++ b/dali-csharp-binder/src/dali_wrap.cpp @@ -429,6 +429,10 @@ void SWIG_CSharpException(int code, const char *msg) { #include #include #include +#include +#include +#include +#include #include #include @@ -20196,6 +20200,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LongPressGesture__SWIG_0() { } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_LongPressGesture_New(int jarg1) { + void * jresult ; + Dali::GestureState arg1 ; + Dali::LongPressGesture result; + + arg1 = (Dali::GestureState)jarg1; + { + try { + result = DevelLongPressGesture::New(arg1); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::LongPressGesture((const Dali::LongPressGesture &)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LongPressGesture__SWIG_1(void * jarg1) { void * jresult ; Dali::LongPressGesture *arg1 = 0 ; @@ -25332,36 +25353,20 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_PanGesture__SWIG_0() { return jresult; } -// Need to delete this -SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_PanGesture__SWIG_1(int jarg1) { + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_PanGesture_New(int jarg1) { void * jresult ; Dali::GestureState arg1 ; - Dali::PanGesture *result = 0 ; + Dali::PanGesture result; arg1 = (Dali::GestureState)jarg1; { try { - result = (Dali::PanGesture *)new Dali::PanGesture(); - } catch (std::out_of_range& e) { - { - SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return 0; - }; - } catch (std::exception& e) { - { - SWIG_CSharpException(SWIG_RuntimeError, const_cast(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; - }; - } + result = DevelPanGesture::New(arg1); + } CALL_CATCH_EXCEPTION(0); } - jresult = (void *)result; + jresult = new Dali::PanGesture((const Dali::PanGesture &)result); return jresult; } @@ -25836,6 +25841,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_PinchGesture__SWIG_0() { } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_PinchGesture_New(int jarg1) { + void * jresult ; + Dali::GestureState arg1 ; + Dali::PinchGesture result; + + arg1 = (Dali::GestureState)jarg1; + { + try { + result = DevelPinchGesture::New(arg1); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::PinchGesture((const Dali::PinchGesture &)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_PinchGesture__SWIG_1(void * jarg1) { void * jresult ; Dali::PinchGesture *arg1 = 0 ; @@ -26204,6 +26226,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_TapGesture__SWIG_0() { } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TapGesture_New(int jarg1) { + void * jresult ; + Dali::GestureState arg1 ; + Dali::TapGesture result; + + arg1 = (Dali::GestureState)jarg1; + { + try { + result = DevelTapGesture::New(arg1); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::TapGesture((const Dali::TapGesture &)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_TapGesture__SWIG_1(void * jarg1) { void * jresult ; Dali::TapGesture *arg1 = 0 ; diff --git a/dali-csharp-binder/src/gestures.cpp b/dali-csharp-binder/src/gestures.cpp index 99dc54b..68ab335 100755 --- a/dali-csharp-binder/src/gestures.cpp +++ b/dali-csharp-binder/src/gestures.cpp @@ -22,6 +22,7 @@ #include "common.h" #include #include +#include #ifdef __cplusplus extern "C" { @@ -324,6 +325,39 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_RotationGesture__SWIG_0() { } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_RotationGesture_New(int jarg1) { + void * jresult ; + Dali::GestureState arg1 ; + Dali::RotationGesture result; + + arg1 = (Dali::GestureState)jarg1; + { + try { + result = DevelRotationGesture::New(arg1); + } catch (std::out_of_range& e) { + { + SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return 0; + }; + } catch (std::exception& e) { + { + SWIG_CSharpException(SWIG_RuntimeError, const_cast(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::RotationGesture((const Dali::RotationGesture &)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_RotationGesture__SWIG_1(void * jarg1) { void * jresult ; Dali::RotationGesture *arg1 = 0 ; -- 2.7.4