[comp.sys.mac] PPostEvent returns a ptr to QElem?

kkim@uiucdcsb.UUCP (05/07/87)

    According to the Inside Mac, vol. 4, PPostEvent posts 
application-defined events into the event queue and returns 
a pointer to the created queue element.  And its syntax is

    FUNCTION PPostEvent(eventCode: INTEGER; eventMsg:LONGINT;
        VAR qEl: EvQEl) : OSErr
            ***  *****

1) My question is that, if qEl is a pointer to the created queue
element, qEl seems to have to be of type QElemPtr, not EvQEl
(as qHead field of type QHdr  and qLink field of type EvQEl
are of type QElemPtr).  BTW, is a variable of type EvQEl a
pointer at all?

2) Suppose that I want to change the evQModifiers field of the
created queue element.  Which of the following two expressions 
is proper?

    a) qEl.evQModifiers:=newvalue; {the fact that qEl if of type
        EvQEl seems to imply that this form is right.} OR
    b) eEl^.evQElem.evQModifiers:=newvaue; {the fact that PPostEvent
        returns a pointer to the created queue element seems to
	imply this form is correct.  If this form is correct, 
	qEl seems to have to be of type QElemPtr, not EvQEl}

3)  Also I would like to know where more information as to the above
problem can be found (I have already checked Inside Mac vols.1-4).

Please e-mail to me and I will post a summary.

Kyongsok KIM

Dept. of Computer Science; Univ. of Illinois at Urbana-Champaign

arpanet/csnet: kkim@a.cs.uiuc.edu
usenet/uucp  : {seismo, pur-ee, ihnp4}!uiucdcs!kkim