Macaw OS C reference

Function ui_setfocus

#include <macawui.h>
void ui_setfocus(const char *id);

Gives the keyboard's focus to a widget, such as a text box you want the person to type in first.

Parameters

idconst char *
The widget's id. NULL takes the focus away from every widget.

In The keyboard's focus, and where widgets are, with ui_focus, ui_typing, ui_rect.