# Screen

The screen represents a Plane [gr/plane] drawn on a physical screen device. The
screen can be activated and deactivated to switch between graphical and text
modes, if the underlying hardware supports this.

This abstraction rests on a hardware specific driver that takes care of the gory
details. The screen doesn't handle configuration of the display, which has to be
done directly through the driver.

This unit defines a screen structure that extends a plane [gr/plane] and it
also defines a global "screen" value that points to the active screen.
During initialization, what you'll want to do is create a screen struct and then
set "screen" to it.

## API

Mthods:

activate ( screen -- )
  Enable the graphics mode. We expect this word to set appropriate Plane fields
  such as width, height, encoding, pitch and buffer.

deactivate ( screen -- )
  If the hardware supports it, bring back the display to text mode.

activated? ( screen -- f )
  Yields whether the graphical mode is activated.

newscreen ( 'deactivate 'activate width height encoding -- screen )
  Create a new screen struct bound to methods 'activate and 'deactivate. Other
  arguments are passed on to the plane initializer.
