field_force_colour()

Purpose

Changes the colours for the next screen function

Old name

#define force_colour field_force_colour

Syntax

void field_force_colour(in_colour, out_colour,
in_beep, outtrm_beep)

Parameters

int in_colour

The colour to use for the input colour

 

int out_colour

The colour to use for the output colour

 

int in_beep

The beep duration for next input

 

int out_beep

The beep duration for next output

 

The parameters in_colour and out_colour determine the colour for input and output.

If the colour value is greater than 0, the lower 8 bits determine the colour as follows:

 

Bit

Colour

 

bit 0
bit 1
bit 2
bit 3
bit 4
bit 5
bit 6
bit 7

Blue
Green
Red
Brightness
Blue background
Green background
Red background
Flashing

 

If the colour is less than zero the colour is forced to the default colour of the standard colour types.

The code values must be negated in calls to field_force_colour().

The codes are shown below:

 

Value

Meaning

 

C_BACKGROUND
C_WINDOW
C_MAP
C_OUTPUT
C_INPUT
C_ERROR
C_HELP
C_REMARK
C_WARNING
C_MNEMONIC
C_EMPHASIS
C_OPTION
C_OBSCURE
C_FKEY_WINDOW
C_FKEY_DATA
C_SHADOW
C_ACTIVE_TITLE
C_INACTIVE_TITLE

Default background colour
Default popup window text colour
Default map text colour
Default field output colour
Default field input colour
Default error message colour
Default help colour
Default remark colour
Default warning error colour
Colour of mnemonics & window emphasized text
Colour of emphasized text in maps
Colour of highlighted option within menu
De-emphasis colour for forbidden options
Function key area colour for popup windows
Function key area colour for data maps
Colour of shadowed parts of the screen
Colour of activated title bar
Colour of deactivated title bar

 

The parameters in_beep and out_beep determine the length of the beep duration for input and output functions. Use -1 for the default beep and 0 for no beep at all.

Description

The field_force_colour() function is used to change the default colour values in a map for the next screen function call only.

See also

field_force_size(), field_force_range()