home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MSMOUSE2.ZIP / UTILS.ZIP / CMFUNC.H < prev    next >
Encoding:
Text File  |  1989-02-10  |  11.2 KB  |  417 lines

  1. /*
  2.  *  cmfunc.h
  3.  * 
  4.  * Module for C mouse library model independent functions
  5.  * This predeclaration file should be included in any module which uses it.
  6.  *
  7.  * Copyright (c) 1988-1989, Microsoft Corporation.  All rights reserved.
  8.  *
  9.  *  Revision History:
  10.  *    Tom Hensel    11/10/88    Wrote it
  11.  *
  12.  *  Predeclaration file for C mouse library model independent functions
  13.  *  The libraries are named cmfuncx.lib, where x is:
  14.  *
  15.  *    s for small model
  16.  *    c for compact model
  17.  *    m for medium model
  18.  *    l for large model
  19.  *
  20.  *  Note:  Some file names are too long and may cause compiler warning
  21.  *        messages.  This is a tradeoff to allow the names to
  22.  *        correspond to the mouse function descriptions in
  23.  *        the Mouse Programmer's Reference Guide.
  24.  *
  25.  * Library function definitions
  26.  *
  27.  * void MouseResetAndStatus(pStatus, pcButtons)
  28.  *
  29.  * Outputs:
  30.  *
  31.  * int *pStatus;        Mouse status
  32.  * int *pcButtons;        Number of buttons
  33.  *
  34.  * void ShowCursor()
  35.  *
  36.  * void HideCursor()
  37.  *
  38.  * void GetButtonStatusAndMousePosition(pButtonStatus,
  39.  *                    pHorizontalPosition,
  40.  *                    pVerticalPosition
  41.  *                       )
  42.  *
  43.  * Outputs:
  44.  *
  45.  * int *pButtonStatus;        Button status
  46.  * int *pHorizontalPosition;    Cursor position (horizontal)
  47.  * int *pVerticalPosition;    Cursor position (vertical)
  48.  * 
  49.  * void SetMouseCursorPosition(horizontalCoordinate, verticalCoordinate)
  50.  *
  51.  * Inputs:
  52.  *
  53.  * int horizontalCoordinate;    New cursor coordinate (horizontal)
  54.  * int verticalCoordinate;    New cursor coordinate (vertical)
  55.  *
  56.  * void GetButtonPressInformation(pStatus,
  57.  *                  pButtonPresses,
  58.  *                  pHorizontalCursor,
  59.  *                  pVerticalCursor
  60.  *                 )
  61.  *
  62.  * Inputs:
  63.  *
  64.  * int *pStatus;        Button
  65.  *
  66.  * Outputs:
  67.  *
  68.  * int *pStatus;        Button status
  69.  * int *pButtonPresses;        Number of button presses
  70.  * int *pHorizontalCursor;    Cursor (horizontal) at last press
  71.  * int *pVerticalCursor;    Cursor (vertical) at last press
  72.  *
  73.  * void GetButtonReleaseInformation(pStatus,
  74.  *                    pButtonReleases,
  75.  *                    pHorizontalCursor,
  76.  *                    pVerticalCursor,
  77.  *                   )
  78.  *
  79.  * Inputs:
  80.  *
  81.  * int *pStatus;        Button
  82.  *
  83.  * Outputs:
  84.  *
  85.  * int *pStatus;        Button status
  86.  * int *pButtonPresses;        Number of button presses
  87.  * int *pHorizontalCursor;    Cursor (horizontal) at last release
  88.  * int *pVerticalCursor;    Cursor (vertical) at last release
  89.  *
  90.  * void SetMinimumAndMaximumHorizontalCursorPosition(minimumPosition,
  91.  *                             maximumPosition
  92.  *                            )
  93.  *
  94.  * Inputs:
  95.  *
  96.  * int minimumPosition;        Minimum posiiton
  97.  * int maximumPosition;        Maximum position
  98.  *
  99.  * void SetMinimumAndMaximumVerticalCursorPosition(minimumPosition,
  100.  *                           maximumPosition
  101.  *                          )
  102.  *
  103.  * Inputs:
  104.  *
  105.  * int minimumPosition;        Minimum posiiton
  106.  * int maximumPosition;        Maximum position
  107.  *
  108.  * void SetGraphicsCursorBlock(horizontalHotSpot,
  109.  *                   verticalHotSpot,
  110.  *                   pScreenAndCursorMasks
  111.  *                  )
  112.  *
  113.  * Inputs:
  114.  *
  115.  * int horizontalHotSpot;    Cursor hot spot (horizontal)
  116.  * int verticalHotSpot;        Cursor hot spot (vertical)
  117.  * int pScreenAndCursorMasks[];    Pointer to screen and cursor masks
  118.  *
  119.  * void SetTexCursor(cursorSelect,
  120.  *             screenMask_scanLineStart,
  121.  *             cursorMask_scanLineStop
  122.  *            )
  123.  *
  124.  * Inputs:
  125.  *
  126.  * int cursorSelect;        Cursor select
  127.  * int screenMask_scanLineStart; Screen mask value/scan line start
  128.  * int cursorMask_scanLineStop;    Cursor mask value/scan line stop
  129.  *
  130.  * void ReadMouseMotionCounters(pHorizontalCount, pVerticalCount)
  131.  *
  132.  * Outputs:
  133.  *
  134.  * int *pHorizontalCount;    Count (horizontal)
  135.  * int *pVerticalCount;        Count (vertical)
  136.  *
  137.  * void SetInterruptSubroutineCallMaskAndAddress(callMask, pSubroutine)
  138.  *
  139.  * Inputs:
  140.  *
  141.  * int callMask;        Call mask
  142.  * void (*pSubroutine)();    Subroutine address
  143.  *
  144.  * void LightPenEmulationModeOn()
  145.  *
  146.  * void LightPenEmulationModeOff()
  147.  *
  148.  * void SetMickeyPixelRatio(horizontalMickeyPixelRatio,
  149.  *                verticalMickeyPixelRatio
  150.  *               )
  151.  *
  152.  * Inputs:
  153.  *
  154.  * int horizontalMickeyPixelRatio; Mickey/pixel ratio (horizontal)
  155.  * int verticalMickeyPixelRatio; Mickey/pixel ratio (vertical)
  156.  *
  157.  * void ConditionalOff(pRegionArray)
  158.  *
  159.  * Inputs:
  160.  *
  161.  * int pRegionArray[4];        Address of the region array
  162.  *
  163.  * void SetDoubleSpeedThreshold(thresholdSpeed)
  164.  *
  165.  * Inputs:
  166.  *
  167.  * int thresholdSpeed;        Threshold speed in mickeys/second
  168.  *
  169.  * void SwapInterruptSubroutines(pSubroutineSegment,
  170.  *                 pCallMask,
  171.  *                 pSubroutineOffset
  172.  *                )
  173.  *
  174.  * Inputs:
  175.  *
  176.  * unsigned *pSubroutineSegment; Segment of new subroutine
  177.  * int *pCallMask;        New call mask
  178.  * unsigned *pSubroutineOffset;    Offset of new subroutine
  179.  *
  180.  * Outputs:
  181.  *
  182.  * unsigned *pSubroutineSegment; Segment of old subroutine
  183.  * int *pCallMask;        Old call mask
  184.  * unsigned *pSubroutineOffset;    Offset of old subroutine
  185.  *
  186.  * void GetMouseDriverStateStorageRequirements(pBufferSize)
  187.  *
  188.  * Outputs:
  189.  *
  190.  * int *pBufferSize;        Buffer size required for mouse driver state
  191.  *
  192.  * void SaveMouseDriverState(pBuffer)
  193.  *
  194.  * Inputs:
  195.  *
  196.  * int *pBuffer;        Pointer to the buffer
  197.  *
  198.  * void RestoreMouseDriverState(pBuffer)
  199.  *
  200.  * Inputs:
  201.  *
  202.  * int *pBuffer;        Pointer to the buffer
  203.  *
  204.  * void SetAlternateSubroutineCallMaskAndAddress(pErrorStatus,
  205.  *                         eventMask,
  206.  *                         pSubroutine
  207.  *                        )
  208.  *
  209.  * Inputs:
  210.  *
  211.  * unsigned eventMask;        User interrupt call mask
  212.  * void (*pSubroutine)();    User subroutine address
  213.  *
  214.  * Outputs:
  215.  *
  216.  * int *pErrorStatus;        Error status (-1 if error occured)
  217.  *
  218.  * void GetUserAlternateInterruptAddress(pSegment, pEventMask, pOffset)
  219.  *
  220.  * Inputs:
  221.  *
  222.  * unsigned *pEventMask;    User interrupt call mask
  223.  *
  224.  * Outputs:
  225.  *
  226.  * unsigned *pSegment;        User interrupt address segment
  227.  * unsigned *pEventMask;    User interrupt call mask
  228.  * unsigned *pOffset;        User interrupt address offset
  229.  *
  230.  * Note:  Segment and offset will be zero if no interrupt call mask is
  231.  *        returned, or it is invalid
  232.  *
  233.  * void SetMouseSensitivity(horizontalMickeys,
  234.  *                verticalMickeys,
  235.  *                doubleSpeedThreshold
  236.  *               )
  237.  *
  238.  * Inputs:
  239.  *
  240.  * int horizontalMickeys;    Mickeys/pixel (horizontal)
  241.  * int verticalMickeys;        Mickeys/pixel (vertical)
  242.  * int doubleSpeedThreshold;    Threshold for double speed
  243.  *
  244.  * void GetMouseSensitivity(pHorizontalMickeys,
  245.  *                pVerticalMickeys,
  246.  *                pDoubleSpeedThreshold
  247.  *               )
  248.  * 
  249.  * Outputs:
  250.  *
  251.  * int *pHorizontalMickeys;    Mickeys/pixel (horizontal)
  252.  * int *pVerticalMickeys;    Mickeys/pixel (vertical)
  253.  * int *pDoubleSpeedThreshold;    Threshold for double speed
  254.  *
  255.  * void SetMouseInterruptrate(rate)
  256.  *
  257.  * Inputs:
  258.  *
  259.  * int rate;            Interrupt rate (in interrupts/second)
  260.  *
  261.  * void SetCRTPageNumber(mouseCursorDisplayCRTPage)
  262.  *
  263.  * Inputs:
  264.  *
  265.  * int mouseCursorDisplayCRTPage; CRT page for mouse cursor display
  266.  *
  267.  * void GetCRTPageNumber(pCurrentCursorDisplayCRTPage)
  268.  *
  269.  * Ouputs:
  270.  *
  271.  * int *pCurrentCursorDisplayCRTPage; CRT page number of current cursor display
  272.  *
  273.  * void DisableMouseDriver(pErrorStatus, pOffset, pSegment)
  274.  *
  275.  * Outputs:
  276.  *
  277.  * int *pErrorStatus;        Error status (-1 if error occured;
  278.  *                31 if no error occured)
  279.  * unsigned *pOffset;        Offset of old INT_33
  280.  * unsigned *pSegment;        Segment of old INT_33
  281.  *
  282.  * void EnableMouseDriver()
  283.  *
  284.  * void SoftwareReset(pStatus, pStatus2)
  285.  *
  286.  * Outputs:
  287.  *
  288.  * int *pStatus;        -1 if mouse is installed, otherwise 33h.
  289.  * int *pStatus2;        2 (provided *pStatus == -1)
  290.  *
  291.  * void SetLanguageForMessages(languageNumber)
  292.  *
  293.  * Inputs:
  294.  *
  295.  * int languageNumber;        Language number
  296.  *
  297.  * void GetLanguageNumber(*pLanguageNumber)
  298.  *
  299.  * Outputs:
  300.  *
  301.  * int *pLanguageNumber;    The currently set language
  302.  *
  303.  * GetDriverVersionMouseTypeAndIRQNumber(pMajorVersion,
  304.  *                     pMinorVersion,
  305.  *                     pMouseType,
  306.  *                     pIRQNumber
  307.  *                    )
  308.  *
  309.  * Outputs:
  310.  *
  311.  * int *pMajorVersion;        Mouse driver major version number
  312.  * int *pMinorVersion;        Mouse driver minor version number
  313.  * int *pMouseType;        Mouse type
  314.  * int *pIRQNumber;        Mouse IRQ #
  315.  *
  316.  * GetDriverInformation(pGeneralInfo, pNumActiveMDDs)
  317.  *
  318.  * Available in mouse drivers version 6.30 or later
  319.  *
  320.  * Outputs:
  321.  *
  322.  * int *pGeneralInfo;        General information (6.30 or better)
  323.  *                Bit 7 - Driver Type (0=sys, 1=com)
  324.  *                Bit 6 - 0 = Non segment mouse driver
  325.  *                (old style), 1 = Segmented mouse driver
  326.  *                Bits 4 to 5 - Reserved
  327.  *                Bits 0 to 3 - Function 28 mouse interrupt rate
  328.  * int *pNumActiveMDDs;        Number of active MDDs (6.30 or better)
  329.  *                (Segmented driver only)
  330.  *
  331.  * void SpecifyVideoModeNumber(pVideoModeNumber, fontSize)
  332.  *
  333.  * Available in mouse drivers version 6.30 or later
  334.  *
  335.  * Inputs:
  336.  *
  337.  * int *pVideoModeNumber;    Requested video mode number or
  338.  *                0 to turn off feature
  339.  * int fontSize;        High byte contains the Y pixel
  340.  *                font size value.  Use 0 for default.
  341.  *                Low byte contains the X pixel
  342.  *                font size value.  Use 0 for default.
  343.  *
  344.  * Outputs:
  345.  *
  346.  * int *pErrorStatus;        0 if successful
  347.  *                Requested video mode number
  348.  *                if video mode not supported
  349.  *                -1 if error
  350.  *
  351.  * void EnumerateVideoModeNumbers(pSegment, pVideoModeNumber, pOffset)
  352.  *
  353.  * Available in mouse drivers version 6.30 or later
  354.  *
  355.  * Inputs:
  356.  *
  357.  * int *pVideoModeNumber;    0 for find first, !0 for find next
  358.  *
  359.  * Outputs:
  360.  *
  361.  * unsigned *pSegment;        Segment of optional named string
  362.  * int *pVideoModeNumber;    Video mode number (0 if end of list)
  363.  *                -1 if error
  364.  * unsigned *pOffset;        Offset of optional named string
  365.  *
  366.  * void EnableDisableCursorScreenUpdates(fDisable)
  367.  *
  368.  * Available in mouse drivers version 6.30 or later
  369.  *
  370.  * Inputs:
  371.  *
  372.  * int *fDisable;        0 to enable cursor screen updates
  373.  *                !0 to disable cursor screen updates
  374.  *
  375.  * Outputs:
  376.  *
  377.  * int *fDisable;        0 if successful
  378.  *                -1 if error
  379.  *
  380.  */
  381.  
  382. void MouseResetAndStatus(int *, int *);
  383. void ShowCursor(void);
  384. void HideCursor(void);
  385. void SetMouseCursorPosition(int, int);
  386. void GetButtonStatusAndMousePosition(int *, int *, int *);
  387. void GetButtonPressInformation(int *, int *, int *, int *);
  388. void GetButtonReleaseInformation(int *, int *, int *, int *);
  389. void SetMinimumAndMaximumHorizontalCursorPosition(int, int);
  390. void SetMinimumAndMaximumVerticalCursorPosition(int, int);
  391. void SetGraphicsCursorBlock(int, int, int *);
  392. void SetTextCursor(int, int, int);
  393. void ReadMouseMotionCounters(int *, int *);
  394. void SetInterruptSubroutineCallMaskAndAddress(int, void (*)());
  395. void LightPenEmulationModeOn(void);
  396. void LightPenEmulationModeOff(void);
  397. void SetMickeyPixelRatio(int, int);
  398. void ConditionalOff(int *);
  399. void SetDoubleSpeedThreshold(int);
  400. void SwapInterruptSubroutines(unsigned *, int *, unsigned *);
  401. void GetMouseDriverStateStorageRequirements(int *);
  402. void SaveMouseDriverState(int *);
  403. void RestoreMouseDriverState(int *);
  404. void SetAlternateMouseUserSubroutine(int *, unsigned, void (*)());
  405. void GetUserAlternateInterruptVector(unsigned *, unsigned *, unsigned *);
  406. void SetMouseSensitivity(int, int, int);
  407. void GetMouseSensitivity(int *, int *, int *);
  408. void SetMouseInterruptRate(int);
  409. void SetCRTPageNumber(int);
  410. void GetCRTPageNumber(int *);
  411. void DisableMouseDriver(int *, unsigned *, unsigned *);
  412. void EnableMouseDriver(void);
  413. void SoftwareReset(int *, int *);
  414. void SetLanguageForMessages(int);
  415. void GetLanguageNumber(int *);
  416. void GetDriverVersionMouseTypeAndIRQNumber(int *, int *, int *, int *);
  417.