DOKK / manpages / debian 12 / libstfl-dev / stfl.3.en
libstfl() libstfl()

libstfl - structured terminal forms language/library

#include <ncurses.h>

#include <stfl.h> struct stfl_form *stfl_create( char *text); void stfl_free(struct stfl_form *f); char *stfl_run(struct stfl_form *f, int timeout); void stfl_reset(); char *stfl_get(struct stfl_form *f, char *name); void stfl_set(struct stfl_form *f, char *name, char *value); char *stfl_get_focus(struct stfl_form *f); void stfl_set_focus(struct stfl_form *f, char *name); char *stfl_quote( char *text); char *stfl_dump(struct stfl_form *f, char *name, char *prefix, int focus); void stfl_modify(struct stfl_form *f, char *name, char *mode, const char *text); char *stfl_lookup(struct stfl_form *f, char *path, char *newname); char *stfl_error(); void stfl_error_action( char *mode);

stfl is a library which implements a curses-based widget set for text terminals. A special language (the Structured Terminal Forms Language) is used to describe stfl GUIs. The language is designed to be easy and fast to write so an application programmer does not need to spend ages fiddling around with the GUI and can concentrate on the more interesting programming tasks.

Parses the the stfl description text passed as parameter and returns a form handler.
Free all resources associated with this form
Return the next event. If no more prior generated events are waiting display the form and process one input character.
The stfl_run() function automatically activates ncurses. This function can be used to explicitely switch back to normal text mode. In some languages this is automatically done on program termination.
Returns the current value of the specified variable. When the variable does not exist this function returns an undefined value.
This sets the specified variable to the specified value.
Returns the name of the widget which currently has the focus or an undefined value when the widget having the focus has no name.
Set the focus to the specified widget.
Quote the text so it can be savely used as variable value in stfl code.
Return the subtree starting with the widget specified in the 2nd parameter as stfl code fragment.
Import the stfl code specified in the 4th parameter to an existing form. The 2nd parameter is used to specify a widget which is used as starting point for the modification. The 3rd parameter is a string specifying how the new stfl code should be added to the widget tree.
Lookup widgets in the form using a path and optionally assign a new name. This function is not implemented yet.
Set the error handling algorithm.

stfl is developed by Clifford Wolf <clifford@clifford.at>. This manual page was written by Nico Golde <nion@debian.org> for the Debian system (but may be used by others).

ncurses(3)
/usr/include/stfl.h /usr/share/doc/libstfl-dev/README.gz