Changeset 25985 in vbox for trunk/src/VBox/Devices/Input/DevPS2.cpp
- Timestamp:
- Jan 23, 2010 12:51:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/DevPS2.cpp
r25971 r25985 229 229 { 230 230 /** The base interface for the keyboard port. */ 231 PDMIBASE Base;231 PDMIBASE IBase; 232 232 /** The keyboard port base interface. */ 233 PDMIKEYBOARDPORT Port;233 PDMIKEYBOARDPORT IPort; 234 234 235 235 /** The base interface of the attached keyboard driver. */ … … 248 248 { 249 249 /** The base interface for the mouse port. */ 250 PDMIBASE Base;250 PDMIBASE IBase; 251 251 /** The mouse port base interface. */ 252 PDMIMOUSEPORT Port;252 PDMIMOUSEPORT IPort; 253 253 254 254 /** The base interface of the attached mouse driver. */ … … 1360 1360 static DECLCALLBACK(void *) kbdKeyboardQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1361 1361 { 1362 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.Base); 1363 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1364 return &pThis->Keyboard.Base; 1365 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDPORT_IID) == 0) 1366 return &pThis->Keyboard.Port; 1362 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.IBase); 1363 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->Keyboard.IBase); 1364 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIKEYBOARDPORT, &pThis->Keyboard.IPort); 1367 1365 return NULL; 1368 1366 } … … 1375 1373 * 1376 1374 * @returns VBox status code. 1377 * @param pInterface Pointer to the keyboard port interface (KBDState::Keyboard. Port).1375 * @param pInterface Pointer to the keyboard port interface (KBDState::Keyboard.IPort). 1378 1376 * @param u8KeyCode The keycode. 1379 1377 */ 1380 1378 static DECLCALLBACK(int) kbdKeyboardPutEvent(PPDMIKEYBOARDPORT pInterface, uint8_t u8KeyCode) 1381 1379 { 1382 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard. Port);1380 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.IPort); 1383 1381 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 1384 1382 AssertReleaseRC(rc); … … 1398 1396 static DECLCALLBACK(void *) kbdMouseQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1399 1397 { 1400 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.Base); 1401 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1402 return &pThis->Mouse.Base; 1403 if (RTUuidCompare2Strs(pszIID, PDMIMOUSEPORT_IID) == 0) 1404 return &pThis->Mouse.Port; 1398 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IBase); 1399 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->Mouse.IBase); 1400 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSEPORT, &pThis->Mouse.IPort); 1405 1401 return NULL; 1406 1402 } … … 1413 1409 * 1414 1410 * @returns VBox status code. 1415 * @param pInterface Pointer to the mouse port interface (KBDState::Mouse. Port).1411 * @param pInterface Pointer to the mouse port interface (KBDState::Mouse.IPort). 1416 1412 * @param i32DeltaX The X delta. 1417 1413 * @param i32DeltaY The Y delta. … … 1421 1417 static DECLCALLBACK(int) kbdMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, int32_t i32DeltaW, uint32_t fButtonStates) 1422 1418 { 1423 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse. Port);1419 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IPort); 1424 1420 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 1425 1421 AssertReleaseRC(rc); … … 1464 1460 /* LUN #0: keyboard */ 1465 1461 case 0: 1466 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Keyboard. Base, &pThis->Keyboard.pDrvBase, "Keyboard Port");1462 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Keyboard.IBase, &pThis->Keyboard.pDrvBase, "Keyboard Port"); 1467 1463 if (RT_SUCCESS(rc)) 1468 1464 { … … 1485 1481 /* LUN #1: aux/mouse */ 1486 1482 case 1: 1487 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Mouse. Base, &pThis->Mouse.pDrvBase, "Aux (Mouse) Port");1483 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Mouse.IBase, &pThis->Mouse.pDrvBase, "Aux (Mouse) Port"); 1488 1484 if (RT_SUCCESS(rc)) 1489 1485 { … … 1623 1619 pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns); 1624 1620 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 1625 pThis->Keyboard. Base.pfnQueryInterface= kbdKeyboardQueryInterface;1626 pThis->Keyboard. Port.pfnPutEvent= kbdKeyboardPutEvent;1627 1628 pThis->Mouse. Base.pfnQueryInterface= kbdMouseQueryInterface;1629 pThis->Mouse. Port.pfnPutEvent= kbdMousePutEvent;1621 pThis->Keyboard.IBase.pfnQueryInterface = kbdKeyboardQueryInterface; 1622 pThis->Keyboard.IPort.pfnPutEvent = kbdKeyboardPutEvent; 1623 1624 pThis->Mouse.IBase.pfnQueryInterface = kbdMouseQueryInterface; 1625 pThis->Mouse.IPort.pfnPutEvent = kbdMousePutEvent; 1630 1626 1631 1627 /*
Note:
See TracChangeset
for help on using the changeset viewer.