[comp.sys.mac.programmer] suspend/resume/mouse-moved events

avjewe@cvl.umd.edu (Andrew Donaldson Jewell) (06/29/88)

What exactly does (Get/Wait)NextEvent return for suspend, resume,
and MouseMoved events? What pieces of the event record
return what things?

Even with the MultiFinder Developers package from APDA, I could
only discover that they are "app4" events. 

Could someone tell me how to do this stuff?

		Andy Jewell
			avjewe@cvl.umd.edu

darin@Apple.COM (Darin Adler) (07/02/88)

In article <2950@cvl.umd.edu> avjewe@cvl.umd.edu (Andrew Donaldson Jewell) writes:
> What exactly does (Get/Wait)NextEvent return for suspend, resume,
> and MouseMoved events? What pieces of the event record
> return what things?

The events are app4Events, which means that the "what" field of the event
record contains the integer 15 for suspend, resume, and mouse-moved events.

The high byte of the "message" field of the event record is $01 for a suspend
or resume event, and $FA for a mouse-moved event. The low bit of the "message"
field is 0 for a suspend event and 1 for a resume event.
Darin Adler					       AppleLink: Adler4
UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin	  CSNET: darin@Apple.com

lsr@Apple.COM (Larry Rosenstein) (07/30/88)

In article <2950@cvl.umd.edu> avjewe@cvl.umd.edu (Andrew Donaldson Jewell) writes:
>
>What exactly does (Get/Wait)NextEvent return for suspend, resume,
>and MouseMoved events? What pieces of the event record
>return what things?

app4Evts are now considered OS Events.  The high byte of the message field
tells you what kind of OS Event.  It is $01 for suspend/resume events and
$FA for mouse moved events.

For suspend/resume events, the low order bit is 1 for a resume and 0 for a
suspend. 

		 Larry Rosenstein,  Object Specialist
 Apple Computer, Inc.  20525 Mariani Ave, MS 46-B  Cupertino, CA 95014
	    AppleLink:Rosenstein1    domain:lsr@Apple.COM
		UUCP:{sun,voder,nsc,decwrl}!apple!lsr