Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XCreFCur(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XDefineCursor(3X)

XRecolorCursor(3X)

XCreateFontCursor(3X)  —  X Version 11

NAME

XCreateFontCursor, XCreatePixmapCursor, XCreateGlyphCursor − create cursors

SYNTAX

#include <X11/cursorfont.h> Cursor XCreateFontCursor(display, shape)
      Display ∗display;
      unsigned int shape;

Cursor XCreatePixmapCursor(display, source, mask, foreground_color, background_color, x, y)
      Display ∗display;
      Pixmap source;
      Pixmap mask;
      XColor ∗foreground_color;
      XColor ∗background_color;
      unsigned int x, y;

Cursor XCreateGlyphCursor(display, source_font, mask_font, source_char, mask_char,
                           foreground_color, background_color)
      Display ∗display;
      Font source_font, mask_font;
      unsigned int source_char, mask_char;
      XColor ∗foreground_color;
      XColor ∗background_color;

ARGUMENTS

background_color
Specifies the red, green, and blue (RGB) values for the background of the source.

displaySpecifies the connection to the X server. 

maskSpecifies the source bits of the cursor that are to be displayed.  You can also pass None.

mask_charSpecifies the glyph character for the mask. 

mask_fontSpecifies the font for the mask glyph.  You can also pass None.

source_charSpecifies the character glyph for the source. 

foreground_color
Specifies the red, green, and blue (RGB) values for the foreground of the source.

source_fontSpecifies the font for the source glyph. 

shapeSpecifies the shape in which you want to create the standard cursor. 

sourceSpecifies the shape of the source cursor. 

x

ySpecify the x and y coordinates. 

DESCRIPTION

The XCreateFontCursor function creates a cursor from a standard font. .PN XCreateFontCursor can generate BadAlloc, BadMatch, and BadValue errors.

The XCreatePixmapCursor function creates a cursor and returns the cursor ID associated with it. .PN XCreatePixmapCursor can generate BadAlloc, BadMatch, and BadPixmap errors.

The XCreateGlyphCursor function is similar to XCreatePixmapCursor and creates a cursor from font glyphs. For XCreateGlyphCursor, however, the source and mask bitmaps are obtained from the specified font glyphs. .PN XCreateGlyphCursor can generate BadAlloc, BadFont, and BadValue errors.

DIAGNOSTICS

BadAlloc The server failed to allocate the requested resource or server memory. 

BadFont A value for a Font or GContext argument does not name a defined Font. 

BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. 

BadPixmap A value for a Pixmap argument does not name a defined Pixmap. 

BadValue Some numeric value falls outside the range of values accepted by the request.  Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted.  Any argument defined as a set of alternatives can generate this error. 

SEE ALSO

XDefineCursor(3X), XRecolorCursor(3X)
Xlib − C Language X Interface

1 March 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026