2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef CSHARP_EVENT_THREAD_CALLBACK
19 #define CSHARP_EVENT_THREAD_CALLBACK
23 #include <dali/devel-api/adaptor-framework/event-thread-callback.h>
29 typedef void (SWIGSTDCALL* SWIG_CallbackMakeCallback)(void);
31 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_EventThreadCallback(SWIG_CallbackMakeCallback callbackOnMakeCallback) {
33 void (*arg1)(void) = (void (*)(void)) 0 ;
34 Dali::EventThreadCallback *result = 0 ;
35 Dali::CallbackBase * callbackBase = 0 ;
37 arg1 = (void (*)(void))callbackOnMakeCallback;
38 callbackBase = (Dali::CallbackBase *)Dali::MakeCallback(arg1);
42 result = (Dali::EventThreadCallback *)new Dali::EventThreadCallback(callbackBase);
43 } catch (std::out_of_range& e) {
47 SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
49 } catch (std::exception& e) {
53 SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
55 } catch (Dali::DaliException e) {
59 SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
65 SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
69 jresult = (void *)result;
73 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_EventThreadCallback(void * jarg1) {
74 Dali::EventThreadCallback *arg1 = (Dali::EventThreadCallback *) 0 ;
76 arg1 = (Dali::EventThreadCallback *)jarg1;
80 } catch (std::out_of_range& e) {
82 SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
84 } catch (std::exception& e) {
86 SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
88 } catch (Dali::DaliException e) {
90 SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
94 SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
102 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_EventThreadCallback_Trigger(void * jarg1) {
103 Dali::EventThreadCallback *arg1 = (Dali::EventThreadCallback *) 0 ;
105 arg1 = (Dali::EventThreadCallback *)jarg1;
109 } catch (std::out_of_range& e) {
111 SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
113 } catch (std::exception& e) {
115 SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
117 } catch (Dali::DaliException e) {
119 SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
123 SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
132 #endif //CSHARP_EVENT_THREAD_CALLBACK