FakeAllocColor(D3nfb)
FakeAllocColor, FakeFreeColor --
allocate a color pixel
Synopsis
void
FakeAllocColor (pmap, item)
ColormapPtr pmap;
xColorItem *item;
void
FakeFreeColor(pmap, pixel)
ColormapPtr pmap;
Pixel pixel;
Description
FakeAllocColor( )
fakes an AllocColor request
by returning a free pixel if one is available;
otherwise, it returns the closest matching pixel.
This is used by the mi software sprite code
to recolor cursors.
FakeFreeColor( )
frees the pixel that was allocated with
FakeAllocColor( ).
Arguments
pmap
-
installedCmap pointer in the
nfbScrnPriv(D4nfb)
structure
item
-
initialized red, green, and blue members
of a xColorItem structure.
pixel
-
pixel member of an xColorItem structure.
Exit codes
None
Usage notes
These functions are used for drivers
that use a simple configuration without a screen prototype
and are initialized with the
nfbScreenInit(D3nfb)
function.
nfbScreenInit( )
declares the installedCmap structure.
For an example of how these functions are used, see the
ColorCursor( )
routine
in the nteCursor.c file.
Version applicability
This function is supported for NFB drivers
on all releases of SCO OpenServer 5, SVR5, and AIX 5L.
Source files
Routine source-
./dix/colormap.c
Driver source file-
xxxCursor.c
References
nfbScreenInit(D3nfb)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005