| 1 |
<xml> |
| 2 |
<head> |
| 3 |
<title>Core Resources</title> |
| 4 |
</head> |
| 5 |
<body> |
| 6 |
|
| 7 |
<p>ClanLib got the following core resource types:</p> |
| 8 |
|
| 9 |
<h3><string> resource</h3> |
| 10 |
|
| 11 |
<pre> |
| 12 |
<string name="my_string" value="value" /> |
| 13 |
</pre> |
| 14 |
|
| 15 |
<p>String resources allow an application to easilly use text strings inside |
| 16 |
the program specified in a resource file. CL_String::load is used to extract |
| 17 |
the value specified in a string resource.</p> |
| 18 |
|
| 19 |
<h3><integer> resource</h3> |
| 20 |
|
| 21 |
<pre> |
| 22 |
<integer name="my_integer" value="value" /> |
| 23 |
</pre> |
| 24 |
|
| 25 |
<p>Integer resources work the same way a string resources, except they |
| 26 |
contain integer values instead of string values and are retrieved using |
| 27 |
CL_Integer.</p> |
| 28 |
|
| 29 |
<h3><float> resource</h3> |
| 30 |
|
| 31 |
<pre> |
| 32 |
<float name="my_float" value="value" /> |
| 33 |
</pre> |
| 34 |
|
| 35 |
<p>Float resources work the same way a string resources, except they |
| 36 |
contain float values instead of string values and are retrieved using |
| 37 |
CL_Float.</p> |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
<h3><boolean> resource</h3> |
| 42 |
|
| 43 |
<pre> |
| 44 |
<boolean name="my_boolean" value="value" /> |
| 45 |
</pre> |
| 46 |
|
| 47 |
<p>Boolean resources work just like the integer resource, but for booleans |
| 48 |
and via CL_Boolean instead.</p> |
| 49 |
|
| 50 |
<h3><raw> resource</h3> |
| 51 |
|
| 52 |
<pre> |
| 53 |
<raw name="my_raw" file="filename" /> |
| 54 |
</pre> |
| 55 |
|
| 56 |
<p>The raw resource is a way to access a file via the resource system. A |
| 57 |
<raw> resource is accessed inside ClanLib using the CL_Raw class. In |
| 58 |
CL_Raw the file is accessable as a std::vector<unsigned char> (binary |
| 59 |
array). Alternatively the data can be used as an input source by |
| 60 |
constructing a CL_InputSource_Raw object.</p> |
| 61 |
|
| 62 |
</body> |
| 63 |
</xml> |