[Tizen] Add to get current window orientation. accepted/tizen/unified/20200123.005114 submit/tizen/20200121.102439
authorSeungho, Baek <sbsh.baek@samsung.com>
Tue, 21 Jan 2020 08:37:11 +0000 (17:37 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Tue, 21 Jan 2020 08:37:13 +0000 (17:37 +0900)
This reverts commit c1fc60c6b5086675dcc16c1a66cc87f566492cae.

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 ;