VirtualBox

Changeset 32828 in vbox


Ignore:
Timestamp:
Sep 29, 2010 7:21:53 PM (14 years ago)
Author:
vboxsync
Message:

Main/Mouse: actually comment things

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MouseImpl.cpp

    r32817 r32828  
    149149/////////////////////////////////////////////////////////////////////////////
    150150
     151/** Query the VMM device for the Guest Additions's (and the host front-end's)
     152 * mouse handling capabilities.
     153 * @note all calls out of this object are made with no locks held! */
    151154HRESULT Mouse::getVMMDevMouseCaps(uint32_t *pfCaps)
    152155{
     
    163166}
    164167
     168/** Report the front-end's mouse handling capabilities to the VMM device and
     169 * thus to the guest.
     170 * @note all calls out of this object are made with no locks held! */
    165171HRESULT Mouse::setVMMDevMouseCaps(uint32_t fCaps)
    166172{
     
    175181
    176182/**
    177  * Returns whether the current setup can accept absolute mouse
    178  * events.
     183 * Returns whether the current setup can accept absolute mouse events, either
     184 * because an emulated absolute pointing device is active or because the Guest
     185 * Additions are.
    179186 *
    180187 * @returns COM status code
     
    204211
    205212/**
    206  * Returns whether the current setup can accept relative mouse
    207  * events.
     213 * Returns whether the current setup can accept relative mouse events, that is,
     214 * whether an emulated relative pointing device is active.
    208215 *
    209216 * @returns COM status code
     
    230237
    231238/**
    232  * Returns whether the guest can currently draw the mouse cursor itself.
     239 * Returns whether the guest can currently switch to drawing the mouse cursor
     240 * itself if it is asked to by the front-end.
    233241 *
    234242 * @returns COM status code
     
    250258/////////////////////////////////////////////////////////////////////////////
    251259
     260/** Converts a bitfield containing information about mouse buttons currently
     261 * held down from the format used by the front-end to the format used by PDM
     262 * and the emulated pointing devices. */
    252263static uint32_t mouseButtonsToPDM(LONG buttonState)
    253264{
     
    268279
    269280/**
    270  * Send a relative event to the mouse device.
     281 * Send a relative pointer event to the relative device we deem most
     282 * appropriate.
    271283 *
    272284 * @returns   COM status code
     
    303315
    304316/**
    305  * Send an absolute position event to the mouse device.
     317 * Send an absolute pointer event to the emulated absolute device we deem most
     318 * appropriate.
    306319 *
    307320 * @returns   COM status code
     
    340353/**
    341354 * Send an absolute position event to the VMM device.
     355 * @note all calls out of this object are made with no locks held!
    342356 *
    343357 * @returns   COM status code
     
    362376}
    363377
     378
     379/**
     380 * Send an absolute pointer event to a pointing device (the VMM device if
     381 * possible or whatever emulated absolute device seems best to us if not).
     382 *
     383 * @returns   COM status code
     384 */
    364385HRESULT Mouse::reportAbsEvent(uint32_t mouseXAbs, uint32_t mouseYAbs,
    365386                              int32_t dz, int32_t dw, uint32_t fButtons,
     
    393414
    394415/**
    395  * Send a mouse event.
     416 * Send a relative mouse event to the guest.
     417 * @note the VMMDev capability change is so that the guest knows we are sending
     418 *       real events over the PS/2 device and not dummy events to signal the
     419 *       arrival of new absolute pointer data
    396420 *
    397421 * @returns COM status code
     
    426450        fButtons = mouseButtonsToPDM(buttonState);
    427451    }
     452    /** @note we drop the lock before calling out of the object! */
    428453    if (fUpdateCaps)
    429454        setVMMDevMouseCaps(uHostCaps);
     
    463488 * specific drivers installed in the guest or absolute pointing device
    464489 * emulation.
     490 * @note the VMMDev capability change is so that the guest knows we are sending
     491 *       dummy events over the PS/2 device to signal the arrival of new
     492 *       absolute pointer data, and not pointer real movement data
     493 * @note all calls out of this object are made with no locks held!
    465494 *
    466495 * @returns COM status code
     
    514543        }
    515544    }
     545    /** @note we drop the lock again before calling out! */
    516546    if (fUpdateCaps)
    517547        setVMMDevMouseCaps(uHostCaps);
     
    528558
    529559
     560/** Work out what mouse capabilities the guest and the front-end have to offer,
     561 * based on the state of the available emulated devices and the capabilities
     562 * the guest has signalled to the VMM device, and notify the guest and the
     563 * Console respectively about what the other can do. */
    530564void Mouse::sendMouseCapsNotifications(void)
    531565{
     
    550584            uHostCaps &= ~VMMDEV_MOUSE_HOST_HAS_ABS_DEV;
    551585    }
     586    /** @note we drop the lock again before calling out! */
    552587    if (SUCCEEDED(getVMMDevMouseCaps(&u32MouseCaps)))
    553588        fVMMDevCanAbs =    (u32MouseCaps & VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE)
     
    568603/**
    569604 * @interface_method_impl{PDMIMOUSECONNECTOR,pfnReportModes}
     605 * A virtual device is notifying us about its current state and capabilities
    570606 */
    571607DECLCALLBACK(void) Mouse::mouseReportModes(PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs)
  • trunk/src/VBox/Main/include/MouseImpl.h

    r32817 r32828  
    9494    }
    9595
    96     // for VMMDevInterface
     96    /** notify the front-end that the guest now supports absolute reporting */
    9797    void onVMMDevCanAbsChange(bool)
    9898    {
     
    100100    }
    101101
     102    /** notify the front-end as to whether the guest can start drawing its own
     103     * cursor on demand */
    102104    void onVMMDevNeedsHostChange(bool needsHost)
    103105    {
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