gi-gobject-2.0.24: GObject bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GObject.Functions

Contents

Description

 
Synopsis

Methods

boxedCopy

boxedCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

boxedType: The type of srcBoxed.

-> Ptr ()

srcBoxed: The boxed structure to be copied.

-> m (Ptr ())

Returns: The newly created copy of the boxed structure.

Provide a copy of a boxed structure srcBoxed which is of type boxedType.

boxedFree

boxedFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

boxedType: The type of boxed.

-> Ptr ()

boxed: The boxed structure to be freed.

-> m () 

Free the boxed structure boxed which is of type boxedType.

clearSignalHandler

clearSignalHandler Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> CULong

handlerIdPtr: A pointer to a handler ID (of type gulong) of the handler to be disconnected.

-> a

instance: The instance to remove the signal handler from.

-> m () 

Disconnects a handler from instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. The handlerIdPtr is then set to zero, which is never a valid handler ID value (see g_signal_connect()).

If the handler ID is 0 then this function does nothing.

A macro is also included that allows this function to be used without pointer casts.

Since: 2.62

enumCompleteTypeInfo

enumCompleteTypeInfo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

gEnumType: the type identifier of the type being completed

-> EnumValue

constValues: An array of EnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.

-> m TypeInfo 

This function is meant to be called from the complete_type_info function of a TypePlugin implementation, as in the following example:

C code

