28
re-use leading to smaller ROMs and less re-testing, and high performance from a C++
implementation.
The EPOC C Standard Library provides a layer
on top
of many of EPOC’s native services,
supporting a standard POSIX-like set of APIs, with which many programmers are already
familiar. The standard library covers
•
the most fundamental facilities provided by the user library: such as memory allocation
(
malloc()
etc) and string functions (
strxxx()
and
memxxx()
etc)
•
file i/o (
FILE
,
fopen()
etc)
•
sockets and TCP/IP, including POSIX’s unified file and sockets API (
open()
etc)
•
processes, pipes, and blocking i/o
The standard library allows engine code from POSIX-type environments to be ported to EPOC
with relative ease. The user interface (whether text- or graphics-based) must be coded in native
EPOC C++.
8.2.3.5 Text
CHARCONV’s APIs provide conversion functions between various character sets and are
powerful enough for all Unicode requirements.
LEXICON provides spell-checking functionality for alphabetic languages. LEXICON implements
the spell check algorithms in a server containing Lernout & Hauspie’s International
CorrectSpell™ technology, which provides a compact 100,000-word dictionary.
ETEXT is a powerful component providing manipulation of arbitrarily long text objects, with
character and paragraph formatting, styles, headers and footers, fields such as page numbers,
embedded pictures, and support for externalizing and internalizing to streams and stores. ETEXT
text objects are used by higher-level EPOC components such as the database and word processor
applications.
8.2.4. Graphic
EPOC’s graphics components provide the basis for a higher-level GUI framework for applications
and the system shell.
In EPOC R5, EIKON remains the only GUI framework available to developers in EPOC SDKs.
EPOC has been designed to support device families with widely differing hardware specifications
and UI requirements: different device families will include selected graphics components as
described in this section. However, they will replace EIKON, the system shell and the application
user interfaces with versions tailored to the specifics of the design.
Common graphics components include the central drawing and user interaction components, the
font system, the print system, and views.
8.2.4.1 Drawing and user interaction
As the foundation for all other graphics components, the GDI defines graphics devices (to which
all drawing is done), graphics contexts (through which all drawing is done), a print subsystem
(supporting banded printing, on-screen preview, and model selection), and a range of ancillary
classes supporting fonts, colour, measurement and zooming.
For user interaction, the window server (WSERV) shares the screen, keyboard, pointer and other
UI resources, and provides the basics of an event-driven interaction mechanism for client
programs. The window server thus mediates almost all user control of the EPOC machine. The
window server is started by F32 at the end of its boot sequence. It launches the font and bitmap
server while initializing. After all other initialization is complete, it starts the system shell, a GUI
application which gives the user real access to the machine, its data and applications.
CONE, the control environment, provides a layer on top of the window server API for building
higher-level application GUI frameworks. A control is a rectangular area of the screen and is the
fundamental unit of user interaction. Controls may contain other controls. CONE provides an
abstraction for keyboard focus, and an algorithm for offering keys to controls using a control
stack. CONE provides an active-object-based framework for client applications. Window server
events are converted into virtual function calls in control, environment or control stack classes:
GUI and application developers implement these functions to provide required behaviour.