Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / event
CommitLineData
2ee739cc 1/*
2 * event.h
3 *
4 * [Generated from event, 25 September 1996]
5 */
6
7#if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
9#endif
10
11#pragma include_only_once
12#pragma force_top_level
13
14#ifndef __event_h
15#define __event_h
16
17#ifndef __sapphire_h
18 #include "sapphire.h"
19#endif
20
21/*----- Overview ----------------------------------------------------------*
22 *
23 * Functions provided:
24 *
25 * event_preFilter
26 * event_fakeHandler
27 * event_postFilter
28 * event_poll
29 * event_last
30 * event_init
31 */
32
33/* --- event_preFilter --- *
34 *
35 * On entry: R0 == pointer to routine to call
36 * R1 == R12 value to call routine
37 *
38 * On exit: May return an error
39 *
40 * Use: Adds a routine to the pre-filter list. Later added
41 * routines are called first.
42 */
43
44extern routine event_preFilter;
45
46/* --- event_fakeHandler --- *
47 *
48 * On entry: R0 == pointer to routine to call
49 * R1 == R12 value to call routine
50 *
51 * On exit: May return an error
52 *
53 * Use: Adds a routine to the fake handler list. Later added
54 * routines are called first.
55 */
56
57extern routine event_fakeHandler;
58
59/* --- event_postFilter --- *
60 *
61 * On entry: R0 == pointer to routine to call
62 * R1 == R12 value to call routine
63 *
64 * On exit: May return an error
65 *
66 * Use: Adds a routine to the post-poll list. Later added
67 * routines are called first.
68 */
69
70extern routine event_postFilter;
71
72/* --- event_poll --- *
73 *
74 * On entry: R0 == event mask and flags
75 * R1 == pointer to block to use
76 * R2 == earliest time to return with NULL event
77 * R3 == optional pointer to poll word
78 *
79 * On exit: R0 == reason code
80 * CS if the event was claimed, CC otherwise
81 *
82 * Use: This call perform a Wimp_Poll, and dispatches events to
83 * interested parties.
84 */
85
86extern routine event_poll;
87
88/* --- event_last --- *
89 *
90 * On entry: --
91 *
92 * On exit: R0 == last event code received from Wimp_Poll
93 * R1 == pointer to accompanying event data
94 *
95 * Use: Allows you to read the full event information. The event
96 * is the same one currently being or most recently dispatched
97 * to the postfilter list, i.e. fake events are also returned
98 * by this call. If no event has yet been received, the return
99 * values are undefined.
100 */
101
102extern routine event_last;
103
104/* --- event_init --- *
105 *
106 * On entry: --
107 *
108 * On exit: --
109 *
110 * Use: Initialises the event system.
111 */
112
113extern routine event_init;
114
115/*----- That's all, folks -------------------------------------------------*/
116
117#endif