DALi Version 1.2.20
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / manual / csharp / KeyboardPreFocusChangeSignal.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19
20 namespace Dali {
21
22 public delegate IntPtr SwigDelegateKeyboardPreFocusChangeSignal(IntPtr current, IntPtr proposed, View.KeyboardFocus.Direction direction);
23
24 public class KeyboardPreFocusChangeSignal : global::System.IDisposable {
25   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26   protected bool swigCMemOwn;
27
28   internal KeyboardPreFocusChangeSignal(global::System.IntPtr cPtr, bool cMemoryOwn) {
29     swigCMemOwn = cMemoryOwn;
30     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31   }
32
33   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardPreFocusChangeSignal obj) {
34     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35   }
36
37   ~KeyboardPreFocusChangeSignal() {
38     DisposeQueue.Instance.Add(this);
39   }
40
41   public virtual void Dispose() {
42     if (!Stage.IsInstalled()) {
43       DisposeQueue.Instance.Add(this);
44       return;
45     }
46
47     lock(this) {
48       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49         if (swigCMemOwn) {
50           swigCMemOwn = false;
51           NDalicManualPINVOKE.delete_KeyboardPreFocusChangeSignal(swigCPtr);
52         }
53         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
54       }
55       global::System.GC.SuppressFinalize(this);
56     }
57   }
58
59   public bool Empty() {
60     bool ret = NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Empty(swigCPtr);
61     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62     return ret;
63   }
64
65   public uint GetConnectionCount() {
66     uint ret = NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_GetConnectionCount(swigCPtr);
67     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68     return ret;
69   }
70
71   public void Connect(FocusManager.PreFocusChangeEventCallbackDelegate func) {
72      NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Connect(swigCPtr, func);
73      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74  }
75
76   public void Disconnect(System.Delegate func) {
77     System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
78     {
79       NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
80       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81     }
82   }
83
84   public Actor Emit(Actor arg1, Actor arg2, View.KeyboardFocus.Direction arg3) {
85     Actor ret = new Actor(NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Emit(swigCPtr, Actor.getCPtr(arg1), Actor.getCPtr(arg2), (int)arg3), true);
86     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87     return ret;
88   }
89
90   public KeyboardPreFocusChangeSignal() : this(NDalicManualPINVOKE.new_KeyboardPreFocusChangeSignal(), true) {
91     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92   }
93
94 }
95
96 }