Ignore:
Timestamp:
Jul 18, 1999, 3:57:48 PM (26 years ago)
Author:
cbratschi
Message:

API Open32 -> PM

File:
1 edited

Legend:

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

    r325 r327  
    1 /* $Id: oslibwin.cpp,v 1.10 1999-07-18 10:39:51 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.11 1999-07-18 13:57:47 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4646
    4747  if(pszName && *pszName == 0) {
    48         pszName = NULL;
     48        pszName = NULL;
    4949  }
    5050  if(hwndParent == 0) {
     
    5353  if(dwFrameStyle) {
    5454        dwWinStyle &= ~WS_CLIPCHILDREN; //invalid style according to docs
    55         if(pszName)
    56                 dwFrameStyle |= FCF_TITLEBAR;
     55        if(pszName)
     56                dwFrameStyle |= FCF_TITLEBAR;
    5757
    5858        *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle,
     
    6060                                       "", 0, 0, 0, &hwndClient);
    6161        if(*hwndFrame) {
    62                 if(pszName) {
    63                         WinSetWindowText(*hwndFrame, pszName);
    64                 }
     62                if(pszName) {
     63                        WinSetWindowText(*hwndFrame, pszName);
     64                }
    6565                return hwndClient;
    6666        }
     
    161161//******************************************************************************
    162162//******************************************************************************
     163HWND OSLibWinQueryFocus(HWND hwndDeskTop)
     164{
     165  return WinQueryFocus(hwndDeskTop);
     166}
     167//******************************************************************************
     168//******************************************************************************
     169HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id)
     170{
     171  return WinWindowFromID(hwndParent,id);
     172}
     173//******************************************************************************
     174//******************************************************************************
     175BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus)
     176{
     177  return WinSetFocus(hwndDeskTop,hwndNewFocus);
     178}
     179//******************************************************************************
     180//******************************************************************************
     181ULONG OSLibGetWindowHeight(HWND hwnd)
     182{
     183  RECTL rect;
     184
     185  return (WinQueryWindowRect(hwnd,&rect)) ? rect.yTop-rect.yBottom:0;
     186}
     187//******************************************************************************
     188//******************************************************************************
     189BOOL OSLibWinInvalidateRect(HWND hwnd,POSRECTL pwrc,BOOL fIncludeChildren)
     190{
     191  return WinInvalidateRect(hwnd,(PRECTL)pwrc,fIncludeChildren);
     192}
     193//******************************************************************************
     194//******************************************************************************
     195LONG OSLibWinQuerySysValue(HWND hwndDeskTop,LONG iSysValue)
     196{
     197  return WinQuerySysValue(hwndDeskTop,iSysValue);
     198}
     199//******************************************************************************
     200//******************************************************************************
     201ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer)
     202{
     203  return WinQueryDlgItemText(hwndDlg,idItem,cchBufferMax,pchBuffer);
     204}
     205//******************************************************************************
     206//******************************************************************************
     207BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText)
     208{
     209  return WinSetDlgItemText(hwndDlg,idItem,pszText);
     210}
     211//******************************************************************************
     212//******************************************************************************
     213BOOL OSLibWinQueryPointerPos(HWND hwndDeskTop,PPOINT pptlPoint)
     214{
     215  return WinQueryPointerPos(hwndDeskTop,(PPOINTL)pptlPoint);
     216}
    163217//******************************************************************************
    164218//******************************************************************************
     
    173227{
    174228  if(fl & SWP_MOVE) {
    175         y = MapOS2ToWin32Y(hwnd, cy, y);
     229        y = MapOS2ToWin32Y(hwnd, cy, y);
    176230  }
    177231  dprintf(("WinSetWindowPos %x %x %d %d %d %d %x", hwnd, hwndInsertBehind, x, y, cx, cy, fl));
     
    185239
    186240  if(fl & SWP_SHOW) {
    187         rc = WinShowWindow(hwnd, TRUE);
     241        rc = WinShowWindow(hwnd, TRUE);
    188242  }
    189243  if(rc == 0)
    190         dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
     244        dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
    191245  rc = WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, fl);
    192246  if(rc == 0)
    193         dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
     247        dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
    194248  return rc;
    195249}
     
    202256//******************************************************************************
    203257//******************************************************************************
    204 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect)
    205 {
    206  BOOL rc;
    207  RECTLOS2 rectl;
    208 
    209   rc = WinQueryUpdateRect(hwnd, (PRECTL)&rectl);
    210   if(rc) {
    211         MapOS2ToWin32Rectl(hwnd, &rectl, pRect);
    212   }
    213   return rc;
     258BOOL OSLibWinQueryUpdateRect(HWND hwnd, POSRECTL pRect)
     259{
     260  return WinQueryUpdateRect(hwnd, (PRECTL)pRect);
     261  //CB: caller must convert rect
    214262}
    215263//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.