Platform Package reference: Function EwAllocUserColor()

Description of the function EwAllocUserColor() available in Platform Packages for ANSI C compatible target systems running in the color format Index8 (CLUT based). This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.


XUInt8 EwAllocUserColor( XColor aColor )



Color to be stored in the global CLUT (color look-up table).


The function EwAllocUserColor() stores the given user defined color within an empty area in the global CLUT (color look-up table). User defined colors exist for external applications coexisting with the GUI application only. In this manner the external application can manage its own/private set of color values.

If successful, the function returns the entry within the global CLUT, where the color was stored. If there are no entries available for new colors, 0 (zero) is returned. To free the previously allocated user color the function EwFreeUserColor() is available. To modify an already allocated color the function EwSetUserColor() is available.