It derives from <GtkEventController>.
Tracks keyboard focus.
The event controller offers event-controller-focus:enter and
event-controller-focus:leave signals, as well as
event-controller-focus:is-focus and
event-controller-focus:contains-focus properties which
are updated to reflect focus changes inside the widget hierarchy that is
rooted at the controllers widget.
#t if focus is contained in the controllers widget.
See event-controller-focus:is-focus for whether the focus is in
the widget itself or inside a descendent.
When handling focus events, this property is updated before
event-controller-focus:enter or event-controller-focus:leave are emitted.
Its value is a boolean.
It is read only.
#t if focus is in the controllers widget itself, as opposed to in
a descendent widget.
See also event-controller-focus:contains-focus.
When handling focus events, this property is updated before
event-controller-focus:enter or event-controller-focus:leave are emitted.
Its value is a boolean.
It is read only.
Returns #t if focus is within self or one of its children.
Passed: a <GtkEventControllerFocus>.
Returned: a boolean.
#t if focus is within self or one of its children
Returns #t if focus is within self, but not one of its
children.
Passed: a <GtkEventControllerFocus>.
Returned: a boolean.
#t if focus is within self, but not one of its children
Creates a new event controller that will handle focus events.
Returned: a <GtkEventController>.
Connect a handler with (connect object
event-controller-focus:enter handler). It is called as (handler
self).
Emitted whenever the focus enters into the widget or one of its descendents.
Note that this means you may not get an ::enter signal even though the
widget becomes the focus location, in certain cases (such as when the
focus moves from a descendent of the widget to the widget itself). If
you are interested in these cases, you can monitor the
event-controller-focus:is-focus property for changes.
Passed: a <GtkEventControllerFocus>.
Connect a handler with (connect object
event-controller-focus:leave handler). It is called as (handler
self).
Emitted whenever the focus leaves the widget hierarchy that is rooted at the widget that the controller is attached to.
Note that this means you may not get a ::leave signal even though the
focus moves away from the widget, in certain cases (such as when the
focus moves from the widget to a descendent). If you are interested in
these cases, you can monitor the event-controller-focus:is-focus property for
changes.
Passed: a <GtkEventControllerFocus>.