PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

DrawHardwareCursor (csCode = 23)

DrawHardwareCursor is a required routine for drivers that support hardware cursors. It sets the cursor's x and y coordinates and visible state. If the cursor was successfully set by a previous call to SetHardwareCursor, the driver must program the hardware with the given x, y, and visible parameters and then return noErr. If the cursor was not successfully set by the last SetHardwareCursor call, the driver must return controlErr.

OSErr = Control (theDeviceRefNum, cscDrawHardwareCursor,
                     &theVDDrawHardwareCursorRec);
--> csCursorX
X coordinate
--> csCursorY
Y coordinate
--> csCursorVisible
true if the cursor must be visible

The client will have already accounted for the cursor's hot spot, so the csCursorX and csCursorY values are the x and y coordinates of the upper left corner of the cursor image. Depending on the position of the hot spot, the upper left corner may be above or to the left of the visible screen; thus, csCursorX and csCursorY are signed values. The driver is responsible for ensuring proper clipping if the cursor lies partially off the screen.

If csCursorVisible is false, the driver must make the cursor invisible; otherwise, the driver must make the cursor visible.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)