STFL(3)
β¨ libstfl β structured terminal forms language/library β¨
okay bestie, sit DOWN, because this one is a whole vibe π this is the manual page for libstfl β the structured terminal forms language/library β and it's lowkey the reason your terminal apps can have actual widgets instead of just... sad little lines of text. πΈ
π SYNOPSIS π
#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);
π DESCRIPTION π
so stfl is a library that implements a curses-based widget set for text terminals. β¨ and the way it describes GUIs is via a special language β the Structured Terminal Forms Language (iconic name, no notes). the whole point of this language is that it's 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. periodt. π
π¦ stfl_create
Parses the the stfl description text passed as parameter and returns a form handler. yes bestie, "the the" β we keep it exactly as the original wrote it, no cap. π
π¦ stfl_free
Free all resources associated with this form. bye girl, you're done. π
π¦ stfl_run
Return the next event. If no more prior generated events are waiting, display the form and process one input character. it's giving "main character takes one (1) step". π
π¦ stfl_reset
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. (yes, "explicitely" β original spelling, we don't touch it π)
π¦ stfl_get
Returns the current value of the specified variable. When the variable does not exist this function returns an undefined value. so like... don't come for her if the variable isn't there. undefined is undefined. π
π¦ stfl_set
This sets the specified variable to the specified value. simple, clean, slay.
π¦ stfl_get_focus
Returns the name of the widget which currently has the focus, or an undefined value when the widget having the focus has no name. anonymous widget energy, honestly relatable. β¨
π¦ stfl_set_focus
Set the focus to the specified widget. put the spotlight on her, she deserves it. π₯
π¦ setfl_quote
Quote the text so it can be savely used as variable value in stfl code. (and yup β the original spells it setfl_quote right there in the description, and "savely" too. we preserve the lore exactly. π«Ά)
π¦ stfl_dump
Return the subtree starting with the widget specified in the 2nd parameter as stfl code fragment. screenshot but make it source code. πΈ
π¦ stfl_modify
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. build-a-form workshop, but make it live. π§
π¦ stfl_lookup
Lookup widgets in the form using a path and optionally assign a new name. This function is not implemented yet. π not her being announced and then not showing up. bestie is late.
π¦ stfl_error
Set the error handling algorithm. that's it, that's the whole description. short and iconic. π
π AUTHORS π
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). thank you for your service, legends. π«‘π
πΈ SEE ALSO πΈ
ncurses(3)/usr/include/stfl.h/usr/share/doc/libstfl-dev/README.gz
and that's the whole page, bestie β brought to you by libstfl(), exactly as it signs off at the bottom of the original too. go forth and build cute terminal forms. πβ¨π
π¦ where this page comes from
- debian bookworm: libstfl-dev 0.22-3+b5
- debian trixie: libstfl-dev 0.22-5+b2
- ubuntu jammy: libstfl-dev 0.22-3build1
- ubuntu noble: libstfl-dev 0.22-3build9
- ubuntu questing: libstfl-dev 0.22-5
- ubuntu resolute: libstfl-dev 0.22-6
- ubuntu stonking: libstfl-dev 0.22-6build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms