ErrorG.domainRegisterStatic

This function registers an extended #GError domain.

@error_type_name should not be freed. @error_type_private_size must be greater than 0.

@error_type_init receives an initialized #GError and should then initialize the private data.

@error_type_copy is a function that receives both original and a copy #GError and should copy the fields of the private error data. The standard #GError fields are already handled.

@error_type_clear receives the pointer to the error, and it should free the fields of the private error data. It should not free the struct itself though.

Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it already takes care of passing valid information to this function.

class ErrorG
static
GQuark
domainRegisterStatic
(,,
GErrorInitFunc errorTypeInit
,
GErrorCopyFunc errorTypeCopy
,
GErrorClearFunc errorTypeClear
)

Parameters

errorTypeName string

static string to create a #GQuark from

errorTypePrivateSize size_t

size of the private error data in bytes

errorTypeInit GErrorInitFunc

function initializing fields of the private error data

errorTypeCopy GErrorCopyFunc

function copying fields of the private error data

errorTypeClear GErrorClearFunc

function freeing fields of the private error data

Return Value

Type: GQuark

#GQuark representing the error domain

Meta

Since

2.68