- Timestamp:
- Nov 9, 1999, 8:23:17 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r1629 r1671 1 # $Id: Makefile,v 1.4 2 1999-11-08 13:44:13sandervl Exp $1 # $Id: Makefile,v 1.43 1999-11-09 19:23:16 sandervl Exp $ 2 2 3 3 # … … 18 18 CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE) 19 19 CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE) 20 21 !ifdef DEBUGALL 22 CFLAGS = $(CFLAGS) -DDEBUG_ENABLELOG_LEVEL2 23 CXXFLAGS = $(CXXFLAGS) -DDEBUG_ENABLELOG_LEVEL2 24 !endif 20 25 21 26 RC = $(PDWIN32_TOOLS)\wrc … … 153 158 154 159 clean: 155 $(RM) *.obj *.lib *.dll *.map *.pch *.res 160 $(RM) *.obj *.lib *.dll *.map *.pch *.res *.lrf resource.asm 156 161 $(RM) $(PDWIN32_BIN)\$(TARGET).dll 157 162 $(RM) $(PDWIN32_LIB)\$(TARGET).lib -
trunk/src/user32/pmwindow.cpp
r1629 r1671 1 /* $Id: pmwindow.cpp,v 1.5 2 1999-11-08 13:44:14sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.53 1999-11-09 19:23:16 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 672 672 ULONG flags = SHORT1FROMMP(mp1); 673 673 BOOL keyWasPressed, fTranslated = FALSE, fRunDefWndProc = FALSE; 674 674 675 char c; 675 676 … … 679 680 680 681 dprintf(("PM: WM_CHAR: %x %x %d %x", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), repeatCount, scanCode)); 682 dprintf(("PM: WM_CHAR: %x", flags)); 681 683 // both WM_KEYUP & WM_KEYDOWN want a virtual key, find the right Win32 virtual key 682 684 // given the OS/2 virtual key and OS/2 character 683 685 684 if (((SHORT1FROMMP (mp1) & KC_CHAR) == KC_CHAR) || 685 ((SHORT1FROMMP (mp1) & KC_LONEKEY) == KC_LONEKEY)) 686 //if (((SHORT1FROMMP (mp1) & KC_CHAR) == KC_CHAR) || 687 // ((SHORT1FROMMP (mp1) & KC_LONEKEY) == KC_LONEKEY)) 688 c = 0; 689 if ((SHORT1FROMMP (mp1) & 0xFF) != 0) 686 690 { 687 691 c = SHORT1FROMMP (mp2); … … 705 709 706 710 VirtualKeyFound: 711 dprintf (("VIRTUALKEYFOUND:(%x)", virtualKey)); 707 712 708 713 if(!(SHORT1FROMMP(mp1) & KC_ALT)) … … 720 725 else { 721 726 // send WM_KEYDOWN message 722 if (win32wnd->MsgKeyDown (repeatCount, scanCode, virtualKey, keyWasPressed)) 727 if (win32wnd->MsgKeyDown (repeatCount, scanCode, 728 virtualKey, keyWasPressed)) 723 729 fRunDefWndProc = TRUE; 724 730 } … … 731 737 // send WM_SYSKEYUP message 732 738 739 dprintf(("PMWINDOW_WM_SYSKEYUP: vkey:(%x)", virtualKey)); 733 740 if(win32wnd->MsgSysKeyUp (repeatCount, scanCode, virtualKey)) { 734 741 fRunDefWndProc = TRUE; … … 737 744 else { 738 745 // send WM_SYSKEYDOWN message 746 dprintf(("PMWINDOW_WM_SYSKEYDOWN: vkey:(%x)", virtualKey)); 739 747 if (win32wnd->MsgSysKeyDown (repeatCount, scanCode, virtualKey, keyWasPressed)) 740 748 fRunDefWndProc = TRUE; … … 749 757 //NOTE: These actually need to be posted so that the next message retrieved by GetMessage contains 750 758 // the newly generated WM_CHAR message. 751 if(fTranslated && !((flags & KC_KEYUP) == KC_KEYUP)) {//TranslatedMessage was called before DispatchMessage, so send WM_CHAR messages 759 if(fTranslated && !((flags & KC_KEYUP) == KC_KEYUP)) 760 {//TranslatedMessage was called before DispatchMessage, so send WM_CHAR messages 752 761 ULONG keyflags = 0, vkey = 0; 753 762 ULONG fl = SHORT1FROMMP(mp1); -
trunk/src/user32/user32.cpp
r1629 r1671 1 /* $Id: user32.cpp,v 1.5 1 1999-11-08 13:44:14sandervl Exp $ */1 /* $Id: user32.cpp,v 1.52 1999-11-09 19:23:16 sandervl Exp $ */ 2 2 3 3 /* … … 99 99 BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc) 100 100 { 101 // ddprintf(("USER32: CopyRect\n"));101 dprintf2(("USER32: CopyRect\n")); 102 102 if (!lprcDst || !lprcSrc) { 103 103 SetLastError(ERROR_INVALID_PARAMETER); … … 113 113 BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2) 114 114 { 115 #ifdef DEBUG 116 WriteLog("USER32: EqualRect\n"); 117 #endif 115 dprintf2(("USER32: EqualRect\n")); 118 116 if (!lprc1 || !lprc2) 119 117 { … … 131 129 BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy) 132 130 { 133 #ifdef DEBUG 134 WriteLog("USER32: InflateRect\n"); 135 #endif 131 dprintf(("USER32: InflateRect\n")); 136 132 if (!lprc) 137 133 { … … 151 147 BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2) 152 148 { 153 #ifdef DEBUG 154 //// WriteLog("USER32: IntersectRect\n"); 155 #endif 149 dprintf2(("USER32: IntersectRect\n")); 156 150 if (!lprcDst || !lprcSrc1 || !lprcSrc2) 157 151 { … … 191 185 BOOL WIN32API OffsetRect( PRECT lprc, int x, int y) 192 186 { 193 #ifdef DEBUG 194 //// WriteLog("USER32: OffsetRect\n"); 195 #endif 187 dprintf2(("USER32: OffsetRect\n")); 196 188 if (!lprc) 197 189 { … … 211 203 BOOL WIN32API PtInRect( const RECT *lprc, POINT pt) 212 204 { 213 #ifdef DEBUG1 214 WriteLog("USER32: PtInRect\n"); 215 #endif 205 dprintf2(("USER32: PtInRect\n")); 216 206 if (!lprc) 217 207 { … … 260 250 BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2) 261 251 { 262 #ifdef DEBUG 263 WriteLog("USER32: SubtractRect"); 264 #endif 252 dprintf2(("USER32: SubtractRect")); 265 253 RECT tmp; 266 254 … … 303 291 BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2) 304 292 { 305 #ifdef DEBUG 306 WriteLog("USER32: UnionRect\n"); 307 #endif 293 dprintf2(("USER32: UnionRect\n")); 308 294 if (!lprcDst || !lprcSrc1 || !lprcSrc2) 309 295 { … … 341 327 BOOL WIN32API ClipCursor(const RECT * lpRect) 342 328 { 343 #ifdef DEBUG 344 WriteLog("USER32: ClipCursor\n"); 345 #endif 329 dprintf(("USER32: ClipCursor\n")); 346 330 return O32_ClipCursor(lpRect); 347 331 } … … 350 334 HCURSOR WIN32API CreateCursor( HINSTANCE hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, const VOID *pvANDPlane, const VOID *pvXORPlane) 351 335 { 352 #ifdef DEBUG 353 WriteLog("USER32: CreateCursor\n"); 354 #endif 336 dprintf(("USER32: CreateCursor\n")); 355 337 return O32_CreateCursor(hInst,xHotSpot,yHotSpot,nWidth,nHeight,pvANDPlane,pvXORPlane); 356 338 } … … 359 341 BOOL WIN32API DestroyCursor( HCURSOR hCursor) 360 342 { 361 #ifdef DEBUG 362 WriteLog("USER32: DestroyCursor\n"); 363 #endif 343 dprintf(("USER32: DestroyCursor\n")); 364 344 return O32_DestroyCursor(hCursor); 365 345 } … … 368 348 BOOL WIN32API GetClipCursor( LPRECT lpRect) 369 349 { 370 #ifdef DEBUG 371 WriteLog("USER32: GetClipCursor\n"); 372 #endif 350 dprintf(("USER32: GetClipCursor\n")); 373 351 return O32_GetClipCursor(lpRect); 374 352 } … … 377 355 HCURSOR WIN32API GetCursor(void) 378 356 { 379 #ifdef DEBUG 380 //// WriteLog("USER32: GetCursor\n"); 381 #endif 357 dprintf2(("USER32: GetCursor\n")); 382 358 return O32_GetCursor(); 383 359 } … … 388 364 BOOL rc; 389 365 POINT point; 390 #ifdef DEBUG 391 //// WriteLog("USER32: GetCursorPos\n");392 #endif 366 367 dprintf2(("USER32: GetCursorPos\n")); 368 393 369 if (!lpPoint) return FALSE; 394 370 if (OSLibWinQueryPointerPos(OSLIB_HWND_DESKTOP,&point)) //POINT == POINTL … … 422 398 { 423 399 return LoadCursorA(NULL,lpFileName); 424 } else 400 } 401 else 425 402 { 426 403 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n", … … 476 453 BOOL WIN32API SetCursorPos( int X, int Y) 477 454 { 478 #ifdef DEBUG 479 WriteLog("USER32: SetCursorPos\n"); 480 #endif 455 dprintf(("USER32: SetCursorPos %d %d", X,Y)); 481 456 return O32_SetCursorPos(X,Y); 482 457 } … … 512 487 int WIN32API ShowCursor( BOOL bShow) 513 488 { 514 #ifdef DEBUG 515 WriteLog("USER32: ShowCursor\n"); 516 #endif 489 dprintf2(("USER32: ShowCursor %d", bShow)); 517 490 return O32_ShowCursor(bShow); 518 491 } … … 547 520 UINT WIN32API GetDoubleClickTime(void) 548 521 { 549 #ifdef DEBUG 550 WriteLog("USER32: GetDoubleClickTime\n"); 551 #endif 522 dprintf(("USER32: GetDoubleClickTime\n")); 552 523 return O32_GetDoubleClickTime(); 553 524 } … … 845 816 break; 846 817 } 847 #ifdef DEBUG 848 WriteLog("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc); 849 #endif 818 dprintf(("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc)); 850 819 return(rc); 851 820 } … … 949 918 break; 950 919 } 951 #ifdef DEBUG 952 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc); 953 #endif 920 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc)); 954 921 return(rc); 955 922 } … … 1133 1100 WORD WIN32API GetAsyncKeyState(INT nVirtKey) 1134 1101 { 1135 #ifdef DEBUG 1136 //// WriteLog("USER32: GetAsyncKeyState Not implemented\n"); 1137 #endif 1102 dprintf2(("USER32: GetAsyncKeyState Not implemented\n")); 1138 1103 return 0; 1139 1104 } … … 1185 1150 int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList) 1186 1151 { 1187 #ifdef DEBUG 1188 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n"); 1189 #endif 1152 dprintf(("USER32: GetKeyboardLayoutList, not implemented\n")); 1190 1153 return(0); 1191 1154 } … … 1257 1220 { 1258 1221 //SvL: Hehe. 32 MB logfile for Opera after a minute. 1259 #ifdef DEBUG 1260 // WriteLog("USER32: GetKeyState %d\n", nVirtKey); 1261 #endif 1222 dprintf2(("USER32: GetKeyState %d\n", nVirtKey)); 1262 1223 return O32_GetKeyState(nVirtKey); 1263 1224 } -
trunk/src/user32/win32wbase.cpp
r1629 r1671 1 /* $Id: win32wbase.cpp,v 1.7 7 1999-11-08 13:44:15sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.78 1999-11-09 19:23:17 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1036 1036 1037 1037 if(ISMOUSE_CAPTURED()) { 1038 1039 1038 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_BUTTON, ncx, ncy, msg)) 1039 return 0; 1040 1040 } 1041 1041 … … 1107 1107 } 1108 1108 1109 if(fClick) 1109 if(fClick) 1110 1110 { 1111 1111 HWND hwndTop; 1112 1112 1113 1113 /* Activate the window if needed */ 1114 1115 1116 1117 1118 1119 elsehwndTop = 0;1120 1121 elsehwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0;1114 if(isSubclassedOS2Wnd()) { 1115 Win32BaseWindow *parentwnd = GetWindowFromOS2FrameHandle(OSLibWinQueryWindow(OS2Hwnd, QWOS_PARENT)); 1116 if(parentwnd) { 1117 hwndTop = (parentwnd->GetTopParent()) ? parentwnd->GetTopParent()->getWindowHandle() : 0; 1118 } 1119 else hwndTop = 0; 1120 } 1121 else hwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0; 1122 1122 1123 1123 if (hwndTop && getWindowHandle() != GetActiveWindow()) … … 1154 1154 1155 1155 if(ISMOUSE_CAPTURED()) { 1156 1157 1156 POINT point = {x,y}; 1157 1158 1158 MapWindowPoints(getWindowHandle(), HWND_DESKTOP, &point, 1); 1159 1160 1159 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_MOVE, point.x, point.y, keystate)) 1160 return 0; 1161 1161 } 1162 1162 … … 1565 1565 1566 1566 case WM_SYSKEYDOWN: 1567 if(HIWORD(lParam) & KEYDATA_ALT) 1568 { 1569 if(wParam == VK_F4) /* try to close the window */ 1570 { 1571 Win32BaseWindow *window = GetTopParent(); 1572 if(window && !(window->getClass()->getStyle() & CS_NOCLOSE) ) 1573 window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0); 1567 if(wParam == VK_F4) /* try to close the window */ 1568 { 1569 Win32BaseWindow *window = GetTopParent(); 1570 if(window && !(window->getClass()->getStyle() & CS_NOCLOSE)) 1571 window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0); 1572 } 1573 1574 Win32BaseWindow *siblingWindow; 1575 HWND sibling; 1576 char nameBuffer [40], mnemonic; 1577 int nameLength; 1578 1579 GetWindowTextA (nameBuffer, 40); 1580 1581 // search all sibling to see it this key is their mnemonic 1582 sibling = GetWindow (GW_HWNDFIRST); 1583 while (sibling != 0) { 1584 siblingWindow = GetWindowFromHandle (sibling); 1585 nameLength = siblingWindow->GetWindowTextA (nameBuffer, 40); 1586 1587 // find the siblings mnemonic 1588 mnemonic = '\0'; 1589 for (int i=0 ; i<nameLength ; i++) { 1590 if (nameBuffer [i] == '&') { 1591 mnemonic = nameBuffer [i+1]; 1592 if ((mnemonic >= 'a') && (mnemonic <= 'z')) 1593 mnemonic -= 32; // make it uppercase 1594 break; // stop searching 1574 1595 } 1575 } 1596 } 1597 1598 // key matches siblings mnemonic, send mouseclick 1599 if (mnemonic == (char) wParam) { 1600 siblingWindow->SendMessageA (BM_CLICK, 0, 0); 1601 } 1602 1603 sibling = siblingWindow->GetNextWindow (GW_HWNDNEXT); 1604 } 1605 1576 1606 return 0; 1577 1607 … … 2501 2531 { 2502 2532 if(wndname == NULL) 2503 return FALSE; 2533 return FALSE; 2504 2534 2505 2535 if(fUnicode) {
Note:
See TracChangeset
for help on using the changeset viewer.