2ee739cc |
1 | /* |
2 | * nopoll.h |
3 | * |
4 | * [Generated from nopoll, 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 __nopoll_h |
15 | #define __nopoll_h |
16 | |
17 | #ifndef __sapphire_h |
18 | #include "sapphire.h" |
19 | #endif |
20 | |
21 | /*----- Overview ----------------------------------------------------------* |
22 | * |
23 | * Functions provided: |
24 | * |
25 | * nopoll_open |
26 | * nopoll_close |
27 | * nopoll_init |
28 | * nopoll_process |
29 | */ |
30 | |
31 | /* --- nopoll_open --- * |
32 | * |
33 | * On entry: R0 == a window handle to take over |
34 | * |
35 | * On exit: -- |
36 | * |
37 | * Use: Sets up the window with the given handle to be a nonpolling |
38 | * dialogue box. The window must already be open on the screen. |
39 | * This call will force it to be painted on the screen, and |
40 | * then start faking events for it. |
41 | */ |
42 | |
43 | extern routine nopoll_open; |
44 | |
45 | /* --- nopoll_close --- * |
46 | * |
47 | * On entry: R0 == return value for nopoll_process (can be anything) |
48 | * |
49 | * On exit: -- |
50 | * |
51 | * Use: Tells nopoll that the nonpolling window has been killed, |
52 | * and hence that polling can return to normal again. You can |
53 | * specify a return value to give from nopoll_process (if that |
54 | * system is being used). |
55 | */ |
56 | |
57 | extern routine nopoll_close; |
58 | |
59 | /* --- nopoll_init --- * |
60 | * |
61 | * On entry: -- |
62 | * |
63 | * On exit: -- |
64 | * |
65 | * Use: Initialises nopoll so it can be used. |
66 | */ |
67 | |
68 | extern routine nopoll_init; |
69 | |
70 | /* --- nopoll_process --- * |
71 | * |
72 | * On entry: -- |
73 | * |
74 | * On exit: R0 == value passed to nopoll_close |
75 | * |
76 | * Use: Processes a nonpolling window until it calls nopoll_close. |
77 | * It then returns the value passed to nopoll_close in R0, |
78 | * which can be defined in any way you want. |
79 | * |
80 | * Some notes on the use of this routine: |
81 | * |
82 | * * It calls event_poll, so any functions that get called |
83 | * after the normal event_poll don't get called. Since the |
84 | * Wimp isn't actually being polled at all, this isn't a |
85 | * real problem as long as your handlers are registered at the |
86 | * event filter level or higher (e.g. win event handlers or |
87 | * even dbox handlers). |
88 | * |
89 | * * It uses up an extra 256 bytes of stack for a poll block. |
90 | * If you think you might miss this stack space, then you'd |
91 | * better not use this routine. |
92 | * |
93 | * * It isn't reentrant, but then again, nor is the rest of the |
94 | * nopoll system -- you can only have one nonpolling box open |
95 | * at a time. |
96 | */ |
97 | |
98 | extern routine nopoll_process; |
99 | |
100 | /*----- That's all, folks -------------------------------------------------*/ |
101 | |
102 | #endif |