Release 4.0.0-preview1-00301
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Renderer.cs
index 6ff2db2..e03a612 100755 (executable)
@@ -1,22 +1,25 @@
-/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 namespace Tizen.NUI
 {
-
+    /// <summary>
+    /// Renderer is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader.
+    /// </summary>
     public class Renderer : Animatable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
@@ -31,6 +34,10 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
             if (disposed)
@@ -64,47 +71,161 @@ namespace Tizen.NUI
             base.Dispose(type);
         }
 
+        /// <summary>
+        /// Enumeration for instances of properties belonging to the Renderer class.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public class Property
         {
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get();
+            /// <summary>
+            /// This should be internal, please do not use.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get();
 
         }
 
+        /// <summary>
+        /// Create an instance of Renderer.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Renderer(Geometry geometry, Shader shader) : this(NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
 
+        /// <summary>
+        /// Sets the geometry to be used by this renderer.
+        /// </summary>
+        /// <param name="geometry">The geometry to be used by this renderer.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void SetGeometry(Geometry geometry)
         {
             NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Gets the geometry used by this renderer.
+        /// </summary>
+        /// <returns>The geometry used by the renderer.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public Geometry GetGeometry()
         {
             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetGeometry(swigCPtr);
@@ -114,18 +235,34 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Sets effective range of indices to draw from bound index buffer.
+        /// </summary>
+        /// <param name="firstElement">The First element to draw.</param>
+        /// <param name="elementsCount">The number of elements to draw.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void SetIndexRange(int firstElement, int elementsCount)
         {
             NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Sets the texture set to be used by this renderer.
+        /// </summary>
+        /// <param name="textureSet">The texture set to be used by this renderer.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void SetTextures(TextureSet textureSet)
         {
             NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Gets the texture set used by this renderer.
+        /// </summary>
+        /// <returns>The texture set used by the renderer.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public TextureSet GetTextures()
         {
             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetTextures(swigCPtr);
@@ -135,12 +272,22 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Sets the shader used by this renderer.
+        /// </summary>
+        /// <param name="shader">The shader to be used by this renderer.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void SetShader(Shader shader)
         {
             NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Gets the shader used by this renderer.
+        /// </summary>
+        /// <returns>The shader used by the renderer.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public Shader GetShader()
         {
             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetShader(swigCPtr);
@@ -150,6 +297,10 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Gets and Sets DepthIndex property.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int DepthIndex
         {
             get
@@ -163,6 +314,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets FaceCullingMode.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int FaceCullingMode
         {
             get
@@ -176,6 +332,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendMode.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendMode
         {
             get
@@ -189,6 +350,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_MODE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendEquationRgb.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendEquationRgb
         {
             get
@@ -202,6 +368,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendEquationAlpha.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendEquationAlpha
         {
             get
@@ -215,6 +386,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendFactorSrcRgb.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendFactorSrcRgb
         {
             get
@@ -228,6 +404,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendFactorDestRgb.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendFactorDestRgb
         {
             get
@@ -241,6 +422,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendFactorSrcAlpha.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendFactorSrcAlpha
         {
             get
@@ -254,6 +440,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendFactorDestAlpha.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int BlendFactorDestAlpha
         {
             get
@@ -267,6 +458,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendColor.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Vector4 BlendColor
         {
             get
@@ -280,6 +476,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_COLOR, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets BlendPreMultipliedAlpha.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public bool BlendPreMultipliedAlpha
         {
             get
@@ -293,6 +494,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets IndexRangeFirst.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int IndexRangeFirst
         {
             get
@@ -306,6 +512,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets IndexRangeCount.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int IndexRangeCount
         {
             get
@@ -319,6 +530,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets DepthWriteMode.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int DepthWriteMode
         {
             get
@@ -332,6 +548,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets DepthFunction.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int DepthFunction
         {
             get
@@ -345,6 +566,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets DepthTestMode.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int DepthTestMode
         {
             get
@@ -358,6 +584,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets RenderMode.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int RenderMode
         {
             get
@@ -371,6 +602,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.RENDER_MODE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilFunction.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilFunction
         {
             get
@@ -384,6 +620,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilFunctionMask.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilFunctionMask
         {
             get
@@ -397,6 +638,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilFunctionReference.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilFunctionReference
         {
             get
@@ -410,6 +656,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilMask.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilMask
         {
             get
@@ -423,6 +674,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_MASK, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilOperationOnFail.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilOperationOnFail
         {
             get
@@ -436,6 +692,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilOperationOnZFail.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilOperationOnZFail
         {
             get
@@ -449,6 +710,11 @@ namespace Tizen.NUI
                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Gets and Sets StencilOperationOnZPass property.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int StencilOperationOnZPass
         {
             get
@@ -465,4 +731,4 @@ namespace Tizen.NUI
 
     }
 
-}
+}
\ No newline at end of file