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.
19 public class Animatable : BaseHandle {
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 internal Animatable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn) {
23 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animatable obj) {
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31 DisposeQueue.Instance.Add(this);
34 public override void Dispose() {
35 if (!Window.IsInstalled()) {
36 DisposeQueue.Instance.Add(this);
41 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
44 NDalicPINVOKE.delete_Handle(swigCPtr);
46 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
48 global::System.GC.SuppressFinalize(this);
54 public Animatable () : this (NDalicPINVOKE.Handle_New(), true) {
55 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58 public Animatable(Animatable handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Animatable.getCPtr(handle)), true) {
59 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62 public bool Supports(Animatable.Capability capability) {
63 bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability);
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 public uint GetPropertyCount() {
69 uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr);
70 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74 public string GetPropertyName(int index) {
75 string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 public int GetPropertyIndex(string name) {
81 int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name);
82 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 public bool IsPropertyWritable(int index) {
87 bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index);
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92 public bool IsPropertyAnimatable(int index) {
93 bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index);
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 public bool IsPropertyAConstraintInput(int index) {
99 bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 public Property.Type GetPropertyType(int index) {
105 Property.Type ret = (Property.Type)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index);
106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 public void SetProperty(int index, Property.Value propertyValue)
112 Dali.Object.SetProperty( swigCPtr, index, propertyValue );
115 public int RegisterProperty(string name, Property.Value propertyValue) {
116 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, Property.Value.getCPtr(propertyValue));
117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 public int RegisterProperty(string name, Property.Value propertyValue, Property.AccessMode accessMode) {
122 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, Property.Value.getCPtr(propertyValue), (int)accessMode);
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 public Property.Value GetProperty(int index)
129 Property.Value ret = Dali.Object.GetProperty( swigCPtr, index );
133 public void GetPropertyIndices(VectorInteger indices) {
134 NDalicPINVOKE.Handle_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices));
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 public PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) {
139 PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 public PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) {
145 PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true);
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 public void RemovePropertyNotification(PropertyNotification propertyNotification) {
151 NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification));
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public void RemovePropertyNotifications() {
156 NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 public void RemoveConstraints() {
161 NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr);
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public void RemoveConstraints(uint tag) {
166 NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170 public enum Capability {
171 DYNAMIC_PROPERTIES = 0x01