Table of Contents

Class Bytes

Namespace
GLib.Internal
Assembly
GLib-2.0.dll
public class Bytes
Inheritance
Bytes
Inherited Members

Methods

Compare(BytesHandle, BytesHandle)

Calls native method g_bytes_compare. Version: 2.32

[Version("2.32")]
public static extern int Compare(BytesHandle bytes1, BytesHandle bytes2)

Parameters

bytes1 BytesHandle

Transfer ownership: None Nullable: False

bytes2 BytesHandle

Transfer ownership: None Nullable: False

Returns

int

Transfer ownership: None Nullable: False

Equal(BytesHandle, BytesHandle)

Calls native method g_bytes_equal. Version: 2.32

[Version("2.32")]
public static extern bool Equal(BytesHandle bytes1, BytesHandle bytes2)

Parameters

bytes1 BytesHandle

Transfer ownership: None Nullable: False

bytes2 BytesHandle

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

GetData(BytesHandle, out nuint)

Calls native method g_bytes_get_data. Version: 2.32

[Version("2.32")]
public static extern byte[] GetData(BytesHandle bytes, out nuint size)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: False

size nuint

Transfer ownership: Full Nullable: False

Returns

byte[]

Transfer ownership: None Nullable: True

GetGType()

Calls native function g_bytes_get_type.

public static extern nuint GetGType()

Returns

nuint

Transfer ownership: None Nullable: False

GetRegion(BytesHandle, nuint, nuint, nuint)

Calls native method g_bytes_get_region. Version: 2.70

[Version("2.70")]
public static extern IntPtr GetRegion(BytesHandle bytes, nuint elementSize, nuint offset, nuint nElements)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: False

elementSize nuint

Transfer ownership: None Nullable: False

offset nuint

Transfer ownership: None Nullable: False

nElements nuint

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: None Nullable: True

GetSize(BytesHandle)

Calls native method g_bytes_get_size. Version: 2.32

[Version("2.32")]
public static extern nuint GetSize(BytesHandle bytes)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: False

Returns

nuint

Transfer ownership: None Nullable: False

Hash(BytesHandle)

Calls native method g_bytes_hash. Version: 2.32

[Version("2.32")]
public static extern uint Hash(BytesHandle bytes)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: False

Returns

uint

Transfer ownership: None Nullable: False

New(ref byte, nuint)

Calls native constructor g_bytes_new. Version: 2.32

[Version("2.32")]
public static extern BytesOwnedHandle New(ref byte data, nuint size)

Parameters

data byte

Transfer ownership: None Nullable: True

size nuint

Transfer ownership: None Nullable: False

Returns

BytesOwnedHandle

Transfer ownership: Full Nullable: False

NewFromBytes(BytesHandle, nuint, nuint)

Calls native method g_bytes_new_from_bytes. Version: 2.32

[Version("2.32")]
public static extern BytesOwnedHandle NewFromBytes(BytesHandle bytes, nuint offset, nuint length)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: False

offset nuint

Transfer ownership: None Nullable: False

length nuint

Transfer ownership: None Nullable: False

Returns

BytesOwnedHandle

Transfer ownership: Full Nullable: False

NewStatic(ref byte, nuint)

Calls native constructor g_bytes_new_static. Version: 2.32

[Version("2.32")]
public static extern BytesOwnedHandle NewStatic(ref byte data, nuint size)

Parameters

data byte

Transfer ownership: Full Nullable: True

size nuint

Transfer ownership: None Nullable: False

Returns

BytesOwnedHandle

Transfer ownership: Full Nullable: False

NewTake(ref byte, nuint)

Calls native constructor g_bytes_new_take. Version: 2.32

[Version("2.32")]
public static extern BytesOwnedHandle NewTake(ref byte data, nuint size)

Parameters

data byte

Transfer ownership: Full Nullable: True

size nuint

Transfer ownership: None Nullable: False

Returns

BytesOwnedHandle

Transfer ownership: Full Nullable: False

NewWithFreeFunc(ref byte, nuint, DestroyNotify, IntPtr)

Calls native constructor g_bytes_new_with_free_func. Version: 2.32

[Version("2.32")]
public static extern BytesOwnedHandle NewWithFreeFunc(ref byte data, nuint size, DestroyNotify freeFunc, IntPtr userData)

Parameters

data byte

Transfer ownership: None Nullable: True

size nuint

Transfer ownership: None Nullable: False

freeFunc DestroyNotify

Transfer ownership: None Nullable: False

userData IntPtr

Transfer ownership: None Nullable: True

Returns

BytesOwnedHandle

Transfer ownership: Full Nullable: False

Ref(BytesHandle)

Calls native method g_bytes_ref. Version: 2.32

[Version("2.32")]
public static extern BytesOwnedHandle Ref(BytesHandle bytes)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: False

Returns

BytesOwnedHandle

Transfer ownership: Full Nullable: False

Unref(BytesHandle)

Calls native method g_bytes_unref. Version: 2.32

[Version("2.32")]
public static extern void Unref(BytesHandle bytes)

Parameters

bytes BytesHandle

Transfer ownership: None Nullable: True

UnrefToData(BytesUnownedHandle, out nuint)

Calls native method g_bytes_unref_to_data. Version: 2.32

[Version("2.32")]
public static extern byte[] UnrefToData(BytesUnownedHandle bytes, out nuint size)

Parameters

bytes BytesUnownedHandle

Transfer ownership: Full Nullable: False

size nuint

Transfer ownership: Full Nullable: False

Returns

byte[]

Transfer ownership: Full Nullable: False