MouseImpl.h revision 584695ee6fadaa8d5c1f36767b0077b500de065d
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox COM class implementation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright (C) 2006-2011 Oracle Corporation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * available from http://www.virtualbox.org. This file is free software;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * you can redistribute it and/or modify it under the terms of the GNU
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * General Public License (GPL) as published by the Free Software
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/** Maximum number of devices supported */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/** Mouse driver instance data. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct DRVMAINMOUSE DRVMAINMOUSE, *PDRVMAINMOUSE;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Mouse, IMouse)
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync // public initializer/uninitializer for internal purposes only
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync // IMouse properties
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(AbsoluteSupported)) (BOOL *absoluteSupported);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(RelativeSupported)) (BOOL *relativeSupported);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(MultiTouchSupported)) (BOOL *multiTouchSupported);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(NeedsHostCursor)) (BOOL *needsHostCursor);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync // IMouse methods
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(PutMouseEvent)(LONG dx, LONG dy, LONG dz, LONG dw,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(PutMouseEventAbsolute)(LONG x, LONG y, LONG dz, LONG dw,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(PutEventMultiTouch)(LONG aCount, ComSafeArrayIn(LONG64, aContacts), ULONG aScanTime);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(PutEventMultiTouchString)(LONG aCount, IN_BSTR aContacts, ULONG aScanTime);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(EventSource)) (IEventSource ** aEventSource);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /** notify the front-end of guest capability changes */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync static DECLCALLBACK(void) mouseReportModes (PPDMIMOUSECONNECTOR pInterface, bool fRel, bool fAbs, bool fMT);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT updateVMMDevMouseCaps(uint32_t fCapsAdded, uint32_t fCapsRemoved);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT reportRelEventToMouseDev(int32_t dx, int32_t dy, int32_t dz,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT reportAbsEventToMouseDev(int32_t x, int32_t y, int32_t dz,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT reportMTEventToMouseDev(int32_t x, int32_t z, uint32_t cContact,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT reportMultiTouchEventToDevice(uint8_t cContacts, const uint64_t *pau64Contacts, uint32_t u32ScanTime);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT reportAbsEventToVMMDev(int32_t x, int32_t y);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT reportAbsEvent(int32_t x, int32_t y, int32_t dz, int32_t dw,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT convertDisplayRes(LONG x, LONG y, int32_t *pxAdj, int32_t *pyAdj,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync HRESULT putEventMultiTouch(LONG aCount, LONG64 *paContacts, ULONG aScanTime);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void getDeviceCaps(bool *pfAbs, bool *pfRel, bool *fMT);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /** Pointer to the associated mouse driver. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync uint32_t mfVMMDevGuestCaps; /** We cache this to avoid access races */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif // !____H_MOUSEIMPL
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* vi: set tabstop=4 shiftwidth=4 expandtab: */