VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxHGSMI.h@ 34388

Last change on this file since 34388 was 33997, checked in by vboxsync, 14 years ago

Additions/WINNT/Graphics: more refactoring and some cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/** @file
2 *
3 * VirtualBox Video miniport driver for NT/2k/XP
4 * HGSMI related functions.
5 */
6
7/*
8 * Copyright (C) 2006-2009 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ___VBoxHGSMI_h_
20#define ___VBoxHGSMI_h_
21typedef void* HVBOXVIDEOHGSMI;
22
23/* Complete host commands addressed to the display */
24typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMICOMPLETION(HVBOXVIDEOHGSMI hHGSMI, struct _VBVAHOSTCMD * pCmd);
25typedef FNVBOXVIDEOHGSMICOMPLETION *PFNVBOXVIDEOHGSMICOMPLETION;
26
27/* request the host commands addressed to the display */
28typedef DECLCALLBACK(int) FNVBOXVIDEOHGSMICOMMANDS(HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, uint32_t iDevice, struct _VBVAHOSTCMD ** ppCmd);
29typedef FNVBOXVIDEOHGSMICOMMANDS *PFNVBOXVIDEOHGSMICOMMANDS;
30
31/* post guest command (offset) to the host */
32typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMIPOSTCOMMAND(HVBOXVIDEOHGSMI hHGSMI, HGSMIOFFSET offCmd);
33typedef FNVBOXVIDEOHGSMIPOSTCOMMAND *PFNVBOXVIDEOHGSMIPOSTCOMMAND;
34
35/* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
36#if 0
37typedef VP_STATUS (*PFNWAITFORSINGLEOBJECT) (IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL);
38
39typedef LONG (*PFNSETEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
40typedef VOID (*PFNCLEAREVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
41typedef VP_STATUS (*PFNCREATEEVENT) (IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent);
42typedef VP_STATUS (*PFNDELETEEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
43#endif
44
45typedef long VBOXVP_STATUS;
46typedef struct _VIDEO_PORT_EVENT *VBOXPEVENT;
47typedef struct _VIDEO_PORT_SPIN_LOCK *VBOXPSPIN_LOCK;
48typedef union _LARGE_INTEGER *VBOXPLARGE_INTEGER;
49
50typedef enum VBOXVP_POOL_TYPE
51{
52 VBoxVpNonPagedPool,
53 VBoxVpPagedPool,
54 VBoxVpNonPagedPoolCacheAligned = 4,
55 VBoxVpPagedPoolCacheAligned
56} VBOXVP_POOL_TYPE;
57
58#define VBOXNOTIFICATION_EVENT 0x00000001UL
59
60#define VBOXNO_ERROR 0x00000000UL
61
62typedef VBOXVP_STATUS (*PFNWAITFORSINGLEOBJECT) (void* HwDeviceExtension, void* Object, VBOXPLARGE_INTEGER Timeout);
63
64typedef long (*PFNSETEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
65typedef void (*PFNCLEAREVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
66typedef VBOXVP_STATUS (*PFNCREATEEVENT) (void* HwDeviceExtension, unsigned long EventFlag, void* Unused, VBOXPEVENT *ppEvent);
67typedef VBOXVP_STATUS (*PFNDELETEEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
68
69typedef void* (*PFNALLOCATEPOOL) (void* HwDeviceExtension, VBOXVP_POOL_TYPE PoolType, size_t NumberOfBytes, unsigned long Tag);
70typedef void (*PFNFREEPOOL) (void* HwDeviceExtension, void* Ptr);
71
72typedef unsigned char (*PFNQUEUEDPC) (void* HwDeviceExtension, void (*CallbackRoutine)(void* HwDeviceExtension, void *Context), void *Context);
73
74/* pfn*Event and pfnWaitForSingleObject functions are available */
75#define VBOXVIDEOPORTPROCS_EVENT 0x00000002
76/* pfn*Pool functions are available */
77#define VBOXVIDEOPORTPROCS_POOL 0x00000004
78/* pfnQueueDpc function is available */
79#define VBOXVIDEOPORTPROCS_DPC 0x00000008
80
81typedef struct VBOXVIDEOPORTPROCS
82{
83 /* ored VBOXVIDEOPORTPROCS_xxx constants describing the supported functionality */
84 uint32_t fSupportedTypes;
85
86 PFNWAITFORSINGLEOBJECT pfnWaitForSingleObject;
87
88 PFNSETEVENT pfnSetEvent;
89 PFNCLEAREVENT pfnClearEvent;
90 PFNCREATEEVENT pfnCreateEvent;
91 PFNDELETEEVENT pfnDeleteEvent;
92
93 PFNALLOCATEPOOL pfnAllocatePool;
94 PFNFREEPOOL pfnFreePool;
95
96 PFNQUEUEDPC pfnQueueDpc;
97} VBOXVIDEOPORTPROCS;
98
99#endif /* #ifndef ___VBoxHGSMI_h_ */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette