Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
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); |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14