Follow formatting NUI
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / FrameCallbackInterface.cs
1 /*
2  * Copyright(c) 2020 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.Collections.Generic;
20 using System.ComponentModel;
21 using System.Reflection;
22 using System.Text;
23
24 namespace Tizen.NUI
25 {
26
27     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
28     [EditorBrowsable(EditorBrowsableState.Never)]
29     public class FrameCallbackInterface : Disposable
30     {
31         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
32         [EditorBrowsable(EditorBrowsableState.Never)]
33         internal FrameCallbackInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
34         {
35         }
36
37         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
38         [EditorBrowsable(EditorBrowsableState.Never)]
39         public FrameCallbackInterface() : this(Interop.FrameCallbackInterface.new_FrameCallbackInterface(), true)
40         {
41             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
42             SwigDirectorConnect();
43         }
44
45         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FrameCallbackInterface obj)
46         {
47             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48         }
49
50         private void SwigDirectorConnect()
51         {
52             swigDelegate0 = new SwigDelegateFrameCallbackInterface(SwigDirectorOnUpdate);
53             Interop.FrameCallbackInterface.FrameCallbackInterface_director_connect(swigCPtr, swigDelegate0);
54         }
55
56         private global::System.IntPtr proxyIntPtr;
57         private void SwigDirectorOnUpdate(global::System.IntPtr proxy, float elapsedSeconds)
58         {
59             proxyIntPtr = proxy;
60             OnUpdate(elapsedSeconds);
61             return;
62         }
63
64         internal delegate void SwigDelegateFrameCallbackInterface(global::System.IntPtr proxy, float elapsedSeconds);
65         private SwigDelegateFrameCallbackInterface swigDelegate0;
66         private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(IntPtr), typeof(float) };
67
68
69         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public virtual void OnUpdate(float elapsedSeconds)
72         {
73
74         }
75
76         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
77         [EditorBrowsable(EditorBrowsableState.Never)]
78         protected bool GetPosition(uint id, Vector3 position)
79         {
80             if (proxyIntPtr == IntPtr.Zero)
81             {
82                 return false;
83             }
84             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_GetPosition(proxyIntPtr, id, Vector3.getCPtr(position));
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86             return ret;
87         }
88
89
90         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
91         [EditorBrowsable(EditorBrowsableState.Never)]
92         protected bool SetPosition(uint id, Vector3 position)
93         {
94             if (proxyIntPtr == IntPtr.Zero)
95             {
96                 return false;
97             }
98             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_SetPosition(proxyIntPtr, id, Vector3.getCPtr(position));
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100             return ret;
101         }
102
103
104         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
105         [EditorBrowsable(EditorBrowsableState.Never)]
106         protected bool BakePosition(uint id, Vector3 position)
107         {
108             if (proxyIntPtr == IntPtr.Zero)
109             {
110                 return false;
111             }
112             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_BakePosition(proxyIntPtr, id, Vector3.getCPtr(position));
113             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114             return ret;
115         }
116
117
118         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
119         [EditorBrowsable(EditorBrowsableState.Never)]
120         protected bool GetSize(uint id, Vector3 size)
121         {
122             if (proxyIntPtr == IntPtr.Zero)
123             {
124                 return false;
125             }
126             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_GetSize(proxyIntPtr, id, Vector3.getCPtr(size));
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128             return ret;
129         }
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 SetSize(uint id, Vector3 size)
135         {
136             if (proxyIntPtr == IntPtr.Zero)
137             {
138                 return false;
139             }
140             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_SetSize(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 BakeSize(uint id, Vector3 size)
148         {
149             if (proxyIntPtr == IntPtr.Zero)
150             {
151                 return false;
152             }
153             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_BakeSize(proxyIntPtr, id, Vector3.getCPtr(size));
154             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155             return ret;
156         }
157
158
159         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
160         [EditorBrowsable(EditorBrowsableState.Never)]
161         protected bool SetScale(uint id, Vector3 scale)
162         {
163             if (proxyIntPtr == IntPtr.Zero)
164             {
165                 return false;
166             }
167             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_SetScale(proxyIntPtr, id, Vector3.getCPtr(scale));
168             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169             return ret;
170         }
171
172
173         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
174         [EditorBrowsable(EditorBrowsableState.Never)]
175         protected bool GetScale(uint id, Vector3 scale)
176         {
177             if (proxyIntPtr == IntPtr.Zero)
178             {
179                 return false;
180             }
181             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_SetScale(proxyIntPtr, id, Vector3.getCPtr(scale));
182             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183             return ret;
184         }
185
186
187         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
188         [EditorBrowsable(EditorBrowsableState.Never)]
189         protected bool BakeScale(uint id, Vector3 scale)
190         {
191             if (proxyIntPtr == IntPtr.Zero)
192             {
193                 return false;
194             }
195             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_BakeScale(proxyIntPtr, id, Vector3.getCPtr(scale));
196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197             return ret;
198         }
199
200         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
201         [EditorBrowsable(EditorBrowsableState.Never)]
202         protected bool GetColor(uint id, Vector4 color)
203         {
204             if (proxyIntPtr == IntPtr.Zero)
205             {
206                 return false;
207             }
208             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_BakeScale(proxyIntPtr, id, Vector4.getCPtr(color));
209             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210             return ret;
211         }
212
213         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
214         [EditorBrowsable(EditorBrowsableState.Never)]
215         protected bool SetColor(uint id, Vector4 color)
216         {
217             if (proxyIntPtr == IntPtr.Zero)
218             {
219                 return false;
220             }
221             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_BakeScale(proxyIntPtr, id, Vector4.getCPtr(color));
222             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223             return ret;
224         }
225
226         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
227         [EditorBrowsable(EditorBrowsableState.Never)]
228         protected bool BakeColor(uint id, Vector4 color)
229         {
230             if (proxyIntPtr == IntPtr.Zero)
231             {
232                 return false;
233             }
234             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_BakeScale(proxyIntPtr, id, Vector4.getCPtr(color));
235             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236             return ret;
237         }
238
239
240         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
241         [EditorBrowsable(EditorBrowsableState.Never)]
242         protected bool GetPositionAndSize(uint id, Vector3 Position, Vector3 Size)
243         {
244             if (proxyIntPtr == IntPtr.Zero)
245             {
246                 return false;
247             }
248             bool ret = Interop.FrameCallbackInterface.FraemCallbackInterface_GetPositionAndSize(proxyIntPtr, id, Vector3.getCPtr(Position), Vector3.getCPtr(Size));
249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250             return ret;
251         }
252
253         internal void AddFrameCallback(global::System.Runtime.InteropServices.HandleRef windowCPtr, global::System.Runtime.InteropServices.HandleRef layerCPtr)
254         {
255             Interop.FrameCallbackInterface.FraemCallbackInterface_AddFrameCallback(windowCPtr, swigCPtr, layerCPtr);
256         }
257
258         internal void RemoveFrameCallback(global::System.Runtime.InteropServices.HandleRef windowCPtr)
259         {
260             Interop.FrameCallbackInterface.FraemCallbackInterface_RemoveFrameCallback(windowCPtr, swigCPtr);
261         }
262     }
263 }