- Timestamp:
- Apr 20, 2004, 12:11:44 PM (21 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libwrap/makefile
r10584 r10587 1 # $Id: makefile,v 1. 4 2004-04-14 11:04:43sandervl Exp $1 # $Id: makefile,v 1.5 2004-04-20 10:11:17 sandervl Exp $ 2 2 3 3 # … … 1627 1627 $(OBJDIR)\O32_CreatePaletteFromPMHandle.obj \ 1628 1628 $(OBJDIR)\O32_GetPMHandleFromGDIHandle.obj \ 1629 $(OBJDIR)\_WinSetErrorInfo.obj 1629 $(OBJDIR)\_WinSetErrorInfo.obj \ 1630 $(OBJDIR)\_DosVerifyPidTid.obj 1630 1631 1631 1632 … … 3253 3254 O32_GetPMHandleFromGDIHandle.asm 3254 3255 _WinSetErrorInfo.asm 3256 _DosVerifyPidTid.asm 3255 3257 <<KEEP -
trunk/src/user32/gen_object.cpp
r6375 r10587 1 /* $Id: gen_object.cpp,v 1.1 2 2001-07-20 15:34:16sandervl Exp $ */1 /* $Id: gen_object.cpp,v 1.13 2004-04-20 10:11:42 sandervl Exp $ */ 2 2 /* 3 3 * Generic Object Class for OS/2 4 4 * 5 5 * Allocated in shared memory, so other processes can access the objects 6 * 6 * 7 7 * NOTE: Requires safety precautions to use objects in multiple threads or processes 8 8 * … … 22 22 //****************************************************************************** 23 23 //****************************************************************************** 24 GenericObject::GenericObject(GenericObject **head, CRITICAL_SECTION*pLock)24 GenericObject::GenericObject(GenericObject **head, VMutex *pLock) 25 25 { 26 26 this->pLock = pLock; … … 28 28 this->next = NULL; 29 29 refCount = 1; 30 30 31 31 fLinked = FALSE; 32 32 fDeletePending = FALSE; -
trunk/src/user32/gen_object.h
r5950 r10587 1 /* $Id: gen_object.h,v 1. 7 2001-06-10 09:19:57sandervl Exp $ */1 /* $Id: gen_object.h,v 1.8 2004-04-20 10:11:42 sandervl Exp $ */ 2 2 /* 3 3 * Generic Object Class for OS/2 … … 13 13 #include <win32api.h> 14 14 #endif 15 #include <VMutex.h> 15 16 16 17 class GenericObject 17 18 { 18 19 public: 19 GenericObject(GenericObject **head, CRITICAL_SECTION*pLock);20 GenericObject(GenericObject **head, VMutex *pLock); 20 21 virtual ~GenericObject(); 21 22 … … 23 24 GenericObject *GetNext() { return next; }; 24 25 25 void lock() { EnterCriticalSection(pLock); };26 void unlock() { LeaveCriticalSection(pLock); };26 void lock() { pLock->enter(); }; 27 void unlock() { pLock->leave(); }; 27 28 28 29 void link(); … … 39 40 void markDeleted() { fDeletePending = TRUE; }; 40 41 41 static void lock( CRITICAL_SECTION *pLock) { EnterCriticalSection(pLock); };42 static void unlock( CRITICAL_SECTION *pLock) { LeaveCriticalSection(pLock); };42 static void lock(VMutex *pLock) { pLock->enter(); }; 43 static void unlock(VMutex *pLock) { pLock->leave(); }; 43 44 44 45 static void DestroyAll(GenericObject *head); … … 68 69 protected: 69 70 70 CRITICAL_SECTION*pLock;71 VMutex *pLock; 71 72 LONG refCount; 72 73 ULONG fLinked : 1, … … 74 75 75 76 GenericObject **head; 76 GenericObject *next; 77 GenericObject *next; 77 78 }; 78 79 -
trunk/src/user32/win32class.cpp
r9523 r10587 1 /* $Id: win32class.cpp,v 1.3 0 2002-12-18 12:28:06sandervl Exp $ */1 /* $Id: win32class.cpp,v 1.31 2004-04-20 10:11:42 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 16 16 * that can be used by other apps. (low priority) 17 17 * 18 * NOTE: To access a class object, you must call FindClass. This method 19 * increases the reference count of the object. When you're done 18 * NOTE: To access a class object, you must call FindClass. This method 19 * increases the reference count of the object. When you're done 20 20 * with the object, you MUST call the release method! 21 21 * This mechanism prevents premature destruction of objects when there … … 45 45 //Win32WndClass methods: 46 46 //****************************************************************************** 47 Win32WndClass::Win32WndClass(WNDCLASSEXA *wndclass, WNDCLASS_TYPE fClassType) 47 Win32WndClass::Win32WndClass(WNDCLASSEXA *wndclass, WNDCLASS_TYPE fClassType) 48 48 : GenericObject(&wndclasses, &critsect) 49 49 { … … 51 51 processId = 0; 52 52 53 if(HIWORD(wndclass->lpszClassName)) 53 if(HIWORD(wndclass->lpszClassName)) 54 54 { 55 55 if(fClassType == WNDCLASS_UNICODE) { … … 373 373 else proc = (pfnWindowProcA) ? pfnWindowProcA : pfnWindowProcW; 374 374 375 return proc; 375 return proc; 376 376 }; 377 377 //****************************************************************************** … … 452 452 WNDPROC pfnWindowProc = pfnWindowProcA; 453 453 454 if(pfnWindowProcW) 454 if(pfnWindowProcW) 455 455 { 456 if(!pfnWindowProc || fUnicode) 456 if(!pfnWindowProc || fUnicode) 457 457 pfnWindowProc = pfnWindowProcW; 458 458 } … … 551 551 WINDOWPROCTYPE type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A; 552 552 553 if(pfnWindowProcW) 553 if(pfnWindowProcW) 554 554 { 555 if(!*proc || fUnicode) 555 if(!*proc || fUnicode) 556 556 proc = &pfnWindowProcW; 557 557 } … … 645 645 SetLastError(ERROR_CLASS_HAS_WINDOWS); 646 646 return FALSE; 647 } 647 } 648 648 wndclass->markDeleted(); 649 649 RELEASE_CLASSOBJ(wndclass); 650 650 651 651 SetLastError(ERROR_SUCCESS); 652 652 return TRUE; … … 659 659 //****************************************************************************** 660 660 GenericObject *Win32WndClass::wndclasses = NULL; 661 CRITICAL_SECTION Win32WndClass::critsect = {0};661 VMutex Win32WndClass::critsect; -
trunk/src/user32/win32class.h
r9568 r10587 1 /* $Id: win32class.h,v 1.1 7 2002-12-30 15:49:00sandervl Exp $ */1 /* $Id: win32class.h,v 1.18 2004-04-20 10:11:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 112 112 113 113 static GenericObject *wndclasses; 114 static CRITICAL_SECTIONcritsect;114 static VMutex critsect; 115 115 }; 116 116 -
trunk/src/user32/win32wbase.cpp
r10585 r10587 1 /* $Id: win32wbase.cpp,v 1.38 8 2004-04-15 16:18:55sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.389 2004-04-20 10:11:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2476 2476 //SvL: These checks are causing problems in Lotus Notes 6 2477 2477 // It's not entirely clear why, but child windows are not placed 2478 // correctly when enabling them. 2478 // correctly when enabling them. 2479 2479 #if 0 2480 2480 if((rectWindow.right - rectWindow.left == cx) && (rectWindow.bottom - rectWindow.top == cy)) { … … 2668 2668 } 2669 2669 2670 if(!(fuFlags & SWP_NOSIZE)) 2670 if(!(fuFlags & SWP_NOSIZE)) 2671 2671 { 2672 2672 // We must call this function or open DC will get out of sync … … 4274 4274 //****************************************************************************** 4275 4275 GenericObject *Win32BaseWindow::windows = NULL; 4276 CRITICAL_SECTION Win32BaseWindow::critsect = {0};4276 VMutex Win32BaseWindow::critsect; 4277 4277 4278 4278 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r10379 r10587 1 /* $Id: win32wbase.h,v 1.15 7 2004-01-11 12:03:20sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.158 2004-04-20 10:11:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 469 469 470 470 static GenericObject *windows; 471 static CRITICAL_SECTIONcritsect;471 static VMutex critsect; 472 472 473 473 private: -
trunk/src/user32/win32wndchild.cpp
r5935 r10587 1 /* $Id: win32wndchild.cpp,v 1. 7 2001-06-09 14:50:24 sandervl Exp $ */1 /* $Id: win32wndchild.cpp,v 1.8 2004-04-20 10:11:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Child/Parent window class for OS/2 … … 19 19 //****************************************************************************** 20 20 //****************************************************************************** 21 ChildWindow::ChildWindow( CRITICAL_SECTION *pLock)21 ChildWindow::ChildWindow(VMutex *pLock) 22 22 { 23 23 parent = 0; -
trunk/src/user32/win32wndchild.h
r5935 r10587 1 /* $Id: win32wndchild.h,v 1. 6 2001-06-09 14:50:24 sandervl Exp $ */1 /* $Id: win32wndchild.h,v 1.7 2004-04-20 10:11:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Child/Parent window class for OS/2 … … 16 16 #include <win32api.h> 17 17 #endif 18 #include <VMutex.h> 18 19 19 20 #ifdef __cplusplus … … 22 23 { 23 24 public: 24 ChildWindow( CRITICAL_SECTION*pLock);25 ChildWindow(VMutex *pLock); 25 26 virtual ~ChildWindow(); 26 27 … … 37 38 parent = newParent; 38 39 return oldparent; 39 } 40 } 40 41 41 42 BOOL addChild(ChildWindow *child); … … 47 48 48 49 private: 49 void Lock() { EnterCriticalSection(pLockChild); };50 void Unlock() { LeaveCriticalSection(pLockChild); };51 52 CRITICAL_SECTION*pLockChild;50 void Lock() { pLockChild->enter(); }; 51 void Unlock() { pLockChild->leave(); }; 52 53 VMutex *pLockChild; 53 54 54 55 ChildWindow *parent; //GWL_HWNDPARENT
Note:
See TracChangeset
for help on using the changeset viewer.