VirtualBox

Changeset 26935 in vbox for trunk/src


Ignore:
Timestamp:
Mar 2, 2010 10:32:28 AM (15 years ago)
Author:
vboxsync
Message:

pdmifs, Devices/Input, Main, FE/BFE: add support for absolute-only pointing devices

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp

    r26650 r26935  
    168168 * @param   fAbs        The new absolute mode state.
    169169 */
    170 static DECLCALLBACK(void) drvMousePassThruAbsMode(PPDMIMOUSECONNECTOR pInterface, bool fAbs)
     170static DECLCALLBACK(void) drvMousePassThruReportModes(PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs)
    171171{
    172172    PDRVMOUSEQUEUE pDrv = PPDMIMOUSECONNECTOR_2_DRVMOUSEQUEUE(pInterface);
    173     pDrv->pDownConnector->pfnAbsModeChange(pDrv->pDownConnector, fAbs);
     173    pDrv->pDownConnector->pfnReportModes(pDrv->pDownConnector, fRel, fAbs);
    174174}
    175175
     
    289289    pDrvIns->IBase.pfnQueryInterface        = drvMouseQueueQueryInterface;
    290290    /* IMouseConnector. */
    291     pDrv->IConnector.pfnAbsModeChange       = drvMousePassThruAbsMode;
     291    pDrv->IConnector.pfnReportModes         = drvMousePassThruReportModes;
    292292    /* IMousePort. */
    293293    pDrv->IPort.pfnPutEvent                 = drvMouseQueuePutEvent;
  • trunk/src/VBox/Devices/Input/UsbMouse.cpp

    r26811 r26935  
    11081108     * Set received event type to absolute or relative.
    11091109     */
    1110     pThis->Lun0.pDrv->pfnAbsModeChange(pThis->Lun0.pDrv, pThis->isAbsolute);
     1110    pThis->Lun0.pDrv->pfnReportModes(pThis->Lun0.pDrv, !pThis->isAbsolute,
     1111                                     pThis->isAbsolute);
    11111112
    11121113    RTCritSectLeave(&pThis->CritSect);
  • trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp

    r26834 r26935  
    583583
    584584/**
    585  * @interface_method_impl{PDMIMOUSECONNECTOR,pfnAbsModeChange}
    586  */
    587 DECLCALLBACK(void) Mouse::mouseAbsModeChange(PPDMIMOUSECONNECTOR pInterface, bool fEnabled)
     585 * @interface_method_impl{PDMIMOUSECONNECTOR,pfnReportModes}
     586 */
     587DECLCALLBACK(void) Mouse::mouseReportModes(PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs)
    588588{
    589589    PDRVMAINMOUSE pDrv = RT_FROM_MEMBER(pInterface, DRVMAINMOUSE, IConnector);
    590     if (fEnabled)
     590    if (fRel)
     591        pDrv->pMouse->uDevCaps |= MOUSE_DEVCAP_RELATIVE;
     592    else
     593        pDrv->pMouse->uDevCaps &= ~MOUSE_DEVCAP_RELATIVE;
     594    if (fAbs)
    591595        pDrv->pMouse->uDevCaps |= MOUSE_DEVCAP_ABSOLUTE;
    592596    else
     
    656660    pDrvIns->IBase.pfnQueryInterface        = Mouse::drvQueryInterface;
    657661
    658     pData->IConnector.pfnAbsModeChange      = Mouse::mouseAbsModeChange;
     662    pData->IConnector.pfnReportModes        = Mouse::mouseReportModes;
    659663
    660664    /*
  • trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.h

    r26834 r26935  
    129129
    130130    static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
    131     static DECLCALLBACK(void)   mouseAbsModeChange (PPDMIMOUSECONNECTOR pInterface, bool fAbs);
     131    static DECLCALLBACK(void)   mouseReportModes (PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs);
    132132    static DECLCALLBACK(int)    drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
    133133    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
  • trunk/src/VBox/Main/MouseImpl.cpp

    r26924 r26935  
    501501
    502502/**
    503  * @interface_method_impl{PDMIMOUSECONNECTOR,pfnAbsModeChange}
    504  */
    505 DECLCALLBACK(void) Mouse::mouseAbsModeChange(PPDMIMOUSECONNECTOR pInterface, bool fEnabled)
     503 * @interface_method_impl{PDMIMOUSECONNECTOR,pfnReportModes}
     504 */
     505DECLCALLBACK(void) Mouse::mouseReportModes(PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs)
    506506{
    507507    PDRVMAINMOUSE pDrv = RT_FROM_MEMBER(pInterface, DRVMAINMOUSE, IConnector);
    508     if (fEnabled)
     508    if (fRel)
     509        pDrv->pMouse->uDevCaps |= MOUSE_DEVCAP_RELATIVE;
     510    else
     511        pDrv->pMouse->uDevCaps &= ~MOUSE_DEVCAP_RELATIVE;
     512    if (fAbs)
    509513        pDrv->pMouse->uDevCaps |= MOUSE_DEVCAP_ABSOLUTE;
    510514    else
     
    574578    pDrvIns->IBase.pfnQueryInterface        = Mouse::drvQueryInterface;
    575579
    576     pData->IConnector.pfnAbsModeChange      = Mouse::mouseAbsModeChange;
     580    pData->IConnector.pfnReportModes        = Mouse::mouseReportModes;
    577581
    578582    /*
  • trunk/src/VBox/Main/include/MouseImpl.h

    r26782 r26935  
    118118
    119119    static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
    120     static DECLCALLBACK(void)   mouseAbsModeChange (PPDMIMOUSECONNECTOR pInterface, bool fAbs);
     120    static DECLCALLBACK(void)   mouseReportModes (PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs);
    121121    static DECLCALLBACK(int)    drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
    122122    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette