create_cursor/[2,3,4,5]
     create_cursor(+Cursor_spec, -Cursor)
     create_cursor(+Display, +Cursor_spec, -Cursor)
     create_cursor(+Cursor_spec, -Cursor, +Foreground_color, +Background_color)
     create_cursor(+Display, +Cursor_spec, -Cursor, +Foreground_color,
                   +Background_color)
     

Cursor is a newly created cursor on Display, as specified by Cursor_spec. If Display is not specified, the display of the default screen is used. If Foreground_color and Background_color are specified, they must be color specifications (see pxl-col) indicating the color to give to the two parts of the cursor, otherwise black and white are used. Note that Foreground_color and Background_color are not pixel values.

Cursor_spec must be one of these:


An atom
which names a font cursor.
pixmap_cursor(Source, Mask, X_hot, Y_hot)
Where Source and Mask are pixmaps of the same size, and X_hot and Y_hot are integers specifying the hot spot of the cursor, relative to the upper right corner of the pixmaps.
glyph_cursor(Source_font, Source_char)
Where Source_font specifies a font and Source_char is the character code of the character in that font to be used as the image of the cursor.
glyph_cursor(Source_font, Source_char, Mask_char)
Where Source_font a font and Source_char and Mask_char are the character codes of the characters in that font to be used as source and mask image of the cursor.
glyph_cursor(Source_font, Source_char, Mask_font, Mask_char)
Where Source_font specifies a font and Source_char is the character code of the character in that font to be used as the foreground image of the cursor, and Mask_font and Mask_char similarly specify a mask image.

Obviously, specifying a cursor by name is simplest. In the other cases, the cursor is specified as a source and mask bitmap, and a hotspot. The bits that are turned off in the mask bitmap are transparent in the cursor. The bits turned on in both the mask and source bitmaps will appear in the cursor's foreground color. The remaining bits appear in the cursor's background color. For glyph_cursor/2 terms, the same image is used as both source and mask, so there is no background.