- Timestamp:
- Jul 18, 1999, 8:04:30 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibwin.cpp
r330 r332 1 /* $Id: oslibwin.cpp,v 1.1 4 1999-07-18 17:12:02sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.15 1999-07-18 18:04:29 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 372 372 //****************************************************************************** 373 373 //****************************************************************************** 374 HWND OSLibWinWindowFromPoint(HWND hwnd, PVOID ppoint) 375 { 376 return WinWindowFromPoint((hwnd == OSLIB_HWND_DESKTOP) ? HWND_DESKTOP : hwnd, (PPOINTL)ppoint, TRUE); 377 } 378 //****************************************************************************** 379 //****************************************************************************** 380 BOOL OSLibWinMinimizeWindow(HWND hwnd) 381 { 382 return WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_MINIMIZE); 383 } 384 //****************************************************************************** 385 //****************************************************************************** 386 -
trunk/src/user32/new/oslibwin.h
r330 r332 1 /* $Id: oslibwin.h,v 1.1 3 1999-07-18 17:12:02sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.14 1999-07-18 18:04:29 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 215 215 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz); 216 216 BOOL OSLibWinFlashWindow(HWND hwnd, BOOL fFlash); 217 HWND OSLibWinWindowFromPoint(HWND hwnd, PVOID ppoint); 218 BOOL OSLibWinMinimizeWindow(HWND hwnd); 217 219 218 220 #endif //__OSLIBWIN_H__ -
trunk/src/user32/new/win32wnd.cpp
r329 r332 1 /* $Id: win32wnd.cpp,v 1.1 2 1999-07-18 14:56:37sandervl Exp $ */1 /* $Id: win32wnd.cpp,v 1.13 1999-07-18 18:04:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 1286 1286 //****************************************************************************** 1287 1287 //****************************************************************************** 1288 BOOL Win32Window::CloseWindow() 1289 { 1290 return OSLibWinMinimizeWindow(OS2Hwnd); 1291 } 1292 //****************************************************************************** 1293 //****************************************************************************** 1288 1294 BOOL Win32Window::BringWindowToTop() 1289 1295 { -
trunk/src/user32/new/win32wnd.h
r330 r332 1 /* $Id: win32wnd.h,v 1.1 2 1999-07-18 17:12:03sandervl Exp $ */1 /* $Id: win32wnd.h,v 1.13 1999-07-18 18:04:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 102 102 HWND GetWindow(UINT uCmd); 103 103 BOOL EnableWindow(BOOL fEnable); 104 BOOL CloseWindow(); 104 105 BOOL BringWindowToTop(); 105 106 static HWND GetActiveWindow(); … … 107 108 BOOL IsWindowEnabled(); 108 109 BOOL IsWindowVisible(); 110 BOOL IsUnicode() { return isUnicode; }; 109 111 110 112 BOOL GetWindowRect(PRECT pRect); -
trunk/src/user32/new/winaccel.cpp
r331 r332 1 /* $Id: winaccel.cpp,v 1. 1 1999-07-18 17:12:52sandervl Exp $ */1 /* $Id: winaccel.cpp,v 1.2 1999-07-18 18:04:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 accelartor key functions for OS/2 … … 21 21 //get hab, translate 22 22 //SvL: OS/2 automatically translates accelerator keys 23 return TRUE;23 return FALSE; 24 24 } 25 25 //****************************************************************************** … … 28 28 { 29 29 //SvL: OS/2 automatically translates accelerator keys 30 return TRUE;30 return FALSE; 31 31 } 32 32 //****************************************************************************** … … 35 35 { 36 36 //SvL: OS/2 automatically translates accelerator keys 37 return TRUE;37 return FALSE; 38 38 } 39 39 //****************************************************************************** -
trunk/src/user32/new/window.cpp
r331 r332 1 /* $Id: window.cpp,v 1. 6 1999-07-18 17:12:03sandervl Exp $ */1 /* $Id: window.cpp,v 1.7 1999-07-18 18:04:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 118 118 //****************************************************************************** 119 119 //****************************************************************************** 120 HWND WIN32API CreateWindowExW(DWORD arg1, 121 LPCWSTR arg2, 122 LPCWSTR arg3, 123 DWORD dwStyle, 124 int arg5, 125 int arg6, 126 int arg7, 127 int arg8, 128 HWND arg9, 129 HMENU arg10, 130 HINSTANCE arg11, 131 PVOID arg12) 132 { 133 HWND hwnd; 134 char *astring1 = NULL, 135 *astring2 = NULL; 136 137 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */ 138 if(HIWORD(arg2) != 0) 139 astring1 = UnicodeToAsciiString((LPWSTR)arg2); 140 else 141 astring1 = (char *)arg2; 142 143 astring2 = UnicodeToAsciiString((LPWSTR)arg3); 144 145 #ifdef DEBUG 146 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1); 147 if((int)arg2 >> 16 != 0) 148 WriteLog("USER32: CreateWindow: classname = %s\n", astring1); 149 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2); 150 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2); 151 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle); 152 WriteLog("USER32: CreateWindow: x = %d\n", arg5); 153 WriteLog("USER32: CreateWindow: y = %d\n", arg6); 154 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7); 155 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8); 156 WriteLog("USER32: CreateWindow: parent = %X\n", arg9); 157 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10); 158 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11); 159 WriteLog("USER32: CreateWindow: param = %X\n", arg12); 160 #endif 161 162 hwnd = CreateWindowExA(arg1, 163 astring1, 164 astring2, 165 dwStyle, 166 arg5, 167 arg6, 168 arg7, 169 arg8, 170 arg9, 171 arg10, 172 arg11, 173 arg12); 174 175 if(HIWORD(arg1) != 0) 176 FreeAsciiString(astring1); 177 178 FreeAsciiString(astring2); 179 180 #ifdef DEBUG 181 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError()); 182 #endif 183 return(hwnd); 120 HWND WIN32API CreateWindowExW(DWORD exStyle, LPCWSTR className, 121 LPCWSTR windowName, DWORD style, INT x, 122 INT y, INT width, INT height, 123 HWND parent, HMENU menu, 124 HINSTANCE instance, LPVOID data ) 125 { 126 Win32Window *window; 127 ATOM classAtom; 128 CREATESTRUCTA cs; 129 130 if(exStyle & WS_EX_MDICHILD) 131 return CreateMDIWindowW(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); 132 133 /* Find the class atom */ 134 if (!(classAtom = GlobalFindAtomW(className))) 135 { 136 dprintf(("CreateWindowEx32A: bad class name ")); 137 if (!HIWORD(className)) { 138 dprintf(("CreateWindowEx32A: bad class name %04x\n", LOWORD(className))); 139 } 140 // else dprintf(("CreateWindowEx32A: bad class name '%s'\n", className )); 141 SetLastError(ERROR_INVALID_PARAMETER); 142 return 0; 143 } 144 145 /* Create the window */ 146 cs.lpCreateParams = data; 147 cs.hInstance = instance; 148 cs.hMenu = menu; 149 cs.hwndParent = parent; 150 cs.x = x; 151 cs.y = y; 152 cs.cx = width; 153 cs.cy = height; 154 cs.style = style; 155 cs.lpszName = (LPSTR)windowName; 156 cs.lpszClass = (LPSTR)className; 157 cs.dwExStyle = exStyle; 158 window = new Win32Window( &cs, classAtom, TRUE ); 159 if(window == NULL) 160 { 161 dprintf(("Win32Window creation failed!!")); 162 return 0; 163 } 164 if(GetLastError() != 0) 165 { 166 dprintf(("Win32Window error found!!")); 167 delete window; 168 return 0; 169 } 170 return window->getWindowHandle(); 184 171 } 185 172 //****************************************************************************** … … 191 178 window = Win32Window::GetWindowFromHandle(hwnd); 192 179 if(!window) { 193 dprintf(("DestroyWindow, window %x not found", hwnd));194 return 0;180 dprintf(("DestroyWindow, window %x not found", hwnd)); 181 return 0; 195 182 } 196 183 dprintf(("DestroyWindow %x", hwnd)); … … 205 192 window = Win32Window::GetWindowFromHandle(hwnd); 206 193 if(!window) { 207 dprintf(("SetActiveWindow, window %x not found", hwnd));208 return 0;194 dprintf(("SetActiveWindow, window %x not found", hwnd)); 195 return 0; 209 196 } 210 197 dprintf(("SetActiveWindow %x", hwnd)); … … 219 206 window = Win32Window::GetWindowFromHandle(hwnd); 220 207 if(!window) { 221 dprintf(("GetParent, window %x not found", hwnd));222 return 0;208 dprintf(("GetParent, window %x not found", hwnd)); 209 return 0; 223 210 } 224 211 dprintf(("GetParent %x", hwnd)); … … 233 220 window = Win32Window::GetWindowFromHandle(hwndChild); 234 221 if(!window) { 235 dprintf(("SetParent, window %x not found", hwndChild));236 return 0;222 dprintf(("SetParent, window %x not found", hwndChild)); 223 return 0; 237 224 } 238 225 dprintf(("SetParent %x %x", hwndChild, hwndNewParent)); … … 247 234 window = Win32Window::GetWindowFromHandle(hwnd); 248 235 if(!window) { 249 dprintf(("IsChild, window %x not found", hwnd));250 return 0;236 dprintf(("IsChild, window %x not found", hwnd)); 237 return 0; 251 238 } 252 239 dprintf(("IsChild %x %x", hwndParent, hwnd)); … … 261 248 window = Win32Window::GetWindowFromHandle(hwnd); 262 249 if(!window) { 263 264 250 dprintf(("GetTopWindow, window %x not found", hwnd)); 251 return 0; 265 252 } 266 253 dprintf(("GetTopWindow %x", hwnd)); … … 275 262 window = Win32Window::GetWindowFromHandle(hwnd); 276 263 if(!window) { 277 278 264 dprintf(("UpdateWindow, window %x not found", hwnd)); 265 return 0; 279 266 } 280 267 dprintf(("UpdateWindow %x", hwnd)); … … 289 276 window = Win32Window::GetWindowFromHandle(hwnd); 290 277 if(!window) { 291 292 278 dprintf(("IsIconic, window %x not found", hwnd)); 279 return 0; 293 280 } 294 281 dprintf(("IsIconic %x", hwnd)); … … 303 290 window = Win32Window::GetWindowFromHandle(hwnd); 304 291 if(!window) { 305 306 292 dprintf(("GetWindow, window %x not found", hwnd)); 293 return 0; 307 294 } 308 295 dprintf(("GetWindow %x %d", hwnd, uCmd)); … … 326 313 window = Win32Window::GetWindowFromHandle(hwnd); 327 314 if(!window) { 328 329 315 dprintf(("EnableWindow, window %x not found", hwnd)); 316 return 0; 330 317 } 331 318 dprintf(("EnableWindow %x %d", hwnd, fEnable)); … … 340 327 window = Win32Window::GetWindowFromHandle(hwnd); 341 328 if(!window) { 342 343 329 dprintf(("BringWindowToTop, window %x not found", hwnd)); 330 return 0; 344 331 } 345 332 dprintf(("BringWindowToTop %x", hwnd)); … … 360 347 window = Win32Window::GetWindowFromHandle(hwnd); 361 348 if(!window) { 362 363 349 dprintf(("ShowWindow, window %x not found", hwnd)); 350 return 0; 364 351 } 365 352 dprintf(("ShowWindow %x", hwnd)); … … 374 361 window = Win32Window::GetWindowFromHandle(hwnd); 375 362 if(!window) { 376 377 363 dprintf(("SetWindowPos, window %x not found", hwnd)); 364 return 0; 378 365 } 379 366 dprintf(("SetWindowPos %x %x x=%d y=%d cx=%d cy=%d %x", hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags)); … … 395 382 window = Win32Window::GetWindowFromHandle(hwnd); 396 383 if(!window) { 397 398 384 dprintf(("IsWindow, window %x not found", hwnd)); 385 return FALSE; 399 386 } 400 387 dprintf(("IsWindow %x", hwnd)); … … 409 396 window = Win32Window::GetWindowFromHandle(hwnd); 410 397 if(!window) { 411 412 398 dprintf(("IsWindowEnabled, window %x not found", hwnd)); 399 return 0; 413 400 } 414 401 dprintf(("IsWindowEnabled %x", hwnd)); … … 423 410 window = Win32Window::GetWindowFromHandle(hwnd); 424 411 if(!window) { 425 426 412 dprintf(("IsWindowVisible, window %x not found", hwnd)); 413 return 0; 427 414 } 428 415 dprintf(("IsWindowVisible %x", hwnd)); … … 469 456 if (O32_GetWindowPlacement( hwnd, &wndpl )) 470 457 { 471 472 473 458 if (rectWnd) *rectWnd = wndpl.rcNormalPosition; 459 if (ptIcon) *ptIcon = wndpl.ptMinPosition; 460 return wndpl.showCmd; 474 461 } 475 462 return 0; … … 516 503 window = Win32Window::GetWindowFromHandle(hwnd); 517 504 if(!window) { 518 519 505 dprintf(("GetWindowRect, window %x not found", hwnd)); 506 return 0; 520 507 } 521 508 dprintf(("GetWindowRect %x", hwnd)); … … 530 517 window = Win32Window::GetWindowFromHandle(hwnd); 531 518 if(!window) { 532 533 519 dprintf(("GetWindowTextLength, window %x not found", hwnd)); 520 return 0; 534 521 } 535 522 dprintf(("GetWindowTextLength %x", hwnd)); … … 544 531 window = Win32Window::GetWindowFromHandle(hwnd); 545 532 if(!window) { 546 547 533 dprintf(("GetWindowTextA, window %x not found", hwnd)); 534 return 0; 548 535 } 549 536 dprintf(("GetWindowTextA %x", hwnd)); … … 558 545 window = Win32Window::GetWindowFromHandle(hwnd); 559 546 if(!window) { 560 561 547 dprintf(("SetWindowTextA, window %x not found", hwnd)); 548 return 0; 562 549 } 563 550 dprintf(("SetWindowTextA %x %s", hwnd, lpsz)); … … 716 703 //****************************************************************************** 717 704 //****************************************************************************** 718 BOOL WIN32API CloseWindow( HWND arg1) 719 { 720 #ifdef DEBUG 721 WriteLog("USER32: CloseWindow\n"); 722 #endif 723 return O32_CloseWindow(arg1); 724 } 725 //****************************************************************************** 726 //****************************************************************************** 727 HWND WIN32API WindowFromDC( HDC arg1) 705 BOOL WIN32API CloseWindow(HWND hwnd) 706 { 707 Win32Window *window; 708 709 window = Win32Window::GetWindowFromHandle(hwnd); 710 if(!window) { 711 dprintf(("CloseWindow, window %x not found", hwnd)); 712 return 0; 713 } 714 dprintf(("CloseWindow %x\n", hwnd)); 715 return window->CloseWindow(); 716 } 717 //****************************************************************************** 718 //****************************************************************************** 719 HWND WIN32API WindowFromDC(HDC hdc) 728 720 { 729 721 #ifdef DEBUG 730 722 WriteLog("USER32: WindowFromDC\n"); 731 723 #endif 732 return O32_WindowFromDC(arg1); 733 } 734 //****************************************************************************** 735 //****************************************************************************** 736 HWND WIN32API WindowFromPoint( POINT arg1) 737 { 738 #ifdef DEBUG 739 WriteLog("USER32: WindowFromPoint\n"); 740 #endif 741 return O32_WindowFromPoint(arg1); 724 return O32_WindowFromDC(hdc); 725 } 726 //****************************************************************************** 727 //TODO: Does this return handles of hidden or disabled windows? 728 //****************************************************************************** 729 HWND WIN32API WindowFromPoint( POINT point) 730 { 731 HWND hwnd; 732 733 dprintf(("WindowFromPoint (%d,%d)\n", point.x, point.y)); 734 hwnd = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&point); 735 if(hwnd) { 736 return Win32Window::OS2ToWin32Handle(hwnd); 737 } 738 return 0; 742 739 } 743 740 //****************************************************************************** … … 745 742 BOOL WIN32API IsWindowUnicode(HWND hwnd) 746 743 { 747 #ifdef DEBUG 748 WriteLog("USER32: IsWindowUnicode, not implemented\n"); 749 #endif 750 return(FALSE); 744 Win32Window *window; 745 746 window = Win32Window::GetWindowFromHandle(hwnd); 747 if(!window) { 748 dprintf(("IsWindowUnicode, window %x not found", hwnd)); 749 return 0; 750 } 751 return window->IsUnicode(); 751 752 } 752 753 /***************************************************************************** … … 863 864 //****************************************************************************** 864 865 //****************************************************************************** 865 BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)866 {867 #ifdef DEBUG868 WriteLog("USER32: EnableScrollBar\n");869 #endif870 //CB: implement in window class871 return O32_EnableScrollBar(arg1, arg2, arg3);872 }873 //******************************************************************************874 //******************************************************************************875 866 UINT WIN32API ArrangeIconicWindows( HWND arg1) 876 867 { -
trunk/src/user32/new/winscrollbar.cpp
r331 r332 1 /* $Id: winscrollbar.cpp,v 1. 1 1999-07-18 17:12:04sandervl Exp $ */1 /* $Id: winscrollbar.cpp,v 1.2 1999-07-18 18:04:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 scrollbar functions for OS/2 … … 12 12 #include <misc.h> 13 13 14 //****************************************************************************** 15 //****************************************************************************** 16 BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3) 17 { 18 #ifdef DEBUG 19 WriteLog("USER32: EnableScrollBar\n"); 20 #endif 21 //CB: implement in window class 22 return O32_EnableScrollBar(arg1, arg2, arg3); 23 } 14 24 //****************************************************************************** 15 25 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.