| 1 | /* |
| 2 | * template.h |
| 3 | * |
| 4 | * [Generated from template, 25 September 1996] |
| 5 | */ |
| 6 | |
| 7 | #if !defined(__CC_NORCROFT) || !defined(__arm) |
| 8 | #error You must use the Norcroft ARM Compiler for Sapphire programs |
| 9 | #endif |
| 10 | |
| 11 | #pragma include_only_once |
| 12 | #pragma force_top_level |
| 13 | |
| 14 | #ifndef __template_h |
| 15 | #define __template_h |
| 16 | |
| 17 | #ifndef __sapphire_h |
| 18 | #include "sapphire.h" |
| 19 | #endif |
| 20 | |
| 21 | /*----- Overview ----------------------------------------------------------* |
| 22 | * |
| 23 | * Functions provided: |
| 24 | * |
| 25 | * template_find |
| 26 | * template_copy |
| 27 | * template_embedded |
| 28 | * template_free |
| 29 | * template_load |
| 30 | * template_init |
| 31 | */ |
| 32 | |
| 33 | /* --- template_find --- * |
| 34 | * |
| 35 | * On entry: R0 == pointer to name to match |
| 36 | * |
| 37 | * On exit: R0 == pointer to window definition if found |
| 38 | * May return an error |
| 39 | * |
| 40 | * Use: Locates a template in the list and gives you a pointer to |
| 41 | * the corresponding window defintion. You may update the |
| 42 | * definition to store an updated window state if you really |
| 43 | * want to. |
| 44 | */ |
| 45 | |
| 46 | extern routine template_find; |
| 47 | |
| 48 | /* --- template_copy --- * |
| 49 | * |
| 50 | * On entry: R0 == pointer to name to match |
| 51 | * |
| 52 | * On exit: R0 == pointer to copy of a window definition |
| 53 | * May return an error |
| 54 | * |
| 55 | * Use: Returns a copy of a window template (for the use of the |
| 56 | * dialogue box system mainly), including all indirected data |
| 57 | * set up properly and everything. The copy is writable. To |
| 58 | * get rid of the copy, call template_free. |
| 59 | */ |
| 60 | |
| 61 | extern routine template_copy; |
| 62 | |
| 63 | /* --- template_embedded --- * |
| 64 | * |
| 65 | * On entry: R0 == pointer to embedded template definition |
| 66 | * |
| 67 | * On exit: R0 == pointer to copy (as for template_copy) |
| 68 | * |
| 69 | * Use: Extracts an embedded template into a template block. |
| 70 | * Embedded templates can be generated using the templAOF |
| 71 | * program, and then linked into your application. |
| 72 | */ |
| 73 | |
| 74 | extern routine template_embedded; |
| 75 | |
| 76 | /* --- template_free --- * |
| 77 | * |
| 78 | * On entry: R0 == pointer to block allocated with template_copy |
| 79 | * |
| 80 | * On exit: -- |
| 81 | * |
| 82 | * Use: Frees a template copy created using template_copy. |
| 83 | */ |
| 84 | |
| 85 | extern routine template_free; |
| 86 | |
| 87 | /* --- template_load --- * |
| 88 | * |
| 89 | * On entry: R0 == pointer to name of template file to load |
| 90 | * |
| 91 | * On exit: May return an error |
| 92 | * |
| 93 | * Use: Loads the specified template file, and adds its window |
| 94 | * definitions into the template list so they can be used when |
| 95 | * creating dialogue boxes or windows. |
| 96 | * |
| 97 | * If the templates can't be loaded (e.g. there isn't enough |
| 98 | * memory) an error is generated (and can be caught using the |
| 99 | * standard Sapphire except mechanism). |
| 100 | */ |
| 101 | |
| 102 | extern routine template_load; |
| 103 | |
| 104 | /* --- template_init --- * |
| 105 | * |
| 106 | * On entry: R0 == pointer to application name |
| 107 | * |
| 108 | * On exit: -- |
| 109 | * |
| 110 | * Use: Initialises the template list and font array, and loads the |
| 111 | * `Templates' resource file. |
| 112 | */ |
| 113 | |
| 114 | extern routine template_init; |
| 115 | |
| 116 | /*----- That's all, folks -------------------------------------------------*/ |
| 117 | |
| 118 | #endif |