1
/* $Id: MouseImpl.cpp 35368 2010-12-30 13:38:23Z vboxsync $ */
3
* VirtualBox COM class implementation
7
* Copyright (C) 2006-2008 Oracle Corporation
9
* This file is part of VirtualBox Open Source Edition (OSE), as
10
* available from http://www.virtualbox.org. This file is free software;
11
* you can redistribute it and/or modify it under the terms of the GNU
12
* General Public License (GPL) as published by the Free Software
13
* Foundation, in version 2 as it comes in the "COPYING" file of the
14
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18
#include <iprt/cpp/utils.h>
20
#include "MouseImpl.h"
21
#include "DisplayImpl.h"
24
#include "AutoCaller.h"
27
#include <VBox/vmm/pdmdrv.h>
28
#include <VBox/VMMDev.h>
32
/** @name Mouse device capabilities bitfield
36
/** The mouse device can do relative reporting */
37
MOUSE_DEVCAP_RELATIVE = 1,
38
/** The mouse device can do absolute reporting */
39
MOUSE_DEVCAP_ABSOLUTE = 2
44
* Mouse driver instance data.
48
/** Pointer to the mouse object. */
50
/** Pointer to the driver instance structure. */
52
/** Pointer to the mouse port interface of the driver/device above us. */
53
PPDMIMOUSEPORT pUpPort;
54
/** Our mouse connector interface. */
55
PDMIMOUSECONNECTOR IConnector;
56
/** The capabilities of this device. */
61
// constructor / destructor
62
/////////////////////////////////////////////////////////////////////////////
74
HRESULT Mouse::FinalConstruct()
80
mfVMMDevGuestCaps = 0;
84
void Mouse::FinalRelease()
89
// public methods only for internal purposes
90
/////////////////////////////////////////////////////////////////////////////
93
* Initializes the mouse object.
95
* @returns COM result indicator
96
* @param parent handle of our parent object
98
HRESULT Mouse::init (Console *parent)
100
LogFlowThisFunc(("\n"));
102
ComAssertRet(parent, E_INVALIDARG);
104
/* Enclose the state transition NotReady->InInit->Ready */
105
AutoInitSpan autoInitSpan(this);
106
AssertReturn(autoInitSpan.isOk(), E_FAIL);
108
unconst(mParent) = parent;
110
#ifndef VBOXBFE_WITHOUT_COM
111
unconst(mEventSource).createObject();
112
HRESULT rc = mEventSource->init(static_cast<IMouse*>(this));
113
AssertComRCReturnRC(rc);
114
mMouseEvent.init(mEventSource, VBoxEventType_OnGuestMouse,
118
/* Confirm a successful initialization */
119
autoInitSpan.setSucceeded();
125
* Uninitializes the instance and sets the ready flag to FALSE.
126
* Called either from FinalRelease() or by the parent when it gets destroyed.
130
LogFlowThisFunc(("\n"));
132
/* Enclose the state transition Ready->InUninit->NotReady */
133
AutoUninitSpan autoUninitSpan(this);
134
if (autoUninitSpan.uninitDone())
137
for (unsigned i = 0; i < MOUSE_MAX_DEVICES; ++i)
140
mpDrv[i]->pMouse = NULL;
144
#ifdef VBOXBFE_WITHOUT_COM
147
mMouseEvent.uninit();
148
unconst(mEventSource).setNull();
149
unconst(mParent) = NULL;
155
/////////////////////////////////////////////////////////////////////////////
157
/** Report the front-end's mouse handling capabilities to the VMM device and
159
* @note all calls out of this object are made with no locks held! */
160
HRESULT Mouse::updateVMMDevMouseCaps(uint32_t fCapsAdded,
161
uint32_t fCapsRemoved)
163
VMMDev *pVMMDev = mParent->getVMMDev();
165
return E_FAIL; /* No assertion, as the front-ends can send events
166
* at all sorts of inconvenient times. */
167
PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort();
168
ComAssertRet(pVMMDevPort, E_FAIL);
170
int rc = pVMMDevPort->pfnUpdateMouseCapabilities(pVMMDevPort, fCapsAdded,
172
return RT_SUCCESS(rc) ? S_OK : E_FAIL;
176
* Returns whether the current setup can accept absolute mouse events, either
177
* because an emulated absolute pointing device is active or because the Guest
180
* @returns COM status code
181
* @param absoluteSupported address of result variable
183
STDMETHODIMP Mouse::COMGETTER(AbsoluteSupported) (BOOL *absoluteSupported)
185
if (!absoluteSupported)
188
AutoCaller autoCaller(this);
189
if (FAILED(autoCaller.rc())) return autoCaller.rc();
191
*absoluteSupported = supportsAbs();
196
* Returns whether the current setup can accept relative mouse events, that is,
197
* whether an emulated relative pointing device is active.
199
* @returns COM status code
200
* @param relativeSupported address of result variable
202
STDMETHODIMP Mouse::COMGETTER(RelativeSupported) (BOOL *relativeSupported)
204
if (!relativeSupported)
207
AutoCaller autoCaller(this);
208
if (FAILED(autoCaller.rc())) return autoCaller.rc();
210
*relativeSupported = supportsRel();
215
* Returns whether the guest can currently switch to drawing the mouse cursor
216
* itself if it is asked to by the front-end.
218
* @returns COM status code
219
* @param pfNeedsHostCursor address of result variable
221
STDMETHODIMP Mouse::COMGETTER(NeedsHostCursor) (BOOL *pfNeedsHostCursor)
223
if (!pfNeedsHostCursor)
226
AutoCaller autoCaller(this);
227
if (FAILED(autoCaller.rc())) return autoCaller.rc();
229
*pfNeedsHostCursor = guestNeedsHostCursor();
234
/////////////////////////////////////////////////////////////////////////////
236
/** Converts a bitfield containing information about mouse buttons currently
237
* held down from the format used by the front-end to the format used by PDM
238
* and the emulated pointing devices. */
239
static uint32_t mouseButtonsToPDM(LONG buttonState)
241
uint32_t fButtons = 0;
242
if (buttonState & MouseButtonState_LeftButton)
243
fButtons |= PDMIMOUSEPORT_BUTTON_LEFT;
244
if (buttonState & MouseButtonState_RightButton)
245
fButtons |= PDMIMOUSEPORT_BUTTON_RIGHT;
246
if (buttonState & MouseButtonState_MiddleButton)
247
fButtons |= PDMIMOUSEPORT_BUTTON_MIDDLE;
248
if (buttonState & MouseButtonState_XButton1)
249
fButtons |= PDMIMOUSEPORT_BUTTON_X1;
250
if (buttonState & MouseButtonState_XButton2)
251
fButtons |= PDMIMOUSEPORT_BUTTON_X2;
255
#ifndef VBOXBFE_WITHOUT_COM
256
STDMETHODIMP Mouse::COMGETTER(EventSource)(IEventSource ** aEventSource)
258
CheckComArgOutPointerValid(aEventSource);
260
AutoCaller autoCaller(this);
261
if (FAILED(autoCaller.rc())) return autoCaller.rc();
263
// no need to lock - lifetime constant
264
mEventSource.queryInterfaceTo(aEventSource);
271
* Send a relative pointer event to the relative device we deem most
274
* @returns COM status code
276
HRESULT Mouse::reportRelEventToMouseDev(int32_t dx, int32_t dy, int32_t dz,
277
int32_t dw, uint32_t fButtons)
279
if (dx || dy || dz || dw || fButtons != mfLastButtons)
281
PPDMIMOUSEPORT pUpPort = NULL;
283
AutoReadLock aLock(this COMMA_LOCKVAL_SRC_POS);
285
for (unsigned i = 0; !pUpPort && i < MOUSE_MAX_DEVICES; ++i)
287
if (mpDrv[i] && (mpDrv[i]->u32DevCaps & MOUSE_DEVCAP_RELATIVE))
288
pUpPort = mpDrv[i]->pUpPort;
294
int vrc = pUpPort->pfnPutEvent(pUpPort, dx, dy, dz, dw, fButtons);
297
return setError(VBOX_E_IPRT_ERROR,
298
tr("Could not send the mouse event to the virtual mouse (%Rrc)"),
300
mfLastButtons = fButtons;
307
* Send an absolute pointer event to the emulated absolute device we deem most
310
* @returns COM status code
312
HRESULT Mouse::reportAbsEventToMouseDev(uint32_t mouseXAbs, uint32_t mouseYAbs,
313
int32_t dz, int32_t dw, uint32_t fButtons)
315
if ( mouseXAbs != mcLastAbsX || mouseYAbs != mcLastAbsY
316
|| dz || dw || fButtons != mfLastButtons)
318
PPDMIMOUSEPORT pUpPort = NULL;
320
AutoReadLock aLock(this COMMA_LOCKVAL_SRC_POS);
322
for (unsigned i = 0; !pUpPort && i < MOUSE_MAX_DEVICES; ++i)
324
if (mpDrv[i] && (mpDrv[i]->u32DevCaps & MOUSE_DEVCAP_ABSOLUTE))
325
pUpPort = mpDrv[i]->pUpPort;
331
int vrc = pUpPort->pfnPutEventAbs(pUpPort, mouseXAbs, mouseYAbs, dz,
334
return setError(VBOX_E_IPRT_ERROR,
335
tr("Could not send the mouse event to the virtual mouse (%Rrc)"),
337
mfLastButtons = fButtons;
345
* Send an absolute position event to the VMM device.
346
* @note all calls out of this object are made with no locks held!
348
* @returns COM status code
350
HRESULT Mouse::reportAbsEventToVMMDev(uint32_t mouseXAbs, uint32_t mouseYAbs)
352
VMMDev *pVMMDev = mParent->getVMMDev();
353
ComAssertRet(pVMMDev, E_FAIL);
354
PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort();
355
ComAssertRet(pVMMDevPort, E_FAIL);
357
if (mouseXAbs != mcLastAbsX || mouseYAbs != mcLastAbsY)
359
int vrc = pVMMDevPort->pfnSetAbsoluteMouse(pVMMDevPort,
360
mouseXAbs, mouseYAbs);
362
return setError(VBOX_E_IPRT_ERROR,
363
tr("Could not send the mouse event to the virtual mouse (%Rrc)"),
371
* Send an absolute pointer event to a pointing device (the VMM device if
372
* possible or whatever emulated absolute device seems best to us if not).
374
* @returns COM status code
376
HRESULT Mouse::reportAbsEvent(uint32_t mouseXAbs, uint32_t mouseYAbs,
377
int32_t dz, int32_t dw, uint32_t fButtons,
378
bool fUsesVMMDevEvent)
381
/** If we are using the VMMDev to report absolute position but without
382
* VMMDev IRQ support then we need to send a small "jiggle" to the emulated
383
* relative mouse device to alert the guest to changes. */
389
* Send the absolute mouse position to the VMM device.
391
if (mouseXAbs != mcLastAbsX || mouseYAbs != mcLastAbsY)
393
rc = reportAbsEventToVMMDev(mouseXAbs, mouseYAbs);
394
cJiggle = !fUsesVMMDevEvent;
396
rc = reportRelEventToMouseDev(cJiggle, 0, dz, dw, fButtons);
399
rc = reportAbsEventToMouseDev(mouseXAbs, mouseYAbs, dz, dw, fButtons);
401
mcLastAbsX = mouseXAbs;
402
mcLastAbsY = mouseYAbs;
407
* Send a relative mouse event to the guest.
408
* @note the VMMDev capability change is so that the guest knows we are sending
409
* real events over the PS/2 device and not dummy events to signal the
410
* arrival of new absolute pointer data
412
* @returns COM status code
413
* @param dx X movement
414
* @param dy Y movement
415
* @param dz Z movement
416
* @param buttonState The mouse button state
418
STDMETHODIMP Mouse::PutMouseEvent(LONG dx, LONG dy, LONG dz, LONG dw, LONG buttonState)
423
AutoCaller autoCaller(this);
424
if (FAILED(autoCaller.rc())) return autoCaller.rc();
425
LogRel3(("%s: dx=%d, dy=%d, dz=%d, dw=%d\n", __PRETTY_FUNCTION__,
428
fButtons = mouseButtonsToPDM(buttonState);
429
/* Make sure that the guest knows that we are sending real movement
430
* events to the PS/2 device and not just dummy wake-up ones. */
431
updateVMMDevMouseCaps(0, VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE);
432
rc = reportRelEventToMouseDev(dx, dy, dz, dw, fButtons);
434
#ifndef VBOXBFE_WITHOUT_COM
435
mMouseEvent.reinit(VBoxEventType_OnGuestMouse, false, dx, dy, dz, dw, fButtons);
443
* Convert an (X, Y) value pair in screen co-ordinates (starting from 1) to a
444
* value from 0 to 0xffff. Sets the optional validity value to false if the
445
* pair is not on an active screen and to true otherwise.
447
* @returns COM status value
449
HRESULT Mouse::convertDisplayRes(LONG x, LONG y, int32_t *pcX, int32_t *pcY,
452
AssertPtrReturn(pcX, E_POINTER);
453
AssertPtrReturn(pcY, E_POINTER);
454
AssertPtrNullReturn(pfValid, E_POINTER);
455
Display *pDisplay = mParent->getDisplay();
456
ComAssertRet(pDisplay, E_FAIL);
460
if (!(mfVMMDevGuestCaps & VMMDEV_MOUSE_NEW_PROTOCOL))
462
ULONG displayWidth, displayHeight;
463
/* Takes the display lock */
464
HRESULT rc = pDisplay->GetScreenResolution(0, &displayWidth, &displayHeight,
469
*pcX = displayWidth ? ((x - 1) * 0xFFFF) / displayWidth: 0;
470
*pcY = displayHeight ? ((y - 1) * 0xFFFF) / displayHeight: 0;
474
int32_t x1, y1, x2, y2;
475
/* Takes the display lock */
476
pDisplay->getFramebufferDimensions(&x1, &y1, &x2, &y2);
477
*pcX = x1 != x2 ? (x - 1 - x1) * 0xFFFF / (x2 - x1) : 0;
478
*pcY = y1 != y2 ? (y - 1 - y1) * 0xFFFF / (y2 - y1) : 0;
479
if (*pcX < 0 || *pcX > 0xFFFF || *pcY < 0 || *pcY > 0xFFFF)
488
* Send an absolute mouse event to the VM. This requires either VirtualBox-
489
* specific drivers installed in the guest or absolute pointing device
491
* @note the VMMDev capability change is so that the guest knows we are sending
492
* dummy events over the PS/2 device to signal the arrival of new
493
* absolute pointer data, and not pointer real movement data
494
* @note all calls out of this object are made with no locks held!
496
* @returns COM status code
497
* @param x X position (pixel), starting from 1
498
* @param y Y position (pixel), starting from 1
499
* @param dz Z movement
500
* @param buttonState The mouse button state
502
STDMETHODIMP Mouse::PutMouseEventAbsolute(LONG x, LONG y, LONG dz, LONG dw,
505
AutoCaller autoCaller(this);
506
if (FAILED(autoCaller.rc())) return autoCaller.rc();
508
LogRel3(("%s: x=%d, y=%d, dz=%d, dw=%d, buttonState=0x%x\n",
509
__PRETTY_FUNCTION__, x, y, dz, dw, buttonState));
511
int32_t mouseXAbs, mouseYAbs;
515
/** @todo the front end should do this conversion to avoid races */
516
/** @note Or maybe not... races are pretty inherent in everything done in
517
* this object and not really bad as far as I can see. */
518
HRESULT rc = convertDisplayRes(x, y, &mouseXAbs, &mouseYAbs, &fValid);
519
if (FAILED(rc)) return rc;
521
/** @todo multi-monitor Windows guests expect this to be unbounded.
522
* Understand the issues involved and fix for the rest. */
523
/* if (mouseXAbs > 0xffff)
524
mouseXAbs = mcLastAbsX;
525
if (mouseYAbs > 0xffff)
526
mouseYAbs = mcLastAbsY; */
528
fButtons = mouseButtonsToPDM(buttonState);
529
/* If we are doing old-style (IRQ-less) absolute reporting to the VMM
530
* device then make sure the guest is aware of it, so that it knows to
531
* ignore relative movement on the PS/2 device. */
532
updateVMMDevMouseCaps(VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE, 0);
535
rc = reportAbsEvent(mouseXAbs, mouseYAbs, dz, dw, fButtons,
536
RT_BOOL( mfVMMDevGuestCaps
537
& VMMDEV_MOUSE_NEW_PROTOCOL));
539
#ifndef VBOXBFE_WITHOUT_COM
540
mMouseEvent.reinit(VBoxEventType_OnGuestMouse, true, x, y, dz, dw,
550
/////////////////////////////////////////////////////////////////////////////
553
/** Does the guest currently rely on the host to draw the mouse cursor or
554
* can it switch to doing it itself in software? */
555
bool Mouse::guestNeedsHostCursor(void)
557
return RT_BOOL(mfVMMDevGuestCaps & VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR);
561
/** Check what sort of reporting can be done using the devices currently
562
* enabled. Does not consider the VMM device. */
563
void Mouse::getDeviceCaps(bool *pfAbs, bool *pfRel)
565
bool fAbsDev = false;
566
bool fRelDev = false;
568
AutoReadLock aLock(this COMMA_LOCKVAL_SRC_POS);
570
for (unsigned i = 0; i < MOUSE_MAX_DEVICES; ++i)
573
if (mpDrv[i]->u32DevCaps & MOUSE_DEVCAP_ABSOLUTE)
575
if (mpDrv[i]->u32DevCaps & MOUSE_DEVCAP_RELATIVE)
585
/** Does the VMM device currently support absolute reporting? */
586
bool Mouse::vmmdevCanAbs(void)
590
getDeviceCaps(NULL, &fRelDev);
591
return (mfVMMDevGuestCaps & VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE)
596
/** Does the VMM device currently support absolute reporting? */
597
bool Mouse::deviceCanAbs(void)
601
getDeviceCaps(&fAbsDev, NULL);
606
/** Can we currently send relative events to the guest? */
607
bool Mouse::supportsRel(void)
611
getDeviceCaps(NULL, &fRelDev);
616
/** Can we currently send absolute events to the guest? */
617
bool Mouse::supportsAbs(void)
621
getDeviceCaps(&fAbsDev, NULL);
622
return fAbsDev || vmmdevCanAbs();
626
/** Check what sort of reporting can be done using the devices currently
627
* enabled (including the VMM device) and notify the guest and the front-end.
629
void Mouse::sendMouseCapsNotifications(void)
631
bool fAbsDev, fRelDev, fCanAbs, fNeedsHostCursor;
634
AutoReadLock aLock(this COMMA_LOCKVAL_SRC_POS);
636
getDeviceCaps(&fAbsDev, &fRelDev);
637
fCanAbs = supportsAbs();
638
fNeedsHostCursor = guestNeedsHostCursor();
641
updateVMMDevMouseCaps(VMMDEV_MOUSE_HOST_HAS_ABS_DEV, 0);
643
updateVMMDevMouseCaps(0, VMMDEV_MOUSE_HOST_HAS_ABS_DEV);
644
/** @todo this call takes the Console lock in order to update the cached
645
* callback data atomically. However I can't see any sign that the cached
646
* data is ever used again. */
647
mParent->onMouseCapabilityChange(fCanAbs, fRelDev, fNeedsHostCursor);
652
* @interface_method_impl{PDMIMOUSECONNECTOR,pfnReportModes}
653
* A virtual device is notifying us about its current state and capabilities
655
DECLCALLBACK(void) Mouse::mouseReportModes(PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs)
657
PDRVMAINMOUSE pDrv = RT_FROM_MEMBER(pInterface, DRVMAINMOUSE, IConnector);
659
pDrv->u32DevCaps |= MOUSE_DEVCAP_RELATIVE;
661
pDrv->u32DevCaps &= ~MOUSE_DEVCAP_RELATIVE;
663
pDrv->u32DevCaps |= MOUSE_DEVCAP_ABSOLUTE;
665
pDrv->u32DevCaps &= ~MOUSE_DEVCAP_ABSOLUTE;
667
pDrv->pMouse->sendMouseCapsNotifications();
672
* @interface_method_impl{PDMIBASE,pfnQueryInterface}
674
DECLCALLBACK(void *) Mouse::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID)
676
PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
677
PDRVMAINMOUSE pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE);
679
PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
680
PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSECONNECTOR, &pDrv->IConnector);
686
* Destruct a mouse driver instance.
688
* @returns VBox status.
689
* @param pDrvIns The driver instance data.
691
DECLCALLBACK(void) Mouse::drvDestruct(PPDMDRVINS pDrvIns)
693
PDRVMAINMOUSE pData = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE);
694
LogFlow(("Mouse::drvDestruct: iInstance=%d\n", pDrvIns->iInstance));
695
PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
699
AutoWriteLock mouseLock(pData->pMouse COMMA_LOCKVAL_SRC_POS);
700
for (unsigned cDev = 0; cDev < MOUSE_MAX_DEVICES; ++cDev)
701
if (pData->pMouse->mpDrv[cDev] == pData)
703
pData->pMouse->mpDrv[cDev] = NULL;
711
* Construct a mouse driver instance.
713
* @copydoc FNPDMDRVCONSTRUCT
715
DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
717
PDRVMAINMOUSE pData = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE);
718
LogFlow(("drvMainMouse_Construct: iInstance=%d\n", pDrvIns->iInstance));
719
PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
722
* Validate configuration.
724
if (!CFGMR3AreValuesValid(pCfg, "Object\0"))
725
return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
726
AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
727
("Configuration error: Not possible to attach anything to this driver!\n"),
728
VERR_PDM_DRVINS_NO_ATTACH);
733
pDrvIns->IBase.pfnQueryInterface = Mouse::drvQueryInterface;
735
pData->IConnector.pfnReportModes = Mouse::mouseReportModes;
738
* Get the IMousePort interface of the above driver/device.
740
pData->pUpPort = (PPDMIMOUSEPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMIMOUSEPORT_IID);
743
AssertMsgFailed(("Configuration error: No mouse port interface above!\n"));
744
return VERR_PDM_MISSING_INTERFACE_ABOVE;
748
* Get the Mouse object pointer and update the mpDrv member.
751
int rc = CFGMR3QueryPtr(pCfg, "Object", &pv);
754
AssertMsgFailed(("Configuration error: No/bad \"Object\" value! rc=%Rrc\n", rc));
757
pData->pMouse = (Mouse *)pv; /** @todo Check this cast! */
760
AutoReadLock mouseLock(pData->pMouse COMMA_LOCKVAL_SRC_POS);
762
for (cDev = 0; cDev < MOUSE_MAX_DEVICES; ++cDev)
763
if (!pData->pMouse->mpDrv[cDev])
765
pData->pMouse->mpDrv[cDev] = pData;
769
if (cDev == MOUSE_MAX_DEVICES)
770
return VERR_NO_MORE_HANDLES;
777
* Main mouse driver registration record.
779
const PDMDRVREG Mouse::DrvReg =
790
"Main mouse driver (Main as in the API).",
792
PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
794
PDM_DRVREG_CLASS_MOUSE,
798
sizeof(DRVMAINMOUSE),
826
/* vi: set tabstop=4 shiftwidth=4 expandtab: */