Name
CreatePointer -- create a custom mouse pointer (V6.0)
Synopsis
APTR handle = CreatePointer(ULONG *rgb, int hx, int hy, int *width,
                  int *height, struct hwTagList *tags);
Function
This function must create a mouse pointer that uses the custom imagery passed to this function. Hollywood passes the desired imagery for the custom mouse pointer as a 32-bit ARGB pixel array in the first parameter. Please note that transparency settings for the mouse pointer image are always provided as 8-bit alpha channel values in the 8 most significant bits. If your hardware doesn't support alpha channeled mouse pointers, you have to convert this information first.

Additionally, Hollywood passes the desired hotspot for the mouse pointer to CreatePointer(). A mouse pointer's hotspot is a single pixel within the pointer imagery that is used to determine the mouse pointer's pixel position by the operating system. The hotspot is described as an offset in pixels that is relative to the upper-left corner of the mouse pointer image.

The desired pixel dimensions for the new mouse pointer are passed as pointer values because your implementation of CreatePointer() is allowed to modify them in case there are some hardware restrictions for mouse pointer dimensions on your system. You have to return the actual pixel dimensions of the new mouse pointer in parameters 4 and 5.

The last parameter is a pointer to a tag list. This is reserved for future use and is currently always NULL.

Inputs
rgb
pointer to a 32-bit ARGB pixel array containing the pointer image
hx
x offset of the pointer hotspot in pixels
hy
y offset of the pointer hotspot in pixels
width
pointer to an integer containing the pointer width in pixels; you have to write the real pointer width in pixels to this pointer on exit
height
pointer to an integer containing the pointer height in pixels; you have to write the real pointer height in pixels to this pointer on exit
tags
tag list containing additional parameters (see above)
Results
handle
handle to the custom pointer or NULL if CreatePointer() failed

Show TOC