4 ; Saving data to other applications
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
33 [ :LNOT::DEF:save__dfn
38 ; On entry: R0 == window handle to send to
39 ; R1 == icon handle to send to
40 ; R2 == estimated size of the data
41 ; R3 == file type of data to send and flag:
42 ; bit 31: use R8 as below
43 ; R4 == pointer to name of file (may be full path)
44 ; R5 == address of handler block
45 ; R6 == value to pass handlers in R10
46 ; R7 == value to pass handlers in R12
47 ; R8 == pointer to extra handler block (only if bit 31 of R3)
51 ; Use: Starts a save operation to another application. The extra
52 ; handler is used by systems like saveas which need to be
53 ; aware of data transfer start/end conditions without
54 ; interfering with the normal entry table. This will not
55 ; normally concern applications however.
59 ;----- The save handler -----------------------------------------------------
62 sEntry__save # 4 ;Write to a file
64 ; R0 == pointer to file name
65 ; R1 == 0 if file unsafe,
70 sEntry__send # 4 ;Send a block of data
72 ; R2 == 0 for first call,
75 ; R0 == pointer to block
77 ; R2 == value to pass to
79 ; CS if this is the last one
81 sEntry__success # 4 ;Data transfer has finished
83 ; R0 == pointer to filename
88 sEntry__failed # 4 ;Data transfer failed
90 ; R0 == 0 or ptr to error
97 ;----- That's all, folks ----------------------------------------------------