Macaw OS C reference

Function ui_focus

#include <macawui.h>
int ui_focus(char *buf, int size);

Tells you which widget has the keyboard's focus, so your own key handling can leave it alone.

Parameters

bufchar *
A buffer for the widget's id, such as a text box's id. It gets "" when none has it.
sizeint
How many bytes buf holds.

Returns int

The id's length, or 0 if no widget has the focus.

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