GObject#

class ignis.gobject.IgnisGObject(*args: Any, **kwargs: Any)#

Bases: GObject.Object

A base class for all services and widgets (and some utils). Mainly, it is the same GObject.Object, but with some improvements.

  1. It provides support for Binding.

  2. It offers easier control over properties (without the need for the .props attribute).

notify_all(without: list[str] | str | None = None) None#

Notify all properties.

Parameters:

without (list[str] | str | None, default: None) -- A property or a list of properties that will not be notified.

Return type:

None

notify_list(*args) None#

Notify list of properties. You can pass unlimited number of property names as arguments.

Return type:

None

bind_property2(source_property: str, target: gi.repository.GObject.Object, target_property: str, transform: Callable | None = None) None#

Bind source_property on self with target_property on target.

Parameters:
  • source_property (str) -- The property on self to bind.

  • target (Object) -- the target GObject.Object.

  • target_property (str) -- the property on target to bind.

  • transform (Callable | None, default: None) -- The function that accepts a new property value and returns the processed value.

Return type:

None

bind(property_name: str, transform: Callable | None = None) Binding#

Creates Binding from property name on self.

Parameters:
  • property_name (str) -- Property name of self.

  • transform (Callable | None, default: None) -- The function that accepts a new property value and returns the processed value.

Return type:

Binding

Returns:

Binding

class ignis.gobject.Binding(target: gi.repository.GObject.Object, target_property: str, transform: Callable | None = None)#

An object that describe binding.

property target: gi.repository.GObject.Object#
  • required, read-only

The target GObject.

property target_property: str#
  • required, read-only

The property on the target GObject.

property transform: Callable | None#
  • required, read-only

The function that accepts a new property value and returns the processed value.