- Timestamp:
- Dec 5, 1999, 1:31:50 AM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r1831 r1971 1 # $Id: Makefile,v 1.4 5 1999-11-24 19:32:21sandervl Exp $1 # $Id: Makefile,v 1.46 1999-12-05 00:31:46 sandervl Exp $ 2 2 3 3 # … … 159 159 160 160 clean: 161 $(RM) *.obj *.lib *.dll *.map *.pch *.res *.lrf resource.asm 161 $(RM) *.obj *.lib *.dll *.map *.pch *.res *.lrf resource.asm *.lrf 162 162 $(RM) $(PDWIN32_BIN)\$(TARGET).dll 163 163 $(RM) $(PDWIN32_LIB)\$(TARGET).lib 164 #$(RM) $(TARGET)exp.def164 $(RM) $(TARGET)exp.def 165 165 -
trunk/src/user32/USER32.DEF
r1818 r1971 1 ; $Id: USER32.DEF,v 1.2 1 1999-11-23 19:34:18sandervl Exp $1 ; $Id: USER32.DEF,v 1.22 1999-12-05 00:31:46 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 10 10 11 11 IMPORTS 12 _WinSetDAXData = PMMERGE.544813 _GpiQueryDCData = PMGPI.66514 _GpiEnableYInversion = PMGPI.72315 _HPSToHDC = PMWINX.102216 _DeleteHDC = PMWINX.102312 _WinSetDAXData = PMMERGE.5448 13 _GpiQueryDCData = PMGPI.665 14 _GpiEnableYInversion = PMGPI.723 15 _HPSToHDC = PMWINX.1022 16 _DeleteHDC = PMWINX.1023 17 17 __DestroyCaret = PMMERGE.10001 18 18 __GetCaretBlinkTime = PMMERGE.10002 … … 20 20 __SetCaretBlinkTime = PMMERGE.10005 21 21 __ShowCaret = PMMERGE.10007 22 WinReplyMsg = PMMERGE.5325 22 23 23 24 EXPORTS -
trunk/src/user32/oslibmsg.cpp
r1855 r1971 1 /* $Id: oslibmsg.cpp,v 1.1 3 1999-11-27 00:10:20sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.14 1999-12-05 00:31:47 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 26 26 #include <thread.h> 27 27 #include <wprocess.h> 28 #include "pmwindow.h" 28 29 29 30 typedef BOOL (EXPENTRY FNTRANS)(MSG *, QMSG *); … … 274 275 //****************************************************************************** 275 276 //****************************************************************************** 277 BOOL OSLibWinInSendMessage() 278 { 279 return WinInSendMsg(GetThreadHAB()); 280 } 281 //****************************************************************************** 282 //****************************************************************************** 283 DWORD OSLibWinGetMessagePos() 284 { 285 APIRET rc; 286 POINTL ptl; 287 288 rc = WinQueryMsgPos(GetThreadHAB(), &ptl); 289 if(!rc) { 290 return 0; 291 } 292 //convert to windows coordinates 293 return MAKEULONG(ptl.x, ScreenHeight - ptl.y - 1); 294 } 295 //****************************************************************************** 296 //****************************************************************************** 297 LONG OSLibWinGetMessageTime() 298 { 299 return (LONG)WinQueryMsgTime(GetThreadHAB()); 300 } 301 //****************************************************************************** 302 //****************************************************************************** 303 BOOL OSLibWinReplyMessage(ULONG result) 304 { 305 return (BOOL)WinReplyMsg( NULLHANDLE, NULLHANDLE, HMQ_CURRENT, (MRESULT)result); 306 } 307 //****************************************************************************** 308 //****************************************************************************** -
trunk/src/user32/oslibmsg.h
r1855 r1971 1 /* $Id: oslibmsg.h,v 1. 5 1999-11-27 00:10:20sandervl Exp $ */1 /* $Id: oslibmsg.h,v 1.6 1999-12-05 00:31:47 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 33 33 BOOL OSLibInitMsgQueue(); 34 34 BOOL OSLibWinWaitMessage(); 35 BOOL OSLibWinInSendMessage(); 36 DWORD OSLibWinGetMessagePos(); 37 LONG OSLibWinGetMessageTime(); 38 BOOL OSLibWinReplyMessage(ULONG result); 35 39 36 40 ULONG OSLibWinQueryQueueStatus(); -
trunk/src/user32/pmframe.cpp
r1922 r1971 1 /* $Id: pmframe.cpp,v 1.2 5 1999-12-01 18:23:28 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.26 1999-12-05 00:31:47 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 321 321 LONG yDelta = pswp->cy - swpOld.cy; 322 322 LONG xDelta = pswp->cx - swpOld.cx; 323 LONG clientHeight; 323 324 324 325 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 326 327 //Save height so WM_WINDOWPOSCHANGED handler in pmwindow.cpp 328 //(for client) doesn't overwrite the client rectangle (breaks ydelta calculation) 329 clientHeight = win32wnd->getWindowHeight(); 325 330 326 331 RestoreOS2TIB(); … … 329 334 330 335 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 331 goto PosChangedEnd;332 333 if(!win32wnd->CanReceiveSizeMsgs())334 336 goto PosChangedEnd; 335 337 … … 345 347 346 348 //delta is difference between old and new client height 347 yDelta = swpOld.cy - win32wnd->getWindowHeight();349 yDelta = swpOld.cy - clientHeight; 348 350 349 351 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 350 352 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 353 354 if(!win32wnd->CanReceiveSizeMsgs()) 355 goto PosChangedEnd; 351 356 352 357 wp.hwnd = win32wnd->getWindowHandle(); … … 385 390 swp[i].fl &= ~(SWP_NOREDRAW); 386 391 } 387 //else child window with the same start coor indates as the client area392 //else child window with the same start coordinates as the client area 388 393 //The app should resize it. 389 394 -
trunk/src/user32/pmwindow.cpp
r1965 r1971 1 /* $Id: pmwindow.cpp,v 1.6 1 1999-12-04 00:04:19sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.62 1999-12-05 00:31:47 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 277 277 break; 278 278 279 #if 0 279 #if 1 280 case WM_ADJUSTWINDOWPOS: 281 { 282 PSWP pswp = (PSWP)mp1; 283 284 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 285 goto RunDefWndProc; 286 } 287 #else 280 288 case WM_ADJUSTWINDOWPOS: 281 289 { … … 331 339 break; 332 340 } 333 341 #endif 342 343 #if 1 334 344 case WM_WINDOWPOSCHANGED: 335 345 { … … 341 351 LONG xDelta = pswp->cx - swpOld.cx; 342 352 343 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));344 345 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;353 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 354 355 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto RunDefWndProc; 346 356 347 357 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { … … 355 365 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, win32wnd->getOS2FrameWindowHandle()); 356 366 357 if (!win32wnd->CanReceiveSizeMsgs()) break;358 359 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);367 if (!win32wnd->CanReceiveSizeMsgs()) goto RunDefWndProc; 368 369 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy)); 360 370 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 361 371 … … 366 376 wp.hwndInsertAfter = wndAfter->getWindowHandle(); 367 377 } 368 369 if (yDelta != 0 || xDelta != 0) 370 { 371 HENUM henum = WinBeginEnumWindows(pswp->hwnd); 372 SWP swp[10]; 373 int i = 0; 374 HWND hwnd; 375 376 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE) 377 { 378 #if 0 379 if (mdiClient ) 380 { 381 continue; 382 } 383 #endif 384 WinQueryWindowPos(hwnd, &(swp[i])); 385 386 #ifdef DEBUG 387 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd); 388 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd, 389 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl)); 390 #endif 391 392 if(swp[i].y != 0) { 393 //child window at offset <> 0 from client area -> offset now changes 394 swp[i].y += yDelta; 395 swp[i].fl &= ~(SWP_NOREDRAW); 396 } 397 //else child window with the same start coorindates as the client area 398 //The app should resize it. 399 400 if (i == 9) 401 { 402 WinSetMultWindowPos(GetThreadHAB(), swp, 10); 403 i = 0; 404 } 405 else 406 { 407 i++; 408 } 409 } 410 411 WinEndEnumWindows(henum); 412 413 if (i) 414 WinSetMultWindowPos(GetThreadHAB(), swp, i); 415 } 416 if (yDelta != 0) 417 { 418 POINT pt; 419 if(GetCaretPos (&pt) == TRUE) 420 { 421 pt.y -= yDelta; 422 SetCaretPos (pt.x, pt.y); 423 } 424 } 378 //SvL: Can be sent twice now (once in pmframe, once here); shouldn't really matter though... 425 379 win32wnd->MsgPosChanged((LPARAM)&wp); 426 380 … … 881 835 dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle())); 882 836 #if 1 883 837 break; 884 838 #else 885 839 … … 971 925 // dprintf(("OS2: RunDefWndProc msg %x for %x", msg, hwnd)); 972 926 RestoreOS2TIB(); 927 973 928 return WinDefWindowProc( hwnd, msg, mp1, mp2 ); 974 929 } /* End of Win32WindowProc */ -
trunk/src/user32/win32wbase.cpp
r1965 r1971 1 /* $Id: win32wbase.cpp,v 1.10 3 1999-12-04 00:04:19sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.104 1999-12-05 00:31:48 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 11 11 * 12 12 * TODO: Not thread/process safe 13 * TODO: Calling window handler directly from SendMessageA/W can cause problems 14 * for GetMessageTime/Pos & InSendMessage 13 15 * 14 16 * Project Odin Software License can be found in LICENSE.TXT … … 716 718 { 717 719 if(SendInternalMessageA(WM_CLOSE, 0, 0) == 0) { 720 dprintf(("Win32BaseWindow::MsgClose, app handles msg")); 718 721 return 0; //app handles this message 719 722 } -
trunk/src/user32/window.cpp
r1949 r1971 1 /* $Id: window.cpp,v 1. 39 1999-12-02 19:30:41sandervl Exp $ */1 /* $Id: window.cpp,v 1.40 1999-12-05 00:31:49 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 1251 1251 POINT wPoint; 1252 1252 1253 1254 1253 wPoint.x = point.x; 1255 1254 wPoint.y = windowDesktop->getWindowHeight() - point.y; -
trunk/src/user32/windowmsg.cpp
r1855 r1971 1 /* $Id: windowmsg.cpp,v 1. 7 1999-11-27 00:10:22sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.8 1999-12-05 00:31:50 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 11 11 * TODO: GetQueueStatus: QS_HOTKEY (oslibmsg.cpp) & low word bits 12 12 * TODO: MsgWaitForMultipleObjects: timeout isn't handled correctly (can return too late) 13 * TODO: GetMessageExtraInfo 13 14 * 14 15 * Project Odin Software License can be found in LICENSE.TXT … … 95 96 } 96 97 //****************************************************************************** 97 //****************************************************************************** 98 LONG WIN32API GetMessageExtraInfo(void) 99 { 100 dprintf(("USER32: GetMessageExtraInfo\n")); 101 return O32_GetMessageExtraInfo(); 98 //TODO: 99 //****************************************************************************** 100 LONG WIN32API GetMessageExtraInfo() 101 { 102 dprintf(("USER32: GetMessageExtraInfo NOT SUPPORTED")); 103 return 0; 102 104 } 103 105 //****************************************************************************** … … 105 107 DWORD WIN32API GetMessagePos(void) 106 108 { 107 dprintf(("USER32: GetMessagePos\n"));108 return O 32_GetMessagePos();109 dprintf(("USER32: GetMessagePos")); 110 return OSLibWinGetMessagePos(); 109 111 } 110 112 //****************************************************************************** … … 112 114 LONG WIN32API GetMessageTime(void) 113 115 { 114 dprintf(("USER32: GetMessageTime\n"));115 return O 32_GetMessageTime();116 dprintf(("USER32: GetMessageTime")); 117 return OSLibWinGetMessageTime(); 116 118 } 117 119 //****************************************************************************** … … 210 212 BOOL WIN32API InSendMessage(void) 211 213 { 212 #ifdef DEBUG 213 WriteLog("USER32: InSendMessage\n"); 214 #endif 215 return O32_InSendMessage(); 216 } 217 //****************************************************************************** 218 //****************************************************************************** 219 //****************************************************************************** 220 BOOL WIN32API ReplyMessage( LRESULT arg1) 221 { 222 #ifdef DEBUG 223 WriteLog("USER32: ReplyMessage\n"); 224 #endif 225 return O32_ReplyMessage(arg1); 214 dprintf(("USER32: InSendMessage")); 215 return OSLibWinInSendMessage(); 216 } 217 //****************************************************************************** 218 //****************************************************************************** 219 //****************************************************************************** 220 BOOL WIN32API ReplyMessage(LRESULT result) 221 { 222 dprintf(("USER32: ReplyMessage %x", result)); 223 return OSLibWinReplyMessage(result); 226 224 } 227 225 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.