Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtIsFocused()

Determine to what degree a widget is focused

Synopsis:

int PtIsFocused( PtWidget_t *widget );

Arguments:

widget
A pointer to the widget whose focus you want to determine.

Library:

ph

Description:

This function returns a value indicating to what degree a widget is focused.

The widget family hierarchy is a set of trees. The widget that you would normally say has focus is called the focus leaf. Its parent, grandparent, and so on, up to the root of the tree (typically a window), form the focus branch. In other words, a widget is on the focus branch if the focus leaf is somewhere inside it.

Returns:

0
The widget isn't focused.
1
The widget is on the focus branch.
2
The widget is the focus leaf.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtContainerFindFocus(), PtContainerFocusNext(), PtContainerFocusPrev(), PtGlobalFocusNext(), PtGlobalFocusNextFrom(), PtGlobalFocusPrev(), PtGlobalFocusPrevFrom()