home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
files
/
nz10.dms
/
nz10.adf
/
Tunnel
/
MyScreen.mod
< prev
next >
Wrap
Text File
|
1993-12-03
|
2KB
|
91 lines
(*
This module initializes the window and screen for
any program.
Created: 5/24/86 by Richie Bielak
Modified: 08/Feb/88 by Garth Thornton
Copyright (c) 1986 by Richard Bielak
This program maybe freely copied. But please
leave my name in. Thanks.....Richie
*)
IMPLEMENTATION MODULE MyScreen;
FROM SYSTEM IMPORT ADR, BYTE, ADDRESS, SETREG;
FROM Intuition IMPORT
WindowFlags, NewWindow, IDCMPFlags, IDCMPFlagSet, WindowFlagSet,
WindowPtr, ScreenPtr, CustomScreen;
FROM Windows IMPORT OpenWindow, ReportMouse;
FROM Views IMPORT Hires, ModeSet;
FROM Screens IMPORT OpenScreen, NewScreen;
VAR
NULL : ADDRESS;
MyWindow : NewWindow;
MyScreen : NewScreen;
ScreenName : ARRAY [0..20] OF CHAR;
(* ++++++++++++++++++++++++++++++++++++++++ *)
PROCEDURE SetUpScreen (VAR wp : WindowPtr;
VAR sp : ScreenPtr;
width, height, depth : INTEGER;
modes : ModeSet);
(* +++++++++++++++++++++++++++++++++++++++ *)
PROCEDURE InitScreen (VAR s : NewScreen);
BEGIN
ScreenName := "GT";
WITH s DO
LeftEdge := 0; TopEdge := 0;
Width := width; Height := height;
Depth := depth;
DetailPen := BYTE (0); BlockPen := BYTE (1);
ViewModes := modes;
Type := CustomScreen;
Font := NULL;
DefaultTitle := ADR (ScreenName);
Gadgets := NULL;
CustomBitMap := NULL
END;
END InitScreen;
(* +++++++++++++++++++++++++++++++++++++++ *)
PROCEDURE InitWindow (VAR w : NewWindow; sp : ScreenPtr);
BEGIN
WITH w DO
LeftEdge := 0; TopEdge := 0; Width := width; Height := height;
DetailPen := BYTE (0);
BlockPen := BYTE (1);
Title := NULL;
Flags := WindowFlagSet {Activate, Borderless, BackDrop,
ReportMouseFlag};
IDCMPFlags := MyIDCMPFlagSet;
Type := CustomScreen;
CheckMark := NULL;
FirstGadget := NULL;
Screen := sp;
BitMap := NULL;
MinWidth := 10; MinHeight := 10;
MaxWidth := width; MaxHeight := height;
END
END InitWindow;
BEGIN
InitScreen (MyScreen);
(* Define a new screen *)
sp := OpenScreen (ADR(MyScreen));
InitWindow (MyWindow, sp);
(* Now open the window *)
wp := OpenWindow (MyWindow);
END SetUpScreen;
BEGIN
NULL := 0;
END MyScreen.