screen_tab_focus()

Relinquish input focus to another window

Synopsis:

#include <screen/screen.h>
int screen_tab_focus(screen_window_t win,
                     const int *off,
                     int type,
                     int flags)

Arguments:

win
The handle of the window that wishes to relinquish its focus. Calling this function when the specified window does not have input focus may still generate some results. The window might be part of a group of windows, and the focus within the group could be changed as a result.
off
A pointer to three integers, specifying an x, y, and z translation to be applied when determining where the focus should go. The translation can be across, or up/down, but not both. That means either z is non-zero or x and/or y may be non-zero.
type
The type of focus that should be relinquished. Events of type SCREEN_EVENT_GAMEPAD, SCREEN_EVENT_JOG, SCREEN_EVENT_JOYSTICK, and SCREEN_EVENT_KEYBOARD will cause focus changes for that specific event type only. The event type SCREEN_EVENT_NONE will cause all of the aforementioned event types to be tabbed. Events of type SCREEN_EVENT_POINTER and SCREEN_EVENT_MTOUCH_TOUCH are not acceptable values because these types aren't focus-based.
flags
For future use. Pass 0 for now.

Library:

libscreen

Description:

Function Type: Immediate Execution

This function yields input focus to another window. The window that will receive focus is not known by the caller. The focus is calculated by adding the specified offset to the caller's tab position. A window that is sensitive to input focus and has the tab position closest to this reference value is chosen. The type argument can be used to restrict the operation to certain events, or types of window. The flags can be used to control aspects such as wrapping modes.

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).