Changeset 21227 in vbox for trunk/include
- Timestamp:
- Jul 5, 2009 7:50:18 PM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/GuestPropertySvc.h
r14352 r21227 33 33 34 34 #include <VBox/types.h> 35 #include <VBox/VBoxGuest.h> 35 #include <VBox/VMMDev.h> 36 #include <VBox/VBoxGuest2.h> 36 37 #include <VBox/hgcmsvc.h> 37 38 #include <VBox/log.h> -
trunk/include/VBox/HostServices/VBoxClipboardSvc.h
r9435 r21227 33 33 34 34 #include <VBox/types.h> 35 #include <VBox/VBoxGuest.h> 35 #include <VBox/VMMDev.h> 36 #include <VBox/VBoxGuest2.h> 36 37 #include <VBox/hgcmsvc.h> 37 38 -
trunk/include/VBox/HostServices/VBoxCrOpenGLSvc.h
r18637 r21227 33 33 34 34 #include <VBox/types.h> 35 #include <VBox/VBoxGuest.h> 35 #include <VBox/VMMDev.h> 36 #include <VBox/VBoxGuest2.h> 36 37 #include <VBox/hgcmsvc.h> 37 38 … … 102 103 */ 103 104 HGCMFunctionParameter cbWriteback; 104 105 105 106 } CRVBOXHGCMWRITEREAD; 106 107 -
trunk/include/VBox/VBoxGuest.h
r21226 r21227 36 36 #include <VBox/types.h> 37 37 #include <iprt/assert.h> 38 #include <VBox/VMMDev2.h> 39 #include <VBox/VBoxGuest2.h> 40 #if 0 38 41 #include <VBox/VMMDev.h> /* Temporarily. */ 42 #endif 39 43 40 44 … … 209 213 210 214 #pragma pack(4) 211 typedef struct _VBoxGuestPortInfo215 typedef struct VBoxGuestPortInfo 212 216 { 213 217 uint32_t portAddress; 214 VMMDevMemory *pVMMDevMemory;218 struct VMMDevMemory *pVMMDevMemory; 215 219 } VBoxGuestPortInfo; 216 220 … … 286 290 # define VBOXGUEST_IOCTL_HGCM_CONNECT VBOXGUEST_IOCTL_CODE(16, sizeof(VBoxGuestHGCMConnectInfo)) 287 291 288 # pragma pack(1) /* explicit packing for good measure. */289 typedef struct VBoxGuestHGCMConnectInfo290 {291 int32_t result; /**< OUT */292 HGCMServiceLocation Loc; /**< IN */293 uint32_t u32ClientID; /**< OUT */294 } VBoxGuestHGCMConnectInfo;295 AssertCompileSize(VBoxGuestHGCMConnectInfo, 4+4+128+4);296 # pragma pack()297 298 299 292 /** IOCTL to VBoxGuest to disconnect from a HGCM service. */ 300 # define VBOXGUEST_IOCTL_HGCM_DISCONNECT VBOXGUEST_IOCTL_CODE(17, sizeof(VBoxGuestHGCMDisconnectInfo)) 301 typedef struct VBoxGuestHGCMDisconnectInfo 302 { 303 int32_t result; /**< OUT */ 304 uint32_t u32ClientID; /**< IN */ 305 } VBoxGuestHGCMDisconnectInfo; 306 AssertCompileSize(VBoxGuestHGCMDisconnectInfo, 8); 307 308 309 /** IOCTL to VBoxGuest to make a call to a HGCM service. */ 310 # define VBOXGUEST_IOCTL_HGCM_CALL(Size) VBOXGUEST_IOCTL_CODE(18, (Size)) 311 typedef struct VBoxGuestHGCMCallInfo 312 { 313 int32_t result; /**< OUT Host HGCM return code.*/ 314 uint32_t u32ClientID; /**< IN The id of the caller. */ 315 uint32_t u32Function; /**< IN Function number. */ 316 uint32_t cParms; /**< IN How many parms. */ 317 /* Parameters follow in form HGCMFunctionParameter aParms[cParms] */ 318 } VBoxGuestHGCMCallInfo; 319 AssertCompileSize(VBoxGuestHGCMCallInfo, 16); 320 293 # define VBOXGUEST_IOCTL_HGCM_DISCONNECT VBOXGUEST_IOCTL_CODE(17, sizeof(VBoxGuestHGCMDisconnectInfo)) 294 295 /** IOCTL to VBoxGuest to make a call to a HGCM service. 296 * @see VBoxGuestHGCMCallInfo */ 297 # define VBOXGUEST_IOCTL_HGCM_CALL(Size) VBOXGUEST_IOCTL_CODE(18, (Size)) 321 298 322 299 /** IOCTL to VBoxGuest to make a timed call to a HGCM service. */ 323 # define VBOXGUEST_IOCTL_HGCM_CALL_TIMED(Size) VBOXGUEST_IOCTL_CODE(20, (Size)) 324 # pragma pack(1) /* explicit packing for good measure. */ 325 typedef struct VBoxGuestHGCMCallInfoTimed 326 { 327 uint32_t u32Timeout; /**< IN How long to wait for completion before cancelling the call. */ 328 uint32_t fInterruptible; /**< IN Is this request interruptible? */ 329 VBoxGuestHGCMCallInfo info; /**< IN/OUT The rest of the call information. Placed after the timeout 330 * so that the parameters follow as they would for a normal call. */ 331 /* Parameters follow in form HGCMFunctionParameter aParms[cParms] */ 332 } VBoxGuestHGCMCallInfoTimed; 333 AssertCompileSize(VBoxGuestHGCMCallInfoTimed, 8+16); 334 # pragma pack() 300 # define VBOXGUEST_IOCTL_HGCM_CALL_TIMED(Size) VBOXGUEST_IOCTL_CODE(20, (Size)) 335 301 336 302 # ifdef RT_ARCH_AMD64 … … 431 397 432 398 433 #if def IN_RING3399 #if 0 /*def IN_RING3*/ 434 400 # include <VBox/VBoxGuestLib.h> /** @todo eliminate this. */ 435 401 #endif /* IN_RING3 */ -
trunk/include/VBox/VBoxGuestLib.h
r21211 r21227 31 31 #define ___VBox_VBoxGuestLib_h 32 32 33 #include <VBox/types.h> 34 #include <VBox/VMMDev2.h> 33 35 #ifdef IN_RING0 34 # include <VBox/V BoxGuest.h> /** @todo Try stop including <VBox/VBoxGuest.h> in ring-0.*/35 # include <VBox/ err.h> /** @todo Why is this here?? */36 # include <VBox/VMMDev.h> /* grumble */ 37 # include <VBox/VBoxGuest2.h> 36 38 #endif 37 #include <VBox/types.h>38 39 39 40 … … 99 100 * @return VBox status code. 100 101 */ 101 DECLVBGL(int) VbglInit (VBGLIOPORT portVMMDev, VMMDevMemory *pVMMDevMemory);102 DECLVBGL(int) VbglInit (VBGLIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory); 102 103 103 104 # else … … 392 393 * @{ */ 393 394 VBGLR3DECL(int) VbglR3SeamlessSetCap(bool fState); 394 # ifdef VBOX_MOUSE_POINTER_SHAPE /** @todo Move common structures/enums out of VBoxGuest.h or/and the externalize the IOCtl interface... Whatever works, just try keep the amout of lowevel mess exposed here to a minimum. */395 395 VBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode); 396 # endif397 396 VBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects); 398 397 /** @} */ … … 409 408 VBGLR3DECL(int) VbglR3VideoAccelFlush(void); 410 409 VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cbImg); 411 # ifdef VBOX_MOUSE_POINTER_SHAPE /** @todo Move common structures/enums out of VBoxGuest.h or/and the externalize the IOCtl interface... Whatever works, just try keep the amout of lowevel mess exposed here to a minimum. */ 412 VBGLR3DECL(int) VbglR3SetPointerShapeReq(VMMDevReqMousePointer *pReq); 413 # endif 410 VBGLR3DECL(int) VbglR3SetPointerShapeReq(struct VMMDevReqMousePointer *pReq); 414 411 /** @} */ 415 412 -
trunk/include/VBox/VMMDev.h
r21226 r21227 36 36 #include <VBox/err.h> 37 37 #include <VBox/ostypes.h> 38 #include <VBox/VMMDev2.h> 38 39 #include <iprt/assert.h> 39 40 … … 50 51 51 52 /** Size of VMMDev RAM region accessible by guest. 52 * Must be big enough to contain VMMDevMemory structure (see VBoxGuest.h)53 * 53 * Must be big enough to contain VMMDevMemory structure (see further down). 54 * For now: 4 megabyte. 54 55 */ 55 56 #define VMMDEV_RAM_SIZE (4 * 256 * PAGE_SIZE) … … 200 201 /** IN: Size of the structure in bytes (including body). */ 201 202 uint32_t size; 202 /** IN: Version of the structure. */203 /** IN: Version of the structure. */ 203 204 uint32_t version; 204 205 /** IN: Type of the request. */ … … 259 260 * Used by VMMDevReq_SetPointerShape. The size is variable. 260 261 */ 261 typedef struct 262 typedef struct VMMDevReqMousePointer 262 263 { 263 264 /** Header. */ … … 740 741 741 742 /** 742 * Seamless mode.743 *744 * Used by VbglR3SeamlessWaitEvent745 *746 * @todo DARN! DARN! DARN! Who forgot to do the 32-bit hack here???747 * FIXME! XXX!748 *749 * We will now have to carefully check how our compilers have treated this750 * flag. If any are compressing it into a byte type, we'll have to check751 * how the request memory is initialized. If we are 104% sure it's ok to752 * expand it, we'll expand it. If not, we must redefine the field to a753 * uint8_t and a 3 byte padding.754 * */755 typedef enum756 {757 VMMDev_Seamless_Disabled = 0, /**< normal mode; entire guest desktop displayed. */758 VMMDev_Seamless_Visible_Region = 1, /**< visible region mode; only top-level guest windows displayed. */759 VMMDev_Seamless_Host_Window = 2 /**< windowed mode; each top-level guest window is represented in a host window. */760 } VMMDevSeamlessMode;761 762 /**763 743 * Seamless mode change request structure. 764 744 * … … 954 934 #pragma pack() 955 935 956 /**957 * VBVA command header.958 */959 #pragma pack(1) /* unnecessary */960 typedef struct _VBVACMDHDR961 {962 /** Coordinates of affected rectangle. */963 int16_t x;964 int16_t y;965 uint16_t w;966 uint16_t h;967 } VBVACMDHDR;968 #pragma pack()969 970 /** @name VBVA ring defines.971 *972 * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of973 * data. For example big bitmaps which do not fit to the buffer.974 *975 * Guest starts writing to the buffer by initializing a record entry in the976 * aRecords queue. VBVA_F_RECORD_PARTIAL indicates that the record is being977 * written. As data is written to the ring buffer, the guest increases off32End978 * for the record.979 *980 * The host reads the aRecords on flushes and processes all completed records.981 * When host encounters situation when only a partial record presents and982 * cbRecord & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE -983 * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates984 * off32Head. After that on each flush the host continues fetching the data985 * until the record is completed.986 *987 */988 #define VBVA_RING_BUFFER_SIZE (_4M - _1K)989 #define VBVA_RING_BUFFER_THRESHOLD (4 * _1K)990 991 #define VBVA_MAX_RECORDS (64)992 993 #define VBVA_F_MODE_ENABLED (0x00000001)994 #define VBVA_F_MODE_VRDP (0x00000002)995 #define VBVA_F_MODE_VRDP_RESET (0x00000004)996 #define VBVA_F_MODE_VRDP_ORDER_MASK (0x00000008)997 998 #define VBVA_F_RECORD_PARTIAL (0x80000000)999 /** @} */1000 1001 typedef struct1002 {1003 /** The length of the record. Changed by guest. */1004 uint32_t cbRecord;1005 } VBVARECORD;1006 AssertCompileSize(VBVARECORD, 4);1007 1008 /**1009 * VBVA memory layout.1010 */1011 #pragma pack(1) /* paranoia */1012 typedef struct VBVAMEMORY1013 {1014 /** VBVA_F_MODE_*. */1015 uint32_t fu32ModeFlags;1016 1017 /** The offset where the data start in the buffer. */1018 uint32_t off32Data;1019 /** The offset where next data must be placed in the buffer. */1020 uint32_t off32Free;1021 1022 /** The ring buffer for data. */1023 uint8_t au8RingBuffer[VBVA_RING_BUFFER_SIZE];1024 1025 /** The queue of record descriptions. */1026 VBVARECORD aRecords[VBVA_MAX_RECORDS];1027 uint32_t indexRecordFirst;1028 uint32_t indexRecordFree;1029 1030 /** RDP orders supported by the client. The guest reports only them1031 * and falls back to DIRTY rects for not supported ones.1032 *1033 * (1 << VBVA_VRDP_*)1034 */1035 uint32_t fu32SupportedOrders;1036 1037 } VBVAMEMORY;1038 #pragma pack()1039 AssertCompileSize(VBVAMEMORY, 12 + (_4M-_1K) + 4*64 + 12);1040 1041 1042 936 1043 937 #ifdef VBOX_WITH_HGCM … … 1067 961 } VMMDevHGCMRequestHeader; 1068 962 AssertCompileSize(VMMDevHGCMRequestHeader, 24+8); 1069 1070 /**1071 * HGCM service location types.1072 */1073 typedef enum1074 {1075 VMMDevHGCMLoc_Invalid = 0,1076 VMMDevHGCMLoc_LocalHost = 1,1077 VMMDevHGCMLoc_LocalHost_Existing = 2,1078 VMMDevHGCMLoc_SizeHack = 0x7fffffff1079 } HGCMServiceLocationType;1080 AssertCompileSize(HGCMServiceLocationType, 4);1081 1082 /**1083 * HGCM host service location.1084 */1085 typedef struct1086 {1087 char achName[128]; /**< This is really szName. */1088 } HGCMServiceLocationHost;1089 AssertCompileSize(HGCMServiceLocationHost, 128);1090 1091 /**1092 * HGCM service location.1093 */1094 typedef struct HGCMSERVICELOCATION1095 {1096 /** Type of the location. */1097 HGCMServiceLocationType type;1098 1099 union1100 {1101 HGCMServiceLocationHost host;1102 } u;1103 } HGCMServiceLocation;1104 AssertCompileSize(HGCMServiceLocation, 128+4);1105 963 1106 964 /** … … 1541 1399 1542 1400 /** 1401 * VBVA command header. 1402 * 1403 * @todo Where does this fit in? 1404 */ 1405 #pragma pack(1) /* unnecessary */ 1406 typedef struct VBVACMDHDR 1407 { 1408 /** Coordinates of affected rectangle. */ 1409 int16_t x; 1410 int16_t y; 1411 uint16_t w; 1412 uint16_t h; 1413 } VBVACMDHDR; 1414 #pragma pack() 1415 1416 /** @name VBVA ring defines. 1417 * 1418 * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of 1419 * data. For example big bitmaps which do not fit to the buffer. 1420 * 1421 * Guest starts writing to the buffer by initializing a record entry in the 1422 * aRecords queue. VBVA_F_RECORD_PARTIAL indicates that the record is being 1423 * written. As data is written to the ring buffer, the guest increases off32End 1424 * for the record. 1425 * 1426 * The host reads the aRecords on flushes and processes all completed records. 1427 * When host encounters situation when only a partial record presents and 1428 * cbRecord & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE - 1429 * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates 1430 * off32Head. After that on each flush the host continues fetching the data 1431 * until the record is completed. 1432 * 1433 */ 1434 #define VBVA_RING_BUFFER_SIZE (_4M - _1K) 1435 #define VBVA_RING_BUFFER_THRESHOLD (4 * _1K) 1436 1437 #define VBVA_MAX_RECORDS (64) 1438 1439 #define VBVA_F_MODE_ENABLED (0x00000001) 1440 #define VBVA_F_MODE_VRDP (0x00000002) 1441 #define VBVA_F_MODE_VRDP_RESET (0x00000004) 1442 #define VBVA_F_MODE_VRDP_ORDER_MASK (0x00000008) 1443 1444 #define VBVA_F_RECORD_PARTIAL (0x80000000) 1445 /** @} */ 1446 1447 /** 1448 * VBVA record. 1449 */ 1450 typedef struct 1451 { 1452 /** The length of the record. Changed by guest. */ 1453 uint32_t cbRecord; 1454 } VBVARECORD; 1455 AssertCompileSize(VBVARECORD, 4); 1456 1457 1458 /** 1459 * VBVA memory layout. 1460 * 1461 * This is a subsection of the VMMDevMemory structure. 1462 */ 1463 #pragma pack(1) /* paranoia */ 1464 typedef struct VBVAMEMORY 1465 { 1466 /** VBVA_F_MODE_*. */ 1467 uint32_t fu32ModeFlags; 1468 1469 /** The offset where the data start in the buffer. */ 1470 uint32_t off32Data; 1471 /** The offset where next data must be placed in the buffer. */ 1472 uint32_t off32Free; 1473 1474 /** The ring buffer for data. */ 1475 uint8_t au8RingBuffer[VBVA_RING_BUFFER_SIZE]; 1476 1477 /** The queue of record descriptions. */ 1478 VBVARECORD aRecords[VBVA_MAX_RECORDS]; 1479 uint32_t indexRecordFirst; 1480 uint32_t indexRecordFree; 1481 1482 /** RDP orders supported by the client. The guest reports only them 1483 * and falls back to DIRTY rects for not supported ones. 1484 * 1485 * (1 << VBVA_VRDP_*) 1486 */ 1487 uint32_t fu32SupportedOrders; 1488 1489 } VBVAMEMORY; 1490 #pragma pack() 1491 AssertCompileSize(VBVAMEMORY, 12 + (_4M-_1K) + 4*64 + 12); 1492 1493 1494 /** 1543 1495 * The layout of VMMDEV RAM region that contains information for guest. 1544 1496 */ 1545 1497 #pragma pack(1) /* paranoia */ 1546 typedef struct 1547 { 1548 /** size*/1498 typedef struct VMMDevMemory 1499 { 1500 /** The size of this structure. */ 1549 1501 uint32_t u32Size; 1550 /** version*/1502 /** The structure version. (VMMDEV_MEMORY_VERSION) */ 1551 1503 uint32_t u32Version; 1552 1504 1553 union { 1554 /** Flag telling that VMMDev set the IRQ and acknowlegment is required */ 1555 struct { 1505 union 1506 { 1507 struct 1508 { 1509 /** Flag telling that VMMDev set the IRQ and acknowlegment is required */ 1556 1510 bool fHaveEvents; 1557 1511 } V1_04; 1558 1512 1559 struct { 1513 struct 1514 { 1560 1515 /** Pending events flags, set by host. */ 1561 1516 uint32_t u32HostEvents; -
trunk/include/VBox/shflsvc.h
r21217 r21227 32 32 33 33 #include <VBox/types.h> 34 #include <VBox/VBoxGuest.h> 34 #include <VBox/VBoxGuest2.h> 35 #include <VBox/VMMDev.h> 35 36 #include <VBox/hgcmsvc.h> 36 37 #include <iprt/fs.h>
Note:
See TracChangeset
for help on using the changeset viewer.