Ignore:
Timestamp:
Sep 28, 1999, 8:43:08 PM (26 years ago)
Author:
cbratschi
Message:

sorting in progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/user32.cpp

    r1084 r1089  
    1 /* $Id: user32.cpp,v 1.36 1999-09-28 16:35:06 cbratschi Exp $ */
     1/* $Id: user32.cpp,v 1.37 1999-09-28 18:43:08 cbratschi Exp $ */
    22
    33/*
     
    1919 *             to their OS/2-specific counterparts as far as possible.
    2020 *****************************************************************************/
    21 
    22 /*
    23   CB:
    24   - don't replace GDI functions (hdc), only convert window handle
    25   - always use OSRECTL for PM functions
    26   - POINT == POINTL
    27 */
    2821
    2922#include <os2win.h>
     
    17531746    return O32_VkKeyScan(ch);
    17541747}
    1755 
    1756 
    1757 //CB: stopped here void aa(){};
    1758 
    1759 //******************************************************************************
    1760 //******************************************************************************
    1761 DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD  arg5)
     1748//******************************************************************************
     1749//******************************************************************************
     1750WORD WIN32API VkKeyScanW( WCHAR wch)
     1751{
     1752#ifdef DEBUG
     1753    WriteLog("USER32:  VkKeyScanW\n");
     1754#endif
     1755    // NOTE: This will not work as is (needs UNICODE support)
     1756    return O32_VkKeyScan((char)wch);
     1757}
     1758
     1759/* Synchronization Functions */
     1760
     1761DWORD WIN32API MsgWaitForMultipleObjects( DWORD nCount, LPHANDLE pHandles, BOOL fWaitAll, DWORD dwMilliseconds, DWORD  dwWakeMask)
    17621762{
    17631763#ifdef DEBUG
    17641764    WriteLog("USER32:  MsgWaitForMultipleObjects\n");
    17651765#endif
    1766     return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
    1767 }
    1768 //******************************************************************************
    1769 //******************************************************************************
    1770 BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT  arg4)
     1766    return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask);
     1767}
     1768
     1769/* Button Functions */
     1770
     1771BOOL WIN32API CheckRadioButton( HWND hDlg, UINT nIDFirstButton, UINT nIDLastButton, UINT  nIDCheckButton)
    17711772{
    17721773#ifdef DEBUG
     
    17741775#endif
    17751776    //CB: check radio buttons in interval
    1776     if (arg2 > arg3) return (FALSE);
    1777     for (UINT x=arg2;x <= arg3;x++)
     1777    if (nIDFirstButton > nIDLastButton)
    17781778    {
    1779      SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
     1779      SetLastError(ERROR_INVALID_PARAMETER);
     1780      return (FALSE);
    17801781    }
     1782
     1783    hDlg = Win32Window::Win32ToOS2Handle(hDlg);
     1784
     1785    for (UINT x = nIDFirstButton;x <= nIDLastButton;x++)
     1786    {
     1787     SendDlgItemMessageA(hDlg,x,BM_SETCHECK,(x == nIDCheckButton) ? BST_CHECKED : BST_UNCHECKED,0);
     1788    }
     1789
    17811790    return (TRUE);
    17821791}
    1783 //******************************************************************************
    1784 //******************************************************************************
    1785 BOOL WIN32API EndDeferWindowPos( HDWP arg1)
     1792
     1793/* Window Functions */
     1794
     1795/*****************************************************************************
     1796 * Name      : BOOL WIN32API AnyPopup
     1797 * Purpose   : The AnyPopup function indicates whether an owned, visible,
     1798 *             top-level pop-up, or overlapped window exists on the screen. The
     1799 *             function searches the entire Windows screen, not just the calling
     1800 *             application's client area.
     1801 * Parameters: VOID
     1802 * Variables :
     1803 * Result    : If a pop-up window exists, the return value is TRUE even if the
     1804 *             pop-up window is completely covered by other windows. Otherwise,
     1805 *             it is FALSE.
     1806 * Remark    : AnyPopup is a Windows version 1.x function and is retained for
     1807 *             compatibility purposes. It is generally not useful.
     1808 * Status    : UNTESTED STUB
     1809 *
     1810 * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
     1811 *****************************************************************************/
     1812BOOL WIN32API AnyPopup(VOID)
     1813{
     1814  dprintf(("USER32:AnyPopup() not implemented.\n"));
     1815
     1816  return (FALSE);
     1817}
     1818//******************************************************************************
     1819//******************************************************************************
     1820BOOL WIN32API EndDeferWindowPos( HDWP hWinPosInfo)
    17861821{
    17871822#ifdef DEBUG
    17881823    WriteLog("USER32:  EndDeferWindowPos\n");
    17891824#endif
    1790     return O32_EndDeferWindowPos(arg1);
    1791 }
    1792 //******************************************************************************
    1793 //******************************************************************************
    1794 INT WIN32API ExcludeUpdateRgn( HDC arg1, HWND  arg2)
    1795 {
    1796 #ifdef DEBUG
    1797     WriteLog("USER32:  ExcludeUpdateRgn\n");
    1798 #endif
    1799     return O32_ExcludeUpdateRgn(arg1, arg2);
    1800 }
    1801 //******************************************************************************
    1802 //******************************************************************************
    1803 int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
    1804 {
    1805 #ifdef DEBUG
    1806     WriteLog("USER32:  FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
    1807 #endif
    1808     return O32_FillRect(arg1, arg2, arg3);
    1809 }
    1810 //******************************************************************************
    1811 //******************************************************************************
    1812 HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
    1813 {
    1814  char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
    1815  char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
     1825    return O32_EndDeferWindowPos(hWinPosInfo);
     1826}
     1827//******************************************************************************
     1828//******************************************************************************
     1829HWND WIN32API FindWindowW( LPCWSTR lpClassName, LPCWSTR lpWindowName)
     1830{
     1831 char *astring1 = UnicodeToAsciiString((LPWSTR)lpClassName);
     1832 char *astring2 = UnicodeToAsciiString((LPWSTR)lpWindowName);
    18161833 HWND rc;
    18171834
     
    18261843//******************************************************************************
    18271844//******************************************************************************
    1828 int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH  arg3)
    1829 {
    1830 #ifdef DEBUG
    1831     WriteLog("USER32:  FrameRect\n");
    1832 #endif
    1833     return O32_FrameRect(arg1, arg2, arg3);
    1834 }
    1835 //******************************************************************************
    1836 //******************************************************************************
    18371845HWND WIN32API GetForegroundWindow(void)
    18381846{
     
    18401848    WriteLog("USER32:  GetForegroundWindow\n");
    18411849#endif
    1842     return O32_GetForegroundWindow();
    1843 }
    1844 //******************************************************************************
    1845 //******************************************************************************
    1846 int WIN32API GetKeyboardType( int arg1)
    1847 {
    1848 #ifdef DEBUG
    1849     WriteLog("USER32:  GetKeyboardType\n");
    1850 #endif
    1851     return O32_GetKeyboardType(arg1);
    1852 }
    1853 //******************************************************************************
    1854 //******************************************************************************
    1855 HWND WIN32API GetLastActivePopup( HWND arg1)
     1850    return Win32Window::OS2ToWin32Handle(O32_GetForegroundWindow());
     1851}
     1852//******************************************************************************
     1853//******************************************************************************
     1854HWND WIN32API GetLastActivePopup( HWND hWnd)
    18561855{
    18571856#ifdef DEBUG
    18581857    WriteLog("USER32:  GetLastActivePopup\n");
    18591858#endif
    1860     return O32_GetLastActivePopup(arg1);
    1861 }
    1862 //******************************************************************************
    1863 //******************************************************************************
    1864 //******************************************************************************
    1865 //******************************************************************************
    1866 DWORD WIN32API GetQueueStatus( UINT arg1)
    1867 {
    1868 #ifdef DEBUG
    1869     WriteLog("USER32:  GetQueueStatus\n");
    1870 #endif
    1871     return O32_GetQueueStatus(arg1);
    1872 }
    1873 //******************************************************************************
    1874 //******************************************************************************
    1875 DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
    1876 {
    1877 #ifdef DEBUG
    1878     WriteLog("USER32:  GetTabbedTextExtentA\n");
    1879 #endif
    1880     return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
    1881 }
    1882 //******************************************************************************
    1883 //******************************************************************************
    1884 DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
    1885 {
    1886  char *astring = UnicodeToAsciiString((LPWSTR)arg2);
    1887  DWORD rc;
    1888 
    1889 #ifdef DEBUG
    1890     WriteLog("USER32:  GetTabbedTextExtentW\n");
    1891 #endif
    1892     rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
    1893     FreeAsciiString(astring);
    1894     return rc;
     1859    hWnd = Win32Window::Win32ToOS2Handle(hWnd);
     1860
     1861    return Win32Window::OS2ToWin32Handle(O32_GetLastActivePopup(hWnd));
     1862}
     1863//******************************************************************************
     1864//******************************************************************************
     1865DWORD WIN32API GetWindowThreadProcessId(HWND hWnd, PDWORD  lpdwProcessId)
     1866{
     1867#ifdef DEBUG
     1868    WriteLog("USER32:  GetWindowThreadProcessId\n");
     1869#endif
     1870    hWnd = Win32Window::Win32ToOS2Handle(hWnd);
     1871
     1872    return O32_GetWindowThreadProcessId(hWnd,lpdwProcessId);
     1873}
     1874
     1875/* Painting and Drawing Functions */
     1876
     1877
     1878INT WIN32API ExcludeUpdateRgn( HDC hDC, HWND  hWnd)
     1879{
     1880#ifdef DEBUG
     1881    WriteLog("USER32:  ExcludeUpdateRgn\n");
     1882#endif
     1883    hWnd = Win32Window::Win32ToOS2Handle(hWnd);
     1884
     1885    return O32_ExcludeUpdateRgn(hDC,hWnd);
    18951886}
    18961887//******************************************************************************
    18971888//******************************************************************************
    18981889#if 0
    1899 int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL  arg3)
     1890int WIN32API GetUpdateRgn( HWND hWnd, HRGN hRgn, BOOL bErase)
    19001891{
    19011892#ifdef DEBUG
    19021893    WriteLog("USER32:  GetUpdateRgn\n");
    19031894#endif
    1904     return O32_GetUpdateRgn(arg1, arg2, arg3);
    1905 }
    1906 #endif
    1907 //******************************************************************************
    1908 
    1909 
    1910 //******************************************************************************
    1911 //******************************************************************************
    1912 //******************************************************************************
    1913 DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD  arg2)
    1914 {
    1915 #ifdef DEBUG
    1916     WriteLog("USER32:  GetWindowThreadProcessId\n");
    1917 #endif
    1918     return O32_GetWindowThreadProcessId(arg1, arg2);
    1919 }
    1920 //******************************************************************************
    1921 //******************************************************************************
    1922 #if 0
    1923 BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL  arg3)
    1924 {
    1925 #ifdef DEBUG
    1926     WriteLog("USER32:  InvalidateRgn\n");
    1927 #endif
    1928     return O32_InvalidateRgn(arg1, arg2, arg3);
    1929 }
    1930 #endif
    1931 //******************************************************************************
    1932 //******************************************************************************
    1933 BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
    1934 {
    1935 #ifdef DEBUG
    1936     WriteLog("USER32:  InvertRect\n");
    1937 #endif
    1938     return O32_InvertRect(arg1, arg2);
    1939 }
    1940 //******************************************************************************
    1941 //******************************************************************************
    1942 BOOL WIN32API MapDialogRect( HWND arg1, PRECT  arg2)
    1943 {
    1944 #ifdef DEBUG
    1945     WriteLog("USER32:  MapDialogRect\n");
    1946 #endif
    1947     return O32_MapDialogRect(arg1, arg2);
    1948 }
    1949 //******************************************************************************
    1950 //******************************************************************************
    1951 int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
    1952 {
    1953 #ifdef DEBUG
    1954     WriteLog("USER32:  MapWindowPoints\n");
    1955 #endif
    1956     return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
    1957 }
    1958 //******************************************************************************
    1959 //******************************************************************************
    1960 BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt)
    1961 {
    1962 #ifdef DEBUG
    1963     WriteLog("USER32:  ScreenToClient\n");
    1964 #endif
    1965     Win32BaseWindow *wnd;
    1966     PRECT rcl;
    1967 
    1968     if (!hwnd) return (TRUE);
    1969     wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
    1970     if (!wnd) return (TRUE);
    1971 
    1972     rcl   = wnd->getClientRect();
    1973     pt->y = ScreenHeight - pt->y;
    1974     OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1);
    1975     pt->y = (rcl->bottom - rcl->top) - pt->y;
    1976     return (TRUE);
    1977 }
    1978 //******************************************************************************
    1979 //******************************************************************************
    1980 #if 0
    1981 BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT  arg7)
    1982 {
    1983 #ifdef DEBUG
    1984     WriteLog("USER32:  ScrollDC\n");
    1985 #endif
    1986     return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    1987 }
    1988 #endif
    1989 //******************************************************************************
    1990 //******************************************************************************
    1991 LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int  arg8)
    1992 {
    1993 #ifdef DEBUG
    1994     WriteLog("USER32:  TabbedTextOutA\n");
    1995 #endif
    1996     return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    1997 }
    1998 //******************************************************************************
    1999 //******************************************************************************
    2000 LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int  arg8)
    2001 {
    2002  char *astring = UnicodeToAsciiString((LPWSTR)arg4);
    2003  LONG rc;
    2004 
    2005 #ifdef DEBUG
    2006     WriteLog("USER32:  TabbedTextOutW\n");
    2007 #endif
    2008     rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
    2009     FreeAsciiString(astring);
    2010     return rc;
    2011 }
    2012 //******************************************************************************
    2013 //******************************************************************************
    2014 BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
    2015 {
    2016 #ifdef DEBUG
    2017     WriteLog("USER32:  ValidateRect\n");
    2018 #endif
    2019     return O32_ValidateRect(arg1, arg2);
    2020 }
    2021 //******************************************************************************
    2022 //******************************************************************************
    2023 BOOL WIN32API ValidateRgn( HWND arg1, HRGN  arg2)
    2024 {
    2025 #ifdef DEBUG
    2026     WriteLog("USER32:  ValidateRgn\n");
    2027 #endif
    2028     return O32_ValidateRgn(arg1, arg2);
    2029 }
    2030 //******************************************************************************
    2031 //******************************************************************************
    2032 WORD WIN32API VkKeyScanW( WCHAR arg1)
    2033 {
    2034 #ifdef DEBUG
    2035     WriteLog("USER32:  VkKeyScanW\n");
    2036 #endif
    2037     // NOTE: This will not work as is (needs UNICODE support)
    2038     return O32_VkKeyScan((char)arg1);
    2039 }
     1895    hWnd = Win32Window::Win32ToOS2Handle(hWnd);
     1896
     1897    return O32_GetUpdateRgn(hWnd,hRgn,bErase);
     1898}
     1899#endif
    20401900//******************************************************************************
    20411901//TODO: Not complete
     
    21021962}
    21031963//******************************************************************************
     1964//******************************************************************************
     1965#if 0
     1966BOOL WIN32API InvalidateRgn( HWND hWnd, HRGN hRgn, BOOL bErase)
     1967{
     1968#ifdef DEBUG
     1969    WriteLog("USER32:  InvalidateRgn\n");
     1970#endif
     1971    hWnd = Win32Window::Win32ToOS2Handle(hWnd);
     1972
     1973    return O32_InvalidateRgn(hWnd,hRgn,bErase);
     1974}
     1975#endif
     1976/*****************************************************************************
     1977 * Name      : BOOL WIN32API PaintDesktop
     1978 * Purpose   : The PaintDesktop function fills the clipping region in the
     1979 *             specified device context with the desktop pattern or wallpaper.
     1980 *             The function is provided primarily for shell desktops.
     1981 * Parameters:
     1982 * Variables :
     1983 * Result    : If the function succeeds, the return value is TRUE.
     1984 *             If the function fails, the return value is FALSE.
     1985 * Remark    :
     1986 * Status    : UNTESTED STUB
     1987 *
     1988 * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
     1989 *****************************************************************************/
     1990BOOL WIN32API PaintDesktop(HDC hdc)
     1991{
     1992  dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
     1993         hdc));
     1994
     1995  return (FALSE);
     1996}
     1997//******************************************************************************
     1998//******************************************************************************
     1999BOOL WIN32API ValidateRect( HWND hwnd, const RECT * lprc)
     2000{
     2001#ifdef DEBUG
     2002    WriteLog("USER32:  ValidateRect\n");
     2003#endif
     2004    hwnd = Win32Window::Win32ToOS2Handle(hwnd);
     2005
     2006    return O32_ValidateRect(hwnd,lprc);
     2007}
     2008//******************************************************************************
     2009//******************************************************************************
     2010BOOL WIN32API ValidateRgn( HWND hwnd, HRGN  hrgn)
     2011{
     2012#ifdef DEBUG
     2013    WriteLog("USER32:  ValidateRgn\n");
     2014#endif
     2015    hwnd = Win32Window::Win32ToOS2Handle(hwnd);
     2016
     2017    return O32_ValidateRgn(hwnd,hrgn);
     2018}
     2019
     2020/* Filled Shape Functions */
     2021
     2022
     2023int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
     2024{
     2025#ifdef DEBUG
     2026    WriteLog("USER32:  FillRect (%d,%d)(%d,%d) brush %X\n", lprc->left, lprc->top, lprc->right, lprc->bottom, hbr);
     2027#endif
     2028    return O32_FillRect(hDC,lprc,hbr);
     2029}
     2030//******************************************************************************
     2031//******************************************************************************
     2032int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH  hbr)
     2033{
     2034#ifdef DEBUG
     2035    WriteLog("USER32:  FrameRect\n");
     2036#endif
     2037    return O32_FrameRect(hDC,lprc,hbr);
     2038}
     2039//******************************************************************************
     2040//******************************************************************************
     2041BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
     2042{
     2043#ifdef DEBUG
     2044    WriteLog("USER32:  InvertRect\n");
     2045#endif
     2046    return O32_InvertRect(hDC,lprc);
     2047}
     2048
     2049/* System Information Functions */
     2050
     2051int WIN32API GetKeyboardType( int nTypeFlag)
     2052{
     2053#ifdef DEBUG
     2054    WriteLog("USER32:  GetKeyboardType\n");
     2055#endif
     2056    return O32_GetKeyboardType(nTypeFlag);
     2057}
     2058/*****************************************************************************
     2059 * Name      : HDESK WIN32API GetThreadDesktop
     2060 * Purpose   : The GetThreadDesktop function returns a handle to the desktop
     2061 *             associated with a specified thread.
     2062 * Parameters: DWORD dwThreadId thread identifier
     2063 * Variables :
     2064 * Result    : If the function succeeds, the return value is the handle of the
     2065 *               desktop associated with the specified thread.
     2066 * Remark    :
     2067 * Status    : UNTESTED STUB
     2068 *
     2069 * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
     2070 *****************************************************************************/
     2071HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
     2072{
     2073  dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
     2074         dwThreadId));
     2075
     2076  return (NULL);
     2077}
     2078
     2079/* Message and Message Queue Functions */
     2080
     2081/*****************************************************************************
     2082 * Name      : BOOL WIN32API GetInputState
     2083 * Purpose   : The GetInputState function determines whether there are
     2084 *             mouse-button or keyboard messages in the calling thread's message queue.
     2085 * Parameters:
     2086 * Variables :
     2087 * Result    : If the queue contains one or more new mouse-button or keyboard
     2088 *               messages, the return value is TRUE.
     2089 *             If the function fails, the return value is FALSE.
     2090 * Remark    :
     2091 * Status    : UNTESTED STUB
     2092 *
     2093 * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
     2094 *****************************************************************************/
     2095BOOL WIN32API GetInputState(VOID)
     2096{
     2097  dprintf(("USER32:GetInputState () not implemented.\n"));
     2098
     2099  return (FALSE);
     2100}
     2101//******************************************************************************
     2102//******************************************************************************
     2103DWORD WIN32API GetQueueStatus( UINT flags)
     2104{
     2105#ifdef DEBUG
     2106    WriteLog("USER32:  GetQueueStatus\n");
     2107#endif
     2108    return O32_GetQueueStatus(flags);
     2109}
     2110
     2111/* Font and Text Functions */
     2112
     2113DWORD WIN32API GetTabbedTextExtentA( HDC hDC, LPCSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
     2114{
     2115#ifdef DEBUG
     2116    WriteLog("USER32:  GetTabbedTextExtentA\n");
     2117#endif
     2118    return O32_GetTabbedTextExtent(hDC,lpString,nCount,nTabPositions,lpnTabStopPositions);
     2119}
     2120//******************************************************************************
     2121//******************************************************************************
     2122DWORD WIN32API GetTabbedTextExtentW( HDC hDC, LPCWSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
     2123{
     2124 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
     2125 DWORD rc;
     2126
     2127#ifdef DEBUG
     2128    WriteLog("USER32:  GetTabbedTextExtentW\n");
     2129#endif
     2130    rc = O32_GetTabbedTextExtent(hDC,astring,nCount,nTabPositions,lpnTabStopPositions);
     2131    FreeAsciiString(astring);
     2132    return rc;
     2133}
     2134//******************************************************************************
     2135//******************************************************************************
     2136LONG WIN32API TabbedTextOutA( HDC hdc, int x, int y, LPCSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int  nTabOrigin)
     2137{
     2138#ifdef DEBUG
     2139    WriteLog("USER32:  TabbedTextOutA\n");
     2140#endif
     2141    return O32_TabbedTextOut(hdc,x,y,lpString,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin);
     2142}
     2143//******************************************************************************
     2144//******************************************************************************
     2145LONG WIN32API TabbedTextOutW( HDC hdc, int x, int y, LPCWSTR lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int  nTabOrigin)
     2146{
     2147 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
     2148 LONG rc;
     2149
     2150#ifdef DEBUG
     2151    WriteLog("USER32:  TabbedTextOutW\n");
     2152#endif
     2153    rc = O32_TabbedTextOut(hdc,x,y,astring,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin);
     2154    FreeAsciiString(astring);
     2155    return rc;
     2156}
     2157
     2158/* Dialog Box Functions */
     2159
     2160BOOL WIN32API MapDialogRect( HWND hDlg, PRECT  lpRect)
     2161{
     2162#ifdef DEBUG
     2163    WriteLog("USER32:  MapDialogRect\n");
     2164#endif
     2165    hDlg = Win32Window::Win32ToOS2Handle(hDlg);
     2166
     2167    return O32_MapDialogRect(hDlg,lpRect);
     2168}
     2169
     2170/* Coordinate Space and Transformation Functions */
     2171
     2172int WIN32API MapWindowPoints( HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints)
     2173{
     2174#ifdef DEBUG
     2175    WriteLog("USER32:  MapWindowPoints\n");
     2176#endif
     2177    hWndFrom = Win32Window::Win32ToOS2Handle(hWndFrom);
     2178    hWndTo = Win32Window::Win32ToOS2Handle(hWndTo);
     2179
     2180    return O32_MapWindowPoints(hWndFrom,hWndTo,lpPoints,cPoints);
     2181}
     2182//******************************************************************************
     2183//******************************************************************************
     2184BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt)
     2185{
     2186#ifdef DEBUG
     2187    WriteLog("USER32:  ScreenToClient\n");
     2188#endif
     2189    Win32BaseWindow *wnd;
     2190    PRECT rcl;
     2191
     2192    if (!hwnd) return (TRUE);
     2193    wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     2194    if (!wnd) return (TRUE);
     2195
     2196    rcl   = wnd->getClientRect();
     2197    pt->y = ScreenHeight - pt->y;
     2198    OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1);
     2199    pt->y = (rcl->bottom - rcl->top) - pt->y;
     2200    return (TRUE);
     2201}
     2202
     2203/* Scroll Bar Functions */
     2204
     2205#if 0
     2206BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT  arg7)
     2207{
     2208#ifdef DEBUG
     2209    WriteLog("USER32:  ScrollDC\n");
     2210#endif
     2211    return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
     2212}
     2213#endif
     2214
     2215/* Resource Functions */
     2216
     2217//CB: stopped here void aa(){};
     2218//******************************************************************************
    21042219//TODO:
    21052220//******************************************************************************
     
    22752390//******************************************************************************
    22762391//******************************************************************************
    2277 
    2278 
    2279 /*****************************************************************************
    2280  * Name      : BOOL WIN32API AnyPopup
    2281  * Purpose   : The AnyPopup function indicates whether an owned, visible,
    2282  *             top-level pop-up, or overlapped window exists on the screen. The
    2283  *             function searches the entire Windows screen, not just the calling
    2284  *             application's client area.
    2285  * Parameters: VOID
    2286  * Variables :
    2287  * Result    : If a pop-up window exists, the return value is TRUE even if the
    2288  *             pop-up window is completely covered by other windows. Otherwise,
    2289  *             it is FALSE.
    2290  * Remark    : AnyPopup is a Windows version 1.x function and is retained for
    2291  *             compatibility purposes. It is generally not useful.
    2292  * Status    : UNTESTED STUB
    2293  *
    2294  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    2295  *****************************************************************************/
    2296 
    2297 BOOL WIN32API AnyPopup(VOID)
    2298 {
    2299   dprintf(("USER32:AnyPopup() not implemented.\n"));
    2300 
    2301   return (FALSE);
    2302 }
    2303 
    23042392
    23052393
     
    27212809
    27222810/*****************************************************************************
    2723  * Name      : BOOL WIN32API GetInputState
    2724  * Purpose   : The GetInputState function determines whether there are
    2725  *             mouse-button or keyboard messages in the calling thread's message queue.
    2726  * Parameters:
    2727  * Variables :
    2728  * Result    : If the queue contains one or more new mouse-button or keyboard
    2729  *               messages, the return value is TRUE.
    2730  *             If the function fails, the return value is FALSE.
    2731  * Remark    :
    2732  * Status    : UNTESTED STUB
    2733  *
    2734  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    2735  *****************************************************************************/
    2736 
    2737 BOOL WIN32API GetInputState(VOID)
    2738 {
    2739   dprintf(("USER32:GetInputState () not implemented.\n"));
    2740 
    2741   return (FALSE);
    2742 }
    2743 
    2744 
    2745 /*****************************************************************************
    27462811 * Name      : UINT WIN32API GetKBCodePage
    27472812 * Purpose   : The GetKBCodePage function is provided for compatibility with
     
    27902855}
    27912856
    2792 
    2793 
    2794 /*****************************************************************************
    2795  * Name      : HDESK WIN32API GetThreadDesktop
    2796  * Purpose   : The GetThreadDesktop function returns a handle to the desktop
    2797  *             associated with a specified thread.
    2798  * Parameters: DWORD dwThreadId thread identifier
    2799  * Variables :
    2800  * Result    : If the function succeeds, the return value is the handle of the
    2801  *               desktop associated with the specified thread.
    2802  * Remark    :
    2803  * Status    : UNTESTED STUB
    2804  *
    2805  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    2806  *****************************************************************************/
    2807 
    2808 HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
    2809 {
    2810   dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
    2811          dwThreadId));
    2812 
    2813   return (NULL);
    2814 }
    28152857
    28162858
     
    31183160
    31193161/*****************************************************************************
    3120  * Name      : BOOL WIN32API PaintDesktop
    3121  * Purpose   : The PaintDesktop function fills the clipping region in the
    3122  *             specified device context with the desktop pattern or wallpaper.
    3123  *             The function is provided primarily for shell desktops.
    3124  * Parameters:
    3125  * Variables :
    3126  * Result    : If the function succeeds, the return value is TRUE.
    3127  *             If the function fails, the return value is FALSE.
    3128  * Remark    :
    3129  * Status    : UNTESTED STUB
    3130  *
    3131  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    3132  *****************************************************************************/
    3133 
    3134 BOOL WIN32API PaintDesktop(HDC hdc)
    3135 {
    3136   dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
    3137          hdc));
    3138 
    3139   return (FALSE);
    3140 }
    3141 
    3142 
    3143 
    3144 /*****************************************************************************
    31453162 * Name      : VOID WIN32API SetDebugErrorLevel
    31463163 * Purpose   : The SetDebugErrorLevel function sets the minimum error level at
Note: See TracChangeset for help on using the changeset viewer.