MouseImpl.cpp revision 5c73a4cb65d1b641fcb685d6672b790cca7ec575
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * VirtualBox COM class implementation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright (C) 2006-2008 Sun Microsystems, Inc.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * available from http://www.virtualbox.org. This file is free software;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * you can redistribute it and/or modify it under the terms of the GNU
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * General Public License (GPL) as published by the Free Software
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * additional information or have any questions.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** @name Mouse device capabilities bitfield
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** The mouse device can do relative reporting */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** The mouse device can do absolute reporting */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Mouse driver instance data.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Pointer to the mouse object. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Pointer to the driver instance structure. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Pointer to the mouse port interface of the driver/device above us. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Our mouse connector interface. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** The capabilities of this device. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync// constructor / destructor
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/////////////////////////////////////////////////////////////////////////////
uninit();
#ifdef RT_OS_L4
uHostCaps = 0;
return S_OK;
for (unsigned i = 0; i < MOUSE_MAX_DEVICES; ++i)
if (mpDrv[i])
#ifdef VBOXBFE_WITHOUT_COM
if (!absoluteSupported)
return E_POINTER;
bool fAbs = false;
if (fVMMDevCanAbs)
for (unsigned i = 0; i < MOUSE_MAX_DEVICES; ++i)
return S_OK;
if (!relativeSupported)
return E_POINTER;
bool fRel = false;
for (unsigned i = 0; i < MOUSE_MAX_DEVICES; ++i)
return S_OK;
if (!pfNeedsHostCursor)
return E_POINTER;
return S_OK;
return fButtons;
if (!pUpPort)
return S_OK;
vrc);
return S_OK;
if (!pUpPort)
return S_OK;
vrc);
return S_OK;
vrc);
return S_OK;
return rc;
return S_OK;
return S_OK;
fButtons);
return rc;
bool fAbsDev = false;
bool fRelDev = false;
for (unsigned i = 0; i < MOUSE_MAX_DEVICES; ++i)
if (mpDrv[i])
fAbsDev = true;
fRelDev = true;
if (fRel)
if (fAbs)
return NULL;
pData->pUpPort = (PPDMIMOUSEPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMIMOUSEPORT_IID);
return VERR_PDM_MISSING_INTERFACE_ABOVE;
void *pv;
return rc;
unsigned cDev;
return VERR_NO_MORE_HANDLES;
return VINF_SUCCESS;
sizeof(DRVMAINMOUSE),
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,