(* ------------------------------------------------------------------------
  :Program.       RenderInfo
  :Contents.      get rendering information for certain screen
  :Author.        Kai Bolay [kai]
  :Address.       Hoffmannstraße 168
  :Address.       D-W7250 Leonberg 1
  :Address.       Federal Republic of Germany
  :History.       v1.0 [kai] 20-Feb-91 (ported to Oberon)
  :History.       v1.1 [kai] 17-Aug-91 (enhanced, + Screen locking)
  :History.       v1.1m [Frank Lömker] 21-Feb-92 Umsetzung nach Modula
  :Copyright.     (c) 1985-1990 by MKSoft Development
  :Language.      Modula-2
  :Translator.    M2Amiga V4.0d
  :Remark.        Taken from Atlanta-DevCon-Disk #3
------------------------------------------------------------------------ *)

(*
 * MKSoft Development Amiga ToolKit V1.0
 *
 * Copyright (c) 1985,86,87,88,89,90 by MKSoft Development
 *
 * Ported to Oberon 1991 by Kai Bolay
 *
 *
 *
 ************************************************************************
 *                                                                      *
 *                            DISCLAIMER                                *
 *                                                                      *
 *   THIS SOFTWARE IS PROVIDED "AS IS".                                 *
 *   NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE      *
 *   ACCURACY, RELIABILITY, PERFORMANCE, CURRENTNESS, OR OPERATION      *
 *   OF THIS SOFTWARE, AND ALL USE IS AT YOUR OWN RISK.                 *
 *   NEITHER COMMODORE NOR THE AUTHORS ASSUME ANY RESPONSIBILITY OR     *
 *   LIABILITY WHATSOEVER WITH RESPECT TO YOUR USE OF THIS SOFTWARE.    *
 *                                                                      *
 ************************************************************************
 *)

(*-----------------------------------------------------------------------*)
(* This file contains the definition of the rendering information        *)
(* for elements on the screen.  This information is used to generate     *)
(* the correct pen colors for items on the screen...                     *)
(*-----------------------------------------------------------------------*)
DEFINITION MODULE RenderInfo;

FROM GraphicsD IMPORT TextFontPtr,TextAttr;
FROM IntuitionD IMPORT ScreenPtr;

TYPE RenderInfoPtr = POINTER TO RenderInfo;
     RenderInfo = RECORD
       (* -- Pen Colors ------------------------------- *)
       highlight:    SHORTINT; (* Standard Highlight   *)
       shadow:       SHORTINT; (* Standard Shadow      *)
       textPen:      SHORTINT; (* Requester Text Pen   *)
       backPen:      SHORTINT; (* Requester Back Fill  *)

       (* -- Window Borders --------------------------- *)
       windowTop:    SHORTINT; (* Top border of window *)
       windowLeft:   SHORTINT; (* Left border          *)
       windowRight:  SHORTINT; (* Right border         *)
       windowBottom: SHORTINT; (* Bottom border        *)
       windowTitle:  SHORTINT; (* Window title size (includes border) *)

       (* -- Internal --------------------------------- *)
       junkPad:       SHORTINT;

       (* -- Screen Dimensions ------------------------ *)
       screenWidth:  INTEGER;  (* Width of the screen  *)
       screenHeight: INTEGER;  (* Height of the screen *)

       (* -- Font Information ------------------------- *)
       fontSize: INTEGER;       (* Font size for string gadgets *)
       theFont:  TextFontPtr; (* Font TextFont       *)
       textAttr: TextAttr;    (* Font TextAttr       *)

       (* -- Internal --------------------------------- *)
       screen:    ScreenPtr;
     END; (* RECORD *)

(*-----------------------------------------------------------------------*)
(* Close the font, unlock screen and free the memory...                  *)
(*-----------------------------------------------------------------------*)
PROCEDURE CleanUpRenderInfo (VAR ri: RenderInfoPtr);

(*-----------------------------------------------------------------------*)
(* Use this screen for the render information.                           *)
(*-----------------------------------------------------------------------*)
PROCEDURE GetRenderInfo (TheScreen: ScreenPtr): RenderInfoPtr;

END RenderInfo.
