2ee739cc |
1 | /* |
2 | * winUtils.h |
3 | * |
4 | * [Generated from winUtils, 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 __winUtils_h |
15 | #define __winUtils_h |
16 | |
17 | #ifndef __sapphire_h |
18 | #include "sapphire.h" |
19 | #endif |
20 | |
21 | /*----- Overview ----------------------------------------------------------* |
22 | * |
23 | * Functions provided: |
24 | * |
25 | * winUtils_setTitle |
26 | * winUtils_setPosition |
27 | * winUtils_findValid |
28 | * winUtils_shaded |
29 | */ |
30 | |
31 | /* --- winUtils_setTitle --- * |
32 | * |
33 | * On entry: R0 == pointer to string to set in title |
34 | * R1 == pointer to title bar buffer |
35 | * R2 == window handle to write to |
36 | * |
37 | * On exit: -- |
38 | * |
39 | * Use: Sets a window's title string. If the string is different, |
40 | * the title is redrawn. The contortion to do this is |
41 | * unpleasant, and is not to be performed in public. |
42 | */ |
43 | |
44 | extern routine winUtils_setTitle; |
45 | |
46 | /* --- winUtils_setPosition --- * |
47 | * |
48 | * On entry: R0 == window opening style |
49 | * R1 == pointer to window state block |
50 | * R2,R3 == extra arguments for displaying the window |
51 | * |
52 | * On exit: R2,R3 contain position for opening with Wimp_CreateMenu |
53 | * |
54 | * Use: Modifies the window state block pointed to by R0 so that the |
55 | * window appears as required in the given opening style. The |
56 | * window is always moved to the top. |
57 | */ |
58 | |
59 | extern routine winUtils_setPosition; |
60 | |
61 | /* --- winUtils_findValid --- * |
62 | * |
63 | * On entry: R0 == pointer to icon block |
64 | * R1 == character to find in block (not case-sensitive) |
65 | * R2 == old pointer to search from, or 0 |
66 | * |
67 | * On exit: R1 == character forced to lower case |
68 | * CS if found, and |
69 | * R2 points to command string |
70 | * else CC and |
71 | * R2 corrupted |
72 | * |
73 | * Use: Tries to find a validation string command in the given |
74 | * icon block. |
75 | */ |
76 | |
77 | extern routine winUtils_findValid; |
78 | |
79 | /* --- winUtils_shaded --- * |
80 | * |
81 | * On entry: R0 == window handle |
82 | * R1 == icon handle |
83 | * |
84 | * On exit: CS if icon is shaded, CC otherwise |
85 | * |
86 | * Use: Informs caller whether an icon is shaded in the Sapphire |
87 | * sense (ESG 31 or shaded bit set). |
88 | */ |
89 | |
90 | extern routine winUtils_shaded; |
91 | |
92 | /* --- Opening styles for winUtils_setPosition --- * |
93 | * |
94 | * These are actually the same as the dbox_open styles, without the flags |
95 | * bits. |
96 | */ |
97 | |
98 | #define wStyle_current 0 |
99 | #define wStyle_centre 1 |
100 | #define wStyle_pointer 2 |
101 | #define wStyle_givenY 3 |
102 | #define wStyle_givenXY 4 |
103 | |
104 | /*----- That's all, folks -------------------------------------------------*/ |
105 | |
106 | #endif |