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;
29 /// Create a property condition instance.
31 /// <since_tizen> 4 </since_tizen>
32 public PropertyCondition() : this(Interop.PropertyCondition.new_PropertyCondition__SWIG_0(), true)
34 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
37 internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.PropertyCondition.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn)
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
43 /// Retrieves the arguments that this condition uses.
45 /// <returns>The arguments used for this condition.</returns>
46 /// <since_tizen> 4 </since_tizen>
47 public uint GetArgumentCount()
49 uint ret = Interop.PropertyCondition.PropertyCondition_GetArgumentCount(swigCPtr);
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 /// Retrieves the arguments that this condition uses
57 /// <param name="index">The condition index to get the argument.</param>
58 /// <returns>The arguments used for this condition.</returns>
59 /// <since_tizen> 4 </since_tizen>
60 public float GetArgument(uint index)
62 float ret = Interop.PropertyCondition.PropertyCondition_GetArgument(swigCPtr, index);
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 /// LessThan condition compares whether property is less than arg.
70 /// <param name="arg">The argument for the condition.</param>
71 /// <returns>A property condition function object.</returns>
72 /// <since_tizen> 4 </since_tizen>
73 public static PropertyCondition LessThan(float arg)
75 PropertyCondition ret = new PropertyCondition(Interop.PropertyCondition.LessThanCondition(arg), true);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 /// GreaterThan condition compares whether property is greater than arg.
83 /// <param name="arg">The argument for the condition.</param>
84 /// <returns>A property condition function object.</returns>
85 /// <since_tizen> 4 </since_tizen>
86 public static PropertyCondition GreaterThan(float arg)
88 PropertyCondition ret = new PropertyCondition(Interop.PropertyCondition.GreaterThanCondition(arg), true);
89 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 /// Inside condition compares whether property is greater than arg0 and less than arg1.
96 /// <param name="arg0">The first argument for the condition.</param>
97 /// <param name="arg1">The second argument for the condition.</param>
98 /// <returns>A property condition function object.</returns>
99 /// <since_tizen> 4 </since_tizen>
100 public static PropertyCondition Inside(float arg0, float arg1)
102 PropertyCondition ret = new PropertyCondition(Interop.PropertyCondition.InsideCondition(arg0, arg1), true);
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 /// Outside condition compares whether property is less than arg0 or greater than arg1
110 /// <param name="arg0">The first argument for the condition.</param>
111 /// <param name="arg1">The second argument for the condition.</param>
112 /// <returns>A property condition function object.</returns>
113 /// <since_tizen> 4 </since_tizen>
114 public static PropertyCondition Outside(float arg0, float arg1)
116 PropertyCondition ret = new PropertyCondition(Interop.PropertyCondition.OutsideCondition(arg0, arg1), true);
117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 /// Detects when a property changes by stepAmount from initialValue, in both positive and negative directions. This will continue checking for multiples of stepAmount.
124 /// <param name="stepAmount">The step size required to trigger condition.</param>
125 /// <param name="initialValue">The initial value to step from.</param>
126 /// <returns>A property condition function object.</returns>
127 /// <since_tizen> 4 </since_tizen>
128 public static PropertyCondition Step(float stepAmount, float initialValue)
130 PropertyCondition ret = new PropertyCondition(Interop.PropertyCondition.StepCondition__SWIG_0(stepAmount, initialValue), true);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 /// Receives notifications as a property goes above/below the inputted values. Values must be ordered and can be either ascending or descending.
138 /// <param name="stepAmount">List of values to receive notifications for as a property crosses them.</param>
139 /// <returns>A property condition function object.</returns>
140 /// <since_tizen> 4 </since_tizen>
141 public static PropertyCondition Step(float stepAmount)
143 PropertyCondition ret = new PropertyCondition(Interop.PropertyCondition.StepCondition__SWIG_1(stepAmount), true);
144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj)
150 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
156 /// <since_tizen> 4 </since_tizen>
157 protected override void Dispose(DisposeTypes type)
164 //Release your own unmanaged resources here.
165 //You should not access any managed member here except static instance.
166 //because the execution order of Finalizes is non-deterministic.
168 if (swigCPtr.Handle != global::System.IntPtr.Zero)
173 Interop.PropertyCondition.delete_PropertyCondition(swigCPtr);
175 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);