add casts to zune macros to silence some warnings
[tangerine.git] / workbench / prefs / locale / global.h
blobd1009d558cfcc57113271b6985e7ab1f70871416
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef GLOBAL_H
7 #define GLOBAL_H
9 /*********************************************************************************************/
12 #ifndef DOS_DOS_H
13 #include <dos/dos.h>
14 #endif
16 #ifndef EXEC_MEMORY_H
17 #include <exec/memory.h>
18 #endif
20 #ifndef INTUITION_INTUITION_H
21 #include <intuition/intuition.h>
22 #endif
24 #ifndef INTUITION_SCREENS_H
25 #include <intuition/screens.h>
26 #endif
28 #ifndef INTUITION_IMAGECLASS_H
29 #include <intuition/imageclass.h>
30 #endif
32 #ifndef INTUITION_GADGETCLASS_H
33 #include <intuition/gadgetclass.h>
34 #endif
36 #ifndef INTUITION_CLASSUSR_H
37 #include <intuition/classusr.h>
38 #endif
40 #ifndef INTUITION_CLASSES_H
41 #include <intuition/classes.h>
42 #endif
44 #ifndef INTUITION_ICCLASS_H
45 #include <intuition/icclass.h>
46 #endif
48 #ifndef GRAPHICS_GFX_H
49 #include <graphics/gfx.h>
50 #endif
52 #ifndef GRAPHICS_GFXBASE_H
53 #include <graphics/gfxbase.h>
54 #endif
56 #ifndef GRAPHICS_CLIP_H
57 #include <graphics/clip.h>
58 #endif
60 #ifndef GRAPHICS_LAYERS_H
61 #include <graphics/layers.h>
62 #endif
64 #ifndef DEVICES_INPUTEVENT_H
65 #include <devices/inputevent.h>
66 #endif
68 #ifndef DEVICES_RAWKEYCODES_H
69 #include <devices/rawkeycodes.h>
70 #endif
72 #ifndef LIBRARIES_GADTOOLS_H
73 #include <libraries/gadtools.h>
74 #endif
76 #ifndef LIBRARIES_ASL_H
77 #include <libraries/asl.h>
78 #endif
80 #ifndef LIBRARIES_IFFPARSE_H
81 #include <libraries/iffparse.h>
82 #endif
84 #ifndef UTILITY_UTILITY_H
85 #include <utility/utility.h>
86 #endif
88 #ifndef UTILITY_TAGITEM_H
89 #include <utility/tagitem.h>
90 #endif
92 #ifndef LIBRARIES_LOCALE_H
93 #include <libraries/locale.h>
94 #endif
96 #ifndef CYBERGRAPHX_CYBERGRAPHICS_H
97 #include <cybergraphx/cybergraphics.h>
98 #endif
100 #ifndef DATATYPES_DATATYPES_H
101 #include <datatypes/datatypes.h>
102 #endif
104 #ifndef DATATYPES_DATATYPESCLASS_H
105 #include <datatypes/datatypesclass.h>
106 #endif
108 #define DT_V44_SUPPORT
110 #ifndef DATATYPES_PICTURECLASS_H
111 #include <datatypes/pictureclass.h>
112 #endif
114 #ifndef PREFS_LOCALE_H
115 #include <prefs/locale.h>
116 #endif
118 #ifndef PREFS_PREFHDR_H
119 #include <prefs/prefhdr.h>
120 #endif
122 /*********************************************************************************************/
124 #ifndef PROTO_EXEC_H
125 #include <proto/exec.h>
126 #endif
128 #ifndef PROTO_DOS_H
129 #include <proto/dos.h>
130 #endif
132 #ifndef PROTO_INTUITION_H
133 #include <proto/intuition.h>
134 #endif
136 #ifndef PROTO_GRAPHICS_H
137 #include <proto/graphics.h>
138 #endif
140 #ifndef PROTO_UTILITY_H
141 #include <proto/utility.h>
142 #endif
144 #ifndef PROTO_LOCALE_H
145 #include <proto/locale.h>
146 #endif
148 #ifndef PROTO_ALIB_H
149 #include <proto/alib.h>
150 #endif
152 #ifndef PROTO_GADTOOLS_H
153 #include <proto/gadtools.h>
154 #endif
156 #ifndef PROTO_ASL_H
157 #include <proto/asl.h>
158 #endif
160 #ifndef PROTO_IFFPARSE_H
161 #include <proto/iffparse.h>
162 #endif
164 #ifndef PROTO_CYBERGRAPHICS_H
165 #include <proto/cybergraphics.h>
166 #endif
168 #ifndef PROTO_DATATYPES_H
169 #include <proto/datatypes.h>
170 #endif
172 /*********************************************************************************************/
174 #include "vars.h"
176 #undef CATCOMP_STRINGS
177 #undef CATCOMP_NUMBERS
179 #define CATCOMP_NUMBERS
181 #include "strings.h"
183 /*********************************************************************************************/
185 #define USE_SHARED_COOLIMAGES 1
187 /*********************************************************************************************/
189 #define CONFIGNAME_ENV "ENV:Sys/locale.prefs"
190 #define CONFIGNAME_ENVARC "ENVARC:Sys/locale.prefs"
192 #define PAGECMD_INIT 1
193 #define PAGECMD_LAYOUT 2
194 #define PAGECMD_GETMINWIDTH 3
195 #define PAGECMD_GETMINHEIGHT 4
196 #define PAGECMD_SETDOMLEFT 5
197 #define PAGECMD_SETDOMTOP 6
198 #define PAGECMD_SETDOMWIDTH 7
199 #define PAGECMD_SETDOMHEIGHT 8
200 #define PAGECMD_MAKEGADGETS 9
201 #define PAGECMD_ADDGADGETS 10
202 #define PAGECMD_REMGADGETS 11
203 #define PAGECMD_REFRESH 12
204 #define PAGECMD_HANDLEINPUT 13
205 #define PAGECMD_PREFS_CHANGING 14
206 #define PAGECMD_PREFS_CHANGED 15
207 #define PAGECMD_CLEANUP 16
209 #define BORDER_X 4
210 #define BORDER_Y 4
211 #define TABBORDER_X 8
212 #define TABBORDER_Y 8
213 #define SPACE_X 4
214 #define SPACE_Y 4
216 #define BUTTON_EXTRAWIDTH 16
217 #define BUTTON_EXTRAHEIGHT 6
218 #define IMBUTTON_EXTRAWIDTH 4
219 #define IMBUTTON_EXTRAHEIGHT 4
221 /*********************************************************************************************/
223 struct ListviewEntry
225 struct Node node;
226 UBYTE name[30];
227 UBYTE realname[30];
230 struct CountryEntry
232 struct ListviewEntry lve;
233 Object *dto;
234 struct BitMap *flagbm;
235 WORD flagw;
236 WORD flagh;
240 struct LanguageEntry
242 struct ListviewEntry lve;
245 /*********************************************************************************************/
247 /* main.c */
249 void Cleanup(CONST_STRPTR msg);
250 void TellGUI(LONG cmd);
252 /* misc.c */
254 void InitMenus(void);
255 void MakeMenus(void);
256 void KillMenus(void);
257 void SetMenuFlags(void);
258 struct Node *FindListNode(struct List *list, WORD which);
259 void SortInNode(struct List *list, struct Node *node);
260 STRPTR GetFile(CONST_STRPTR title, CONST_STRPTR dir, BOOL savemode);
261 void ScrollListview(struct Gadget *gad, WORD delta);
263 /* page_language.c */
265 LONG page_language_handler(LONG cmd, IPTR param);
267 /* page_country.c */
269 LONG page_country_handler(LONG cmd, IPTR param);
271 /* page_timezone.c */
273 LONG page_timezone_handler(LONG cmd, IPTR param);
275 /* locale.c */
277 void InitLocale(STRPTR catname, ULONG version);
278 void CleanupLocale(void);
279 CONST_STRPTR MSG(ULONG id);
281 /* prefs.c */
283 void InitPrefs(STRPTR filename, BOOL use, BOOL save);
284 void CleanupPrefs(void);
285 BOOL LoadCountry(STRPTR name, struct CountryPrefs *country);
286 BOOL LoadPrefs(STRPTR filename);
287 BOOL SavePrefs(STRPTR filename);
288 BOOL DefaultPrefs(void);
289 void RestorePrefs(void);
291 /*********************************************************************************************/
292 /*********************************************************************************************/
294 #endif /* GLOBAL_H */