chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Steel / h / visdelay
1 /*
2  * videlay
3  *
4  *  Provides a bit more control than the original version
5  *
6  * © 1991-1998 Straylight
7  */
8
9 /*----- Licensing note ----------------------------------------------------*
10  *
11  * This file is part of Straylight's Steel library.
12  *
13  * Steel 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  * Steel 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 Steel.  If not, write to the Free Software Foundation,
25  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26  */
27
28 #ifndef __visdelay_h
29 #define __visdelay_h
30
31 /*
32  * This is a strcuture type only defined here for the use of the compiler to
33  * get the size right.  You should not rely on any part of the definition of
34  * this structure, or even that it will remain a structure.
35  */
36
37 typedef struct
38 {
39   int count;
40   int percent;
41 }
42 visdelay_state;
43
44 /*
45  * visdelay_init() is one of the biggest wastes of space in RISC_OSlib.
46  * Well, here we rectify the problem.  In no versions of visdelay included
47  * with ArmenLib will a call to visdelay_init() be necessary.
48  */
49
50 #define visdelay_init(x) ((void)0)
51
52 /*
53  * void visdelay_begin(void)
54  *
55  * Use
56  *  Starts the hourglass.
57  */
58
59 void visdelay_begin(void);
60
61 /*
62  * void visdelay_end(void)
63  *
64  * Use
65  *  Turns off the hourglass.  Note that calls to visdelay_begin() and
66  *  visdelay_end() must be matched.
67  */
68
69 void visdelay_end(void);
70
71 /*
72  * void visdelay_percent(int percent)
73  *
74  * Use
75  *  Puts up the little percentage indicator on the hourglass.
76  *
77  * Parameters
78  *  int percent == the percentage number to indicate.
79  */
80
81 void visdelay_percent(int percent);
82
83 /*
84  * visdelay_state visdelay_suspend(void)
85  *
86  * Use
87  *  Turns the hourglass right off.  It also returns information about the
88  *  current state of the hourglass so that it can be resumed.
89  *
90  * Returns
91  *  State information recorded in an undefined manner.
92  */
93
94 visdelay_state visdelay_suspend(void);
95
96 /*
97  * void visdelay_resume(visdelay_state state)
98  *
99  * Use
100  *  Returns the hourglass to the state it was in when the last
101  *  visdelay_suspend() call was made.
102  *
103  * Parameters
104  *  visdelay_state state == the hourglass state as returned by
105  *    visdelay_suspend().
106  */
107
108 void visdelay_resume(visdelay_state state);
109
110 #endif