Next: , Previous: , Up: Top   [Contents][Index]


11 Cursors

A cursor is a visible shape that appears at the current position of the pointer device. The cursor shape moves with the pointer to provide continuous feedback to the user about the current location of the pointer. Each window can have a cursor attribute that defines the appearance of the pointer cursor when the pointer position lies within the window. See window-cursor.

A cursor image is composed of a source bitmap, a mask bitmap, a hot spot, a foreground color, and a background color. Either 1-bit pixmaps or font glyphs can be used to specify source and mask bitmaps. The source bitmap identifies the foreground and background pixels of the cursor image; the mask bitmap identifies which source pixels are actually drawn. The mask bitmap thus allows a cursor to assume any shape. The hot spot defines the position within the cursor image that is displayed at the pointer position.

In CLX, a cursor is represented by a cursor object. This section describes the CLX functions to: