Add GetLastKeyEvent and GetLastTouchEvent binder for Window 38/276038/1
authorXianbing Teng <xb.teng@samsung.com>
Tue, 31 May 2022 06:56:34 +0000 (14:56 +0800)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 9 Jun 2022 02:31:07 +0000 (11:31 +0900)
Change-Id: I921a087b5605bb90677a6e118fae8f603c0ee136

dali-csharp-binder/src/window-wrap.cpp

index ae91ba0..52d92dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -2563,6 +2563,42 @@ SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Window_IsWindowRotating(void* winHandle)
   return result;
 }
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Window_GetLastKeyEvent(void* winHandle)
+{
+  Dali::Window* window = (Dali::Window*)winHandle;
+  void * jresult;
+  Dali::KeyEvent *result = 0;
+  if (!window) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Window", 0);
+    return 0;
+  }
+  {
+    try {
+      result = (Dali::KeyEvent *)&Dali::DevelWindow::GetLastKeyEvent(*window);
+    } CALL_CATCH_EXCEPTION(0);
+  }
+  jresult = (void *)result;
+  return result;
+}
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Window_GetLastTouchEvent(void* winHandle)
+{
+  Dali::Window* window = (Dali::Window*)winHandle;
+  void * jresult;
+  Dali::TouchEvent *result = 0;
+  if (!window) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Window", 0);
+    return 0;
+  }
+  {
+    try {
+      result = (Dali::TouchEvent *)&Dali::DevelWindow::GetLastTouchEvent(*window);
+    } CALL_CATCH_EXCEPTION(0);
+  }
+  jresult = (void *)result;
+  return result;
+}
+
 #ifdef __cplusplus
 }
 #endif