CoreSource/WindowDispatch.c

#include "CoreGlobals.h"
 
 
Handle  GetWData(WindowPtr  wp)
{
    return (Handle)GetWRefCon(wp);
}
 
 
void SetWData(WindowPtr wp, Handle data)
{
    SetWRefCon(wp,(long)data);
}
 
WindowPtr NewDispatchWindow(short ID)
/*
    This routine will create a window and allocate the event handler pointers
*/
{
    wDispHandle     disp;
    WindowPeek      wp;
    
    
    /* Get the window template */
    if(gColorQD)
        wp = (WindowPeek)GetNewCWindow(ID,nil,(WindowPtr)-1L);
        
    ShowWindow(wp);
    
    return (WindowPtr)wp;
}
 
void DisposeDispatchWindow(WindowPeek wp)
{
    DisposeWindow(wp);
}