Functions¶
| add_emission_hook(type, name, callback, *user_data) | |
| boxed_copy(boxed_type, src_boxed) | |
| boxed_free(boxed_type, boxed) | |
| cclosure_marshal_BOOLEAN__BOXED_BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_BOOLEAN__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_STRING__OBJECT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__CHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__DOUBLE(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__FLOAT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__LONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__PARAM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__UCHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__UINT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__ULONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__VARIANT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_VOID__VOID(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | |
| cclosure_marshal_generic(closure, return_gvalue, n_param_values, param_values, invocation_hint, marshal_data) | |
| clear_signal_handler(handler_id_ptr, instance) | |
| enum_complete_type_info(g_enum_type, const_values) | |
| enum_get_value(enum_class, value) | |
| enum_get_value_by_name(enum_class, name) | |
| enum_get_value_by_nick(enum_class, nick) | |
| enum_register_static(name, const_static_values) | |
| enum_to_string(g_enum_type, value) | |
| flags_complete_type_info(g_flags_type, const_values) | |
| flags_get_first_value(flags_class, value) | |
| flags_get_value_by_name(flags_class, name) | |
| flags_get_value_by_nick(flags_class, nick) | |
| flags_register_static(name, const_static_values) | |
| flags_to_string(flags_type, value) | |
| gtype_get_type() | |
| list_properties(type) | |
| new(gtype_or_similar, **kwargs) | |
| param_spec_boolean(name, nick, blurb, default_value, flags) | |
| param_spec_boxed(name, nick, blurb, boxed_type, flags) | |
| param_spec_char(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_double(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_enum(name, nick, blurb, enum_type, default_value, flags) | |
| param_spec_flags(name, nick, blurb, flags_type, default_value, flags) | |
| param_spec_float(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_gtype(name, nick, blurb, is_a_type, flags) | |
| param_spec_int(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_int64(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_long(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_object(name, nick, blurb, object_type, flags) | |
| param_spec_param(name, nick, blurb, param_type, flags) | |
| param_spec_pointer(name, nick, blurb, flags) | |
| param_spec_pool_new(type_prefixing) | |
| param_spec_string(name, nick, blurb, default_value, flags) | |
| param_spec_uchar(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_uint(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_uint64(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_ulong(name, nick, blurb, minimum, maximum, default_value, flags) | |
| param_spec_unichar(name, nick, blurb, default_value, flags) | |
| param_spec_variant(name, nick, blurb, type, default_value, flags) | |
| param_type_register_static(name, pspec_info) | |
| param_value_convert(pspec, src_value, dest_value, strict_validation) | |
| param_value_defaults(pspec, value) | |
| param_value_set_default(pspec, value) | |
| param_value_validate(pspec, value) | |
| param_values_cmp(pspec, value1, value2) | |
| pointer_type_register_static(name) | |
| remove_emission_hook(obj, detailed_signal, hook_id) | |
| signal_accumulator_first_wins(ihint, return_accu, handler_return, dummy) | |
| signal_accumulator_true_handled(ihint, return_accu, handler_return, dummy) | |
| signal_add_emission_hook(signal_id, detail, hook_func, *hook_data) | |
| signal_chain_from_overridden(instance_and_params, return_value) | |
| signal_connect_closure(instance, detailed_signal, closure, after) | |
| signal_connect_closure_by_id(instance, signal_id, detail, closure, after) | |
| signal_emitv(instance_and_params, signal_id, detail, return_value) | |
| signal_get_invocation_hint(instance) | |
| signal_handler_block(instance, handler_id) | |
| signal_handler_disconnect(instance, handler_id) | |
| signal_handler_find(instance, mask, signal_id, detail, closure, func, data) | |
| signal_handler_is_connected(instance, handler_id) | |
| signal_handler_unblock(instance, handler_id) | |
| signal_handlers_block_matched(instance, mask, signal_id, detail, closure, func, data) | |
| signal_handlers_destroy(instance) | |
| signal_handlers_disconnect_matched(instance, mask, signal_id, detail, closure, func, data) | |
| signal_handlers_unblock_matched(instance, mask, signal_id, detail, closure, func, data) | |
| signal_has_handler_pending(instance, signal_id, detail, may_be_blocked) | |
| signal_is_valid_name(name) | |
| signal_list_ids(itype) | |
| signal_list_names(type_) | |
| signal_lookup(name, itype) | |
| signal_name(signal_id) | |
| signal_new(signal_name, type, flags, return_type, param_types) | |
| signal_override_class_closure(signal_id, instance_type, class_closure) | |
| signal_parse_name(detailed_signal, itype, force_detail_quark) | |
| signal_query(signal_id) | |
| signal_remove_emission_hook(signal_id, hook_id) | |
| signal_stop_emission(instance, signal_id, detail) | |
| signal_stop_emission_by_name(instance, detailed_signal) | |
| signal_type_cclosure_new(itype, struct_offset) | |
| source_set_closure(source, closure) | |
| source_set_dummy_callback(source) | |
| strdup_value_contents(value) | |
| type_add_class_private(class_type, private_size) | |
| type_add_instance_private(class_type, private_size) | |
| type_add_interface_dynamic(instance_type, interface_type, plugin) | |
| type_add_interface_static(instance_type, interface_type, info) | |
| type_check_class_is_a(g_class, is_a_type) | |
| type_check_instance(instance) | |
| type_check_instance_is_a(instance, iface_type) | |
| type_check_instance_is_fundamentally_a(instance, fundamental_type) | |
| type_check_is_value_type(type) | |
| type_check_value(value) | |
| type_check_value_holds(value, type) | |
| type_children(type) | |
| type_class_adjust_private_offset(g_class, private_size_or_offset) | |
| type_class_peek(type) | |
| type_class_peek_static(type) | |
| type_class_ref(type) | |
| type_default_interface_peek(g_type) | |
| type_default_interface_ref(g_type) | |
| type_default_interface_unref(g_iface) | |
| type_depth(type) | |
| type_ensure(type) | |
| type_free_instance(instance) | |
| type_from_name(name) | |
| type_fundamental(type_id) | |
| type_fundamental_next() | |
| type_get_instance_count(type) | |
| type_get_plugin(type) | |
| type_get_qdata(type, quark) | |
| type_get_type_registration_serial() | |
| type_init() | |
| type_init_with_debug_flags(debug_flags) | |
| type_interface_add_prerequisite(interface_type, prerequisite_type) | |
| type_interface_get_plugin(instance_type, interface_type) | |
| type_interface_peek(instance_class, iface_type) | |
| type_interface_prerequisites(interface_type) | |
| type_interfaces(type) | |
| type_is_a(type, is_a_type) | |
| type_name(type) | |
| type_name_from_class(g_class) | |
| type_name_from_instance(instance) | |
| type_next_base(leaf_type, root_type) | |
| type_parent(type) | |
| type_qname(type) | |
| type_query(type) | |
| type_register(class_) | |
| type_register_dynamic(parent_type, type_name, plugin, flags) | |
| type_register_fundamental(type_id, type_name, info, finfo, flags) | |
| type_register_static(parent_type, type_name, info, flags) | |
| type_set_qdata(type, quark, data) | |
| type_test_flags(type, flags) | |
| value_type_compatible(src_type, dest_type) | |
| value_type_transformable(src_type, dest_type) | 
Details¶
- 
GObject.add_emission_hook(type, name, callback, *user_data)¶
- Parameters: - type (GObject.Object) – a Python GObject instance or type
- name (str) – a signal name
- callback – a function
- user_data – zero or more extra arguments that will be passed to callback
 - The add_emission_hook() function adds an emission hook for the signal specified by name, which will get called for any emission of that signal, independent of the instance. This is possible only for signals which don’t have the - GObject.SignalFlags.NO_HOOKSflag set.
- type (
- 
GObject.boxed_copy(boxed_type, src_boxed)[source]¶
- Parameters: - boxed_type (GObject.GType) – The type of src_boxed.
- src_boxed (object) – The boxed structure to be copied.
 - Returns: - The newly created copy of the boxed structure. - Return type: - Provide a copy of a boxed structure src_boxed which is of type boxed_type. 
- boxed_type (
- 
GObject.boxed_free(boxed_type, boxed)[source]¶
- Parameters: - boxed_type (GObject.GType) – The type of boxed.
- boxed (object) – The boxed structure to be freed.
 - Free the boxed structure boxed which is of type boxed_type. 
- boxed_type (
- 
GObject.cclosure_marshal_BOOLEAN__BOXED_BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – AGObject.Closure.
- return_value (GObject.Value) – AGObject.Valueto store the return value. May beNoneif the callback of closure doesn’t return a value.
- n_param_values (int) – The length of the param_values array.
- param_values (GObject.Value) – An array ofGObject.Valuesholding the arguments on which to invoke the callback of closure.
- invocation_hint (objectorNone) – The invocation hint given as the last argument toGObject.Closure.invoke().
- marshal_data (objectorNone) – Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
 - A - GObject.ClosureMarshalfunction 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- GObject.signal_accumulator_true_handled().
- closure (
- 
GObject.cclosure_marshal_BOOLEAN__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – aGObject.Valuewhich can store the returnedbool
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding instance and arg1
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)where the- intparameter denotes a flags type.
- closure (
- 
GObject.cclosure_marshal_STRING__OBJECT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – aGObject.Value, which can store the returned string
- n_param_values (int) – 3
- param_values (GObject.Value) – aGObject.Valuearray holding instance, arg1 and arg2
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theboolparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gboolean arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGObject.GBoxedparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__CHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thestrparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gchar arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__DOUBLE(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thefloatparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gdouble arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and the enumeration parameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gint arg1, gpointer user_data)where the- intparameter denotes an enumeration type..
- closure (
- 
GObject.cclosure_marshal_VOID__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and the flags parameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gint arg1, gpointer user_data)where the- intparameter denotes a flags type.
- closure (
- 
GObject.cclosure_marshal_VOID__FLOAT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thefloatparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gfloat arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gint arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__LONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, glong arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGObject.Objectparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GObject *arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__PARAM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGObject.ParamSpecparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theobjectparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gpointer arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thestrparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__UCHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and the #guchar parameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, guchar arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, guint arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__UINT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 3
- param_values (GObject.Value) – aGObject.Valuearray holding instance, arg1 and arg2
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__ULONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gulong arg1, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_VOID__VARIANT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGLib.Variantparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data).- New in version 2.26. 
- closure (
- 
GObject.cclosure_marshal_VOID__VOID(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 1
- param_values (GObject.Value) – aGObject.Valuearray holding only the instance
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gpointer user_data).
- closure (
- 
GObject.cclosure_marshal_generic(closure, return_gvalue, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – AGObject.Closure.
- return_gvalue (GObject.Value) – AGObject.Valueto store the return value. May beNoneif the callback of closure doesn’t return a value.
- n_param_values (int) – The length of the param_values array.
- param_values (GObject.Value) – An array ofGObject.Valuesholding the arguments on which to invoke the callback of closure.
- invocation_hint (objectorNone) – The invocation hint given as the last argument toGObject.Closure.invoke().
- marshal_data (objectorNone) – Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
 - A generic marshaller function implemented via libffi. - Normally this function is not passed explicitly to - GObject.signal_new(), but used automatically by GLib when specifying a- Nonemarshaller.- New in version 2.30. 
- closure (
- 
GObject.clear_signal_handler(handler_id_ptr, instance)[source]¶
- Parameters: - handler_id_ptr (int) – A pointer to a handler ID (of typeint) of the handler to be disconnected.
- instance (GObject.Object) – The instance to remove the signal handler from.
 - 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. - A macro is also included that allows this function to be used without pointer casts. - New in version 2.62. 
- handler_id_ptr (
- 
GObject.enum_complete_type_info(g_enum_type, const_values)[source]¶
- Parameters: - g_enum_type (GObject.GType) – the type identifier of the type being completed
- const_values (GObject.EnumValue) – An array ofGObject.EnumValuestructs for the possible enumeration values. The array is terminated by a struct with all members being 0.
 - Returns: - the - GObject.TypeInfostruct to be filled in- Return type: - info: - GObject.TypeInfo- This function is meant to be called from the - complete_type_infofunction of a- GObject.TypePluginimplementation, 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); } 
- g_enum_type (
- 
GObject.enum_get_value(enum_class, value)[source]¶
- Parameters: - enum_class (GObject.EnumClass) – aGObject.EnumClass
- value (int) – the value to look up
 - Returns: - the - GObject.EnumValuefor value, or- Noneif value is not a member of the enumeration- Return type: - Returns the - GObject.EnumValuefor a value.
- enum_class (
- 
GObject.enum_get_value_by_name(enum_class, name)[source]¶
- Parameters: - enum_class (GObject.EnumClass) – aGObject.EnumClass
- name (str) – the name to look up
 - Returns: - the - GObject.EnumValuewith name name, or- Noneif the enumeration doesn’t have a member with that name- Return type: - Looks up a - GObject.EnumValueby name.
- enum_class (
- 
GObject.enum_get_value_by_nick(enum_class, nick)[source]¶
- Parameters: - enum_class (GObject.EnumClass) – aGObject.EnumClass
- nick (str) – the nickname to look up
 - Returns: - the - GObject.EnumValuewith nickname nick, or- Noneif the enumeration doesn’t have a member with that nickname- Return type: - Looks up a - GObject.EnumValueby nickname.
- enum_class (
- 
GObject.enum_register_static(name, const_static_values)[source]¶
- Parameters: - name (str) – A nul-terminated string used as the name of the new type.
- const_static_values (GObject.EnumValue) – An array ofGObject.EnumValuestructs for the possible enumeration values. The array is terminated by a struct with all members being 0.GObject.Objectkeeps a reference to the data, so it cannot be stack-allocated.
 - Returns: - The new type identifier. - Return type: - Registers a new static enumeration type with the name name. - It is normally more convenient to let glib-mkenums, generate a my_enum_get_type() function from a usual C enumeration definition than to write one yourself using - GObject.enum_register_static().
- name (
- 
GObject.enum_to_string(g_enum_type, value)[source]¶
- Parameters: - g_enum_type (GObject.GType) – the type identifier of aGObject.EnumClasstype
- value (int) – the value
 - Returns: - a newly-allocated text string - Return type: - 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. - New in version 2.54. 
- g_enum_type (
- 
GObject.flags_complete_type_info(g_flags_type, const_values)[source]¶
- Parameters: - g_flags_type (GObject.GType) – the type identifier of the type being completed
- const_values (GObject.FlagsValue) – An array ofGObject.FlagsValuestructs for the possible enumeration values. The array is terminated by a struct with all members being 0.
 - Returns: - the - GObject.TypeInfostruct to be filled in- Return type: - info: - GObject.TypeInfo- This function is meant to be called from the complete_type_info() function of a - GObject.TypePluginimplementation, see the example for- GObject.enum_complete_type_info() above.
- g_flags_type (
- 
GObject.flags_get_first_value(flags_class, value)[source]¶
- Parameters: - flags_class (GObject.FlagsClass) – aGObject.FlagsClass
- value (int) – the value
 - Returns: - the first - GObject.FlagsValuewhich is set in value, or- Noneif none is set- Return type: - Returns the first - GObject.FlagsValuewhich is set in value.
- flags_class (
- 
GObject.flags_get_value_by_name(flags_class, name)[source]¶
- Parameters: - flags_class (GObject.FlagsClass) – aGObject.FlagsClass
- name (str) – the name to look up
 - Returns: - the - GObject.FlagsValuewith name name, or- Noneif there is no flag with that name- Return type: - Looks up a - GObject.FlagsValueby name.
- flags_class (
- 
GObject.flags_get_value_by_nick(flags_class, nick)[source]¶
- Parameters: - flags_class (GObject.FlagsClass) – aGObject.FlagsClass
- nick (str) – the nickname to look up
 - Returns: - the - GObject.FlagsValuewith nickname nick, or- Noneif there is no flag with that nickname- Return type: - Looks up a - GObject.FlagsValueby nickname.
- flags_class (
- 
GObject.flags_register_static(name, const_static_values)[source]¶
- Parameters: - name (str) – A nul-terminated string used as the name of the new type.
- const_static_values (GObject.FlagsValue) – An array ofGObject.FlagsValuestructs for the possible flags values. The array is terminated by a struct with all members being 0.GObject.Objectkeeps a reference to the data, so it cannot be stack-allocated.
 - Returns: - The new type identifier. - Return type: - Registers a new static flags type with the name name. - It is normally more convenient to let glib-mkenums generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using - GObject.flags_register_static().
- name (
- 
GObject.flags_to_string(flags_type, value)[source]¶
- Parameters: - flags_type (GObject.GType) – the type identifier of aGObject.FlagsClasstype
- value (int) – the value
 - Returns: - a newly-allocated text string - Return type: - 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. - New in version 2.54. 
- flags_type (
- 
GObject.gtype_get_type()[source]¶
- Return type: - GObject.GType
- 
GObject.list_properties(type)¶
- Parameters: - type ( - GObject.Object) – a Python GObject instance or type that the signal is associated with- Returns: - a list of - GObject.ParamSpec- Return type: - [ - GObject.ParamSpec]- Takes a GObject/GInterface subclass or a GType and returns a list of GParamSpecs for all properties of type. 
- 
GObject.new(gtype_or_similar, **kwargs)¶
- Parameters: - type (GObject.Object) – a Python GObject type
- kwargs – set of property-value pairs
 - Returns: - a new object of the specified type - The Gobject.new() function returns a new object of the specified type. type must specify a type that is a descendant of gobject.GObject. GObject properties can set via keyword arguments. 
- type (
- 
GObject.param_spec_boolean(name, nick, blurb, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- default_value (bool) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecBooleaninstance specifying a- GObject.TYPE_BOOLEANproperty. In many cases, it may be more appropriate to use an enum with- GObject.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 (
- 
GObject.param_spec_boxed(name, nick, blurb, boxed_type, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- boxed_type (GObject.GType) –GObject.TYPE_BOXEDderived type of this property
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecBoxedinstance specifying a- GObject.TYPE_BOXEDderived property.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_char(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecCharinstance specifying a- GObject.TYPE_CHARproperty.
- name (
- 
GObject.param_spec_double(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (float) – minimum value for the property specified
- maximum (float) – maximum value for the property specified
- default_value (float) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecDoubleinstance specifying a- GObject.TYPE_DOUBLEproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_enum(name, nick, blurb, enum_type, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- enum_type (GObject.GType) – aGObject.GTypederived fromGObject.TYPE_ENUM
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecEnuminstance specifying a- GObject.TYPE_ENUMproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_flags(name, nick, blurb, flags_type, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- flags_type (GObject.GType) – aGObject.GTypederived fromGObject.TYPE_FLAGS
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecFlagsinstance specifying a- GObject.TYPE_FLAGSproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_float(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (float) – minimum value for the property specified
- maximum (float) – maximum value for the property specified
- default_value (float) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecFloatinstance specifying a- GObject.TYPE_FLOATproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_gtype(name, nick, blurb, is_a_type, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- is_a_type (GObject.GType) – aGObject.GTypewhose subtypes are allowed as values of the property (useGObject.TYPE_NONEfor any type)
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecGTypeinstance specifying a- GObject.TYPE_GTYPEproperty.- See g_param_spec_internal() for details on property names. - New in version 2.10. 
- name (
- 
GObject.param_spec_int(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecIntinstance specifying a- GObject.TYPE_INTproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_int64(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecInt64instance specifying a- GObject.TYPE_INT64property.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_long(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecLonginstance specifying a- GObject.TYPE_LONGproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_object(name, nick, blurb, object_type, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- object_type (GObject.GType) –GObject.TYPE_OBJECTderived type of this property
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecBoxedinstance specifying a- GObject.TYPE_OBJECTderived property.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_param(name, nick, blurb, param_type, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- param_type (GObject.GType) – aGObject.GTypederived fromGObject.TYPE_PARAM
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecParaminstance specifying a- GObject.TYPE_PARAMproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_pointer(name, nick, blurb, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecPointerinstance specifying a pointer property. Where possible, it is better to use- GObject.param_spec_object() or- GObject.param_spec_boxed() to expose memory management information.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_pool_new(type_prefixing)[source]¶
- Parameters: - type_prefixing ( - bool) – Whether the pool will support type-prefixed property names.- Returns: - a newly allocated - GObject.ParamSpecPool.- Return type: - GObject.ParamSpecPool- Creates a new - GObject.ParamSpecPool.- If type_prefixing is - True, lookups in the newly created pool will allow to specify the owner as a colon-separated prefix of the property name, like “GtkContainer:border-width”. This feature is deprecated, so you should always set type_prefixing to- False.
- 
GObject.param_spec_string(name, nick, blurb, default_value, flags)[source]¶
- Parameters: - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecStringinstance.- See g_param_spec_internal() for details on property names. 
- 
GObject.param_spec_uchar(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecUCharinstance specifying a- GObject.TYPE_UCHARproperty.
- name (
- 
GObject.param_spec_uint(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecUIntinstance specifying a- GObject.TYPE_UINTproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_uint64(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecUInt64instance specifying a- GObject.TYPE_UINT64property.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_ulong(name, nick, blurb, minimum, maximum, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- minimum (int) – minimum value for the property specified
- maximum (int) – maximum value for the property specified
- default_value (int) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecULonginstance specifying a- GObject.TYPE_ULONGproperty.- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_unichar(name, nick, blurb, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- default_value (str) – default value for the property specified
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - a newly created parameter specification - Return type: - Creates a new - GObject.ParamSpecUnicharinstance specifying a- GObject.TYPE_UINTproperty.- GObject.Valuestructures for this property can be accessed with- GObject.Value.set_uint() and- GObject.Value.get_uint().- See g_param_spec_internal() for details on property names. 
- name (
- 
GObject.param_spec_variant(name, nick, blurb, type, default_value, flags)[source]¶
- Parameters: - name (str) – canonical name of the property specified
- nick (str) – nick name for the property specified
- blurb (str) – description of the property specified
- type (GLib.VariantType) – aGLib.VariantType
- default_value (GLib.VariantorNone) – aGLib.Variantof type type to use as the default value, orNone
- flags (GObject.ParamFlags) – flags for the property specified
 - Returns: - the newly created - GObject.ParamSpec- Return type: - Creates a new - GObject.ParamSpecVariantinstance specifying a- GLib.Variantproperty.- If default_value is floating, it is consumed. - See g_param_spec_internal() for details on property names. - New in version 2.26. 
- name (
- 
GObject.param_type_register_static(name, pspec_info)[source]¶
- Parameters: - name (str) – 0-terminated string used as the name of the newGObject.ParamSpectype.
- pspec_info (GObject.ParamSpecTypeInfo) – TheGObject.ParamSpecTypeInfofor thisGObject.ParamSpectype.
 - Returns: - The new type identifier. - Return type: - Registers name as the name of a new static type derived from - GObject.TYPE_PARAM. The type system uses the information contained in the- GObject.ParamSpecTypeInfostructure pointed to by info to manage the- GObject.ParamSpectype and its instances.
- name (
- 
GObject.param_value_convert(pspec, src_value, dest_value, strict_validation)[source]¶
- Parameters: - pspec (GObject.ParamSpec) – a validGObject.ParamSpec
- src_value (GObject.Value) – sourceGObject.Value
- dest_value (GObject.Value) – destinationGObject.Valueof correct type for pspec
- strict_validation (bool) –Truerequires dest_value to conform to pspec without modifications
 - Returns: - Trueif transformation and validation were successful,- Falseotherwise and dest_value is left untouched.- Return 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 - Truethis function will only succeed if the transformed dest_value complied to pspec without modifications.- See also - GObject.Value.type_transformable(),- GObject.Value.transform() and- GObject.param_value_validate().
- pspec (
- 
GObject.param_value_defaults(pspec, value)[source]¶
- Parameters: - pspec (GObject.ParamSpec) – a validGObject.ParamSpec
- value (GObject.Value) – aGObject.Valueof correct type for pspec
 - Returns: - whether value contains the canonical default for this pspec - Return type: - Checks whether value contains the default value as specified in pspec. 
- pspec (
- 
GObject.param_value_set_default(pspec, value)[source]¶
- Parameters: - pspec (GObject.ParamSpec) – a validGObject.ParamSpec
- value (GObject.Value) – aGObject.Valueof correct type for pspec; since 2.64, you can also pass an emptyGObject.Value, initialized with %G_VALUE_INIT
 - Sets value to its default value as specified in pspec. 
- pspec (
- 
GObject.param_value_validate(pspec, value)[source]¶
- Parameters: - pspec (GObject.ParamSpec) – a validGObject.ParamSpec
- value (GObject.Value) – aGObject.Valueof correct type for pspec
 - Returns: - whether modifying value was necessary to ensure validity - Return type: - Ensures that the contents of value comply with the specifications set out by pspec. For example, a - GObject.ParamSpecIntmight 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 (
- 
GObject.param_values_cmp(pspec, value1, value2)[source]¶
- Parameters: - pspec (GObject.ParamSpec) – a validGObject.ParamSpec
- value1 (GObject.Value) – aGObject.Valueof correct type for pspec
- value2 (GObject.Value) – aGObject.Valueof correct type for pspec
 - Returns: - -1, 0 or +1, for a less than, equal to or greater than result - Return type: - 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 (
- 
GObject.pointer_type_register_static(name)[source]¶
- Parameters: - name ( - str) – the name of the new pointer type.- Returns: - a new - GObject.TYPE_POINTERderived type id for name.- Return type: - GObject.GType- Creates a new - GObject.TYPE_POINTERderived type id for a new pointer type with name name.
- 
GObject.remove_emission_hook(obj, detailed_signal, hook_id)¶
- 
GObject.signal_accumulator_first_wins(ihint, return_accu, handler_return, dummy)[source]¶
- Parameters: - ihint (GObject.SignalInvocationHint) – standardGObject.SignalAccumulatorparameter
- return_accu (GObject.Value) – standardGObject.SignalAccumulatorparameter
- handler_return (GObject.Value) – standardGObject.SignalAccumulatorparameter
- dummy (objectorNone) – standardGObject.SignalAccumulatorparameter
 - Returns: - standard - GObject.SignalAccumulatorresult- Return type: - A predefined - GObject.SignalAccumulatorfor 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”). - New in version 2.28. 
- ihint (
- 
GObject.signal_accumulator_true_handled(ihint, return_accu, handler_return, dummy)[source]¶
- Parameters: - ihint (GObject.SignalInvocationHint) – standardGObject.SignalAccumulatorparameter
- return_accu (GObject.Value) – standardGObject.SignalAccumulatorparameter
- handler_return (GObject.Value) – standardGObject.SignalAccumulatorparameter
- dummy (objectorNone) – standardGObject.SignalAccumulatorparameter
 - Returns: - standard - GObject.SignalAccumulatorresult- Return type: - A predefined - GObject.SignalAccumulatorfor signals that return a boolean values. The behavior that this accumulator gives is that a return of- Truestops the signal emission: no further callbacks will be invoked, while a return of- Falseallows the emission to continue. The idea here is that a- Truereturn indicates that the callback handled the signal, and no further handling is needed.- New in version 2.4. 
- ihint (
- 
GObject.signal_add_emission_hook(signal_id, detail, hook_func, *hook_data)[source]¶
- Parameters: - signal_id (int) – the signal identifier, as returned byGObject.signal_lookup().
- detail (int) – the detail on which to call the hook.
- hook_func (GObject.SignalEmissionHook) – aGObject.SignalEmissionHookfunction.
- hook_data (objectorNone) – user data for hook_func.
 - Returns: - the hook id, for later use with - GObject.signal_remove_emission_hook().- Return type: - 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 - GObject.SignalFlags.NO_HOOKSflag set.
- signal_id (
- 
GObject.signal_chain_from_overridden(instance_and_params, return_value)[source]¶
- Parameters: - instance_and_params ([GObject.Value]) – the argument list of the signal emission. The first element in the array is aGObject.Valuefor the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.
- return_value (GObject.Value) – Location for the return value.
 - Calls the original class closure of a signal. This function should only be called from an overridden class closure; see - GObject.signal_override_class_closure() and g_signal_override_class_handler().
- instance_and_params ([
- 
GObject.signal_connect_closure(instance, detailed_signal, closure, after)[source]¶
- Parameters: - instance (GObject.Object) – the instance to connect to.
- detailed_signal (str) – a string of the form “signal-name::detail”.
- closure (GObject.Closure) – the closure to connect.
- after (bool) – whether the handler should be called before or after the default handler of the signal.
 - Returns: - the handler ID (always greater than 0 for successful connections) - Return type: - Connects a closure to a signal for a particular object. 
- instance (
- 
GObject.signal_connect_closure_by_id(instance, signal_id, detail, closure, after)[source]¶
- Parameters: - instance (GObject.Object) – the instance to connect to.
- signal_id (int) – the id of the signal.
- detail (int) – the detail.
- closure (GObject.Closure) – the closure to connect.
- after (bool) – whether the handler should be called before or after the default handler of the signal.
 - Returns: - the handler ID (always greater than 0 for successful connections) - Return type: - Connects a closure to a signal for a particular object. 
- instance (
- 
GObject.signal_emitv(instance_and_params, signal_id, detail, return_value)[source]¶
- Parameters: - instance_and_params ([GObject.Value]) – argument list for the signal emission. The first element in the array is aGObject.Valuefor the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.
- signal_id (int) – the signal id
- detail (int) – the detail
- return_value (GObject.Value) – 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: - 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. - Return type: - return_value: - GObject.Value- Emits a signal. - Note that - GObject.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 ([
- 
GObject.signal_get_invocation_hint(instance)[source]¶
- Parameters: - instance ( - GObject.Object) – the instance to query- Returns: - the invocation hint of the innermost signal emission. - Return type: - GObject.SignalInvocationHint- Returns the invocation hint of the innermost signal emission of instance. 
- 
GObject.signal_handler_block(instance, handler_id)[source]¶
- Blocks the signal handler from being invoked until handler_unblock() is called. - Parameters: - obj (GObject.Object) – Object instance to block handlers for.
- handler_id (int) – Id of signal to block.
 - Returns: - A context manager which optionally can be used to automatically unblock the handler: - with GObject.signal_handler_block(obj, id): pass 
- 
GObject.signal_handler_disconnect(instance, handler_id)[source]¶
- Parameters: - instance (GObject.Object) – The instance to remove the signal handler from.
- handler_id (int) – Handler id of the handler to be disconnected.
 - 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 (
- 
GObject.signal_handler_find(instance, mask, signal_id, detail, closure, func, data)[source]¶
- Parameters: - instance (GObject.Object) – The instance owning the signal handler to be found.
- mask (GObject.SignalMatchType) – Mask indicating which of signal_id, detail, closure, func and/or data the handler has to match.
- signal_id (int) – Signal the handler has to be connected to.
- detail (int) – Signal detail the handler has to be connected to.
- closure (GObject.ClosureorNone) – The closure the handler will invoke.
- func (objectorNone) – The C closure callback of the handler (useless for non-C closures).
- data (objectorNone) – The closure data of the handler’s closure.
 - Returns: - A valid non-0 signal handler id for a successful match. - Return type: - Finds the first signal handler that matches certain selection criteria. The criteria mask is passed as an OR-ed combination of - GObject.SignalMatchTypeflags, 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 (
- 
GObject.signal_handler_is_connected(instance, handler_id)[source]¶
- Parameters: - instance (GObject.Object) – The instance where a signal handler is sought.
- handler_id (int) – the handler ID.
 - Returns: - whether handler_id identifies a handler connected to instance. - Return type: - Returns whether handler_id is the ID of a handler connected to instance. 
- instance (
- 
GObject.signal_handler_unblock(instance, handler_id)[source]¶
- Parameters: - instance (GObject.Object) – The instance to unblock the signal handler of.
- handler_id (int) – Handler id of the handler to be unblocked.
 - Undoes the effect of a previous - GObject.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 (
- 
GObject.signal_handlers_block_matched(instance, mask, signal_id, detail, closure, func, data)[source]¶
- Parameters: - instance (GObject.Object) – The instance to block handlers from.
- mask (GObject.SignalMatchType) – Mask indicating which of signal_id, detail, closure, func and/or data the handlers have to match.
- signal_id (int) – Signal the handlers have to be connected to.
- detail (int) – Signal detail the handlers have to be connected to.
- closure (GObject.ClosureorNone) – The closure the handlers will invoke.
- func (objectorNone) – The C closure callback of the handlers (useless for non-C closures).
- data (objectorNone) – The closure data of the handlers’ closures.
 - Returns: - The number of handlers that matched. - Return type: - Blocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of - GObject.SignalMatchTypeflags, and the criteria values are passed as arguments. Passing at least one of the- GObject.SignalMatchType.CLOSURE,- GObject.SignalMatchType.FUNCor- GObject.SignalMatchType.DATAmatch flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.
- instance (
- 
GObject.signal_handlers_destroy(instance)[source]¶
- Parameters: - instance ( - GObject.Object) – The instance whose signal handlers are destroyed- Destroy all signal handlers of a type instance. This function is an implementation detail of the - GObject.Objectdispose implementation, and should not be used outside of the type system.
- 
GObject.signal_handlers_disconnect_matched(instance, mask, signal_id, detail, closure, func, data)[source]¶
- Parameters: - instance (GObject.Object) – The instance to remove handlers from.
- mask (GObject.SignalMatchType) – Mask indicating which of signal_id, detail, closure, func and/or data the handlers have to match.
- signal_id (int) – Signal the handlers have to be connected to.
- detail (int) – Signal detail the handlers have to be connected to.
- closure (GObject.ClosureorNone) – The closure the handlers will invoke.
- func (objectorNone) – The C closure callback of the handlers (useless for non-C closures).
- data (objectorNone) – The closure data of the handlers’ closures.
 - Returns: - The number of handlers that matched. - Return type: - Disconnects all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of - GObject.SignalMatchTypeflags, and the criteria values are passed as arguments. Passing at least one of the- GObject.SignalMatchType.CLOSURE,- GObject.SignalMatchType.FUNCor- GObject.SignalMatchType.DATAmatch flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.
- instance (
- 
GObject.signal_handlers_unblock_matched(instance, mask, signal_id, detail, closure, func, data)[source]¶
- Parameters: - instance (GObject.Object) – The instance to unblock handlers from.
- mask (GObject.SignalMatchType) – Mask indicating which of signal_id, detail, closure, func and/or data the handlers have to match.
- signal_id (int) – Signal the handlers have to be connected to.
- detail (int) – Signal detail the handlers have to be connected to.
- closure (GObject.ClosureorNone) – The closure the handlers will invoke.
- func (objectorNone) – The C closure callback of the handlers (useless for non-C closures).
- data (objectorNone) – The closure data of the handlers’ closures.
 - Returns: - The number of handlers that matched. - Return type: - Unblocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of - GObject.SignalMatchTypeflags, and the criteria values are passed as arguments. Passing at least one of the- GObject.SignalMatchType.CLOSURE,- GObject.SignalMatchType.FUNCor- GObject.SignalMatchType.DATAmatch 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.
- instance (
- 
GObject.signal_has_handler_pending(instance, signal_id, detail, may_be_blocked)[source]¶
- Parameters: - instance (GObject.Object) – the object whose signal handlers are sought.
- signal_id (int) – the signal id.
- detail (int) – the detail.
- may_be_blocked (bool) – whether blocked handlers should count as match.
 - Returns: - Trueif a handler is connected to the signal,- Falseotherwise.- Return type: - 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 (
- 
GObject.signal_is_valid_name(name)[source]¶
- Parameters: - name ( - str) – the canonical name of the signal- Returns: - Trueif name is a valid signal name,- Falseotherwise.- Return type: - bool- 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 for details of the rules for valid names. The rules for signal names are the same as those for property names. - New in version 2.66. 
- 
GObject.signal_list_ids(itype)[source]¶
- Parameters: - itype ( - GObject.GType) – Instance or interface type.- Returns: - Newly allocated array of signal IDs. - Return type: - [ - int]- Lists the signals by id that a certain instance or interface type created. Further information about the signals can be acquired through - GObject.signal_query().
- 
GObject.signal_list_names(type_)¶
- Returns a list of signal names for the given type - Parameters: - type_ ( - GObject.GType) –- Returns: - A list of signal names - Return type: - list
- 
GObject.signal_lookup(name, itype)[source]¶
- Parameters: - name (str) – the signal’s name.
- itype (GObject.GType) – the type that the signal operates on.
 - Returns: - the signal’s identifying number, or 0 if no signal was found. - Return 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 - GObject.TypeClass.ref()) for this function to work, as signals are always installed during class initialization.- See - GObject.signal_new() for details on allowed signal names.
- name (
- 
GObject.signal_name(signal_id)[source]¶
- Parameters: - signal_id ( - int) – the signal’s identifying number.- Returns: - the signal name, or - Noneif the signal number was invalid.- Return type: - str- Given the signal’s identifier, finds its name. - Two different signals may have the same name, if they have differing types. 
- 
GObject.signal_new(signal_name, type, flags, return_type, param_types)[source]¶
- Parameters: - signal_name (str) – the name of the signal
- type (GObject.Object) – a Python GObject instance or type that the signal is associated with
- flags (GObject.SignalFlags) – the signal flags
- return_type (type) – the return type of the signal handler
- param_types ([type]) – the parameter types passed to the signal handler
 - Returns: - a unique integer signal ID - Return type: - The - GObject.signal_new() function registers a signal with the specified signal_name for the specified object type.- return_type is the type of the return value from a signal handler and may be a gobject type, type ID or instance. The param_types parameter is a list of additional types that are passed to the signal handler. Each parameter type may be specified as a gobject type, type ID or instance. For example, to add a signal to the - Gtk.Windowtype called “my-signal” that calls a handler with a- Gtk.Buttonwidget and an integer value and a return value that is a boolean, use:- GObject.signal_new("my_signal", Gtk.Window, GObject.SignalFlags.RUN_LAST, GObject.TYPE_BOOLEAN, (Gtk.Button, GObject.TYPE_INT)) 
- signal_name (
- 
GObject.signal_override_class_closure(signal_id, instance_type, class_closure)[source]¶
- Parameters: - signal_id (int) – the signal id
- instance_type (GObject.GType) – the instance type on which to override the class closure for the signal.
- class_closure (GObject.Closure) – the 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 - GObject.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 (
- 
GObject.signal_parse_name(detailed_signal, itype, force_detail_quark)[source]¶
- Parse a detailed signal name into (signal_id, detail). - Parameters: - detailed_signal (str) – Signal name which can include detail. For example: “notify:prop_name” - Returns: - Tuple of (signal_id, detail) - Raises: - ValueError – If the given signal is unknown. 
- 
GObject.signal_query(signal_id)[source]¶
- Parameters: - signal_id ( - int) – The signal id of the signal to query information for.- Returns: - A user provided structure that is filled in with constant values upon success. - Return type: - query: - GObject.SignalQuery- Queries the signal system for in-depth information about a specific signal. This function will fill in a user-provided structure to hold signal-specific information. If an invalid signal id is passed in, the signal_id member of the - GObject.SignalQueryis 0. All members filled into the- GObject.SignalQuerystructure should be considered constant and have to be left untouched.
- 
GObject.signal_remove_emission_hook(signal_id, hook_id)[source]¶
- Parameters: - signal_id (int) – the id of the signal
- hook_id (int) – the id of the emission hook, as returned byGObject.signal_add_emission_hook()
 - Deletes an emission hook. 
- signal_id (
- 
GObject.signal_stop_emission(instance, signal_id, detail)[source]¶
- Parameters: - instance (GObject.Object) – the object whose signal handlers you wish to stop.
- signal_id (int) – the signal identifier, as returned byGObject.signal_lookup().
- detail (int) – the detail which the signal was emitted with.
 - Stops a signal’s current emission. - This will prevent the default method from running, if the signal was - GObject.SignalFlags.RUN_LASTand you connected normally (i.e. without the “after” flag).- Prints a warning if used on a signal which isn’t being emitted. 
- instance (
- 
GObject.signal_stop_emission_by_name(instance, detailed_signal)[source]¶
- Parameters: - instance (GObject.Object) – the object whose signal handlers you wish to stop.
- detailed_signal (str) – a string of the form “signal-name::detail”.
 - Stops a signal’s current emission. - This is just like - GObject.signal_stop_emission() except it will look up the signal id for you.
- instance (
- 
GObject.signal_type_cclosure_new(itype, struct_offset)[source]¶
- Parameters: - itype (GObject.GType) – theGObject.GTypeidentifier of an interface or classed type
- struct_offset (int) – the offset of the member function of itype’s class structure which is to be invoked by the new closure
 - Returns: - a floating reference to a new - GObject.CClosure- Return type: - 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 (
- 
GObject.source_set_closure(source, closure)[source]¶
- Parameters: - source (GLib.Source) – the source
- closure (GObject.Closure) – aGObject.Closure
 - Set the callback for a source as a - GObject.Closure.- If the source is not one of the standard GLib types, the closure_callback and closure_marshal fields of the - GLib.SourceFuncsstructure must have been filled in with pointers to appropriate functions.
- source (
- 
GObject.source_set_dummy_callback(source)[source]¶
- Parameters: - source ( - GLib.Source) – the source- Sets a dummy callback for source. The callback will do nothing, and if the source expects a - boolreturn value, it will return- True. (If the source expects any other type of return value, it will return a 0/- Nonevalue; whatever- GObject.Value.init() initializes a- GObject.Valueto for that type.)- If the source is not one of the standard GLib types, the closure_callback and closure_marshal fields of the - GLib.SourceFuncsstructure must have been filled in with pointers to appropriate functions.
- 
GObject.strdup_value_contents(value)[source]¶
- Parameters: - value ( - GObject.Value) –- GObject.Valuewhich contents are to be described.- Returns: - Newly allocated string. - Return type: - str- Return a newly allocated string, which describes the contents of a - GObject.Value. The main purpose of this function is to describe- GObject.Valuecontents for debugging output, the way in which the contents are described may change between different GLib versions.
- 
GObject.type_add_class_private(class_type, private_size)[source]¶
- Parameters: - class_type (GObject.GType) –GObject.GTypeof a classed type
- private_size (int) – size of private structure
 - 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. - New in version 2.24. 
- class_type (
- 
GObject.type_add_instance_private(class_type, private_size)[source]¶
- Parameters: - class_type (GObject.GType) –
- private_size (int) –
 - Return type: 
- class_type (
- 
GObject.type_add_interface_dynamic(instance_type, interface_type, plugin)[source]¶
- Parameters: - instance_type (GObject.GType) –GObject.GTypevalue of an instantiable type
- interface_type (GObject.GType) –GObject.GTypevalue of an interface type
- plugin (GObject.TypePlugin) –GObject.TypePluginstructure to retrieve theGObject.InterfaceInfofrom
 - Adds interface_type to the dynamic instantiable_type. The information contained in the - GObject.TypePluginstructure pointed to by plugin is used to manage the relationship.
- instance_type (
- 
GObject.type_add_interface_static(instance_type, interface_type, info)[source]¶
- Parameters: - instance_type (GObject.GType) –GObject.GTypevalue of an instantiable type
- interface_type (GObject.GType) –GObject.GTypevalue of an interface type
- info (GObject.InterfaceInfo) –GObject.InterfaceInfostructure for this (instance_type, interface_type) combination
 - Adds interface_type to the static instantiable_type. The information contained in the - GObject.InterfaceInfostructure pointed to by info is used to manage the relationship.
- instance_type (
- 
GObject.type_check_class_is_a(g_class, is_a_type)[source]¶
- Parameters: - g_class (GObject.TypeClass) –
- is_a_type (GObject.GType) –
 - Return type: 
- g_class (
- 
GObject.type_check_instance(instance)[source]¶
- Parameters: - instance ( - GObject.TypeInstance) – a valid- GObject.TypeInstancestructure- Returns: - Trueif instance is valid,- Falseotherwise- Return type: - bool- Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro. 
- 
GObject.type_check_instance_is_a(instance, iface_type)[source]¶
- Parameters: - instance (GObject.TypeInstance) –
- iface_type (GObject.GType) –
 - Return type: 
- instance (
- 
GObject.type_check_instance_is_fundamentally_a(instance, fundamental_type)[source]¶
- Parameters: - instance (GObject.TypeInstance) –
- fundamental_type (GObject.GType) –
 - Return type: 
- instance (
- 
GObject.type_check_is_value_type(type)[source]¶
- Parameters: - type ( - GObject.GType) –- Return type: - bool
- 
GObject.type_check_value(value)[source]¶
- Parameters: - value ( - GObject.Value) –- Return type: - bool
- 
GObject.type_check_value_holds(value, type)[source]¶
- Parameters: - value (GObject.Value) –
- type (GObject.GType) –
 - Return type: 
- value (
- 
GObject.type_children(type)[source]¶
- Parameters: - type ( - GObject.GType) – the parent type- Returns: - Newly allocated and 0-terminated array of child types, free with - GLib.free()- Return type: - [ - GObject.GType]- Return a newly allocated and 0-terminated array of type IDs, listing the child types of type. 
- 
GObject.type_class_peek(type)[source]¶
- Parameters: - type ( - GObject.GType) – type ID of a classed type- Returns: - the - GObject.TypeClassstructure for the given type ID or- Noneif the class does not currently exist- Return type: - GObject.TypeClass- This function is essentially the same as - GObject.TypeClass.ref(), except that the classes reference count isn’t incremented. As a consequence, this function may return- Noneif the class of the type passed in does not currently exist (hasn’t been referenced before).
- 
GObject.type_class_peek_static(type)[source]¶
- Parameters: - type ( - GObject.GType) – type ID of a classed type- Returns: - the - GObject.TypeClassstructure for the given type ID or- Noneif the class does not currently exist or is dynamically loaded- Return type: - GObject.TypeClass- A more efficient version of - GObject.TypeClass.peek() which works only for static types.- New in version 2.4. 
- 
GObject.type_class_ref(type)[source]¶
- Parameters: - type ( - GObject.GType) – type ID of a classed type- Returns: - the - GObject.TypeClassstructure for the given type ID- Return type: - GObject.TypeClass- Increments the reference count of the class structure belonging to type. This function will demand-create the class if it doesn’t exist already. 
- 
GObject.type_default_interface_peek(g_type)[source]¶
- Parameters: - g_type ( - GObject.GType) – an interface type- Returns: - the default vtable for the interface, or - Noneif the type is not currently in use- Return type: - GObject.TypeInterface- If the interface type g_type is currently in use, returns its default interface vtable. - New in version 2.4. 
- 
GObject.type_default_interface_ref(g_type)[source]¶
- Parameters: - g_type ( - GObject.GType) – an interface type- Returns: - the default vtable for the interface; call - GObject.type_default_interface_unref() when you are done using the interface.- Return type: - GObject.TypeInterface- 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 - GObject.TypeInfo). Calling- GObject.type_default_interface_ref() is useful when you want to make sure that signals and properties for an interface have been installed.- New in version 2.4. 
- 
GObject.type_default_interface_unref(g_iface)[source]¶
- Parameters: - g_iface ( - GObject.TypeInterface) – the default vtable structure for an interface, as returned by- GObject.type_default_interface_ref()- 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 - GObject.TypeInfo) will be called.- New in version 2.4. 
- 
GObject.type_depth(type)[source]¶
- Parameters: - type ( - GObject.GType) – a- GObject.GType- Returns: - the depth of type - Return type: - int- 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. 
- 
GObject.type_ensure(type)[source]¶
- Parameters: - type ( - GObject.GType) – a- GObject.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 - GObject.type_ensure() guarantees that the type’s _get_type() method is called.- New in version 2.34. 
- 
GObject.type_free_instance(instance)[source]¶
- Parameters: - instance ( - GObject.TypeInstance) – an instance of a type- 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. 
- 
GObject.type_from_name(name)[source]¶
- Parameters: - name ( - str) – type name to look up- Returns: - corresponding type ID or 0 - Return type: - GObject.GType- 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). 
- 
GObject.type_fundamental(type_id)[source]¶
- Parameters: - type_id ( - GObject.GType) – valid type ID- Returns: - fundamental type ID - Return type: - GObject.GType- Internal function, used to extract the fundamental type ID portion. Use G_TYPE_FUNDAMENTAL() instead. 
- 
GObject.type_fundamental_next()[source]¶
- Returns: - the next available fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs - Return type: - GObject.GType- Returns the next free fundamental type id which can be used to register a new fundamental type with - GObject.type_register_fundamental(). The returned type ID represents the highest currently registered fundamental type identifier.
- 
GObject.type_get_instance_count(type)[source]¶
- Parameters: - type ( - GObject.GType) – a- GObject.GType- Returns: - the number of instances allocated of the given type; if instance counts are not available, returns 0. - Return type: - int- 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). - New in version 2.44. 
- 
GObject.type_get_plugin(type)[source]¶
- Parameters: - type ( - GObject.GType) –- GObject.GTypeto retrieve the plugin for- Returns: - the corresponding plugin if type is a dynamic type, - Noneotherwise- Return type: - GObject.TypePlugin- Returns the - GObject.TypePluginstructure for type.
- 
GObject.type_get_qdata(type, quark)[source]¶
- Parameters: - type (GObject.GType) – aGObject.GType
- quark (int) – a #GQuark id to identify the data
 - Returns: - the data, or - Noneif no data was found- Return type: - Obtains data which has previously been attached to type with - GObject.type_set_qdata().- Note that this does not take subtyping into account; data attached to one type with - GObject.type_set_qdata() cannot be retrieved from a subtype using- GObject.type_get_qdata().
- type (
- 
GObject.type_get_type_registration_serial()[source]¶
- Returns: - An unsigned int, representing the state of type registrations - Return type: - int- 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 - GObject.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.- New in version 2.36. 
- 
GObject.type_init()[source]¶
- This function used to initialise the type system. Since GLib 2.36, the type system is initialised automatically and this function does nothing. - Deprecated since version 2.36: the type system is now initialised automatically 
- 
GObject.type_init_with_debug_flags(debug_flags)[source]¶
- Parameters: - debug_flags ( - GObject.TypeDebugFlags) – bitwise combination of- GObject.TypeDebugFlagsvalues for debugging purposes- 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. - Deprecated since version 2.36: the type system is now initialised automatically 
- 
GObject.type_interface_add_prerequisite(interface_type, prerequisite_type)[source]¶
- Parameters: - interface_type (GObject.GType) –GObject.GTypevalue of an interface type
- prerequisite_type (GObject.GType) –GObject.GTypevalue of an interface or instantiatable 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 - GObject.GTypedoesn’t support). An interface can have at most one instantiatable prerequisite type.
- interface_type (
- 
GObject.type_interface_get_plugin(instance_type, interface_type)[source]¶
- Parameters: - instance_type (GObject.GType) –GObject.GTypeof an instantiatable type
- interface_type (GObject.GType) –GObject.GTypeof an interface type
 - Returns: - the - GObject.TypePluginfor the dynamic interface interface_type of instance_type- Return type: - Returns the - GObject.TypePluginstructure for the dynamic interface interface_type which has been added to instance_type, or- Noneif interface_type has not been added to instance_type or does not have a- GObject.TypePluginstructure. See- GObject.type_add_interface_dynamic().
- instance_type (
- 
GObject.type_interface_peek(instance_class, iface_type)[source]¶
- Parameters: - instance_class (GObject.TypeClass) – aGObject.TypeClassstructure
- iface_type (GObject.GType) – an interface ID which this class conforms to
 - Returns: - the - GObject.TypeInterfacestructure of iface_type if implemented by instance_class,- Noneotherwise- Return type: - Returns the - GObject.TypeInterfacestructure of an interface to which the passed in class conforms.
- instance_class (
- 
GObject.type_interface_prerequisites(interface_type)[source]¶
- Parameters: - interface_type ( - GObject.GType) – an interface type- Returns: - a newly-allocated zero-terminated array of - GObject.GTypecontaining the prerequisites of interface_type- Return type: - [ - GObject.GType]- Returns the prerequisites of an interfaces type. - New in version 2.2. 
- 
GObject.type_interfaces(type)[source]¶
- Parameters: - type ( - GObject.GType) – the type to list interface types for- Returns: - Newly allocated and 0-terminated array of interface types, free with - GLib.free()- Return type: - [ - GObject.GType]- Return a newly allocated and 0-terminated array of type IDs, listing the interface types that type conforms to. 
- 
GObject.type_is_a(type, is_a_type)[source]¶
- Parameters: - type (GObject.GType) – type to check anchestry for
- is_a_type (GObject.GType) – possible anchestor of type or interface that type could conform to
 - Returns: - Trueif type is a is_a_type- Return type: - 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 (
- 
GObject.type_name(type)[source]¶
- Parameters: - type ( - GObject.GType) – type to return name for- Returns: - static type name or - None- Return type: - str- Get the unique name that is assigned to a type ID. Note that this function (like all other - GObject.GTypeAPI) cannot cope with invalid type IDs.- GObject.TYPE_INVALIDmay 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.
- 
GObject.type_name_from_class(g_class)[source]¶
- Parameters: - g_class ( - GObject.TypeClass) –- Return type: - str
- 
GObject.type_name_from_instance(instance)[source]¶
- Parameters: - instance ( - GObject.TypeInstance) –- Return type: - str
- 
GObject.type_next_base(leaf_type, root_type)[source]¶
- Parameters: - leaf_type (GObject.GType) – descendant of root_type and the type to be returned
- root_type (GObject.GType) – immediate parent of the returned type
 - Returns: - immediate child of root_type and anchestor of leaf_type - Return type: - Given a leaf_type and a root_type which is contained in its anchestry, 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 (
- 
GObject.type_parent(type)[source]¶
- Parameters: - type ( - GObject.GType) – the derived type- Returns: - the parent type - Return type: - GObject.GType- 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. 
- 
GObject.type_qname(type)[source]¶
- Parameters: - type ( - GObject.GType) – type to return quark of type name for- Returns: - the type names quark or 0 - Return type: - int- Get the corresponding quark of the type IDs name. 
- 
GObject.type_query(type)[source]¶
- Parameters: - type ( - GObject.GType) –- GObject.GTypeof a static, classed type- Returns: - a user provided structure that is filled in with constant values upon success - Return type: - query: - GObject.TypeQuery- Queries the type system for information about a specific type. This function will fill in a user-provided structure to hold type-specific information. If an invalid - GObject.GTypeis passed in, the type member of the- GObject.TypeQueryis 0. All members filled into the- GObject.TypeQuerystructure should be considered constant and have to be left untouched.
- 
GObject.type_register(class_)¶
- Parameters: - class – a Python class that is a descendant of - GObject.Object- The GObject.type_register() function registers the specified Python class as a GObject type. class_ must be a descendant of GObject.Object. The function generates a name for the new type. 
- 
GObject.type_register_dynamic(parent_type, type_name, plugin, flags)[source]¶
- Parameters: - parent_type (GObject.GType) – type from which this type will be derived
- type_name (str) – 0-terminated string used as the name of the new type
- plugin (GObject.TypePlugin) –GObject.TypePluginstructure to retrieve theGObject.TypeInfofrom
- flags (GObject.TypeFlags) – bitwise combination ofGObject.TypeFlagsvalues
 - Returns: - the new type identifier or - GObject.TYPE_INVALIDif registration failed- Return 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 - GObject.TypePluginstructure 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 (
- 
GObject.type_register_fundamental(type_id, type_name, info, finfo, flags)[source]¶
- Parameters: - type_id (GObject.GType) – a predefined type identifier
- type_name (str) – 0-terminated string used as the name of the new type
- info (GObject.TypeInfo) –GObject.TypeInfostructure for this type
- finfo (GObject.TypeFundamentalInfo) –GObject.TypeFundamentalInfostructure for this type
- flags (GObject.TypeFlags) – bitwise combination ofGObject.TypeFlagsvalues
 - Returns: - the predefined type identifier - Return type: - 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 - GObject.TypeInfostructure pointed to by info and the- GObject.TypeFundamentalInfostructure pointed to by finfo to manage the type and its instances. The value of flags determines additional characteristics of the fundamental type.
- type_id (
- 
GObject.type_register_static(parent_type, type_name, info, flags)[source]¶
- Parameters: - parent_type (GObject.GType) – type from which this type will be derived
- type_name (str) – 0-terminated string used as the name of the new type
- info (GObject.TypeInfo) –GObject.TypeInfostructure for this type
- flags (GObject.TypeFlags) – bitwise combination ofGObject.TypeFlagsvalues
 - Returns: - the new type identifier - Return type: - Registers type_name as the name of a new static type derived from parent_type. The type system uses the information contained in the - GObject.TypeInfostructure 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.
- parent_type (
- 
GObject.type_set_qdata(type, quark, data)[source]¶
- Parameters: - type (GObject.GType) – aGObject.GType
- quark (int) – a #GQuark id to identify the data
- data (objectorNone) – the data
 - Attaches arbitrary data to a type. 
- type (
- 
GObject.type_test_flags(type, flags)[source]¶
- Parameters: - type (GObject.GType) –
- flags (int) –
 - Return type: 
- type (
- 
GObject.value_type_compatible(src_type, dest_type)[source]¶
- Parameters: - src_type (GObject.GType) – source type to be copied.
- dest_type (GObject.GType) – destination type for copying.
 - Returns: - Trueif- GObject.Value.copy() is possible with src_type and dest_type.- Return type: - Returns whether a - GObject.Valueof type src_type can be copied into a- GObject.Valueof type dest_type.
- src_type (
- 
GObject.value_type_transformable(src_type, dest_type)[source]¶
- Parameters: - src_type (GObject.GType) – Source type.
- dest_type (GObject.GType) – Target type.
 - Returns: - Return type: - Check whether - GObject.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.
- src_type (