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, optional) -- Property or list of properties that will not be notified.

notify_list(*args) None#

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

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 (GObject.Object) -- the target GObject.Object.

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

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

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) -- The function that accepts a new property value and returns the processed value.

Returns:

Binding

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

An object that describe binding.

Properties:
  • target (GObject.Object, required, read-only): Target GObject.

  • target_property (str, required, read-only): Property on target GObject.

  • transform (Callable, optional, read-only): The function that accepts a new property value and returns the processed value.