/* * Copyright(c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System.ComponentModel; namespace Tizen.NUI { /// /// TypeInfo class for instantiation of registered types and introspection of their actions and signals. /// /// 3 public class TypeInfo : BaseHandle { /// /// Creates TypeInfo object. /// /// 3 public TypeInfo() : this(Interop.TypeInfo.NewTypeInfo(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates TypeInfo object. /// /// This copy constructor is required for (smart) pointer semantics. /// 3 public TypeInfo(TypeInfo handle) : this(Interop.TypeInfo.NewTypeInfo(TypeInfo.getCPtr(handle)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TypeInfo.Upcast(cPtr), cMemoryOwn) { } /// /// Retrieves the type name for this type. /// /// The string name. /// 3 public string GetName() { string ret = Interop.TypeInfo.GetName(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the type name for this type. /// /// The string name. /// 3 public string GetBaseName() { string ret = Interop.TypeInfo.GetBaseName(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Creates an object from this type. /// /// The BaseHandle for the newly created object. /// 3 public BaseHandle CreateInstance() { BaseHandle ret = new BaseHandle(Interop.TypeInfo.CreateInstance(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the number of event side type registered properties for this type.
/// This count does not include all properties. ///
/// The count. /// 3 public uint GetPropertyCount() { uint ret = Interop.TypeInfo.GetPropertyCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Given a property index, retrieve the property name associated with it. /// /// The property index. /// The name of the property at the given index. /// 3 public string GetPropertyName(int index) { string ret = Interop.TypeInfo.GetPropertyName(swigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeInfo obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } /// This will not be public opened. [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.TypeInfo.DeleteTypeInfo(swigCPtr); } } }