manual binding for FocusManager and Window 96/134896/1
authorxb.teng <xb.teng@samsung.com>
Tue, 20 Jun 2017 08:15:42 +0000 (16:15 +0800)
committerxb.teng <xb.teng@samsung.com>
Tue, 20 Jun 2017 08:17:07 +0000 (16:17 +0800)
There are some changes:
1. Add MoveFocusBackward api for FocusManager;
2. Add Resized event for Window.

Change-Id: I6284b75d3b3e9e8cc9d6f331d1b6e024493492c3
Signed-off-by: xb.teng <xb.teng@samsung.com>
dali-csharp-binder/file.list
dali-csharp-binder/src/keyboard_focus_manager_wrap.cpp
dali-csharp-binder/src/window.cpp [new file with mode: 0755]

index b668ecf..630a6ec 100755 (executable)
@@ -13,6 +13,7 @@ dali_csharp_binder_src_files = \
   src/manual-bindings-all.cpp \
   src/tts-player.cpp \
   src/text-editor.cpp \
+  src/window.cpp \
   src/key-grab.cpp
 
 dali_csharp_binder_header_files = \
index 4845947..e82321a 100755 (executable)
@@ -454,6 +454,28 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_KeyboardFocusManager_GetFocusIndicatorActor
   return jresult;
 }
 
+SWIGEXPORT void SWIGSTDCALL CSharp_KeyboardFocusManager_MoveFocusBackward(void * jarg1) {
+  Dali::Toolkit::KeyboardFocusManager *arg1 = (Dali::Toolkit::KeyboardFocusManager *) 0 ;
+
+  arg1 = (Dali::Toolkit::KeyboardFocusManager *)jarg1;
+  {
+    try {
+      (arg1)->MoveFocusBackward();
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return;
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return;
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return;
+      };
+    }
+  }
+}
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_KeyboardFocusManager_PreFocusChangeSignal(void * jarg1) {
   void * jresult ;
diff --git a/dali-csharp-binder/src/window.cpp b/dali-csharp-binder/src/window.cpp
new file mode 100755 (executable)
index 0000000..f0381e6
--- /dev/null
@@ -0,0 +1,260 @@
+/** Copyright (c) 2017 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.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#ifndef CSHARP_WINDOW
+#define CSHARP_WINDOW
+#endif
+
+#include "common.h"
+#include <dali/devel-api/adaptor-framework/window-devel.h>
+
+SWIGINTERN bool Dali_Signal_void_int_int___Empty(Dali::Signal< void (int,int) > const *self){
+  return self->Empty();
+}
+SWIGINTERN std::size_t Dali_Signal_void_int_int__GetConnectionCount(Dali::Signal< void (int,int) > const *self){
+  return self->GetConnectionCount();
+}
+SWIGINTERN void Dali_Signal_void_int_int__Connect(Dali::Signal< void (int,int) > *self,void (*func)(int,int)){
+  self->Connect( func );
+}
+SWIGINTERN void Dali_Signal_void_int_int__Disconnect(Dali::Signal< void (int,int) > *self,void (*func)(int,int)){
+  self->Disconnect( func );
+}
+SWIGINTERN void Dali_Signal_void_int_int__Emit(Dali::Signal< void (int,int) > *self,int arg1,int arg2){
+  self->Emit( arg1, arg2 );
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Window_ResizedSignal(void * jarg1) {
+  void * jresult ;
+  Dali::Window arg1 ;
+  Dali::Window *argp1 ;
+  Dali::DevelWindow::ResizedSignalType *result = 0 ;
+
+  argp1 = (Dali::Window *)jarg1; 
+  if (!argp1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Window", 0);
+    return 0;
+  }
+  arg1 = *argp1; 
+  {
+    try {
+      result = (Dali::DevelWindow::ResizedSignalType *) &Dali::DevelWindow::ResizedSignal(arg1);
+    } 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 (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
+      };
+    }
+  }
+  jresult = (void *)result; 
+  return jresult;
+}
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_ResizedSignal_Empty(void * jarg1) {
+  unsigned int jresult ;
+  Dali::Signal< void (int,int) > *arg1 = (Dali::Signal< void (int,int) > *) 0 ;
+  bool result;
+
+  arg1 = (Dali::Signal< void (int,int) > *)jarg1; 
+  {
+    try {
+      result = (bool)Dali_Signal_void_int_int___Empty((Dali::Signal< void (int,int) > const *)arg1);
+    } 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 (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
+      };
+    }
+  }
+  jresult = result; 
+  return jresult;
+}
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_Dali_ResizedSignal_GetConnectionCount(void * jarg1) {
+  unsigned long jresult ;
+  Dali::Signal< void (int,int) > *arg1 = (Dali::Signal< void (int,int) > *) 0 ;
+  std::size_t result;
+
+  arg1 = (Dali::Signal< void (int,int) > *)jarg1; 
+  {
+    try {
+      result = Dali_Signal_void_int_int__GetConnectionCount((Dali::Signal< void (int,int) > const *)arg1);
+    } 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 (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
+      };
+    }
+  }
+  jresult = (unsigned long)result; 
+  return jresult;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ResizedSignal_Connect(void * jarg1, void * jarg2) {
+  Dali::Signal< void (int,int) > *arg1 = (Dali::Signal< void (int,int) > *) 0 ;
+  void (*arg2)(int,int) = (void (*)(int,int)) 0 ;
+
+  arg1 = (Dali::Signal< void (int,int) > *)jarg1; 
+  arg2 = (void (*)(int,int))jarg2; 
+  {
+    try {
+      Dali_Signal_void_int_int__Connect(arg1,arg2);
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
+      };
+    }
+  }
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ResizedSignal_Disconnect(void * jarg1, void * jarg2) {
+  Dali::Signal< void (int,int) > *arg1 = (Dali::Signal< void (int,int) > *) 0 ;
+  void (*arg2)(int,int) = (void (*)(int,int)) 0 ;
+
+  arg1 = (Dali::Signal< void (int,int) > *)jarg1; 
+  arg2 = (void (*)(int,int))jarg2; 
+  {
+    try {
+      Dali_Signal_void_int_int__Disconnect(arg1,arg2);
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
+      };
+    }
+  }
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ResizedSignal_Emit(void * jarg1, int jarg2, int jarg3) {
+  Dali::Signal< void (int,int) > *arg1 = (Dali::Signal< void (int,int) > *) 0 ;
+  int arg2 ;
+  int arg3 ;
+
+  arg1 = (Dali::Signal< void (int,int) > *)jarg1; 
+  arg2 = (int)jarg2; 
+  arg3 = (int)jarg3; 
+  {
+    try {
+      Dali_Signal_void_int_int__Emit(arg1,arg2,arg3);
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
+      };
+    }
+  }
+}
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ResizedSignal() {
+  void * jresult ;
+  Dali::Signal< void (int,int) > *result = 0 ;
+
+  {
+    try {
+      result = (Dali::Signal< void (int,int) > *)new Dali::Signal< void (int,int) >();
+    } 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 (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
+      };
+    }
+  }
+  jresult = (void *)result; 
+  return jresult;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_ResizedSignal(void * jarg1) {
+  Dali::Signal< void (int,int) > *arg1 = (Dali::Signal< void (int,int) > *) 0 ;
+
+  arg1 = (Dali::Signal< void (int,int) > *)jarg1; 
+  {
+    try {
+      delete arg1;
+    } catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
+      };
+    } catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
+      };
+    }
+  }
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+