[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
       AttachPalExtra -- Allocate and attach a palette sharing structure to a

	                  colormap. (V39)


   SYNOPSIS
       status=AttachPalExtra( cm, vp)
	                       a0  a1

	LONG AttachPalExtra( Struct ColorMap *, struct ViewPort *);

   FUNCTION
	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.

   INPUTS
	cm  =  A pointer to a color map created by GetColorMap().

	vp   = A pointer to the viewport structure associated with
	       the ColorMap.

   RESULTS
	status - 0 if sucessful, else an error number. The only currently
	         defined error number is out of memory (1).

   BUGS

   NOTES
	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.

   SEE ALSO
	GetColorMap() FreeColorMap() ObtainPen() ObtainBestPenA()