chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / win
1 ;
2 ; win.sh
3 ;
4 ; Window event dispatching
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 ;  win_eventHandler
32 ;  win_removeEventHandler
33 ;  win_swapWindow
34 ;  win_windowDeleted
35 ;  win_unknownHandler
36 ;  win_removeUnknownHandler
37 ;  win_init
38
39                 [       :LNOT::DEF:win__dfn
40                 GBLL    win__dfn
41
42 ; --- win_eventHandler ---
43 ;
44 ; On entry:     R0 == window handle
45 ;               R1 == pointer to routine to call
46 ;               R2 == R10 value to call routine with
47 ;               R3 == R12 value to call routine with
48 ;
49 ; On exit:      May return an error
50 ;
51 ; Use:          Adds a routine to the event handler list. Later added
52 ;               routines are called first. The event handing routine
53 ;               must preserve all the registers, but may alter the carry
54 ;               flag. If it returns with carry set, then no more event
55 ;               handlers, OR post-filters, will be called.
56
57                 IMPORT  win_eventHandler
58
59 ; --- win_removeEventHandler ---
60 ;
61 ; On entry:     R0 == window handle
62 ;               R1 == pointer to routine called
63 ;               R2 == R10 value routine is called with
64 ;               R3 == R12 value routine is called with
65 ;
66 ; On exit:      --
67 ;
68 ; Use:          Removes a routine to the event handler list.
69
70                 IMPORT  win_removeEventHandler
71
72 ; --- win_swapWindow ---
73 ;
74 ; On entry:     R0 == old window handle
75 ;               R1 == new window handle
76 ;
77 ; On exit:      --
78 ;
79 ; Use:          Searches for all the event handlers for window R0, and
80 ;               changes the window handle for R1.  This is designed for
81 ;               situations in wihich a window has been deleted and
82 ;               recreated.
83
84                 IMPORT  win_swapWindow
85
86 ; --- win_windowDeleted ---
87 ;
88 ; On entry:     R0 == window handle
89 ;
90 ; On exit:      --
91 ;
92 ; Use:          Removes all the event handlers associated with the given
93 ;               window handle.  It is intended to be used when a window
94 ;               has been deleted.
95
96                 IMPORT  win_windowDeleted
97
98 ; --- win_unknownHandler ---
99 ;
100 ; On entry:     R0 == pointer to routine to call
101 ;               R1 == R4 value to call routine with
102 ;               R2 == R10 value to call routine with
103 ;               R3 == R12 value to call routine with
104 ;
105 ; On exit:      May return an error
106 ;
107 ; Use:          Adds a rountine to the event handler list. Later added
108 ;               routines are called first. The event handing routine
109 ;               must preserve all the registers, but may alter the carry
110 ;               flag. If it returns with carry set, then no more event
111 ;               handlers, OR post-filters, will be called.
112
113                 IMPORT  win_unknownHandler
114
115 ; --- win_removeUnknownHandler ---
116 ;
117 ; On entry:     R0 == pointer to routine called
118 ;               R1 == R4 value routine is called with
119 ;               R2 == R10 value routine is called with
120 ;               R3 == R12 value routine is called with
121 ;
122 ; On exit:      --
123 ;
124 ; Use:          Removes a routine to the unknown handler list.
125
126                 IMPORT  win_removeUnknownHandler
127
128 ; --- win_init ---
129 ;
130 ; On entry:     --
131 ;
132 ; On exit:      --
133 ;
134 ; Use:          Initialises the win system.
135
136                 IMPORT  win_init
137
138                 ]
139
140 ;----- That's all, folks ----------------------------------------------------
141
142                 END