6 Functions

Procedure: boxed-copy boxed-type src-boxed ⇒ %return

Provide a copy of a boxed structure src-boxed which is of type boxed-type.

boxed-type

Passed: a class, or a GType number.

The type of src-boxed.

src-boxed

Passed: a foreign pointer, or a bytevector.

The boxed structure to be copied.

%return

Returned: a foreign pointer.

The newly created copy of the boxed structure.

Procedure: boxed-free boxed-type boxed

Free the boxed structure boxed which is of type boxed-type.

boxed-type

Passed: a class, or a GType number.

The type of boxed.

boxed

Passed: a foreign pointer, or a bytevector.

The boxed structure to be freed.

Procedure: boxed-type-register-static name boxed-copy boxed-free ⇒ %return

This function creates a new G_TYPE_BOXED derived type id for a new boxed type with name name.

Boxed type handling functions have to be provided to copy and free opaque boxed structures of this type.

For the general case, it is recommended to use G_DEFINE_BOXED_TYPE() instead of calling boxed-type-register-static directly. The macro will create the appropriate *_get_type() function for the boxed type.

name

Passed: a string.

Name of the new boxed type.

boxed-copy

Passed: a procedure.

Boxed structure copy function.

See GBoxedCopyFunc for how it is called.

boxed-free

Passed: a procedure.

Boxed structure free function.

See GBoxedFreeFunc for how it is called.

%return

Returned: a class, or a GType number.

New G_TYPE_BOXED derived type id for name.

Procedure: cclosure-marshal-boolean--boxed-boxed closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with handlers that take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as g_signal_accumulator_true_handled().

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-boolean--flags closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with handlers that take a flags type as an argument and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as g_signal_accumulator_true_handled().

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-generic closure return-gvalue n-param-values param-values [invocation-hint] [marshal-data]

A generic marshaller function implemented via libffi.

Normally this function is not passed explicitly to g_signal_new(), but used automatically by GLib when specifying a #f marshaller.

closure

Passed: a <GClosure>.

A <GClosure>.

return-gvalue

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-string--object-pointer closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with handlers that take a <GObject> and a pointer and produce a string. It is highly unlikely that your signal handler fits this description.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--boolean closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single boolean argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--boxed closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single argument which is any boxed pointer type.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--char closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single character argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--double closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with one double-precision floating point argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--enum closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single argument with an enumerated type.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--flags closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single argument with a flags types.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--float closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with one single-precision floating point argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--int closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single integer argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--long closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with with a single long integer argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--object closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single <GObject> argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--param closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single argument of type <GParam>.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--pointer closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single raw pointer argument type.

If it is possible, it is better to use one of the more specific functions such as cclosure-marshal-void--object or cclosure-marshal-void--object.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--string closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single string argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--uchar closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single unsigned character argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--uint closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with with a single unsigned integer argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--uint-pointer closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with an unsigned int and a pointer as arguments.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--ulong closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single unsigned long integer argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--variant closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with a single <GVariant> argument.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: cclosure-marshal-void--void closure return-value n-param-values param-values [invocation-hint] [marshal-data]

A GClosureMarshal function for use with signals with no arguments.

closure

Passed: a <GClosure>.

A <GClosure>.

return-value

Passed: a <GValue>.

A <GValue> to store the return value. May be #f if the callback of closure doesn’t return a value.

n-param-values

Passed: an unsigned 32-bit integer.

The length of the param-values array.

param-values

Passed: a <GValue>.

An array of GValues holding the arguments on which to invoke the callback of closure.

invocation-hint

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The invocation hint given as the last argument to closure:invoke!.

marshal-data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

Procedure: clear-signal-handler handler-id-ptr instance

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 handler-id-ptr 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.

There is also a macro version of this function so that the code will be inlined.

handler-id-ptr

Passed: an unsigned 64-bit integer.

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

instance

Passed: a <GObject>.

The instance to remove the signal handler from. This pointer may be #f or invalid, if the handler ID is zero.

Procedure: enum-to-string g-enum-type value ⇒ %return

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.

g-enum-type

Passed: a class, or a GType number.

the type identifier of a GEnumClass type

value

Passed: a 32-bit integer.

the value

%return

Returned: a string.

a newly-allocated text string

Procedure: flags-to-string flags-type value ⇒ %return

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.

flags-type

Passed: a class, or a GType number.

the type identifier of a GFlagsClass type

value

