Functions

array_free (arr)

error_quark ()

init ()

list_channels ()

named_struct_register (struct_name, n_members, member_types)

property_bind (channel, xfconf_property, xfconf_property_type, object, object_property)

property_bind_gdkcolor (channel, xfconf_property, object, object_property)

property_bind_gdkrgba (channel, xfconf_property, object, object_property)

property_unbind (id)

property_unbind_all (channel_or_object)

property_unbind_by_property (channel, xfconf_property, object, object_property)

shutdown ()

value_get_int16 (value)

value_get_uint16 (value)

value_set_int16 (value, v_int16)

value_set_uint16 (value, v_uint16)

Details

Xfconf.array_free(arr)
Parameters:

arr ([GObject.Value]) – A GLib.PtrArray of GObject.Value s.

Properly frees a GLib.PtrArray structure containing a list of GObject.Value s. This will also cause the contents of the values to be freed as well.

Xfconf.error_quark()
Return type:

int

Xfconf.init()
Raises:

GLib.Error

Returns:

True if the library was initialized succesfully, False on error. If there is an error error will be set.

Return type:

bool

Initializes the Xfconf library. Can be called multiple times with no adverse effects.

Xfconf.list_channels()
Returns:

A newly-allocated array of strings. Free with GLib.strfreev() when no longer needed.

Return type:

[str]

Lists all channels known in the Xfconf configuration store.

Xfconf.named_struct_register(struct_name, n_members, member_types)
Parameters:
  • struct_name (str) – The unique name of the struct to register.

  • n_members (int) – The number of data members in the struct.

  • member_types (GObject.GType) – An array of the GObject.GType s of the struct members.

Registers a named struct for use with Xfconf.Channel.get_named_struct() and Xfconf.Channel.set_named_struct().

Xfconf.property_bind(channel, xfconf_property, xfconf_property_type, object, object_property)
Parameters:
Returns:

an ID number that can be used to later remove the binding.

Return type:

int

Binds an Xfconf property to a GObject.Object property. If the property is changed via either the GObject.Object or Xfconf, the corresponding property will also be updated. The binding is initialized from the Xfconf property, i.e. the initial value of the GObject.Object property is overwritten.

Note that xfconf_property_type is required since xfconf_property may or may not already exist in the Xfconf store. The type of object_property will be determined automatically. If the two types do not match, a conversion will be attempted.

Xfconf.property_bind_gdkcolor(channel, xfconf_property, object, object_property)
Parameters:
Returns:

an ID number that can be used to later remove the binding.

Return type:

int

Binds an Xfconf property to a GObject.Object property of type GDK_TYPE_COLOR (aka a #GdkColor struct). If the property is changed via either the GObject.Object or Xfconf, the corresponding property will also be updated. The binding is initialized from the Xfconf property, i.e. the initial value of the GObject.Object property is overwritten.

This is a special-case binding; the GdkColor struct is not ideal as-is for binding to a property, so it is stored in the Xfconf store as four 16-bit unsigned ints (red, green, blue, alpha). Since GdkColor (currently) only supports RGB and not RGBA, the last value will always be set to 0xFFFF.

Xfconf.property_bind_gdkrgba(channel, xfconf_property, object, object_property)
Parameters:
Returns:

an ID number that can be used to later remove the binding.

Return type:

int

Binds an Xfconf property to a GObject.Object property of type GDK_TYPE_RGBA (aka a #GdkRGBA struct). If the property is changed via either the GObject.Object or Xfconf, the corresponding property will also be updated. The binding is initialized from the Xfconf property, i.e. the initial value of the GObject.Object property is overwritten.

This is a special-case binding; the GdkRGBA struct is not ideal as-is for binding to a property, so it is stored in the Xfconf store as four 16-bit unsigned ints (red, green, blue, alpha).

New in version 4.12.1.

Xfconf.property_unbind(id)
Parameters:

id (int) – A binding ID number.

Removes an Xfconf/GObject.Object property binding based on the binding ID number. See Xfconf.property_bind().

Xfconf.property_unbind_all(channel_or_object)
Parameters:

channel_or_object (object or None) – A GObject.Object or Xfconf.Channel.

Unbinds all Xfconf channel bindings (see Xfconf.property_bind()) to object. If object is an Xfconf.Channel, it will unbind all xfconf properties on that channel. If object is a regular GObject.Object with properties bound to a channel, all those bindings will be removed.

Xfconf.property_unbind_by_property(channel, xfconf_property, object, object_property)
Parameters:

Causes an Xfconf channel previously bound to a GObject.Object property (see Xfconf.property_bind()) to no longer be bound.

Xfconf.shutdown()

Shuts down and frees any resources consumed by the Xfconf library. If Xfconf.init() is called multiple times, Xfconf.shutdown() must be called an equal number of times to shut down the library.

Xfconf.value_get_int16(value)
Parameters:

value (GObject.Value) – A GObject.Value.

Returns:

A gint16.

Return type:

int

Retrieves a 16-bit signed value from value.

Xfconf.value_get_uint16(value)
Parameters:

value (GObject.Value) – A GObject.Value.

Returns:

A guint16.

Return type:

int

Retrieves a 16-bit unsigned value from value.

Xfconf.value_set_int16(value, v_int16)
Parameters:

Sets value using a signed 16-bit integer.

Xfconf.value_set_uint16(value, v_uint16)
Parameters:

Sets value using an unsigned 16-bit integer.