; MyMouse Definitions, Copr. 1994 Matthias K”ppe
;
; mymouse

		INCLUDE	grdef.asm

MMODE		STRUC
	MODE	DB	?
	INFO	DB	?
MMODE		ENDS

DATA		SEGMENT WORD PUBLIC

		EXTRN	MouseMode: MMODE, \
			ButtonCount: BYTE, MouseSaveSeg: WORD, \
			MouseSavePOfs: WORD, MouseSavePSeg: WORD, \
			MouseSavePtr: DWORD, \
			MouseWhere: DWORD, MouseButtons: BYTE, \
			MouseArea: TRECT, \
			MousePage: BYTE, MousePagePtr: DWORD, \
			MousePageLinear: DWORD, \
			CriticalArea: TRECT, CriticalPage: BYTE, \
			CursorNum: WORD, NewNum: WORD, CursorPtr: DWORD, \
			PointerColor: BYTE, \
			MouseHidden: WORD, \
			MaxWidth: BYTE, MaxLength: BYTE, \
			DoubleDelay: WORD, RepeatDelay: WORD, \
			AutoDelay: WORD, DoubleSpeedTreshold: WORD, \
			ChangeCursor: DWORD, GetMCursor: DWORD, \
			DrawMouse: DWORD, SaveScreen: DWORD, \
			RestoreScreen: DWORD, SaveLatches: DWORD, \
			RestoreLatches: DWORD

		EXTRN	SavedIRQ: DWORD, SavedDrvReq: DWORD, \
			SavedRetrace: DWORD, SavedClock: DWORD, \
			DrawData: BYTE: 16, TimingState: BYTE, \
			LastTicks: WORD, Update: BYTE, YEnd: WORD, \
			RegArea: BYTE: 7, \
			sMouseEvents: BYTE, \
			MPort: WORD, \
			IsDrawn: BYTE, \
			LastWhere: TPOINT, LastButtons: BYTE, \
			HandleProc: WORD, \
			InMouse: BYTE, InService: BYTE, \
			NextNotify: DWORD, SavedFree: DWORD, \
			Active: BYTE, MouseInt: DWORD, \
			SenseX: WORD, SenseY: WORD, \
			MouseStack: DWORD, MouseStackPointer: DWORD, \
			CallStack: DWORD

DATA		ENDS

		EXTRN	PageSeg: FAR, PageAddr: FAR, PageLinear: FAR, \
			SelOfs: FAR

CODE		SEGMENT BYTE PUBLIC

		GLOBAL	UpdateMouse: NEAR, StoreEvent: NEAR, \
			DrvMouseArea: NEAR, MakeMouseContained: NEAR, \
			CallSavedDrvReq: FAR, DoSetRetrace: NEAR, \
			DoSetClock: NEAR, DoUpdateMouse: NEAR, \
			BeginCritical: NEAR, EndCritical: NEAR

		GLOBAL	NextWindow: NEAR, PrevWindow: NEAR, \
			CallMapAddr: NEAR, MapLinear: NEAR

		EXTRN	GetMouseCursor: FAR

CODE		ENDS

GMReg		EQU	5

mm_Mode		EQU	0000FH
mmDriver	EQU	00000H
mmAuto		EQU	00001H
mmMicro		EQU	00002H
mmSystem	EQU	00003H

mmNoClk		EQU	00010H
mmAltMul	EQU	00020H

mm_Port		EQU	00F00H
mmPortAuto	EQU	00000H
mmPort1		EQU	00100H
mmPort2		EQU	00200H

mm_IRQ		EQU	0F000H
mmIRQAuto	EQU	00000H
mmIRQ2		EQU	02000H
mmIRQ3		EQU	03000H
mmIRQ4		EQU	04000H
mmIRQ5		EQU	05000H
mmIRQ6		EQU	06000H
mmIRQ7		EQU	07000H

Port1		EQU	0
Port2		EQU	2