Passed: an unsigned 32-bit integer.

the value

%return

Returned: a string.

a newly-allocated text string

Procedure: gtype-get-type ⇒ %return
%return

Returned: a class, or a GType number.

Procedure: param-spec-boolean name nick blurb default-value flags ⇒ %return

Creates a new <GParamBoolean> instance specifying a G_TYPE_BOOLEAN property. In many cases, it may be more appropriate to use an enum with param-spec-enum, 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.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

default-value

Passed: a boolean.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-boxed name nick blurb boxed-type flags ⇒ %return

Creates a new <GParamBoxed> instance specifying a G_TYPE_BOXED derived property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

boxed-type

Passed: a class, or a GType number.

G_TYPE_BOXED derived type of this property

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-char name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamChar> instance specifying a G_TYPE_CHAR property.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: an 8-bit integer, or a character.

minimum value for the property specified

maximum

Passed: an 8-bit integer, or a character.

maximum value for the property specified

default-value

Passed: an 8-bit integer, or a character.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-double name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamDouble> instance specifying a G_TYPE_DOUBLE property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: a real number.

minimum value for the property specified

maximum

Passed: a real number.

maximum value for the property specified

default-value

Passed: a real number.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-enum name nick blurb enum-type default-value flags ⇒ %return

Creates a new <GParamEnum> instance specifying a G_TYPE_ENUM property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

enum-type

Passed: a class, or a GType number.

a GType derived from G_TYPE_ENUM

default-value

Passed: a 32-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-flags name nick blurb flags-type default-value flags ⇒ %return

Creates a new <GParamFlags> instance specifying a G_TYPE_FLAGS property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

flags-type

Passed: a class, or a GType number.

a GType derived from G_TYPE_FLAGS

default-value

Passed: an unsigned 32-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-float name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamFloat> instance specifying a G_TYPE_FLOAT property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: a real number.

minimum value for the property specified

maximum

Passed: a real number.

maximum value for the property specified

default-value

Passed: a real number.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-gtype name nick blurb is-a-type flags ⇒ %return

Creates a new <GParamGType> instance specifying a G_TYPE_GTYPE property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

is-a-type

Passed: a class, or a GType number.

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

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-int name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamInt> instance specifying a G_TYPE_INT property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: a 32-bit integer.

minimum value for the property specified

maximum

Passed: a 32-bit integer.

maximum value for the property specified

default-value

Passed: a 32-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-int64 name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamInt64> instance specifying a G_TYPE_INT64 property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: a 64-bit integer.

minimum value for the property specified

maximum

Passed: a 64-bit integer.

maximum value for the property specified

default-value

Passed: a 64-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-long name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamLong> instance specifying a G_TYPE_LONG property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: a 64-bit integer.

minimum value for the property specified

maximum

Passed: a 64-bit integer.

maximum value for the property specified

default-value

Passed: a 64-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-object name nick blurb object-type flags ⇒ %return

Creates a new <GParamBoxed> instance specifying a G_TYPE_OBJECT derived property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

object-type

Passed: a class, or a GType number.

G_TYPE_OBJECT derived type of this property

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-param name nick blurb param-type flags ⇒ %return

Creates a new <GParamParam> instance specifying a G_TYPE_PARAM property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

param-type

Passed: a class, or a GType number.

a GType derived from G_TYPE_PARAM

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-pointer name nick blurb flags ⇒ %return

Creates a new <GParamPointer> instance specifying a pointer property. Where possible, it is better to use param-spec-object or param-spec-boxed to expose memory management information.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-string name nick blurb default-value flags ⇒ %return

Creates a new <GParamString> instance.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

default-value

Passed: a string, or #f.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-uchar name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamUChar> instance specifying a G_TYPE_UCHAR property.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: an unsigned 8-bit integer, or a character.

minimum value for the property specified

maximum

Passed: an unsigned 8-bit integer, or a character.

maximum value for the property specified

default-value

Passed: an unsigned 8-bit integer, or a character.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-uint name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamUInt> instance specifying a G_TYPE_UINT property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: an unsigned 32-bit integer.

minimum value for the property specified

maximum

Passed: an unsigned 32-bit integer.

maximum value for the property specified

default-value

Passed: an unsigned 32-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-uint64 name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamUInt64> instance specifying a G_TYPE_UINT64 property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: an unsigned 64-bit integer.

minimum value for the property specified

maximum

Passed: an unsigned 64-bit integer.

maximum value for the property specified

default-value

