Table of Contents

Class CharsetConverter

Namespace
Gio
Assembly
Gio-2.0.dll
public class CharsetConverter : Object, Converter, Initable, NativeObject, IDisposable, GTypeProvider, InstanceFactory
Inheritance
CharsetConverter
Implements
Inherited Members

Constructors

CharsetConverter(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public CharsetConverter(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

CharsetConverter(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected CharsetConverter(CreationData data)

Parameters

data CreationData

CharsetConverter(CharsetConverterHandle)

protected CharsetConverter(CharsetConverterHandle handle)

Parameters

handle CharsetConverterHandle

Fields

FromCharsetPropertyDefinition

public static readonly Property<string?, CharsetConverter> FromCharsetPropertyDefinition

Field Value

Property<string, CharsetConverter>

ToCharsetPropertyDefinition

public static readonly Property<string?, CharsetConverter> ToCharsetPropertyDefinition

Field Value

Property<string, CharsetConverter>

UseFallbackPropertyDefinition

public static readonly Property<bool, CharsetConverter> UseFallbackPropertyDefinition

Field Value

Property<bool, CharsetConverter>

Properties

FromCharset

public string? FromCharset { get; }

Property Value

string

ToCharset

public string? ToCharset { get; }

Property Value

string

UseFallback

public bool UseFallback { get; set; }

Property Value

bool

Methods

Convert(Span<byte>, Span<byte>, ConverterFlags, out nuint, out nuint)

[Version("2.24")]
public ConverterResult Convert(Span<byte> inbuf, Span<byte> outbuf, ConverterFlags flags, out nuint bytesRead, out nuint bytesWritten)

Parameters

inbuf Span<byte>
outbuf Span<byte>
flags ConverterFlags
bytesRead nuint
bytesWritten nuint

Returns

ConverterResult

ConvertBytes(Bytes)

[Version("2.82")]
public Bytes ConvertBytes(Bytes bytes)

Parameters

bytes Bytes

Returns

Bytes

GetGType()

public static Type GetGType()

Returns

Type

GetNumFallbacks()

[Version("2.24")]
public uint GetNumFallbacks()

Returns

uint

GetUseFallback()

[Version("2.24")]
public bool GetUseFallback()

Returns

bool

Init(Cancellable?)

[Version("2.22")]
public bool Init(Cancellable? cancellable)

Parameters

cancellable Cancellable

Returns

bool

New(string, string)

[Version("2.24")]
public static CharsetConverter New(string toCharset, string fromCharset)

Parameters

toCharset string
fromCharset string

Returns

CharsetConverter

NewFromPointer(nint, bool)

Creates a new managed CharsetConverter instance for a given pointer.

public static CharsetConverter NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

CharsetConverter

NewWithProperties(ConstructArgument[])

Creates a new CharsetConverter and sets the properties specified by the construct arguments.

public static CharsetConverter NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

CharsetConverter

Reset()

[Version("2.24")]
public void Reset()

SetUseFallback(bool)

[Version("2.24")]
public void SetUseFallback(bool useFallback)

Parameters

useFallback bool