Initial revision
[ssr] / StraySrc / Libraries / Steel / h / tcol
1 /*
2 * Tcol
3 * A true-colour dialogue box thingy
4 *
5 * v. 1.00 24 July 1991
6 *
7 * © 1991-1998 Straylight
8 */
9
10 /*----- Licensing note ----------------------------------------------------*
11 *
12 * This file is part of Straylight's Steel library.
13 *
14 * Steel is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
17 * any later version.
18 *
19 * Steel is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Steel. If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29 #ifndef __tcol_h
30 #define __tcol_h
31
32 #ifndef __wimp_h
33 #include "wimp.h"
34 #endif
35
36 typedef enum
37 {
38 tcol_OK, /* User clicked OK, and dbox closed */
39 tcol_OK_REOPEN, /* User clicked OK, and dbox stays open */
40 tcol_CANCEL /* Dbox closed without changes (since last OK) */
41 }
42 tcol_reason;
43
44 /*
45 * A function to be called when all is said and done.
46 */
47 typedef void (*tcol_finishhandler)(tcol_reason r,
48 wimp_paletteword c,
49 void *handle);
50
51 /*
52 * void tcol
53 * (
54 * char *editing,
55 * wimp_paletteword c,
56 * BOOL isStatic,
57 * tcol_finishhandler proc,
58 * void *handle
59 * )
60 *
61 * Use
62 * Creates and handles a dbox, which allows the user to input a true
63 * colour. You must have a template called 'tcol' for this routine.
64 *
65 * Parameters
66 * char *editing == what we're editing (put in the little box at the top)
67 * wimp_paletteword c == the initial colour
68 * BOOL isStatic == whether the dbox is static
69 * tcol_finishhandler proc == procedure called when the user clicks OK
70 * void *handle == the jolly old handle
71 */
72
73 void tcol
74 (
75 char *editing,
76 wimp_paletteword c,
77 BOOL isStatic,
78 tcol_finishhandler proc,
79 void *handle
80 );
81
82 #endif