Passed: an unsigned 64-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-ulong name nick blurb minimum maximum default-value flags ⇒ %return

Creates a new <GParamULong> instance specifying a G_TYPE_ULONG property.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

minimum

Passed: an unsigned 64-bit integer.

minimum value for the property specified

maximum

Passed: an unsigned 64-bit integer.

maximum value for the property specified

default-value

Passed: an unsigned 64-bit integer.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-unichar name nick blurb default-value flags ⇒ %return

Creates a new <GParamUnichar> instance specifying a G_TYPE_UINT property. <GValue> structures for this property can be accessed with value:set-uint and value:get-uint.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

default-value

Passed: a character.

default value for the property specified

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

a newly created parameter specification

Procedure: param-spec-variant name nick blurb type default-value flags ⇒ %return

Creates a new <GParamVariant> instance specifying a <GVariant> property.

If default-value is floating, it is consumed.

See g_param_spec_internal() for details on property names.

name

Passed: a string.

canonical name of the property specified

nick

Passed: a string, or #f.

nick name for the property specified

blurb

Passed: a string, or #f.

description of the property specified

type

Passed: a <GVariantType>.

a <GVariantType>

default-value

Passed: a <GVariant>, or #f.

a <GVariant> of type type to use as the default value, or #f

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property specified

%return

Returned: a <GParam>.

the newly created <GParam>

Procedure: param-value-convert? pspec src-value dest-value strict-validation ⇒ %return

Transforms src-value into dest-value if possible, and then validates dest-value, in order for it to conform to pspec. If strict-validation is #t this function will only succeed if the transformed dest-value complied to pspec without modifications.

See also value-type-transformable?, value:transform? and param-value-validate?.

pspec

Passed: a <GParam>.

a valid <GParam>

src-value

Passed: a <GValue>.

source <GValue>

dest-value

Passed: a <GValue>.

destination <GValue> of correct type for pspec

strict-validation

Passed: a boolean.

#t requires dest-value to conform to pspec without modifications

%return

Returned: a boolean.

#t if transformation and validation were successful, #f otherwise and dest-value is left untouched.

Procedure: param-value-defaults? pspec value ⇒ %return

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

pspec

Passed: a <GParam>.

a valid <GParam>

value

Passed: a <GValue>.

a <GValue> of correct type for pspec

%return

Returned: a boolean.

whether value contains the canonical default for this pspec

Procedure: param-value-is-valid? pspec value ⇒ %return

Return whether the contents of value comply with the specifications set out by pspec.

pspec

Passed: a <GParam>.

a valid <GParam>

value

Passed: a <GValue>.

a <GValue> of correct type for pspec

%return

Returned: a boolean.

whether the contents of value comply with the specifications set out by pspec.

Procedure: param-value-set-default pspec value

Sets value to its default value as specified in pspec.

pspec

Passed: a <GParam>.

a valid <GParam>

value

Passed: a <GValue>.

a <GValue> of correct type for pspec; since 2.64, you can also pass an empty <GValue>, initialized with G_VALUE_INIT

Procedure: param-value-validate? pspec value ⇒ %return

Ensures that the contents of value comply with the specifications set out by pspec. For example, a <GParamInt> 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.

pspec

Passed: a <GParam>.

a valid <GParam>

value

Passed: a <GValue>.

a <GValue> of correct type for pspec

%return

Returned: a boolean.

whether modifying value was necessary to ensure validity

Procedure: param-values-cmp pspec value1 value2 ⇒ %return

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.

pspec

Passed: a <GParam>.

a valid <GParam>

value1

Passed: a <GValue>.

a <GValue> of correct type for pspec

value2

Passed: a <GValue>.

a <GValue> of correct type for pspec

%return

Returned: a 32-bit integer.

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

Procedure: pointer-type-register-static name ⇒ %return

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

name

Passed: a string.

the name of the new pointer type.

%return

Returned: a class, or a GType number.

a new G_TYPE_POINTER derived type id for name.

Procedure: signal-chain-from-overridden instance-and-params return-value

Calls the original class closure of a signal. This function should only be called from an overridden class closure; see signal-override-class-closure and signal-override-class-handler.

instance-and-params

Passed: a foreign pointer, or a bytevector.

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

return-value

Passed: a <GValue>.

Location for the return value.

Procedure: signal-connect-closure instance detailed-signal closure after ⇒ %return

Connects a closure to a signal for a particular object.

If closure is a floating reference (see closure:sink), this function takes ownership of closure.

