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 System.ComponentModel;
18 using Tizen.NUI.BaseComponents;
22 /// This will be released at Tizen.NET API Level 6, so currently this would be used as inhouse API.
23 [EditorBrowsable(EditorBrowsableState.Never)]
24 public class RenderTask : Animatable
27 internal RenderTask(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RenderTask.RenderTaskSwigUpcast(cPtr), cMemoryOwn)
31 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTask obj)
33 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
38 Interop.RenderTask.DeleteRenderTask(swigCPtr);
41 [EditorBrowsable(EditorBrowsableState.Never)]
42 public static RenderTask GetRenderTaskFromPtr(global::System.IntPtr cPtr)
44 RenderTask ret = new RenderTask(cPtr, false);
45 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
49 internal class Property
51 internal static readonly int ViewportPosition = Interop.RenderTask.RenderTaskPropertyViewportPositionGet();
52 internal static readonly int ViewportSize = Interop.RenderTask.RenderTaskPropertyViewportSizeGet();
53 internal static readonly int ClearColor = Interop.RenderTask.RenderTaskPropertyClearColorGet();
54 internal static readonly int RequiresSync = Interop.RenderTask.RenderTaskPropertyRequiresSyncGet();
57 internal static SWIGTYPE_p_f_r_Dali__Vector2__bool DefaultScreenToFramebufferFunction
61 global::System.IntPtr cPtr = Interop.RenderTask.RenderTaskDefaultScreenToFramebufferFunctionGet();
62 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false);
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 internal static SWIGTYPE_p_f_r_Dali__Vector2__bool FullscreenFramebufferFunction
72 global::System.IntPtr cPtr = Interop.RenderTask.RenderTaskFullscreenFramebufferFunctionGet();
73 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false);
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79 [EditorBrowsable(EditorBrowsableState.Never)]
80 public static bool DefaultExclusive
84 bool ret = Interop.RenderTask.RenderTaskDefaultExclusiveGet();
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90 [EditorBrowsable(EditorBrowsableState.Never)]
91 public static bool DefaultInputEnabled
95 bool ret = Interop.RenderTask.RenderTaskDefaultInputEnabledGet();
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public static Vector4 DefaultClearColor
106 global::System.IntPtr cPtr = Interop.RenderTask.RenderTaskDefaultClearColorGet();
107 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 [EditorBrowsable(EditorBrowsableState.Never)]
114 public static bool DefaultClearEnabled
118 bool ret = Interop.RenderTask.RenderTaskDefaultClearEnabledGet();
119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 [EditorBrowsable(EditorBrowsableState.Never)]
125 public static bool DefaultCullMode
129 bool ret = Interop.RenderTask.RenderTaskDefaultCullModeGet();
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 [EditorBrowsable(EditorBrowsableState.Never)]
136 public static uint DefaultRefreshRate
140 uint ret = Interop.RenderTask.RenderTaskDefaultRefreshRateGet();
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 [EditorBrowsable(EditorBrowsableState.Never)]
147 public RenderTask() : this(Interop.RenderTask.NewRenderTaskSwig0(), true)
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 [EditorBrowsable(EditorBrowsableState.Never)]
153 public static RenderTask DownCast(BaseHandle handle)
155 RenderTask ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTask;
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public RenderTask(RenderTask handle) : this(Interop.RenderTask.NewRenderTaskSwig1(RenderTask.getCPtr(handle)), true)
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 [EditorBrowsable(EditorBrowsableState.Never)]
167 public RenderTask Assign(RenderTask rhs)
169 RenderTask ret = new RenderTask(Interop.RenderTask.RenderTaskAssign(swigCPtr, RenderTask.getCPtr(rhs)), false);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 [EditorBrowsable(EditorBrowsableState.Never)]
175 public void SetSourceView(View view)
177 Interop.RenderTask.RenderTaskSetSourceActor(swigCPtr, View.getCPtr(view));
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public View GetSourceView()
183 View ret = new View(Interop.RenderTask.RenderTaskGetSourceActor(swigCPtr), true);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 [EditorBrowsable(EditorBrowsableState.Never)]
189 public void SetExclusive(bool exclusive)
191 Interop.RenderTask.RenderTaskSetExclusive(swigCPtr, exclusive);
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 [EditorBrowsable(EditorBrowsableState.Never)]
196 public bool IsExclusive()
198 bool ret = Interop.RenderTask.RenderTaskIsExclusive(swigCPtr);
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203 [EditorBrowsable(EditorBrowsableState.Never)]
204 public void SetInputEnabled(bool enabled)
206 Interop.RenderTask.RenderTaskSetInputEnabled(swigCPtr, enabled);
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 [EditorBrowsable(EditorBrowsableState.Never)]
211 public bool GetInputEnabled()
213 bool ret = Interop.RenderTask.RenderTaskGetInputEnabled(swigCPtr);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 internal void SetCamera(Camera camera)
220 Interop.RenderTask.RenderTaskSetCameraActor(swigCPtr, Camera.getCPtr(camera));
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 internal Camera GetCamera()
226 Camera ret = new Camera(Interop.RenderTask.RenderTaskGetCameraActor(swigCPtr), true);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231 [EditorBrowsable(EditorBrowsableState.Never)]
232 public void SetFrameBuffer(FrameBuffer frameBuffer)
234 Interop.RenderTask.RenderTaskSetFrameBuffer(swigCPtr, FrameBuffer.getCPtr(frameBuffer));
235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public FrameBuffer GetFrameBuffer()
241 FrameBuffer ret = new FrameBuffer(Interop.RenderTask.RenderTaskGetFrameBuffer(swigCPtr), true);
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 internal void SetScreenToFrameBufferFunction(SWIGTYPE_p_f_r_Dali__Vector2__bool conversionFunction)
248 Interop.RenderTask.RenderTaskSetScreenToFrameBufferFunction(swigCPtr, SWIGTYPE_p_f_r_Dali__Vector2__bool.getCPtr(conversionFunction));
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252 internal SWIGTYPE_p_f_r_Dali__Vector2__bool GetScreenToFrameBufferFunction()
254 global::System.IntPtr cPtr = Interop.RenderTask.RenderTaskGetScreenToFrameBufferFunction(swigCPtr);
255 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false);
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260 [EditorBrowsable(EditorBrowsableState.Never)]
261 public void SetScreenToFrameBufferMappingView(View mappingView)
263 Interop.RenderTask.RenderTaskSetScreenToFrameBufferMappingActor(swigCPtr, View.getCPtr(mappingView));
264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267 [EditorBrowsable(EditorBrowsableState.Never)]
268 public View GetScreenToFrameBufferMappingView()
270 View ret = new View(Interop.RenderTask.RenderTaskGetScreenToFrameBufferMappingActor(swigCPtr), true);
271 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275 [EditorBrowsable(EditorBrowsableState.Never)]
276 public void SetViewportPosition(Vector2 position)
278 Interop.RenderTask.RenderTaskSetViewportPosition(swigCPtr, Vector2.getCPtr(position));
279 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282 [EditorBrowsable(EditorBrowsableState.Never)]
283 public Vector2 GetCurrentViewportPosition()
285 Vector2 ret = new Vector2(Interop.RenderTask.RenderTaskGetCurrentViewportPosition(swigCPtr), true);
286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290 [EditorBrowsable(EditorBrowsableState.Never)]
291 public void SetViewportSize(Vector2 size)
293 Interop.RenderTask.RenderTaskSetViewportSize(swigCPtr, Vector2.getCPtr(size));
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 [EditorBrowsable(EditorBrowsableState.Never)]
298 public Vector2 GetCurrentViewportSize()
300 Vector2 ret = new Vector2(Interop.RenderTask.RenderTaskGetCurrentViewportSize(swigCPtr), true);
301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 [EditorBrowsable(EditorBrowsableState.Never)]
306 public void SetViewport(Rectangle viewport)
308 Interop.RenderTask.RenderTaskSetViewport(swigCPtr, Rectangle.getCPtr(viewport));
309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 [EditorBrowsable(EditorBrowsableState.Never)]
313 public Rectangle GetViewport()
315 Rectangle ret = new Rectangle(Interop.RenderTask.RenderTaskGetViewport(swigCPtr), true);
316 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
320 [EditorBrowsable(EditorBrowsableState.Never)]
321 public void SetClearColor(Vector4 color)
323 Interop.RenderTask.RenderTaskSetClearColor(swigCPtr, Vector4.getCPtr(color));
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327 [EditorBrowsable(EditorBrowsableState.Never)]
328 public Vector4 GetClearColor()
330 Vector4 ret = new Vector4(Interop.RenderTask.RenderTaskGetClearColor(swigCPtr), true);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 [EditorBrowsable(EditorBrowsableState.Never)]
336 public void SetClearEnabled(bool enabled)
338 Interop.RenderTask.RenderTaskSetClearEnabled(swigCPtr, enabled);
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342 [EditorBrowsable(EditorBrowsableState.Never)]
343 public bool GetClearEnabled()
345 bool ret = Interop.RenderTask.RenderTaskGetClearEnabled(swigCPtr);
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 [EditorBrowsable(EditorBrowsableState.Never)]
351 public void SetCullMode(bool cullMode)
353 Interop.RenderTask.RenderTaskSetCullMode(swigCPtr, cullMode);
354 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 [EditorBrowsable(EditorBrowsableState.Never)]
358 public bool GetCullMode()
360 bool ret = Interop.RenderTask.RenderTaskGetCullMode(swigCPtr);
361 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365 [EditorBrowsable(EditorBrowsableState.Never)]
366 public void SetRefreshRate(uint refreshRate)
368 Interop.RenderTask.RenderTaskSetRefreshRate(swigCPtr, refreshRate);
369 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
372 [EditorBrowsable(EditorBrowsableState.Never)]
373 public uint GetRefreshRate()
375 uint ret = Interop.RenderTask.RenderTaskGetRefreshRate(swigCPtr);
376 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
380 [EditorBrowsable(EditorBrowsableState.Never)]
381 public bool WorldToViewport(Vector3 position, out float viewportX, out float viewportY)
383 bool ret = Interop.RenderTask.RenderTaskWorldToViewport(swigCPtr, Vector3.getCPtr(position), out viewportX, out viewportY);
384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388 [EditorBrowsable(EditorBrowsableState.Never)]
389 public bool ViewportToLocal(View view, float viewportX, float viewportY, out float localX, out float localY)
391 bool ret = Interop.RenderTask.RenderTaskViewportToLocal(swigCPtr, View.getCPtr(view), viewportX, viewportY, out localX, out localY);
392 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396 internal RenderTaskSignal FinishedSignal()
398 RenderTaskSignal ret = new RenderTaskSignal(Interop.RenderTask.RenderTaskFinishedSignal(swigCPtr), false);
399 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
403 /// <since_tizen> 3 </since_tizen>
404 public enum RefreshRate
410 [EditorBrowsable(EditorBrowsableState.Never)]
411 public Vector2 ViewportPosition
415 Vector2 temp = new Vector2(0.0f, 0.0f);
416 GetProperty(RenderTask.Property.ViewportPosition).Get(temp);
421 SetProperty(RenderTask.Property.ViewportPosition, new Tizen.NUI.PropertyValue(value));
425 [EditorBrowsable(EditorBrowsableState.Never)]
426 public Vector2 ViewportSize
430 Vector2 temp = new Vector2(0.0f, 0.0f);
431 GetProperty(RenderTask.Property.ViewportSize).Get(temp);
436 SetProperty(RenderTask.Property.ViewportSize, new Tizen.NUI.PropertyValue(value));
440 [EditorBrowsable(EditorBrowsableState.Never)]
441 public Vector4 ClearColor
445 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
446 GetProperty(RenderTask.Property.ClearColor).Get(temp);
451 SetProperty(RenderTask.Property.ClearColor, new Tizen.NUI.PropertyValue(value));
455 [EditorBrowsable(EditorBrowsableState.Never)]
456 public bool RequiresSync
461 GetProperty(RenderTask.Property.RequiresSync).Get(out temp);
466 SetProperty(RenderTask.Property.RequiresSync, new Tizen.NUI.PropertyValue(value));