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);
31 static ExceptionDelegate applicationDelegate = new ExceptionDelegate(SetPendingApplicationException);
32 static ExceptionDelegate arithmeticDelegate = new ExceptionDelegate(SetPendingArithmeticException);
33 static ExceptionDelegate divideByZeroDelegate = new ExceptionDelegate(SetPendingDivideByZeroException);
34 static ExceptionDelegate indexOutOfRangeDelegate = new ExceptionDelegate(SetPendingIndexOutOfRangeException);
35 static ExceptionDelegate invalidCastDelegate = new ExceptionDelegate(SetPendingInvalidCastException);
36 static ExceptionDelegate invalidOperationDelegate = new ExceptionDelegate(SetPendingInvalidOperationException);
37 static ExceptionDelegate ioDelegate = new ExceptionDelegate(SetPendingIOException);
38 static ExceptionDelegate nullReferenceDelegate = new ExceptionDelegate(SetPendingNullReferenceException);
39 static ExceptionDelegate outOfMemoryDelegate = new ExceptionDelegate(SetPendingOutOfMemoryException);
40 static ExceptionDelegate overflowDelegate = new ExceptionDelegate(SetPendingOverflowException);
41 static ExceptionDelegate systemDelegate = new ExceptionDelegate(SetPendingSystemException);
43 static ExceptionArgumentDelegate argumentDelegate = new ExceptionArgumentDelegate(SetPendingArgumentException);
44 static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException);
45 static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException);
47 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "SWIGRegisterExceptionCallbacks_NDalic")]
48 public static extern void SWIGRegisterExceptionCallbacks_NDalic(
49 ExceptionDelegate applicationDelegate,
50 ExceptionDelegate arithmeticDelegate,
51 ExceptionDelegate divideByZeroDelegate,
52 ExceptionDelegate indexOutOfRangeDelegate,
53 ExceptionDelegate invalidCastDelegate,
54 ExceptionDelegate invalidOperationDelegate,
55 ExceptionDelegate ioDelegate,
56 ExceptionDelegate nullReferenceDelegate,
57 ExceptionDelegate outOfMemoryDelegate,
58 ExceptionDelegate overflowDelegate,
59 ExceptionDelegate systemExceptionDelegate);
62 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "SWIGRegisterExceptionArgumentCallbacks_NDalic")]
63 public static extern void SWIGRegisterExceptionCallbacksArgument_NDalic(
64 ExceptionArgumentDelegate argumentDelegate,
65 ExceptionArgumentDelegate argumentNullDelegate,
66 ExceptionArgumentDelegate argumentOutOfRangeDelegate);
69 static void SetPendingApplicationException(string message)
71 SWIGPendingException.Set(new global::System.ApplicationException(message, SWIGPendingException.Retrieve()));
73 static void SetPendingArithmeticException(string message)
75 SWIGPendingException.Set(new global::System.ArithmeticException(message, SWIGPendingException.Retrieve()));
77 static void SetPendingDivideByZeroException(string message)
79 SWIGPendingException.Set(new global::System.DivideByZeroException(message, SWIGPendingException.Retrieve()));
81 static void SetPendingIndexOutOfRangeException(string message)
83 SWIGPendingException.Set(new global::System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve()));
85 static void SetPendingInvalidCastException(string message)
87 SWIGPendingException.Set(new global::System.InvalidCastException(message, SWIGPendingException.Retrieve()));
89 static void SetPendingInvalidOperationException(string message)
91 SWIGPendingException.Set(new global::System.InvalidOperationException(message, SWIGPendingException.Retrieve()));
93 static void SetPendingIOException(string message)
95 SWIGPendingException.Set(new global::System.IO.IOException(message, SWIGPendingException.Retrieve()));
97 static void SetPendingNullReferenceException(string message)
99 SWIGPendingException.Set(new global::System.NullReferenceException(message, SWIGPendingException.Retrieve()));
101 static void SetPendingOutOfMemoryException(string message)
103 SWIGPendingException.Set(new global::System.OutOfMemoryException(message, SWIGPendingException.Retrieve()));
105 static void SetPendingOverflowException(string message)
107 SWIGPendingException.Set(new global::System.OverflowException(message, SWIGPendingException.Retrieve()));
109 static void SetPendingSystemException(string message)
111 SWIGPendingException.Set(new global::System.SystemException(message, SWIGPendingException.Retrieve()));
114 static void SetPendingArgumentException(string message, string paramName)
116 SWIGPendingException.Set(new global::System.ArgumentException(message, paramName, SWIGPendingException.Retrieve()));
118 static void SetPendingArgumentNullException(string message, string paramName)
120 global::System.Exception e = SWIGPendingException.Retrieve();
121 if (e != null) message = message + " Inner Exception: " + e.Message;
122 SWIGPendingException.Set(new global::System.ArgumentNullException(message, paramName));
124 static void SetPendingArgumentOutOfRangeException(string message, string paramName)
126 global::System.Exception e = SWIGPendingException.Retrieve();
127 if (e != null) message = message + " Inner Exception: " + e.Message;
128 SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message));
131 static SWIGExceptionHelper()
133 SWIGRegisterExceptionCallbacks_NDalic(
136 divideByZeroDelegate,
137 indexOutOfRangeDelegate,
139 invalidOperationDelegate,
141 nullReferenceDelegate,
146 SWIGRegisterExceptionCallbacksArgument_NDalic(
148 argumentNullDelegate,
149 argumentOutOfRangeDelegate);
153 protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper();
155 /// <since_tizen> 3 </since_tizen>
156 public class SWIGPendingException
158 [global::System.ThreadStatic]
159 private static global::System.Exception pendingException = null;
160 private static int numExceptionsPending = 0;
162 /// <since_tizen> 3 </since_tizen>
163 public static bool Pending
167 bool pending = false;
168 if (numExceptionsPending > 0)
169 if (pendingException != null)
175 /// <since_tizen> 3 </since_tizen>
176 public static void Set(global::System.Exception e)
178 if (pendingException != null)
179 throw new global::System.ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
180 pendingException = e;
181 lock (typeof(NDalicPINVOKE))
183 numExceptionsPending++;
187 /// <since_tizen> 3 </since_tizen>
188 public static global::System.Exception Retrieve()
190 global::System.Exception e = null;
191 if (numExceptionsPending > 0)
193 if (pendingException != null)
195 e = pendingException;
196 pendingException = null;
197 lock (typeof(NDalicPINVOKE))
199 numExceptionsPending--;
208 public class SWIGStringHelper
211 /// <since_tizen> 3 </since_tizen>
212 public delegate string SWIGStringDelegate(string message);
213 static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString);
215 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "SWIGRegisterStringCallback_NDalic")]
216 public static extern void SWIGRegisterStringCallback_NDalic(SWIGStringDelegate stringDelegate);
219 static string CreateString(string cString)
224 static SWIGStringHelper()
226 SWIGRegisterStringCallback_NDalic(stringDelegate);
229 public static void RegistCallback()
231 SWIGRegisterStringCallback_NDalic(stringDelegate);
236 static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper();
239 static NDalicPINVOKE()
241 Tizen.Log.Error("NUI", "Create NDalicPINVOKE");
244 [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_BaseHandle")]
245 public static extern void delete_BaseHandle(global::System.Runtime.InteropServices.HandleRef jarg1);
248 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_SWIGUpcast")]
249 public static extern global::System.IntPtr Application_SWIGUpcast(global::System.IntPtr jarg1);
251 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_New__MANUAL_4")]
252 public static extern global::System.IntPtr Application_New__MANUAL_4(int jarg1, string jarg2, string jarg3, int jarg4);
255 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_MainLoop__SWIG_0")]
256 public static extern void Application_MainLoop__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1);
259 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_InitSignal")]
260 public static extern global::System.IntPtr Application_InitSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
263 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_TerminateSignal")]
264 public static extern global::System.IntPtr Application_TerminateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
267 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_PauseSignal")]
268 public static extern global::System.IntPtr Application_PauseSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
271 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_ResumeSignal")]
272 public static extern global::System.IntPtr Application_ResumeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
275 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_ResetSignal")]
276 public static extern global::System.IntPtr Application_ResetSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
279 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_ResizeSignal")]
280 public static extern global::System.IntPtr Application_ResizeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
283 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_AppControlSignal")]
284 public static extern global::System.IntPtr Application_AppControlSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
287 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_LanguageChangedSignal")]
288 public static extern global::System.IntPtr Application_LanguageChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
291 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_RegionChangedSignal")]
292 public static extern global::System.IntPtr Application_RegionChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
295 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_LowBatterySignal")]
296 public static extern global::System.IntPtr Application_LowBatterySignal(global::System.Runtime.InteropServices.HandleRef jarg1);
299 [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_LowMemorySignal")]
300 public static extern global::System.IntPtr Application_LowMemorySignal(global::System.Runtime.InteropServices.HandleRef jarg1);