This function cannot fail. If the given signal name doesn’t exist, a critical warning is emitted. No validation is performed on the ‘detail’ string when specified in detailed-signal, other than a non-empty check.

Refer to the signals documentation for more details.

instance

Passed: a <GObject>.

the instance to connect to.

detailed-signal

Passed: a string.

a string of the form "signal-name::detail".

closure

Passed: a <GClosure>.

the closure to connect.

after

Passed: a boolean.

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

%return

Returned: an unsigned 64-bit integer.

the handler ID (always greater than 0)

Procedure: signal-connect-closure-by-id instance signal-id detail closure after ⇒ %return

Connects a closure to a signal for a particular object.

If closure is a floating reference (see closure:sink), this function takes ownership of closure.

This function cannot fail. If the given signal name doesn’t exist, a critical warning is emitted. No validation is performed on the ‘detail’ string when specified in detailed-signal, other than a non-empty check.

Refer to the signals documentation for more details.

instance

Passed: a <GObject>.

the instance to connect to.

signal-id

Passed: an unsigned 32-bit integer.

the id of the signal.

detail

Passed: an unsigned 32-bit integer.

the detail.

closure

Passed: a <GClosure>.

the closure to connect.

after

Passed: a boolean.

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

%return

Returned: an unsigned 64-bit integer.

the handler ID (always greater than 0)

Procedure: signal-emitv! instance-and-params signal-id detail return-value ⇒ return-value

Emits a signal. Signal emission is done synchronously. The method will only return control after all handlers are called or signal emission was stopped.

Note that signal-emitv! doesn’t change return-value if no handlers are connected, in contrast to g_signal_emit() and g_signal_emit_valist().

instance-and-params

Passed: a foreign pointer, or a bytevector.

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

signal-id

Passed: an unsigned 32-bit integer.

the signal id

detail

Passed: an unsigned 32-bit integer.

the detail

return-value

Passed, and returned: a <GValue>.

Location to store the return value of the signal emission. This must be provided if the specified signal returns a value, but may be ignored otherwise.

Procedure: signal-handler-block instance handler-id

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 deactivate it, a signal handler has to be unblocked exactly the same amount of times it has been blocked before to become active again.

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

instance

Passed: a <GObject>.

The instance to block the signal handler of.

handler-id

Passed: an unsigned 64-bit integer.

Handler id of the handler to be blocked.

Procedure: signal-handler-disconnect instance handler-id

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 handler-id becomes invalid and may be reused.

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

instance

Passed: a <GObject>.

The instance to remove the signal handler from.

handler-id

Passed: an unsigned 64-bit integer.

Handler id of the handler to be disconnected.

Procedure: signal-handler-find instance mask signal-id detail [closure] [func] [data] ⇒ %return

Finds the first signal handler that matches certain selection criteria. The criteria mask is passed as an OR-ed combination of <%GSignalMatchType> 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.

instance

Passed: a <GObject>.

The instance owning the signal handler to be found.

mask

Passed: a <%GSignalMatchType>, or a list of its symbols, or one of them.

Mask indicating which of signal-id, detail, closure, func and/or data the handler has to match.

signal-id

Passed: an unsigned 32-bit integer.

Signal the handler has to be connected to.

detail

Passed: an unsigned 32-bit integer.

Signal detail the handler has to be connected to.

closure

Passed, or left out: a <GClosure>, or #f.

The closure the handler will invoke.

func

Passed, or left out: a foreign pointer, or a bytevector, or #f.

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

data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The closure data of the handler’s closure.

%return

Returned: an unsigned 64-bit integer.

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

Procedure: signal-handler-is-connected? instance handler-id ⇒ %return

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

instance

Passed: a <GObject>.

The instance where a signal handler is sought.

handler-id

Passed: an unsigned 64-bit integer.

the handler ID.

%return

Returned: a boolean.

whether handler-id identifies a handler connected to instance.

Procedure: signal-handler-unblock instance handler-id

Undoes the effect of a previous signal-handler-block 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 handler-id has to be a valid id of a signal handler that is connected to a signal of instance and is currently blocked.

instance

Passed: a <GObject>.

The instance to unblock the signal handler of.

handler-id

Passed: an unsigned 64-bit integer.

Handler id of the handler to be unblocked.

Procedure: signal-handlers-block-matched instance mask signal-id detail [closure] [func] [data] ⇒ %return

Blocks all handlers on an instance that match a certain selection criteria.

The criteria mask is passed as a combination of <%GSignalMatchType> flags, and the criteria values are passed as arguments. A handler must match on all flags set in mask to be blocked (i.e. the match is conjunctive).

Passing at least one of the id, closure, func or data match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.

Support for id was added in GLib 2.78.

instance

Passed: a <GObject>.

The instance to block handlers from.

mask

Passed: a <%GSignalMatchType>, or a list of its symbols, or one of them.

Mask indicating which of signal-id, detail, closure, func and/or data the handlers have to match.

signal-id

Passed: an unsigned 32-bit integer.

Signal the handlers have to be connected to.

detail

Passed: an unsigned 32-bit integer.

Signal detail the handlers have to be connected to.

closure

Passed, or left out: a <GClosure>, or #f.

The closure the handlers will invoke.

func

Passed, or left out: a foreign pointer, or a bytevector, or #f.

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

data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The closure data of the handlers’ closures.

%return

Returned: an unsigned 32-bit integer.

The number of handlers that matched.

Procedure: signal-handlers-destroy instance

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

instance

Passed: a <GObject>.

The instance whose signal handlers are destroyed

Procedure: signal-handlers-disconnect-matched instance mask signal-id detail [closure] [func] [data] ⇒ %return

Disconnects all handlers on an instance that match a certain selection criteria.

The criteria mask is passed as a combination of <%GSignalMatchType> flags, and the criteria values are passed as arguments. A handler must match on all flags set in mask to be disconnected (i.e. the match is conjunctive).

Passing at least one of the id, closure, func or data match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.

Support for id was added in GLib 2.78.

instance

Passed: a <GObject>.

The instance to remove handlers from.

mask

Passed: a <%GSignalMatchType>, or a list of its symbols, or one of them.

Mask indicating which of signal-id, detail, closure, func and/or data the handlers have to match.

signal-id

Passed: an unsigned 32-bit integer.

Signal the handlers have to be connected to.

detail

Passed: an unsigned 32-bit integer.

Signal detail the handlers have to be connected to.

closure

Passed, or left out: a <GClosure>, or #f.

The closure the handlers will invoke.

func

Passed, or left out: a foreign pointer, or a bytevector, or #f.

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

data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The closure data of the handlers’ closures.

%return

Returned: an unsigned 32-bit integer.

The number of handlers that matched.

Procedure: signal-handlers-unblock-matched instance mask signal-id detail [closure] [func] [data] ⇒ %return

Unblocks all handlers on an instance that match a certain selection criteria.

The criteria mask is passed as a combination of <%GSignalMatchType> flags, and the criteria values are passed as arguments. A handler must match on all flags set in mask to be unblocked (i.e. the match is conjunctive).

Passing at least one of the id, closure, func or data 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.

Support for id was added in GLib 2.78.

instance

Passed: a <GObject>.

The instance to unblock handlers from.

mask

Passed: a <%GSignalMatchType>, or a list of its symbols, or one of them.

Mask indicating which of signal-id, detail, closure, func and/or data the handlers have to match.

signal-id

Passed: an unsigned 32-bit integer.

Signal the handlers have to be connected to.

detail

Passed: an unsigned 32-bit integer.

Signal detail the handlers have to be connected to.

closure

Passed, or left out: a <GClosure>, or #f.

The closure the handlers will invoke.

func

Passed, or left out: a foreign pointer, or a bytevector, or #f.

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

data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

The closure data of the handlers’ closures.

%return

Returned: an unsigned 32-bit integer.

The number of handlers that matched.

Procedure: signal-has-handler-pending? instance signal-id detail may-be-blocked ⇒ %return

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.

instance

Passed: a <GObject>.

the object whose signal handlers are sought.

signal-id

Passed: an unsigned 32-bit integer.

the signal id.

detail

Passed: an unsigned 32-bit integer.

the detail.

may-be-blocked

Passed: a boolean.

whether blocked handlers should count as match.

%return

Returned: a boolean.

#t if a handler is connected to the signal, #f otherwise.

Procedure: signal-is-valid-name? name ⇒ %return

Validate a signal name. This can be useful for dynamically-generated signals which need to be validated at run-time before actually trying to create them.

See GObject.signal_new for details of the rules for valid names. The rules for signal names are the same as those for property names.

name

Passed: a string.

the canonical name of the signal

%return

Returned: a boolean.

#t if name is a valid signal name, #f otherwise.

Procedure: signal-list-ids itype ⇒ %return

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

itype

Passed: a class, or a GType number.

Instance or interface type.

%return

