You are looking at the legacy documentation of AGS v1. Go to aylur.github.io/ags for AGS v2.
Reactivity
In order for widgets to have dynamic content we pass Bindings as properties
or setup a hook.
A Binding is just an object that holds information for widget constructors
to setup a listener.
Property Bindings
We can make a Binding from a Variable
From a Service
Merge any number of Bindings into another Binding
Turn one or multiple Service signals into a Binding
A Binding can be transformed according to need
Hooks
You can call these on any Widget that you have a reference on.
They will return this reference, meaning you
can chain them up in any order in any number.
Hook
hook will setup a listener to a GObject and will handle disconnection
when the widget is destroyed. It will connect
to the changed signal by default when not specified otherwise.
On
on is the same as connect but instead of the signal handler id,
it returns a reference to the widget. on will setup a callback on a widget signal.
These two are equivalent
Poll
Avoid using this as much as possible, using this is considered bad practice.
These two are equivalent
Keybind
It is possible to setup keybindings on focused widgets