1. NAME

XDefineCursor, XUndefineCursor - define cursors

2. SYNTAX

int XDefineCursor(Display *display, Window w, Cursor cursor); int XUndefineCursor(Display *display, Window w);

3. ARGUMENTS

cursor 1i Specifies the cursor that is to be displayed or .ZN None .

display 1i Specifies the connection to the X server.

w 1i Specifies the window.

4. DESCRIPTION

If a cursor is set, it will be used when the pointer is in the window. If the cursor is .ZN None , it is equivalent to .ZN XUndefineCursor .

.ZN XDefineCursor can generate .ZN BadCursor and .ZN BadWindow errors.

The .ZN XUndefineCursor function undoes the effect of a previous .ZN 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.

.ZN XUndefineCursor can generate a .ZN BadWindow error.

5. DIAGNOSTICS

  • .ZN BadAlloc
     The server failed to allocate the requested resource or server memory.
  • .ZN BadCursor
     A value for a Cursor argument does not name a defined Cursor.
  • .ZN BadWindow
     A value for a Window argument does not name a defined Window.

6. SEE ALSO