Docs » Autodocs » graphics.library » AttachPalExtra
        AttachPalExtra -- Allocate and attach a palette sharing structure to a 	                  colormap. (V39)
         status=AttachPalExtra( cm, vp) 	                       a0  a1 	LONG AttachPalExtra( Struct ColorMap *, struct ViewPort *);
  	Allocates and attaches a PalExtra structure to a ColorMap. 	This is necessary for color palette sharing to work. The 	PalExtra structure will be freed by FreeColorMap(). 	The set of available colors will be determined by the mode 	and depth of the viewport.
  	cm  =  A pointer to a color map created by GetColorMap(). 	vp   = A pointer to the viewport structure associated with 	       the ColorMap.
  	status - 0 if sucessful, else an error number. The only currently 	         defined error number is out of memory (1).
  	This function is for use with custom ViewPorts and custom ColorMaps, 	as Intuition attaches a PalExtra to all of its Screens. 	If there is already a PalExtra associated with the ColorMap, then 	this function will do nothing.
  GetColorMap(), FreeColorMap(), ObtainPen(), ObtainBestPenA()
 |