MCPcopy Create free account
hub / github.com/NetHack/NetHack / HandleEvent

Function HandleEvent

outdated/sys/mac/macwin.c:3210–3244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3208#endif /* !TARGET_API_MAC_CARBON */
3209
3210void
3211HandleEvent(EventRecord *theEvent)
3212{
3213 switch (theEvent->what) {
3214#if 1 //!TARGET_API_MAC_CARBON
3215 case autoKey:
3216 case keyDown:
3217 HandleKey(theEvent);
3218 break;
3219#endif
3220 case updateEvt:
3221 HandleUpdate(theEvent);
3222 break;
3223 case mouseDown:
3224 HandleClick(theEvent);
3225 break;
3226#if !TARGET_API_MAC_CARBON
3227 case diskEvt:
3228 if ((theEvent->message & 0xffff0000) != 0) {
3229 Point p = { 150, 150 };
3230 (void) DIBadMount(p, theEvent->message);
3231 }
3232 break;
3233#endif
3234#if !TARGET_API_MAC_CARBON
3235 case osEvt:
3236 DoOsEvt(theEvent);
3237 break;
3238#endif
3239 case kHighLevelEvent:
3240 AEProcessAppleEvent(theEvent);
3241 default:
3242 break;
3243 }
3244}
3245
3246/**********************************************************************
3247 * Interface definition, for windows.c

Callers 4

tgetchFunction · 0.85
tty_delay_outputFunction · 0.85
mac_get_nh_eventFunction · 0.85
mac_nhgetchFunction · 0.85

Calls 4

HandleKeyFunction · 0.85
HandleUpdateFunction · 0.85
HandleClickFunction · 0.85
DoOsEvtFunction · 0.85

Tested by

no test coverage detected