Add to get current window orientation. 73/221373/2
authorWonsik Jung <sidein@samsung.com>
Fri, 27 Dec 2019 08:49:02 +0000 (17:49 +0900)
committerWonsik Jung <sidein@samsung.com>
Thu, 2 Jan 2020 03:03:52 +0000 (12:03 +0900)
Add the API to get current window orientation.
It is to return the logical orientation

Change-Id: Iae7433f24cc3b0cff9705a618ac1da7edb2bb197

dali-csharp-binder/src/window.cpp

index 985bada..05929b1 100755 (executable)
@@ -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<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 = (int)result;
+  return jresult;
+}
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Window_GetNativeHandle(void * jarg1) {
   void * jresult ;