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.
21 /// A condition that can be evaluated on a Property Value
23 /// <since_tizen> 4 </since_tizen>
24 public class PropertyCondition : BaseHandle
26 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
28 internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn)
30 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj)
35 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 /// <since_tizen> 4 </since_tizen>
42 protected override void Dispose(DisposeTypes type)
49 if (type == DisposeTypes.Explicit)
52 //Release your own managed resources here.
53 //You should release all of your own disposable objects here.
57 //Release your own unmanaged resources here.
58 //You should not access any managed member here except static instance.
59 //because the execution order of Finalizes is non-deterministic.
61 if (swigCPtr.Handle != global::System.IntPtr.Zero)
66 NDalicPINVOKE.delete_PropertyCondition(swigCPtr);
68 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
75 /// Create a property condition instance.
77 /// <since_tizen> 4 </since_tizen>
78 public PropertyCondition() : this(NDalicPINVOKE.new_PropertyCondition__SWIG_0(), true)
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 /// Retrieves the arguments that this condition uses.
86 /// <returns>The arguments used for this condition.</returns>
87 /// <since_tizen> 4 </since_tizen>
88 public uint GetArgumentCount()
90 uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr);
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 /// Retrieves the arguments that this condition uses
97 /// <param name="index">The condition index to get the argument.</param>
98 /// <returns>The arguments used for this condition.</returns>
99 /// <since_tizen> 4 </since_tizen>
100 public float GetArgument(uint index)
102 float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index);
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 /// LessThan condition compares whether property is less than arg.
110 /// <param name="arg">The argument for the condition.</param>
111 /// <returns>A property condition function object.</returns>
112 /// <since_tizen> 4 </since_tizen>
113 public static PropertyCondition LessThan(float arg)
115 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 /// GreaterThan condition compares whether property is greater than arg.
123 /// <param name="arg">The argument for the condition.</param>
124 /// <returns>A property condition function object.</returns>
125 /// <since_tizen> 4 </since_tizen>
126 public static PropertyCondition GreaterThan(float arg)
128 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true);
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134 /// Inside condition compares whether property is greater than arg0 and less than arg1.
136 /// <param name="arg0">The first argument for the condition.</param>
137 /// <param name="arg1">The second argument for the condition.</param>
138 /// <returns>A property condition function object.</returns>
139 /// <since_tizen> 4 </since_tizen>
140 public static PropertyCondition Inside(float arg0, float arg1)
142 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true);
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148 /// Outside condition compares whether property is less than arg0 or greater than arg1
150 /// <param name="arg0">The first argument for the condition.</param>
151 /// <param name="arg1">The second argument for the condition.</param>
152 /// <returns>A property condition function object.</returns>
153 /// <since_tizen> 4 </since_tizen>
154 public static PropertyCondition Outside(float arg0, float arg1)
156 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162 /// Detects when a property changes by stepAmount from initialValue, in both positive and negative directions. This will continue checking for multiples of stepAmount.
164 /// <param name="stepAmount">The step size required to trigger condition.</param>
165 /// <param name="initialValue">The initial value to step from.</param>
166 /// <returns>A property condition function object.</returns>
167 /// <since_tizen> 4 </since_tizen>
168 public static PropertyCondition Step(float stepAmount, float initialValue)
170 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true);
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 /// Receives notifications as a property goes above/below the inputted values. Values must be ordered and can be either ascending or descending.
178 /// <param name="stepAmount">List of values to receive notifications for as a property crosses them.</param>
179 /// <returns>A property condition function object.</returns>
180 /// <since_tizen> 4 </since_tizen>
181 public static PropertyCondition Step(float stepAmount)
183 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();