pre-carbon cleanup

This commit is contained in:
chombier 2002-11-22 16:45:45 +00:00
parent 68013734f9
commit f1231091f0
3 changed files with 15 additions and 0 deletions

View File

@ -170,4 +170,8 @@ int GUSI_sprintf(char * s, const char * format, ...);
#endif /* GUSI_SOURCE */
#if TARGET_API_MAC_CARBON
# define LMGetTicks() TickCount()
#endif
#endif /* _GUSIBasics_ */

View File

@ -347,6 +347,7 @@ void GUSIHandleNextEvent(long sleepTime)
if (WaitNextEvent(gGUSIEventMask|1, &event, sleepTime, nil))
switch (event.what) {
#if !TARGET_API_MAC_CARBON
case mouseDown:
if (!gGUSIEventHook[mouseDown]) {
WindowPtr win;
@ -355,6 +356,7 @@ void GUSIHandleNextEvent(long sleepTime)
return;
}
break;
#endif
case kHighLevelEvent:
AEProcessAppleEvent(&event); // Ignore errors

View File

@ -200,6 +200,7 @@ void GUSIConfiguration::DoAutoSpin() const
// <Member functions for class [[GUSIConfiguration]]>=
void GUSIConfiguration::DoAutoInitGraf()
{
#if !TARGET_API_MAC_CARBON
Ptr curA5 = LMGetCurrentA5();
if (!(reinterpret_cast<long>(curA5) & 1)
@ -208,6 +209,7 @@ void GUSIConfiguration::DoAutoInitGraf()
)
if (*reinterpret_cast<GrafPtr **>(curA5) != &qd.thePort)
InitGraf(&qd.thePort);
#endif
fAutoInitGraf = false;
}
// [[BrokenPipe]] raises a [[SIGPIPE]] signal if desired.
@ -222,6 +224,7 @@ void GUSIConfiguration::BrokenPipe()
void GUSIConfiguration::CheckInterrupt()
{
if (fSigInt) {
#if !TARGET_API_MAC_CARBON
EvQElPtr eventQ;
for (eventQ = (EvQElPtr) LMGetEventQueue()->qHead; eventQ; )
@ -231,6 +234,12 @@ void GUSIConfiguration::CheckInterrupt()
break;
} else
eventQ = (EvQElPtr)eventQ->qLink;
#else
if ( CheckEventQueueForUserCancel() ) {
raise(SIGINT);
FlushEvents(-1, 0);
}
#endif
}
}
// Checking for the Command-Period key combination is rather complex. Our technique is copied