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 public class PropertyCondition : BaseHandle
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27 internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn)
29 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
40 /// <since_tizen> 3 </since_tizen>
41 protected override void Dispose(DisposeTypes type)
48 if (type == DisposeTypes.Explicit)
51 //Release your own managed resources here.
52 //You should release all of your own disposable objects here.
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.
60 if (swigCPtr.Handle != global::System.IntPtr.Zero)
65 NDalicPINVOKE.delete_PropertyCondition(swigCPtr);
67 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
74 /// Create a property condition instance.
76 /// <since_tizen> 4 </since_tizen>
77 public PropertyCondition() : this(NDalicPINVOKE.new_PropertyCondition__SWIG_0(), true)
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 /// Retrieves the arguments that this condition uses.
85 /// <returns>The arguments used for this condition.</returns>
86 /// <since_tizen> 4 </since_tizen>
87 public uint GetArgumentCount()
89 uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 /// Retrieves the arguments that this condition uses
96 /// <param name="index">The condition index to get the argument.</param>
97 /// <returns>The arguments used for this condition.</returns>
98 /// <since_tizen> 4 </since_tizen>
99 public float GetArgument(uint index)
101 float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 /// LessThan condition compares whether property is less than arg.
109 /// <param name="arg">The argument for the condition.</param>
110 /// <returns>A property condition function object.</returns>
111 /// <since_tizen> 4 </since_tizen>
112 public static PropertyCondition LessThan(float arg)
114 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true);
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 /// GreaterThan condition compares whether property is greater than arg.
122 /// <param name="arg">The argument for the condition.</param>
123 /// <returns>A property condition function object.</returns>
124 /// <since_tizen> 4 </since_tizen>
125 public static PropertyCondition GreaterThan(float arg)
127 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true);
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 /// Inside condition compares whether property is greater than arg0 and less than arg1.
135 /// <param name="arg0">The first argument for the condition.</param>
136 /// <param name="arg1">The second argument for the condition.</param>
137 /// <returns>A property condition function object.</returns>
138 /// <since_tizen> 4 </since_tizen>
139 public static PropertyCondition Inside(float arg0, float arg1)
141 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true);
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 /// Outside condition compares whether property is less than arg0 or greater than arg1
149 /// <param name="arg0">The first argument for the condition.</param>
150 /// <param name="arg1">The second argument for the condition.</param>
151 /// <returns>A property condition function object.</returns>
152 /// <since_tizen> 4 </since_tizen>
153 public static PropertyCondition Outside(float arg0, float arg1)
155 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true);
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 /// Detects when a property changes by stepAmount from initialValue, in both positive and negative directions. This will continue checking for multiples of stepAmount.
163 /// <param name="stepAmount">The step size required to trigger condition.</param>
164 /// <param name="initialValue">The initial value to step from.</param>
165 /// <returns>A property condition function object.</returns>
166 /// <since_tizen> 4 </since_tizen>
167 public static PropertyCondition Step(float stepAmount, float initialValue)
169 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 /// Receives notifications as a property goes above/below the inputted values. Values must be ordered and can be either ascending or descending.
177 /// <param name="stepAmount">List of values to receive notifications for as a property crosses them.</param>
178 /// <returns>A property condition function object.</returns>
179 /// <since_tizen> 4 </since_tizen>
180 public static PropertyCondition Step(float stepAmount)
182 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();