Merge "Remove nui api reference warning."
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / PropertyCondition.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
18 namespace Tizen.NUI
19 {
20     /// <summary>
21     /// A condition that can be evaluated on a Property Value
22     /// </summary>
23     public class PropertyCondition : BaseHandle
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26
27         internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn)
28         {
29             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35         }
36
37         /// <summary>
38         /// Dispose.
39         /// </summary>
40         /// <since_tizen> 3 </since_tizen>
41         protected override void Dispose(DisposeTypes type)
42         {
43             if (disposed)
44             {
45                 return;
46             }
47
48             if (type == DisposeTypes.Explicit)
49             {
50                 //Called by User
51                 //Release your own managed resources here.
52                 //You should release all of your own disposable objects here.
53
54             }
55
56             //Release your own unmanaged resources here.
57             //You should not access any managed member here except static instance.
58             //because the execution order of Finalizes is non-deterministic.
59
60             if (swigCPtr.Handle != global::System.IntPtr.Zero)
61             {
62                 if (swigCMemOwn)
63                 {
64                     swigCMemOwn = false;
65                     NDalicPINVOKE.delete_PropertyCondition(swigCPtr);
66                 }
67                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
68             }
69
70             base.Dispose(type);
71         }
72
73         /// <summary>
74         /// Create a property condition instance.
75         /// </summary>
76         /// <since_tizen> 4 </since_tizen>
77         public PropertyCondition() : this(NDalicPINVOKE.new_PropertyCondition__SWIG_0(), true)
78         {
79             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80         }
81
82         /// <summary>
83         /// Retrieves the arguments that this condition uses.
84         /// </summary>
85         /// <since_tizen> 4 </since_tizen>
86         public uint GetArgumentCount()
87         {
88             uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr);
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90             return ret;
91         }
92         ///<summary>
93         /// Retrieves the arguments that this condition uses
94         ///</summary>
95         ///<since_tizen> 4 </since_tizen>
96         public float GetArgument(uint index)
97         {
98             float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index);
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100             return ret;
101         }
102
103         ///<summary>
104         /// LessThan condition compares whether property is less than arg.
105         ///</summary>
106         ///<since_tizen> 4 </since_tizen>
107         public static PropertyCondition LessThan(float arg)
108         {
109             PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true);
110             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111             return ret;
112         }
113
114         ///<summary>
115         /// GreaterThan condition compares whether property is greater than arg.
116         ///</summary>
117         ///<since_tizen> 4 </since_tizen>
118         public static PropertyCondition GreaterThan(float arg)
119         {
120             PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true);
121             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122             return ret;
123         }
124
125         ///<summary>
126         /// Inside condition compares whether property is greater than arg0 and less than arg1.
127         ///</summary>
128         ///<since_tizen> 4 </since_tizen>
129         public static PropertyCondition Inside(float arg0, float arg1)
130         {
131             PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true);
132             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133             return ret;
134         }
135
136         ///<summary>
137         /// Outside condition compares whether property is less than arg0 or greater than arg1
138         ///</summary>
139         ///<since_tizen> 4 </since_tizen>
140         public static PropertyCondition Outside(float arg0, float arg1)
141         {
142             PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true);
143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144             return ret;
145         }
146
147         ///<summary>
148         /// Detects when a property changes by stepAmount from initialValue, in both positive and negative directions. This will continue checking for multiples of stepAmount.
149         ///</summary>
150         ///<since_tizen> 4 </since_tizen>
151         public static PropertyCondition Step(float stepAmount, float initialValue)
152         {
153             PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true);
154             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155             return ret;
156         }
157
158         ///<summary>
159         /// Receives notifications as a property goes above/below the inputted values. Values must be ordered and can be either ascending or descending.
160         ///</summary>
161         ///<since_tizen> 4 </since_tizen>
162         public static PropertyCondition Step(float stepAmount)
163         {
164             PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true);
165             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166             return ret;
167         }
168
169     }
170
171 }