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)

Since:

BlackBerry 10.3.1

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-zeri.

type

The type of focus that should be relinquished. A value of SCREEN_EVENT_NONE will cause everything to be tabbed. A value of SCREEN_EVENT_GAMEPAD, or SCREEN_EVENT_JOG, or SCREEN_EVENT_JOYSTICK, or SCREEN_EVENT_KEYBOARD, will case focus changes for that type of event only. Events of type SCREEN_EVENT_POINTER and SCREEN_EVENT_MTOUCH_TOUCH are not focus-based, and therefore those types are not acceptable values

flags

Ignored for now. Pass 0.

Library:

libscreen (For the qcc command, use the -l screen option to link against this library)

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. The window with a tab position closest to this reference value will be 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 the operation was successful, or -1 if an error occurred (errno is set).

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus