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:
pixmap_cursor(
Source,
Mask,
X_hot,
Y_hot)
glyph_cursor(
Source_font,
Source_char)
glyph_cursor(
Source_font,
Source_char,
Mask_char)
glyph_cursor(
Source_font,
Source_char,
Mask_font,
Mask_char)
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.