home *** CD-ROM | disk | FTP | other *** search
- /*
- * cmfunc.h
- *
- * Module for C mouse library model independent functions
- * This predeclaration file should be included in any module which uses it.
- *
- * Copyright (c) 1988-1989, Microsoft Corporation. All rights reserved.
- *
- * Revision History:
- * Tom Hensel 11/10/88 Wrote it
- *
- * Predeclaration file for C mouse library model independent functions
- * The libraries are named cmfuncx.lib, where x is:
- *
- * s for small model
- * c for compact model
- * m for medium model
- * l for large model
- *
- * Note: Some file names are too long and may cause compiler warning
- * messages. This is a tradeoff to allow the names to
- * correspond to the mouse function descriptions in
- * the Mouse Programmer's Reference Guide.
- *
- * Library function definitions
- *
- * void MouseResetAndStatus(pStatus, pcButtons)
- *
- * Outputs:
- *
- * int *pStatus; Mouse status
- * int *pcButtons; Number of buttons
- *
- * void ShowCursor()
- *
- * void HideCursor()
- *
- * void GetButtonStatusAndMousePosition(pButtonStatus,
- * pHorizontalPosition,
- * pVerticalPosition
- * )
- *
- * Outputs:
- *
- * int *pButtonStatus; Button status
- * int *pHorizontalPosition; Cursor position (horizontal)
- * int *pVerticalPosition; Cursor position (vertical)
- *
- * void SetMouseCursorPosition(horizontalCoordinate, verticalCoordinate)
- *
- * Inputs:
- *
- * int horizontalCoordinate; New cursor coordinate (horizontal)
- * int verticalCoordinate; New cursor coordinate (vertical)
- *
- * void GetButtonPressInformation(pStatus,
- * pButtonPresses,
- * pHorizontalCursor,
- * pVerticalCursor
- * )
- *
- * Inputs:
- *
- * int *pStatus; Button
- *
- * Outputs:
- *
- * int *pStatus; Button status
- * int *pButtonPresses; Number of button presses
- * int *pHorizontalCursor; Cursor (horizontal) at last press
- * int *pVerticalCursor; Cursor (vertical) at last press
- *
- * void GetButtonReleaseInformation(pStatus,
- * pButtonReleases,
- * pHorizontalCursor,
- * pVerticalCursor,
- * )
- *
- * Inputs:
- *
- * int *pStatus; Button
- *
- * Outputs:
- *
- * int *pStatus; Button status
- * int *pButtonPresses; Number of button presses
- * int *pHorizontalCursor; Cursor (horizontal) at last release
- * int *pVerticalCursor; Cursor (vertical) at last release
- *
- * void SetMinimumAndMaximumHorizontalCursorPosition(minimumPosition,
- * maximumPosition
- * )
- *
- * Inputs:
- *
- * int minimumPosition; Minimum posiiton
- * int maximumPosition; Maximum position
- *
- * void SetMinimumAndMaximumVerticalCursorPosition(minimumPosition,
- * maximumPosition
- * )
- *
- * Inputs:
- *
- * int minimumPosition; Minimum posiiton
- * int maximumPosition; Maximum position
- *
- * void SetGraphicsCursorBlock(horizontalHotSpot,
- * verticalHotSpot,
- * pScreenAndCursorMasks
- * )
- *
- * Inputs:
- *
- * int horizontalHotSpot; Cursor hot spot (horizontal)
- * int verticalHotSpot; Cursor hot spot (vertical)
- * int pScreenAndCursorMasks[]; Pointer to screen and cursor masks
- *
- * void SetTexCursor(cursorSelect,
- * screenMask_scanLineStart,
- * cursorMask_scanLineStop
- * )
- *
- * Inputs:
- *
- * int cursorSelect; Cursor select
- * int screenMask_scanLineStart; Screen mask value/scan line start
- * int cursorMask_scanLineStop; Cursor mask value/scan line stop
- *
- * void ReadMouseMotionCounters(pHorizontalCount, pVerticalCount)
- *
- * Outputs:
- *
- * int *pHorizontalCount; Count (horizontal)
- * int *pVerticalCount; Count (vertical)
- *
- * void SetInterruptSubroutineCallMaskAndAddress(callMask, pSubroutine)
- *
- * Inputs:
- *
- * int callMask; Call mask
- * void (*pSubroutine)(); Subroutine address
- *
- * void LightPenEmulationModeOn()
- *
- * void LightPenEmulationModeOff()
- *
- * void SetMickeyPixelRatio(horizontalMickeyPixelRatio,
- * verticalMickeyPixelRatio
- * )
- *
- * Inputs:
- *
- * int horizontalMickeyPixelRatio; Mickey/pixel ratio (horizontal)
- * int verticalMickeyPixelRatio; Mickey/pixel ratio (vertical)
- *
- * void ConditionalOff(pRegionArray)
- *
- * Inputs:
- *
- * int pRegionArray[4]; Address of the region array
- *
- * void SetDoubleSpeedThreshold(thresholdSpeed)
- *
- * Inputs:
- *
- * int thresholdSpeed; Threshold speed in mickeys/second
- *
- * void SwapInterruptSubroutines(pSubroutineSegment,
- * pCallMask,
- * pSubroutineOffset
- * )
- *
- * Inputs:
- *
- * unsigned *pSubroutineSegment; Segment of new subroutine
- * int *pCallMask; New call mask
- * unsigned *pSubroutineOffset; Offset of new subroutine
- *
- * Outputs:
- *
- * unsigned *pSubroutineSegment; Segment of old subroutine
- * int *pCallMask; Old call mask
- * unsigned *pSubroutineOffset; Offset of old subroutine
- *
- * void GetMouseDriverStateStorageRequirements(pBufferSize)
- *
- * Outputs:
- *
- * int *pBufferSize; Buffer size required for mouse driver state
- *
- * void SaveMouseDriverState(pBuffer)
- *
- * Inputs:
- *
- * int *pBuffer; Pointer to the buffer
- *
- * void RestoreMouseDriverState(pBuffer)
- *
- * Inputs:
- *
- * int *pBuffer; Pointer to the buffer
- *
- * void SetAlternateSubroutineCallMaskAndAddress(pErrorStatus,
- * eventMask,
- * pSubroutine
- * )
- *
- * Inputs:
- *
- * unsigned eventMask; User interrupt call mask
- * void (*pSubroutine)(); User subroutine address
- *
- * Outputs:
- *
- * int *pErrorStatus; Error status (-1 if error occured)
- *
- * void GetUserAlternateInterruptAddress(pSegment, pEventMask, pOffset)
- *
- * Inputs:
- *
- * unsigned *pEventMask; User interrupt call mask
- *
- * Outputs:
- *
- * unsigned *pSegment; User interrupt address segment
- * unsigned *pEventMask; User interrupt call mask
- * unsigned *pOffset; User interrupt address offset
- *
- * Note: Segment and offset will be zero if no interrupt call mask is
- * returned, or it is invalid
- *
- * void SetMouseSensitivity(horizontalMickeys,
- * verticalMickeys,
- * doubleSpeedThreshold
- * )
- *
- * Inputs:
- *
- * int horizontalMickeys; Mickeys/pixel (horizontal)
- * int verticalMickeys; Mickeys/pixel (vertical)
- * int doubleSpeedThreshold; Threshold for double speed
- *
- * void GetMouseSensitivity(pHorizontalMickeys,
- * pVerticalMickeys,
- * pDoubleSpeedThreshold
- * )
- *
- * Outputs:
- *
- * int *pHorizontalMickeys; Mickeys/pixel (horizontal)
- * int *pVerticalMickeys; Mickeys/pixel (vertical)
- * int *pDoubleSpeedThreshold; Threshold for double speed
- *
- * void SetMouseInterruptrate(rate)
- *
- * Inputs:
- *
- * int rate; Interrupt rate (in interrupts/second)
- *
- * void SetCRTPageNumber(mouseCursorDisplayCRTPage)
- *
- * Inputs:
- *
- * int mouseCursorDisplayCRTPage; CRT page for mouse cursor display
- *
- * void GetCRTPageNumber(pCurrentCursorDisplayCRTPage)
- *
- * Ouputs:
- *
- * int *pCurrentCursorDisplayCRTPage; CRT page number of current cursor display
- *
- * void DisableMouseDriver(pErrorStatus, pOffset, pSegment)
- *
- * Outputs:
- *
- * int *pErrorStatus; Error status (-1 if error occured;
- * 31 if no error occured)
- * unsigned *pOffset; Offset of old INT_33
- * unsigned *pSegment; Segment of old INT_33
- *
- * void EnableMouseDriver()
- *
- * void SoftwareReset(pStatus, pStatus2)
- *
- * Outputs:
- *
- * int *pStatus; -1 if mouse is installed, otherwise 33h.
- * int *pStatus2; 2 (provided *pStatus == -1)
- *
- * void SetLanguageForMessages(languageNumber)
- *
- * Inputs:
- *
- * int languageNumber; Language number
- *
- * void GetLanguageNumber(*pLanguageNumber)
- *
- * Outputs:
- *
- * int *pLanguageNumber; The currently set language
- *
- * GetDriverVersionMouseTypeAndIRQNumber(pMajorVersion,
- * pMinorVersion,
- * pMouseType,
- * pIRQNumber
- * )
- *
- * Outputs:
- *
- * int *pMajorVersion; Mouse driver major version number
- * int *pMinorVersion; Mouse driver minor version number
- * int *pMouseType; Mouse type
- * int *pIRQNumber; Mouse IRQ #
- *
- * GetDriverInformation(pGeneralInfo, pNumActiveMDDs)
- *
- * Available in mouse drivers version 6.30 or later
- *
- * Outputs:
- *
- * int *pGeneralInfo; General information (6.30 or better)
- * Bit 7 - Driver Type (0=sys, 1=com)
- * Bit 6 - 0 = Non segment mouse driver
- * (old style), 1 = Segmented mouse driver
- * Bits 4 to 5 - Reserved
- * Bits 0 to 3 - Function 28 mouse interrupt rate
- * int *pNumActiveMDDs; Number of active MDDs (6.30 or better)
- * (Segmented driver only)
- *
- * void SpecifyVideoModeNumber(pVideoModeNumber, fontSize)
- *
- * Available in mouse drivers version 6.30 or later
- *
- * Inputs:
- *
- * int *pVideoModeNumber; Requested video mode number or
- * 0 to turn off feature
- * int fontSize; High byte contains the Y pixel
- * font size value. Use 0 for default.
- * Low byte contains the X pixel
- * font size value. Use 0 for default.
- *
- * Outputs:
- *
- * int *pErrorStatus; 0 if successful
- * Requested video mode number
- * if video mode not supported
- * -1 if error
- *
- * void EnumerateVideoModeNumbers(pSegment, pVideoModeNumber, pOffset)
- *
- * Available in mouse drivers version 6.30 or later
- *
- * Inputs:
- *
- * int *pVideoModeNumber; 0 for find first, !0 for find next
- *
- * Outputs:
- *
- * unsigned *pSegment; Segment of optional named string
- * int *pVideoModeNumber; Video mode number (0 if end of list)
- * -1 if error
- * unsigned *pOffset; Offset of optional named string
- *
- * void EnableDisableCursorScreenUpdates(fDisable)
- *
- * Available in mouse drivers version 6.30 or later
- *
- * Inputs:
- *
- * int *fDisable; 0 to enable cursor screen updates
- * !0 to disable cursor screen updates
- *
- * Outputs:
- *
- * int *fDisable; 0 if successful
- * -1 if error
- *
- */
-
- void MouseResetAndStatus(int *, int *);
- void ShowCursor(void);
- void HideCursor(void);
- void SetMouseCursorPosition(int, int);
- void GetButtonStatusAndMousePosition(int *, int *, int *);
- void GetButtonPressInformation(int *, int *, int *, int *);
- void GetButtonReleaseInformation(int *, int *, int *, int *);
- void SetMinimumAndMaximumHorizontalCursorPosition(int, int);
- void SetMinimumAndMaximumVerticalCursorPosition(int, int);
- void SetGraphicsCursorBlock(int, int, int *);
- void SetTextCursor(int, int, int);
- void ReadMouseMotionCounters(int *, int *);
- void SetInterruptSubroutineCallMaskAndAddress(int, void (*)());
- void LightPenEmulationModeOn(void);
- void LightPenEmulationModeOff(void);
- void SetMickeyPixelRatio(int, int);
- void ConditionalOff(int *);
- void SetDoubleSpeedThreshold(int);
- void SwapInterruptSubroutines(unsigned *, int *, unsigned *);
- void GetMouseDriverStateStorageRequirements(int *);
- void SaveMouseDriverState(int *);
- void RestoreMouseDriverState(int *);
- void SetAlternateMouseUserSubroutine(int *, unsigned, void (*)());
- void GetUserAlternateInterruptVector(unsigned *, unsigned *, unsigned *);
- void SetMouseSensitivity(int, int, int);
- void GetMouseSensitivity(int *, int *, int *);
- void SetMouseInterruptRate(int);
- void SetCRTPageNumber(int);
- void GetCRTPageNumber(int *);
- void DisableMouseDriver(int *, unsigned *, unsigned *);
- void EnableMouseDriver(void);
- void SoftwareReset(int *, int *);
- void SetLanguageForMessages(int);
- void GetLanguageNumber(int *);
- void GetDriverVersionMouseTypeAndIRQNumber(int *, int *, int *, int *);
-