DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Application programming

Character user interfaces

The character user interfaces include curses, FMLI, and ETI.

curses

Actually a library of C functions, curses is included in this list because the set of functions comprise a sublanguage for dealing with terminal screens. If you are writing programs that include interactive user screens, you will want to become familiar with this group of functions.

UnixWare supports both UNIX® System V Release 4 (SVR4) curses and POSIX curses.

For detailed information on SVR4 curses, see Character user interface programming. For details on POSIX curses, see Intro(3curses).

FMLI

The Form and Menu Language Interpreter (FMLI) is a high-level programming tool having two main parts:

FMLI provides a framework for developers to write applications and application interfaces that use menus and forms. It controls many aspects of screen management for you. This means that you do not have to be concerned with the low-level details of creating or placing frames, providing users with a means of navigating between or within frames, or processing the use of forms and menus. Nor do you need to worry about on which kind of terminal your application will be run. FMLI takes care of all that for you.

For details see ``The Form and Menu Language''.

ETI

The Extended Terminal Interface (ETI) is a set of C library routines that promote the development of application programs displaying and manipulating windows, panels, menus, and forms and that run under UnixWare. ETI consists of

The routines are C functions and macros; many of them resemble routines in the standard C library. For example, there is a routine printw that behaves much like printf and another routine getch that behaves like getc. The automatic teller program at your bank might use printw to print its menus and getch to accept your requests for withdrawals (or, better yet, deposits). A visual screen editor like the UnixWare screen editor vi might also use these and other ETI routines.

A major feature of ETI is cursor optimization. Cursor optimization minimizes the amount a cursor has to move around a screen to update it. For example, if you designed a screen editor program with ETI routines and edited the sentence

ETI is a great package for creating forms and menus.

to read

ETI is the best package for creating forms and menus.

the program would change only ``the best'' in place of ``a great''. The other characters would be preserved. Because the amount of data transmitted--the output--is minimized, cursor optimization is also referred to as output optimization.

Cursor optimization takes care of updating the screen in a manner appropriate for the terminal on which an ETI program is run. This means that ETI can do whatever is required to update many different terminal types. It searches the terminfo database to find the correct description for a terminal.

How does cursor optimization help you and those who use your programs? First, it saves you time in describing in a program how you want to update screens. Second, it saves a user's time when the screen is updated. Third, it reduces the load on your system's communication lines when the updating takes place. Fourth, you do not have to worry about the myriad of terminals on which your program might be run.

Here is a simple ETI program. It uses some of the basic ETI routines to move a cursor to the middle of a terminal screen and print the character string BullsEye. For now, just look at their names and you will get an idea of what each of them does:

   #include <curses.h>
   

main() { initscr();

move( LINES/2 - 1, COLS/2 - 4 ); addstr("Bulls"); refresh(); addstr("Eye"); refresh(); endwin(); }

A simple ETI program

For complete information on ETI, see ``The Extended Terminal Interface (ETI)''.


Next topic: Graphical user interfaces
Previous topic: m4

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004