STATE(3R)

NAME
state: P->state, MOVED, RESHAPED, NO_RESHAPE - per process windowing states

SYNOPSIS
#include <dmd.h>

long P->state;

DESCRIPTION
P->state is the state variable for an application running in the 630 MTG.

The fields in the state variable relevant to windowing operations are:

    MOVED

    RESHAPED

    NO_RESHAPE

These bits are set or checked by the terminal during a windowing operation.

If an application program wants to do some special processing after being moved or reshaped, it must periodically check the proper state bits. When the pertinent event occurs, the application program should perform its special processing and then reset the proper bits in the state variable as follows:

For a process to test whether its window has been moved , it must check:

( P->state&MOVED )

To reset the MOVED condition it is necessary to execute:

P->state &= ~(MOVED|RESHAPED);

For a process to test whether its window has been reshaped, it must check:

( P->state&RESHAPED && !(P->state&MOVED) )

To reset the RESHAPED condition it is necessary to execute:

P->state &= ~RESHAPED;

The reason for the interaction of the MOVED and RESHAPED bits is purely historical.

The NO_RESHAPE bit should be set if the application program does not want to be reshaped by the user through the global mouse operation. A message box with the message "Fixed size window: Cannot be reshaped" will be displayed if the user attempts to reshape the window. Clearing the bit makes the window reshapable again.

SEE ALSO
keyboard(3r).