- Timestamp:
- Jul 18, 1999, 7:12:03 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/makefile
r325 r330 1 # $Id: makefile,v 1. 8 1999-07-18 10:39:50sandervl Exp $1 # $Id: makefile,v 1.9 1999-07-18 17:12:02 sandervl Exp $ 2 2 3 3 # … … 30 30 windowword.obj gen_object.obj oslibwin.obj win32wndchild.obj \ 31 31 controls.obj button.obj oslibutil.obj oslibmsg.obj windlg.obj \ 32 winprop.obj wingdi.obj oslibgdi.obj 32 winprop.obj wingdi.obj oslibgdi.obj winacc.obj winscrollbar.obj 33 33 34 34 … … 80 80 windowclass.obj: windowclass.cpp win32class.h win32wnd.h win32wndchild.h 81 81 windowword.obj: windowword.cpp win32class.h win32wnd.h win32dlg.h win32wndchild.h 82 winacc.obj: winacc.cpp 83 winscrollbar.obj: winscrollbar.cpp 82 84 83 85 pmwindow.obj: pmwindow.cpp win32class.h win32wnd.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h -
trunk/src/user32/new/oslibwin.cpp
r329 r330 1 /* $Id: oslibwin.cpp,v 1.1 3 1999-07-18 14:56:36sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.14 1999-07-18 17:12:02 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 366 366 //****************************************************************************** 367 367 //****************************************************************************** 368 BOOL OSLibWinFlashWindow(HWND hwnd, BOOL fFlash) 369 { 370 return WinFlashWindow(hwnd, fFlash); 371 } 372 //****************************************************************************** 373 //****************************************************************************** -
trunk/src/user32/new/oslibwin.h
r329 r330 1 /* $Id: oslibwin.h,v 1.1 2 1999-07-18 14:56:36sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.13 1999-07-18 17:12:02 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 214 214 LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz); 215 215 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz); 216 BOOL OSLibWinFlashWindow(HWND hwnd, BOOL fFlash); 216 217 217 218 #endif //__OSLIBWIN_H__ -
trunk/src/user32/new/user32.cpp
r329 r330 1 /* $Id: user32.cpp,v 1. 7 1999-07-18 14:56:36sandervl Exp $ */1 /* $Id: user32.cpp,v 1.8 1999-07-18 17:12:02 sandervl Exp $ */ 2 2 3 3 /* … … 77 77 // WIN32API YieldTask 78 78 79 //Window handle transformation80 81 inline HWND Win32ToOS2Handle(HWND hwnd)82 {83 Win32Window *window;84 85 window = Win32Window::GetWindowFromHandle(hwnd);86 if (window) return window->getOS2WindowHandle();87 else return hwnd; //already OS/2 handle?88 }89 90 inline HWND OS2ToWin32Handle(HWND hwnd)91 {92 Win32Window *window;93 94 window = Win32Window::GetWindowFromOS2Handle(hwnd);95 if (window) return window->getWindowHandle();96 else return hwnd; //OS/2 window97 }98 99 79 //Coordinate transformation 100 80 … … 272 252 //****************************************************************************** 273 253 274 /*******************************************************************275 * InternalGetWindowText (USER32.326)276 */277 int WIN32API InternalGetWindowText(HWND hwnd,278 LPWSTR lpString,279 INT nMaxCount )280 {281 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",282 hwnd,283 lpString,284 nMaxCount));285 286 return GetWindowTextW(hwnd,lpString,nMaxCount);287 }288 //******************************************************************************289 //******************************************************************************290 HWND WIN32API GetFocus(void)291 {292 HWND hwnd;293 // dprintf(("USER32: GetFocus\n"));294 295 hwnd = OSLibWinQueryFocus(OSLIB_HWND_DESKTOP);296 return OS2ToWin32Handle(hwnd);297 }298 //******************************************************************************299 //******************************************************************************300 HWND WIN32API GetDesktopWindow(void)301 {302 dprintf(("USER32: GetDesktopWindow\n"));303 return OSLIB_HWND_DESKTOP;304 }305 //******************************************************************************306 //******************************************************************************307 BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)308 {309 BOOL rc;310 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);311 312 dprintf(("USER32: EnumThreadWindows\n"));313 //CB: replace314 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);315 if(callback)316 delete callback;317 return(rc);318 }319 254 //****************************************************************************** 320 255 //****************************************************************************** … … 347 282 //****************************************************************************** 348 283 //****************************************************************************** 349 HWND WIN32API SetFocus( HWND hwnd)350 {351 HWND lastFocus;352 353 dprintf(("USER32: SetFocus\n"));354 355 lastFocus = GetFocus();356 hwnd = Win32ToOS2Handle(hwnd);357 return (OSLibWinSetFocus(OSLIB_HWND_DESKTOP,hwnd)) ? lastFocus:0;358 }359 //******************************************************************************360 //******************************************************************************361 284 BOOL WIN32API InvalidateRect(HWND hWnd, const RECT *lpRect, BOOL bErase) 362 285 { … … 368 291 369 292 //CB: bErase no quite the same 370 hWnd = Win32 ToOS2Handle(hWnd);293 hWnd = Win32Window::Win32ToOS2Handle(hWnd); 371 294 if (lpRect) 372 295 { … … 378 301 return OSLibWinInvalidateRect(hWnd,&rect,bErase); //rect == RECTL 379 302 } else return OSLibWinInvalidateRect(hWnd,NULL,bErase); 380 }381 //******************************************************************************382 //******************************************************************************383 BOOL WIN32API GetUpdateRect( HWND hWnd, PRECT lpRect, BOOL bErase)384 {385 ULONG windowH;386 BOOL rc;387 388 #ifdef DEBUG389 WriteLog("USER32: GetUpdateRect\n");390 #endif391 if (!lpRect) return FALSE;392 393 hWnd = Win32ToOS2Handle(hWnd);394 return OSLibWinQueryUpdateRect(hWnd, (PVOID)&lpRect);395 303 } 396 304 //****************************************************************************** … … 515 423 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n"); 516 424 #endif 517 hwnd = Win32 ToOS2Handle(hwnd);425 hwnd = Win32Window::Win32ToOS2Handle(hwnd); 518 426 //SvL: Write callback handler class for this one 519 427 //CB: replace … … 527 435 WriteLog("USER32: KillTimer\n"); 528 436 #endif 529 hWnd = Win32 ToOS2Handle(hWnd);437 hWnd = Win32Window::Win32ToOS2Handle(hWnd); 530 438 //WinStopTimer 531 439 //CB: replace … … 595 503 WriteLog("USER32: WinHelp not implemented %s\n", lpszHelp); 596 504 #endif 597 // hwnd = Win32 ToOS2Handle(hwnd);505 // hwnd = Win32Window::Win32ToOS2Handle(hwnd); 598 506 // return O32_WinHelp(arg1, arg2, arg3, arg4); 599 507 600 508 return(TRUE); 601 }602 //******************************************************************************603 //******************************************************************************604 int WIN32API TranslateAcceleratorA(HWND hwnd, HACCEL haccel, LPMSG lpmsg)605 {606 #ifdef DEBUG607 //// WriteLog("USER32: TranslateAccelerator\n");608 #endif609 //CB: needs more work610 //WinTranslateAccel();611 //get hab, translate612 hwnd = Win32ToOS2Handle(hwnd);613 return O32_TranslateAccelerator(hwnd,haccel,lpmsg);614 509 } 615 510 //****************************************************************************** … … 713 608 //****************************************************************************** 714 609 //****************************************************************************** 715 BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)716 {717 #ifdef DEBUG718 WriteLog("USER32: EnableScrollBar\n");719 #endif720 //CB: implement in window class721 return O32_EnableScrollBar(arg1, arg2, arg3);722 }723 //******************************************************************************724 //******************************************************************************725 610 HWND WIN32API SetCapture( HWND arg1) 726 611 { … … 756 641 #endif 757 642 return O32_ChangeClipboardChain(arg1, arg2); 758 }759 //******************************************************************************760 //******************************************************************************761 UINT WIN32API ArrangeIconicWindows( HWND arg1)762 {763 #ifdef DEBUG764 WriteLog("USER32: ArrangeIconicWindows\n");765 #endif766 return O32_ArrangeIconicWindows(arg1);767 643 } 768 644 //****************************************************************************** … … 810 686 //****************************************************************************** 811 687 //****************************************************************************** 812 HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)813 {814 #ifdef DEBUG815 WriteLog("USER32: CreateAcceleratorTableA\n");816 #endif817 return O32_CreateAcceleratorTable(arg1, arg2);818 }819 //******************************************************************************820 //******************************************************************************821 HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)822 {823 #ifdef DEBUG824 WriteLog("USER32: CreateAcceleratorTableW\n");825 #endif826 // NOTE: This will not work as is (needs UNICODE support)827 return O32_CreateAcceleratorTable(arg1, arg2);828 }829 //******************************************************************************830 //******************************************************************************831 688 BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4) 832 689 { … … 898 755 //****************************************************************************** 899 756 //****************************************************************************** 900 BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)901 {902 #ifdef DEBUG903 WriteLog("USER32: DestroyAcceleratorTable\n");904 #endif905 return O32_DestroyAcceleratorTable(arg1);906 }907 //******************************************************************************908 //******************************************************************************909 757 BOOL WIN32API DestroyCaret(void) 910 758 { … … 1229 1077 #endif 1230 1078 return O32_GetQueueStatus(arg1); 1231 }1232 //******************************************************************************1233 //******************************************************************************1234 int WIN32API GetScrollPos(HWND hwnd, int fnBar)1235 {1236 int pos;1237 1238 pos = O32_GetScrollPos(hwnd, fnBar);1239 #ifdef DEBUG1240 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);1241 #endif1242 return(pos);1243 }1244 //******************************************************************************1245 //******************************************************************************1246 BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)1247 {1248 #ifdef DEBUG1249 WriteLog("USER32: GetScrollRange\n");1250 #endif1251 return O32_GetScrollRange(arg1, arg2, arg3, arg4);1252 1079 } 1253 1080 //****************************************************************************** … … 1485 1312 //****************************************************************************** 1486 1313 //****************************************************************************** 1487 BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)1488 {1489 #ifdef DEBUG1490 WriteLog("USER32: ScrollWindow\n");1491 #endif1492 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);1493 }1494 //******************************************************************************1495 //******************************************************************************1496 BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)1497 {1498 #ifdef DEBUG1499 WriteLog("USER32: ScrollWindowEx\n");1500 #endif1501 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);1502 }1503 //******************************************************************************1504 //******************************************************************************1505 1314 BOOL WIN32API SetCaretBlinkTime( UINT arg1) 1506 1315 { … … 1551 1360 //****************************************************************************** 1552 1361 //****************************************************************************** 1553 int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)1554 {1555 #ifdef DEBUG1556 WriteLog("USER32: SetScrollPos\n");1557 #endif1558 return O32_SetScrollPos(arg1, arg2, arg3, arg4);1559 }1560 //******************************************************************************1561 //******************************************************************************1562 BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)1563 {1564 #ifdef DEBUG1565 WriteLog("USER32: SetScrollRange\n");1566 #endif1567 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);1568 }1569 //******************************************************************************1570 //******************************************************************************1571 BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)1572 {1573 dprintf(("USER32: SetWindowPlacement\n"));1574 return O32_SetWindowPlacement(arg1, arg2);1575 }1576 //******************************************************************************1577 //******************************************************************************1578 1362 BOOL WIN32API ShowCaret( HWND arg1) 1579 1363 { 1580 1364 dprintf(("USER32: ShowCaret\n")); 1581 1365 return O32_ShowCaret(arg1); 1582 }1583 //******************************************************************************1584 //******************************************************************************1585 BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)1586 {1587 dprintf(("USER32: ShowOwnedPopups\n"));1588 return O32_ShowOwnedPopups(arg1, arg2);1589 }1590 //******************************************************************************1591 //******************************************************************************1592 BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)1593 {1594 #ifdef DEBUG1595 WriteLog("USER32: ShowScrollBar\n");1596 #endif1597 return O32_ShowScrollBar(arg1, arg2, arg3);1598 1366 } 1599 1367 //****************************************************************************** … … 1749 1517 //****************************************************************************** 1750 1518 //****************************************************************************** 1751 int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)1752 {1753 #ifdef DEBUG1754 WriteLog("USER32: TranslateAccelerator\n");1755 #endif1756 return O32_TranslateAccelerator(arg1, arg2, arg3);1757 }1758 //******************************************************************************1759 //******************************************************************************1760 int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)1761 {1762 #ifdef DEBUG1763 WriteLog("USER32: TranslateAcceleratorW\n");1764 #endif1765 // NOTE: This will not work as is (needs UNICODE support)1766 return O32_TranslateAccelerator(arg1, arg2, arg3);1767 }1768 //******************************************************************************1769 //******************************************************************************1770 BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)1771 {1772 #ifdef DEBUG1773 //// WriteLog("USER32: TranslateMDISysAccel\n");1774 #endif1775 return O32_TranslateMDISysAccel(arg1, arg2);1776 }1777 //******************************************************************************1778 //******************************************************************************1779 1519 BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3) 1780 1520 { … … 1859 1599 //****************************************************************************** 1860 1600 //TODO: Not complete 1861 //******************************************************************************1862 BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)1863 {1864 #ifdef DEBUG1865 WriteLog("USER32: GetScrollInfo\n");1866 #endif1867 if(lpsi == NULL)1868 return(FALSE);1869 1870 if(lpsi->fMask & SIF_POS)1871 lpsi->nPos = GetScrollPos(hwnd, fnBar);1872 if(lpsi->fMask & SIF_RANGE)1873 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);1874 if(lpsi->fMask & SIF_PAGE) {1875 #ifdef DEBUG1876 WriteLog("USER32: GetScrollInfo, page info not implemented\n");1877 #endif1878 lpsi->nPage = 25;1879 }1880 return(TRUE);1881 }1882 //******************************************************************************1883 //TODO: Not complete1884 //******************************************************************************1885 INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)1886 {1887 int smin, smax;1888 1889 #ifdef DEBUG1890 WriteLog("USER32: SetScrollInfo\n");1891 #endif1892 if(lpsi == NULL)1893 return(FALSE);1894 1895 if(lpsi->fMask & SIF_POS)1896 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);1897 if(lpsi->fMask & SIF_RANGE)1898 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);1899 if(lpsi->fMask & SIF_PAGE) {1900 #ifdef DEBUG1901 WriteLog("USER32: GetScrollInfo, page info not implemented\n");1902 #endif1903 }1904 if(lpsi->fMask & SIF_DISABLENOSCROLL) {1905 #ifdef DEBUG1906 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");1907 #endif1908 }1909 return(TRUE);1910 }1911 //******************************************************************************1912 1601 //****************************************************************************** 1913 1602 BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc, … … 1974 1663 //TODO: 1975 1664 //****************************************************************************** 1976 int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,1977 int cAccelEntries)1978 {1979 #ifdef DEBUG1980 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");1981 #endif1982 return(0);1983 }1984 //******************************************************************************1985 //TODO:1986 //******************************************************************************1987 int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,1988 int cAccelEntries)1989 {1990 #ifdef DEBUG1991 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");1992 #endif1993 return(0);1994 }1995 //******************************************************************************1996 //******************************************************************************1997 1665 HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags) 1998 1666 { … … 2135 1803 #endif 2136 1804 return(0); 2137 }2138 //******************************************************************************2139 //restores iconized window to previous size/position2140 //******************************************************************************2141 BOOL WIN32API OpenIcon(HWND hwnd)2142 {2143 #ifdef DEBUG2144 WriteLog("USER32: OpenIcon\n");2145 #endif2146 if(!IsIconic(hwnd))2147 return FALSE;2148 ShowWindow(hwnd, SW_SHOWNORMAL);2149 return TRUE;2150 1805 } 2151 1806 //****************************************************************************** … … 2273 1928 return (FALSE); 2274 1929 } 2275 2276 2277 /*****************************************************************************2278 * Name : long WIN32API BroadcastSystemMessage2279 * Purpose : The BroadcastSystemMessage function sends a message to the given2280 * recipients. The recipients can be applications, installable2281 * drivers, Windows-based network drivers, system-level device2282 * drivers, or any combination of these system components.2283 * Parameters: DWORD dwFlags,2284 LPDWORD lpdwRecipients,2285 UINT uiMessage,2286 WPARAM wParam,2287 LPARAM lParam2288 * Variables :2289 * Result : If the function succeeds, the return value is a positive value.2290 * If the function is unable to broadcast the message, the return value is -1.2291 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.2292 * Remark :2293 * Status : UNTESTED STUB2294 *2295 * Author : Patrick Haller [Thu, 1998/02/26 11:55]2296 *****************************************************************************/2297 2298 long WIN32API BroadcastSystemMessage(DWORD dwFlags,2299 LPDWORD lpdwRecipients,2300 UINT uiMessage,2301 WPARAM wParam,2302 LPARAM lParam)2303 {2304 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",2305 dwFlags,2306 lpdwRecipients,2307 uiMessage,2308 wParam,2309 lParam));2310 2311 return (-1);2312 }2313 2314 1930 2315 1931 -
trunk/src/user32/new/win32wnd.h
r329 r330 1 /* $Id: win32wnd.h,v 1.1 1 1999-07-18 14:56:37sandervl Exp $ */1 /* $Id: win32wnd.h,v 1.12 1999-07-18 17:12:03 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 124 124 Win32WndClass *getClass() { return windowClass; }; 125 125 126 static HWND Win32ToOS2Handle(HWND hwnd) 127 { 128 Win32Window *window = GetWindowFromHandle(hwnd); 129 130 if(window) { 131 return window->getOS2WindowHandle(); 132 } 133 else return hwnd; //OS/2 window handle 134 } 135 136 static HWND OS2ToWin32Handle(HWND hwnd) 137 { 138 Win32Window *window = GetWindowFromOS2Handle(hwnd); 139 140 if(window) { 141 return window->getWindowHandle(); 142 } 143 else return hwnd; //OS/2 window handle 144 } 145 126 146 static Win32Window *GetWindowFromHandle(HWND hwnd); 127 147 static Win32Window *GetWindowFromOS2Handle(HWND hwnd);
Note:
See TracChangeset
for help on using the changeset viewer.