Manual binding for KeyboardFocusManager
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / manual / cpp / common.h
1 #ifndef CSHARP_COMMON
2 #define CSHARP_COMMON
3 #endif
4
5 #define SWIG_DIRECTORS
6
7 #include <stdexcept>
8
9 #define SWIGSTDCALL
10
11 /* attribute recognised by some compilers to avoid 'unused' warnings */
12 #ifndef SWIGUNUSED
13 # if defined(__GNUC__)
14 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
15 #     define SWIGUNUSED __attribute__ ((__unused__))
16 #   else
17 #     define SWIGUNUSED
18 #   endif
19 # elif defined(__ICC)
20 #   define SWIGUNUSED __attribute__ ((__unused__))
21 # else
22 #   define SWIGUNUSED
23 # endif
24 #endif
25
26 /* internal SWIG method */
27 #ifndef SWIGINTERN
28 # define SWIGINTERN static SWIGUNUSED
29 #endif
30
31 #ifndef SWIGEXPORT
32 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
33 #   if defined(STATIC_LINKED)
34 #     define SWIGEXPORT
35 #   else
36 #     define SWIGEXPORT __declspec(dllexport)
37 #   endif
38 # else
39 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
40 #     define SWIGEXPORT __attribute__ ((visibility("default")))
41 #   else
42 #     define SWIGEXPORT
43 #   endif
44 # endif
45 #endif
46
47 #include <stdlib.h>
48 #include <string.h>
49 #include <stdio.h>
50
51 /*  Errors in SWIG */
52 #define  SWIG_UnknownError         -1
53 #define  SWIG_IOError            -2
54 #define  SWIG_RuntimeError       -3
55 #define  SWIG_IndexError         -4
56 #define  SWIG_TypeError          -5
57 #define  SWIG_DivisionByZero     -6
58 #define  SWIG_OverflowError      -7
59 #define  SWIG_SyntaxError        -8
60 #define  SWIG_ValueError         -9
61 #define  SWIG_SystemError        -10
62 #define  SWIG_AttributeError     -11
63 #define  SWIG_MemoryError        -12
64 #define  SWIG_NullReferenceError   -13
65
66 /* Support for throwing C# exceptions from C/C++. There are two types:
67  * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */
68 typedef enum {
69   SWIG_CSharpApplicationException,
70   SWIG_CSharpArithmeticException,
71   SWIG_CSharpDivideByZeroException,
72   SWIG_CSharpIndexOutOfRangeException,
73   SWIG_CSharpInvalidCastException,
74   SWIG_CSharpInvalidOperationException,
75   SWIG_CSharpIOException,
76   SWIG_CSharpNullReferenceException,
77   SWIG_CSharpOutOfMemoryException,
78   SWIG_CSharpOverflowException,
79   SWIG_CSharpSystemException
80 } SWIG_CSharpExceptionCodes;
81
82 typedef enum {
83   SWIG_CSharpArgumentException,
84   SWIG_CSharpArgumentNullException,
85   SWIG_CSharpArgumentOutOfRangeException
86 } SWIG_CSharpExceptionArgumentCodes;
87
88 typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *);
89 typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *);
90
91 typedef struct {
92   SWIG_CSharpExceptionCodes code;
93   SWIG_CSharpExceptionCallback_t callback;
94 } SWIG_CSharpException_t;
95
96 typedef struct {
97   SWIG_CSharpExceptionArgumentCodes code;
98   SWIG_CSharpExceptionArgumentCallback_t callback;
99 } SWIG_CSharpExceptionArgument_t;
100
101 static SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
102   { SWIG_CSharpApplicationException, NULL },
103   { SWIG_CSharpArithmeticException, NULL },
104   { SWIG_CSharpDivideByZeroException, NULL },
105   { SWIG_CSharpIndexOutOfRangeException, NULL },
106   { SWIG_CSharpInvalidCastException, NULL },
107   { SWIG_CSharpInvalidOperationException, NULL },
108   { SWIG_CSharpIOException, NULL },
109   { SWIG_CSharpNullReferenceException, NULL },
110   { SWIG_CSharpOutOfMemoryException, NULL },
111   { SWIG_CSharpOverflowException, NULL },
112   { SWIG_CSharpSystemException, NULL }
113 };
114
115 static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
116   { SWIG_CSharpArgumentException, NULL },
117   { SWIG_CSharpArgumentNullException, NULL },
118   { SWIG_CSharpArgumentOutOfRangeException, NULL }
119 };
120
121 static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
122   SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
123   if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
124     callback = SWIG_csharp_exceptions[code].callback;
125   }
126   callback(msg);
127 }
128
129 static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
130   SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
131   if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
132     callback = SWIG_csharp_exceptions_argument[code].callback;
133   }
134   callback(msg, param_name);
135 }
136
137 SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
138   if (code == SWIG_ValueError) {
139     SWIG_CSharpExceptionArgumentCodes exception_code = SWIG_CSharpArgumentOutOfRangeException;
140     SWIG_CSharpSetPendingExceptionArgument(exception_code, msg, 0);
141   } else {
142     SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpApplicationException;
143     switch(code) {
144     case SWIG_MemoryError:
145       exception_code = SWIG_CSharpOutOfMemoryException;
146       break;
147     case SWIG_IndexError:
148       exception_code = SWIG_CSharpIndexOutOfRangeException;
149       break;
150     case SWIG_DivisionByZero:
151       exception_code = SWIG_CSharpDivideByZeroException;
152       break;
153     case SWIG_IOError:
154       exception_code = SWIG_CSharpIOException;
155       break;
156     case SWIG_OverflowError:
157       exception_code = SWIG_CSharpOverflowException;
158       break;
159     case SWIG_RuntimeError:
160     case SWIG_TypeError:
161     case SWIG_SyntaxError:
162     case SWIG_SystemError:
163     case SWIG_UnknownError:
164     default:
165       exception_code = SWIG_CSharpApplicationException;
166       break;
167     }
168     SWIG_CSharpSetPendingException(exception_code, msg);
169   }
170 }
171
172
173 #include <stdexcept>
174
175
176 #define SWIGSTDCALL
177
178
179 #include <dali/dali.h>
180 #include <dali-toolkit/dali-toolkit.h>
181
182 using namespace Dali;
183 using namespace Dali::Toolkit;
184
185