Changeset 22810 in vbox
- Timestamp:
- Sep 7, 2009 1:41:45 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52023
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Devices/Input/DevPS2.cpp ¶
r22793 r22810 57 57 #include "../Builtins.h" 58 58 59 #define PCKBD_SAVED_STATE_VERSION 259 #define PCKBD_SAVED_STATE_VERSION 3 60 60 61 61 … … 171 171 #define KBD_QUEUE_SIZE 256 172 172 173 #ifdef VBOX 174 # define MOUSE_REPORT_HORIZONTAL 0x01 175 # define MOUSE_OUTSTANDING_CLICK 0x02 176 #endif 177 173 178 typedef struct { 174 179 #ifndef VBOX … … 221 226 int32_t mouse_dy; 222 227 int32_t mouse_dz; 228 #ifdef VBOX 229 int32_t mouse_dw; 230 int32_t mouse_flags; 231 #endif 223 232 uint8_t mouse_buttons; 224 233 … … 331 340 332 341 #if defined(DEBUG_MOUSE) || defined(DEBUG_KBD) 333 if (aux) 334 Log(("mouse event: 0x%02x\n", b)); 342 if (aux == 1) 343 LogRel3(("%s: mouse command response: 0x%02x\n", __PRETTY_FUNCTION__, b)); 344 else if (aux == 2) 345 LogRel3(("%s: mouse event data: 0x%02x\n", __PRETTY_FUNCTION__, b)); 335 346 #ifdef DEBUG_KBD 336 347 else 337 Log (("kbd event: 0x%02x\n", b));348 LogRel3(("%s: kbd event: 0x%02x\n", __PRETTY_FUNCTION__, b)); 338 349 #endif 339 350 #endif … … 709 720 #endif /* VBOX */ 710 721 unsigned int b; 711 int dx1, dy1, dz1 ;722 int dx1, dy1, dz1, dw1; 712 723 713 724 dx1 = s->mouse_dx; 714 725 dy1 = s->mouse_dy; 715 726 dz1 = s->mouse_dz; 727 dw1 = s->mouse_dw; 728 LogRel3(("%s: dx=%d, dy=%d, dz=%d, dw=%d\n", __PRETTY_FUNCTION__, 729 dx1, dy1, dz1, dw1)); 716 730 /* XXX: increase range to 8 bits ? */ 717 731 if (dx1 > 127) … … 749 763 break; 750 764 case 4: 765 #ifndef VBOX 751 766 if (dz1 > 7) 752 767 dz1 = 7; 753 768 else if (dz1 < -7) 754 769 dz1 = -7; 755 b = (dz1 & 0x0f) | ((s->mouse_buttons & 0x18) << 1); 756 #ifdef VBOX 770 #else 771 if (dz1 > 1) 772 dz1 = 1; 773 else if (dz1 < -1) 774 dz1 = -1; 775 else if (dw1 > 1) 776 dw1 = 1; 777 else if (dw1 < -1) 778 dw1 = -1; 779 if (dz1) 780 dw1 = 0; 781 #endif 782 #ifdef VBOX 783 if ((s->mouse_flags & MOUSE_REPORT_HORIZONTAL) && dw1) 784 b = 0x40 | (dw1 & 0x3f); 785 else 786 { 787 b = (dz1 & 0x0f) | ((dw1 << 1) & 0x0f) 788 | ((s->mouse_buttons & 0x18) << 1); 789 s->mouse_flags &= ~MOUSE_OUTSTANDING_CLICK; 790 } 757 791 kbd_queue(s, b, aux); 758 792 #else /* !VBOX */ 793 b = (dz1 & 0x0f) | ((s->mouse_buttons & 0x18) << 1); 759 794 kbd_queue(s, b, 1); 760 795 #endif /* !VBOX */ … … 766 801 s->mouse_dy -= dy1; 767 802 s->mouse_dz -= dz1; 803 #ifdef VBOX 804 s->mouse_dw -= dw1; 805 #endif 768 806 } 769 807 770 808 #ifdef IN_RING3 809 #ifndef VBOX 771 810 static void pc_kbd_mouse_event(void *opaque, 772 811 int dx, int dy, int dz, int buttons_state) 812 #else 813 static void pc_kbd_mouse_event(void *opaque, 814 int dx, int dy, int dz, int dw, int buttons_state) 815 #endif 773 816 { 774 817 KBDState *s = (KBDState*)opaque; … … 781 824 s->mouse_dy -= dy; 782 825 s->mouse_dz += dz; 826 #ifdef VBOX 827 s->mouse_dw += dw; 828 #endif 783 829 #ifndef VBOX 784 830 /* XXX: SDL sometimes generates nul events: we delete them */ … … 787 833 return; 788 834 #else 789 /* This issue does not affect VBox, and under some circumstances (which?) 790 * we may wish to send null events to make mouse integration work. */ 835 /* The issue described above does not affect VBox, and under some 836 * circumstances (which?) we may even wish to send null events to make 837 * mouse integration work. */ 838 /* In horizontal reporting mode, we may need to send an additional packet 839 * for the forth and fifth buttons, as they can't share a packet with a 840 * horizontal scroll delta. */ 841 if ((s->mouse_buttons & 0x18) != (buttons_state & 0x18)) 842 s->mouse_flags |= MOUSE_OUTSTANDING_CLICK; 791 843 #endif 792 844 s->mouse_buttons = buttons_state; … … 799 851 too big deltas */ 800 852 kbd_mouse_send_packet(s, false); 801 if (s->mouse_dx == 0 && s->mouse_dy == 0 && s->mouse_dz == 0 )853 if (s->mouse_dx == 0 && s->mouse_dy == 0 && s->mouse_dz == 0 && s->mouse_dw == 0 && !(s->mouse_flags & MOUSE_OUTSTANDING_CLICK)) 802 854 break; 803 855 } … … 821 873 { 822 874 #ifdef DEBUG_MOUSE 823 Log (("kbd: write mouse 0x%02x\n", val));875 LogRelFlowFunc(("kbd: write mouse 0x%02x\n", val)); 824 876 #endif 825 877 #ifdef VBOX … … 949 1001 s->mouse_sample_rate = val; 950 1002 /* detect IMPS/2 or IMEX */ 1003 #ifdef VBOX 1004 /* And enable horizontal scrolling reporting when requested */ 1005 #endif 951 1006 switch(s->mouse_detect_state) { 952 1007 default: … … 960 1015 else if (val == 200) 961 1016 s->mouse_detect_state = 3; 1017 #ifdef VBOX 1018 else if ((val == 80) && s->mouse_type == 4 /* IMEX */) 1019 /* enable horizontal scrolling, byte two */ 1020 s->mouse_detect_state = 4; 1021 #endif 962 1022 else 963 1023 s->mouse_detect_state = 0; 964 1024 break; 965 1025 case 2: 1026 #ifdef VBOX 1027 if (val == 80) 1028 { 1029 LogRelFlowFunc(("switching mouse device to IMPS/2 mode\n")); 1030 s->mouse_type = 3; /* IMPS/2 */ 1031 } 1032 #else 966 1033 if (val == 80) 967 1034 s->mouse_type = 3; /* IMPS/2 */ 1035 #endif 968 1036 s->mouse_detect_state = 0; 969 1037 break; 970 1038 case 3: 1039 #ifdef VBOX 1040 if (val == 80) 1041 { 1042 LogRelFlowFunc(("switching mouse device to IMEX mode\n")); 1043 s->mouse_type = 4; /* IMEX */ 1044 } 1045 #else 971 1046 if (val == 80) 972 1047 s->mouse_type = 4; /* IMEX */ 1048 #endif 973 1049 s->mouse_detect_state = 0; 974 1050 break; 1051 #ifdef VBOX 1052 case 4: 1053 if (val == 40) 1054 { 1055 LogFlowFunc(("enabling IMEX horizontal scrolling reporting\n")); 1056 s->mouse_flags |= MOUSE_REPORT_HORIZONTAL; 1057 } 1058 s->mouse_detect_state = 0; 1059 break; 1060 #endif 975 1061 } 976 1062 kbd_queue(s, AUX_ACK, 1); … … 1078 1164 s->mouse_dy = 0; 1079 1165 s->mouse_dz = 0; 1166 s->mouse_dw = 0; 1167 s->mouse_flags = 0; 1080 1168 s->mouse_buttons = 0; 1081 1169 #endif … … 1119 1207 qemu_put_be32s(f, &s->mouse_dy); 1120 1208 qemu_put_be32s(f, &s->mouse_dz); 1209 #ifdef VBOX 1210 qemu_put_be32s(f, &s->mouse_dw); 1211 qemu_put_be32s(f, &s->mouse_flags); 1212 #endif 1121 1213 qemu_put_8s(f, &s->mouse_buttons); 1122 1214 … … 1156 1248 KBDState *s = (KBDState*)opaque; 1157 1249 1158 if (version_id !=PCKBD_SAVED_STATE_VERSION)1250 if (version_id < 2 || version_id > PCKBD_SAVED_STATE_VERSION) 1159 1251 #ifndef VBOX 1160 1252 return -EINVAL; … … 1177 1269 qemu_get_be32s(f, (uint32_t *)&s->mouse_dy); 1178 1270 qemu_get_be32s(f, (uint32_t *)&s->mouse_dz); 1271 #ifdef VBOX 1272 if (version_id > 2) 1273 { 1274 qemu_get_be32s(f, (uint32_t *)&s->mouse_dw); 1275 qemu_get_be32s(f, (uint32_t *)&s->mouse_flags); 1276 } 1277 #endif 1179 1278 qemu_get_8s(f, &s->mouse_buttons); 1180 1279 #ifdef VBOX … … 1537 1636 * @param fButtonStates The button states. 1538 1637 */ 1539 static DECLCALLBACK(int) kbdMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, uint32_t fButtonStates)1638 static DECLCALLBACK(int) kbdMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, int32_t i32DeltaW, uint32_t fButtonStates) 1540 1639 { 1541 1640 KBDState *pThis = IMOUSEPORT_2_KBDSTATE(pInterface); 1542 1641 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 1543 1642 AssertReleaseRC(rc); 1544 pc_kbd_mouse_event(pThis, i32DeltaX, i32DeltaY, i32DeltaZ, fButtonStates);1643 pc_kbd_mouse_event(pThis, i32DeltaX, i32DeltaY, i32DeltaZ, i32DeltaW, fButtonStates); 1545 1644 PDMCritSectLeave(&pThis->CritSect); 1546 1645 return VINF_SUCCESS; -
TabularUnified trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp ¶
r22277 r22810 69 69 int32_t i32DeltaY; 70 70 int32_t i32DeltaZ; 71 int32_t i32DeltaW; 71 72 uint32_t fButtonStates; 72 73 } DRVMOUSEQUEUEITEM, *PDRVMOUSEQUEUEITEM; … … 120 121 * @thread Any thread. 121 122 */ 122 static DECLCALLBACK(int) drvMouseQueuePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, uint32_t fButtonStates)123 static DECLCALLBACK(int) drvMouseQueuePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, int32_t i32DeltaW, uint32_t fButtonStates) 123 124 { 124 125 PDRVMOUSEQUEUE pDrv = IMOUSEPORT_2_DRVMOUSEQUEUE(pInterface); … … 132 133 pItem->i32DeltaY = i32DeltaY; 133 134 pItem->i32DeltaZ = i32DeltaZ; 135 pItem->i32DeltaW = i32DeltaW; 134 136 pItem->fButtonStates = fButtonStates; 135 137 PDMQueueInsert(pDrv->pQueue, &pItem->Core); … … 154 156 PDRVMOUSEQUEUE pThis = PDMINS_2_DATA(pDrvIns, PDRVMOUSEQUEUE); 155 157 PDRVMOUSEQUEUEITEM pItem = (PDRVMOUSEQUEUEITEM)pItemCore; 156 int rc = pThis->pUpPort->pfnPutEvent(pThis->pUpPort, pItem->i32DeltaX, pItem->i32DeltaY, pItem->i32DeltaZ, pItem-> fButtonStates);158 int rc = pThis->pUpPort->pfnPutEvent(pThis->pUpPort, pItem->i32DeltaX, pItem->i32DeltaY, pItem->i32DeltaZ, pItem->i32DeltaW, pItem->fButtonStates); 157 159 return RT_SUCCESS(rc); 158 160 } -
TabularUnified trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp ¶
r20735 r22810 327 327 GEN_CHECK_OFF(KBDState, mouse_dy); 328 328 GEN_CHECK_OFF(KBDState, mouse_dz); 329 GEN_CHECK_OFF(KBDState, mouse_dw); 329 330 GEN_CHECK_OFF(KBDState, mouse_buttons); 330 331 GEN_CHECK_OFF(KBDState, pDevInsR3); -
TabularUnified trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp ¶
r22277 r22810 109 109 fButtons |= PDMIMOUSEPORT_BUTTON_MIDDLE; 110 110 111 int vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, dx, dy, dz, fButtons);111 int vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, dx, dy, dz, 0 /* Horizontal wheel */, fButtons); 112 112 if (RT_FAILURE (vrc)) 113 113 return E_FAIL; … … 166 166 fButtons |= PDMIMOUSEPORT_BUTTON_MIDDLE; 167 167 168 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 1, 1, dz, fButtons);168 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 1, 1, dz, 0 /* Horizontal wheel */, fButtons); 169 169 if (RT_FAILURE (vrc)) 170 170 return E_FAIL; -
TabularUnified trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp ¶
r21520 r22810 152 152 if (mouse) 153 153 { 154 mouse->PutMouseEventAbsolute(-1, -1, 0, 0 );154 mouse->PutMouseEventAbsolute(-1, -1, 0, 0 /* Horizontal wheel */, 0); 155 155 } 156 156 } -
TabularUnified trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp ¶
r22490 r22810 3979 3979 gMouse->PutMouseEventAbsolute(x + 1 - xMin + xOrigin, 3980 3980 y + 1 - yMin + yOrigin, 3981 dz, buttons | tmp_button); 3981 dz, 0 /* horizontal scroll wheel */, 3982 buttons | tmp_button); 3982 3983 } 3983 3984 else 3984 3985 { 3985 gMouse->PutMouseEvent(0, 0, dz, buttons | tmp_button); 3986 gMouse->PutMouseEvent(0, 0, dz, 3987 0 /* horizontal scroll wheel */, 3988 buttons | tmp_button); 3986 3989 } 3987 3990 } … … 3998 4001 gMouse->PutMouseEventAbsolute(x + 1 - xMin + xOrigin, 3999 4002 y + 1 - yMin + yOrigin, 4000 dz, buttons);4003 dz, 0 /* Horizontal wheel */, buttons); 4001 4004 } 4002 4005 else 4003 4006 { 4004 gMouse->PutMouseEvent(x, y, dz, buttons);4007 gMouse->PutMouseEvent(x, y, dz, 0 /* Horizontal wheel */, buttons); 4005 4008 } 4006 4009 } … … 4627 4630 if (gfGrabbed) 4628 4631 InputGrabEnd(); 4629 gMouse->PutMouseEventAbsolute(-1, -1, 0, 0 );4632 gMouse->PutMouseEventAbsolute(-1, -1, 0, 0, 0); 4630 4633 } 4631 4634 } -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp ¶
r22794 r22810 1385 1385 { 1386 1386 CMouse mouse = mConsole.GetMouse(); 1387 mouse.PutMouseEventAbsolute (-1, -1, 0, 0); 1387 mouse.PutMouseEventAbsolute (-1, -1, 0, 1388 0 /* Horizontal wheel */, 1389 0); 1388 1390 captureMouse (false, false); 1389 1391 } … … 2960 2962 int aWheelDelta, Qt::Orientation aWheelDir) 2961 2963 { 2962 #if 0 2963 char buf [256]; 2964 sprintf (buf, 2965 "MOUSE: type=%03d x=%03d y=%03d btn=%03d btns=%08X mod=%08X " 2966 "wdelta=%03d wdir=%03d", 2967 aType, aPos.x(), aPos.y(), aButtons, aModifiers, 2968 aWheelDelta, aWheelDir); 2969 mMainWnd->statusBar()->message (buf); 2964 #if 1 2965 2966 LogRel3(("%s: type=%03d x=%03d y=%03d btns=%08X wdelta=%03d wdir=%s\n", 2967 __PRETTY_FUNCTION__ , aType, aPos.x(), aPos.y(), 2968 (aButtons & Qt::LeftButton ? 1 : 0) 2969 | (aButtons & Qt::RightButton ? 2 : 0) 2970 | (aButtons & Qt::MidButton ? 4 : 0) 2971 | (aButtons & Qt::XButton1 ? 8 : 0) 2972 | (aButtons & Qt::XButton2 ? 16 : 0), 2973 aWheelDelta, 2974 aWheelDir == Qt::Horizontal ? "Horizontal" 2975 : aWheelDir == Qt::Vertical ? "Vertical" : "Unknown")); 2976 Q_UNUSED (aModifiers); 2970 2977 #else 2971 2978 Q_UNUSED (aModifiers); … … 2979 2986 if (aButtons & Qt::MidButton) 2980 2987 state |= KMouseButtonState_MiddleButton; 2988 if (aButtons & Qt::XButton1) 2989 state |= KMouseButtonState_XButton1; 2990 if (aButtons & Qt::XButton2) 2991 state |= KMouseButtonState_XButton2; 2981 2992 2982 2993 #ifdef Q_WS_MAC … … 2989 3000 #endif /* Q_WS_MAC */ 2990 3001 2991 int wheel = 0; 3002 int wheelVertical = 0; 3003 int wheelHorizontal = 0; 2992 3004 if (aWheelDir == Qt::Vertical) 2993 3005 { … … 2995 3007 * move; positive deltas correspond to counterclockwize rotations 2996 3008 * (usually up), negative -- to clockwize (usually down). */ 2997 wheel = - (aWheelDelta / 120); 2998 } 3009 wheelVertical = - (aWheelDelta / 120); 3010 } 3011 else if (aWheelDir == Qt::Horizontal) 3012 wheelHorizontal = aWheelDelta / 120; 2999 3013 3000 3014 if (mMouseCaptured) … … 3008 3022 mouse.PutMouseEvent (aGlobalPos.x() - mLastPos.x(), 3009 3023 aGlobalPos.y() - mLastPos.y(), 3010 wheel , state);3024 wheelVertical, wheelHorizontal, state); 3011 3025 3012 3026 #if defined (Q_WS_MAC) … … 3151 3165 3152 3166 CMouse mouse = mConsole.GetMouse(); 3153 mouse.PutMouseEventAbsolute (cpnt.x(), cpnt.y(), wheel, state); 3167 mouse.PutMouseEventAbsolute (cpnt.x(), cpnt.y(), wheelVertical, 3168 wheelHorizontal, state); 3154 3169 return true; /* stop further event handling */ 3155 3170 } … … 3426 3441 /* release mouse buttons */ 3427 3442 CMouse mouse = mConsole.GetMouse(); 3428 mouse.PutMouseEvent (0, 0, 0, 0 );3443 mouse.PutMouseEvent (0, 0, 0, 0 /* Horizontal wheel */, 0); 3429 3444 } 3430 3445 -
TabularUnified trunk/src/VBox/Main/ConsoleVRDPServer.cpp ¶
r22663 r22810 1026 1026 if (server->m_fGuestWantsAbsolute) 1027 1027 { 1028 pConsole->getMouse()->PutMouseEventAbsolute (pInputPoint->x + 1, pInputPoint->y + 1, iWheel, mouseButtons);1028 pConsole->getMouse()->PutMouseEventAbsolute (pInputPoint->x + 1, pInputPoint->y + 1, iWheel, 0 /* Horizontal wheel */, mouseButtons); 1029 1029 } else 1030 1030 { 1031 1031 pConsole->getMouse()->PutMouseEvent (pInputPoint->x - server->m_mousex, 1032 1032 pInputPoint->y - server->m_mousey, 1033 iWheel, mouseButtons);1033 iWheel, 0 /* Horizontal wheel */, mouseButtons); 1034 1034 server->m_mousex = pInputPoint->x; 1035 1035 server->m_mousey = pInputPoint->y; -
TabularUnified trunk/src/VBox/Main/MouseImpl.cpp ¶
r22277 r22810 198 198 * @param buttonState The mouse button state 199 199 */ 200 STDMETHODIMP Mouse::PutMouseEvent(LONG dx, LONG dy, LONG dz, LONG buttonState)200 STDMETHODIMP Mouse::PutMouseEvent(LONG dx, LONG dy, LONG dz, LONG dw, LONG buttonState) 201 201 { 202 202 HRESULT rc = S_OK; … … 213 213 214 214 uint32_t mouseCaps; 215 LogRel3(("%s: dx=%d, dy=%d, dz=%d, dw=%d\n", __PRETTY_FUNCTION__, 216 dx, dy, dz, dw)); 215 217 mParent->getVMMDev()->getVMMDevPort() 216 218 ->pfnQueryMouseCapabilities(mParent->getVMMDev()->getVMMDevPort(), … … 234 236 if (buttonState & MouseButtonState_MiddleButton) 235 237 fButtons |= PDMIMOUSEPORT_BUTTON_MIDDLE; 236 237 int vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, dx, dy, dz, fButtons); 238 if (buttonState & MouseButtonState_XButton1) 239 fButtons |= PDMIMOUSEPORT_BUTTON_X1; 240 if (buttonState & MouseButtonState_XButton2) 241 fButtons |= PDMIMOUSEPORT_BUTTON_X2; 242 243 int vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, dx, dy, dz, dw, fButtons); 238 244 if (RT_FAILURE(vrc)) 239 245 rc = setError (VBOX_E_IPRT_ERROR, … … 254 260 * @param buttonState The mouse button state 255 261 */ 256 STDMETHODIMP Mouse::PutMouseEventAbsolute(LONG x, LONG y, LONG dz, 262 STDMETHODIMP Mouse::PutMouseEventAbsolute(LONG x, LONG y, LONG dz, LONG dw, 257 263 LONG buttonState) 258 264 { … … 270 276 271 277 uint32_t mouseCaps; 278 LogRel3(("%s: x=%d, y=%d, dz=%d, dw=%d\n", __PRETTY_FUNCTION__, 279 x, y, dz, dw)); 272 280 mParent->getVMMDev()->getVMMDevPort() 273 281 ->pfnQueryMouseCapabilities(mParent->getVMMDev()->getVMMDevPort(), … … 316 324 if (buttonState & MouseButtonState_MiddleButton) 317 325 fButtons |= PDMIMOUSEPORT_BUTTON_MIDDLE; 326 if (buttonState & MouseButtonState_XButton1) 327 fButtons |= PDMIMOUSEPORT_BUTTON_X1; 328 if (buttonState & MouseButtonState_XButton2) 329 fButtons |= PDMIMOUSEPORT_BUTTON_X2; 318 330 319 331 /* This is a workaround. In order to alert the Guest Additions to the … … 325 337 if ( ((mLastAbsX == mouseXAbs) && (mLastAbsY == mouseYAbs)) 326 338 || (mouseCaps & VMMDEV_MOUSE_GUEST_USES_VMMDEV)) 327 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 0, 0, dz, 339 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 0, 0, dz, dw, 328 340 fButtons); 329 341 else 330 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 1, 1, dz, 342 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 1, 1, dz, dw, 331 343 fButtons); 332 344 mLastAbsX = mouseXAbs; -
TabularUnified trunk/src/VBox/Main/idl/VirtualBox.xidl ¶
r22381 r22810 9911 9911 <const name="WheelUp" value="0x08"/> 9912 9912 <const name="WheelDown" value="0x10"/> 9913 <const name="MouseStateMask" value="0x1F"/> 9913 <const name="XButton1" value="0x20"/> 9914 <const name="XButton2" value="0x40"/> 9915 <const name="MouseStateMask" value="0x7F"/> 9914 9916 </enum> 9915 9917 … … 9973 9975 Positive values describe clockwise wheel rotations, 9974 9976 negative values describe counterclockwise rotations. 9977 </desc> 9978 </param> 9979 <param name="dw" type="long" dir="in"> 9980 <desc> 9981 Amount of horizontal mouse wheel moves. 9982 Positive values describe a movement to the left, 9983 negative values describe a movement to the right. 9975 9984 </desc> 9976 9985 </param> … … 10027 10036 Positive values describe clockwise wheel rotations, 10028 10037 negative values describe counterclockwise rotations. 10038 </desc> 10039 </param> 10040 <param name="dw" type="long" dir="in"> 10041 <desc> 10042 Amount of horizontal mouse wheel moves. 10043 Positive values describe a movement to the left, 10044 negative values describe a movement to the right. 10029 10045 </desc> 10030 10046 </param> -
TabularUnified trunk/src/VBox/Main/include/MouseImpl.h ¶
r22277 r22810 34 34 { 35 35 public: 36 MouseEvent() : dx(0), dy(0), dz(0), state(-1) {}37 MouseEvent(int _dx, int _dy, int _dz, int _state) :38 dx(_dx), dy(_dy), dz(_dz), state(_state) {}36 MouseEvent() : dx(0), dy(0), dz(0), dw(0), state(-1) {} 37 MouseEvent(int32_t _dx, int32_t _dy, int32_t _dz, int32_t _dw, int32_t _state) : 38 dx(_dx), dy(_dy), dz(_dz), dw(_dw), state(_state) {} 39 39 bool isValid() 40 40 { 41 41 return state != -1; 42 42 } 43 // not logical to be int but that's how it's defined in QEMU 44 /** @todo r=bird: and what is the logical declaration then? We'll be using int32_t btw. */ 45 int dx, dy, dz; 46 int state; 43 /* Note: dw is the horizontal scroll wheel */ 44 int32_t dx, dy, dz, dw; 45 int32_t state; 47 46 }; 48 47 // template instantiation … … 85 84 86 85 // IMouse methods 87 STDMETHOD(PutMouseEvent)(LONG dx, LONG dy, LONG dz, 86 STDMETHOD(PutMouseEvent)(LONG dx, LONG dy, LONG dz, LONG dw, 88 87 LONG buttonState); 89 STDMETHOD(PutMouseEventAbsolute)(LONG x, LONG y, LONG dz, 88 STDMETHOD(PutMouseEventAbsolute)(LONG x, LONG y, LONG dz, LONG dw, 90 89 LONG buttonState); 91 90
Note:
See TracChangeset
for help on using the changeset viewer.