RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Wimp_LoadTemplate (request size syntax)

Programmer's Reference Manuals
» Part 7 - The Desktop
» The Window Manager
» SWI Calls
» Wimp_LoadTemplate
» Wimp_LoadTemplate (request size syntax)

Wimp_LoadTemplate (request size syntax)

(SWI &400DB)
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

Use

This syntax form of this call is to return the memory size required to load a window template.

Notes

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.

See also

  • Wimp_CloseTemplate
  • Wimp_LoadTemplate (load syntax)
  • Wimp_OpenTemplate
Created on June 7, 2009 21:39:17 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: Wimp_LoadTemplate, Wimp_LoadTemplate (load syntax)

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys