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.
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
23 /// This will be released at Tizen.NET API Level 6, so currently this would be used as inhouse API.
24 [EditorBrowsable(EditorBrowsableState.Never)]
25 public class RenderTask : Animatable
28 internal RenderTask(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RenderTask.Upcast(cPtr), cMemoryOwn)
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTask obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
37 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
39 Interop.RenderTask.DeleteRenderTask(swigCPtr);
43 public static RenderTask GetRenderTaskFromPtr(global::System.IntPtr cPtr)
45 RenderTask ret = new RenderTask(cPtr, false);
46 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50 internal class Property
52 internal static readonly int ViewportPosition = Interop.RenderTask.ViewportPositionGet();
53 internal static readonly int ViewportSize = Interop.RenderTask.ViewportSizeGet();
54 internal static readonly int ClearColor = Interop.RenderTask.ClearColorGet();
55 internal static readonly int RequiresSync = Interop.RenderTask.RequiresSyncGet();
58 internal static SWIGTYPE_p_f_r_Dali__Vector2__bool DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION
62 global::System.IntPtr cPtr = Interop.RenderTask.DefaultScreenToFramebufferFunctionGet();
63 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr);
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 internal static SWIGTYPE_p_f_r_Dali__Vector2__bool FULLSCREEN_FRAMEBUFFER_FUNCTION
73 global::System.IntPtr cPtr = Interop.RenderTask.FullscreenFramebufferFunctionGet();
74 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 public static bool DEFAULT_EXCLUSIVE
84 bool ret = Interop.RenderTask.DefaultExclusiveGet();
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
90 public static bool DEFAULT_INPUT_ENABLED
94 bool ret = Interop.RenderTask.DefaultInputEnabledGet();
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
100 public static Vector4 DEFAULT_CLEAR_COLOR
104 global::System.IntPtr cPtr = Interop.RenderTask.DefaultClearColorGet();
105 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
111 public static bool DEFAULT_CLEAR_ENABLED
115 bool ret = Interop.RenderTask.DefaultClearEnabledGet();
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
121 public static bool DEFAULT_CULL_MODE
125 bool ret = Interop.RenderTask.DefaultCullModeGet();
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
131 public static uint DEFAULT_REFRESH_RATE
135 uint ret = Interop.RenderTask.DefaultRefreshRateGet();
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
141 public RenderTask() : this(Interop.RenderTask.NewRenderTask(), true)
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 public static RenderTask DownCast(BaseHandle handle)
150 throw new global::System.ArgumentNullException(nameof(handle));
152 RenderTask ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTask;
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 public RenderTask(RenderTask handle) : this(Interop.RenderTask.NewRenderTask(RenderTask.getCPtr(handle)), true)
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162 public RenderTask Assign(RenderTask rhs)
164 RenderTask ret = new RenderTask(Interop.RenderTask.Assign(SwigCPtr, RenderTask.getCPtr(rhs)), false);
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 public void SetSourceView(View view)
171 Interop.RenderTask.SetSourceActor(SwigCPtr, View.getCPtr(view));
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 public View GetSourceView()
177 View ret = new View(Interop.RenderTask.GetSourceActor(SwigCPtr), true);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public void SetExclusive(bool exclusive)
184 Interop.RenderTask.SetExclusive(SwigCPtr, exclusive);
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public bool IsExclusive()
190 bool ret = Interop.RenderTask.IsExclusive(SwigCPtr);
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 public void SetInputEnabled(bool enabled)
197 Interop.RenderTask.SetInputEnabled(SwigCPtr, enabled);
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201 public bool GetInputEnabled()
203 bool ret = Interop.RenderTask.GetInputEnabled(SwigCPtr);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 internal void SetCamera(Camera camera)
210 Interop.RenderTask.SetCameraActor(SwigCPtr, Camera.getCPtr(camera));
211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214 internal Camera GetCamera()
216 Camera ret = new Camera(Interop.RenderTask.GetCameraActor(SwigCPtr), true);
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 public void SetFrameBuffer(FrameBuffer frameBuffer)
223 Interop.RenderTask.SetFrameBuffer(SwigCPtr, FrameBuffer.getCPtr(frameBuffer));
224 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 public FrameBuffer GetFrameBuffer()
229 FrameBuffer ret = new FrameBuffer(Interop.RenderTask.GetFrameBuffer(SwigCPtr), true);
230 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234 internal void SetScreenToFrameBufferFunction(SWIGTYPE_p_f_r_Dali__Vector2__bool conversionFunction)
236 Interop.RenderTask.SetScreenToFrameBufferFunction(SwigCPtr, SWIGTYPE_p_f_r_Dali__Vector2__bool.getCPtr(conversionFunction));
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 internal SWIGTYPE_p_f_r_Dali__Vector2__bool GetScreenToFrameBufferFunction()
242 global::System.IntPtr cPtr = Interop.RenderTask.GetScreenToFrameBufferFunction(SwigCPtr);
243 SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr);
244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 public void SetScreenToFrameBufferMappingView(View mappingView)
250 Interop.RenderTask.SetScreenToFrameBufferMappingActor(SwigCPtr, View.getCPtr(mappingView));
251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254 public View GetScreenToFrameBufferMappingView()
256 View ret = new View(Interop.RenderTask.GetScreenToFrameBufferMappingActor(SwigCPtr), true);
257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 public void SetViewportPosition(Vector2 position)
263 Interop.RenderTask.SetViewportPosition(SwigCPtr, Vector2.getCPtr(position));
264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267 public Vector2 GetCurrentViewportPosition()
269 Vector2 ret = new Vector2(Interop.RenderTask.GetCurrentViewportPosition(SwigCPtr), true);
270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274 public void SetViewportSize(Vector2 size)
276 Interop.RenderTask.SetViewportSize(SwigCPtr, Vector2.getCPtr(size));
277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280 public Vector2 GetCurrentViewportSize()
282 Vector2 ret = new Vector2(Interop.RenderTask.GetCurrentViewportSize(SwigCPtr), true);
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287 public void SetViewport(Rectangle viewport)
289 Interop.RenderTask.SetViewport(SwigCPtr, Rectangle.getCPtr(viewport));
290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
293 public Rectangle GetViewport()
295 Rectangle ret = new Rectangle(Interop.RenderTask.GetViewport(SwigCPtr), true);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
300 public void SetClearColor(Vector4 color)
302 Interop.RenderTask.SetClearColor(SwigCPtr, Vector4.getCPtr(color));
303 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 public Vector4 GetClearColor()
308 Vector4 ret = new Vector4(Interop.RenderTask.GetClearColor(SwigCPtr), true);
309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313 public void SetClearEnabled(bool enabled)
315 Interop.RenderTask.SetClearEnabled(SwigCPtr, enabled);
316 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 public bool GetClearEnabled()
321 bool ret = Interop.RenderTask.GetClearEnabled(SwigCPtr);
322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326 public void SetCullMode(bool cullMode)
328 Interop.RenderTask.SetCullMode(SwigCPtr, cullMode);
329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332 public bool GetCullMode()
334 bool ret = Interop.RenderTask.GetCullMode(SwigCPtr);
335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 public void SetRefreshRate(uint refreshRate)
341 Interop.RenderTask.SetRefreshRate(SwigCPtr, refreshRate);
342 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 public uint GetRefreshRate()
347 uint ret = Interop.RenderTask.GetRefreshRate(SwigCPtr);
348 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
352 public bool WorldToViewport(Vector3 position, out float viewportX, out float viewportY)
354 bool ret = Interop.RenderTask.WorldToViewport(SwigCPtr, Vector3.getCPtr(position), out viewportX, out viewportY);
355 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359 public bool ViewportToLocal(View view, float viewportX, float viewportY, out float localX, out float localY)
361 bool ret = Interop.RenderTask.ViewportToLocal(SwigCPtr, View.getCPtr(view), viewportX, viewportY, out localX, out localY);
362 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366 internal RenderTaskSignal FinishedSignal()
368 RenderTaskSignal ret = new RenderTaskSignal(Interop.RenderTask.FinishedSignal(SwigCPtr), false);
369 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
373 /// <since_tizen> 3 </since_tizen>
374 public enum RefreshRate
380 public Vector2 ViewportPosition
384 Vector2 temp = new Vector2(0.0f, 0.0f);
385 GetProperty(RenderTask.Property.ViewportPosition).Get(temp);
390 SetProperty(RenderTask.Property.ViewportPosition, new Tizen.NUI.PropertyValue(value));
393 public Vector2 ViewportSize
397 Vector2 temp = new Vector2(0.0f, 0.0f);
398 GetProperty(RenderTask.Property.ViewportSize).Get(temp);
403 SetProperty(RenderTask.Property.ViewportSize, new Tizen.NUI.PropertyValue(value));
406 public Vector4 ClearColor
410 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
411 GetProperty(RenderTask.Property.ClearColor).Get(temp);
416 SetProperty(RenderTask.Property.ClearColor, new Tizen.NUI.PropertyValue(value));
419 public bool RequiresSync
424 GetProperty(RenderTask.Property.RequiresSync).Get(out temp);
429 SetProperty(RenderTask.Property.RequiresSync, new Tizen.NUI.PropertyValue(value));