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.
17 using System.ComponentModel;
23 /// TypeInfo class for instantiation of registered types and introspection of their actions and signals.
25 /// <since_tizen> 3 </since_tizen>
26 public class TypeInfo : BaseHandle
30 /// Creates TypeInfo object.
32 /// <since_tizen> 3 </since_tizen>
33 public TypeInfo() : this(Interop.TypeInfo.NewTypeInfo(), true)
35 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39 /// Creates TypeInfo object.
41 /// <param name="handle">This copy constructor is required for (smart) pointer semantics.</param>
42 /// <since_tizen> 3 </since_tizen>
43 public TypeInfo(TypeInfo handle) : this(Interop.TypeInfo.NewTypeInfo(TypeInfo.getCPtr(handle)), true, false)
45 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48 internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
52 internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
57 /// Retrieves the type name for this type.
59 /// <returns>The string name.</returns>
60 /// <since_tizen> 3 </since_tizen>
61 public string GetName()
63 string ret = Interop.TypeInfo.GetName(SwigCPtr);
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 /// Retrieves the type name for this type.
71 /// <returns>The string name.</returns>
72 /// <since_tizen> 3 </since_tizen>
73 public string GetBaseName()
75 string ret = Interop.TypeInfo.GetBaseName(SwigCPtr);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 /// Creates an object from this type.
83 /// <returns>The BaseHandle for the newly created object.</returns>
84 /// <since_tizen> 3 </since_tizen>
85 public BaseHandle CreateInstance()
87 BaseHandle ret = new BaseHandle(Interop.TypeInfo.CreateInstance(SwigCPtr), true);
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93 /// Retrieves the number of event side type registered properties for this type.<br />
94 /// This count does not include all properties.
96 /// <returns>The count.</returns>
97 /// <since_tizen> 3 </since_tizen>
98 public uint GetPropertyCount()
100 uint ret = Interop.TypeInfo.GetPropertyCount(SwigCPtr);
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 /// Given a property index, retrieve the property name associated with it.
108 /// <param name="index">The property index.</param>
109 /// <returns>The name of the property at the given index.</returns>
110 /// <since_tizen> 3 </since_tizen>
111 public string GetPropertyName(int index)
113 string ret = Interop.TypeInfo.GetPropertyName(SwigCPtr, index);
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118 /// This will not be public opened.
119 [EditorBrowsable(EditorBrowsableState.Never)]
120 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
122 Interop.TypeInfo.DeleteTypeInfo(swigCPtr);