|
|
|
|
A resource file is available to an application at run-time, and
usually has extension .rsc. It contains resources compiled from a
source file, .rss.
Each resource is a sequence of bytes. Resources within a file are
identified by number at run-time, but may also be identified symbolically in
the source file. The resource compiler rcomp compiles a
.rss into a .rsc, and also emits a series of
#define statements into a .rsg file, which the C++
program may #include, to allow resources lookup by symbolic name
rather than by number.
Resources are built automatically by abld or the compiler IDE if the project file specifies a resource file using the RESOURCE statement.
Resource data is mapped by structs in a similar way
to Cs structs. Resource structs are defined using STRUCT
statements which are understood only by the resource compiler. Symbian OS provides
many struct types: occasionally, applications also add their
own. STRUCT statements are included in headers, conventionally
with a .rh extension. These are #included into
.rss files.
Symbolic constants for various purposes must be available to both C++
programs and resource file definitions. These are defined using
#define statements or enum statements, and included
in .hrh files. These may be #included into either C++
or resource scripts.