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 /// <since_tizen> 4 </since_tizen>
86 public uint GetArgumentCount()
88 uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr);
89 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93 /// Retrieves the arguments that this condition uses
95 ///<since_tizen> 4 </since_tizen>
96 public float GetArgument(uint index)
98 float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index);
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 /// LessThan condition compares whether property is less than arg.
106 ///<since_tizen> 4 </since_tizen>
107 public static PropertyCondition LessThan(float arg)
109 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115 /// GreaterThan condition compares whether property is greater than arg.
117 ///<since_tizen> 4 </since_tizen>
118 public static PropertyCondition GreaterThan(float arg)
120 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true);
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 /// Inside condition compares whether property is greater than arg0 and less than arg1.
128 ///<since_tizen> 4 </since_tizen>
129 public static PropertyCondition Inside(float arg0, float arg1)
131 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true);
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137 /// Outside condition compares whether property is less than arg0 or greater than arg1
139 ///<since_tizen> 4 </since_tizen>
140 public static PropertyCondition Outside(float arg0, float arg1)
142 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true);
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148 /// Detects when a property changes by stepAmount from initialValue, in both positive and negative directions. This will continue checking for multiples of stepAmount.
150 ///<since_tizen> 4 </since_tizen>
151 public static PropertyCondition Step(float stepAmount, float initialValue)
153 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true);
154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 /// Receives notifications as a property goes above/below the inputted values. Values must be ordered and can be either ascending or descending.
161 ///<since_tizen> 4 </since_tizen>
162 public static PropertyCondition Step(float stepAmount)
164 PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true);
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();