Page:Xlib - C Language X Interface.pdf/61

 XSetWindowColormap (display, w, colormap) Display *display; Window w; Colormap colormap; display

Specifies the connection to the X server.

w

Specifies the window.

colormap

Specifies the colormap.

The XSetWindowColormap function sets the specified colormap of the specified window. The colormap must have the same visual type as the window, or a BadMatch error results. XSetWindowColormap can generate BadColor, BadMatch, and BadWindow errors. To define which cursor will be used in a window, use XDefineCursor. XDefineCursor (display, w, cursor) Display *display; Window w; Cursor cursor; display

Specifies the connection to the X server.

w

Specifies the window.

cursor

Specifies the cursor that is to be displayed or None.

If a cursor is set, it will be used when the pointer is in the window. If the cursor is None, it is equivalent to XUndefineCursor. XDefineCursor can generate BadCursor and BadWindow errors. To undefine the cursor in a given window, use XUndefineCursor. XUndefineCursor (display, w) Display *display; Window w; display

Specifies the connection to the X server.

w

Specifies the window.

The XUndefineCursor function undoes the effect of a previous XDefineCursor for this window. When the pointer is in the window, the parent’s cursor will now be used. On the root window, the default cursor is restored. XUndefineCursor can generate a BadWindow error.

56