XCreateColormap 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]

XCreateColormap()					     XCreateColormap()

Name
  XCreateColormap – create a colormap.

Synopsis
  Colormap XCreateColormap(display, w, visual, alloc)
	Display *display;
	Window w;
	Visual *visual;
	int alloc;

Arguments
  display   Specifies	a  connection  to  an  X  server;  returned  from
	    XOpenDisplay().

  w	    Specifies a window ID.  The colormap created will be  associ‐
	    ated with the same screen as the window.

  visual    Specifies a pointer to the Visual structure for the colormap.
	    The visual class and depth must be supported by the screen.

  alloc	    Specifies how many colormap entries to allocate.  Pass either
	    AllocNone or AllocAll.

Returns
  The created colormap.

Description
  XCreateColormap()  creates  a colormap of the specified visual type and
  allocates either none or all of its entries, and returns  the	 colormap
  ID.

  It  is legal to specify any visual class in the structure pointed to by
  the visual argument.	If the class is StaticColor, StaticGray, or True‐
  Color,  the colorcells will have pre-allocated read-only values defined
  by the individual server but unspecified by the X11 protocol.	 In these
  cases, alloc must be specified as AllocNone (else a BadMatch error).

  For  the other visual classes, PseudoColor, DirectColor, and GrayScale,
  you can pass either AllocAll or AllocNone to the  alloc  argument.   If
  you pass AllocNone, the colormap has no allocated entries.  This allows
  your client programs to allocate read-only colorcells with  XAllocColor
  or  read/write  cells	 with  XAllocColorCells(),  AllocColorPlanes  and
  XStoreColors().  If you pass the constant AllocAll, the entire colormap
  is allocated writable (all the entries are read/write, nonshareable and
  have undefined initial RGB values), and the  colors  can  be	set  with
  XStoreColors().   However, you cannot free these entries with XFreeCol‐
  ors(), and no relationships between the entries are defined.

  If the visual class is PseudoColor or GrayScale and alloc is	AllocAll,
  this	function  simulates  a	call  to the function XAllocColor() cells
  returning all pixel values from 1 to (map_entries - 1).  For	a  visual
  class	 of  DirectColor, the processing for AllocAll simulates a call to
  the function XAllocColorPlanes(), returning a pixel value of 0 and mask
  values  the  same as the red_mask, green_mask, and blue_mask members in
  visual.

  The visual argument should be as returned from the DefaultVisual macro,
  XMatchVisualInfo(), or XGetVisualInfo().

  If  the  hardware  colormap  on  the server is immutable, and therefore
  there	 is  no	 possibility  that  a  virtual	colormap  could	 ever  be
  installed, XCreateColormap() returns the default colormap.  Code should
  check the returned ID against the default colormap to catch this situa‐
  tion.

  For  more information on creating colormaps, see Volume One, Chapter 7,
  Color.

Errors
  BadAlloc

  BadMatch  Didn't use AllocNone for StaticColor,  StaticGray,	or  True‐
	    Color.
	    visual type not supported on screen.

  BadValue

  BadWindow

See Also
  XDefaultColormap(),  XDisplayCells(), XCopyColormapAndFree(), XFreeCol‐
  ormap(), XGetStandardColormap(), XInstallColormap(), XListInstalledCol‐
  ormaps(),  XSetStandardColormap(), XSetWindowColormap(), XUninstallCol‐
  ormap().

Xlib - Colormaps					     XCreateColormap()
[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