1067d54cc43d68c320d3c257d32fc5fc064b3eb9
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Handle.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 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 public class Handle : BaseHandle {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32   internal Handle(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn) {
33     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34   }
35
36   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Handle obj) {
37     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38   }
39
40   ~Handle() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public override void Dispose() {
45     if (!Stage.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_Handle(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59       base.Dispose();
60     }
61   }
62
63
64   public Handle () : this (NDalicPINVOKE.Handle_New(), true) {
65       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66
67   }
68   public Handle(Handle handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Handle.getCPtr(handle)), true) {
69     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70   }
71
72   public Handle Assign(Handle rhs) {
73     Handle ret = new Handle(NDalicPINVOKE.Handle_Assign(swigCPtr, Handle.getCPtr(rhs)), false);
74     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75     return ret;
76   }
77
78   public static Handle DownCast(BaseHandle handle) {
79     Handle ret = new Handle(NDalicPINVOKE.Handle_DownCast(BaseHandle.getCPtr(handle)), true);
80     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81     return ret;
82   }
83
84   public bool Supports(Handle.Capability capability) {
85     bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability);
86     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87     return ret;
88   }
89
90   public uint GetPropertyCount() {
91     uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr);
92     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93     return ret;
94   }
95
96   public string GetPropertyName(int index) {
97     string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index);
98     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99     return ret;
100   }
101
102   public int GetPropertyIndex(string name) {
103     int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name);
104     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105     return ret;
106   }
107
108   public bool IsPropertyWritable(int index) {
109     bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index);
110     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111     return ret;
112   }
113
114   public bool IsPropertyAnimatable(int index) {
115     bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index);
116     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117     return ret;
118   }
119
120   public bool IsPropertyAConstraintInput(int index) {
121     bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index);
122     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123     return ret;
124   }
125
126   public Property.Type GetPropertyType(int index) {
127     Property.Type ret = (Property.Type)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index);
128     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129     return ret;
130   }
131
132   public void SetProperty(int index, Property.Value propertyValue) {
133     NDalicPINVOKE.Handle_SetProperty(swigCPtr, index, Property.Value.getCPtr(propertyValue));
134     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135   }
136
137   public int RegisterProperty(string name, Property.Value propertyValue) {
138     int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, Property.Value.getCPtr(propertyValue));
139     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140     return ret;
141   }
142
143   public int RegisterProperty(string name, Property.Value propertyValue, Property.AccessMode accessMode) {
144     int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, Property.Value.getCPtr(propertyValue), (int)accessMode);
145     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146     return ret;
147   }
148
149   public Property.Value GetProperty(int index) {
150     Property.Value ret = new Property.Value(NDalicPINVOKE.Handle_GetProperty(swigCPtr, index), true);
151     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152     return ret;
153   }
154
155   public void GetPropertyIndices(VectorInteger indices) {
156     NDalicPINVOKE.Handle_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices));
157     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158   }
159
160   public PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) {
161     PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true);
162     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163     return ret;
164   }
165
166   public PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) {
167     PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true);
168     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169     return ret;
170   }
171
172   public void RemovePropertyNotification(PropertyNotification propertyNotification) {
173     NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification));
174     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175   }
176
177   public void RemovePropertyNotifications() {
178     NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr);
179     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180   }
181
182   public void RemoveConstraints() {
183     NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr);
184     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185   }
186
187   public void RemoveConstraints(uint tag) {
188     NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag);
189     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190   }
191
192   public enum Capability {
193     DYNAMIC_PROPERTIES = 0x01
194   }
195
196 }
197
198 }