- Timestamp:
- Apr 25, 2001, 10:53:39 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r5435 r5586 1 /* $Id: oslibmsgtranslate.cpp,v 1.4 6 2001-04-02 09:52:01sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.47 2001-04-25 20:53:38 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 366 366 winMsg->wParam = 0; 367 367 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 368 if(! win32wnd->IsWindowEnabled()) {368 if(!IsWindowEnabled(win32wnd->getWindowHandle())) { 369 369 if(win32wnd->getParent()) { 370 370 winMsg->hwnd = win32wnd->getParent()->getWindowHandle(); … … 407 407 408 408 //if a window is disabled, it's parent receives the mouse messages 409 if(! win32wnd->IsWindowEnabled()) {409 if(!IsWindowEnabled(win32wnd->getWindowHandle())) { 410 410 if(win32wnd->getParent()) { 411 411 win32wnd = win32wnd->getParent(); … … 492 492 493 493 //if a window is disabled, it's parent receives the mouse messages 494 if(! win32wnd->IsWindowEnabled()) {494 if(!IsWindowEnabled(win32wnd->getWindowHandle())) { 495 495 if(win32wnd->getParent()) { 496 496 win32wnd = win32wnd->getParent(); -
trunk/src/user32/win32wbase.cpp
r5512 r5586 1 /* $Id: win32wbase.cpp,v 1.25 1 2001-04-15 17:05:29sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.252 2001-04-25 20:53:38 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1349 1349 */ 1350 1350 if ( (uFlags & PRF_CHECKVISIBLE) && 1351 !IsWindowVisible( ) )1351 !IsWindowVisible(getWindowHandle()) ) 1352 1352 return 0; 1353 1353 … … 2482 2482 swp.hwnd = OS2Hwnd; 2483 2483 2484 if(fuFlags & SWP_SHOWWINDOW && !IsWindowVisible( )) {2484 if(fuFlags & SWP_SHOWWINDOW && !IsWindowVisible(getWindowHandle())) { 2485 2485 setStyle(getStyle() | WS_VISIBLE); 2486 2486 if(hTaskList) { … … 2490 2490 } 2491 2491 else 2492 if((fuFlags & SWP_HIDEWINDOW) && IsWindowVisible( )) {2492 if((fuFlags & SWP_HIDEWINDOW) && IsWindowVisible(getWindowHandle())) { 2493 2493 setStyle(getStyle() & ~WS_VISIBLE); 2494 2494 if(hTaskList && !(getStyle() & WS_MINIMIZE)) { … … 2697 2697 } 2698 2698 /* Hide the window */ 2699 if(IsWindowVisible( ))2699 if(IsWindowVisible(getWindowHandle())) 2700 2700 { 2701 2701 SetWindowPos(0, 0, 0, 0, 0, SWP_HIDEWINDOW | … … 3253 3253 3254 3254 return OS2ToWin32Handle(hwndActive); 3255 }3256 //******************************************************************************3257 //******************************************************************************3258 BOOL Win32BaseWindow::IsWindowEnabled()3259 {3260 return OSLibWinIsWindowEnabled(OS2Hwnd);3261 }3262 //******************************************************************************3263 //******************************************************************************3264 BOOL Win32BaseWindow::IsWindowVisible()3265 {3266 //TODO: Do we have to check the state of the parent window? (as Wine does)3267 #if 13268 return (dwStyle & WS_VISIBLE) == WS_VISIBLE;3269 #else3270 return OSLibWinIsWindowVisible(OS2Hwnd);3271 #endif3272 3255 } 3273 3256 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r5496 r5586 1 /* $Id: win32wbase.h,v 1.11 3 2001-04-12 14:04:33sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.114 2001-04-25 20:53:39 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 160 160 HWND getWindowHandle() { return Win32Hwnd; }; 161 161 HWND getOS2WindowHandle() { return OS2Hwnd; }; 162 162 163 Win32WndClass *getWindowClass() { return windowClass; }; 163 164 … … 254 255 BOOL IsWindowCreated() { return fCreated; } 255 256 BOOL IsWindowDestroyed() { return fIsDestroyed; }; 256 BOOL IsWindowEnabled();257 BOOL IsWindowVisible();258 257 BOOL IsWindowIconic(); 259 258 //Window procedure type -
trunk/src/user32/window.cpp
r5496 r5586 1 /* $Id: window.cpp,v 1.9 3 2001-04-12 14:04:33sandervl Exp $ */1 /* $Id: window.cpp,v 1.94 2001-04-25 20:53:39 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 653 653 { 654 654 Win32BaseWindow *window; 655 DWORD dwStyle; 655 656 656 657 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 661 662 } 662 663 dprintf(("IsWindowEnabled %x", hwnd)); 663 return window->IsWindowEnabled(); 664 } 665 //****************************************************************************** 666 //****************************************************************************** 667 BOOL WIN32API IsWindowVisible( HWND hwnd) 668 { 669 Win32BaseWindow *window; 670 BOOL rc; 671 672 if (hwnd) 673 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 674 else 675 window = windowDesktop; 664 dwStyle = GetWindowLongA(hwnd, GWL_STYLE); 665 if(dwStyle & WS_DISABLED) { 666 return FALSE; 667 } 668 return TRUE; 669 } 670 //****************************************************************************** 671 //****************************************************************************** 672 BOOL WIN32API IsWindowVisible(HWND hwnd) 673 { 674 Win32BaseWindow *window; 675 BOOL ret; 676 HWND hwndParent; 677 DWORD dwStyle; 678 679 if(!hwnd) {//TODO: verify in NT! 680 dprintf(("IsWindowVisible DESKTOP returned TRUE")); 681 return TRUE; //desktop is always visible 682 } 683 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 684 676 685 if(!window) { 677 686 dprintf(("IsWindowVisible, window %x not found", hwnd)); … … 679 688 return 0; 680 689 } 681 rc = window->IsWindowVisible(); 682 dprintf(("IsWindowVisible %x returned %d", hwnd, rc)); 683 return rc; 684 } 685 //****************************************************************************** 686 //****************************************************************************** 687 HWND WIN32API SetFocus (HWND hwnd) 690 //check visibility of this window 691 dwStyle = GetWindowLongA(hwnd, GWL_STYLE); 692 if(!(dwStyle & WS_VISIBLE)) { 693 ret = FALSE; 694 goto end; 695 } 696 ret = TRUE; 697 698 //check visibility of parents 699 hwndParent = GetParent(hwnd); 700 while(hwndParent) { 701 dwStyle = GetWindowLongA(hwndParent, GWL_STYLE); 702 if(!(dwStyle & WS_VISIBLE)) { 703 dprintf(("IsWindowVisible %x returned FALSE (parent %x invisible)", hwnd, hwndParent)); 704 return FALSE; 705 } 706 hwndParent = GetParent(hwndParent); 707 } 708 709 end: 710 dprintf(("IsWindowVisible %x returned %d", hwnd, ret)); 711 return ret; 712 } 713 //****************************************************************************** 714 //****************************************************************************** 715 HWND WIN32API SetFocus(HWND hwnd) 688 716 { 689 717 HWND lastFocus, lastFocus_W, hwnd_O;
Note:
See TracChangeset
for help on using the changeset viewer.