static void
my_enum_complete_type_info (GTypePlugin     *plugin,
                            GType            g_type,
                            GTypeInfo       *info,
                            GTypeValueTable *value_table)
{
  static const GEnumValue values[] = {
    { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
    { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
    { 0, NULL, NULL }
  };

  g_enum_complete_type_info (type, info, values);
}

enumGetValue

enumGetValue Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> EnumClass

enumClass: a EnumClass

-> Int32

value: the value to look up

-> m EnumValue

Returns: the EnumValue for value, or Nothing if value is not a member of the enumeration

Returns the EnumValue for a value.

enumGetValueByName

enumGetValueByName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> EnumClass

enumClass: a EnumClass

-> Text

name: the name to look up

-> m EnumValue

Returns: the EnumValue with name name, or Nothing if the enumeration doesn't have a member with that name

Looks up a EnumValue by name.

enumGetValueByNick

enumGetValueByNick Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> EnumClass

enumClass: a EnumClass

-> Text

nick: the nickname to look up

-> m EnumValue

Returns: the EnumValue with nickname nick, or Nothing if the enumeration doesn't have a member with that nickname

Looks up a EnumValue by nickname.

enumRegisterStatic

enumRegisterStatic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: A nul-terminated string used as the name of the new type.

-> EnumValue

constStaticValues: An array of EnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.

-> m GType

Returns: The new type identifier.

Registers a new static enumeration type with the name name.

It is normally more convenient to let [glib-mkenums][glib-mkenums], generate a my_enum_get_type() function from a usual C enumeration definition than to write one yourself using enumRegisterStatic.

enumToString

enumToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

gEnumType: the type identifier of a EnumClass type

-> Int32

value: the value

-> m Text

Returns: a newly-allocated text string

Pretty-prints value in the form of the enum’s name.

This is intended to be used for debugging purposes. The format of the output may change in the future.

Since: 2.54

flagsCompleteTypeInfo

flagsCompleteTypeInfo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

gFlagsType: the type identifier of the type being completed

-> FlagsValue

constValues: An array of FlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.

-> m TypeInfo 

This function is meant to be called from the complete_type_info() function of a TypePlugin implementation, see the example for enumCompleteTypeInfo above.

flagsGetFirstValue

flagsGetFirstValue Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FlagsClass

flagsClass: a FlagsClass

-> Word32

value: the value

-> m FlagsValue

Returns: the first FlagsValue which is set in value, or Nothing if none is set

Returns the first FlagsValue which is set in value.

flagsGetValueByName

flagsGetValueByName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FlagsClass

flagsClass: a FlagsClass

-> Text

name: the name to look up

-> m FlagsValue

Returns: the FlagsValue with name name, or Nothing if there is no flag with that name

Looks up a FlagsValue by name.

flagsGetValueByNick

flagsGetValueByNick Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FlagsClass

flagsClass: a FlagsClass

-> Text

nick: the nickname to look up

-> m FlagsValue

Returns: the FlagsValue with nickname nick, or Nothing if there is no flag with that nickname

Looks up a FlagsValue by nickname.

flagsRegisterStatic

flagsRegisterStatic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: A nul-terminated string used as the name of the new type.

-> FlagsValue

constStaticValues: An array of FlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.

-> m GType

Returns: The new type identifier.

Registers a new static flags type with the name name.

It is normally more convenient to let [glib-mkenums][glib-mkenums] generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using flagsRegisterStatic.

flagsToString

flagsToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

flagsType: the type identifier of a FlagsClass type

-> Word32

value: the value

-> m Text

Returns: a newly-allocated text string

Pretty-prints value in the form of the flag names separated by | and sorted. Any extra bits will be shown at the end as a hexadecimal number.

This is intended to be used for debugging purposes. The format of the output may change in the future.

Since: 2.54

gtypeGetType

gtypeGetType :: (HasCallStack, MonadIO m) => m GType Source #

No description available in the introspection data.

paramSpecBoolean

paramSpecBoolean Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Bool

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecBoolean instance specifying a G_TYPE_BOOLEAN property. In many cases, it may be more appropriate to use an enum with paramSpecEnum, both to improve code clarity by using explicitly named values, and to allow for more values to be added in future without breaking API.

See g_param_spec_internal() for details on property names.

paramSpecBoxed

paramSpecBoxed Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> GType

boxedType: G_TYPE_BOXED derived type of this property

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecBoxed instance specifying a G_TYPE_BOXED derived property.

See g_param_spec_internal() for details on property names.

paramSpecChar

paramSpecChar Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Int8

minimum: minimum value for the property specified

-> Int8

maximum: maximum value for the property specified

-> Int8

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecChar instance specifying a G_TYPE_CHAR property.

paramSpecDouble

paramSpecDouble Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Double

minimum: minimum value for the property specified

-> Double

maximum: maximum value for the property specified

-> Double

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecDouble instance specifying a G_TYPE_DOUBLE property.

See g_param_spec_internal() for details on property names.

paramSpecEnum

paramSpecEnum Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> GType

enumType: a GType derived from G_TYPE_ENUM

-> Int32

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecEnum instance specifying a G_TYPE_ENUM property.

See g_param_spec_internal() for details on property names.

paramSpecFlags

paramSpecFlags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> GType

flagsType: a GType derived from G_TYPE_FLAGS

-> Word32

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecFlags instance specifying a G_TYPE_FLAGS property.

See g_param_spec_internal() for details on property names.

paramSpecFloat

paramSpecFloat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Float

minimum: minimum value for the property specified

-> Float

maximum: maximum value for the property specified

-> Float

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecFloat instance specifying a G_TYPE_FLOAT property.

See g_param_spec_internal() for details on property names.

paramSpecGtype

paramSpecGtype Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> GType

isAType: a GType whose subtypes are allowed as values of the property (use G_TYPE_NONE for any type)

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecGType instance specifying a G_TYPE_GTYPE property.

See g_param_spec_internal() for details on property names.

Since: 2.10

paramSpecInt

paramSpecInt Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Int32

minimum: minimum value for the property specified

-> Int32

maximum: maximum value for the property specified

-> Int32

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecInt instance specifying a G_TYPE_INT property.

See g_param_spec_internal() for details on property names.

paramSpecInt64

paramSpecInt64 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Int64

minimum: minimum value for the property specified

-> Int64

maximum: maximum value for the property specified

-> Int64

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecInt64 instance specifying a G_TYPE_INT64 property.

See g_param_spec_internal() for details on property names.

paramSpecLong

paramSpecLong Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> CLong

minimum: minimum value for the property specified

-> CLong

maximum: maximum value for the property specified

-> CLong

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecLong instance specifying a G_TYPE_LONG property.

See g_param_spec_internal() for details on property names.

paramSpecObject

paramSpecObject Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> GType

objectType: G_TYPE_OBJECT derived type of this property

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecBoxed instance specifying a G_TYPE_OBJECT derived property.

See g_param_spec_internal() for details on property names.

paramSpecParam

paramSpecParam Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> GType

paramType: a GType derived from G_TYPE_PARAM

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecParam instance specifying a G_TYPE_PARAM property.

See g_param_spec_internal() for details on property names.

paramSpecPointer

paramSpecPointer Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecPointer instance specifying a pointer property. Where possible, it is better to use paramSpecObject or paramSpecBoxed to expose memory management information.

See g_param_spec_internal() for details on property names.

paramSpecString

paramSpecString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Maybe Text

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecString instance.

See g_param_spec_internal() for details on property names.

paramSpecUchar

paramSpecUchar Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Word8

minimum: minimum value for the property specified

-> Word8

maximum: maximum value for the property specified

-> Word8

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecUChar instance specifying a G_TYPE_UCHAR property.

paramSpecUint

paramSpecUint Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Word32

minimum: minimum value for the property specified

-> Word32

maximum: maximum value for the property specified

-> Word32

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecUInt instance specifying a G_TYPE_UINT property.

See g_param_spec_internal() for details on property names.

paramSpecUint64

paramSpecUint64 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Word64

minimum: minimum value for the property specified

-> Word64

maximum: maximum value for the property specified

-> Word64

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecUInt64 instance specifying a G_TYPE_UINT64 property.

See g_param_spec_internal() for details on property names.

paramSpecUlong

paramSpecUlong Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> CULong

minimum: minimum value for the property specified

-> CULong

maximum: maximum value for the property specified

-> CULong

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecULong instance specifying a G_TYPE_ULONG property.

See g_param_spec_internal() for details on property names.

paramSpecUnichar

paramSpecUnichar Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> Char

defaultValue: default value for the property specified

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: a newly created parameter specification

Creates a new ParamSpecUnichar instance specifying a G_TYPE_UINT property. Value structures for this property can be accessed with valueSetUint and valueGetUint.

See g_param_spec_internal() for details on property names.

paramSpecVariant

paramSpecVariant Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: canonical name of the property specified

-> Text

nick: nick name for the property specified

-> Text

blurb: description of the property specified

-> VariantType

type: a VariantType

-> Maybe GVariant

defaultValue: a GVariant of type type to use as the default value, or Nothing

-> [ParamFlags]

flags: flags for the property specified

-> m GParamSpec

Returns: the newly created ParamSpec

Creates a new ParamSpecVariant instance specifying a GVariant property.

If defaultValue is floating, it is consumed.

See g_param_spec_internal() for details on property names.

Since: 2.26

paramTypeRegisterStatic

paramTypeRegisterStatic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: 0-terminated string used as the name of the new ParamSpec type.

-> ParamSpecTypeInfo

pspecInfo: The ParamSpecTypeInfo for this ParamSpec type.

-> m GType

Returns: The new type identifier.

Registers name as the name of a new static type derived from G_TYPE_PARAM. The type system uses the information contained in the ParamSpecTypeInfo structure pointed to by info to manage the ParamSpec type and its instances.

paramValueConvert

paramValueConvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GParamSpec

pspec: a valid ParamSpec

-> GValue

srcValue: souce Value

-> GValue

destValue: destination Value of correct type for pspec

-> Bool

strictValidation: True requires destValue to conform to pspec without modifications

-> m Bool

Returns: True if transformation and validation were successful, False otherwise and destValue is left untouched.

Transforms srcValue into destValue if possible, and then validates destValue, in order for it to conform to pspec. If strictValidation is True this function will only succeed if the transformed destValue complied to pspec without modifications.

See also valueTypeTransformable, valueTransform and paramValueValidate.

paramValueDefaults

paramValueDefaults Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GParamSpec

pspec: a valid ParamSpec

-> GValue

value: a Value of correct type for pspec

-> m Bool

Returns: whether value contains the canonical default for this pspec

Checks whether value contains the default value as specified in pspec.

paramValueSetDefault

paramValueSetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GParamSpec

pspec: a valid ParamSpec

-> GValue

value: a Value of correct type for pspec; since 2.64, you can also pass an empty Value, initialized with G_VALUE_INIT

-> m () 

Sets value to its default value as specified in pspec.

paramValueValidate

paramValueValidate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GParamSpec

pspec: a valid ParamSpec

-> GValue

value: a Value of correct type for pspec

-> m Bool

Returns: whether modifying value was necessary to ensure validity

Ensures that the contents of value comply with the specifications set out by pspec. For example, a ParamSpecInt might require that integers stored in value may not be smaller than -42 and not be greater than +42. If value contains an integer outside of this range, it is modified accordingly, so the resulting value will fit into the range -42 .. +42.

paramValuesCmp

paramValuesCmp Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GParamSpec

pspec: a valid ParamSpec

-> GValue

value1: a Value of correct type for pspec

-> GValue

value2: a Value of correct type for pspec

-> m Int32

Returns: -1, 0 or +1, for a less than, equal to or greater than result

Compares value1 with value2 according to pspec, and return -1, 0 or +1, if value1 is found to be less than, equal to or greater than value2, respectively.

pointerTypeRegisterStatic

pointerTypeRegisterStatic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the name of the new pointer type.

-> m GType

Returns: a new G_TYPE_POINTER derived type id for name.

Creates a new G_TYPE_POINTER derived type id for a new pointer type with name name.

signalAccumulatorFirstWins

signalAccumulatorFirstWins Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SignalInvocationHint

ihint: standard SignalAccumulator parameter

-> GValue

returnAccu: standard SignalAccumulator parameter

-> GValue

handlerReturn: standard SignalAccumulator parameter

-> Ptr ()

dummy: standard SignalAccumulator parameter

-> m Bool

Returns: standard SignalAccumulator result

A predefined SignalAccumulator for signals intended to be used as a hook for application code to provide a particular value. Usually only one such value is desired and multiple handlers for the same signal don't make much sense (except for the case of the default handler defined in the class structure, in which case you will usually want the signal connection to override the class handler).

This accumulator will use the return value from the first signal handler that is run as the return value for the signal and not run any further handlers (ie: the first handler "wins").

Since: 2.28

signalAccumulatorTrueHandled

signalAccumulatorTrueHandled Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SignalInvocationHint

ihint: standard SignalAccumulator parameter

-> GValue

returnAccu: standard SignalAccumulator parameter

-> GValue

handlerReturn: standard SignalAccumulator parameter

-> Ptr ()

dummy: standard SignalAccumulator parameter

-> m Bool

Returns: standard SignalAccumulator result

A predefined SignalAccumulator for signals that return a boolean values. The behavior that this accumulator gives is that a return of True stops the signal emission: no further callbacks will be invoked, while a return of False allows the emission to continue. The idea here is that a True return indicates that the callback handled the signal, and no further handling is needed.

Since: 2.4

signalAddEmissionHook

signalAddEmissionHook Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

signalId: the signal identifier, as returned by signalLookup.

-> Word32

detail: the detail on which to call the hook.

-> SignalEmissionHook

hookFunc: a SignalEmissionHook function.

-> m CULong

Returns: the hook id, for later use with signalRemoveEmissionHook.

Adds an emission hook for a signal, which will get called for any emission of that signal, independent of the instance. This is possible only for signals which don't have G_SIGNAL_NO_HOOKS flag set.

signalChainFromOverridden

signalChainFromOverridden Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [GValue]

instanceAndParams: the argument list of the signal emission. The first element in the array is a Value for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.

-> GValue

returnValue: Location for the return value.

-> m () 

Calls the original class closure of a signal. This function should only be called from an overridden class closure; see signalOverrideClassClosure and g_signal_override_class_handler().

signalConnectClosure

signalConnectClosure Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: the instance to connect to.

-> Text

detailedSignal: a string of the form "signal-name[detail](#g:signal:detail)".

-> GClosure b

closure: the closure to connect.

-> Bool

after: whether the handler should be called before or after the default handler of the signal.

-> m CULong

Returns: the handler ID (always greater than 0 for successful connections)

Connects a closure to a signal for a particular object.

signalConnectClosureById

signalConnectClosureById Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: the instance to connect to.

-> Word32

signalId: the id of the signal.

-> Word32

detail: the detail.

-> GClosure b

closure: the closure to connect.

-> Bool

after: whether the handler should be called before or after the default handler of the signal.

-> m CULong

Returns: the handler ID (always greater than 0 for successful connections)

Connects a closure to a signal for a particular object.

signalEmitv

signalEmitv Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [GValue]

instanceAndParams: argument list for the signal emission. The first element in the array is a Value for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.

-> Word32

signalId: the signal id

-> Word32

detail: the detail

-> m GValue 

Emits a signal.

Note that signalEmitv doesn't change returnValue if no handlers are connected, in contrast to g_signal_emit() and g_signal_emit_valist().

signalGetInvocationHint

signalGetInvocationHint Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: the instance to query

-> m SignalInvocationHint

Returns: the invocation hint of the innermost signal emission.

Returns the invocation hint of the innermost signal emission of instance.

signalHandlerBlock

signalHandlerBlock Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance to block the signal handler of.

-> CULong

handlerId: Handler id of the handler to be blocked.

-> m () 

Blocks a handler of an instance so it will not be called during any signal emissions unless it is unblocked again. Thus "blocking" a signal handler means to temporarily deactive it, a signal handler has to be unblocked exactly the same amount of times it has been blocked before to become active again.

The handlerId has to be a valid signal handler id, connected to a signal of instance.

signalHandlerDisconnect

signalHandlerDisconnect Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance to remove the signal handler from.

-> CULong

handlerId: Handler id of the handler to be disconnected.

-> m () 

Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. The handlerId becomes invalid and may be reused.

The handlerId has to be a valid signal handler id, connected to a signal of instance.

signalHandlerFind

signalHandlerFind Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance owning the signal handler to be found.

-> [SignalMatchType]

mask: Mask indicating which of signalId, detail, closure, func and/or data the handler has to match.

-> Word32

signalId: Signal the handler has to be connected to.

-> Word32

detail: Signal detail the handler has to be connected to.

-> Maybe (GClosure b)

closure: The closure the handler will invoke.

-> Ptr ()

func: The C closure callback of the handler (useless for non-C closures).

-> Ptr ()

data: The closure data of the handler's closure.

-> m CULong

Returns: A valid non-0 signal handler id for a successful match.

Finds the first signal handler that matches certain selection criteria. The criteria mask is passed as an OR-ed combination of SignalMatchType flags, and the criteria values are passed as arguments. The match mask has to be non-0 for successful matches. If no handler was found, 0 is returned.

signalHandlerIsConnected

signalHandlerIsConnected Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance where a signal handler is sought.

-> CULong

handlerId: the handler ID.

-> m Bool

Returns: whether handlerId identifies a handler connected to instance.

Returns whether handlerId is the ID of a handler connected to instance.

signalHandlerUnblock

signalHandlerUnblock Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance to unblock the signal handler of.

-> CULong

handlerId: Handler id of the handler to be unblocked.

-> m () 

Undoes the effect of a previous signalHandlerBlock call. A blocked handler is skipped during signal emissions and will not be invoked, unblocking it (for exactly the amount of times it has been blocked before) reverts its "blocked" state, so the handler will be recognized by the signal system and is called upon future or currently ongoing signal emissions (since the order in which handlers are called during signal emissions is deterministic, whether the unblocked handler in question is called as part of a currently ongoing emission depends on how far that emission has proceeded yet).

The handlerId has to be a valid id of a signal handler that is connected to a signal of instance and is currently blocked.

signalHandlersBlockMatched

signalHandlersBlockMatched Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance to block handlers from.

-> [SignalMatchType]

mask: Mask indicating which of signalId, detail, closure, func and/or data the handlers have to match.

-> Word32

signalId: Signal the handlers have to be connected to.

-> Word32

detail: Signal detail the handlers have to be connected to.

-> Maybe (GClosure b)

closure: The closure the handlers will invoke.

-> Ptr ()

func: The C closure callback of the handlers (useless for non-C closures).

-> Ptr ()

data: The closure data of the handlers' closures.

-> m Word32

Returns: The number of handlers that matched.

Blocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of SignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the SignalMatchTypeClosure, SignalMatchTypeFunc or SignalMatchTypeData match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.

signalHandlersDestroy

signalHandlersDestroy Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance whose signal handlers are destroyed

-> m () 

Destroy all signal handlers of a type instance. This function is an implementation detail of the Object dispose implementation, and should not be used outside of the type system.

signalHandlersDisconnectMatched

signalHandlersDisconnectMatched Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance to remove handlers from.

-> [SignalMatchType]

mask: Mask indicating which of signalId, detail, closure, func and/or data the handlers have to match.

-> Word32

signalId: Signal the handlers have to be connected to.

-> Word32

detail: Signal detail the handlers have to be connected to.

-> Maybe (GClosure b)

closure: The closure the handlers will invoke.

-> Ptr ()

func: The C closure callback of the handlers (useless for non-C closures).

-> Ptr ()

data: The closure data of the handlers' closures.

-> m Word32

Returns: The number of handlers that matched.

Disconnects all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of SignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the SignalMatchTypeClosure, SignalMatchTypeFunc or SignalMatchTypeData match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.

signalHandlersUnblockMatched

signalHandlersUnblockMatched Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: The instance to unblock handlers from.

-> [SignalMatchType]

mask: Mask indicating which of signalId, detail, closure, func and/or data the handlers have to match.

-> Word32

signalId: Signal the handlers have to be connected to.

-> Word32

detail: Signal detail the handlers have to be connected to.

-> Maybe (GClosure b)

closure: The closure the handlers will invoke.

-> Ptr ()

func: The C closure callback of the handlers (useless for non-C closures).

-> Ptr ()

data: The closure data of the handlers' closures.

-> m Word32

Returns: The number of handlers that matched.

Unblocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of SignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the SignalMatchTypeClosure, SignalMatchTypeFunc or SignalMatchTypeData match flags is required for successful matches. If no handlers were found, 0 is returned, the number of unblocked handlers otherwise. The match criteria should not apply to any handlers that are not currently blocked.

signalHasHandlerPending

signalHasHandlerPending Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: the object whose signal handlers are sought.

-> Word32

signalId: the signal id.

-> Word32

detail: the detail.

-> Bool

mayBeBlocked: whether blocked handlers should count as match.

-> m Bool

Returns: True if a handler is connected to the signal, False otherwise.

Returns whether there are any handlers connected to instance for the given signal id and detail.

If detail is 0 then it will only match handlers that were connected without detail. If detail is non-zero then it will match handlers connected both without detail and with the given detail. This is consistent with how a signal emitted with detail would be delivered to those handlers.

Since 2.46 this also checks for a non-default class closure being installed, as this is basically always what you want.

One example of when you might use this is when the arguments to the signal are difficult to compute. A class implementor may opt to not emit the signal if no one is attached anyway, thus saving the cost of building the arguments.

signalListIds

signalListIds Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

itype: Instance or interface type.

-> m [Word32]

Returns: Newly allocated array of signal IDs.

Lists the signals by id that a certain instance or interface type created. Further information about the signals can be acquired through signalQuery.

signalLookup

signalLookup Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the signal's name.

-> GType

itype: the type that the signal operates on.

-> m Word32

Returns: the signal's identifying number, or 0 if no signal was found.

Given the name of the signal and the type of object it connects to, gets the signal's identifying integer. Emitting the signal by number is somewhat faster than using the name each time.

Also tries the ancestors of the given type.

The type class passed as itype must already have been instantiated (for example, using typeClassRef) for this function to work, as signals are always installed during class initialization.

See g_signal_new() for details on allowed signal names.

signalName

signalName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

signalId: the signal's identifying number.

-> m Text

Returns: the signal name, or Nothing if the signal number was invalid.

Given the signal's identifier, finds its name.

Two different signals may have the same name, if they have differing types.

signalOverrideClassClosure

signalOverrideClassClosure Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

signalId: the signal id

-> GType

instanceType: the instance type on which to override the class closure for the signal.

-> GClosure a

classClosure: the closure.

-> m () 

Overrides the class closure (i.e. the default handler) for the given signal for emissions on instances of instanceType. instanceType must be derived from the type to which the signal belongs.

See signalChainFromOverridden and g_signal_chain_from_overridden_handler() for how to chain up to the parent class closure from inside the overridden one.

signalParseName

signalParseName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

detailedSignal: a string of the form "signal-name[detail](#g:signal:detail)".

-> GType

itype: The interface/instance type that introduced "signal-name".

-> Bool

forceDetailQuark: True forces creation of a GQuark for the detail.

-> m (Bool, Word32, Word32)

Returns: Whether the signal name could successfully be parsed and signalIdP and detailP contain valid return values.

Internal function to parse a signal name into its signalId and detail quark.

signalQuery

signalQuery Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

signalId: The signal id of the signal to query information for.

-> m SignalQuery 

Queries the signal system for in-depth information about a specific signal. This function will fill in a user-provided structure to hold signal-specific information. If an invalid signal id is passed in, the signalId member of the SignalQuery is 0. All members filled into the SignalQuery structure should be considered constant and have to be left untouched.

signalRemoveEmissionHook

signalRemoveEmissionHook Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

signalId: the id of the signal

-> CULong

hookId: the id of the emission hook, as returned by signalAddEmissionHook

-> m () 

Deletes an emission hook.

signalStopEmission

signalStopEmission Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: the object whose signal handlers you wish to stop.

-> Word32

signalId: the signal identifier, as returned by signalLookup.

-> Word32

detail: the detail which the signal was emitted with.

-> m () 

Stops a signal's current emission.

This will prevent the default method from running, if the signal was SignalFlagsRunLast and you connected normally (i.e. without the "after" flag).

Prints a warning if used on a signal which isn't being emitted.

signalStopEmissionByName

signalStopEmissionByName Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

instance: the object whose signal handlers you wish to stop.

-> Text

detailedSignal: a string of the form "signal-name[detail](#g:signal:detail)".

-> m () 

Stops a signal's current emission.

This is just like signalStopEmission except it will look up the signal id for you.

signalTypeCclosureNew

signalTypeCclosureNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

itype: the GType identifier of an interface or classed type

-> Word32

structOffset: the offset of the member function of itype's class structure which is to be invoked by the new closure

-> m (GClosure a)

Returns: a floating reference to a new CClosure

Creates a new closure which invokes the function found at the offset structOffset in the class structure of the interface or classed type identified by itype.

sourceSetClosure

sourceSetClosure Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Source

source: the source

-> GClosure a

closure: a Closure

-> m () 

Set the callback for a source as a Closure.

If the source is not one of the standard GLib types, the closureCallback and closureMarshal fields of the SourceFuncs structure must have been filled in with pointers to appropriate functions.

sourceSetDummyCallback

sourceSetDummyCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Source

source: the source

-> m () 

Sets a dummy callback for source. The callback will do nothing, and if the source expects a Bool return value, it will return True. (If the source expects any other type of return value, it will return a 0/Nothing value; whatever valueInit initializes a Value to for that type.)

If the source is not one of the standard GLib types, the closureCallback and closureMarshal fields of the SourceFuncs structure must have been filled in with pointers to appropriate functions.

strdupValueContents

strdupValueContents Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GValue

value: Value which contents are to be described.

-> m Text

Returns: Newly allocated string.

Return a newly allocated string, which describes the contents of a Value. The main purpose of this function is to describe Value contents for debugging output, the way in which the contents are described may change between different GLib versions.

typeAddClassPrivate

typeAddClassPrivate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

classType: GType of a classed type

-> Word64

privateSize: size of private structure

-> m () 

Registers a private class structure for a classed type; when the class is allocated, the private structures for the class and all of its parent types are allocated sequentially in the same memory block as the public structures, and are zero-filled.

This function should be called in the type's get_type() function after the type is registered. The private structure can be retrieved using the G_TYPE_CLASS_GET_PRIVATE() macro.

Since: 2.24

typeAddInstancePrivate

typeAddInstancePrivate :: (HasCallStack, MonadIO m) => GType -> Word64 -> m Int32 Source #

No description available in the introspection data.

typeAddInterfaceDynamic

typeAddInterfaceDynamic Source #

Arguments

:: (HasCallStack, MonadIO m, IsTypePlugin a) 
=> GType

instanceType: GType value of an instantiable type

-> GType

interfaceType: GType value of an interface type

-> a

plugin: TypePlugin structure to retrieve the InterfaceInfo from

-> m () 

Adds interfaceType to the dynamic instantiableType. The information contained in the TypePlugin structure pointed to by plugin is used to manage the relationship.

typeAddInterfaceStatic

typeAddInterfaceStatic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

instanceType: GType value of an instantiable type

-> GType

interfaceType: GType value of an interface type

-> InterfaceInfo

info: InterfaceInfo structure for this (instanceType, interfaceType) combination

-> m () 

Adds interfaceType to the static instantiableType. The information contained in the InterfaceInfo structure pointed to by info is used to manage the relationship.

typeCheckClassIsA

typeCheckClassIsA :: (HasCallStack, MonadIO m) => TypeClass -> GType -> m Bool Source #

No description available in the introspection data.

typeCheckInstance

typeCheckInstance Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TypeInstance

instance: a valid TypeInstance structure

-> m Bool

Returns: True if instance is valid, False otherwise

Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro.

typeCheckInstanceIsA

typeCheckInstanceIsA :: (HasCallStack, MonadIO m) => TypeInstance -> GType -> m Bool Source #

No description available in the introspection data.

typeCheckInstanceIsFundamentallyA

typeCheckInstanceIsFundamentallyA :: (HasCallStack, MonadIO m) => TypeInstance -> GType -> m Bool Source #

No description available in the introspection data.

typeCheckIsValueType

typeCheckIsValueType :: (HasCallStack, MonadIO m) => GType -> m Bool Source #

No description available in the introspection data.

typeCheckValue

typeCheckValue :: (HasCallStack, MonadIO m) => GValue -> m Bool Source #

No description available in the introspection data.

typeCheckValueHolds

typeCheckValueHolds :: (HasCallStack, MonadIO m) => GValue -> GType -> m Bool Source #

No description available in the introspection data.

typeChildren

typeChildren Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: the parent type

-> m [GType]

Returns: Newly allocated and 0-terminated array of child types, free with free

Return a newly allocated and 0-terminated array of type IDs, listing the child types of type.

typeDefaultInterfacePeek

typeDefaultInterfacePeek Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

gType: an interface type

-> m TypeInterface

Returns: the default vtable for the interface, or Nothing if the type is not currently in use

If the interface type gType is currently in use, returns its default interface vtable.

Since: 2.4

typeDefaultInterfaceRef

typeDefaultInterfaceRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

gType: an interface type

-> m TypeInterface

Returns: the default vtable for the interface; call typeDefaultInterfaceUnref when you are done using the interface.

Increments the reference count for the interface type gType, and returns the default interface vtable for the type.

If the type is not currently in use, then the default vtable for the type will be created and initalized by calling the base interface init and default vtable init functions for the type (the baseInit and classInit members of TypeInfo). Calling typeDefaultInterfaceRef is useful when you want to make sure that signals and properties for an interface have been installed.

Since: 2.4

typeDefaultInterfaceUnref

typeDefaultInterfaceUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TypeInterface

gIface: the default vtable structure for an interface, as returned by typeDefaultInterfaceRef

-> m () 

Decrements the reference count for the type corresponding to the interface default vtable gIface. If the type is dynamic, then when no one is using the interface and all references have been released, the finalize function for the interface's default vtable (the classFinalize member of TypeInfo) will be called.

Since: 2.4

typeDepth

typeDepth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: a GType

-> m Word32

Returns: the depth of type

Returns the length of the ancestry of the passed in type. This includes the type itself, so that e.g. a fundamental type has depth 1.

typeEnsure

typeEnsure Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: a GType

-> m () 

Ensures that the indicated type has been registered with the type system, and its _class_init() method has been run.

In theory, simply calling the type's _get_type() method (or using the corresponding macro) is supposed take care of this. However, _get_type() methods are often marked G_GNUC_CONST for performance reasons, even though this is technically incorrect (since G_GNUC_CONST requires that the function not have side effects, which _get_type() methods do on the first call). As a result, if you write a bare call to a _get_type() macro, it may get optimized out by the compiler. Using typeEnsure guarantees that the type's _get_type() method is called.

Since: 2.34

typeFreeInstance

typeFreeInstance Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TypeInstance

instance: an instance of a type

-> m () 

Frees an instance of a type, returning it to the instance pool for the type, if there is one.

Like g_type_create_instance(), this function is reserved for implementors of fundamental types.

typeFromName

typeFromName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: type name to look up

-> m GType

Returns: corresponding type ID or 0

Look up the type ID from a given type name, returning 0 if no type has been registered under this name (this is the preferred method to find out by name whether a specific type has been registered yet).

typeFundamental

typeFundamental Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

typeId: valid type ID

-> m GType

Returns: fundamental type ID

Internal function, used to extract the fundamental type ID portion. Use G_TYPE_FUNDAMENTAL() instead.

typeFundamentalNext

typeFundamentalNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m GType

Returns: the next available fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs

Returns the next free fundamental type id which can be used to register a new fundamental type with typeRegisterFundamental. The returned type ID represents the highest currently registered fundamental type identifier.

typeGetInstanceCount

typeGetInstanceCount Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: a GType

-> m Int32

Returns: the number of instances allocated of the given type; if instance counts are not available, returns 0.

Returns the number of instances allocated of the particular type; this is only available if GLib is built with debugging support and the instance_count debug flag is set (by setting the GOBJECT_DEBUG variable to include instance-count).

Since: 2.44

typeGetPlugin

typeGetPlugin Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: GType to retrieve the plugin for

-> m TypePlugin

Returns: the corresponding plugin if type is a dynamic type, Nothing otherwise

Returns the TypePlugin structure for type.

typeGetQdata

typeGetQdata Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: a GType

-> Word32

quark: a GQuark id to identify the data

-> m (Ptr ())

Returns: the data, or Nothing if no data was found

Obtains data which has previously been attached to type with typeSetQdata.

Note that this does not take subtyping into account; data attached to one type with typeSetQdata cannot be retrieved from a subtype using typeGetQdata.

typeGetTypeRegistrationSerial

typeGetTypeRegistrationSerial Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Word32

Returns: An unsigned int, representing the state of type registrations

Returns an opaque serial number that represents the state of the set of registered types. Any time a type is registered this serial changes, which means you can cache information based on type lookups (such as typeFromName) and know if the cache is still valid at a later time by comparing the current serial with the one at the type lookup.

Since: 2.36

typeInit

typeInit :: (HasCallStack, MonadIO m) => m () Source #

Deprecated: (Since version 2.36)the type system is now initialised automatically

This function used to initialise the type system. Since GLib 2.36, the type system is initialised automatically and this function does nothing.

typeInitWithDebugFlags

typeInitWithDebugFlags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [TypeDebugFlags]

debugFlags: bitwise combination of TypeDebugFlags values for debugging purposes

-> m () 

Deprecated: (Since version 2.36)the type system is now initialised automatically

This function used to initialise the type system with debugging flags. Since GLib 2.36, the type system is initialised automatically and this function does nothing.

If you need to enable debugging features, use the GOBJECT_DEBUG environment variable.

typeInterfaces

typeInterfaces Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: the type to list interface types for

-> m [GType]

Returns: Newly allocated and 0-terminated array of interface types, free with free

Return a newly allocated and 0-terminated array of type IDs, listing the interface types that type conforms to.

typeIsA

typeIsA Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: type to check anchestry for

-> GType

isAType: possible anchestor of type or interface that type could conform to

-> m Bool

Returns: True if type is a isAType

If isAType is a derivable type, check whether type is a descendant of isAType. If isAType is an interface, check whether type conforms to it.

typeName

typeName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: type to return name for

-> m Text

Returns: static type name or Nothing

Get the unique name that is assigned to a type ID. Note that this function (like all other GType API) cannot cope with invalid type IDs. G_TYPE_INVALID may be passed to this function, as may be any other validly registered type ID, but randomized type IDs should not be passed in and will most likely lead to a crash.

typeNameFromClass

typeNameFromClass :: (HasCallStack, MonadIO m) => TypeClass -> m Text Source #

No description available in the introspection data.

typeNameFromInstance

typeNameFromInstance :: (HasCallStack, MonadIO m) => TypeInstance -> m Text Source #

No description available in the introspection data.

typeNextBase

typeNextBase Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

leafType: descendant of rootType and the type to be returned

-> GType

rootType: immediate parent of the returned type

-> m GType

Returns: immediate child of rootType and anchestor of leafType

Given a leafType and a rootType which is contained in its anchestry, return the type that rootType is the immediate parent of. In other words, this function determines the type that is derived directly from rootType which is also a base class of leafType. Given a root type and a leaf type, this function can be used to determine the types and order in which the leaf type is descended from the root type.

typeParent

typeParent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: the derived type

-> m GType

Returns: the parent type

Return the direct parent type of the passed in type. If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.

typeQname

typeQname Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: type to return quark of type name for

-> m Word32

Returns: the type names quark or 0

Get the corresponding quark of the type IDs name.

typeQuery

typeQuery Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: GType of a static, classed type

-> m TypeQuery 

Queries the type system for information about a specific type. This function will fill in a user-provided structure to hold type-specific information. If an invalid GType is passed in, the type member of the TypeQuery is 0. All members filled into the TypeQuery structure should be considered constant and have to be left untouched.

typeRegisterDynamic

typeRegisterDynamic Source #

Arguments

:: (HasCallStack, MonadIO m, IsTypePlugin a) 
=> GType

parentType: type from which this type will be derived

-> Text

typeName: 0-terminated string used as the name of the new type

-> a

plugin: TypePlugin structure to retrieve the TypeInfo from

-> [TypeFlags]

flags: bitwise combination of TypeFlags values

-> m GType

Returns: the new type identifier or G_TYPE_INVALID if registration failed

Registers typeName as the name of a new dynamic type derived from parentType. The type system uses the information contained in the TypePlugin structure pointed to by plugin to manage the type and its instances (if not abstract). The value of flags determines the nature (e.g. abstract or not) of the type.

typeRegisterFundamental

typeRegisterFundamental Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

typeId: a predefined type identifier

-> Text

typeName: 0-terminated string used as the name of the new type

-> TypeInfo

info: TypeInfo structure for this type

-> TypeFundamentalInfo

finfo: TypeFundamentalInfo structure for this type

-> [TypeFlags]

flags: bitwise combination of TypeFlags values

-> m GType

Returns: the predefined type identifier

Registers typeId as the predefined identifier and typeName as the name of a fundamental type. If typeId is already registered, or a type named typeName is already registered, the behaviour is undefined. The type system uses the information contained in the TypeInfo structure pointed to by info and the TypeFundamentalInfo structure pointed to by finfo to manage the type and its instances. The value of flags determines additional characteristics of the fundamental type.

typeRegisterStatic

typeRegisterStatic Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

parentType: type from which this type will be derived

-> Text

typeName: 0-terminated string used as the name of the new type

-> TypeInfo

info: TypeInfo structure for this type

-> [TypeFlags]

flags: bitwise combination of TypeFlags values

-> m GType

Returns: the new type identifier

Registers typeName as the name of a new static type derived from parentType. The type system uses the information contained in the TypeInfo structure pointed to by info to manage the type and its instances (if not abstract). The value of flags determines the nature (e.g. abstract or not) of the type.

typeSetQdata

typeSetQdata Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

type: a GType

-> Word32

quark: a GQuark id to identify the data

-> Ptr ()

data: the data

-> m () 

Attaches arbitrary data to a type.

typeTestFlags

typeTestFlags :: (HasCallStack, MonadIO m) => GType -> Word32 -> m Bool Source #

No description available in the introspection data.