2 * Copyright(c) 2018 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.
23 public const string Lib = "libdali-csharp-binder.so";
24 protected class SWIGExceptionHelper
26 /// <since_tizen> 3 </since_tizen>
27 public delegate void ExceptionDelegate(string message);
28 /// <since_tizen> 3 </since_tizen>
29 public delegate void ExceptionArgumentDelegate(string message, string paramName);
30 static ExceptionDelegate applicationDelegate = new ExceptionDelegate(SetPendingApplicationException);
31 static ExceptionDelegate arithmeticDelegate = new ExceptionDelegate(SetPendingArithmeticException);
32 static ExceptionDelegate divideByZeroDelegate = new ExceptionDelegate(SetPendingDivideByZeroException);
33 static ExceptionDelegate indexOutOfRangeDelegate = new ExceptionDelegate(SetPendingIndexOutOfRangeException);
34 static ExceptionDelegate invalidCastDelegate = new ExceptionDelegate(SetPendingInvalidCastException);
35 static ExceptionDelegate invalidOperationDelegate = new ExceptionDelegate(SetPendingInvalidOperationException);
36 static ExceptionDelegate ioDelegate = new ExceptionDelegate(SetPendingIOException);
37 static ExceptionDelegate nullReferenceDelegate = new ExceptionDelegate(SetPendingNullReferenceException);
38 static ExceptionDelegate outOfMemoryDelegate = new ExceptionDelegate(SetPendingOutOfMemoryException);
39 static ExceptionDelegate overflowDelegate = new ExceptionDelegate(SetPendingOverflowException);
40 static ExceptionDelegate systemDelegate = new ExceptionDelegate(SetPendingSystemException);
41 static ExceptionArgumentDelegate argumentDelegate = new ExceptionArgumentDelegate(SetPendingArgumentException);
42 static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException);
43 static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException);
45 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "SWIGRegisterExceptionCallbacks_NDalic")]
46 public static extern void SWIGRegisterExceptionCallbacks_NDalic(
47 ExceptionDelegate applicationDelegate,
48 ExceptionDelegate arithmeticDelegate,
49 ExceptionDelegate divideByZeroDelegate,
50 ExceptionDelegate indexOutOfRangeDelegate,
51 ExceptionDelegate invalidCastDelegate,
52 ExceptionDelegate invalidOperationDelegate,
53 ExceptionDelegate ioDelegate,
54 ExceptionDelegate nullReferenceDelegate,
55 ExceptionDelegate outOfMemoryDelegate,
56 ExceptionDelegate overflowDelegate,
57 ExceptionDelegate systemExceptionDelegate);
59 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "SWIGRegisterExceptionArgumentCallbacks_NDalic")]
60 public static extern void SWIGRegisterExceptionCallbacksArgument_NDalic(
61 ExceptionArgumentDelegate argumentDelegate,
62 ExceptionArgumentDelegate argumentNullDelegate,
63 ExceptionArgumentDelegate argumentOutOfRangeDelegate);
64 static void SetPendingApplicationException(string message)
66 SWIGPendingException.Set(new global::System.ApplicationException(message, SWIGPendingException.Retrieve()));
68 static void SetPendingArithmeticException(string message)
70 SWIGPendingException.Set(new global::System.ArithmeticException(message, SWIGPendingException.Retrieve()));
72 static void SetPendingDivideByZeroException(string message)
74 SWIGPendingException.Set(new global::System.DivideByZeroException(message, SWIGPendingException.Retrieve()));
76 static void SetPendingIndexOutOfRangeException(string message)
78 SWIGPendingException.Set(new global::System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve()));
80 static void SetPendingInvalidCastException(string message)
82 SWIGPendingException.Set(new global::System.InvalidCastException(message, SWIGPendingException.Retrieve()));
84 static void SetPendingInvalidOperationException(string message)
86 SWIGPendingException.Set(new global::System.InvalidOperationException(message, SWIGPendingException.Retrieve()));
88 static void SetPendingIOException(string message)
90 SWIGPendingException.Set(new global::System.IO.IOException(message, SWIGPendingException.Retrieve()));
92 static void SetPendingNullReferenceException(string message)
94 SWIGPendingException.Set(new global::System.NullReferenceException(message, SWIGPendingException.Retrieve()));
96 static void SetPendingOutOfMemoryException(string message)
98 SWIGPendingException.Set(new global::System.OutOfMemoryException(message, SWIGPendingException.Retrieve()));
100 static void SetPendingOverflowException(string message)
102 SWIGPendingException.Set(new global::System.OverflowException(message, SWIGPendingException.Retrieve()));
104 static void SetPendingSystemException(string message)
106 SWIGPendingException.Set(new global::System.SystemException(message, SWIGPendingException.Retrieve()));
109 static void SetPendingArgumentException(string message, string paramName)
111 SWIGPendingException.Set(new global::System.ArgumentException(message, paramName, SWIGPendingException.Retrieve()));
113 static void SetPendingArgumentNullException(string message, string paramName)
115 global::System.Exception e = SWIGPendingException.Retrieve();
116 if (e != null) message = message + " Inner Exception: " + e.Message;
117 SWIGPendingException.Set(new global::System.ArgumentNullException(message, paramName));
119 static void SetPendingArgumentOutOfRangeException(string message, string paramName)
121 global::System.Exception e = SWIGPendingException.Retrieve();
122 if (e != null) message = message + " Inner Exception: " + e.Message;
123 SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message));
125 static SWIGExceptionHelper()
127 SWIGRegisterExceptionCallbacks_NDalic(
130 divideByZeroDelegate,
131 indexOutOfRangeDelegate,
133 invalidOperationDelegate,
135 nullReferenceDelegate,
140 SWIGRegisterExceptionCallbacksArgument_NDalic(
142 argumentNullDelegate,
143 argumentOutOfRangeDelegate);
146 protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper();
148 /// <since_tizen> 3 </since_tizen>
149 public class SWIGPendingException
151 [global::System.ThreadStatic]
152 private static global::System.Exception pendingException = null;
153 private static int numExceptionsPending = 0;
155 /// <since_tizen> 3 </since_tizen>
156 public static bool Pending
160 bool pending = false;
161 if (numExceptionsPending > 0)
162 if (pendingException != null)
168 /// <since_tizen> 3 </since_tizen>
169 public static void Set(global::System.Exception e)
171 if (pendingException != null)
172 throw new global::System.ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
173 pendingException = e;
174 lock (typeof(NDalicPINVOKE))
176 numExceptionsPending++;
180 /// <since_tizen> 3 </since_tizen>
181 public static global::System.Exception Retrieve()
183 global::System.Exception e = null;
184 if (numExceptionsPending > 0)
186 if (pendingException != null)
188 e = pendingException;
189 pendingException = null;
190 lock (typeof(NDalicPINVOKE))
192 numExceptionsPending--;
199 public class SWIGStringHelper
201 /// <since_tizen> 3 </since_tizen>
202 public delegate string SWIGStringDelegate(string message);
203 static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString);
205 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "SWIGRegisterStringCallback_NDalic")]
206 public static extern void SWIGRegisterStringCallback_NDalic(SWIGStringDelegate stringDelegate);
207 static string CreateString(string cString)
211 static SWIGStringHelper()
213 SWIGRegisterStringCallback_NDalic(stringDelegate);
215 public static void RegistCallback()
217 SWIGRegisterStringCallback_NDalic(stringDelegate);
220 static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper();
221 static NDalicPINVOKE()
223 Tizen.Log.Error("NUI", "Create NDalicPINVOKE");
226 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_BaseHandle")]
227 public static extern void delete_BaseHandle(global::System.Runtime.InteropServices.HandleRef jarg1);
229 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_SWIGUpcast")]
230 public static extern global::System.IntPtr Application_SWIGUpcast(global::System.IntPtr jarg1);
232 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__MANUAL_4")]
233 public static extern global::System.IntPtr Application_New__MANUAL_4(int jarg1, string jarg2, string jarg3, int jarg4);
235 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New_WithWindowSizePosition")]
236 public static extern global::System.IntPtr Application_New_WithWindowSizePosition(int jarg1, string jarg2, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5);
238 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_MainLoop__SWIG_0")]
239 public static extern void Application_MainLoop__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1);
241 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_InitSignal")]
242 public static extern global::System.IntPtr Application_InitSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
244 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_TerminateSignal")]
245 public static extern global::System.IntPtr Application_TerminateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
247 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_PauseSignal")]
248 public static extern global::System.IntPtr Application_PauseSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
250 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_ResumeSignal")]
251 public static extern global::System.IntPtr Application_ResumeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
253 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_ResetSignal")]
254 public static extern global::System.IntPtr Application_ResetSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
256 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_ResizeSignal")]
257 public static extern global::System.IntPtr Application_ResizeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
259 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_AppControlSignal")]
260 public static extern global::System.IntPtr Application_AppControlSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
262 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_LanguageChangedSignal")]
263 public static extern global::System.IntPtr Application_LanguageChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
265 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_RegionChangedSignal")]
266 public static extern global::System.IntPtr Application_RegionChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
268 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_LowBatterySignal")]
269 public static extern global::System.IntPtr Application_LowBatterySignal(global::System.Runtime.InteropServices.HandleRef jarg1);
271 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_LowMemorySignal")]
272 public static extern global::System.IntPtr Application_LowMemorySignal(global::System.Runtime.InteropServices.HandleRef jarg1);