sync with tizen branch to finalize API
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / ImfManager.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17 namespace Tizen.NUI
18 {
19     using System;
20     using System.Runtime.InteropServices;
21
22
23     public class ImfManager : BaseHandle
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26
27         internal ImfManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
28         {
29             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35         }
36
37         protected override void Dispose(DisposeTypes type)
38         {
39             if (disposed)
40             {
41                 return;
42             }
43
44             if (type == DisposeTypes.Explicit)
45             {
46                 //Called by User
47                 //Release your own managed resources here.
48                 //You should release all of your own disposable objects here.
49
50             }
51
52             //Release your own unmanaged resources here.
53             //You should not access any managed member here except static instance.
54             //because the execution order of Finalizes is non-deterministic.
55
56             if (swigCPtr.Handle != global::System.IntPtr.Zero)
57             {
58                 if (swigCMemOwn)
59                 {
60                     swigCMemOwn = false;
61                     NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
62                 }
63                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
64             }
65
66             base.Dispose(type);
67         }
68
69         public class ImfEventData : global::System.IDisposable
70         {
71             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
72             protected bool swigCMemOwn;
73
74             internal ImfEventData(global::System.IntPtr cPtr, bool cMemoryOwn)
75             {
76                 swigCMemOwn = cMemoryOwn;
77                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
78             }
79
80             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
81             {
82                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
83             }
84
85             //A Flag to check who called Dispose(). (By User or DisposeQueue)
86             private bool isDisposeQueued = false;
87             //A Flat to check if it is already disposed.
88             protected bool disposed = false;
89
90
91             ~ImfEventData()
92             {
93                 if (!isDisposeQueued)
94                 {
95                     isDisposeQueued = true;
96                     DisposeQueue.Instance.Add(this);
97                 }
98             }
99
100             public void Dispose()
101             {
102                 //Throw excpetion if Dispose() is called in separate thread.
103                 if (!Window.IsInstalled())
104                 {
105                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
106                 }
107
108                 if (isDisposeQueued)
109                 {
110                     Dispose(DisposeTypes.Implicit);
111                 }
112                 else
113                 {
114                     Dispose(DisposeTypes.Explicit);
115                     System.GC.SuppressFinalize(this);
116                 }
117             }
118
119             protected virtual void Dispose(DisposeTypes type)
120             {
121                 if (disposed)
122                 {
123                     return;
124                 }
125
126                 if (type == DisposeTypes.Explicit)
127                 {
128                     //Called by User
129                     //Release your own managed resources here.
130                     //You should release all of your own disposable objects here.
131
132                 }
133
134                 //Release your own unmanaged resources here.
135                 //You should not access any managed member here except static instance.
136                 //because the execution order of Finalizes is non-deterministic.
137
138                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
139                 {
140                     if (swigCMemOwn)
141                     {
142                         swigCMemOwn = false;
143                         NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
144                     }
145                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
146                 }
147
148                 disposed = true;
149             }
150
151             public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
152             {
153                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154             }
155
156             public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
157             {
158                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159             }
160
161             public string predictiveString
162             {
163                 set
164                 {
165                     NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
166                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167                 }
168                 get
169                 {
170                     string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
171                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172                     return ret;
173                 }
174             }
175
176             public ImfManager.ImfEvent eventName
177             {
178                 set
179                 {
180                     NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
181                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182                 }
183                 get
184                 {
185                     ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
186                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187                     return ret;
188                 }
189             }
190
191             public int cursorOffset
192             {
193                 set
194                 {
195                     NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
196                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197                 }
198                 get
199                 {
200                     int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
201                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202                     return ret;
203                 }
204             }
205
206             public int numberOfChars
207             {
208                 set
209                 {
210                     NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
211                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212                 }
213                 get
214                 {
215                     int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
216                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217                     return ret;
218                 }
219             }
220
221         }
222
223         public class ImfCallbackData : global::System.IDisposable
224         {
225             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
226             protected bool swigCMemOwn;
227
228             internal ImfCallbackData(global::System.IntPtr cPtr, bool cMemoryOwn)
229             {
230                 swigCMemOwn = cMemoryOwn;
231                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
232             }
233
234             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
235             {
236                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
237             }
238
239             //A Flag to check who called Dispose(). (By User or DisposeQueue)
240             private bool isDisposeQueued = false;
241             //A Flat to check if it is already disposed.
242             protected bool disposed = false;
243
244
245             ~ImfCallbackData()
246             {
247                 if (!isDisposeQueued)
248                 {
249                     isDisposeQueued = true;
250                     DisposeQueue.Instance.Add(this);
251                 }
252             }
253
254             public void Dispose()
255             {
256                 //Throw excpetion if Dispose() is called in separate thread.
257                 if (!Window.IsInstalled())
258                 {
259                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
260                 }
261
262                 if (isDisposeQueued)
263                 {
264                     Dispose(DisposeTypes.Implicit);
265                 }
266                 else
267                 {
268                     Dispose(DisposeTypes.Explicit);
269                     System.GC.SuppressFinalize(this);
270                 }
271             }
272
273             protected virtual void Dispose(DisposeTypes type)
274             {
275                 if (disposed)
276                 {
277                     return;
278                 }
279
280                 if (type == DisposeTypes.Explicit)
281                 {
282                     //Called by User
283                     //Release your own managed resources here.
284                     //You should release all of your own disposable objects here.
285
286                 }
287
288                 //Release your own unmanaged resources here.
289                 //You should not access any managed member here except static instance.
290                 //because the execution order of Finalizes is non-deterministic.
291
292                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
293                 {
294                     if (swigCMemOwn)
295                     {
296                         swigCMemOwn = false;
297                         NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
298                     }
299                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
300                 }
301
302                 disposed = true;
303             }
304
305             public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
306             {
307                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308             }
309
310             public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
311             {
312                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313             }
314
315             public string currentText
316             {
317                 set
318                 {
319                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
320                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321                 }
322                 get
323                 {
324                     string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
325                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326                     return ret;
327                 }
328             }
329
330             public int cursorPosition
331             {
332                 set
333                 {
334                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
335                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336                 }
337                 get
338                 {
339                     int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
340                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341                     return ret;
342                 }
343             }
344
345             public bool update
346             {
347                 set
348                 {
349                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
350                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351                 }
352                 get
353                 {
354                     bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
355                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356                     return ret;
357                 }
358             }
359
360             public bool preeditResetRequired
361             {
362                 set
363                 {
364                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
365                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366                 }
367                 get
368                 {
369                     bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
370                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371                     return ret;
372                 }
373             }
374
375         }
376
377         public static ImfManager Get()
378         {
379             ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
380             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381             return ret;
382         }
383
384         public void Activate()
385         {
386             NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
387             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388         }
389
390         public void Deactivate()
391         {
392             NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
393             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
394         }
395
396         public bool RestoreAfterFocusLost()
397         {
398             bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
399             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
400             return ret;
401         }
402
403         public void SetRestoreAfterFocusLost(bool toggle)
404         {
405             NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
406             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
407         }
408
409         public new void Reset()
410         {
411             NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
412             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413         }
414
415         public void NotifyCursorPosition()
416         {
417             NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
418             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419         }
420
421         public void SetCursorPosition(uint cursorPosition)
422         {
423             NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
424             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
425         }
426
427         public uint GetCursorPosition()
428         {
429             uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
430             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
431             return ret;
432         }
433
434         public void SetSurroundingText(string text)
435         {
436             NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
437             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438         }
439
440         public string GetSurroundingText()
441         {
442             string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
443             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444             return ret;
445         }
446
447         public void NotifyTextInputMultiLine(bool multiLine)
448         {
449             NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
450             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
451         }
452
453         public ImfManager.TextDirection GetTextDirection()
454         {
455             ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
456             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
457             return ret;
458         }
459
460         public Rectangle GetInputMethodArea()
461         {
462             Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
463             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
464             return ret;
465         }
466
467         internal void ApplyOptions(SWIGTYPE_p_InputMethodOptions options)
468         {
469             NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, SWIGTYPE_p_InputMethodOptions.getCPtr(options));
470             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
471         }
472
473         public void SetInputPanelUserData(string text)
474         {
475             NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
476             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
477         }
478
479         public void GetInputPanelUserData(string text)
480         {
481             NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, text);
482             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
483         }
484
485         public ImfManager.State GetInputPanelState()
486         {
487             ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
488             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
489             return ret;
490         }
491
492         public void SetReturnKeyState(bool visible)
493         {
494             NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
495             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
496         }
497
498         public void AutoEnableInputPanel(bool enabled)
499         {
500             NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
501             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502         }
503
504         public void ShowInputPanel()
505         {
506             NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
507             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
508         }
509
510         public void HideInputPanel()
511         {
512             NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
513             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
514         }
515
516         /*
517         public SWIGTYPE_p_Dali__SignalT_void_fDali__ImfManager_RF_t ActivatedSignal()
518         {
519             SWIGTYPE_p_Dali__SignalT_void_fDali__ImfManager_RF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__ImfManager_RF_t(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
520             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521             return ret;
522         }
523
524         public SWIGTYPE_p_Dali__SignalT_Dali__ImfManager__ImfCallbackData_fDali__ImfManager_R_Dali__ImfManager__ImfEventData_const_RF_t EventReceivedSignal()
525         {
526             SWIGTYPE_p_Dali__SignalT_Dali__ImfManager__ImfCallbackData_fDali__ImfManager_R_Dali__ImfManager__ImfEventData_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_Dali__ImfManager__ImfCallbackData_fDali__ImfManager_R_Dali__ImfManager__ImfEventData_const_RF_t(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
527             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528             return ret;
529         }
530
531         public WindowFocusSignalType StatusChangedSignal()
532         {
533             WindowFocusSignalType ret = new WindowFocusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
534             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
535             return ret;
536         }
537
538         public VoidSignal ResizedSignal()
539         {
540             VoidSignal ret = new VoidSignal(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
541             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542             return ret;
543         }
544
545         public VoidSignal LanguageChangedSignal()
546         {
547             VoidSignal ret = new VoidSignal(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
548             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549             return ret;
550         }
551         */
552
553         public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager__SWIG_0(), true)
554         {
555             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556         }
557
558         internal ImfManager(SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager imfManager) : this(NDalicManualPINVOKE.new_ImfManager__SWIG_1(SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager.getCPtr(imfManager)), true)
559         {
560             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
561         }
562
563         public enum TextDirection
564         {
565             LeftToRight,
566             RightToLeft
567         }
568
569         public enum ImfEvent
570         {
571             VOID,
572             PREEDIT,
573             COMMIT,
574             DELETESURROUNDING,
575             GETSURROUNDING,
576             PRIVATECOMMAND
577         }
578
579         public enum State
580         {
581             DEFAULT,
582             SHOW,
583             HIDE,
584             WILL_SHOW
585         }
586
587
588
589         ///////////////////////////////////////////////////////////////////////////////
590         internal static ImfManager GetImfManagerFromPtr(global::System.IntPtr cPtr)
591         {
592             ImfManager ret = new ImfManager(cPtr, false);
593             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
594             return ret;
595         }
596
597         public class ImfManagerActivatedEventArgs : EventArgs
598         {
599             public ImfManager ImfManager
600             {
601                 get;
602                 set;
603             }
604         }
605
606         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
607         private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
608         private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
609
610         private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
611
612         public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
613         {
614             add
615             {
616                 if (_imfManagerActivatedEventHandler == null)
617                 {
618                     _imfManagerActivatedEventCallback = OnImfManagerActivated;
619                     ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
620                 }
621
622                 _imfManagerActivatedEventHandler += value;
623             }
624             remove
625             {
626                 _imfManagerActivatedEventHandler -= value;
627
628                 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
629                 {
630                     ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
631                 }
632             }
633         }
634
635         private void OnImfManagerActivated(global::System.IntPtr data)
636         {
637             ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
638
639             e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
640
641             if (_imfManagerActivatedEventHandler != null)
642             {
643                 _imfManagerActivatedEventHandler(this, e);
644             }
645         }
646
647         public ActivatedSignalType ActivatedSignal()
648         {
649             ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
650             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
651             return ret;
652         }
653
654         // EventReceivedSignal
655         public class ImfManagerEventReceivedEventArgs : EventArgs
656         {
657             public ImfManager ImfManager
658             {
659                 get;
660                 set;
661             }
662         }
663
664         private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
665         private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
666
667         private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
668         public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
669         {
670             add
671             {
672                 if (_imfManagerEventReceivedEventHandler == null)
673                 {
674                     _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
675                     EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
676                 }
677
678                 _imfManagerEventReceivedEventHandler += value;
679             }
680             remove
681             {
682                 _imfManagerEventReceivedEventHandler -= value;
683
684                 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
685                 {
686                     EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
687                 }
688             }
689         }
690
691         private void OnImfManagerEventReceived(global::System.IntPtr data)
692         {
693             ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
694
695             e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
696
697             if (_imfManagerEventReceivedEventHandler != null)
698             {
699                 _imfManagerEventReceivedEventHandler(this, e);
700             }
701         }
702
703         public ImfEventSignalType EventReceivedSignal()
704         {
705             ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
706             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
707             return ret;
708         }
709
710         // StatusChangedSignal
711         public class ImfManagerStatusChangedEventArgs : EventArgs
712         {
713             public ImfManager ImfManager
714             {
715                 get;
716                 set;
717             }
718         }
719
720         private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
721         private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
722
723         private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
724
725         public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
726         {
727             add
728             {
729                 if (_imfManagerStatusChangedEventHandler == null)
730                 {
731                     _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
732                     StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
733                 }
734
735                 _imfManagerStatusChangedEventHandler += value;
736             }
737             remove
738             {
739                 _imfManagerStatusChangedEventHandler -= value;
740
741                 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
742                 {
743                     StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
744                 }
745             }
746         }
747
748         private void OnImfManagerStatusChanged(global::System.IntPtr data)
749         {
750             ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
751
752             e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
753
754             if (_imfManagerStatusChangedEventHandler != null)
755             {
756                 _imfManagerStatusChangedEventHandler(this, e);
757             }
758         }
759
760         public StatusSignalType StatusChangedSignal()
761         {
762             StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
763             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
764             return ret;
765         }
766
767         // ResizedSignal
768         public class ImfManagerResizedEventArgs : EventArgs
769         {
770             public ImfManager ImfManager
771             {
772                 get;
773                 set;
774             }
775         }
776
777         private delegate void ImfManagerResizedEventCallbackType(global::System.IntPtr data);
778         private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
779
780         private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
781
782         public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
783         {
784             add
785             {
786                 if (_imfManagerResizedEventHandler == null)
787                 {
788                     _imfManagerResizedEventCallback = OnImfManagerResized;
789                     ResizedSignal().Connect(_imfManagerResizedEventCallback);
790                 }
791
792                 _imfManagerResizedEventHandler += value;
793             }
794             remove
795             {
796                 _imfManagerResizedEventHandler -= value;
797
798                 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
799                 {
800                     ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
801                 }
802             }
803         }
804
805         private void OnImfManagerResized(global::System.IntPtr data)
806         {
807             ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
808
809             e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
810
811             if (_imfManagerResizedEventHandler != null)
812             {
813                 _imfManagerResizedEventHandler(this, e);
814             }
815         }
816
817         public ImfVoidSignalType ResizedSignal()
818         {
819             ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), true);
820             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
821             return ret;
822         }
823
824         // LanguageChangedSignal
825         public class ImfManagerLanguageChangedEventArgs : EventArgs
826         {
827             public ImfManager ImfManager
828             {
829                 get;
830                 set;
831             }
832         }
833
834         private delegate void ImfManagerLanguageChangedEventCallbackType(global::System.IntPtr data);
835         private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
836
837         private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
838
839         public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
840         {
841             add
842             {
843                 if (_imfManagerLanguageChangedEventHandler == null)
844                 {
845                     _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
846                     LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
847                 }
848
849                 _imfManagerLanguageChangedEventHandler += value;
850             }
851             remove
852             {
853                 _imfManagerLanguageChangedEventHandler -= value;
854
855                 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
856                 {
857                     LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
858                 }
859             }
860         }
861
862         private void OnImfManagerLanguageChanged(global::System.IntPtr data)
863         {
864             ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
865
866             e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
867
868             if (_imfManagerLanguageChangedEventHandler != null)
869             {
870                 _imfManagerLanguageChangedEventHandler(this, e);
871             }
872         }
873
874         public ImfVoidSignalType LanguageChangedSignal()
875         {
876             ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), true);
877             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878             return ret;
879         }
880     }
881
882     ///////////////////////////////////////////////////////////////////////////////
883     internal class SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager
884     {
885         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
886
887         internal SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager(global::System.IntPtr cPtr, bool futureUse)
888         {
889             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
890         }
891
892         protected SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager()
893         {
894             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
895         }
896
897         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager obj)
898         {
899             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
900         }
901     }
902
903     internal class SWIGTYPE_p_InputMethodOptions
904     {
905         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
906
907         internal SWIGTYPE_p_InputMethodOptions(global::System.IntPtr cPtr, bool futureUse)
908         {
909             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
910         }
911
912         protected SWIGTYPE_p_InputMethodOptions()
913         {
914             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
915         }
916
917         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_InputMethodOptions obj)
918         {
919             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
920         }
921     }
922
923     ///////////////////////////////////////////////////////////////////////////////
924     public class ActivatedSignalType : global::System.IDisposable
925     {
926         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
927         protected bool swigCMemOwn;
928
929         internal ActivatedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
930         {
931             swigCMemOwn = cMemoryOwn;
932             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
933         }
934
935         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ActivatedSignalType obj)
936         {
937             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
938         }
939
940         //A Flag to check who called Dispose(). (By User or DisposeQueue)
941         private bool isDisposeQueued = false;
942         //A Flat to check if it is already disposed.
943         protected bool disposed = false;
944
945
946         ~ActivatedSignalType()
947         {
948             if (!isDisposeQueued)
949             {
950                 isDisposeQueued = true;
951                 DisposeQueue.Instance.Add(this);
952             }
953         }
954
955         public void Dispose()
956         {
957             //Throw excpetion if Dispose() is called in separate thread.
958             if (!Window.IsInstalled())
959             {
960                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
961             }
962
963             if (isDisposeQueued)
964             {
965                 Dispose(DisposeTypes.Implicit);
966             }
967             else
968             {
969                 Dispose(DisposeTypes.Explicit);
970                 System.GC.SuppressFinalize(this);
971             }
972         }
973
974         protected virtual void Dispose(DisposeTypes type)
975         {
976             if (disposed)
977             {
978                 return;
979             }
980
981             if (type == DisposeTypes.Explicit)
982             {
983                 //Called by User
984                 //Release your own managed resources here.
985                 //You should release all of your own disposable objects here.
986
987             }
988
989             //Release your own unmanaged resources here.
990             //You should not access any managed member here except static instance.
991             //because the execution order of Finalizes is non-deterministic.
992
993             if (swigCPtr.Handle != global::System.IntPtr.Zero)
994             {
995                 if (swigCMemOwn)
996                 {
997                     swigCMemOwn = false;
998                     NDalicManualPINVOKE.delete_ActivatedSignalType(swigCPtr);
999                 }
1000                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1001             }
1002
1003             disposed = true;
1004         }
1005
1006         public bool Empty()
1007         {
1008             bool ret = NDalicManualPINVOKE.ActivatedSignalType_Empty(swigCPtr);
1009             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010             return ret;
1011         }
1012
1013         public uint GetConnectionCount()
1014         {
1015             uint ret = NDalicManualPINVOKE.ActivatedSignalType_GetConnectionCount(swigCPtr);
1016             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017             return ret;
1018         }
1019
1020         public void Connect(System.Delegate func)
1021         {
1022             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1023             {
1024                 NDalicManualPINVOKE.ActivatedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1025                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1026             }
1027         }
1028
1029         public void Disconnect(System.Delegate func)
1030         {
1031             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1032             {
1033                 NDalicManualPINVOKE.ActivatedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1034                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1035             }
1036         }
1037
1038         public void Emit(bool arg)
1039         {
1040             NDalicManualPINVOKE.ActivatedSignalType_Emit(swigCPtr, arg);
1041             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1042         }
1043
1044         public ActivatedSignalType() : this(NDalicManualPINVOKE.new_ActivatedSignalType(), true)
1045         {
1046             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1047         }
1048
1049     }
1050
1051     ///////////////////////////////////////////////////////////////////////////////
1052     public class ImfEventSignalType : global::System.IDisposable
1053     {
1054         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1055         protected bool swigCMemOwn;
1056
1057         internal ImfEventSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
1058         {
1059             swigCMemOwn = cMemoryOwn;
1060             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1061         }
1062
1063         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventSignalType obj)
1064         {
1065             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1066         }
1067
1068         //A Flag to check who called Dispose(). (By User or DisposeQueue)
1069         private bool isDisposeQueued = false;
1070         //A Flat to check if it is already disposed.
1071         protected bool disposed = false;
1072
1073
1074         ~ImfEventSignalType()
1075         {
1076             if (!isDisposeQueued)
1077             {
1078                 isDisposeQueued = true;
1079                 DisposeQueue.Instance.Add(this);
1080             }
1081         }
1082
1083         public void Dispose()
1084         {
1085             //Throw excpetion if Dispose() is called in separate thread.
1086             if (!Window.IsInstalled())
1087             {
1088                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1089             }
1090
1091             if (isDisposeQueued)
1092             {
1093                 Dispose(DisposeTypes.Implicit);
1094             }
1095             else
1096             {
1097                 Dispose(DisposeTypes.Explicit);
1098                 System.GC.SuppressFinalize(this);
1099             }
1100         }
1101
1102         protected virtual void Dispose(DisposeTypes type)
1103         {
1104             if (disposed)
1105             {
1106                 return;
1107             }
1108
1109             if (type == DisposeTypes.Explicit)
1110             {
1111                 //Called by User
1112                 //Release your own managed resources here.
1113                 //You should release all of your own disposable objects here.
1114
1115             }
1116
1117             //Release your own unmanaged resources here.
1118             //You should not access any managed member here except static instance.
1119             //because the execution order of Finalizes is non-deterministic.
1120
1121             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1122             {
1123                 if (swigCMemOwn)
1124                 {
1125                     swigCMemOwn = false;
1126                     NDalicManualPINVOKE.delete_ImfEventSignalType(swigCPtr);
1127                 }
1128                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1129             }
1130
1131             disposed = true;
1132         }
1133
1134         public bool Empty()
1135         {
1136             bool ret = NDalicManualPINVOKE.ImfEventSignalType_Empty(swigCPtr);
1137             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1138             return ret;
1139         }
1140
1141         public uint GetConnectionCount()
1142         {
1143             uint ret = NDalicManualPINVOKE.ImfEventSignalType_GetConnectionCount(swigCPtr);
1144             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1145             return ret;
1146         }
1147
1148         public void Connect(System.Delegate func)
1149         {
1150             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1151             {
1152                 NDalicManualPINVOKE.ImfEventSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1153                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1154             }
1155         }
1156
1157         public void Disconnect(System.Delegate func)
1158         {
1159             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1160             {
1161                 NDalicManualPINVOKE.ImfEventSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1162                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1163             }
1164         }
1165
1166         public void Emit(bool arg1, bool arg2)
1167         {
1168             NDalicManualPINVOKE.ImfEventSignalType_Emit(swigCPtr, arg1, arg2);
1169             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1170         }
1171
1172         public ImfEventSignalType() : this(NDalicManualPINVOKE.new_ImfEventSignalType(), true)
1173         {
1174             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1175         }
1176
1177     }
1178
1179     ///////////////////////////////////////////////////////////////////////////////
1180     public class StatusSignalType : global::System.IDisposable
1181     {
1182         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1183         protected bool swigCMemOwn;
1184
1185         internal StatusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
1186         {
1187             swigCMemOwn = cMemoryOwn;
1188             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1189         }
1190
1191         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StatusSignalType obj)
1192         {
1193             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1194         }
1195
1196         //A Flag to check who called Dispose(). (By User or DisposeQueue)
1197         private bool isDisposeQueued = false;
1198         //A Flat to check if it is already disposed.
1199         protected bool disposed = false;
1200
1201
1202         ~StatusSignalType()
1203         {
1204             if (!isDisposeQueued)
1205             {
1206                 isDisposeQueued = true;
1207                 DisposeQueue.Instance.Add(this);
1208             }
1209         }
1210
1211         public void Dispose()
1212         {
1213             //Throw excpetion if Dispose() is called in separate thread.
1214             if (!Window.IsInstalled())
1215             {
1216                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1217             }
1218
1219             if (isDisposeQueued)
1220             {
1221                 Dispose(DisposeTypes.Implicit);
1222             }
1223             else
1224             {
1225                 Dispose(DisposeTypes.Explicit);
1226                 System.GC.SuppressFinalize(this);
1227             }
1228         }
1229
1230         protected virtual void Dispose(DisposeTypes type)
1231         {
1232             if (disposed)
1233             {
1234                 return;
1235             }
1236
1237             if (type == DisposeTypes.Explicit)
1238             {
1239                 //Called by User
1240                 //Release your own managed resources here.
1241                 //You should release all of your own disposable objects here.
1242
1243             }
1244
1245             //Release your own unmanaged resources here.
1246             //You should not access any managed member here except static instance.
1247             //because the execution order of Finalizes is non-deterministic.
1248
1249             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1250             {
1251                 if (swigCMemOwn)
1252                 {
1253                     swigCMemOwn = false;
1254                     NDalicManualPINVOKE.delete_StatusSignalType(swigCPtr);
1255                 }
1256                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1257             }
1258
1259             disposed = true;
1260         }
1261
1262         public bool Empty()
1263         {
1264             bool ret = NDalicManualPINVOKE.StatusSignalType_Empty(swigCPtr);
1265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1266             return ret;
1267         }
1268
1269         public uint GetConnectionCount()
1270         {
1271             uint ret = NDalicManualPINVOKE.StatusSignalType_GetConnectionCount(swigCPtr);
1272             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1273             return ret;
1274         }
1275
1276         public void Connect(System.Delegate func)
1277         {
1278             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1279             {
1280                 NDalicManualPINVOKE.StatusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1281                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1282             }
1283         }
1284
1285         public void Disconnect(System.Delegate func)
1286         {
1287             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1288             {
1289                 NDalicManualPINVOKE.StatusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1290                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1291             }
1292         }
1293
1294         public void Emit(bool arg)
1295         {
1296             NDalicManualPINVOKE.StatusSignalType_Emit(swigCPtr, arg);
1297             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1298         }
1299
1300         public StatusSignalType() : this(NDalicManualPINVOKE.new_StatusSignalType(), true)
1301         {
1302             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1303         }
1304
1305     }
1306
1307     ///////////////////////////////////////////////////////////////////////////////
1308     public class ImfVoidSignalType : global::System.IDisposable
1309     {
1310         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1311         protected bool swigCMemOwn;
1312
1313         internal ImfVoidSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
1314         {
1315             swigCMemOwn = cMemoryOwn;
1316             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1317         }
1318
1319         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfVoidSignalType obj)
1320         {
1321             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1322         }
1323
1324         //A Flag to check who called Dispose(). (By User or DisposeQueue)
1325         private bool isDisposeQueued = false;
1326         //A Flat to check if it is already disposed.
1327         protected bool disposed = false;
1328
1329
1330         ~ImfVoidSignalType()
1331         {
1332             if (!isDisposeQueued)
1333             {
1334                 isDisposeQueued = true;
1335                 DisposeQueue.Instance.Add(this);
1336             }
1337         }
1338
1339         public void Dispose()
1340         {
1341             //Throw excpetion if Dispose() is called in separate thread.
1342             if (!Window.IsInstalled())
1343             {
1344                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1345             }
1346
1347             if (isDisposeQueued)
1348             {
1349                 Dispose(DisposeTypes.Implicit);
1350             }
1351             else
1352             {
1353                 Dispose(DisposeTypes.Explicit);
1354                 System.GC.SuppressFinalize(this);
1355             }
1356         }
1357
1358         protected virtual void Dispose(DisposeTypes type)
1359         {
1360             if (disposed)
1361             {
1362                 return;
1363             }
1364
1365             if (type == DisposeTypes.Explicit)
1366             {
1367                 //Called by User
1368                 //Release your own managed resources here.
1369                 //You should release all of your own disposable objects here.
1370
1371             }
1372
1373             //Release your own unmanaged resources here.
1374             //You should not access any managed member here except static instance.
1375             //because the execution order of Finalizes is non-deterministic.
1376
1377             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1378             {
1379                 if (swigCMemOwn)
1380                 {
1381                     swigCMemOwn = false;
1382                     NDalicManualPINVOKE.delete_ImfVoidSignalType(swigCPtr);
1383                 }
1384                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1385             }
1386
1387             disposed = true;
1388         }
1389
1390         public bool Empty()
1391         {
1392             bool ret = NDalicManualPINVOKE.ImfVoidSignalType_Empty(swigCPtr);
1393             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1394             return ret;
1395         }
1396
1397         public uint GetConnectionCount()
1398         {
1399             uint ret = NDalicManualPINVOKE.ImfVoidSignalType_GetConnectionCount(swigCPtr);
1400             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1401             return ret;
1402         }
1403
1404         public void Connect(System.Delegate func)
1405         {
1406             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1407             {
1408                 NDalicManualPINVOKE.ImfVoidSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1409                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1410             }
1411         }
1412
1413         public void Disconnect(System.Delegate func)
1414         {
1415             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1416             {
1417                 NDalicManualPINVOKE.ImfVoidSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1418                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1419             }
1420         }
1421
1422         public void Emit()
1423         {
1424             NDalicManualPINVOKE.ImfVoidSignalType_Emit(swigCPtr);
1425             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1426         }
1427
1428         public ImfVoidSignalType() : this(NDalicManualPINVOKE.new_ImfVoidSignalType(), true)
1429         {
1430             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1431         }
1432
1433     }
1434
1435 }