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.
It provides support for
Binding
.It offers easier control over properties (without the need for the
.props
attribute).
- notify_list(*args) None #
Notify list of properties. You can pass unlimited number of property names as arguments.
- Return type:
- bind_property2(source_property: str, target: gi.repository.GObject.Object, target_properties: list[str], transform: Callable | None = None) None #
Bind
source_property
onself
withtarget_properties
ontarget
.- Parameters:
- Return type:
- bind(property_name: str, transform: Callable | None = None) Binding #
Creates
Binding
from property name onself
.
- class ignis.gobject.Binding(target: gi.repository.GObject.Object, target_properties: list[str], transform: Callable | None = None)#
An object that describe binding.
- Parameters:
- target() gi.repository.GObject.Object #
The target GObject.
- Return type:
Object
- class ignis.gobject.IgnisProperty(*args, **kwargs)#
Bases:
Property
.Like
GObject.Property
, but determines the property type automatically based on the return type of thegetter
. You can override this behaviour by explicitly passingtype
argument to the constructor. Arguments for the constructor are the same as forGObject.Property
.
- class ignis.gobject.IgnisSignal(*args, **kwargs)#
Bases:
Signal
.The same as
GObject.Signal
, nothing special. This class is needed only for the correct determination of signals when building docs.
- class ignis.gobject.DataGObject(data: dict[str, Any] | None = None, match_dict: dict[str, str] | None = None)#
A GObject that can synchronize its properties with a simple Python dictionary.
- Parameters:
You have to define attributes from data in
init
. The actual attributes from data must be protected (prefixed with _). All other attributes must be private (prefixed with __).