Changeset 15433


Ignore:
Timestamp:
Jan 2, 2001, 7:14:59 PM (24 years ago)
Author:
sandervl
Message:

more logging, rewrote window handle management, don't export odin external functions by name

Location:
tags/trunk/src/user32
Files:
3 edited

Legend:

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

    r15423 r15433  
    1 ; $Id: USER32.DEF,v 1.47 2000-12-30 13:27:55 sandervl Exp $
     1; $Id: USER32.DEF,v 1.48 2001-01-02 18:14:59 sandervl Exp $
    22
    33LIBRARY USER32 INITINSTANCE TERMINSTANCE
     
    637637; Wine/Odin helper function
    638638;------------------------------------------------------------------------------
    639     GetSysColorPen              = _GetSysColorPen@4              @2002
    640     GetPattern55AABrush         = _GetPattern55AABrush@0         @2003
    641     GetPattern55AABitmap        = _GetPattern55AABitmap@0        @2004
    642 
    643     _Win32ToOS2Handle@4                                          @2006
    644     _OS2ToWin32Handle@4                                          @2012
    645 
    646     _MOUSE_Enable@4                                              @2007
    647     _KeyTranslatePMToWin@4                                       @2008
    648     _KeyTranslatePMToWinBuf@12                                   @2009
    649 
    650     _wvsnprintfA@16                                              @2010
    651 
    652     _KEYBOARD_Enable@4                                           @2011
     639    GetSysColorPen              = _GetSysColorPen@4              @2002 NONAME
     640    GetPattern55AABrush         = _GetPattern55AABrush@0         @2003 NONAME
     641    GetPattern55AABitmap        = _GetPattern55AABitmap@0        @2004 NONAME
     642
     643    _Win32ToOS2Handle@4                                          @2006 NONAME
     644    _OS2ToWin32Handle@4                                          @2012 NONAME
     645
     646    _MOUSE_Enable@4                                              @2007 NONAME
     647    _KeyTranslatePMToWin@4                                       @2008 NONAME
     648    _KeyTranslatePMToWinBuf@12                                   @2009 NONAME
     649
     650    _wvsnprintfA@16                                              @2010 NONAME
     651
     652    _KEYBOARD_Enable@4                                           @2011 NONAME
    653653
    654654    ;SvL: Used by GDI32
    655     OSLibGetScreenHeight__Fv                                     @2013
    656     OSLibGetScreenWidth__Fv                                      @2014
    657 
    658     _wvsnprintfW@16                                              @2015
    659 
    660     _setPageXForm@4                                              @2016
    661     _clientHeight@8                                              @2017
    662     _changePageXForm@20                                          @2018
    663     _removeClientArea@4                                          @2019
    664     _setMapMode@8                                                @2020
    665     _TestWideLine@4                                              @2021
    666     _Calculate1PixelDelta@4                                      @2022
    667     _DIB_GetDIBWidthBytes@8                                      @2023
    668     _BITMAP_GetWidthBytes@8                                      @2024
    669     _selectClientArea@4                                          @2025
    670     _IsSystemBrush@4                                             @2026
    671     _IsSystemPen@4                                               @2027
     655    OSLibGetScreenHeight__Fv                                     @2013 NONAME
     656    OSLibGetScreenWidth__Fv                                      @2014 NONAME
     657
     658    _wvsnprintfW@16                                              @2015 NONAME
     659
     660    _setPageXForm@4                                              @2016 NONAME
     661    _clientHeight@8                                              @2017 NONAME
     662    _changePageXForm@20                                          @2018 NONAME
     663    _removeClientArea@4                                          @2019 NONAME
     664    _setMapMode@8                                                @2020 NONAME
     665    _TestWideLine@4                                              @2021 NONAME
     666    _Calculate1PixelDelta@4                                      @2022 NONAME
     667    _DIB_GetDIBWidthBytes@8                                      @2023 NONAME
     668    _BITMAP_GetWidthBytes@8                                      @2024 NONAME
     669    _selectClientArea@4                                          @2025 NONAME
     670    _IsSystemBrush@4                                             @2026 NONAME
     671    _IsSystemPen@4                                               @2027 NONAME
  • TabularUnified tags/trunk/src/user32/win32wndhandle.cpp

    r13786 r15433  
    1 /* $Id: win32wndhandle.cpp,v 1.7 2000-03-23 19:24:26 sandervl Exp $ */
     1/* $Id: win32wndhandle.cpp,v 1.8 2001-01-02 18:14:59 sandervl Exp $ */
    22/*
    33 * Win32 Handle Management Code for OS/2
     
    3434ULONG  WindowHandleTable[MAX_WINDOW_HANDLES] = {0};
    3535VMutex tableMutex(VMUTEX_SHARED, &hGlobalTableMutex);
    36 ULONG  lowestFreeIndex = 0;
     36ULONG  lastIndex = 0;
    3737#pragma data_seg()
    3838
     
    4242{
    4343  tableMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalTableMutex);
    44   if(lowestFreeIndex == -1) {
     44
     45  //find next free handle
     46  if(lastIndex >= MAX_WINDOW_HANDLES-1) {
     47        lastIndex = 0;
     48  }
     49  for(int i=lastIndex;i<MAX_WINDOW_HANDLES;i++) {
     50        if(WindowHandleTable[i] == 0) {
     51                lastIndex = i;
     52                break;
     53        }
     54  }
     55  if(i == MAX_WINDOW_HANDLES) {
    4556        //oops, out of handles
    46         dprintf(("USER32: HwAllocateWindowHandle OUT OF WINDOW HANDLES!!"));
    4757        tableMutex.leave(&hGlobalTableMutex);
     58        dprintf(("ERROR: USER32: HwAllocateWindowHandle OUT OF WINDOW HANDLES!!"));
    4859        DebugInt3();
    4960        return FALSE;
    5061  }
    51   *hwnd           = lowestFreeIndex;
    52   *hwnd          |= WNDHANDLE_MAGIC_HIGHWORD;
    53   WindowHandleTable[lowestFreeIndex] = dwUserData;
     62  *hwnd  = lastIndex;
     63  *hwnd |= WNDHANDLE_MAGIC_HIGHWORD;
     64  WindowHandleTable[lastIndex] = dwUserData;
    5465
    55   lowestFreeIndex = -1;
    56 
    57   //find next free handle
    58   for(int i=0;i<MAX_WINDOW_HANDLES;i++) {
    59         if(WindowHandleTable[i] == 0) {
    60                 lowestFreeIndex = i;
    61                 break;
    62         }
    63   }
    6466  tableMutex.leave(&hGlobalTableMutex);
    6567  return TRUE;
     
    7375        tableMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalTableMutex);
    7476        WindowHandleTable[hwnd] = 0;
    75         if(lowestFreeIndex == -1 || hwnd < lowestFreeIndex)
    76                 lowestFreeIndex = hwnd;
    77 
    7877        tableMutex.leave(&hGlobalTableMutex);
    7978  }
  • TabularUnified tags/trunk/src/user32/windowclass.cpp

    r15084 r15433  
    1 /* $Id: windowclass.cpp,v 1.13 2000-10-22 19:53:25 sandervl Exp $ */
     1/* $Id: windowclass.cpp,v 1.14 2001-01-02 18:14:59 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Code for OS/2
     
    400400{
    401401 Win32BaseWindow *wnd;
    402 
    403     dprintf(("USER32: GetClassLongA %x %d", hwnd, nIndex));
    404     wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    405     if(!wnd) {
    406         dprintf(("GetClassLongA wnd == NULL"));
    407         return(0);
    408     }
    409     return (wnd->getClass())->getClassLongA(nIndex);
     402 LONG ret;
     403
     404    wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     405    if(!wnd) {
     406        dprintf(("GetClassLongA %x %d wnd == NULL", hwnd, nIndex));
     407        return(0);
     408    }
     409    ret = (wnd->getClass())->getClassLongA(nIndex);
     410    dprintf(("USER32: GetClassLongA %x %d returned %x", hwnd, nIndex, ret));
     411    return ret;
    410412}
    411413//******************************************************************************
     
    414416{
    415417 Win32BaseWindow *wnd;
    416 
    417     dprintf(("USER32: GetClassLongW\n"));
    418     wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    419     if(!wnd) {
    420         dprintf(("GetClassLongW wnd == NULL"));
    421         return(0);
    422     }
    423     return (wnd->getClass())->getClassLongW(nIndex);
    424 }
    425 //******************************************************************************
    426 //******************************************************************************
     418 LONG ret;
     419
     420    wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     421    if(!wnd) {
     422        dprintf(("GetClassLongW %x %d wnd == NULL", hwnd, nIndex));
     423        return(0);
     424    }
     425    ret = (wnd->getClass())->getClassLongW(nIndex);
     426    dprintf(("USER32: GetClassLongW %x %d returned %x", hwnd, nIndex, ret));
     427    return ret;
     428}
     429//******************************************************************************
     430//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.