1 /** Copyright (c) 2016 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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
29 public class Handle : BaseHandle {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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);
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;
44 public override void Dispose() {
46 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 NDalicPINVOKE.delete_Handle(swigCPtr);
51 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
53 global::System.GC.SuppressFinalize(this);
58 public Handle () : this (NDalicPINVOKE.Handle_New(), true) {
59 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62 public Handle(Handle handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Handle.getCPtr(handle)), true) {
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66 public Handle Assign(Handle rhs) {
67 Handle ret = new Handle(NDalicPINVOKE.Handle_Assign(swigCPtr, Handle.getCPtr(rhs)), false);
68 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 public static Handle DownCast(BaseHandle handle) {
73 Handle ret = new Handle(NDalicPINVOKE.Handle_DownCast(BaseHandle.getCPtr(handle)), true);
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 public bool Supports(Handle.Capability capability) {
79 bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability);
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 public uint GetPropertyCount() {
85 uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr);
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90 public string GetPropertyName(int index) {
91 string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index);
92 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96 public int GetPropertyIndex(string name) {
97 int ret = NDalicPINVOKE.Handle_GetPropertyIndex__SWIG_0(swigCPtr, name);
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102 public int GetPropertyIndex(int key) {
103 int ret = NDalicPINVOKE.Handle_GetPropertyIndex__SWIG_1(swigCPtr, key);
104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 public int GetPropertyIndex(Property.Key key) {
109 int ret = NDalicPINVOKE.Handle_GetPropertyIndex__SWIG_2(swigCPtr, Property.Key.getCPtr(key));
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 public bool IsPropertyWritable(int index) {
115 bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 public bool IsPropertyAnimatable(int index) {
121 bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index);
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 public bool IsPropertyAConstraintInput(int index) {
127 bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index);
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 public Property.Type GetPropertyType(int index) {
133 Property.Type ret = (Property.Type)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index);
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 public void SetProperty(int index, Property.Value propertyValue) {
139 NDalicPINVOKE.Handle_SetProperty(swigCPtr, index, Property.Value.getCPtr(propertyValue));
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 public int RegisterProperty(string name, Property.Value propertyValue) {
144 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, Property.Value.getCPtr(propertyValue));
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149 public int RegisterProperty(int key, string name, Property.Value propertyValue) {
150 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, key, name, Property.Value.getCPtr(propertyValue));
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public int RegisterProperty(string name, Property.Value propertyValue, Property.AccessMode accessMode) {
156 int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_2(swigCPtr, name, Property.Value.getCPtr(propertyValue), (int)accessMode);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public Property.Value GetProperty(int index) {
162 Property.Value ret = new Property.Value(NDalicPINVOKE.Handle_GetProperty(swigCPtr, index), true);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public void GetPropertyIndices(VectorInteger indices) {
168 NDalicPINVOKE.Handle_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices));
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) {
173 PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true);
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 public PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) {
179 PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true);
180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184 public void RemovePropertyNotification(PropertyNotification propertyNotification) {
185 NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification));
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189 public void RemovePropertyNotifications() {
190 NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr);
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public void RemoveConstraints() {
195 NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr);
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 public void RemoveConstraints(uint tag) {
200 NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 public enum Capability {
205 DYNAMIC_PROPERTIES = 0x01