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 IntPtr ArrayDoubleType
Field Value
Type | Description |
---|---|
IntPtr |
ArrayImageType
The fundamental type for VipsArrayImage.
Declaration
public static readonly IntPtr ArrayImageType
Field Value
Type | Description |
---|---|
IntPtr |
ArrayIntType
The fundamental type for VipsArrayInt.
Declaration
public static readonly IntPtr ArrayIntType
Field Value
Type | Description |
---|---|
IntPtr |
BandFormatType
The fundamental type for VipsBandFormat. See Enums.BandFormat.
Declaration
public static readonly IntPtr BandFormatType
Field Value
Type | Description |
---|---|
IntPtr |
BlendModeType
The fundamental type for VipsBlendMode. See Enums.BlendMode.
Declaration
public static readonly IntPtr BlendModeType
Field Value
Type | Description |
---|---|
IntPtr |
BlobType
The fundamental type for VipsBlob.
Declaration
public static readonly IntPtr BlobType
Field Value
Type | Description |
---|---|
IntPtr |
GBoolType
The fundamental type corresponding to gboolean.
Declaration
public static readonly IntPtr GBoolType
Field Value
Type | Description |
---|---|
IntPtr |
GDoubleType
The fundamental type corresponding to gdouble.
Declaration
public static readonly IntPtr GDoubleType
Field Value
Type | Description |
---|---|
IntPtr |
GEnumType
The fundamental type from which all enumeration types are derived.
Declaration
public static readonly IntPtr GEnumType
Field Value
Type | Description |
---|---|
IntPtr |
GFlagsType
The fundamental type from which all flags types are derived.
Declaration
public static readonly IntPtr GFlagsType
Field Value
Type | Description |
---|---|
IntPtr |
GIntType
The fundamental type corresponding to gint.
Declaration
public static readonly IntPtr GIntType
Field Value
Type | Description |
---|---|
IntPtr |
GObjectType
The fundamental type for GObject.
Declaration
public static readonly IntPtr GObjectType
Field Value
Type | Description |
---|---|
IntPtr |
GStrType
The fundamental type corresponding to null-terminated C strings.
Declaration
public static readonly IntPtr GStrType
Field Value
Type | Description |
---|---|
IntPtr |
GUint64Type
The fundamental type corresponding to guint64.
Declaration
public static readonly IntPtr GUint64Type
Field Value
Type | Description |
---|---|
IntPtr |
ImageType
The fundamental type for VipsImage.
Declaration
public static readonly IntPtr ImageType
Field Value
Type | Description |
---|---|
IntPtr |
RefStrType
The fundamental type for VipsRefString.
Declaration
public static readonly IntPtr RefStrType
Field Value
Type | Description |
---|---|
IntPtr |
SourceType
The fundamental type for VipsSource. See Source.
Declaration
public static readonly IntPtr SourceType
Field Value
Type | Description |
---|---|
IntPtr |
TargetType
The fundamental type for VipsTarget. See Target.
Declaration
public static readonly IntPtr TargetType
Field Value
Type | Description |
---|---|
IntPtr |
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 IntPtr GetTypeOf()
Returns
Type | Description |
---|---|
IntPtr | 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(IntPtr)
Set the type of a GValue.
Declaration
public void SetType(IntPtr gtype)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | 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.