Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



The control environment

The control environment packages the interface to the window server and provides an environment for creating controls. It is implemented in a single class, CCoeEnv, which encapsulates active objects and an active scheduler for receiving events from the window server. Each application has exactly one CCoeEnv object.

CCoeEnv also provides a number of utilities which are useful to most applications. These utilities include:


Resource readers and resource files

CCoeEnv maintains a list of the resource files used by the application. Files may be added to the list using AddResourceFileL(), and removed using DeleteResourceFile().

The utility functions provided by the control framework read resources and resource data from the resource files in its list.

A resource file consists of a list of resources, each identified by a resource ID. In turn, each resource consists of a list of resource values in the form of binary data. The order and lengths of the values are defined, for each resource type, in an enumeration (generally stored in a file with an .rh extension).

To read data from a resource file requires two stages:

CCoeEnv provides utility functions to perform the first of these stages and functions to create resource readers.

It should be noted that stage two can be omitted if the resource contains only one value, or if it is read into a formatted buffer: in both these cases the resource data can be read straight from the buffer.