chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / wimp
1 ;
2 ; wimp.sh
3 ;
4 ; Starting and ending of Wimp tasks
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 ;  wimp_init
32 ;  wimp_taskHandle
33 ;  wimp_version
34 ;  wimp_strWidth
35
36                 [       :LNOT::DEF:wimp__dfn
37                 GBLL    wimp__dfn
38
39 ; --- wimp_init ---
40 ;
41 ; On entry:     R0 == pointer to application name
42 ;
43 ; On exit:      --
44 ;
45 ; Use:          Initialises the WindowManager, and stores away useful
46 ;               snippets of information, like the task handle we've been
47 ;               given.  It also registers an exit handler so that the Wimp
48 ;               gets closed down.
49
50                 IMPORT  wimp_init
51
52 ; --- wimp_taskHandle ---
53 ;
54 ; On entry:     --
55 ;
56 ; On exit:      R0 == the application's task handle
57 ;
58 ; Use:          Returns the application's task handle.
59
60                 IMPORT  wimp_taskHandle
61
62 ; --- wimp_version ---
63 ;
64 ; On entry:     --
65 ;
66 ; On exit:      R0 == the WIMP's version number (may not be the one the
67 ;                     client asked for)
68 ;
69 ; Use:          Returns the WindowManager's version number.
70
71                 IMPORT  wimp_version
72
73 ; --- wimp_strWidth ---
74 ;
75 ; On entry:     R0 == pointer to a string
76 ;
77 ; On exit:      R0 == width of the string in OS units
78 ;
79 ; Use:          Returns the width of a string, as it would be displayed in
80 ;               an icon (i.e. taking into account things like the current
81 ;               desktop font etc.)  The width is exact, so if you want to
82 ;               e.g. draw a box round it, you'll have to add on a little
83 ;               clearance at each end.  8 OS units seems to be a good size
84 ;               for the clearance (so the total width you'd use is given by
85 ;               wimp_strWidth(string)+16, because it has two ends).
86
87                 IMPORT  wimp_strWidth
88
89                 ]
90
91 ;----- That's all, folks ----------------------------------------------------
92
93                 END