- Timestamp:
- Sep 12, 2002, 11:30:06 AM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r9200 r9230 1 /* $Id: oslibmsgtranslate.cpp,v 1.9 2 2002-09-03 14:03:16sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.93 2002-09-12 09:30:05 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 44 44 static BOOL fGenerateDoubleClick = FALSE; 45 45 static MSG doubleClickMsg = {0}; 46 47 //For wheel mouse translation 48 #define WHEEL_DELTA 120 49 #define OS2_WHEEL_CORRECTION 6 50 //This happens because OS/2 Wheel scrolling of IBM driver issues 6 WM_VSCROLL 51 //messages and they need to transform in 1 WM_MOUSEWHEEL. If however user 52 //will tweak driver to produce less or more messages, we will also react 46 53 47 54 //****************************************************************************** … … 921 928 case WM_HSCROLL: 922 929 case WM_VSCROLL: 923 winMsg->message = (os2Msg->msg == WM_HSCROLL) ? WINWM_HSCROLL : WINWM_VSCROLL; 924 winMsg->lParam = 0; 925 winMsg->wParam = 0; 926 switch(SHORT2FROMMP(os2Msg->mp2)) { 927 case SB_LINERIGHT: 928 winMsg->wParam = SB_LINERIGHT_W; 929 break; 930 case SB_LINELEFT: 931 winMsg->wParam = SB_LINELEFT_W; 932 break; 933 case SB_PAGELEFT: 934 winMsg->wParam = SB_PAGELEFT_W; 935 break; 936 case SB_PAGERIGHT: 937 winMsg->wParam = SB_PAGERIGHT_W; 938 break; 939 default: 940 dprintf(("Unsupported WM_H/VSCROLL message %x!!", SHORT2FROMMP(os2Msg->mp2))); 930 //PF For win32 we support only vertical scrolling for WM_MOUSEWHEEL 931 if((os2Msg->msg == WM_VSCROLL) && (fMsgRemoved == MSG_REMOVE)) 932 { 933 MSLLHOOKSTRUCT hook; 934 935 //TODO: 936 winMsg->message = WINWM_MOUSEWHEEL; 937 winMsg->lParam = 0; 938 winMsg->wParam = 0; 939 940 hook.pt.x = os2Msg->ptl.x & 0xFFFF; 941 hook.pt.y = mapScreenY(os2Msg->ptl.y); 942 if (SHORT2FROMMP(os2Msg->mp2) == SB_LINEDOWN) 943 hook.mouseData = MAKELONG(0, -WHEEL_DELTA/OS2_WHEEL_CORRECTION); 944 else 945 if (SHORT2FROMMP(os2Msg->mp2) == SB_LINEUP) 946 { 947 hook.mouseData = MAKELONG(0, WHEEL_DELTA/OS2_WHEEL_CORRECTION); 948 } 949 else goto dummymessage; // IBM driver produces other messages as well sometimes 950 951 hook.flags = LLMHF_INJECTED; 952 hook.time = winMsg->time; 953 hook.dwExtraInfo = 0; 954 if(HOOK_CallHooksW( WH_MOUSE_LL, HC_ACTION, WINWM_MOUSEWHEEL, (LPARAM)&hook)) { 955 goto dummymessage; //hook swallowed message 956 } 941 957 goto dummymessage; 942 } 958 } 959 goto dummymessage; //eat this message 960 943 961 break; 944 962 -
trunk/src/user32/oslibwin.cpp
r9143 r9230 1 /* $Id: oslibwin.cpp,v 1.12 6 2002-08-27 09:30:50sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.127 2002-09-12 09:30:06 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 1211 1211 } 1212 1212 //****************************************************************************** 1213 //****************************************************************************** 1213 //PF This was added for IBM Wheel Mouse driver - it searches for scrollbars and 1214 //only if they exist sends WM_VSCROLL messages to the window 1215 //****************************************************************************** 1216 HWND OSLibWinCreateInvisibleScroller(HWND parentHWND, int direction) 1217 { 1218 return WinCreateWindow(parentHWND, WC_SCROLLBAR, NULL, direction, 1219 0, 0, 0, 0, parentHWND, HWND_BOTTOM, 1, NULL, NULL); 1220 } 1221 //****************************************************************************** 1222 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r9076 r9230 1 /* $Id: oslibwin.h,v 1.6 7 2002-08-21 15:40:28sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.68 2002-09-12 09:30:06 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 356 356 357 357 BOOL OSLibWinShowPointer(BOOL fShow); 358 358 HWND OSLibWinCreateInvisibleScroller(HWND parentHWND, int direction); 359 359 360 360 #define PMSYSCLR_SHADOWHILITEBGND (-50L)
Note:
See TracChangeset
for help on using the changeset viewer.