Class GValue
Wrap NetVips.Internal.GValue in a C# class.
Inheritance
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class GValue : IDisposable
Remarks
This class wraps NetVips.Internal.GValue in a convenient interface. You can use instances of this class to get and set GObject properties.
On construction, NetVips.Internal.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
| Improve this Doc View SourceGValue()
Initializes a new instance of the GValue class.
Declaration
public GValue()
Fields
| Improve this Doc View SourceArrayDoubleType
The fundamental type for VipsArrayDouble.
Declaration
public static readonly IntPtr ArrayDoubleType
Field Value
Type | Description |
---|---|
System.IntPtr |
ArrayImageType
The fundamental type for VipsArrayImage.
Declaration
public static readonly IntPtr ArrayImageType
Field Value
Type | Description |
---|---|
System.IntPtr |
ArrayIntType
The fundamental type for VipsArrayInt.
Declaration
public static readonly IntPtr ArrayIntType
Field Value
Type | Description |
---|---|
System.IntPtr |
BandFormatType
The fundamental type for VipsBandFormat. See Enums.BandFormat.
Declaration
public static readonly IntPtr BandFormatType
Field Value
Type | Description |
---|---|
System.IntPtr |
BlendModeType
The fundamental type for VipsBlendMode. See Enums.BlendMode.
Declaration
public static readonly IntPtr BlendModeType
Field Value
Type | Description |
---|---|
System.IntPtr |
BlobType
The fundamental type for VipsBlob.
Declaration
public static readonly IntPtr BlobType
Field Value
Type | Description |
---|---|
System.IntPtr |
GBoolType
The fundamental type corresponding to gboolean.
Declaration
public static readonly IntPtr GBoolType
Field Value
Type | Description |
---|---|
System.IntPtr |
GDoubleType
The fundamental type corresponding to gdouble.
Declaration
public static readonly IntPtr GDoubleType
Field Value
Type | Description |
---|---|
System.IntPtr |
GEnumType
The fundamental type from which all enumeration types are derived.
Declaration
public static readonly IntPtr GEnumType
Field Value
Type | Description |
---|---|
System.IntPtr |
GFlagsType
The fundamental type from which all flags types are derived.
Declaration
public static readonly IntPtr GFlagsType
Field Value
Type | Description |
---|---|
System.IntPtr |
GIntType
The fundamental type corresponding to gint.
Declaration
public static readonly IntPtr GIntType
Field Value
Type | Description |
---|---|
System.IntPtr |
GObjectType
The fundamental type for GObject.
Declaration
public static readonly IntPtr GObjectType
Field Value
Type | Description |
---|---|
System.IntPtr |
GStrType
The fundamental type corresponding to null-terminated C strings.
Declaration
public static readonly IntPtr GStrType
Field Value
Type | Description |
---|---|
System.IntPtr |
GUint64Type
The fundamental type corresponding to guint64.
Declaration
public static readonly IntPtr GUint64Type
Field Value
Type | Description |
---|---|
System.IntPtr |
ImageType
The fundamental type for VipsImage.
Declaration
public static readonly IntPtr ImageType
Field Value
Type | Description |
---|---|
System.IntPtr |
RefStrType
The fundamental type for VipsRefString.
Declaration
public static readonly IntPtr RefStrType
Field Value
Type | Description |
---|---|
System.IntPtr |
SourceType
The fundamental type for VipsSource. See Source.
Declaration
public static readonly IntPtr SourceType
Field Value
Type | Description |
---|---|
System.IntPtr |
TargetType
The fundamental type for VipsTarget. See Target.
Declaration
public static readonly IntPtr TargetType
Field Value
Type | Description |
---|---|
System.IntPtr |
Methods
| Improve this Doc View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Finalize()
Finalizes an instance of the GValue class.
Declaration
protected void Finalize()
Remarks
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
FromEnum(IntPtr, Int32)
Turn an int back into an enum string.
Declaration
public static string FromEnum(IntPtr gtype, int enumValue)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | gtype | The GType. |
System.Int32 | enumValue | The integer to convert. |
Returns
Type | Description |
---|---|
System.String | An enum value as string. |
Get()
Get the contents of a GValue.
Declaration
public object Get()
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.IntPtr | The GType of this GValue. |
Set(Object)
Set a GValue.
Declaration
public void Set(object value)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.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.
ToEnum(IntPtr, Object)
Turn a string or integer into an enum value ready to be passed into libvips.
Declaration
public static int ToEnum(IntPtr gtype, object value)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | gtype | The GType. |
System.Object | value | The string or integer to convert. |
Returns
Type | Description |
---|---|
System.Int32 | An enum value ready to be passed into libvips. |