2 * Copyright(c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 using Tizen.NUI.BaseComponents;
21 internal class WindowPointerConstraintsSignal : Disposable
23 internal WindowPointerConstraintsSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
30 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
32 Interop.WindowPointerConstraintsSignal.DeleteWindowPointerConstraintsSignal(swigCPtr);
36 /// Queries whether there are any connected slots.
38 /// <returns>True if there are any slots connected to the signal</returns>
41 bool ret = Interop.WindowPointerConstraintsSignal.Empty(SwigCPtr);
42 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
47 /// Queries the number of slots.
49 /// <returns>The number of slots connected to this signal</returns>
50 public uint GetConnectionCount()
52 uint ret = Interop.WindowPointerConstraintsSignal.GetConnectionCount(SwigCPtr);
53 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58 /// Connects a function.
60 /// <param name="func">The function to connect</param>
61 public void Connect(System.Delegate func)
63 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
65 Interop.WindowPointerConstraintsSignal.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 /// Disconnects a function.
73 /// <param name="func">The function to disconnect</param>
74 public void Disconnect(System.Delegate func)
76 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
78 Interop.WindowPointerConstraintsSignal.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 /// <param name="window">The first value to pass to callbacks</param>
87 /// <param name="pointerConstraints">The second value to pass to callbacks</param>
88 public void Emit(Window window, PointerConstraints pointerConstraints)
90 Interop.WindowPointerConstraintsSignal.Emit(SwigCPtr, Window.getCPtr(window), PointerConstraints.getCPtr(pointerConstraints));
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 public WindowPointerConstraintsSignal(Window window) : this(Interop.WindowPointerConstraintsSignal.GetSignal(Window.getCPtr(window)), false)
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();