Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / tspr
1 ;
2 ; tspr.sh
3 ;
4 ; Toolsprite hacking for things like border sizes
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
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)
16 ; any later version.
17 ;
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.
22 ;
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.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ; tspr_getSprAddr
32 ; tspr_borderWidths
33 ; tspr_adjustBox
34
35 [ :LNOT::DEF:tspr__dfn
36 GBLL tspr__dfn
37
38 ; --- tspr_getSprAddr ---
39 ;
40 ; On entry: --
41 ;
42 ; On exit: R0 == pointer to tool sprites, or 0 if none
43 ;
44 ; Use: Returns a pointer to the toolsprites. If the user is using
45 ; RISC OS 2, or there are no toolsprites defined, then
46 ; 0 is returned.
47
48 IMPORT tspr_getSprAddr
49
50 ; --- tspr_borderWidths ---
51 ;
52 ; On entry: --
53 ;
54 ; On exit: R0 == title bar height
55 ; R1 == vertical scroll bar width
56 ; R2 == horizontal scroll bar height
57 ;
58 ; Use: Return the width of window tools by looking at the
59 ; sprites associated with them, rather than creating
60 ; a temporary window.
61
62 IMPORT tspr_borderWidths
63
64 ; --- tspr_adjustBox ---
65 ;
66 ; On entry: R1 == pointer to Wimp_OpenWindow block to modify
67 ;
68 ; On exit: Block updated in place
69 ;
70 ; Use: Updates the open block to ensure that the window is opened
71 ; on the screen.
72
73 IMPORT tspr_adjustBox
74
75 ]
76
77 ;----- That's all, folks ----------------------------------------------------
78
79 END