;       SCCSID = @(#)sswstruc.inc	6.1 90/11/18
;      SCCSID = @(#)sswstruc.inc	6.4 90/01/29
; ****************************************************************************
; *									     *
; *			  IBM/Microsoft Confidential			     *
; *									     *
; *		    Copyright (c) IBM Corporation  1987, 1990		     *
; *		    Copyright (c) Microsoft Corp.  1987, 1990		     *
; *			      All Rights Reserved			     *
; *									     *
; ****************************************************************************

			page 60,132
;	Change History:
;	@@AU - 10/17/88 - DCR 164 - Codeview Dual Display support


;------------------------------------------------------------------------

SGCB	       STRUC				    ; Screen group control
						    ; block
sgnum			  DW	 ?		    ; Screen group #
ptr_to_pids		  DW	 -1		    ; Pointer to pid tables
sglockineffect		  DW	 0		    ; Sg has lock in effect
sgprocessfrozen 	  DW	 0		    ; Sg has frozen process
sgflags 		  DW	 0		    ; Sg's flags
saveresthreadid 	  DW	 0		    ; sav/rest thread id
scrnactionflag		  DW	 -1		    ; Save/restore
scrnactionflagaddr	  DD	 0		    ; Addr to store function
saverestpid		  DW	 0		    ; Sav/rest pid
saverestpidptr		  DW	 -1		    ; Point to sav/rest pid
saverestflags		  DW	 0		    ; S/r thread's flags
savemodethreadid	  DW	 0
modeactionflag		  DW	 0
modeactionflagaddr	  DD	 0
savemodepid		  DW	 0
savemodepidptr		  DW	 0
savemodeflags		  DW	 0
kbdowner		  DW	 0
;viosyncflag		  DB	 0		    ; c 7/22/86
;saveredrawflag 	  DB	 0		    ; c 7/22/86
suffix			  DB	 3 dup(0)
scrnkillindicator	  DB	 -1
modekillindicator	  DB	 -1
timerhandle		  DW	 0
;---------------------------------------------------------------------------
;				 SEMAPHORES
;---------------------------------------------------------------------------

lockneededsem		  DD	 0		    ; Address of lock sem
savemodesem		  DD	 0
savemodethreadsem	  DD	 0
saveredrawsem		  DD	 0
saveresthreadsem	  DD	 0
sg_reserved		  DB	 25 dup (0)	     ; c 8/5/86

SGCB	       ENDS
;------------------------------------------------------------------------

DEVICEDRV      STRUC				    ; Used as the template
						    ; for call to mouse
						    ; and kbd drivers.
parm1	       DW      0			    ; Will store the sg#
parm2	       DW      0			    ; Will store the code
						    ; to terminate (= -1)
DEVICEDRV      ENDS				    ; or switch (=0)

;------------------------------------------------------------------------
PIDCB	       STRUC				    ; Layout of pidtable
						    ; structure
pidtotal	  DW	 0			    ; Total # of pids
pid		  DW	 0			    ; in table belonging
pidlockineffect   DW	 0			    ; to the screen group
pidflags	  DW	 0
pid1		  DW	 0
pidlockineffect1  DW	 0
pidflags1	  DW	 0
pid2		  DW	 0
pidlockineffect2  DW	 0
pidflags2	  DW	 0
pid3		  DW	 0
pidlockineffect3  DW	 0
pidflags3	  DW	 0
pid4		  DW	 0
pidlockineffect4  DW	 0
pidflags4	  DW	 0
pid5		  DW	 0
pidlockineffect5  DW	 0
pidflags5	  DW	 0
eotmark 	  DW	 -1
ptr_to_nxt_pid_table DW  -1			    ; Pointer to a con-
						    ; tinuation of the table
PIDCB	       ENDS

;------------------------------------------------------------------------

MEMTABLE	STRUC

;***************************************************************************
; The layout table mapping available memory usable for storing sgcb's and
; pidtables. It takes two adjacent regions (e.g. 0 & 1) to store a
; screen group control block. However, one region (e.g. 0 or 1)
; can be used to store a pidtable. This renders the other region available
; for pidtable storage only.
;***************************************************************************

blocknum       DW      0			    ; Block ID number
avail	       DB      0			    ; availability (1 = yes)
sgassigned     DW      0			    ; sg# assigned to block
pidcount       DW      0			    ; # of pids if pidtable
blk_pointer    DW      0			    ; pointer (offset)
B	       DW      1
	       DB      0
	       DW      0
	       DW      0
	       DW      0
C	       DW      ?			    ; ÄÄÄÄ¿
	       DB      0			    ;	p ³ s	   c
	       DW      0			    ;	i ³ c  g   o  b
	       DW      0			    ;	d ³ r  r   n  l
	       DW      0			    ;	s ³ e  o   t  o
D	       DW      ?			    ; ÄÄÄÄ´ e  u   r  c
	       DB      0			    ;	p ³ n  p   o  k
	       DW      0			    ;	i ³	   l
	       DW      0			    ;	d ³
	       DW      0			    ;	s ³
E	       DW      ?			    ; ÄÄÄÄÙ
	       DB      0
	       DW      0
	       DW      0
	       DW      0
F	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
G	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
H	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
I	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
JJJ	       DW      ?	       ; avoid conflict with another struc
	       DB      0
	       DW      0
	       DW      0
	       DW      0
K	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
L	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
M	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
N	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
O	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
P	       DW      ?
	       DB      0
	       DW      0
	       DW      0
	       DW      0
eotable        DW      -1
ptr_nxt_table  DW      -1			    ; Pointer to next mem
						    ; table created when
						    ; additional mem is
						    ; allocated
MEMTABLE       ENDS
;------------------------------------------------------------------------

SMGRPARMS      STRUC
oldbp	       DW      ?
retfar	       DD      ?
sgid	       DW      ?
action	       DW      ?
SMGRPARMS      ENDS

;------------------------------------------------------------------------
SMGFREEPARMS   STRUC
f_oldbp        DW      ?
f_retfar       DD      ?
f_sgid	       DW      ?
SMGFREEPARMS   ENDS
;------------------------------------------------------------------------
SVREDRAWMODE   STRUC
s_oldbp        DW      ?
s_retfar       DD      ?
s_vioroutregs		DW	0	; Vio registers
			DW	0
			DW	0
			DW	0
			DW	0
viohandle    DW      ?
notifytype   DD      ?
indicator    DW      ?
SVREDRAWMODE   ENDS

;------------------------------------------------------------------------
SAVESEMS       STRUC
saveresthreadptr  DD   ?
saveredrawptr	  DD   ?
saveredrawmodeptr DD   ?
savelockptr  DD      ?
SAVESEMS       ENDS

;------------------------------------------------------------------------

SAVESEMS2	STRUC
savemodethreadptr  DD	   ?
savemodeptr	DD	?
SAVESEMS2	ENDS

;------------------------------------------------------------------------
SAVEUNDO       STRUC
su_oldbp	DW	?
su_retfar	DD	?
su_vioroutregs		DW	0	; Vio registers
			DW	0
			DW	0
			DW	0
			DW	0
s_viohandle    DW      ?
s_killindic    DW      ?
s_ownerindic   DW      ?
SAVEUNDO       ENDS

;------------------------------------------------------------------------
SAVESEMS3      STRUC
s_saveresthreadptr  DD	 ?
s_saveredrawmodeptr DD	 ?
s_savelockptr  DD      ?
SAVESEMS3      ENDS

;------------------------------------------------------------------------

DDNTFPARMS     STRUC
	       DW      ?
	       DD      ?
d_debuggersgid DW      ?		;New parameter for DCR 148	   @@AU
d_sgid	       DW      ?
d_invalsgid    DW      ?
DDNTFPARMS     ENDS

;------------------------------------------------------------------------
SETTIMEPARMS   STRUC
	       DW      ?
	       DD      ?
t_devicehandle DW      ?
seconds        DW      ?
SETTIMEPARMS   ENDS

;------------------------------------------------------------------------

