1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
20 /// A condition that can be evaluated on a Property Value
22 public class PropertyCondition : BaseHandle
24 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26 internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn)
28 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj)
33 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 protected override void Dispose(DisposeTypes type)
43 if (type == DisposeTypes.Explicit)
46 //Release your own managed resources here.
47 //You should release all of your own disposable objects here.
51 //Release your own unmanaged resources here.
52 //You should not access any managed member here except static instance.
53 //because the execution order of Finalizes is non-deterministic.
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 NDalicPINVOKE.delete_PropertyCondition(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69 /// Create a property condition instance.
71 /// <since_tizen> 4 </since_tizen>
72 public PropertyCondition() : this(NDalicPINVOKE.new_PropertyCondition__SWIG_0(), true)
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 /// Retrieves the arguments that this condition uses.
80 /// <since_tizen> 4 </since_tizen>
81 public uint GetArgumentCount()
83 uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 /// Retrieves the arguments that this condition uses
90 ///<since_tizen> 4 </since_tizen>
91 public float GetArgument(uint index)
93 float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index);
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 /// LessThan condition compares whether property is less than arg.
101 ///<since_tizen> 4 </since_tizen>
102 public static PropertyCondition LessThan(float arg)
104 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true);
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 /// GreaterThan condition compares whether property is greater than arg.
112 ///<since_tizen> 4 </since_tizen>
113 public static PropertyCondition GreaterThan(float arg)
115 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 /// Inside condition compares whether property is greater than arg0 and less than arg1.
123 ///<since_tizen> 4 </since_tizen>
124 public static PropertyCondition Inside(float arg0, float arg1)
126 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true);
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 /// Outside condition compares whether property is less than arg0 or greater than arg1
134 ///<since_tizen> 4 </since_tizen>
135 public static PropertyCondition Outside(float arg0, float arg1)
137 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true);
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 /// Detects when a property changes by stepAmount from initialValue, in both positive and negative directions. This will continue checking for multiples of stepAmount.
145 ///<since_tizen> 4 </since_tizen>
146 public static PropertyCondition Step(float stepAmount, float initialValue)
148 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true);
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 /// Receives notifications as a property goes above/below the inputted values. Values must be ordered and can be either ascending or descending.
156 ///<since_tizen> 4 </since_tizen>
157 public static PropertyCondition Step(float stepAmount)
159 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true);
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();