Class GValue
Wrap GValue in a C# class.
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class GValue : IDisposable
Remarks
This class wraps GValue in a convenient interface. You can use instances of this class to get and set GObject properties.
On construction, GValue is all zero (empty). You can pass it to a get function to have it filled by GObject, or use init to set a type, set to set a value, then use it to set an object property.
GValue lifetime is managed automatically.
Constructors
GValue()
Initializes a new instance of the GValue class.
Declaration
public GValue()
Fields
ArrayDoubleType
The fundamental type for VipsArrayDouble.
Declaration
public static readonly nint ArrayDoubleType
Field Value
Type | Description |
---|---|
nint |
ArrayImageType
The fundamental type for VipsArrayImage.
Declaration
public static readonly nint ArrayImageType
Field Value
Type | Description |
---|---|
nint |
ArrayIntType
The fundamental type for VipsArrayInt.
Declaration
public static readonly nint ArrayIntType
Field Value
Type | Description |
---|---|
nint |
BlendModeType
The fundamental type for VipsBlendMode. See Enums.BlendMode.
Declaration
public static readonly nint BlendModeType
Field Value
Type | Description |
---|---|
nint |
BlobType
The fundamental type for VipsBlob.
Declaration
public static readonly nint BlobType
Field Value
Type | Description |
---|---|
nint |
GBoolType
The fundamental type corresponding to gboolean.
Declaration
public static readonly nint GBoolType
Field Value
Type | Description |
---|---|
nint |
GDoubleType
The fundamental type corresponding to gdouble.
Declaration
public static readonly nint GDoubleType
Field Value
Type | Description |
---|---|
nint |
GEnumType
The fundamental type from which all enumeration types are derived.
Declaration
public static readonly nint GEnumType
Field Value
Type | Description |
---|---|
nint |
GFlagsType
The fundamental type from which all flags types are derived.
Declaration
public static readonly nint GFlagsType
Field Value
Type | Description |
---|---|
nint |
GIntType
The fundamental type corresponding to gint.
Declaration
public static readonly nint GIntType
Field Value
Type | Description |
---|---|
nint |
GObjectType
The fundamental type for GObject.
Declaration
public static readonly nint GObjectType
Field Value
Type | Description |
---|---|
nint |
GStrType
The fundamental type corresponding to null-terminated C strings.
Declaration
public static readonly nint GStrType
Field Value
Type | Description |
---|---|
nint |
GUint64Type
The fundamental type corresponding to guint64.
Declaration
public static readonly nint GUint64Type
Field Value
Type | Description |
---|---|
nint |
ImageType
The fundamental type for VipsImage.
Declaration
public static readonly nint ImageType
Field Value
Type | Description |
---|---|
nint |
RefStrType
The fundamental type for VipsRefString.
Declaration
public static readonly nint RefStrType
Field Value
Type | Description |
---|---|
nint |
SourceType
The fundamental type for VipsSource. See Source.
Declaration
public static readonly nint SourceType
Field Value
Type | Description |
---|---|
nint |
TargetType
The fundamental type for VipsTarget. See Target.
Declaration
public static readonly nint TargetType
Field Value
Type | Description |
---|---|
nint |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
~GValue()
Finalizes an instance of the GValue class.
Declaration
protected ~GValue()
Remarks
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Get()
Get the contents of a GValue.
Declaration
public object Get()
Returns
Type | Description |
---|---|
object | The contents of this GValue. |
Remarks
The contents of the GValue are read out as a C# type.
GetTypeOf()
Get the GType of this GValue.
Declaration
public nint GetTypeOf()
Returns
Type | Description |
---|---|
nint | The GType of this GValue. |
Set(object)
Set a GValue.
Declaration
public void Set(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value | Value to be set. |
Remarks
The value is converted to the type of the GValue, if possible, and assigned.
SetType(nint)
Set the type of a GValue.
Declaration
public void SetType(nint gtype)
Parameters
Type | Name | Description |
---|---|---|
nint | gtype | Type the GValue should hold values of. |
Remarks
GValues have a set type, fixed at creation time. Use SetType to set the type of a GValue before assigning to it.
GTypes are 32 or 64-bit integers (depending on the platform). See TypeFind.