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

DragAnObject Flags

Programmer's Reference Manuals
» Part 15 – SWI Calls
» DragAnObject
» DragAnObject_Start
» DragAnObject Flags

DragAnObject Flags

Bits Meaning
0-1 Horizontal location of sprite in box
00 Left
01 Centre
10 Right
11 undefined
2-3 Vertical location of sprite in box
00 Bottom
01 Centre
10 Top
11 undefined
4-5 Drag bounding box is
00 Whole screen
01 Display area of window that pointer is over
10 User specified
11 undefined
6 Bounding box applies to
0 The box
1 The pointer
7 Use drop shadow
8 Do not dither sprite1
9 Centre sprite around pointer2
10 – 15 Reserved for future use, should be 0
16 Rendering is done by:
0 = SWI
1 = C/assembler function
17 If rendering is a function, it is called in:
0 = User Mode
1 = SVC mode
18 Actually use “user mode”

1 Available from RISC OS 3.5 onwards

2 Available from RISC OS 4.00 onwards

Notes

When calling DragAnObject with a SWI as the renderer, the block pointed to by R2 should be 10 words long. These words are loaded into R0-R9, and the SWI is called from SVC mode.

When calling DragAnObject with a C/assembler function as the renderer, the function is called in an APCS-conformant manner. The block pointed to by R2 should be 4 words long. These words are loaded into R0-R3 (a1-a4) and passed as parameters to the function. sl, sp and lr are all set correctly.

If the renderer function is in a module, also set bit 17 of the flags word, as this allows access to statics.

Note about DragAnObject User mode

Prior to version 0.09 (Castle), DragAnObject would call client functions in SVC mode even when asked to call them in user mode. On 32 bit systems, this leads to an incorrect stack limit which leads to aborts.

Rather than fix the module, which may cause further faults in existing clients, a new bit (b18) indicates that the function should actually be called in user mode. If bit 18 is set, bit 17 should be clear.

The calling environment should be set up sufficiently to allow access to user and C library statics, provided that DragAnObject_Start was called via a veneer that preserves R10 and R11 (sl and fp). OSLib and _kernel_swi veneers are fine, and _swi is fine except on an unpatched RISC OS 3.70/3.71.

See also

  • DragAnObject_Start
Created on December 13, 2009 15:06:07 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: DragAnObject_Start

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