#GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
Since 2.13.0
Minimum shift count to be used for user defined flags, to be stored in #GParamSpec.flags. The maximum allowed is 10.
A mask for all #GSignalFlags bits.
A mask for all #GSignalMatchType bits.
A bit in the type number that's supposed to be left untouched.
An integer constant that represents the number of identifiers reserved for types that are assigned at compile-time.
Shift value used in converting numbers to type IDs.
First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
Last fundamental type number reserved for BSE.
First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
Last fundamental type number reserved for GLib.
First available fundamental type number to create new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL().
For string values, indicates that the string contained is canonical and will exist for the duration of the process. See g_value_set_interned_string().
If passed to G_VALUE_COLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. This does not affect usage of g_value_copy(), the data will be copied if it is not ref-counted.
Provide a copy of a boxed structure src_boxed
which is of type boxed_type
.
The type of src_boxed
.
The boxed structure to be copied.
Free the boxed structure boxed
which is of type boxed_type
.
The type of boxed
.
The boxed structure to be freed.
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().
A #GClosure.
A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
The length of the param_values
array.
An array of #GValues holding the arguments on which to invoke the callback of closure.
The invocation hint given as the last argument to g_closure_invoke().
Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
A marshaller for a #GCClosure with a callback of type
gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)
where the #gint parameter
denotes a flags type.
the #GClosure to which the marshaller belongs
a #GValue which can store the returned #gboolean
2
a #GValue array holding instance and arg1
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
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 %NULL marshaller.
A #GClosure.
A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
The length of the param_values
array.
An array of #GValues holding the arguments on which to invoke the callback of closure.
The invocation hint given as the last argument to g_closure_invoke().
Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
A marshaller for a #GCClosure with a callback of type
gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)
.
the #GClosure to which the marshaller belongs
a #GValue, which can store the returned string
3
a #GValue array holding instance, arg1 and arg2
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gboolean parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #GBoxed* parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gchar arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gchar parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gdouble parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gint arg1, gpointer user_data)
where the #gint parameter denotes an enumeration type..
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the enumeration parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gint arg1, gpointer user_data)
where the #gint parameter denotes a flags type.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the flags parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gfloat parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gint arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gint parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, glong arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #glong parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #GObject* parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #GParamSpec* parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gpointer parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gchar* parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, guchar arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #guchar parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, guint arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #guint parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
3
a #GValue array holding instance, arg1 and arg2
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gulong arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #gulong parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
2
a #GValue array holding the instance and the #GVariant* parameter
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
A marshaller for a #GCClosure with a callback of type
void (*callback) (gpointer instance, gpointer user_data)
.
the #GClosure to which the marshaller belongs
ignored
1
a #GValue array holding only the instance
the invocation hint given as the last argument to g_closure_invoke()
additional data specified when registering the marshaller
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.
A pointer to a handler ID (of type #gulong) of the handler to be disconnected.
The instance to remove the signal handler from. This pointer may be %NULL or invalid, if the handler ID is zero.
This function is meant to be called from the complete_type_info
function of a #GTypePlugin implementation, as in the following
example:
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);
}
the type identifier of the type being completed
An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
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 g_enum_register_static().
A nul-terminated string used as the name of the new type.
An array of #GEnumValue 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.
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.
the type identifier of a #GEnumClass type
the value
This function is meant to be called from the complete_type_info() function of a #GTypePlugin implementation, see the example for g_enum_complete_type_info() above.
the type identifier of the type being completed
An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
Returns the first #GFlagsValue which is set in value
.
a #GFlagsClass
the value
Looks up a #GFlagsValue by name.
a #GFlagsClass
the name to look up
Looks up a #GFlagsValue by nickname.
a #GFlagsClass
the nickname to look up
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 g_flags_register_static().
A nul-terminated string used as the name of the new type.
An array of #GFlagsValue 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.
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.
the type identifier of a #GFlagsClass type
the value
Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN property. In many cases, it may be more appropriate to use an enum with g_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.
canonical name of the property specified
nick name for the property specified
description of the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED derived property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
%G_TYPE_BOXED derived type of this property
flags for the property specified
Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
a #GType derived from %G_TYPE_ENUM
default value for the property specified
flags for the property specified
Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
a #GType derived from %G_TYPE_FLAGS
default value for the property specified
flags for the property specified
Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecGType instance specifying a %G_TYPE_GTYPE property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
flags for the property specified
Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT derived property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
%G_TYPE_OBJECT derived type of this property
flags for the property specified
Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
a #GType derived from %G_TYPE_PARAM
flags for the property specified
Creates a new #GParamSpecPointer instance specifying a pointer property. Where possible, it is better to use g_param_spec_object() or g_param_spec_boxed() to expose memory management information.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
flags for the property specified
Creates a new #GParamSpecString instance.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64 property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG property.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
minimum value for the property specified
maximum value for the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT property. #GValue structures for this property can be accessed with g_value_set_uint() and g_value_get_uint().
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
default value for the property specified
flags for the property specified
Creates a new #GParamSpecVariant instance specifying a #GVariant property.
If default_value
is floating, it is consumed.
See g_param_spec_internal() for details on property names.
canonical name of the property specified
nick name for the property specified
description of the property specified
a #GVariantType
a #GVariant of type type
to use as the default value, or %NULL
flags for the property specified
Registers name
as the name of a new static type derived
from %G_TYPE_PARAM.
The type system uses the information contained in the #GParamSpecTypeInfo
structure pointed to by info
to manage the #GParamSpec type and its
instances.
0-terminated string used as the name of the new #GParamSpec type.
The #GParamSpecTypeInfo for this #GParamSpec type.
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 %TRUE this function will only succeed if the
transformed dest_value
complied to pspec
without modifications.
See also g_value_type_transformable(), g_value_transform() and g_param_value_validate().
a valid #GParamSpec
source #GValue
destination #GValue of correct type for pspec
%TRUE requires dest_value
to conform to pspec
without modifications
Checks whether value
contains the default value as specified in pspec
.
a valid #GParamSpec
a #GValue of correct type for pspec
Sets value
to its default value as specified in pspec
.
a valid #GParamSpec
a #GValue of correct type for pspec;
since 2.64, you can also pass an empty #GValue, initialized with %G_VALUE_INIT
Ensures that the contents of value
comply with the specifications
set out by pspec
. For example, a #GParamSpecInt 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.
a valid #GParamSpec
a #GValue of correct type for pspec
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.
a valid #GParamSpec
a #GValue of correct type for pspec
a #GValue of correct type for pspec
Creates a new %G_TYPE_POINTER derived type id for a new
pointer type with name name
.
the name of the new pointer type.
A predefined #GSignalAccumulator 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").
standard #GSignalAccumulator parameter
standard #GSignalAccumulator parameter
standard #GSignalAccumulator parameter
standard #GSignalAccumulator parameter
A predefined #GSignalAccumulator 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.
standard #GSignalAccumulator parameter
standard #GSignalAccumulator parameter
standard #GSignalAccumulator parameter
standard #GSignalAccumulator parameter
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.
the signal identifier, as returned by g_signal_lookup().
the detail on which to call the hook.
Calls the original class closure of a signal. This function should only be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler().
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.
Location for the return value.
Connects a closure to a signal for a particular object.
the instance to connect to.
a string of the form "signal-name::detail".
the closure to connect.
whether the handler should be called before or after the default handler of the signal.
Connects a closure to a signal for a particular object.
the instance to connect to.
the id of the signal.
the detail.
the closure to connect.
whether the handler should be called before or after the default handler of the signal.
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 g_signal_emitv() doesn't change return_value
if no handlers are
connected, in contrast to g_signal_emit() and g_signal_emit_valist().
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.
the signal id
the detail
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.
Returns the invocation hint of the innermost signal emission of instance.
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
.
The instance to block the signal handler of.
Handler id of the handler to be blocked.
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
.
The instance to remove the signal handler from.
Handler id of the handler to be disconnected.
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.
The instance owning the signal handler to be found.
Mask indicating which of signal_id,
detail,
closure,
func
and/or data
the handler has to match.
Signal the handler has to be connected to.
Signal detail the handler has to be connected to.
The C closure callback of the handler (useless for non-C closures).
The closure data of the handler's closure.
Undoes the effect of a previous g_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.
The instance to unblock the signal handler of.
Handler id of the handler to be unblocked.
Blocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.
The instance to block handlers from.
Mask indicating which of signal_id,
detail,
closure,
func
and/or data
the handlers have to match.
Signal the handlers have to be connected to.
Signal detail the handlers have to be connected to.
The C closure callback of the handlers (useless for non-C closures).
The closure data of the handlers' closures.
Disconnects all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.
The instance to remove handlers from.
Mask indicating which of signal_id,
detail,
closure,
func
and/or data
the handlers have to match.
Signal the handlers have to be connected to.
Signal detail the handlers have to be connected to.
The C closure callback of the handlers (useless for non-C closures).
The closure data of the handlers' closures.
Unblocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_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.
The instance to unblock handlers from.
Mask indicating which of signal_id,
detail,
closure,
func
and/or data
the handlers have to match.
Signal the handlers have to be connected to.
Signal detail the handlers have to be connected to.
The C closure callback of the handlers (useless for non-C closures).
The closure data of the handlers' closures.
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.
the object whose signal handlers are sought.
the signal id.
the detail.
whether blocked handlers should count as match.
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 [canonical parameter names][canonical-parameter-names] for details of the rules for valid names. The rules for signal names are the same as those for property names.
the canonical name of the signal
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().
Instance or interface type.
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.
the signal's name.
the type that the signal operates on.
Given the signal's identifier, finds its name.
Two different signals may have the same name, if they have differing types.
the signal's identifying number.
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 g_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.
the signal id
the instance type on which to override the class closure for the signal.
the closure.
Internal function to parse a signal name into its signal_id
and detail
quark.
a string of the form "signal-name::detail".
The interface/instance type that introduced "signal-name".
%TRUE forces creation of a #GQuark for the detail.
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 signal_id
member of the #GSignalQuery
is 0. All members filled into the #GSignalQuery structure should
be considered constant and have to be left untouched.
The signal id of the signal to query information for.
Deletes an emission hook.
the id of the signal
the id of the emission hook, as returned by g_signal_add_emission_hook()
Change the #GSignalCVaMarshaller used for a given signal. This is a specialised form of the marshaller that can often be used for the common case of a single connected signal handler and avoids the overhead of #GValue. Its use is optional.
the signal id
the instance type on which to set the marshaller.
the marshaller to set.
Stops a signal's current emission.
This will prevent the default method from running, if the signal was %G_SIGNAL_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.
the object whose signal handlers you wish to stop.
the signal identifier, as returned by g_signal_lookup().
the detail which the signal was emitted with.
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
.
the #GType identifier of an interface or classed type
the offset of the member function of itype'
s class structure which is to be invoked by the new 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.
Sets a dummy callback for source
. The callback will do nothing, and
if the source expects a #gboolean return value, it will return %TRUE.
(If the source expects any other type of return value, it will return
a 0/%NULL value; whatever g_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.
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.
#GValue which contents are to be described.
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.
GType of a classed type
size of private structure
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.
#GType value of an instantiatable type
#GType value of an interface type
#GTypePlugin structure to retrieve the #GInterfaceInfo from
Adds interface_type
to the static instance_type
.
The information contained in the #GInterfaceInfo structure
pointed to by info
is used to manage the relationship.
#GType value of an instantiatable type
#GType value of an interface type
#GInterfaceInfo structure for this (instance_type,
interface_type)
combination
Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro.
a valid #GTypeInstance structure
This function is essentially the same as g_type_class_ref(), except that the classes reference count isn't incremented. As a consequence, this function may return %NULL if the class of the type passed in does not currently exist (hasn't been referenced before).
type ID of a classed type
If the interface type g_type
is currently in use, returns its
default interface vtable.
an interface type
Increments the reference count for the interface type g_type,
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 initialized by calling
the base interface init and default vtable init functions for
the type (the base_init
and class_init
members of #GTypeInfo).
Calling g_type_default_interface_ref() is useful when you
want to make sure that signals and properties for an interface
have been installed.
an interface type
Decrements the reference count for the type corresponding to the
interface default vtable g_iface
. 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 class_finalize
member of #GTypeInfo) will be called.
the default vtable structure for an interface, as returned by g_type_default_interface_ref()
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.
a #GType
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 g_type_ensure() guarantees that the type's _get_type() method is called.
a #GType
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.
an instance of a type
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).
type name to look up
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.
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).
a #GType
Returns the #GTypePlugin structure for type
.
#GType to retrieve the plugin for
Obtains data which has previously been attached to type
with g_type_set_qdata().
Note that this does not take subtyping into account; data attached to one type with g_type_set_qdata() cannot be retrieved from a subtype using g_type_get_qdata().
a #GType
a #GQuark id to identify the data
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 g_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.
This function used to initialise the type system. Since GLib 2.36, the type system is initialised automatically and this function does nothing.
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.
bitwise combination of #GTypeDebugFlags values for debugging purposes
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.
#GType value of an interface type
#GType value of an interface or instantiatable type
Returns the #GTypePlugin structure for the dynamic interface
interface_type
which has been added to instance_type,
or %NULL
if interface_type
has not been added to instance_type
or does
not have a #GTypePlugin structure. See g_type_add_interface_dynamic().
#GType of an instantiatable type
#GType of an interface type
Returns the most specific instantiatable prerequisite of an interface type. If the interface type has no instantiatable prerequisite, %G_TYPE_INVALID is returned.
See g_type_interface_add_prerequisite() for more information about prerequisites.
an interface type
Returns the #GTypeInterface structure of an interface to which the passed in class conforms.
a #GTypeClass structure
an interface ID which this class conforms to
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 to check ancestry for
possible ancestor of type
or interface that type
could conform to
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 to return name for
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.
descendant of root_type
and the type to be returned
immediate parent of the returned type
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 #GTypeQuery is 0. All members filled into the
#GTypeQuery structure should be considered constant and have to be
left untouched.
#GType of a static, classed type
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.
type from which this type will be derived
0-terminated string used as the name of the new type
#GTypePlugin structure to retrieve the #GTypeInfo from
bitwise combination of #GTypeFlags values
Registers type_id
as the predefined identifier and type_name
as the
name of a fundamental type. If type_id
is already registered, or a
type named type_name
is already registered, the behaviour is undefined.
The type system uses the information contained in the #GTypeInfo structure
pointed to by info
and the #GTypeFundamentalInfo structure pointed to by
finfo
to manage the type and its instances. The value of flags
determines
additional characteristics of the fundamental type.
a predefined type identifier
0-terminated string used as the name of the new type
#GTypeInfo structure for this type
#GTypeFundamentalInfo structure for this type
bitwise combination of #GTypeFlags values
Registers type_name
as the name of a new static type derived from
parent_type
. The type system uses the information contained in the
#GTypeInfo 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.
type from which this type will be derived
0-terminated string used as the name of the new type
#GTypeInfo structure for this type
bitwise combination of #GTypeFlags values
Attaches arbitrary data to a type.
a #GType
a #GQuark id to identify the data
the data
Check whether g_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.
Mask containing the bits of #GParamSpec.flags which are reserved for GLib.