2 * Copyright(c) 2017 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 RenderTask : Animatable
24 internal RenderTask(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RenderTask.RenderTask_SWIGUpcast(cPtr), cMemoryOwn)
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTask obj)
30 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
33 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
35 Interop.RenderTask.delete_RenderTask(swigCPtr);
39 public static RenderTask GetRenderTaskFromPtr(global::System.IntPtr cPtr)
41 RenderTask ret = new RenderTask(cPtr, false);
42 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
46 internal class Property
48 internal static readonly int VIEWPORT_POSITION = Interop.RenderTask.RenderTask_Property_VIEWPORT_POSITION_get();
49 internal static readonly int VIEWPORT_SIZE = Interop.RenderTask.RenderTask_Property_VIEWPORT_SIZE_get();
50 internal static readonly int CLEAR_COLOR = Interop.RenderTask.RenderTask_Property_CLEAR_COLOR_get();
51 internal static readonly int REQUIRES_SYNC = Interop.RenderTask.RenderTask_Property_REQUIRES_SYNC_get();
54 internal static SWIGTYPE_p_f_r_Dali__Vector2__bool DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION
58 global::System.IntPtr cPtr = Interop.RenderTask.RenderTask_DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION_get();
59 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false);
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 internal static SWIGTYPE_p_f_r_Dali__Vector2__bool FULLSCREEN_FRAMEBUFFER_FUNCTION
69 global::System.IntPtr cPtr = Interop.RenderTask.RenderTask_FULLSCREEN_FRAMEBUFFER_FUNCTION_get();
70 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false);
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76 public static bool DEFAULT_EXCLUSIVE
80 bool ret = Interop.RenderTask.RenderTask_DEFAULT_EXCLUSIVE_get();
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 public static bool DEFAULT_INPUT_ENABLED
90 bool ret = Interop.RenderTask.RenderTask_DEFAULT_INPUT_ENABLED_get();
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96 public static Vector4 DEFAULT_CLEAR_COLOR
100 global::System.IntPtr cPtr = Interop.RenderTask.RenderTask_DEFAULT_CLEAR_COLOR_get();
101 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 public static bool DEFAULT_CLEAR_ENABLED
111 bool ret = Interop.RenderTask.RenderTask_DEFAULT_CLEAR_ENABLED_get();
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 public static bool DEFAULT_CULL_MODE
121 bool ret = Interop.RenderTask.RenderTask_DEFAULT_CULL_MODE_get();
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 public static uint DEFAULT_REFRESH_RATE
131 uint ret = Interop.RenderTask.RenderTask_DEFAULT_REFRESH_RATE_get();
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137 public RenderTask() : this(Interop.RenderTask.new_RenderTask__SWIG_0(), true)
139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142 public static RenderTask DownCast(BaseHandle handle)
144 RenderTask ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTask;
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149 public RenderTask(RenderTask handle) : this(Interop.RenderTask.new_RenderTask__SWIG_1(RenderTask.getCPtr(handle)), true)
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 public RenderTask Assign(RenderTask rhs)
156 RenderTask ret = new RenderTask(Interop.RenderTask.RenderTask_Assign(swigCPtr, RenderTask.getCPtr(rhs)), false);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public void SetSourceView(View view)
163 Interop.RenderTask.RenderTask_SetSourceActor(swigCPtr, View.getCPtr(view));
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public View GetSourceView()
169 View ret = new View(Interop.RenderTask.RenderTask_GetSourceActor(swigCPtr), true);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 public void SetExclusive(bool exclusive)
176 Interop.RenderTask.RenderTask_SetExclusive(swigCPtr, exclusive);
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 public bool IsExclusive()
182 bool ret = Interop.RenderTask.RenderTask_IsExclusive(swigCPtr);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public void SetInputEnabled(bool enabled)
189 Interop.RenderTask.RenderTask_SetInputEnabled(swigCPtr, enabled);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 public bool GetInputEnabled()
195 bool ret = Interop.RenderTask.RenderTask_GetInputEnabled(swigCPtr);
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 internal void SetCamera(Camera camera)
202 Interop.RenderTask.RenderTask_SetCameraActor(swigCPtr, Camera.getCPtr(camera));
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 internal Camera GetCamera()
208 Camera ret = new Camera(Interop.RenderTask.RenderTask_GetCameraActor(swigCPtr), true);
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 public void SetTargetFrameBuffer(FrameBufferImage frameBuffer)
215 Interop.RenderTask.RenderTask_SetTargetFrameBuffer(swigCPtr, FrameBufferImage.getCPtr(frameBuffer));
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219 public FrameBufferImage GetTargetFrameBuffer()
221 FrameBufferImage ret = new FrameBufferImage(Interop.RenderTask.RenderTask_GetTargetFrameBuffer(swigCPtr), true);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 public void SetFrameBuffer(FrameBuffer frameBuffer)
228 Interop.RenderTask.RenderTask_SetFrameBuffer(swigCPtr, FrameBuffer.getCPtr(frameBuffer));
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232 public FrameBuffer GetFrameBuffer()
234 FrameBuffer ret = new FrameBuffer(Interop.RenderTask.RenderTask_GetFrameBuffer(swigCPtr), true);
235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239 internal void SetScreenToFrameBufferFunction(SWIGTYPE_p_f_r_Dali__Vector2__bool conversionFunction)
241 Interop.RenderTask.RenderTask_SetScreenToFrameBufferFunction(swigCPtr, SWIGTYPE_p_f_r_Dali__Vector2__bool.getCPtr(conversionFunction));
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245 internal SWIGTYPE_p_f_r_Dali__Vector2__bool GetScreenToFrameBufferFunction()
247 global::System.IntPtr cPtr = Interop.RenderTask.RenderTask_GetScreenToFrameBufferFunction(swigCPtr);
248 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false);
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 public void SetScreenToFrameBufferMappingView(View mappingView)
255 Interop.RenderTask.RenderTask_SetScreenToFrameBufferMappingActor(swigCPtr, View.getCPtr(mappingView));
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259 public View GetScreenToFrameBufferMappingView()
261 View ret = new View(Interop.RenderTask.RenderTask_GetScreenToFrameBufferMappingActor(swigCPtr), true);
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266 public void SetViewportPosition(Vector2 position)
268 Interop.RenderTask.RenderTask_SetViewportPosition(swigCPtr, Vector2.getCPtr(position));
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 public Vector2 GetCurrentViewportPosition()
274 Vector2 ret = new Vector2(Interop.RenderTask.RenderTask_GetCurrentViewportPosition(swigCPtr), true);
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 public void SetViewportSize(Vector2 size)
281 Interop.RenderTask.RenderTask_SetViewportSize(swigCPtr, Vector2.getCPtr(size));
282 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285 public Vector2 GetCurrentViewportSize()
287 Vector2 ret = new Vector2(Interop.RenderTask.RenderTask_GetCurrentViewportSize(swigCPtr), true);
288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292 public void SetViewport(Rectangle viewport)
294 Interop.RenderTask.RenderTask_SetViewport(swigCPtr, Rectangle.getCPtr(viewport));
295 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 public Rectangle GetViewport()
300 Rectangle ret = new Rectangle(Interop.RenderTask.RenderTask_GetViewport(swigCPtr), true);
301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 public void SetClearColor(Vector4 color)
307 Interop.RenderTask.RenderTask_SetClearColor(swigCPtr, Vector4.getCPtr(color));
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 public Vector4 GetClearColor()
313 Vector4 ret = new Vector4(Interop.RenderTask.RenderTask_GetClearColor(swigCPtr), true);
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 public void SetClearEnabled(bool enabled)
320 Interop.RenderTask.RenderTask_SetClearEnabled(swigCPtr, enabled);
321 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324 public bool GetClearEnabled()
326 bool ret = Interop.RenderTask.RenderTask_GetClearEnabled(swigCPtr);
327 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
331 public void SetCullMode(bool cullMode)
333 Interop.RenderTask.RenderTask_SetCullMode(swigCPtr, cullMode);
334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337 public bool GetCullMode()
339 bool ret = Interop.RenderTask.RenderTask_GetCullMode(swigCPtr);
340 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344 public void SetRefreshRate(uint refreshRate)
346 Interop.RenderTask.RenderTask_SetRefreshRate(swigCPtr, refreshRate);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 public uint GetRefreshRate()
352 uint ret = Interop.RenderTask.RenderTask_GetRefreshRate(swigCPtr);
353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 public bool WorldToViewport(Vector3 position, out float viewportX, out float viewportY)
359 bool ret = Interop.RenderTask.RenderTask_WorldToViewport(swigCPtr, Vector3.getCPtr(position), out viewportX, out viewportY);
360 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 public bool ViewportToLocal(View view, float viewportX, float viewportY, out float localX, out float localY)
366 bool ret = Interop.RenderTask.RenderTask_ViewportToLocal(swigCPtr, View.getCPtr(view), viewportX, viewportY, out localX, out localY);
367 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371 internal RenderTaskSignal FinishedSignal()
373 RenderTaskSignal ret = new RenderTaskSignal(Interop.RenderTask.RenderTask_FinishedSignal(swigCPtr), false);
374 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378 /// <since_tizen> 3 </since_tizen>
379 public enum RefreshRate
385 public Vector2 ViewportPosition
389 Vector2 temp = new Vector2(0.0f, 0.0f);
390 GetProperty(RenderTask.Property.VIEWPORT_POSITION).Get(temp);
395 SetProperty(RenderTask.Property.VIEWPORT_POSITION, new Tizen.NUI.PropertyValue(value));
398 public Vector2 ViewportSize
402 Vector2 temp = new Vector2(0.0f, 0.0f);
403 GetProperty(RenderTask.Property.VIEWPORT_SIZE).Get(temp);
408 SetProperty(RenderTask.Property.VIEWPORT_SIZE, new Tizen.NUI.PropertyValue(value));
411 public Vector4 ClearColor
415 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
416 GetProperty(RenderTask.Property.CLEAR_COLOR).Get(temp);
421 SetProperty(RenderTask.Property.CLEAR_COLOR, new Tizen.NUI.PropertyValue(value));
424 public bool RequiresSync
429 GetProperty(RenderTask.Property.REQUIRES_SYNC).Get(out temp);
434 SetProperty(RenderTask.Property.REQUIRES_SYNC, new Tizen.NUI.PropertyValue(value));