Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R1 | 0 to find the required buffer size |
R2 | Pointer to workspace for indirected data |
R3 | Pointer to end of workspace +1 byte |
R4 | Pointer to 256 byte array for font reference, or –1 for no fonts |
R5 | Pointer to (wildcard) name to match (must be 12 bytes word-aligned) |
R6 | Position to search from, or 0 for the first call |
Exit | |
---|---|
R0 | Corrupt |
R1 | Size of window and icons |
R2 | Size of indirect data |
This syntax form of this call is to return the memory size required to load a window template.
As pointers to memory blocks are used to return the template data, if is vital that enough memory is set aside. The space required to return the window definition in R1 is 88 bytes, and a further 32 bytes for each icon. Further memory is required to contain any indirect data.
This is very useful to identify how much memory is required to load a template, before actually loading it using the load syntax form of this call.
No errors are generated if a template could not be found. In this instance, R6 is simply set to 0.
If an error does occur when trying to load a template, then it advisable to call Wimp_CloseTemplate and close the template file.