1 #ifndef CSHARP_COMMON_H
2 #define CSHARP_COMMON_H
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #define SWIG_DIRECTORS
24 /* SwigValueWrapper is described in swig.swg */
25 template<typename T> class SwigValueWrapper
27 struct SwigMovePointer
30 SwigMovePointer(T *p) : ptr(p) { }
31 ~SwigMovePointer() { delete ptr; }
32 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
34 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
35 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
37 SwigValueWrapper() : pointer(0) { }
38 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
39 operator T&() const { return *pointer.ptr; }
40 T *operator&() { return pointer.ptr; }
43 template <typename T> T SwigValueInit()
53 /* attribute recognised by some compilers to avoid 'unused' warnings */
55 # if defined(__GNUC__)
56 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
57 # define SWIGUNUSED __attribute__ ((__unused__))
62 # define SWIGUNUSED __attribute__ ((__unused__))
68 /* internal SWIG method */
70 # define SWIGINTERN static SWIGUNUSED
74 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
75 # if defined(STATIC_LINKED)
78 # define SWIGEXPORT __declspec(dllexport)
81 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
82 # define SWIGEXPORT __attribute__ ((visibility("default")))
94 #define SWIG_UnknownError -1
95 #define SWIG_IOError -2
96 #define SWIG_RuntimeError -3
97 #define SWIG_IndexError -4
98 #define SWIG_TypeError -5
99 #define SWIG_DivisionByZero -6
100 #define SWIG_OverflowError -7
101 #define SWIG_SyntaxError -8
102 #define SWIG_ValueError -9
103 #define SWIG_SystemError -10
104 #define SWIG_AttributeError -11
105 #define SWIG_MemoryError -12
106 #define SWIG_NullReferenceError -13
108 /* Support for throwing C# exceptions from C/C++. There are two types:
109 * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */
112 SWIG_CSharpApplicationException,
113 SWIG_CSharpArithmeticException,
114 SWIG_CSharpDivideByZeroException,
115 SWIG_CSharpIndexOutOfRangeException,
116 SWIG_CSharpInvalidCastException,
117 SWIG_CSharpInvalidOperationException,
118 SWIG_CSharpIOException,
119 SWIG_CSharpNullReferenceException,
120 SWIG_CSharpOutOfMemoryException,
121 SWIG_CSharpOverflowException,
122 SWIG_CSharpSystemException
123 } SWIG_CSharpExceptionCodes;
127 SWIG_CSharpArgumentException,
128 SWIG_CSharpArgumentNullException,
129 SWIG_CSharpArgumentOutOfRangeException
130 } SWIG_CSharpExceptionArgumentCodes;
132 typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *);
133 typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *);
137 SWIG_CSharpExceptionCodes code;
138 SWIG_CSharpExceptionCallback_t callback;
139 } SWIG_CSharpException_t;
143 SWIG_CSharpExceptionArgumentCodes code;
144 SWIG_CSharpExceptionArgumentCallback_t callback;
145 } SWIG_CSharpExceptionArgument_t;
147 static SWIG_CSharpException_t SWIG_csharp_exceptions[] =
149 { SWIG_CSharpApplicationException, NULL },
150 { SWIG_CSharpArithmeticException, NULL },
151 { SWIG_CSharpDivideByZeroException, NULL },
152 { SWIG_CSharpIndexOutOfRangeException, NULL },
153 { SWIG_CSharpInvalidCastException, NULL },
154 { SWIG_CSharpInvalidOperationException, NULL },
155 { SWIG_CSharpIOException, NULL },
156 { SWIG_CSharpNullReferenceException, NULL },
157 { SWIG_CSharpOutOfMemoryException, NULL },
158 { SWIG_CSharpOverflowException, NULL },
159 { SWIG_CSharpSystemException, NULL }
162 static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] =
164 { SWIG_CSharpArgumentException, NULL },
165 { SWIG_CSharpArgumentNullException, NULL },
166 { SWIG_CSharpArgumentOutOfRangeException, NULL }
169 static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg)
171 SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
172 if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t))
174 callback = SWIG_csharp_exceptions[code].callback;
179 static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
180 SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
181 if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
182 callback = SWIG_csharp_exceptions_argument[code].callback;
184 callback(msg, param_name);
187 SWIGINTERN void SWIG_CSharpException(int code, const char *msg)
189 if (code == SWIG_ValueError)
191 SWIG_CSharpExceptionArgumentCodes exception_code = SWIG_CSharpArgumentOutOfRangeException;
192 SWIG_CSharpSetPendingExceptionArgument(exception_code, msg, 0);
196 SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpApplicationException;
199 case SWIG_MemoryError:
200 exception_code = SWIG_CSharpOutOfMemoryException;
202 case SWIG_IndexError:
203 exception_code = SWIG_CSharpIndexOutOfRangeException;
205 case SWIG_DivisionByZero:
206 exception_code = SWIG_CSharpDivideByZeroException;
209 exception_code = SWIG_CSharpIOException;
211 case SWIG_OverflowError:
212 exception_code = SWIG_CSharpOverflowException;
214 case SWIG_RuntimeError:
216 case SWIG_SyntaxError:
217 case SWIG_SystemError:
218 case SWIG_UnknownError:
220 exception_code = SWIG_CSharpApplicationException;
223 SWIG_CSharpSetPendingException(exception_code, msg);
231 #include <dali/dali.h>
232 #include <dali-toolkit/dali-toolkit.h>
234 #include <dali-toolkit/devel-api/controls/control-wrapper.h>
235 #include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
237 #endif // CSHARP_COMMON_H