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();
59 internal uint GetPropertyCount() {
60 uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr);
61 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 public string GetPropertyName(int index) {
66 string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index);
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 public int GetPropertyIndex(string name) {
72 int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name);
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 public bool IsPropertyWritable(int index) {
78 bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index);
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 public bool IsPropertyAnimatable(int index) {
84 bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index);
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 public Property.Type GetPropertyType(int index) {
90 Property.Type ret = (Property.Type)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index);
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 public void SetProperty(int index, Property.Value propertyValue)
97 Dali.Object.SetProperty( swigCPtr, index, propertyValue );
100 public int RegisterProperty(string name, Property.Value propertyValue) {
101 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, Property.Value.getCPtr(propertyValue));
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 public int RegisterProperty(string name, Property.Value propertyValue, Property.AccessMode accessMode) {
107 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, Property.Value.getCPtr(propertyValue), (int)accessMode);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112 public Property.Value GetProperty(int index)
114 Property.Value ret = Dali.Object.GetProperty( swigCPtr, index );
118 internal PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) {
119 PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true);
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 internal PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) {
125 PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true);
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130 internal void RemovePropertyNotification(PropertyNotification propertyNotification) {
131 NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification));
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 internal void RemovePropertyNotifications() {
136 NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 internal void RemoveConstraints() {
141 NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr);
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 internal void RemoveConstraints(uint tag) {
146 NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 public enum Capability {
151 DYNAMIC_PROPERTIES = 0x01