Ignore:
Timestamp:
Jan 2, 2000, 8:30:47 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

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

    r2290 r2292  
    1 /* $Id: winproc.cpp,v 1.1 2000-01-01 14:57:38 cbratschi Exp $ */
     1/* $Id: winproc.cpp,v 1.2 2000-01-02 19:30:47 cbratschi Exp $ */
    22/*
    33 * Window procedure callbacks
     
    4949
    5050/**********************************************************************
    51  *           WINPROC_GetPtr
     51 *           WINPROC_GetPtr
    5252 *
    5353 * Return a pointer to the win proc.
     
    5959
    6060    if(ptr == NULL) {
    61         return NULL;
     61        return NULL;
    6262    }
    6363
     
    7676
    7777/**********************************************************************
    78  *           WINPROC_AllocWinProc
     78 *           WINPROC_AllocWinProc
    7979 *
    8080 * Allocate a new window procedure.
     
    9191    /* Check if the function is already a win proc */
    9292
    93     if ((oldproc = WINPROC_GetPtr( func )))
     93    oldproc = WINPROC_GetPtr( func );
     94    if (oldproc)
    9495    {
    9596        *proc = *oldproc;
     
    119120
    120121/**********************************************************************
    121  *           WINPROC_GetProc
     122 *           WINPROC_GetProc
    122123 *
    123124 * Get a window procedure pointer that can be passed to the Windows program.
     
    135136
    136137/**********************************************************************
    137  *           WINPROC_SetProc
     138 *           WINPROC_SetProc
    138139 *
    139140 * Set the window procedure for a window or class. There are
    140141 * three tree classes of winproc callbacks:
    141142 *
    142  * 1) class  -> wp                      -       not subclassed
    143  *    class  -> wp -> wp -> wp -> wp    -       SetClassLong()
     143 * 1) class  -> wp                      -       not subclassed
     144 *    class  -> wp -> wp -> wp -> wp    -       SetClassLong()
    144145 *             /           /
    145  * 2) window -'           /             -       not subclassed
    146  *    window -> wp -> wp '              -       SetWindowLong()
    147  *
    148  * 3) timer  -> wp                      -       SetTimer()
    149  *
    150  * Initially, winproc of the window points to the current winproc 
    151  * thunk of its class. Subclassing prepends a new thunk to the 
    152  * window winproc chain at the head of the list. Thus, window thunk 
    153  * list includes class thunks and the latter are preserved when the 
     146 * 2) window -'           /             -       not subclassed
     147 *    window -> wp -> wp '              -       SetWindowLong()
     148 *
     149 * 3) timer  -> wp                      -       SetTimer()
     150 *
     151 * Initially, winproc of the window points to the current winproc
     152 * thunk of its class. Subclassing prepends a new thunk to the
     153 * window winproc chain at the head of the list. Thus, window thunk
     154 * list includes class thunks and the latter are preserved when the
    154155 * window is destroyed.
    155156 *
     
    162163
    163164    if(func == NULL) {
    164         *(WINDOWPROC **)pFirst = 0;
    165         return TRUE;
     165        *(WINDOWPROC **)pFirst = 0;
     166        return TRUE;
    166167    }
    167168
     
    177178            {
    178179                if ((*ppPrev)->user != user)
    179                 {
    180                     /* terminal thunk is being restored */
    181 
    182                     WINPROC_FreeProc( *pFirst, (*ppPrev)->user );
    183                     *(WINDOWPROC **)pFirst = *ppPrev;
    184                     return TRUE;
    185                 }
    186                 bRecycle = TRUE;
    187                 break;
    188             }
     180                {
     181                    /* terminal thunk is being restored */
     182
     183                    WINPROC_FreeProc( *pFirst, (*ppPrev)->user );
     184                    *(WINDOWPROC **)pFirst = *ppPrev;
     185                    return TRUE;
     186                }
     187                bRecycle = TRUE;
     188                break;
     189            }
    189190        }
    190191        else
     
    197198            }
    198199        }
    199            
     200
    200201        /* WPF_CLASS thunk terminates window thunk list */
    201202        if ((*ppPrev)->user != user) break;
     
    229230
    230231/**********************************************************************
    231  *           WINPROC_FreeProc
     232 *           WINPROC_FreeProc
    232233 *
    233234 * Free a list of win procs.
     
    246247
    247248/**********************************************************************
    248  *           WINPROC_GetProcType
     249 *           WINPROC_GetProcType
    249250 *
    250251 * Return the window procedure type.
     
    259260
    260261/**********************************************************************
    261  *           CallWindowProc32A    (USER32.18)
     262 *           CallWindowProc32A    (USER32.18)
    262263 *
    263264 * The CallWindowProc() function invokes the windows procedure _func_,
     
    280281 * CONFORMANCE
    281282 *
    282  *   ECMA-234, Win32 
    283  */
    284 LRESULT WINAPI CallWindowProcA( 
     283 *   ECMA-234, Win32
     284 */
     285LRESULT WINAPI CallWindowProcA(
    285286    WNDPROC func, /* window procedure */
    286287    HWND hwnd, /* target window */
     
    319320
    320321/**********************************************************************
    321  *           CallWindowProc32W    (USER32.19)
     322 *           CallWindowProc32W    (USER32.19)
    322323 */
    323324LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg,
Note: See TracChangeset for help on using the changeset viewer.