Prev | Current Page 1392 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

There are many APIs, probably as many as there are types of programming
problems that need to be solved. The ncurses library, for example, provides an API that you can
use to create text-mode user interfaces. In turn, ncurses works by using either the terminfo or
termcap API to perform the actual screen updates in a manner consistent with the underlying type
of display device in use.
Developers keep having to perform a specific type of programming task, such as updating a database,
communicating over a network, getting sound out of a sound card, or performing complicated
mathematical calculations. As a result, there is at least one database API, socket API, sound
API, or mathematical API already in existence that they can use to simplify those tasks.
This section discusses APIs for use in C and C++ programming. You can also make use of
these libraries in other programming languages, but you may need to write software to
adapt to the C-based API. For example, Perl, Python, and Java all have a means to call on C functions
or APIs, but you will need to write the code needed to adapt the actual C library to your programming
language.
APIs consist of three components:
 Header file??”Declares the interface (the function calls, macros, and data structures) that
developers can use in their own programs.


Pages:
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404