Support TranslatablePlaceholderTextFocused to TextField
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Sampler.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 using System.ComponentModel;
18
19 namespace Tizen.NUI
20 {
21     /// <summary>
22     /// Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures.
23     /// </summary>
24     /// <since_tizen> 3 </since_tizen>
25     public class Sampler : BaseHandle
26     {
27
28         /// <summary>
29         /// Create an instance of Sampler.
30         /// </summary>
31         /// <since_tizen> 3 </since_tizen>
32         public Sampler() : this(Interop.Sampler.Sampler_New(), true)
33         {
34             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
35         }
36
37         /// <summary>
38         /// Sets the filter modes for this sampler.
39         /// </summary>
40         /// <param name="minFilter">The minification filter that will be used.</param>
41         /// <param name="magFilter">The magnification filter that will be used.</param>
42         /// <since_tizen> 3 </since_tizen>
43         public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
44         {
45             Interop.Sampler.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter);
46             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
47         }
48
49         /// <summary>
50         /// Sets the wrap modes for this sampler.
51         /// </summary>
52         /// <param name="uWrap">Wrap mode for u coordinates.</param>
53         /// <param name="vWrap">Wrap mode for v coordinates.</param>
54         /// <since_tizen> 3 </since_tizen>
55         public void SetWrapMode(WrapModeType uWrap, WrapModeType vWrap)
56         {
57             Interop.Sampler.Sampler_SetWrapMode__SWIG_0(swigCPtr, (int)uWrap, (int)vWrap);
58             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59         }
60
61         /// <summary>
62         /// Sets the wrap modes for this sampler.
63         /// </summary>
64         /// <param name="rWrap">Wrap mode for the x direction.</param>
65         /// <param name="sWrap">Wrap mode for the y direction.</param>
66         /// <param name="tWrap">Wrap mode for the z direction.</param>
67         /// <since_tizen> 3 </since_tizen>
68         public void SetWrapMode(WrapModeType rWrap, WrapModeType sWrap, WrapModeType tWrap)
69         {
70             Interop.Sampler.Sampler_SetWrapMode__SWIG_1(swigCPtr, (int)rWrap, (int)sWrap, (int)tWrap);
71             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72         }
73
74         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Sampler obj)
75         {
76             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
77         }
78
79         internal Sampler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Sampler.Sampler_SWIGUpcast(cPtr), cMemoryOwn)
80         {
81         }
82
83         /// This will not be public opened.
84         [EditorBrowsable(EditorBrowsableState.Never)]
85         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
86         {
87             Interop.Sampler.delete_Sampler(swigCPtr);
88         }
89     }
90 }