XCreateGlyphCursor man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

XCreateGlyphCursor()					  XCreateGlyphCursor()

Name
  XCreateGlyphCursor – create a cursor from font glyphs.

Synopsis
  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
  display   Specifies  a  connection  to  an  X	 server;  returned   from
	    XOpenDisplay().

  source_font
	    Specifies  the  font from which a character is to be used for
	    the cursor.

  mask_font Specifies the mask font or None.

  source_char
	    Specifies the index into the cursor shape font.

  mask_char Specifies the index into  the  mask	 shape	font.	Optional;
	    specify 0 if not needed.

  foreground_color
	    Specifies the red, green, and blue (RGB) values for the fore‐
	    ground.

  background_color
	    Specifies the red, green, and blue (RGB) values for the back‐
	    ground.

Returns
  The created cursor.

Description
  XCreateGlyphCursor()	is  similar  to	 XCreatePixmapCursor(),	 but  the
  source and mask bitmaps are obtained	from  separate	font  characters,
  perhaps  in  separate fonts.	The mask font and character are optional.
  If mask_char is not specified, all pixels of the source are displayed.

  The x offset for the hotspot of the created cursor is the  left-bearing
  for the source character, and the y offset is the ascent, each measured
  from the upper-left corner of the bounding rectangle of the character.

  The origins of the source and mask (if it is	defined)  characters  are
  positioned  coincidently  and	 define the hotspot.  The source and mask
  need not have the same bounding box metrics, and there is  no	 restric‐
  tion on the placement of the hotspot relative to the bounding boxes.

  Note	that  source_char  and mask_char are of type unsigned int, not of
  type XChar2b.	 For two-byte matrix  fonts,  source_char  and	mask_char
  should be formed with the byte1 member in the most significant byte and
  the byte2 member in the least significant byte.

  You can free the fonts with XFreeFont() if they are  no  longer  needed
  after creating the glyph cursor.

  For  more  information on fonts and cursors, see Volume One, Chapter 6,
  Drawing Graphics and Text.

Structures
     typedef struct {
	 unsigned long pixel;
	 unsigned short red, green, blue;
	 char flags;		/* DoRed, DoGreen, DoBlue */
	 char pad;
     } XColor;

Errors
  BadAlloc

  BadFont

  BadValue  source_char not defined in source_font.
	    mask_char not defined in mask_font (if mask_font defined).

See Also
  XCreateFontCursor(), XCreatePixmapCursor(), XDefineCursor(),	XFreeCur‐
  sor(),  XQueryBestCursor(),  XQueryBestSize(), XRecolorCursor(), XUnde‐
  fineCursor().

Xlib - Cursors						  XCreateGlyphCursor()
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net