Class GObject
Manage NetVips.Internal.GObject lifetime.
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class GObject : SafeHandle, IDisposable
Properties
IsInvalid
Gets a value indicating whether the handle is invalid.
Declaration
public override bool IsInvalid { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
ReleaseHandle()
Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).
Declaration
protected override bool ReleaseHandle()
Returns
| Type | Description |
|---|---|
| bool | true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. |
Overrides
SignalConnect<T>(string, T, nint)
Connects a callback function (callback) to a signal on this object.
Declaration
public ulong SignalConnect<T>(string detailedSignal, T callback, nint data = 0) where T : notnull
Parameters
| Type | Name | Description |
|---|---|---|
| string | detailedSignal | A string of the form "signal-name::detail". |
| T | callback | The callback to connect. |
| nint | data | Data to pass to handler calls. |
Returns
| Type | Description |
|---|---|
| ulong | The handler id. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the callback to connect. |
Remarks
The callback will be triggered every time this signal is issued on this instance.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If it failed to connect the signal. |
SignalHandlerDisconnect(ulong)
Disconnects a handler from this object.
Declaration
public void SignalHandlerDisconnect(ulong handlerId)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | handlerId | Handler id of the handler to be disconnected. |
Remarks
If the handlerId is 0 then this function does nothing.
SignalHandlersDisconnectByData(nint)
Disconnects all handlers from this object that match data.
Declaration
public uint SignalHandlersDisconnectByData(nint data)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | data | The data of the handlers. |
Returns
| Type | Description |
|---|---|
| uint | The number of handlers that matched. |
SignalHandlersDisconnectByFunc<T>(T, nint)
Disconnects all handlers from this object that match func and
data.
Declaration
public uint SignalHandlersDisconnectByFunc<T>(T func, nint data = 0) where T : notnull
Parameters
| Type | Name | Description |
|---|---|---|
| T | func | The func of the handlers. |
| nint | data | The data of the handlers. |
Returns
| Type | Description |
|---|---|
| uint | The number of handlers that matched. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the func. |