[Next] [Previous] [Up] [Top] [Contents] [Index]

11.1 General Utilities

11.1.6 Window and Event Handling

void ECSModalDialog(ProcPtr proc, int *hit);

This function works just like the Macintosh Toolbox command ModalDialog(), except that it allows PsyScope to handle global events appropriately. Always use ECSModalDialog() instead of ModalDialog().

void RegisterWindow(WindowPtr wind, WindowProcRec *rec);

This function registers a non-modal window with the PsyScope Event Handler. WindowProcRec is a structure with detaiiled infomation for the Event Handler about the window. RegisterWindow() does not make a copy of rec, so it must be a valid pointer until DeregisterWindow() is called.

See "Chapter 12. Windows in PsyScope".

WindowProcRec *WindowProcs(WindowPtr wind);

This function returns the pointer registered to the window by RegisterWindow().

void DeregisterWindow(WindowPtr wind);

This function lets the Event Handler know that the given window -- previously registered with RegisterWindow() -- has closed.

#define WindProc(wind) ((WindowProcRec *)((WindowPeek)wind)->refCon)

Commonly, windows will keep a copy of the WindowProcRec pointer in thier refCon fields, although this is not required.This macro returns and properly typecasts this value.

pascal Boolean SuperKeyFilter(WindowPtr wind, EventRecord *event, 
	int *in_hit);

This function is generally used in place of the Macintosh Toolbox function combination IsDialogEvent() and DialogSelect(). It performs a number of special tasks, described in ??.

PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with CERN WebMaker