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