From 79ca1e0c78e7d613f8c55b119bf7a98b7334a73c Mon Sep 17 00:00:00 2001 From: Sunghyun kim Date: Tue, 4 Jun 2019 18:21:20 +0900 Subject: [PATCH] [Tizen] Add C# binding for GetLogicalKey API This reverts commit 09ed71b70f0bb10d46e2e28588fe686e61cd0d72. Change-Id: Idfbcd6cb5357f6488115f00074dba22c8485877f --- dali-csharp-binder/src/dali_wrap.cpp | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/dali-csharp-binder/src/dali_wrap.cpp b/dali-csharp-binder/src/dali_wrap.cpp index 9ed094d..d64274c 100755 --- a/dali-csharp-binder/src/dali_wrap.cpp +++ b/dali-csharp-binder/src/dali_wrap.cpp @@ -425,6 +425,7 @@ void SWIG_CSharpException(int code, const char *msg) { #include #include +#include #include #include @@ -31503,6 +31504,43 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Key_state_get(void * jarg1) { return jresult; } +SWIGEXPORT char * SWIGSTDCALL CSharp_Dali_Key_logicalKey_get(void * jarg1) { + char * jresult ; + std::string result; + Dali::KeyEvent *arg1 = (Dali::KeyEvent *) 0; + + arg1 = (Dali::KeyEvent *)jarg1; + if (!arg1) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::DevelKeyEvent const & type is null", 0); + return 0; + } + { + try { + result = Dali::DevelKeyEvent::GetLogicalKey(*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 = SWIG_csharp_string_callback( (&result)->c_str() ); + return jresult; +} + SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LongPressGestureDetector__SWIG_0() { void * jresult ; -- 2.7.4