${dali_csharp_binder_dir}/src/font-client.cpp \
${dali_csharp_binder_dir}/src/transition-effects.cpp \
${dali_csharp_binder_dir}/src/atspi.cpp \
- ${dali_csharp_binder_dir}/src/component-application-wrap.cpp
+ ${dali_csharp_binder_dir}/src/component-application-wrap.cpp \
+ ${dali_csharp_binder_dir}/src/tizen-dependency-wrap.cpp
# module: csharp-binder, backend: tizen-wearable
dali_csharp_binder_tizen_wearable_src_files = \
--- /dev/null
+/** Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/\r
+\r
+#ifndef CSHARP_TIZEN_DEPENDENCY_WRAP\r
+#define CSHARP_TIZEN_DEPENDENCY_WRAP\r
+#endif\r
+\r
+#include "common.h"\r
+#include <dali/dali.h>\r
+\r
+#include <dali/devel-api/adaptor-framework/native-image-source-devel.h>\r
+#include <tbm_surface.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Texture_TbmSurface(tbm_surface_h tbm_surface) {\r
+ Dali::NativeImageSourcePtr mNativeImageSrc;\r
+ Dali::Texture mNativeTexture;\r
+ void * jresult ;\r
+\r
+ if (!tbm_surface) {\r
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "tbm surface is null", 0);\r
+ return 0;\r
+ }\r
+\r
+ try {\r
+ Dali::Any source(tbm_surface);\r
+ mNativeImageSrc = Dali::NativeImageSource::New(source);\r
+ mNativeTexture = Dali::Texture::New( *mNativeImageSrc );\r
+ } catch (std::out_of_range& e) {\r
+ {
+ 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;
+ };
+ }\r
+\r
+ jresult = new Dali::Texture((const Dali::Texture &)mNativeTexture);\r
+ return (void*)jresult;\r
+}\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r