To run the program, type ./sreadkey. Figure 28-7 shows the result after typing the same text as
typed for readkey.c earlier.
FIGURE 28-7
An S-Lang??“based TUI
As you can see from Figure 28-7, the basic appearance and functionality of sreadkey.c is the
same as nreadkey.c. The differences between the two, which have to do with the TUI framework
used to create sreadkey.c, are invisible to the user. S-Lang??“based programs can also read input
piped from stdin.
From a developer??™s perspective, there are significant differences between ncurses and S-Lang in
program structure and the actual library usage, but the output is almost identical.
For more information about S-Lang, including download information, visit the S-Lang
Web page at www.s-lang.org.
Creating Graphical Interfaces
When it comes to creating GUIs, Linux programmers have more options available than they do for
creating TUIs. Probably the most popular and certainly the best-known toolkits used to create
graphical applications are Qt and GTK+. Qt is the C++ application framework that powers KDE,
NOTE
771
Programming Environments and Interfaces 28
the K Desktop Environment. GTK+ is the toolkit underneath GNOME, the GNU Network Object
Model Environment. GTK+ is written largely in C, but it has language bindings available for many
other programming languages, such as Perl, C++, and Python, so you can use GTK+ features in
many programming environments.
Pages:
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400