From 3395826a6f4c128bacc1267fdcdf506a922a80f1 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Wed, 14 Feb 2018 16:01:00 +0900 Subject: [PATCH] [Tizen] sync with DALi_1.3.9 Change-Id: I72a4a1a01500f8faf1fc16a1ae231b8c89e071ca Signed-off-by: dongsug.song --- dali-csharp-binder/src/imf-manager.cpp | 3 +- dali-csharp-binder/src/version-check.cpp | 76 ++++++++++++++++++++++++++++++++ packaging/dali-csharp-binder.spec | 2 +- 3 files changed, 78 insertions(+), 3 deletions(-) diff --git a/dali-csharp-binder/src/imf-manager.cpp b/dali-csharp-binder/src/imf-manager.cpp index 45c6f86..aa681c6 100755 --- a/dali-csharp-binder/src/imf-manager.cpp +++ b/dali-csharp-binder/src/imf-manager.cpp @@ -465,8 +465,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ImfManager_Finalize(void * jarg1) { arg1 = (Dali::ImfManager *)jarg1; { try { - //Need to check, Finalize is deprecated - //(arg1)->Finalize(); + (arg1)->Finalize(); } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; diff --git a/dali-csharp-binder/src/version-check.cpp b/dali-csharp-binder/src/version-check.cpp index 0f95a80..61d9735 100755 --- a/dali-csharp-binder/src/version-check.cpp +++ b/dali-csharp-binder/src/version-check.cpp @@ -43,6 +43,82 @@ SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_NativeVersionCheck(int * ver1, int * ver return true; } +SWIGEXPORT bool SWIGSTDCALL CSharp_NUI_InternalAPIVersionCheck(int * version, int * reserved1, int * reserved2 ) +{ + try + { + if(Dali::CORE_MAJOR_VERSION == 1 && Dali::CORE_MINOR_VERSION == 2) + { + //by dali_1.2.85, nui_api_internal_version is set as 400 + if(Dali::CORE_MICRO_VERSION <= 85) + { + *version = 400; + *reserved1 = 0; + *reserved2 = 0; + return true; + } + //from dali_1.2.86, nui_api_internal_version is set as 401 + else if(Dali::CORE_MICRO_VERSION == 86) + { + *version = 401; + *reserved1 = 0; + *reserved2 = 0; + return true; + } + //gotten wrong native wrong version + else + { + *version = Dali::CORE_MAJOR_VERSION; + *reserved1 = Dali::CORE_MINOR_VERSION; + *reserved2 = Dali::CORE_MICRO_VERSION; + return false; + } + } + else if(Dali::CORE_MAJOR_VERSION == 1 && Dali::CORE_MINOR_VERSION == 3) + { + //nui_api_internal_version is set as 500 + if(Dali::CORE_MICRO_VERSION <= 99) + { + *version = 500; + *reserved1 = 0; + *reserved2 = 0; + return true; + } + else + { + *version = Dali::CORE_MAJOR_VERSION; + *reserved1 = Dali::CORE_MINOR_VERSION; + *reserved2 = Dali::CORE_MICRO_VERSION; + return false; + } + } + //something wrong + else + { + *version = Dali::CORE_MAJOR_VERSION; + *reserved1 = Dali::CORE_MINOR_VERSION; + *reserved2 = Dali::CORE_MICRO_VERSION; + return false; + } + } + catch (std::out_of_range& e) + { + SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); + return false; + } + catch (std::exception& e) + { + SWIG_CSharpException(SWIG_RuntimeError, const_cast(e.what())); + return false; + } + catch (...) + { + SWIG_CSharpException(SWIG_UnknownError, "unknown error"); + return false; + } + return false; +} + #ifdef __cplusplus } #endif diff --git a/packaging/dali-csharp-binder.spec b/packaging/dali-csharp-binder.spec index 8fb695d..c851b50 100755 --- a/packaging/dali-csharp-binder.spec +++ b/packaging/dali-csharp-binder.spec @@ -1,6 +1,6 @@ Name: dali-csharp-binder -Version: 1.2.83 +Version: 1.3.9+nui500 Release: 1 Summary: build dali csharp binder License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4