Returned: an u32vector.

Newly allocated array of signal IDs.

n-ids

Not returned: it is the length of %return.

Location to store the number of signal ids for itype.

Procedure: signal-lookup name itype ⇒ %return

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 g_type_class_ref()) for this function to work, as signals are always installed during class initialization.

See g_signal_new() for details on allowed signal names.

name

Passed: a string.

the signal’s name.

itype

Passed: a class, or a GType number.

the type that the signal operates on.

%return

Returned: an unsigned 32-bit integer.

the signal’s identifying number, or 0 if no signal was found.

Procedure: signal-name signal-id ⇒ %return

Given the signal’s identifier, finds its name.

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

signal-id

Passed: an unsigned 32-bit integer.

the signal’s identifying number.

%return

Returned: a string, or #f.

the signal name, or #f if the signal number was invalid.

Procedure: signal-override-class-closure signal-id instance-type class-closure

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

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

signal-id

Passed: an unsigned 32-bit integer.

the signal id

instance-type

Passed: a class, or a GType number.

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

class-closure

Passed: a <GClosure>.

the closure.

Procedure: signal-override-class-handler signal-name instance-type class-handler

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

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

signal-name

Passed: a string.

the name for the signal

instance-type

Passed: a class, or a GType number.

the instance type on which to override the class handler for the signal.

class-handler

Passed: a procedure.

the handler.

See GCallback for how it is called.

Procedure: signal-parse-name detailed-signal itype force-detail-quark ⇒ %return signal-id-p detail-p

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

detailed-signal

Passed: a string.

a string of the form "signal-name::detail".

itype

Passed: a class, or a GType number.

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

force-detail-quark

Passed: a boolean.

#t forces creation of a GQuark for the detail.

%return

Returned: a boolean.

Whether the signal name could successfully be parsed and signal-id-p and detail-p contain valid return values.

signal-id-p

Returned: an unsigned 32-bit integer.

Location to store the signal id.

detail-p

Returned: an unsigned 32-bit integer.

Location to store the detail quark.

Procedure: signal-remove-emission-hook signal-id hook-id

Deletes an emission hook.

signal-id

Passed: an unsigned 32-bit integer.

the id of the signal

hook-id

Passed: an unsigned 64-bit integer.

the id of the emission hook, as returned by g_signal_add_emission_hook()

Procedure: signal-stop-emission instance signal-id detail

Stops a signal’s current emission.

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

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

instance

Passed: a <GObject>.

the object whose signal handlers you wish to stop.

signal-id

Passed: an unsigned 32-bit integer.

the signal identifier, as returned by signal-lookup.

detail

Passed: an unsigned 32-bit integer.

the detail which the signal was emitted with.

Procedure: signal-stop-emission-by-name instance detailed-signal

Stops a signal’s current emission.

This is just like signal-stop-emission except it will look up the signal id for you.

instance

Passed: a <GObject>.

the object whose signal handlers you wish to stop.

detailed-signal

Passed: a string.

a string of the form "signal-name::detail".

Procedure: signal-type-cclosure-new itype struct-offset ⇒ %return

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

itype

Passed: a class, or a GType number.

the GType identifier of an interface or classed type

struct-offset

Passed: an unsigned 32-bit integer.

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

%return

Returned: a <GClosure>.

a floating reference to a new GCClosure

Procedure: source-set-closure source closure

Set the callback for a source as a <GClosure>.

If the source is not one of the standard GLib types, the closure-callback and closure-marshal fields of the GSourceFuncs structure must have been filled in with pointers to appropriate functions.

source

Passed: a <GSource>.

the source

closure

Passed: a <GClosure>.

a <GClosure>

Procedure: source-set-dummy-callback source

Sets a dummy callback for source. The callback will do nothing, and if the source expects a gboolean return value, it will return #t. (If the source expects any other type of return value, it will return a 0/#f value; whatever value:init initializes a <GValue> to for that type.)

If the source is not one of the standard GLib types, the closure-callback and closure-marshal fields of the GSourceFuncs structure must have been filled in with pointers to appropriate functions.

source

Passed: a <GSource>.

the source

Procedure: strdup-value-contents value ⇒ %return

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

value

Passed: a <GValue>.

<GValue> which contents are to be described.

%return

Returned: a string.

Newly allocated string.

Procedure: type-add-class-private class-type private-size

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.

class-type

Passed: a class, or a GType number.

GType of a classed type

private-size

Passed: an unsigned 64-bit integer.

size of private structure

