NAME¶
libstfl - structured terminal forms language/library
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¶
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.
- stfl_create
- Parses the the stfl description text passed as parameter
and returns a form handler.
- stfl_free
- Free all resources associated with this form
- stfl_run
- Return the next event. If no more prior generated events
are waiting display the form and process one input character.
- 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.
- stfl_get
- Returns the current value of the specified variable. When
the variable does not exist this function returns an undefined value.
- stfl_set
- This sets the specified variable to the specified
value.
- 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.
- stfl_set_focus
- Set the focus to the specified widget.
- setfl_quote
- Quote the text so it can be savely used as variable value
in stfl code.
- stfl_dump
- Return the subtree starting with the widget specified in
the 2nd parameter as stfl code fragment.
- 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.
- stfl_lookup
- Lookup widgets in the form using a path and optionally
assign a new name. This function is not implemented yet.
- stfl_error
- Set the error handling algorithm.
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).
SEE ALSO¶
ncurses(3)
/usr/include/stfl.h /usr/share/doc/libstfl-dev/README.gz