Initial revision
[ssr] / StraySrc / Libraries / Steel / h / nopoll
1 /*
2 * nopoll
3 * Provides handling for a dbox without polling (for error boxes and so
4 * on
5 *
6 * v. 1.00 (30 July 1991)
7 *
8 * © 1991-1998 Straylight
9 */
10
11 /*----- Licensing note ----------------------------------------------------*
12 *
13 * This file is part of Straylight's Steel library.
14 *
15 * Steel is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * Steel is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with Steel. If not, write to the Free Software Foundation,
27 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 */
29
30 #ifndef __nopoll_h
31 #define __nopoll_h
32
33 #ifndef __dbox_h
34 #include "dbox.h"
35 #endif
36
37 /*---------------------------------------------------------------------------
38
39 Support is provided for three action buttons, here referred to as 'OK',
40 'Cancel' and 'Other'. Fair enough? Good. 'OK' is the default action
41 button, which may also be selected by pressing return. Pressing escape
42 is equivalent to clicking Cancel. The 'Other' button (good, eh?) has no
43 keyboard equivalent. To indicate that you don't want a particular button
44 to exist, just pass -1 as the number.
45
46 ---------------------------------------------------------------------------*/
47
48 #define nopoll_OK 1
49 #define nopoll_CANCEL 2
50 #define nopoll_OTHER 3
51
52 #define nopoll_NOBUTTON -1
53
54 /*
55 * Flags for how you want the box to appear
56 */
57 typedef enum
58 {
59 nopoll_ASIS,
60 nopoll_CENTRE,
61 nopoll_ONPTR
62 }
63 nopoll_appearFlags;
64
65 /*
66 * void nopoll_showDbox(dbox d,nopoll_appearFlags flags)
67 *
68 * Use
69 * Displays a dbox on-screen without polling the WIMP. Useful
70 * for copyright windows and things.
71 *
72 * Parameters
73 * dbox d == the dbox handle
74 * nopoll_appearFlags flags == how you want the dbox to appear
75 */
76
77 void nopoll_showDbox(dbox d,nopoll_appearFlags flags);
78
79 /*
80 * int nopoll_doDbox
81 * (
82 * dbox d,
83 * nopoll_appearFlags flags,
84 * dbox_field OK,
85 * dbox_field cancel,
86 * dbox_field other
87 * )
88 *
89 * Use
90 * Opens a NoPoll dialogue box, continues until it gets a sensible result,
91 * closes it, and then returns the result.
92 *
93 * Parameters
94 * dbox d == the dialogue box you want to use for this.
95 * nopoll_appearFlags flags == how you want the box to appear (see above)
96 * dbox_field OK == the number of the OK button
97 * dbox_field cancel == the number of the Cancel button
98 * dbox_field other == the number of the Other button
99 *
100 * Returns
101 * One of the macros defined above, depending on what the user did.
102 */
103
104 int nopoll_doDbox
105 (
106 dbox d,
107 nopoll_appearFlags flags,
108 dbox_field OK,
109 dbox_field cancel,
110 dbox_field other
111 );
112
113 #endif