On 30 Nov 2002, at 0:18, P Witte wrote: > This is not documented anywhere in my Qptr manual!! (3rd revision) > so its the first I hear of it. It looks like its been in the code all along. > Ive needed such a call many a time! > > Apart from the timeout, are there any other parameters?
Enclosed a small text file with some explanations. Some of the comments in this are mine. Wolfgang ----------------- www.wlenerz.com
QPTR Updates The following features are available on the following systems: QDOS, Minerva, SMS2, SMSQ and SMSQ/E. Additional information on WM.ERSTR ================================== This manual did not mention that there is a limit on the length of own error messages. An own error messages is easy to create: LEA own_msg,A0 ; get address MOVE.L A0,D0 ; into our "error" register BSET #31,D0 ; an error is negative Now the limit: the length of the string is limited to 40 ($28) characters. If it is longer, "unknown error" is returned instead! Additional information on WM.LDRAW ================================== WM.LDRAW clears the change bit in the status are of every item which is selectively redrawn. Additions to the CONFIG standard ================================ The attributes for strings have been extended, to allow menu-driven CONFIG programs better options for a selection, depending on the type. There are two additional bits used in the string attributes: 8 and 9. These define the type of string, so that the CONFIG program can treat these strings in a special way. The possible combinations are: cfs.sspc equ %0000000000000001 ; string strip spaces cfs.file equ %0000000100000000 ; string is filename cfs.dir equ %0000001000000000 ; string is directory cfs.ext equ %0000001100000000 ; string is extension At present, these features are supported by the new MenuConfig, and ignored by the standard config. Undocumented SuperBASIC Procedure ================================= SPTR has never been documented. Easy to guess, it does the same as IOP.SPTR, i.e. moves the pointer to a given position. The syntax is: SPTR [#channel], xpos, ypos [,key] Option Default Meaning xpos, ypos none new pointer position key 1 origin key The origin key should be zero if the pointer coordinates are absolute. A key of -1 will set the position relative to the current window definition. A key of 1 will set it relative to the hit area. Undocumented selection keystroke for SuperBASIC =============================================== It is possible to put an underscore under a selection key for text loose menu items and text info items. To do this, specify the type to be text minus twice the underscore position. This means, to underscore the first character, give 0-2 (=-2), to underscore the fifth position give -10 etc. The following features are supported on the following systems: SMSQ and SMSQ/E from Version 2.71 onwards only. Additions to RPTR ================= The QPTR RPTR call has been modified to accept job events in the most significant byte of the termination parameter. The job event values are, therefore, multiplied by 256. Note that while all pointer events that have occurred since the call are returned in term%, only those job events (including pending events) which caused the return are returned in term%. term% = $2001 Return on button / keystroke or job event $20 RPTR #ch, xabs%,yabs%, term%, swnum%, xrel%, yrel%, bt$ Event 32 is notified by another job so the wait is terminated and term% is set. PRINT term% DIV 256 Prints 32 Additions to IOP.RPTR and Pointer Record ======================================== Bits 23 to 8 of the event vector in the pointer record are already used by the Window Manager. The 8 job events are, therefore, mapped into the most significant 8 bits (pp_jevnt) of the event vector within the pointer record and for the IOP.RPTR operating system call. Note that while all pointer events that have occurred since the call are filled into pt_pevnt in the pointer record, only those job events (including pending events) which caused the return are filled into pt_jevnt. New Pointer Event ================= Pointer event bit 6 (number 64) is now used to indicate that the pointer sprite has hit the edge of the screen. e New Operating System Calls ========================== ------------------------------------------------------------------------------ sms.sevt Send Event Trap #1, D0=$3A call return A0 destroyed D1 destination job ID destination job ID D2.b events to notify preserved Common error returns err.ijob The events in D2 are sent to the destination job. If the job is waiting for one of these events, the job is released, otherwise all the events are pended. SEND_EVENT job_id,event (job_id=composite nbr: job_tag*65536+job_nbr) SEND_EVENT "job_name",event SEND_EVENT jb_nbr,job_tag,event ------------------------------------------------------------------------------ sms.wevt Wait for Event Trap #1, D0=$3B call return A0 destroyed D2.b events to wait for events causing return D3.w timeout (-1 is forever) preserved Common error returns none The job waits for one or more of the events in D2 or the timeout. The events returned in D2 are removed from the job's pending event vector (event accumulator). result%=WAIT_EVENT(event%[,timeout%]) by default, timeout%=-1 ------------------------------------------------------------------------------ Vector $78 WM.RPTRT D2.B job events to return on D2.B preserved D3.W timeout D3.W preserved A0 A0 channel ID of window A1 A1 preserved A2 A2 preserved A3 A3 preserved A4 pointer to working defn A4 preserved A5 not used by any routine A6 not used by any routine Error returns: Any I/O sub system errors Any error returned by action or hit routine This routine does in general what WM.RPTR does, but allows the parameters D2 and D3 to be specified. from basic: RD_PTRT main_defn,item%,swnum%,event%,timeout%,xrel%,yrel%,main_lfl% the event% is passed in the high byte of the word, the lower byte is ignored event%=1 byte, * 256 (i.e. in high byte of word) eg, to get all events: %11111111 * 256 (which generates an error) use -1 if event% = 0 timeout% can't be -1, must be <>-1, solution: pass event% as 1 (this is ignored anyway)