Method
StWidgetnavigate_focus
Declaration [src]
gboolean
st_widget_navigate_focus (
StWidget* widget,
ClutterActor* from,
StDirectionType direction,
gboolean wrap_around
)
Description [src]
Tries to update the keyboard focus within widget in response to a
keyboard event.
If from is a descendant of widget, this attempts to move the
keyboard focus to the next descendant of widget (in the order
implied by direction) that has the StWidget:can-focus property
set. If from is NULL, this attempts to focus either widget
itself, or its first descendant in the order implied by
direction. If from is outside of widget, it behaves as if it was
a descendant if direction is one of the directional arrows and as
if it was NULL otherwise.
If a container type is marked StWidget:can-focus, the expected
behavior is that it will only take up a single slot on the focus
chain as a whole, rather than allowing navigation between its child
actors (or having a distinction between itself being focused and
one of its children being focused).
Some widget classes might have slightly different behavior from the above, where that would make more sense.
If wrap_around is TRUE and from is a child of widget, but the
widget has no further children that can accept the focus in the
given direction, then st_widget_navigate_focus() will try a second
time, using a NULL from, which should cause it to reset the focus
to the first available widget in the given direction.
Parameters
from-
Type:
ClutterActorThe actor that the focus is coming from.
The argument can be NULL.The data is owned by the caller of the method. direction-
Type:
StDirectionTypeThe direction focus is moving in.
wrap_around-
Type:
gbooleanWhether focus should wrap around.