DEFINITION MODULE WSAbilities;

(*
    Title: 	Available colours from GKS
    LastEdit:	"Wed Aug 19 11:45:45 1987" by Tony Mann
    Author: 	acm
		Qudos Limited
*)

(* This modules makes available the colours that your GKS back can draw.
   The text drawing capabilities are also  made available.
   It is not part of GKS, and is an addition to it purely for convenience.

   It is up to the GKSDev module to set the variable palette. Older versions
   of GKSDev may not do this in which case palette will be the empty set.
   
   It is also up to the GKSDev module to set linesPerPage, sizedText AND
   rotatedText.  If the GKSDev does not set these text handling capabilities,
   then some defaults suitable for a low-res graphics terminal will be used.
   
   
*)

FROM Palette IMPORT COLOUR, PALETTE;

EXPORT QUALIFIED Colours, palette, linesPerPage, sizedText, rotatedText;


VAR palette: PALETTE;
    (*  The set of colours a GKS back end can draw. Set by GKSDev.  *)
    
    linesPerPage:   REAL;      (* suitable number of lines to draw per page *)
    sizedText:      BOOLEAN;   (* can workstation draw sized text           *)
    rotatedText:    BOOLEAN;   (* can workstation draw rotated text         *)


PROCEDURE Colours (): CARDINAL;
    (*  Returns the number of colours a GKS back end can draw  *)

END WSAbilities.
