VBoxTray.h revision 485a153f0c2ddf3738d940d5158c72939f080cc8
35396ee506ef68dd1c161f1ef2c3c0b68a146ff2vboxsync * VBoxTray - Guest Additions Tray, Internal Header.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * available from http://www.virtualbox.org. This file is free software;
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * you can redistribute it and/or modify it under the terms of the GNU
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * General Public License (GPL) as published by the Free Software
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync * additional information or have any questions.
0758ccd1bec500cced35c8dfe52fcceacc2469d5vboxsync#include <VBox/VBoxGuest.h> /** @todo use the VbglR3 interface! */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsynctypedef enum
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync/* display driver interface abstraction for XPDM & WDDM
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * with WDDM we can not use ExtEscape to communicate with our driver
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * because we do not have XPDM display driver any more, i.e. escape requests are handled by cdd
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * that knows nothing about us
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * NOTE: DispIf makes no checks whether the display driver is actually a VBox driver,
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * it just switches between using different backend OS API based on the VBoxDispIfSwitchMode call
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * It's caller's responsibility to initiate it to work in the correct mode */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsynctypedef struct VBOXDISPIF
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync /* with WDDM the approach is to call into WDDM miniport driver via PFND3DKMT API provided by the GDI,
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * The PFND3DKMT is supposed to be used by the OpenGL ICD according to MSDN, so this approach is a bit hacky */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync /* open adapter */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync PFND3DKMT_OPENADAPTERFROMHDC pfnD3DKMTOpenAdapterFromHdc;
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync PFND3DKMT_OPENADAPTERFROMGDIDISPLAYNAME pfnD3DKMTOpenAdapterFromGdiDisplayName;
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync /* close adapter */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync /* escape */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync/* initializes the DispIf
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * Initially the DispIf is configured to work in XPDM mode
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync * call VBoxDispIfSwitchMode to switch the mode to WDDM */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsyncDWORD VBoxDispIfSwitchMode(PVBOXDISPIF pIf, VBOXDISPIF_MODE enmMode, VBOXDISPIF_MODE *penmOldMode);
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsyncDECLINLINE(VBOXDISPIF_MODE) VBoxDispGetMode(PVBOXDISPIF pIf) { return pIf->enmMode; }
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsyncDWORD VBoxDispIfEscape(PCVBOXDISPIF const pIf, PVBOXDISPIFESCAPE pEscape, int cbData);
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync/* The environment information for services. */
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync /* display driver interface, XPDM - WDDM abstraction see VBOXDISPIF** definitions above */
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync/* The service initialization info and runtime variables. */
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync int (* pfnInit) (const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread);
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync unsigned (__stdcall * pfnThread) (void *pInstance);
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync void (* pfnDestroy) (const VBOXSERVICEENV *pEnv, void *pInstance);
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync /* Variables. */
1ce9b5cdb394313f823577ad75c0bc237b9884b5vboxsyncextern void VBoxServiceReloadCursor(void);
0d20048b3955267f206c0e521dd43fbb0da0b954vboxsync#endif /* !___VBOXTRAY_H */