2ee739cc |
1 | pendent extension colours. |
2 | R8=Window block to read from / 0 for default (!Config) settings. |
3 | \X R0=colour value read / old value if writing it. This is of the |
4 | form &BBGGRRZZ as above. |
5 | |
6 | Zap_FindInput |
7 | This call works out the current position of the 'input focus' in a window. If |
8 | the input caret is in this window then it returns it's offset. Otherwise it |
9 | returns the 'point' position (usually marked by an empty square). |
10 | \E R8/R9 |
11 | \X R0=most suitable offset to insert data. |
12 | |
13 | Zap_ClipCache |
14 | This call moves the cache reference point (w_cline/coff/clogl etc) to a given |
15 | point (using e_clnoff). |
16 | \E R0=Offset in line to move the cache reference point to. R8/R9 |
17 | |
18 | Zap_ModeData |
19 | This call reads or write the mode dependant options that Zap handles |
20 | automatically for you. See also Zap_ModeColour. Currently there is only one |
21 | word per mode storing the width and things like whether auto-indent is on or |
22 | not. You should use this call with R8=0 to write sensible default values if |
23 | your mode starts up and finds its mode word is zero. If you don't then the |
24 | default Text mode values will be used. |
25 | \E R0=value to write / -1 to read |
26 | R1=mode number |
27 | R2=variable number to read write |
28 | R8=window concerned / 0 for the default (!Config) settings. |
29 | \X R0=variable value if read / old value if written |
30 | Variables num: 0 b0-b15 stores the "width" for this mode |
31 | b16 auto indent bit (b16 of w_format) |
32 | b17 auto width bit (b6 of w_flags) |
33 | b18 strip spaces bit (b18 of w_format) |
34 | b19-b21 tab mode bits (b9-b11 of w_flags) |
35 | b19-b20 0=Unix 1=Edit 2=Coltab |
36 | b21=insert tabs as spaces |
37 | b22 hex entry mode bit (b5 of w_flags) |
38 | b23 overwrite bit (b1 of w_flags) |
39 | b24-b31 display bits (b8-b15 of w_format) |
40 | b24=line numbers shown |
41 | b25=line numbers as lines (not addr) |
42 | b26=line numbers in hex |
43 | b27=logical line nums (not physical) |
44 | b28-29 0=no tabs 1=spaces 2=> 3=-> |
45 | b30=line edit paradigm |
46 | b31=non standard editing |
47 | 1 b0-b2 Line number width |
48 | b3 Line number colons |
49 | b4 Internal use : font sub-styles off |
50 | b5 Infinite window wrap |
51 | b6 Use line selection paradigm |
52 | b7 Spell-as-you-type |
53 | b8 Big endian (b17 of w_format) |
54 | b9 Reserved |
55 | b10 Reserved |
56 | b11 Reserved |
57 | b12 Set if linewrap mode on (b26 w_flags) |
58 | b13 Set if wordwrap mode on (b13 w_flags) |
59 | b14 Reserved |
60 | b15 Reserved |
61 | b21 Free mouse clicks (b21 of w_format) |
62 | b22 Auto soft wrap (b22 of w_format) |
63 | b23 Confined cursor U/D (b23 of w_format) |
64 | b24 Confined cursor -> (b24 of w_format) |
65 | b25 Smart shift-cursor (b25 of w_format) |
66 | b26 Window-wrap (b26 of w_format) |
67 | b27 Soft-wrap (b27 of w_format) |
68 | ...other bits reserved... |
69 | 2+ reserved. |
70 | |
71 | Zap_WhichMode |
72 | This call decides which mode a given file should be displayed in. |
73 | \E R0=load address of file (containing the filetype) |
74 | R1=filename pointer / 0 if not known |
75 | b31=flag to determine the meaning of R10 on exit |
76 | \X R0=address of a data block of info about this file mode. |
77 | R10=If b31 of R1 was clear on entry then this is the mode number |
78 | of the default mode the file is loaded into (the mode is |
79 | loaded if necessary). If is was set then this is a pointer |
80 | to the mode name (mode not necessarily loaded). |
81 | |
82 | Zap_ModeNumber |
83 | This calls turns a mode name (given by a string) into a mode number. The mode |
84 | is loaded if not already resident in memory. |
85 | \E R0=mode name string terminated by <= space (&20) |
86 | \X R0=mode number or -1 if not found. |
87 | |
88 | Zap_SendDataSave |
89 | This call initiates the save protocol, saving data to another window or |
90 | application via RAM transfer or WimpScrap. It sends the data_save message and |
91 | all replies are handled automatically. |
92 | \E R2=proposed file/leaf name of the data (or 0 to use the file's) |
93 | R3=destination window handle or task handle |
94 | R4=destination icon handle (if R3=-2) |
95 | R5/R6=destination mouse coords (if applicable) |
96 | R7=routine to call after save finished (or 0 if none). |
97 | R8/R9=R8<>0 => Save whole file R8=window block R9=file block |
98 | R8=0 => Save currently selected region. |
99 | (or set b1 of R10 to save an arbitrary region). |
100 | R10=b0-b15 flags: |
101 | b0 set => External edit flag. In this case R3=ext edit |
102 | job handle and R4=ext edit task handle and |
103 | external edit message sent instead. |
104 | b1 set => R8=start address of data to save |
105 | R9=size of the data to save |
106 | b16-b31 of R10=filetype of data to save. |
107 | b16-b31 = extra data (see b1) |
108 | R11=data to pass to routine in R7 (if used). |
109 | \X Data transfer protocol initiated. |
110 | Sub pointed to by R7 is called with R11 as passed above and should |
111 | preserve R1+ as usual. |
112 | |
113 | Zap_Warning |
114 | Warns the user without generating an error. This opens a window with the |
115 | given message and pauses for the message to be seen before returning. Wimp |
116 | Poll is not called. |
117 | \E R0=warning message |
118 | R1=time to leave message open in cs (0 for default delay) |
119 | + flags: |
120 | b31 => Don't beep when opening the window |
121 | R8/R9=window in which to show the warning. |
122 | |
123 | Zap_AllWindow |
124 | Calls a given subroutine once for each valid Zap window. See also |
125 | Zap_EachWindow. |
126 | \E R0-R7=arguments to pass to the sub |
127 | R10=address of the sub to call (which must preserve all registers |
128 | except R0, and is called once for each window with R8/R9 |
129 | set up to be that window). |
130 | |
131 | Zap_ReadMenu |
132 | Converts a text file of the same format of Zap's 'Menu' file into a Zap menu |
133 | structure. |
134 | \E R0=start of a zero terminated menu text file (stored in memory) |
135 | \X R0=pointer to heap block containing the following information |
136 | #0 Number of valid menu handles for this file (first |
137 | number appearing in the file) |
138 | #4 Pointer to the menu structure (in Zap-Wimp format) for |
139 | handle 0 (or 0 if handle 0 not used) |
140 | #8 Pointer to structure for handle 1 |
141 | #12 Pointer to structure for handle 2 etc. |
142 | |
143 | Zap_LoadMenu |
144 | Converts a text menu file to a Zap menu structure. |
145 | \E R0=pointer to filename of the menu file |
146 | \X R0=list of menu handles as for Zap_ReadMenu |
147 | |
148 | Zap_OpenMenu |
149 | Opens a menu on the screen. The menu structure is handled automatically once |
150 | it has been opened. |
151 | \E R1=pointer to Zap-Wimp menu structure |
152 | R2=mouse x to open at |
153 | R3=mouse y to open at |
154 | R8/R9=window the menu is being opened on or 0's for none (eg the |
155 | iconbar menu). |
156 | |
157 | Zap_CallBack |
158 | Schedules a subroutine to be called again at a certain time but using wimp |
159 | null events. |
160 | \E R1=(earliest) monotonic time to call back at (>0) |
161 | or -(smallest delay before calling back) =< 0. |
162 | R2=address of routine to call. |
163 | R3=data to pass to the routine in R11. |
164 | The routine pointed to by R2 has conditions: |
165 | \E R1=current time R11=value passed in R3 |
166 | \X (must save R1+ as usual) |
167 | |
168 | Zap_DragBox |
169 | Starts a wimp drag box making sure you get called when it's finished. |
170 | \E R0=b0 set if you wish to be called repeatedly during the drag |
171 | b1+ reserved (set to 0) |
172 | R1=drag box block to be passed to Wimp_DragBox |
173 | R2=address of routine to call. |
174 | R3=data to pass to the routine in R11. |
175 | The routine pointed to by R2 has conditions: |
176 | \E R0=reason code 1=drag in progress 2=drag has just finished |
177 | R1=drag box posn as returned by wimp if R0=2 |
178 | R11=value passed in R3 |
179 | \X (must save R1+ as usual) |
180 | |
181 | Zap_SendMessage |
182 | Sends a wimp message and logs the message number (my_ref) so that any reply |
183 | can be forwarded to you. The message reference is held for at least a minute |
184 | and only deleted on a null event. |
185 | E R0=b0-b27 message action number (to go in R1,#16) |
186 | b28 set if you are interested in the reply. |
187 | b29 set if you want to be called when message deleted |
188 | b30-31 00 => Just send the message (with code 17) |
189 | 01 => Just acknowledge the message (with code 19) |
190 | 10 => Send the message recorded (with code 18) and call the |
191 | reply code if the message replied to. |
192 | 11 => Send the message recorded (with code 18) and call the |
193 | reply code if the message replied to or bounces. |
194 | R1=message block |
195 | R2=dest task handle/window handle |
196 | R3=b31 clear => This is the message length (is rounded up to next word) |
197 | b31 set => This is the offset of a string ending the message. |
198 | R4=icon handle if R2=-2 (iconbar) [not used otherwise] |
199 | R5=address of routine to call when message replied to [if b28 of R0] |
200 | (zero as a value means that you want any replies to be dealt with |
201 | as if they were normal messages and not a reply) |
202 | R6=private word to pass to routine on a reply [if b28 of R0] |
203 | X The message is sent as an original message. Hence the my_ref, length |
204 | and message action fields are filled in for you. R0=task handle of the |
205 | dest task (R2 on exit from Wimp_SendMessage) |
206 | Routine in R5 called with: |
207 | ;E R0=message type |
208 | 0 => message being removed from log list (see b29) |
209 | 17 => message replied to as normal |
210 | 19 => message bounced |
211 | R1=message block |
212 | R2=message number (R1!16) R11=private word R12=Zap's etc |
213 | ;X You can corrupt R0-R11 if R0=17,19 |
214 | You should save R1-R11 if R0=0 |
215 | |
216 | Zap_Reply |
217 | Replies to a message. It copies my_ref to your_ref for you can reads the task |
218 | handle of the task to reply to from the message block. The length word is |
219 | assumed to be unchanged. |
220 | E R0=message action number (as for SendMessage) |
221 | R1=message block (with ref etc) |
222 | R5/R6=routine to handle the reply if b28 of R0 (as for SendMessage) |
223 | |
224 | Zap_Extend |
225 | Changes the size of a heap block, making it smaller or bigger as for OS_Heap |
226 | with the extend action code. |
227 | \E R0=pointer to the heap block R1=signed change in the size |
228 | \X R0=new heap block pointer (it may have moved) |
229 | |
230 | Zap_ModeColourNum |
231 | Reads/writes the size of the colour palette used by a given mode. Maximum |
232 | size of a palette is currently 256 colours. Use R8=0 to read the default |
233 | values. NB If you enlarge the palette then please write some sensible values |
234 | for the new entries! |
235 | \E R0=new size of palette (in number of colours) / -1 to read |
236 | R1=mode number R8/R9=window or R8=0 for the default options. |
237 | \X R0=old size / read size. |
238 | |
239 | Zap_CreateThrowback |
240 | Creates a throwback buffer ready for lines being inserted by Zap_Throwback. |
241 | ;E R0=suggested width of window / 0 to use default width |
242 | ;X R0=window offset of window R8/R9=newly created throwback window |
243 | |
244 | Zap_Throwback |
245 | Inserts a line in a throwback file for you. |
246 | \E R0=file offset or line number of line with info on it |
247 | set b31 to suppress this being printed automatically. |
248 | R1=filename (of the file that R0 is an offset in) |
249 | R2=information string to print after the line number (eg "Bad syntax") |
250 | R3=string to precede filename (eg "Errors in file:") |
251 | R4=file offset of linked file / -1 if may not be loaded |
252 | R5=flags to use for the new entry (see f_links,#12) |
253 | R6=string to precede new info block (eg "Line num Error") |
254 | R7=string to go after filename (eg 10,"Search string: fred") |
255 | R8/R9=throwback window to add entry to |
256 | \X Throwback entry added and new title block given if file (or flags) |
257 | have changed KB # |
258 | The line number field is 10 characters wide if not suppressed. |
259 | |
260 | Zap_TestModeName |
261 | This calls determines whether or not a given mode is loaded. It returns |
262 | the mode number of the given mode or -1 if the mode is not loaded. |
263 | \E R0=mode name string terminated by <= space (&20) |
264 | \X R0=mode number or -1 if not loaded. |
265 | |
266 | Zap_UpdateArea |
267 | Forces an immediate redraw of a window area. The area in given in x,y |
268 | character col, row coordinates. |
269 | \E R1=redraw block (as for Wimp but in character coords - |
270 | ie window handle, min x col, min y row, max x col, max y row) |
271 | R8/R9 = window |
272 | \X Coordinates in R1 changed to OS coords and window updated |
273 | |
274 | Zap_UpdateWindow |
275 | Forces an immediate redraw of a window area. Entry and exit as for |
276 | Zap_UpdateArea except that coordinates are given in Window work area |
277 | OS coords. (Internally UpdateArea calls UpdateWindow after coordinate |
278 | conversion). |
279 | |
280 | Zap_UpdateWholeWindow |
281 | Force immediate redraw of the whole window |
282 | \E R8/R9 = window |
283 | |
284 | Zap_AllFiles |
285 | Calls a given subroutine once for each valid Zap file. See also |
286 | Zap_AllWindows and Zap_EachWindow. |
287 | \E R0-R7=arguments to pass to the sub |
288 | R10=address of the sub to call (which must preserve all registers |
289 | except R0, and is called once for each file with R9 set up |
290 | and R8 = 0. |
291 | |
292 | Zap_ReadValidateCommand |
293 | Translates a string into an executable block of command information. |
294 | E R10=pointer to string terminated by <&20 |
295 | X R0=-1 => args invalid (only tested if command loaded) |
296 | 0 => all ok |
297 | 1 => args valid for keymaps only (uses n form) |
298 | R1=parameter |
299 | R6=parameter type 0=none 1=num 2=usekeynum 3=stringblock 4=data |
300 | R7=command address |
301 | R10 updated to next non-white space which is not a ':' |
302 | CS if an external module has been loaded as a consequence |
303 | CC otherwise. |
304 | Error is generated if the command cannot be found. |
305 | (String of commands concatenated to a single Multicommand) |
306 | (:<return> skipped so can have multiple lines) |
307 | |
308 | Zap_ProcessKeyCommand |
309 | Calls a command using the same routine as used when a command is bound to a |
310 | key. For use mainly with Zap_ReadValidateCommand. |
311 | \E R0=data => The byte/word if mode 1/2 and ptr to data if mode 3+ |
312 | R2=call type with learn flag (usually 0) |
313 | R7=command address |
314 | R8-R10=window/file/cursor or 0 |
315 | \X Command called once with R1=1 |
316 | |
317 | Zap_ReturnWord |
318 | Calls the text mode e_returnword entry with given delimiters. This is mostly |
319 | of use to commands such as SelectUntil. |
320 | \E R0=flags |
321 | b0 => list are non-delimiters not delimiters |
322 | b1 => control characters form an implicit list |
323 | b2 => control characters are non-delimiters not delimiters |
324 | R1=list |
325 | \X R0=file offset |
326 | R1=length |
327 | |
328 | Zap_DoReplaceArea |
329 | Acts like Zap_ReplaceArea, only does not involve the mode, i.e. it uses |
330 | Zap_DoCommand, rather than Zap_Command. |
331 | \E R1=file offset of original data |
332 | R2=length of original data |
333 | R3=address of replacement data |
334 | R4=length of replacement data R9 |
335 | Calls Zap_ReplaceArea with R8=0 |
336 | |
337 | Zap_LogicalLine |
338 | Replaces e_clnlog in a manner which allows processing of the returned |
339 | parameters. Entry and exit conditions are exactly as for e_clnlog: |
340 | \E R0=logical line number R8/R9 |
341 | \X R0=file offset of line start |
342 | R1=physical line number |
343 | |
344 | Zap_PhysicalLine |
345 | Replaces e_clnphy in a manner which allows processing of the returned |
346 | parameters. Entry and exit conditions are exactly as for e_clnphy: |
347 | \E R0=physical line number R8/R9 |
348 | \X R0=file offset of line start |
349 | R1=logical line number |
350 | |
351 | Zap_OffsetLine |
352 | Replaces e_clnoff in a manner which allows processing of the returned |
353 | parameters. Entry and exit conditions are exactly as for e_clnoff: |
354 | \E R0=file offset R8/R9 |
355 | \X R0=physical line number |
356 | R1=file offset of physical line start |
357 | R2=logical line number |
358 | |
359 | Zap_NextLine |
360 | Replaces e_nextline in a manner which allows processing of the returned |
361 | parameters. Entry and exit conditions are exactly as for e_nextline: |
362 | \E R0=file offset of first 'shiftable' character |
363 | R1=signed change in file offset of this character R8/R9 |
364 | \X R0=file offset of first 'shiftable' line |
365 | R1=physical line number of this line # |
366 | You must preserve the split offset and split size of the file. |
367 | |
368 | Note that in the above four calls, the mode called is the mode specified by |
369 | the window block in R8. Calling the entry points of arbitrary modes is |
370 | currently only possible with this mechanism by manually poking the mode |
371 | number in temporarily. |
372 | Content-type: text/html
mdw@git.distorted.org.uk Git - ssr/blame - StraySrc/Libraries/Sapphire/csapph/h/tms
500 - Internal Server Error
Malformed UTF-8 character (fatal) at (eval 5) line 1, <$fd> line 755.