[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()