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);
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.