[NUI][API9] Fix typo & bind error at FrameUpdateCallbackInterface
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Common / FrameUpdateCallbackInterface.cs
1 /*
2  * Copyright(c) 2021 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 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23
24     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
25     [EditorBrowsable(EditorBrowsableState.Never)]
26     public class FrameUpdateCallbackInterface : Disposable
27     {
28         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
29         [EditorBrowsable(EditorBrowsableState.Never)]
30         internal FrameUpdateCallbackInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
31         {
32         }
33
34         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
35         [EditorBrowsable(EditorBrowsableState.Never)]
36         public FrameUpdateCallbackInterface() : this(Interop.FrameUpdateCallbackInterface.newFrameUpdateCallbackInterface(), true)
37         {
38             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39             DirectorConnect();
40         }
41
42         private void DirectorConnect()
43         {
44             Delegate0 = new DelegateFrameUpdateCallbackInterface(DirectorOnUpdate);
45             Interop.FrameUpdateCallbackInterface.FrameUpdateCallbackInterfaceDirectorConnect(SwigCPtr, Delegate0);
46         }
47
48         private global::System.IntPtr proxyIntPtr;
49         private void DirectorOnUpdate(global::System.IntPtr proxy, float elapsedSeconds)
50         {
51             proxyIntPtr = proxy;
52             OnUpdate(elapsedSeconds);
53             return;
54         }
55
56         internal delegate void DelegateFrameUpdateCallbackInterface(global::System.IntPtr proxy, float elapsedSeconds);
57         private DelegateFrameUpdateCallbackInterface Delegate0;
58
59
60         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
61         [EditorBrowsable(EditorBrowsableState.Never)]
62         public virtual void OnUpdate(float elapsedSeconds)
63         {
64
65         }
66
67         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
68         [EditorBrowsable(EditorBrowsableState.Never)]
69         protected bool GetPosition(uint id, Vector3 position)
70         {
71             if (proxyIntPtr == IntPtr.Zero)
72             {
73                 return false;
74             }
75             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceGetPosition(proxyIntPtr, id, Vector3.getCPtr(position));
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77             return ret;
78         }
79
80         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
81         [EditorBrowsable(EditorBrowsableState.Never)]
82         protected bool SetPosition(uint id, Vector3 position)
83         {
84             if (proxyIntPtr == IntPtr.Zero)
85             {
86                 return false;
87             }
88             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceSetPosition(proxyIntPtr, id, Vector3.getCPtr(position));
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90             return ret;
91         }
92
93         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
94         [EditorBrowsable(EditorBrowsableState.Never)]
95         protected bool BakePosition(uint id, Vector3 position)
96         {
97             if (proxyIntPtr == IntPtr.Zero)
98             {
99                 return false;
100             }
101             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceBakePosition(proxyIntPtr, id, Vector3.getCPtr(position));
102             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103             return ret;
104         }
105
106         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
107         [EditorBrowsable(EditorBrowsableState.Never)]
108         protected bool GetSize(uint id, Vector3 size)
109         {
110             if (proxyIntPtr == IntPtr.Zero)
111             {
112                 return false;
113             }
114             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceGetSize(proxyIntPtr, id, Vector3.getCPtr(size));
115             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116             return ret;
117         }
118
119         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
120         [EditorBrowsable(EditorBrowsableState.Never)]
121         protected bool SetSize(uint id, Vector3 size)
122         {
123             if (proxyIntPtr == IntPtr.Zero)
124             {
125                 return false;
126             }
127             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceSetSize(proxyIntPtr, id, Vector3.getCPtr(size));
128             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129             return ret;
130         }
131
132         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
133         [EditorBrowsable(EditorBrowsableState.Never)]
134         protected bool BakeSize(uint id, Vector3 size)
135         {
136             if (proxyIntPtr == IntPtr.Zero)
137             {
138                 return false;
139             }
140             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceBakeSize(proxyIntPtr, id, Vector3.getCPtr(size));
141             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142             return ret;
143         }
144
145         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
146         [EditorBrowsable(EditorBrowsableState.Never)]
147         protected bool GetScale(uint id, Vector3 scale)
148         {
149             if (proxyIntPtr == IntPtr.Zero)
150             {
151                 return false;
152             }
153             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceGetScale(proxyIntPtr, id, Vector3.getCPtr(scale));
154             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155             return ret;
156         }
157
158         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
159         [EditorBrowsable(EditorBrowsableState.Never)]
160         protected bool SetScale(uint id, Vector3 scale)
161         {
162             if (proxyIntPtr == IntPtr.Zero)
163             {
164                 return false;
165             }
166             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceSetScale(proxyIntPtr, id, Vector3.getCPtr(scale));
167             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168             return ret;
169         }
170
171         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
172         [EditorBrowsable(EditorBrowsableState.Never)]
173         protected bool BakeScale(uint id, Vector3 scale)
174         {
175             if (proxyIntPtr == IntPtr.Zero)
176             {
177                 return false;
178             }
179             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceBakeScale(proxyIntPtr, id, Vector3.getCPtr(scale));
180             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181             return ret;
182         }
183
184         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
185         [EditorBrowsable(EditorBrowsableState.Never)]
186         protected bool GetColor(uint id, Vector4 color)
187         {
188             if (proxyIntPtr == IntPtr.Zero)
189             {
190                 return false;
191             }
192             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceGetColor(proxyIntPtr, id, Vector4.getCPtr(color));
193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194             return ret;
195         }
196
197         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
198         [EditorBrowsable(EditorBrowsableState.Never)]
199         protected bool SetColor(uint id, Vector4 color)
200         {
201             if (proxyIntPtr == IntPtr.Zero)
202             {
203                 return false;
204             }
205             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceSetColor(proxyIntPtr, id, Vector4.getCPtr(color));
206             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207             return ret;
208         }
209
210         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
211         [EditorBrowsable(EditorBrowsableState.Never)]
212         protected bool BakeColor(uint id, Vector4 color)
213         {
214             if (proxyIntPtr == IntPtr.Zero)
215             {
216                 return false;
217             }
218             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceBakeColor(proxyIntPtr, id, Vector4.getCPtr(color));
219             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220             return ret;
221         }
222
223         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
224         [EditorBrowsable(EditorBrowsableState.Never)]
225         protected bool GetPositionAndSize(uint id, Vector3 Position, Vector3 Size)
226         {
227             if (proxyIntPtr == IntPtr.Zero)
228             {
229                 return false;
230             }
231             bool ret = Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceGetPositionAndSize(proxyIntPtr, id, Vector3.getCPtr(Position), Vector3.getCPtr(Size));
232             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233             return ret;
234         }
235
236         internal void AddFrameUpdateCallback(global::System.Runtime.InteropServices.HandleRef windowCPtr, global::System.Runtime.InteropServices.HandleRef layerCPtr)
237         {
238             Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceAddFrameUpdateCallback(windowCPtr, SwigCPtr, layerCPtr);
239         }
240
241         internal void RemoveFrameUpdateCallback(global::System.Runtime.InteropServices.HandleRef windowCPtr)
242         {
243             Interop.FrameUpdateCallbackInterface.FrameCallbackInterfaceRemoveFrameUpdateCallback(windowCPtr, SwigCPtr);
244         }
245     }
246 }