- Timestamp:
- Dec 12, 2001, 5:40:45 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r7612 r7620 1 /* $Id: oslibmsg.cpp,v 1.5 1 2001-12-11 17:34:53 sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.52 2001-12-12 16:40:43 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 658 658 //****************************************************************************** 659 659 //****************************************************************************** 660 660 DWORD GetThreadMessageExtraInfo() 661 { 662 TEB *teb; 663 664 teb = GetThreadTEB(); 665 if(teb) 666 { 667 return teb->o.odin.dwMsgExtraInfo; 668 } 669 dprintf(("GetThreadMessageExtraInfo: teb == NULL!!")); 670 return 0; 671 } 672 //****************************************************************************** 673 //****************************************************************************** 674 DWORD SetThreadMessageExtraInfo(DWORD lParam) 675 { 676 TEB *teb; 677 678 teb = GetThreadTEB(); 679 if(teb) 680 { 681 teb->o.odin.dwMsgExtraInfo = lParam; 682 } 683 else dprintf(("SetThreadMessageExtraInfo: teb == NULL!!")); 684 return 0; 685 } 686 //****************************************************************************** 687 //****************************************************************************** -
trunk/src/user32/oslibmsgtranslate.cpp
r7612 r7620 1 /* $Id: oslibmsgtranslate.cpp,v 1.7 8 2001-12-11 17:34:53 sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.79 2001-12-12 16:40:43 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 557 557 USHORT scanCode=0; 558 558 ULONG flags = SHORT1FROMMP(os2Msg->mp1); 559 BOOL keyWasPressed , isExtended = FALSE;559 BOOL keyWasPressed; 560 560 char c; 561 561 USHORT usPMScanCode = CHAR4FROMMP(os2Msg->mp1); 562 562 563 teb->o.odin.fTranslated = FALSE;564 repeatCount = CHAR3FROMMP(os2Msg->mp1);565 scanCode = CHAR4FROMMP(os2Msg->mp1);566 keyWasPressed = ((SHORT1FROMMP (os2Msg->mp1) & KC_PREVDOWN) == KC_PREVDOWN);563 teb->o.odin.fTranslated = FALSE; 564 repeatCount = CHAR3FROMMP(os2Msg->mp1); 565 scanCode = CHAR4FROMMP(os2Msg->mp1); 566 keyWasPressed = ((SHORT1FROMMP (os2Msg->mp1) & KC_PREVDOWN) == KC_PREVDOWN); 567 567 568 568 dprintf(("PM: WM_CHAR: %x %x rep=%d scancode=%x", SHORT1FROMMP(os2Msg->mp2), SHORT2FROMMP(os2Msg->mp2), repeatCount, scanCode)); 569 569 dprintf(("PM: WM_CHAR: hwnd %x flags %x mp1 %x, mp2 %x, time=%08xh", win32wnd->getWindowHandle(), flags, os2Msg->mp1, os2Msg->mp2, os2Msg->time)); 570 570 571 // vitali add begin572 if ( ( SHORT1FROMMP(os2Msg->mp2) & 0x0FF ) == 0x0E0 )573 {574 // an extended key ( arrows, ins, del and so on )575 // get "virtual" scancode from character code because576 // for "regular" keys they are equal577 if(!(flags & (KC_SHIFT|KC_ALT|KC_CTRL))) {578 scanCode = ( SHORT1FROMMP(os2Msg->mp2) >> 8) & 0x0FF;579 }580 isExtended = TRUE;581 }582 // vitali add end583 584 // both WM_KEYUP & WM_KEYDOWN want a virtual key, find the right Win32 virtual key585 // given the OS/2 virtual key and OS/2 character586 587 //if (((SHORT1FROMMP (mp1) & KC_CHAR) == KC_CHAR) ||588 // ((SHORT1FROMMP (mp1) & KC_LONEKEY) == KC_LONEKEY))589 c = 0;590 if ((SHORT1FROMMP (os2Msg->mp1) & 0xFF) != 0)591 {592 c = SHORT1FROMMP (os2Msg->mp2);593 if ((c >= 'A') && (c <= 'Z')) {594 virtualKey = c;595 goto VirtualKeyFound;596 }597 if ((c >='a') && (c <= 'z')) {598 virtualKey = c - 32; // make it uppercase599 goto VirtualKeyFound;600 }601 if ((c >= '0') && (c <= '9')) {602 virtualKey = c;603 goto VirtualKeyFound;604 }605 }606 607 VirtualKeyFound:608 // dprintf (("VIRTUALKEYFOUND:(%x)", virtualKey));609 610 // @@@PH: what's this supposed to be?611 // Adjust PM scancodes for Win* keys612 if (scanCode >= 0x70)613 scanCode -= 0x10;614 // winMsg->wParam = pmscan2winkey[scanCode][0];615 // wWinScan = pmscan2winkey[scanCode][1];616 617 {618 571 BOOL fWinExtended; 619 572 BYTE bWinVKey; … … 633 586 if (fWinExtended) 634 587 winMsg->lParam = winMsg->lParam | WIN_KEY_EXTENDED; 635 } 636 588 589 #if 0 590 //TODO 637 591 // Adjust VKEY value for pad digits if NumLock is on 638 592 if ((scanCode >= 0x47) && (scanCode <= 0x53) && 639 593 (virtualKey >= 0x30) && (virtualKey >= 39)) 640 594 winMsg->wParam = virtualKey + 0x30; 641 595 #endif 642 596 643 597 #ifdef ALTGR_HACK -
trunk/src/user32/oslibutil.cpp
r4658 r7620 1 /* $Id: oslibutil.cpp,v 1. 6 2000-11-21 11:36:08sandervl Exp $ */1 /* $Id: oslibutil.cpp,v 1.7 2001-12-12 16:40:44 sandervl Exp $ */ 2 2 /* 3 3 * Window API utility functions for OS/2 … … 76 76 //****************************************************************************** 77 77 //****************************************************************************** 78 DWORD GetThreadMessageExtraInfo()79 {80 TEB *teb;81 82 teb = GetThreadTEB();83 if(teb)84 {85 return teb->o.odin.lParam;86 }87 88 dprintf(("GetThreadMessageExtraInfo: teb == NULL!!"));89 return 0;90 }91 //******************************************************************************92 //******************************************************************************93 DWORD SetThreadMessageExtraInfo(DWORD lParam)94 {95 TEB *teb;96 97 teb = GetThreadTEB();98 if(teb)99 {100 teb->o.odin.lParam = lParam;101 }102 else dprintf(("SetThreadMessageExtraInfo: teb == NULL!!"));103 return 0;104 } -
trunk/src/user32/win32wbase.cpp
r7525 r7620 1 /* $Id: win32wbase.cpp,v 1.30 4 2001-12-02 12:22:01sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.305 2001-12-12 16:40:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1812 1812 if( wParam == VK_F4 ) /* try to close the window */ 1813 1813 { 1814 HWND top = GetTop Window();1814 HWND top = GetTopParent(); 1815 1815 if (!(GetClassLongW( top, GCL_STYLE ) & CS_NOCLOSE)) 1816 1816 PostMessageW( top, WM_SYSCOMMAND, SC_CLOSE, 0 ); -
trunk/src/user32/windowmsg.cpp
r6848 r7620 1 /* $Id: windowmsg.cpp,v 1.3 0 2001-09-27 10:42:59 phallerExp $ */1 /* $Id: windowmsg.cpp,v 1.31 2001-12-12 16:40:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 143 143 LONG WIN32API GetMessageExtraInfo() 144 144 { 145 dprintf(("USER32: GetMessageExtraInfo "));145 dprintf(("USER32: GetMessageExtraInfo %x", GetThreadMessageExtraInfo())); 146 146 return GetThreadMessageExtraInfo(); 147 } 148 //****************************************************************************** 149 //****************************************************************************** 150 LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam) 151 { 152 dprintf(("USER32: SetMessageExtraInfo %x", lParam)); 153 return SetThreadMessageExtraInfo(lParam); 147 154 } 148 155 //****************************************************************************** … … 350 357 dprintf(("USER32: SendNotifyMessageW, not completely implemented\n")); 351 358 return(SendMessageA(hwnd, Msg, wParam, lParam)); 352 }353 //******************************************************************************354 //******************************************************************************355 LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)356 {357 dprintf(("USER32: SetMessageExtraInfo\n"));358 return SetThreadMessageExtraInfo(lParam);359 359 } 360 360 /***************************************************************************** -
trunk/src/user32/winmouse.cpp
r7028 r7620 1 /* $Id: winmouse.cpp,v 1. 19 2001-10-12 07:05:15 phallerExp $ */1 /* $Id: winmouse.cpp,v 1.20 2001-12-12 16:40:45 sandervl Exp $ */ 2 2 /* 3 3 * Mouse handler for DINPUT … … 340 340 MSG msg; 341 341 BOOL fUnicode = (p->dwFlags & KEYEVENTF_UNICODE) == KEYEVENTF_UNICODE; 342 DWORD extrainfo = GetMessageExtraInfo(); 342 343 343 344 // build keyboard message … … 379 380 // @@@PH 380 381 // unknown: do we have to post or to send the message? 382 383 SetMessageExtraInfo( (LPARAM)p->dwExtraInfo ); 381 384 382 385 if (fUnicode) 383 PostMessageW(hwnd, msg.message, msg.wParam, msg.lParam);386 SendMessageW(hwnd, msg.message, msg.wParam, msg.lParam); 384 387 else 385 PostMessageA(hwnd, msg.message, msg.wParam, msg.lParam); 386 387 SetMessageExtraInfo( (LPARAM)p->dwExtraInfo ); 388 SendMessageA(hwnd, msg.message, msg.wParam, msg.lParam); 389 390 //restore extra info 391 SetMessageExtraInfo(extrainfo); 392 break; 388 393 } 389 break;390 394 391 395 case INPUT_HARDWARE:
Note:
See TracChangeset
for help on using the changeset viewer.