chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / event
1 ;
2 ; event.sh
3 ;
4 ; Event handling routines
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 ;  event_preFilter
32 ;  event_fakeHandler
33 ;  event_postFilter
34 ;  event_poll
35 ;  event_last
36 ;  event_init
37
38                 [       :LNOT::DEF:event__dfn
39                 GBLL    event__dfn
40
41 ; --- event_preFilter ---
42 ;
43 ; On entry:     R0 == pointer to routine to call
44 ;               R1 == R12 value to call routine
45 ;
46 ; On exit:      May return an error
47 ;
48 ; Use:          Adds a routine to the pre-filter list. Later added
49 ;               routines are called first.
50
51                 IMPORT  event_preFilter
52
53 ; --- event_fakeHandler ---
54 ;
55 ; On entry:     R0 == pointer to routine to call
56 ;               R1 == R12 value to call routine
57 ;
58 ; On exit:      May return an error
59 ;
60 ; Use:          Adds a routine to the fake handler list. Later added
61 ;               routines are called first.
62
63                 IMPORT  event_fakeHandler
64
65 ; --- event_postFilter ---
66 ;
67 ; On entry:     R0 == pointer to routine to call
68 ;               R1 == R12 value to call routine
69 ;
70 ; On exit:      May return an error
71 ;
72 ; Use:          Adds a routine to the post-poll list. Later added
73 ;               routines are called first.
74
75                 IMPORT  event_postFilter
76
77 ; --- event_poll ---
78 ;
79 ; On entry:     R0 == event mask and flags
80 ;               R1 == pointer to block to use
81 ;               R2 == earliest time to return with NULL event
82 ;               R3 == optional pointer to poll word
83 ;
84 ; On exit:      R0 == reason code
85 ;               CS if the event was claimed, CC otherwise
86 ;
87 ; Use:          This call perform a Wimp_Poll, and dispatches events to
88 ;               interested parties.
89
90                 IMPORT  event_poll
91
92 ; --- event_last ---
93 ;
94 ; On entry:     --
95 ;
96 ; On exit:      R0 == last event code received from Wimp_Poll
97 ;               R1 == pointer to accompanying event data
98 ;
99 ; Use:          Allows you to read the full event information.  The event
100 ;               is the same one currently being or most recently dispatched
101 ;               to the postfilter list, i.e. fake events are also returned
102 ;               by this call.  If no event has yet been received, the return
103 ;               values are undefined.
104
105                 IMPORT  event_last
106
107 ; --- event_init ---
108 ;
109 ; On entry:     --
110 ;
111 ; On exit:      --
112 ;
113 ; Use:          Initialises the event system.
114
115                 IMPORT  event_init
116
117                 ]
118
119 ;----- That's all, folks ----------------------------------------------------
120
121                 END