Symbian3/SDK/Source/GUID-4406BDE0-8256-5F97-9FC5-BBFD11D9C4A3.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept xml:lang="en" id="GUID-4406BDE0-8256-5F97-9FC5-BBFD11D9C4A3"><title>Resource file</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A resource file is available to an application at run-time, and usually has extension <filepath>.rsc</filepath>. It contains resources compiled from a source file, <filepath>.rss</filepath>. </p> <p>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 <filepath>rcomp</filepath> compiles a <filepath>.rss</filepath> into a <filepath>.rsc</filepath>, and also emits a series of <codeph>#define</codeph> statements into a <filepath>.rsg</filepath> file, which the C++ program may <codeph>#include</codeph>, to allow resources lookup by symbolic name rather than by number. </p> <p>Resources are built automatically by <filepath>abld</filepath> or the compiler IDE if the project file specifies a resource file using the <codeph>RESOURCE</codeph> statement. </p> <p>Resource data is mapped by structs — in a similar way to C’s structs. Resource structs are defined using <codeph>STRUCT</codeph> statements which are understood only by the resource compiler. Symbian platform provides many <systemoutput>struct</systemoutput> types: occasionally, applications also add their own. <codeph>STRUCT</codeph> statements are included in headers, conventionally with a <filepath>.rh</filepath> extension. These are <codeph>#include</codeph> d into <filepath>.rss</filepath> files. </p> <p>Symbolic constants for various purposes must be available to both C++ programs and resource file definitions. These are defined using <codeph>#define</codeph> statements or <codeph>enum</codeph> statements, and included in <filepath>.hrh</filepath> files. These may be <codeph>#include</codeph> d into either C++ or resource scripts. </p> </conbody></concept>