Separate C# classes into Internal and Public
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / public / Animatable.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
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
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 *
15 */
16
17 namespace Dali {
18
19 public class Animatable : BaseHandle {
20   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21
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);
24   }
25
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;
28   }
29
30   ~Animatable() {
31     DisposeQueue.Instance.Add(this);
32   }
33
34   public override void Dispose() {
35     if (!Window.IsInstalled()) {
36       DisposeQueue.Instance.Add(this);
37       return;
38     }
39
40     lock(this) {
41       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42         if (swigCMemOwn) {
43           swigCMemOwn = false;
44           NDalicPINVOKE.delete_Handle(swigCPtr);
45         }
46         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47       }
48       global::System.GC.SuppressFinalize(this);
49       base.Dispose();
50     }
51   }
52
53
54   public Animatable () : this (NDalicPINVOKE.Handle_New(), true) {
55       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56
57   }
58
59   internal uint GetPropertyCount() {
60     uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr);
61     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62     return ret;
63   }
64
65   public string GetPropertyName(int index) {
66     string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index);
67     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68     return ret;
69   }
70
71   public int GetPropertyIndex(string name) {
72     int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name);
73     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74     return ret;
75   }
76
77   public bool IsPropertyWritable(int index) {
78     bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index);
79     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80     return ret;
81   }
82
83   public bool IsPropertyAnimatable(int index) {
84     bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index);
85     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86     return ret;
87   }
88
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();
92     return ret;
93   }
94
95   public void SetProperty(int index, Property.Value propertyValue)
96   {
97     Dali.Object.SetProperty( swigCPtr, index, propertyValue );
98   }
99
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();
103     return ret;
104   }
105
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();
109     return ret;
110   }
111
112   public Property.Value GetProperty(int index)
113   {
114     Property.Value ret = Dali.Object.GetProperty( swigCPtr, index );
115     return ret;
116   }
117
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();
121     return ret;
122   }
123
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();
127     return ret;
128   }
129
130   internal void RemovePropertyNotification(PropertyNotification propertyNotification) {
131     NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification));
132     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133   }
134
135   internal void RemovePropertyNotifications() {
136     NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr);
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   internal void RemoveConstraints() {
141     NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr);
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143   }
144
145   internal void RemoveConstraints(uint tag) {
146     NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag);
147     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148   }
149
150   public enum Capability {
151     DYNAMIC_PROPERTIES = 0x01
152   }
153
154 }
155
156 }