1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
29 internal class Renderer : Handle {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Renderer_SWIGUpcast(cPtr), cMemoryOwn) {
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Renderer obj) {
37 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
40 public override void Dispose() {
41 if (!Stage.IsInstalled()) {
42 DisposeQueue.Instance.Add(this);
47 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
50 NDalicPINVOKE.delete_Renderer(swigCPtr);
52 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
54 global::System.GC.SuppressFinalize(this);
60 public class Property : global::System.IDisposable {
61 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
62 protected bool swigCMemOwn;
64 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
65 swigCMemOwn = cMemoryOwn;
66 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
69 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
70 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
77 public virtual void Dispose() {
79 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
82 NDalicPINVOKE.delete_Renderer_Property(swigCPtr);
84 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
86 global::System.GC.SuppressFinalize(this);
90 public Property() : this(NDalicPINVOKE.new_Renderer_Property(), true) {
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get();
95 public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get();
96 public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get();
97 public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get();
98 public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get();
99 public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get();
100 public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get();
101 public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get();
102 public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get();
103 public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get();
104 public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get();
105 public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get();
106 public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get();
107 public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get();
108 public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get();
109 public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get();
110 public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get();
111 public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get();
112 public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get();
113 public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get();
114 public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get();
115 public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get();
116 public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get();
117 public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get();
121 public Renderer (Geometry geometry, Shader shader) : this (NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true) {
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 public Renderer(Renderer handle) : this(NDalicPINVOKE.new_Renderer__SWIG_1(Renderer.getCPtr(handle)), true) {
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 public new static Renderer DownCast(BaseHandle handle) {
130 Renderer ret = new Renderer(NDalicPINVOKE.Renderer_DownCast(BaseHandle.getCPtr(handle)), true);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 public Renderer Assign(Renderer handle) {
136 Renderer ret = new Renderer(NDalicPINVOKE.Renderer_Assign(swigCPtr, Renderer.getCPtr(handle)), false);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141 public void SetGeometry(Geometry geometry) {
142 NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry));
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 public Geometry GetGeometry() {
147 Geometry ret = new Geometry(NDalicPINVOKE.Renderer_GetGeometry(swigCPtr), true);
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 public void SetIndexRange(int firstElement, int elementsCount) {
153 NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount);
154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 public void SetTextures(TextureSet textureSet) {
158 NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet));
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162 public TextureSet GetTextures() {
163 TextureSet ret = new TextureSet(NDalicPINVOKE.Renderer_GetTextures(swigCPtr), true);
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168 public void SetShader(Shader shader) {
169 NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader));
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173 public Shader GetShader() {
174 Shader ret = new Shader(NDalicPINVOKE.Renderer_GetShader(swigCPtr), true);
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 public int DepthIndex
184 GetProperty( Renderer.Property.DEPTH_INDEX).Get( ref temp );
189 SetProperty( Renderer.Property.DEPTH_INDEX, new Tizen.NUI.PropertyValue( value ) );
192 public int FaceCullingMode
197 GetProperty( Renderer.Property.FACE_CULLING_MODE).Get( ref temp );
202 SetProperty( Renderer.Property.FACE_CULLING_MODE, new Tizen.NUI.PropertyValue( value ) );
210 GetProperty( Renderer.Property.BLEND_MODE).Get( ref temp );
215 SetProperty( Renderer.Property.BLEND_MODE, new Tizen.NUI.PropertyValue( value ) );
218 public int BlendEquationRgb
223 GetProperty( Renderer.Property.BLEND_EQUATION_RGB).Get( ref temp );
228 SetProperty( Renderer.Property.BLEND_EQUATION_RGB, new Tizen.NUI.PropertyValue( value ) );
231 public int BlendEquationAlpha
236 GetProperty( Renderer.Property.BLEND_EQUATION_ALPHA).Get( ref temp );
241 SetProperty( Renderer.Property.BLEND_EQUATION_ALPHA, new Tizen.NUI.PropertyValue( value ) );
244 public int BlendFactorSrcRgb
249 GetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB).Get( ref temp );
254 SetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB, new Tizen.NUI.PropertyValue( value ) );
257 public int BlendFactorDestRgb
262 GetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB).Get( ref temp );
267 SetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB, new Tizen.NUI.PropertyValue( value ) );
270 public int BlendFactorSrcAlpha
275 GetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get( ref temp );
280 SetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Tizen.NUI.PropertyValue( value ) );
283 public int BlendFactorDestAlpha
288 GetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get( ref temp );
293 SetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Tizen.NUI.PropertyValue( value ) );
296 public Vector4 BlendColor
300 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
301 GetProperty( Renderer.Property.BLEND_COLOR).Get( temp );
306 SetProperty( Renderer.Property.BLEND_COLOR, new Tizen.NUI.PropertyValue( value ) );
309 public bool BlendPreMultipliedAlpha
314 GetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get( ref temp );
319 SetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Tizen.NUI.PropertyValue( value ) );
322 public int IndexRangeFirst
327 GetProperty( Renderer.Property.INDEX_RANGE_FIRST).Get( ref temp );
332 SetProperty( Renderer.Property.INDEX_RANGE_FIRST, new Tizen.NUI.PropertyValue( value ) );
335 public int IndexRangeCount
340 GetProperty( Renderer.Property.INDEX_RANGE_COUNT).Get( ref temp );
345 SetProperty( Renderer.Property.INDEX_RANGE_COUNT, new Tizen.NUI.PropertyValue( value ) );
348 public int DepthWriteMode
353 GetProperty( Renderer.Property.DEPTH_WRITE_MODE).Get( ref temp );
358 SetProperty( Renderer.Property.DEPTH_WRITE_MODE, new Tizen.NUI.PropertyValue( value ) );
361 public int DepthFunction
366 GetProperty( Renderer.Property.DEPTH_FUNCTION).Get( ref temp );
371 SetProperty( Renderer.Property.DEPTH_FUNCTION, new Tizen.NUI.PropertyValue( value ) );
374 public int DepthTestMode
379 GetProperty( Renderer.Property.DEPTH_TEST_MODE).Get( ref temp );
384 SetProperty( Renderer.Property.DEPTH_TEST_MODE, new Tizen.NUI.PropertyValue( value ) );
387 public int RenderMode
392 GetProperty( Renderer.Property.RENDER_MODE).Get( ref temp );
397 SetProperty( Renderer.Property.RENDER_MODE, new Tizen.NUI.PropertyValue( value ) );
400 public int StencilFunction
405 GetProperty( Renderer.Property.STENCIL_FUNCTION).Get( ref temp );
410 SetProperty( Renderer.Property.STENCIL_FUNCTION, new Tizen.NUI.PropertyValue( value ) );
413 public int StencilFunctionMask
418 GetProperty( Renderer.Property.STENCIL_FUNCTION_MASK).Get( ref temp );
423 SetProperty( Renderer.Property.STENCIL_FUNCTION_MASK, new Tizen.NUI.PropertyValue( value ) );
426 public int StencilFunctionReference
431 GetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get( ref temp );
436 SetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Tizen.NUI.PropertyValue( value ) );
439 public int StencilMask
444 GetProperty( Renderer.Property.STENCIL_MASK).Get( ref temp );
449 SetProperty( Renderer.Property.STENCIL_MASK, new Tizen.NUI.PropertyValue( value ) );
452 public int StencilOperationOnFail
457 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get( ref temp );
462 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Tizen.NUI.PropertyValue( value ) );
465 public int StencilOperationOnZFail
470 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get( ref temp );
475 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Tizen.NUI.PropertyValue( value ) );
478 public int StencilOperationOnZPass
483 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get( ref temp );
488 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Tizen.NUI.PropertyValue( value ) );