C# CustomView Implementation (C++ wrappers, manual bindings, C# wrappers)
[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     Dispose();
39   }
40
41   public virtual void Dispose() {
42     lock(this) {
43       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
44         if (swigCMemOwn) {
45           swigCMemOwn = false;
46           NDalicManualPINVOKE.delete_KeyboardPreFocusChangeSignal(swigCPtr);
47         }
48         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
49       }
50       global::System.GC.SuppressFinalize(this);
51     }
52   }
53
54   public bool Empty() {
55     bool ret = NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Empty(swigCPtr);
56     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57     return ret;
58   }
59
60   public uint GetConnectionCount() {
61     uint ret = NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_GetConnectionCount(swigCPtr);
62     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63     return ret;
64   }
65
66   public void Connect(KeyboardFocusManager.PreFocusChangeEventCallbackDelegate func) {
67      NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Connect(swigCPtr, func);
68      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69  }
70
71   public void Disconnect(System.Delegate func) {
72     System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
73     {
74       NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
75       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76     }
77   }
78
79   public Actor Emit(Actor arg1, Actor arg2, View.KeyboardFocus.Direction arg3) {
80     Actor ret = new Actor(NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Emit(swigCPtr, Actor.getCPtr(arg1), Actor.getCPtr(arg2), (int)arg3), true);
81     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82     return ret;
83   }
84
85   public KeyboardPreFocusChangeSignal() : this(NDalicManualPINVOKE.new_KeyboardPreFocusChangeSignal(), true) {
86     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87   }
88
89 }
90
91 }