Changeset 6395 for trunk/src/user32


Ignore:
Timestamp:
Jul 28, 2001, 3:43:54 PM (24 years ago)
Author:
sandervl
Message:

rewrote some functions

Location:
trunk/src/user32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/USER32.DEF

    r6375 r6395  
    1 ; $Id: USER32.DEF,v 1.61 2001-07-20 15:34:15 sandervl Exp $
     1; $Id: USER32.DEF,v 1.62 2001-07-28 13:43:53 sandervl Exp $
    22
    33LIBRARY USER32 INITINSTANCE TERMINSTANCE
     
    1717    __ShowCaret                 = PMMERGE.10007
    1818    __ShowCursor                = PMMERGE.10018
     19    __SwapMouseButton           = PMMERGE.10019
    1920    WinReplyMsg                 = PMMERGE.5325
    2021    _GpiEnableYInversion        = PMGPI.723
  • trunk/src/user32/oslibwin.cpp

    r6342 r6395  
    1 /* $Id: oslibwin.cpp,v 1.106 2001-07-15 15:39:03 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.107 2001-07-28 13:43:53 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    302302//******************************************************************************
    303303//******************************************************************************
     304BOOL OSLibWinSetSysValue(LONG iSysValue, ULONG val)
     305{
     306    return WinQuerySysValue(iSysValue, val);
     307}
     308//******************************************************************************
     309//******************************************************************************
    304310ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer)
    305311{
  • trunk/src/user32/oslibwin.h

    r6328 r6395  
    1 /* $Id: oslibwin.h,v 1.60 2001-07-14 09:21:42 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.61 2001-07-28 13:43:53 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    195195
    196196LONG OSLibWinQuerySysValue(LONG iSysValue);
     197BOOL OSLibWinSetSysValue(LONG iSysValue, ULONG val);
    197198ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer);
    198199BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText);
  • trunk/src/user32/window.cpp

    r6392 r6395  
    1 /* $Id: window.cpp,v 1.101 2001-07-23 19:16:41 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.102 2001-07-28 13:43:54 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    1818 * TODO: ShowOwnedPopups needs to be tested
    1919 *       GetLastActivePopup needs to be rewritten
    20  *       ArrangeIconicWindows probably too
    2120 *
    2221 */
     
    17451744//******************************************************************************
    17461745//******************************************************************************
    1747 UINT WIN32API ArrangeIconicWindows( HWND hwnd)
    1748 {
    1749     dprintf(("USER32:  ArrangeIconicWindows %x", hwnd));
    1750     return O32_ArrangeIconicWindows(Win32ToOS2Handle(hwnd));
     1746UINT WIN32API ArrangeIconicWindows( HWND parent)
     1747{
     1748    RECT rectParent;
     1749    HWND hwndChild;
     1750    INT x, y, xspacing, yspacing;
     1751
     1752    dprintf(("USER32: ArrangeIconicWindows %x", parent));
     1753    dprintf(("USER32: TODO: icon title!!"));
     1754
     1755    GetClientRect(parent, &rectParent);
     1756    x = rectParent.left;
     1757    y = rectParent.bottom;
     1758    xspacing = GetSystemMetrics(SM_CXICONSPACING);
     1759    yspacing = GetSystemMetrics(SM_CYICONSPACING);
     1760
     1761    hwndChild = GetWindow( parent, GW_CHILD );
     1762    while (hwndChild)
     1763    {
     1764        if( IsIconic( hwndChild ) )
     1765        {
     1766//            WND *wndPtr = WIN_FindWndPtr(hwndChild);
     1767           
     1768//            WINPOS_ShowIconTitle( wndPtr, FALSE );
     1769               
     1770            SetWindowPos( hwndChild, 0, x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2,
     1771                            y - yspacing - GetSystemMetrics(SM_CYICON)/2, 0, 0,
     1772                            SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
     1773//          if( IsWindow(hwndChild) )
     1774//                WINPOS_ShowIconTitle(wndPtr , TRUE );
     1775//            WIN_ReleaseWndPtr(wndPtr);
     1776
     1777            if (x <= rectParent.right - xspacing) x += xspacing;
     1778            else
     1779            {
     1780                x = rectParent.left;
     1781                y -= yspacing;
     1782            }
     1783        }
     1784        hwndChild = GetWindow( hwndChild, GW_HWNDNEXT );
     1785    }
     1786    return yspacing;
    17511787}
    17521788//******************************************************************************
  • trunk/src/user32/winmouse.cpp

    r5751 r6395  
    1 /* $Id: winmouse.cpp,v 1.15 2001-05-19 11:16:02 sandervl Exp $ */
     1/* $Id: winmouse.cpp,v 1.16 2001-07-28 13:43:54 sandervl Exp $ */
    22/*
    33 * Mouse handler for DINPUT
    44 *
    5  * Copyright 1999 Sander van Leeuwen
    6  *
     5 * Copyright 1999-2001 Sander van Leeuwen
     6 *
     7 * TODO: SwapMouseButton:
     8 *       We shouldn't let win32 apps change this for the whole system
     9 *       better to change mouse button message translation instead
    710 *
    811 * Project Odin Software License can be found in LICENSE.TXT
     
    160163{
    161164    dprintf(("USER32: GetDoubleClickTime"));
    162     return O32_GetDoubleClickTime();
    163 }
    164 //******************************************************************************
    165 //******************************************************************************
    166 BOOL WIN32API SetDoubleClickTime( UINT uInterval)
    167 {
     165    UINT result = OSLibWinQuerySysValue(SVOS_DBLCLKTIME);
     166    if(result == 0)
     167        SetLastError(ERROR_INVALID_PARAMETER); //TODO: ????
     168
     169    return result;
     170}
     171//******************************************************************************
     172//******************************************************************************
     173BOOL WIN32API SetDoubleClickTime(UINT uInterval)
     174{
     175    BOOL ret = TRUE;
     176
    168177    dprintf(("USER32: SetDoubleClickTime %d", uInterval));
    169     return O32_SetDoubleClickTime(uInterval);
    170 }
    171 //******************************************************************************
    172 //******************************************************************************
    173 BOOL WIN32API SwapMouseButton( BOOL fSwap)
     178
     179    ret = OSLibWinSetSysValue(SVOS_DBLCLKTIME, uInterval);
     180    if(ret == FALSE )
     181    {
     182        SetLastError(ERROR_INVALID_PARAMETER); //TODO: ????
     183    }
     184    return (ret);
     185}
     186//******************************************************************************
     187//TODO: we shouldn't let win32 apps change this for the whole system
     188//      better to change mouse button message translation instead
     189BOOL OPEN32API __SwapMouseButton(BOOL swapFlag);
     190
     191inline BOOL _SwapMouseButton(BOOL swapFlag)
     192{
     193 BOOL yyrc;
     194 USHORT sel = RestoreOS2FS();
     195
     196    yyrc = __SwapMouseButton(swapFlag);
     197    SetFS(sel);
     198
     199    return yyrc;
     200}
     201
     202//******************************************************************************
     203BOOL WIN32API SwapMouseButton(BOOL fSwap)
    174204{
    175205    dprintf(("USER32: SwapMouseButton %d", fSwap));
    176     return O32_SwapMouseButton(fSwap);
     206    return _SwapMouseButton(fSwap);
    177207}
    178208/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.