2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 /// TypeInfo class for instantiation of registered types and introspection of their actions and signals.
24 /// <since_tizen> 3 </since_tizen>
25 public class TypeInfo : BaseHandle
27 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29 internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TypeInfo_SWIGUpcast(cPtr), cMemoryOwn)
31 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeInfo obj)
36 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 /// <param name="type">The dispose type</param>
43 /// <since_tizen> 3 </since_tizen>
44 protected override void Dispose(DisposeTypes type)
51 if (type == DisposeTypes.Explicit)
54 //Release your own managed resources here.
55 //You should release all of your own disposable objects here.
59 //Release your own unmanaged resources here.
60 //You should not access any managed member here except static instance.
61 //because the execution order of Finalizes is non-deterministic.
63 if (swigCPtr.Handle != global::System.IntPtr.Zero)
68 NDalicPINVOKE.delete_TypeInfo(swigCPtr);
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
77 /// Creates TypeInfo object.
79 /// <since_tizen> 3 </since_tizen>
80 public TypeInfo() : this(NDalicPINVOKE.new_TypeInfo__SWIG_0(), true)
82 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 /// Creates TypeInfo object.
88 /// <param name="handle">This copy constructor is required for (smart) pointer semantics.</param>
89 /// <since_tizen> 3 </since_tizen>
90 public TypeInfo(TypeInfo handle) : this(NDalicPINVOKE.new_TypeInfo__SWIG_1(TypeInfo.getCPtr(handle)), true)
92 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96 /// Retrieves the type name for this type.
98 /// <returns>The string name.</returns>
99 /// <since_tizen> 3 </since_tizen>
100 public string GetName()
102 string ret = NDalicPINVOKE.TypeInfo_GetName(swigCPtr);
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 /// Retrieves the type name for this type.
110 /// <returns>The string name.</returns>
111 /// <since_tizen> 3 </since_tizen>
112 public string GetBaseName()
114 string ret = NDalicPINVOKE.TypeInfo_GetBaseName(swigCPtr);
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 /// Creates an object from this type.
122 /// <returns>The BaseHandle for the newly created object.</returns>
123 /// <since_tizen> 3 </since_tizen>
124 public BaseHandle CreateInstance()
126 BaseHandle ret = new BaseHandle(NDalicPINVOKE.TypeInfo_CreateInstance(swigCPtr), true);
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 /// Retrieves the number of event side type registered properties for this type.<br />
133 /// This count does not include all properties.
135 /// <returns>The count.</returns>
136 /// <since_tizen> 3 </since_tizen>
137 public uint GetPropertyCount()
139 uint ret = NDalicPINVOKE.TypeInfo_GetPropertyCount(swigCPtr);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 /// Given a property index, retrieve the property name associated with it.
147 /// <param name="index">The property index.</param>
148 /// <returns>The name of the property at the given index.</returns>
149 /// <since_tizen> 3 </since_tizen>
150 public string GetPropertyName(int index)
152 string ret = NDalicPINVOKE.TypeInfo_GetPropertyName(swigCPtr, index);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();