Procedure: type-add-instance-private class-type private-size ⇒ %return
class-type

Passed: a class, or a GType number.

private-size

Passed: an unsigned 64-bit integer.

%return

Returned: a 32-bit integer.

Procedure: type-add-interface-dynamic instance-type interface-type plugin

Adds interface-type to the dynamic instance-type. The information contained in the <GTypePlugin> structure pointed to by plugin is used to manage the relationship.

instance-type

Passed: a class, or a GType number.

GType value of an instantiatable type

interface-type

Passed: a class, or a GType number.

GType value of an interface type

plugin

Passed: a <GTypePlugin>.

<GTypePlugin> structure to retrieve the GInterfaceInfo from

Procedure: type-check-is-value-type? type ⇒ %return
type

Passed: a class, or a GType number.

%return

Returned: a boolean.

Procedure: type-check-value-holds? value type ⇒ %return
value

Passed: a <GValue>.

type

Passed: a class, or a GType number.

%return

Returned: a boolean.

Procedure: type-check-value? value ⇒ %return
value

Passed: a <GValue>.

%return

Returned: a boolean.

Procedure: type-children type ⇒ %return

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

type

Passed: a class, or a GType number.

the parent type

%return

Returned: a vector, each a class, or a GType number.

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

n-children

Not returned: it is the length of %return.

location to store the length of the returned array, or #f

Procedure: type-class-adjust-private-offset g-class private-size-or-offset
g-class

Passed: a foreign pointer, or a bytevector, or #f.

private-size-or-offset

Passed: a 32-bit integer.

Procedure: type-depth type ⇒ %return

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.

type

Passed: a class, or a GType number.

a GType

%return

Returned: an unsigned 32-bit integer.

the depth of type

Procedure: type-ensure type

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 type-ensure guarantees that the type’s _get_type() method is called.

type

Passed: a class, or a GType number.

a GType

Procedure: type-from-name name ⇒ %return

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).

name

Passed: a string.

type name to look up

%return

Returned: a class, or a GType number.

corresponding type ID or 0

Procedure: type-fundamental type-id ⇒ %return

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

type-id

Passed: a class, or a GType number.

valid type ID

%return

Returned: a class, or a GType number.

fundamental type ID

Procedure: type-fundamental-next ⇒ %return

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

%return

Returned: a class, or a GType number.

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

Procedure: type-get-instance-count type ⇒ %return

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).

type

Passed: a class, or a GType number.

a GType

%return

Returned: a 32-bit integer.

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

Procedure: type-get-plugin type ⇒ %return

Returns the <GTypePlugin> structure for type.

type

Passed: a class, or a GType number.

GType to retrieve the plugin for

%return

Returned: a <GTypePlugin>.

the corresponding plugin if type is a dynamic type, #f otherwise

Procedure: type-get-qdata type quark ⇒ %return

Obtains data which has previously been attached to type with type-set-qdata.

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

type

Passed: a class, or a GType number.

a GType

quark

Passed: an unsigned 32-bit integer.

a GQuark id to identify the data

%return

Returned: a foreign pointer, or #f.

the data, or #f if no data was found

Procedure: type-get-type-registration-serial ⇒ %return

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 type-from-name) and know if the cache is still valid at a later time by comparing the current serial with the one at the type lookup.

%return

Returned: an unsigned 32-bit integer.

An unsigned int, representing the state of type registrations

Procedure: type-interface-add-prerequisite interface-type prerequisite-type

Adds prerequisite-type to the list of prerequisites of interface-type. This means that any type implementing interface-type must also implement prerequisite-type. Prerequisites can be thought of as an alternative to interface derivation (which GType doesn’t support). An interface can have at most one instantiatable prerequisite type.

interface-type

Passed: a class, or a GType number.

GType value of an interface type

prerequisite-type

Passed: a class, or a GType number.

GType value of an interface or instantiatable type

Procedure: type-interface-get-plugin instance-type interface-type ⇒ %return

Returns the <GTypePlugin> structure for the dynamic interface interface-type which has been added to instance-type, or #f if interface-type has not been added to instance-type or does not have a <GTypePlugin> structure. See type-add-interface-dynamic.

instance-type

Passed: a class, or a GType number.

GType of an instantiatable type

interface-type

Passed: a class, or a GType number.

GType of an interface type

%return

Returned: a <GTypePlugin>.

the <GTypePlugin> for the dynamic interface interface-type of instance-type

Procedure: type-interface-instantiatable-prerequisite interface-type ⇒ %return

