From 810f6d578fad7c8f5b5bf346d4df96a4784fdbce Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Fri, 27 Dec 2019 17:49:02 +0900 Subject: [PATCH] Add to get current window orientation. Add the API to get current window orientation. It is to return the logical orientation Change-Id: Iae7433f24cc3b0cff9705a618ac1da7edb2bb197 --- dali-csharp-binder/src/window.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/dali-csharp-binder/src/window.cpp b/dali-csharp-binder/src/window.cpp index 985bada..05929b1 100755 --- a/dali-csharp-binder/src/window.cpp +++ b/dali-csharp-binder/src/window.cpp @@ -786,6 +786,39 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Window_GetPreferredOrientation(void * jar return jresult; } +SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Window_GetCurrentOrientation(void * jarg1) { + int jresult ; + Dali::Window::WindowOrientation result; + Dali::Window* window = (Dali::Window*)jarg1; + if (!window) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Window", 0); + return 0; + } + { + try { + result = Dali::DevelWindow::GetCurrentOrientation(*window); + } 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 = (int)result; + return jresult; +} SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Window_GetNativeHandle(void * jarg1) { void * jresult ; -- 2.7.4