Entry | |
---|---|
R0 | Flags |
Bit 0 = pointer display enable (0=off, 1=on) | |
Bit 1 = pointer shape update (0=no change, 1=updated) | |
Bits 2-31 reserved | |
R1 | X position of pointer |
R2 | Y position of pointer |
R3 | shape_t descriptor block |
R4 | Bits 0-15: 5 (reason code) |
Bits 16-23: Head number | |
Bits 24-31: Driver number |
Exit | |
---|---|
R4 | 0 if request handled by hardware pointer, else preserved if software pointer required |
- | All other registers preserved |
The kernel issues this call during VSync when the pointer shape or position changes. The appropriate driver should respond by performing the requested action and setting R4 to 0 to claim the call.
The coordinates given in R1 and R2 are measured in pixels, and indicate the top-left corner of the pointer image. 0,0 would place the image in the top-left corner of the screen.
R3 points to a shape_t descriptor block:
typedef struct shape_t { uint8 width; /* unpadded width in bytes (see notes) */ uint8 height; /* in pixels */ uint8 padding[2]; /* 2 bytes of padding for field alignment */ void *buffLA; /* logical address of buffer holding pixel data */ void *buffPA; /* corresponding physical address of buffer */ }
A simple video driver, where hardware permits, can use the shape data in the buffer directly, ignoring the updated flag. The OS guarantees that the buffer data is valid for the whole time it is to be displayed. Other drivers may need to make copies of the data, e.g. for conversion to different pixel formats.
If a driver does not provide full support for a hardware pointer, then it can indicate this by having GraphicsV 8 return with bit 1 of R0 clear. The OS will then render a software pointer whenever a call to GraphicsV 5 comes back as unclaimed (R4 unchanged). This allows for selective use of the software pointer, e.g. if the hardware pointer can only be used in some portions of the screen. Note that the driver must take care to disable the hardware pointer when a request is received to move it into an area in which it cannot be displayed.