internal static T Create <T>(ObjectSafeHandle handle) where T : NdapiObject { var objectType = typeof(T); if (objectType == typeof(NdapiObject)) { ObjectType type; var status = NativeMethods.d2fobqt_QueryType(NdapiContext.GetContext(), handle, out type); Ensure.Success(status); if (type == ObjectType.Undefined) { return(null); } objectType = NdapiMetadata.ObjectTypeMapping[type]; } var instance = Activator.CreateInstance(objectType, BindingFlags.NonPublic | BindingFlags.Instance, null, new[] { handle }, null); return((T)instance); }
/// <summary> /// Creates a coordinate declaration /// </summary> public Coordinate() : base(ObjectType.Coordinate) { _handle = new ObjectSafeHandle(); var status = NativeMethods.d2fcrdcr_Create(NdapiContext.GetContext(), out _handle); Ensure.Success(status); }
internal NdapiModule(ObjectSafeHandle handle) : base(handle) { NdapiContext.AddModule(this); }
internal NdapiObject(ObjectSafeHandle handle) : this() { _handle = handle; }
internal AttachedLibrary(ObjectSafeHandle handle) : base(handle) { }
internal ObjectLibrary(ObjectSafeHandle handle) : base(handle) { }
internal Menu(ObjectSafeHandle handle) : base(handle) { }
internal FormParameter(ObjectSafeHandle handle) : base(handle) { }
internal Canvas(ObjectSafeHandle handle) : base(handle) { }
internal static extern FutureSafeHandle qi_object_set_property(ObjectSafeHandle qiObj, string propName, ValueSafeHandle value);
public QiObject() { this._handle = ObjectNative.qi_object_create(); }
internal static extern IntPtr qi_object_signal_connect( ObjectSafeHandle qiObj, string signature, ApiSignalCallback cb, IntPtr userdata );
internal static extern IntPtr qi_object_signal_disconnect(ObjectSafeHandle qiObj, ulong id);
internal static extern int qi_object_post(ObjectSafeHandle qiObj, string signature, IntPtr qiTuple);
internal static extern FutureSafeHandle qi_object_call(ObjectSafeHandle qiObj, string signature, ValueSafeHandle qiTuple);
internal static extern ValueSafeHandle qi_object_get_metaobject(ObjectSafeHandle qiObj);
internal Editor(ObjectSafeHandle handle) : base(handle) { }
internal QiObject(ObjectSafeHandle handle) { this._handle = handle; }
internal TabPage(ObjectSafeHandle handle) : base(handle) { }
internal Trigger(ObjectSafeHandle handle) : base(handle) { }
internal Point(ObjectSafeHandle handle) : base(handle) { }
internal FormModule(ObjectSafeHandle handle) : base(handle) { }
internal LibraryProgramUnit(ObjectSafeHandle handle) : base(handle) { }
internal DataSourceArgument(ObjectSafeHandle handle) : base(handle) { }
internal LibraryModule(ObjectSafeHandle handle) : base(handle) { }
internal TextSegment(ObjectSafeHandle handle) : base(handle) { }
internal LOV(ObjectSafeHandle handle) : base(handle) { }
internal DataSourceColumn(ObjectSafeHandle handle) : base(handle) { }
internal Window(ObjectSafeHandle handle) : base(handle) { }
internal CompoundText(ObjectSafeHandle handle) : base(handle) { }