;;
;; vcond.inc - include file for VCOND
;;
;; Copyright (c) 1993, Microsoft Corp 
;;
;; Author: Fred Hewett, Cypress Software Ltd.
;;
;; IMPORTANT: 	Many of these defines also appear in VCONSOLE.H, and they must 
;; 		be kept consistent.

;; WARNING - the device ID must agree with VMM.H
;;	   - and also with RING0.H

VCOND_DEVICE_ID		EQU	38H
VCOND_MAJOR_VER		EQU	01H
VCOND_MINOR_VER		EQU	00H

VCOND_DEV_SIGNATURE     EQU     8H

D2A_SETCURSORPOS	EQU	101H
D2A_SETCURSORATTR	EQU	102H
D2A_SETCOLOR		EQU	103H
D2A_TERMINATE		EQU	104H
D2A_SPAWN		EQU	105H
D2A_SETMOUSECOLLECTION	EQU	106H
D2A_EMITCHARS		EQU	107H
D2A_NOTHINGTODO		EQU	108H
D2A_SIGNAL		EQU	109H
D2A_WAIT		EQU	10AH
D2A_ATTACH		EQU	10BH
D2A_DETACH		EQU	10CH
D2A_SHOWMOUSE		EQU	10DH
D2A_FILLCHAR		EQU	10EH
D2A_FILLATTR		EQU	10FH
D2A_SETSCREENSIZE	EQU	110H
D2A_MATCHSCREENSIZE	EQU	111H
D2A_FILLINPUT		EQU	112H
ifdef	NEC_98
D2A_SETTERMDOSSCREEN	EQU	113H
endif	;NEC_98
ifdef BILINGUAL_CONSOLE
D2A_GETCODEPAGE		EQU	114H
endif

A2D_READY		EQU	201H
A2D_GETJOB		EQU	202H
A2D_SPAWN		EQU	203H
A2D_CHAREVENT		EQU	204H
A2D_MOUSEEVENT		EQU	205H
A2D_KEYEVENT		EQU	206H
A2D_JOBDONE		EQU	207H
A2D_DISPLAY_INFO	EQU	208H
A2D_LAUNCH		EQU	209H
A2D_BUTTONCOUNT		EQU	20AH
A2D_BESTMATCH		EQU	20BH
A2D_FILEINFO		EQU	20CH
A2D_AGENTEXITING	EQU	20DH
A2D_GETPUSHCHARS	EQU	20EH
A2D_SFTTOEXTFH		EQU	20FH
A2D_GETNUMCHAREVENTS	EQU	210h
ifdef BILINGUAL_CONSOLE
A2D_CODEPAGE		EQU	211H
endif
ifdef	NEC_98
A2D_NOTIFYSCRINFOADDR	EQU	212H
endif	;NEC_98

W2D_QUERYNEEDKEYMAP	EQU	301H
W2D_KEYMAPPING		EQU	302H
W2D_SETDBLCLKTIME	EQU	303H
W2D_GETGRABMSG		EQU	304H
W2D_GETGRABSTATE	EQU	305H
W2D_MOUSEEVENT		EQU	306H
W2D_DISPLAYEVENT 	EQU	307H
W2D_ENDUPDATE		EQU	308H

IE_RALT			EQU	0001H
IE_LALT			EQU	0002H
IE_RCTRL		EQU	0004H
IE_LCTRL		EQU	0008H
IE_SHIFT		EQU	0010H
IE_NUMLOCK		EQU	0020H
IE_SCROLLLOCK		EQU	0040H
IE_CAPSLOCK		EQU	0080H
IE_ENHANCED		EQU	0100H
IE_MBLEFT		EQU	0200H
IE_MBRIGHT		EQU	0400H
IE_MB2LEFT		EQU	0800H
IE_MB3LEFT		EQU	1000H
IE_MB4LEFT		EQU	2000H
IE_MOVED		EQU	4000H
IE_CLICK		EQU	8000H
SHIFT_MASK		EQU	(IE_RALT+IE_LALT+IE_RCTRL+IE_LCTRL+IE_SHIFT+IE_NUMLOCK+IE_SCROLLLOCK+IE_CAPSLOCK)
BUTTON_MASK		EQU	(IE_MBLEFT+IE_MBRIGHT+IE_MB2LEFT+IE_MB3LEFT+IE_MB4LEFT)
BUTTON_SHIFT		EQU	9
MOUSE_MASK		EQU	(BUTTON_MASK+IE_MOVED)

LAUNCH_NEW		EQU	0001H
LAUNCH_STDIN_REDIR	EQU	0002H
LAUNCH_STDOUT_REDIR	EQU	0004H

;; Subfunctions for A2D_SPAWN

SPN_GETPATH		EQU	1
SPN_GETCMDLINE		EQU	2
SPN_GETCURDIR		EQU	3
SPN_GETENVSIZE		EQU	4
SPN_GETENV		EQU	5
SPN_FAILED		EQU	6
SPN_COMPLETED		EQU	7


VCD_NOEXITCODE	EQU	(0ffffffffH)


ifdef IS_32

Begin_Service_Table VCOND

VCOND_Service	VCOND_Get_Version, LOCAL
VCOND_Service	VCOND_Launch_ConApp_Inherited, LOCAL
ifdef VIME_CONSOLE
VCOND_Service	VCOND_Get_ConsoleInfo, LOCAL
VCOND_Service	VCOND_GrbRepaintRect, LOCAL
VCOND_Service	VCOND_GrbSetCursorPosition, LOCAL
VCOND_Service	VCOND_GrbNotifyWOA, LOCAL
endif

End_Service_Table VCOND

endif
