W$PALETTE

In graphical environments, you can customize the basic set of colors that you use in your programs.

ACUCOBOL-GT allows programs to reference 16 distinct colors (8 low-intensity and 8 high-intensity). For most machines, this set of colors is fixed (black, blue, green, cyan, red, magenta, brown, and white). On Windows machines, you can select which 16 colors you will be using. You are given access to a palette of 16 colors that defines which color corresponds to each color number.

You control the palette through the library routine W$PALETTE.

Usage

CALL "W$PALETTE" 
    USING OP-CODE, WPALETTE-DATA 
    GIVING RESULT

Parameters

OP-CODE Numeric value Selects which palette function to perform. The operations are described below.
WPALETTE-DATA Group item as follows:
01  WPALETTE-DATA.
    03  WPAL-COLOR-ID    PIC X COMP-X.
    03  WPAL-FLAGS REDEFINES 
        WPAL-COLOR-ID    PIC X COMP-X.
    03  WPAL-RED         PIC X COMP-X.
    03  WPAL-USER-COLOR-ID REDEFINES
        WPAL-RED         PIC X COMP-X.
    03  WPAL-GREEN       PIC X COMP-X.
    03  WPAL-BLUE        PIC X COMP-X.

This provides information and holds results for certain operations described below. It may be omitted from those operations that do not use it.

RESULT Signed numeric data item. Returns the status of the operation. Unless otherwise stated below, 1 indicates success, and a zero or negative result indicates failure.

The WPALETTE-DATA group item and all of the level 78 symbolic names described below can be found in the COPY library palette.def.

Description

W$PALETTE performs a variety of operations depending on the passed OP-CODE. These operations are shown below.