Returns the most specific instantiatable prerequisite of an interface type. If the interface type has no instantiatable prerequisite, G_TYPE_INVALID is returned.

See type-interface-add-prerequisite for more information about prerequisites.

interface-type

Passed: a class, or a GType number.

an interface type

%return

Returned: a class, or a GType number.

the instantiatable prerequisite type or G_TYPE_INVALID if none

Procedure: type-interface-prerequisites interface-type ⇒ %return

Returns the prerequisites of an interfaces type.

interface-type

Passed: a class, or a GType number.

an interface type

%return

Returned: a vector, each a class, or a GType number.

a newly-allocated zero-terminated array of GType containing the prerequisites of interface-type

n-prerequisites

Not returned: it is the length of %return.

location to return the number of prerequisites, or #f

Procedure: type-interfaces type ⇒ %return

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

type

Passed: a class, or a GType number.

the type to list interface types for

%return

Returned: a vector, each a class, or a GType number.

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

n-interfaces

Not returned: it is the length of %return.

location to store the length of the returned array, or #f

Procedure: type-is-a? type is-a-type ⇒ %return

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

type

Passed: a class, or a GType number.

type to check ancestry for

is-a-type

Passed: a class, or a GType number.

possible ancestor of type or interface that type could conform to

%return

Returned: a boolean.

#t if type is a is-a-type

Procedure: type-name type ⇒ %return

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.

type

Passed: a class, or a GType number.

type to return name for

%return

Returned: a string, or #f.

static type name or #f

Procedure: type-next-base leaf-type root-type ⇒ %return

Given a leaf-type and a root-type which is contained in its ancestry, return the type that root-type is the immediate parent of. In other words, this function determines the type that is derived directly from root-type which is also a base class of leaf-type. 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.

leaf-type

Passed: a class, or a GType number.

descendant of root-type and the type to be returned

root-type

Passed: a class, or a GType number.

immediate parent of the returned type

%return

Returned: a class, or a GType number.

immediate child of root-type and ancestor of leaf-type

Procedure: type-parent type ⇒ %return

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.

type

Passed: a class, or a GType number.

the derived type

%return

Returned: a class, or a GType number.

the parent type

Procedure: type-qname type ⇒ %return

Get the corresponding quark of the type IDs name.

type

Passed: a class, or a GType number.

type to return quark of type name for

%return

Returned: an unsigned 32-bit integer.

the type names quark or 0

Procedure: type-register-dynamic parent-type type-name plugin flags ⇒ %return

Registers type-name as the name of a new dynamic type derived from parent-type. The type system uses the information contained in the <GTypePlugin> 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.

parent-type

Passed: a class, or a GType number.

type from which this type will be derived

type-name

Passed: a string.

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

plugin

Passed: a <GTypePlugin>.

<GTypePlugin> structure to retrieve the GTypeInfo from

flags

Passed: a <%GTypeFlags>, or a list of its symbols, or one of them.

bitwise combination of <%GTypeFlags> values

%return

Returned: a class, or a GType number.

the new type identifier or G_TYPE_INVALID if registration failed

Procedure: type-set-qdata type quark [data]

Attaches arbitrary data to a type.

type

Passed: a class, or a GType number.

a GType

quark

Passed: an unsigned 32-bit integer.

a GQuark id to identify the data

data

Passed, or left out: a foreign pointer, or a bytevector, or #f.

the data

Procedure: type-test-flags? type flags ⇒ %return
type

Passed: a class, or a GType number.

flags

Passed: an unsigned 32-bit integer.

%return

Returned: a boolean.

Procedure: value-type-compatible? src-type dest-type ⇒ %return

Checks whether a value:copy is able to copy values of type src-type into values of type dest-type.

src-type

Passed: a class, or a GType number.

source type to be copied

dest-type

Passed: a class, or a GType number.

destination type for copying

%return

Returned: a boolean.

true if the copy is possible; false otherwise

Procedure: value-type-transformable? src-type dest-type ⇒ %return

Checks whether value:transform? is able to transform values of type src-type into values of type dest-type.

Note that for the types to be transformable, they must be compatible or a transformation function must be registered using GObject.Value.register_transform_func.

src-type

Passed: a class, or a GType number.

source type

dest-type

Passed: a class, or a GType number.

target type

%return

Returned: a boolean.

true if the transformation is possible; false otherwise

Procedure: variant-get-gtype ⇒ %return
%return

Returned: a class, or a GType number.