Binding FrameCallbackInterface 41/239141/4
authorhuiyu.eun <huiyu.eun@samsung.com>
Fri, 17 Jul 2020 06:36:33 +0000 (15:36 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Thu, 30 Jul 2020 07:04:41 +0000 (16:04 +0900)
 - adding RemoveFrameCallback

Change-Id: Icae18b8c64a58afcadb503f3174ccac6a8b3bb77
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
dali-csharp-binder/src/dali_wrap.cpp
dali-csharp-binder/src/dali_wrap.h

index 98f05f0..8476a5b 100644 (file)
@@ -487,6 +487,11 @@ void SWIG_CSharpException(int code, const char *msg) {
 
 #include <dali-toolkit/devel-api/text/rendering-backend.h>
 
+
+#include <dali/devel-api/update/frame-callback-interface.h>
+#include <dali/devel-api/update/update-proxy.h>
+
+
 // add here SWIG version check
 
 #if defined(_MSC_VER)         // Microsoft Visual C++ 6.0
@@ -2533,6 +2538,36 @@ void SwigDirector_CustomAlgorithmInterface::swig_init_callbacks() {
   swig_callbackGetNextFocusableActor = 0;
 }
 
+SwigDirector_FrameCallbackInterface::SwigDirector_FrameCallbackInterface() : Dali::FrameCallbackInterface(), Swig::Director() {
+  swig_callbackOnUpdate = 0;
+}
+
+SwigDirector_FrameCallbackInterface::~SwigDirector_FrameCallbackInterface() {
+
+}
+
+void SwigDirector_FrameCallbackInterface::swig_connect_director(SWIG_Callback0_t callbackUpdate) {
+  swig_callbackOnUpdate = callbackUpdate;
+}
+
+
+void SwigDirector_FrameCallbackInterface::Update(Dali::UpdateProxy& updateProxy, float elapsedSeconds) {
+  void * jcurrent  ;
+
+  if (!swig_callbackOnUpdate) {
+    throw Swig::DirectorPureVirtualException("Dali::FrameCallbackInterface::Update");
+  } else {
+    Dali::UpdateProxy* proxy = &updateProxy;
+    jcurrent = (void *)proxy;
+    swig_callbackOnUpdate(jcurrent, elapsedSeconds);
+    if (!jcurrent) {
+      DALI_LOG_ERROR("[ERROR][%s line:%d] Unexpected null return for type Dali::UpdateProxy! ", __FILE__, __LINE__);
+      return;
+    }
+  }
+  return;
+}
+
 
 #ifdef __cplusplus
 extern "C" {
@@ -86948,6 +86983,150 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_CustomAlgorithmInterface() {
 }
 
 
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_director_connect(void *objarg, SwigDirector_FrameCallbackInterface::SWIG_Callback0_t callback0) {
+  Dali::FrameCallbackInterface *obj = (Dali::FrameCallbackInterface *)objarg;
+  SwigDirector_FrameCallbackInterface *director = dynamic_cast<SwigDirector_FrameCallbackInterface *>(obj);
+  if (director) {
+    director->swig_connect_director(callback0);
+  }
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_FrameCallbackInterface() {
+  void * jresult ;
+  Dali::FrameCallbackInterface *result = 0 ;
+
+  {
+    try {
+      result =(Dali::FrameCallbackInterface *) new SwigDirector_FrameCallbackInterface();
+    } 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 = (void *)result;
+  return jresult;
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetPosition(void * updateProxy, unsigned int id,  void* position) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)position;
+  return proxy->GetPosition(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_SetPosition(void * updateProxy, unsigned int id, void* position) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)position;
+  return proxy->SetPosition(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakePosition(void * updateProxy, unsigned int id, void* position) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)position;
+  return proxy->BakePosition(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetSize(void * updateProxy, unsigned int id, void* size) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)size;
+  return proxy->GetSize(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_SetSize(void * updateProxy, unsigned int id, void* size) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)size;
+  return proxy->SetSize(id, *vector3);
+}
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakeSize(void * updateProxy, unsigned int id, void* size) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)size;
+  return proxy->BakeSize(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetPositionAndSize(void * updateProxy, unsigned int id, void* position, void* size) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3_pos = (Dali::Vector3 *)position;
+  Dali::Vector3* vector3_size = (Dali::Vector3 *)size;
+  return proxy->GetPositionAndSize(id, *vector3_pos, *vector3_size);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetScale(void * updateProxy, unsigned int id, void* scale) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)scale;
+  return proxy->GetScale(id,* vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_SetScale(void * updateProxy, unsigned int id, void* scale) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)scale;
+  return proxy->SetScale(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakeScale(void * updateProxy, unsigned int id, void* scale) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector3* vector3 = (Dali::Vector3 *)scale;
+  return proxy->BakeScale(id, *vector3);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetColor(void * updateProxy, unsigned int id, void* color) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector4* vector4 = (Dali::Vector4 *)color;
+  return proxy->GetColor(id, *vector4);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_SetColor(void * updateProxy, unsigned int id, void* color) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector4* vector4 = (Dali::Vector4 *)color;
+  return proxy->SetColor(id, *vector4);
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakeColor(void * updateProxy, unsigned int id, void* color) {
+  Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy;
+  Dali::Vector4* vector4 = (Dali::Vector4 *)color;
+  return proxy->BakeColor(id, *vector4);
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_AddFrameCallback(void * jarg1, void* jarg2, void* jarg3) {
+  Dali::FrameCallbackInterface *obj = (Dali::FrameCallbackInterface *)jarg2;
+  SwigDirector_FrameCallbackInterface *arg2 = dynamic_cast<SwigDirector_FrameCallbackInterface *>(obj);
+
+  Dali::Stage *arg1 = (Dali::Stage *) 0;
+  Dali::Actor *arg3 = 0;
+
+  arg1 = (Dali::Stage *)jarg1;
+  arg3 = (Dali::Actor *)jarg3;
+
+  DevelStage::AddFrameCallback( *arg1, *arg2, *arg3 );
+  return;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_RemoveFrameCallback(void * jarg1, void* jarg2) {
+
+  Dali::FrameCallbackInterface *obj = (Dali::FrameCallbackInterface *)jarg2;
+  SwigDirector_FrameCallbackInterface *arg2 = dynamic_cast<SwigDirector_FrameCallbackInterface *>(obj);
+
+  Dali::Stage *arg1 = (Dali::Stage *) 0;
+
+  arg1 = (Dali::Stage *)jarg1;
+
+  DevelStage::RemoveFrameCallback( *arg1, *arg2 );
+  return;
+}
+
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_CustomAlgorithmInterface_director_connect(void *objarg, SwigDirector_CustomAlgorithmInterface::SWIG_Callback0_t callback0) {
   Dali::Toolkit::DevelKeyboardFocusManager::CustomAlgorithmInterface *obj = (Dali::Toolkit::DevelKeyboardFocusManager::CustomAlgorithmInterface *)objarg;
   SwigDirector_CustomAlgorithmInterface *director = dynamic_cast<SwigDirector_CustomAlgorithmInterface *>(obj);
@@ -86956,7 +87135,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_CustomAlgorithmInterface_director_connec
   }
 }
 
-
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SetCustomAlgorithm(void * jarg1, void * jarg2) {
   KeyboardFocusManager arg1 ;
   Dali::Toolkit::DevelKeyboardFocusManager::CustomAlgorithmInterface *arg2 = 0 ;
index 3f94766..5786544 100755 (executable)
@@ -276,4 +276,18 @@ private:
     void swig_init_callbacks();
 };
 
+class SwigDirector_FrameCallbackInterface : public Dali::FrameCallbackInterface, public Swig::Director {
+public:
+    SwigDirector_FrameCallbackInterface();
+    virtual ~SwigDirector_FrameCallbackInterface();
+    virtual void Update( Dali::UpdateProxy& updateProxy, float elapsedSeconds );
+
+    typedef void (SWIGSTDCALL* SWIG_Callback0_t)( void*  updateProxy, float elapsedSeconds );
+    void swig_connect_director( SWIG_Callback0_t callbackUpdate );
+
+
+private:
+    SWIG_Callback0_t swig_callbackOnUpdate;
+};
+
 #endif