minor update. use vfork instead of fork. return the AROS PAGE_SIZE instead of getpage...
[AROS-Contrib.git] / dopus / Config / config.h
blobbe3f295e7ce4fdaed0752f9dac7c74afc5b59f78
1 /*
3 Directory Opus 4
4 Original GPL release version 4.12
5 Copyright 1993-2000 Jonathan Potter
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 All users of Directory Opus 4 (including versions distributed
22 under the GPL) are entitled to upgrade to the latest version of
23 Directory Opus version 5 at a reduced price. Please see
24 http://www.gpsoft.com.au for more information.
26 The release of Directory Opus 4 under the GPL in NO WAY affects
27 the existing commercial status of Directory Opus 5.
31 #ifdef DEBUG
32 #define bug kprintf
33 #define D(x) x
34 #else
35 #define D(x)
36 #endif
38 #if defined(__PPC__) || defined(__AROS__)
39 #undef __saveds
40 #define __saveds
41 #define __chip
42 #define __aligned __attribute__((__aligned__(4)))
43 #define lsprintf sprintf
44 #define __asm(A)
45 #define __stdargs
46 #define __regargs
47 #define _exit exit
48 #endif
50 //#include <fctype.h>
51 #include <ctype.h>
52 #include <string.h>
53 #include <stdlib.h>
54 #include <stdarg.h>
55 #include <stddef.h>
56 #include <exec/types.h>
57 #include <exec/memory.h>
58 #include <exec/execbase.h>
59 #include <dos/dos.h>
60 #include <dos/dosextens.h>
61 #include <dos/exall.h>
62 #include <intuition/intuitionbase.h>
63 #include <intuition/iobsolete.h>
64 #include <intuition/sghooks.h>
65 #include <graphics/gfxbase.h>
66 #include <graphics/gfxmacros.h>
67 #include <workbench/workbench.h>
68 #include <workbench/startup.h>
69 #include <diskfont/diskfont.h>
70 #include <proto/exec.h>
71 #include <proto/dos.h>
72 #include <proto/intuition.h>
73 #include <proto/graphics.h>
74 #include <proto/layers.h>
75 #include <proto/asl.h>
76 #include <proto/utility.h>
77 #include <proto/console.h>
78 #include <proto/locale.h>
79 #include <proto/dopus.h>
80 #include <proto/diskfont.h>
81 #include <proto/icon.h>
82 #include <proto/workbench.h>
83 #include <clib/alib_protos.h>
85 #include <proto/dopus.h>
86 #include <dopus/config.h>
87 #include <dopus/configflags.h>
88 #include <dopus/dopusmessage.h>
89 #include <dopus/stringdata.h>
90 #undef CONFIG_VERSION
92 #define NUM_MODULES 4
94 #define OSVER_34 0
95 #define OSVER_37 1
96 #define OSVER_38 2
97 #define OSVER_39 3
98 #define OSVER_40 4
100 #define GAD_BASE 1000
101 #define STRING_BASE 10000
102 #define REQ_BASE 11000
104 #define CONFIG_STRUCTURE_SIZE 9200
106 enum {
107 FONT_GENERAL,
108 FONT_DIRS,
109 FONT_TEXT,
110 FONT_GADGETS,
111 FONT_MENUS,
112 FONT_STATUS,
113 FONT_NAMES,
114 FONT_CLOCK,
115 FONT_REQUEST,
116 FONT_STRING,
117 FONT_ICONIFY,
118 FONT_SCREEN,
120 FONT_COUNT};
122 #define FFLAG_8ONLY 1
123 #define FFLAG_NOPROP 2
125 #define NUMFLAGS 16
126 #define MAXFUNCS 32
127 #define HIDDENLINES 6
129 #define FB_OUTPUTWIN 0
130 #define FB_OUTPUTFILE 1
131 #define FB_WB2F 2
132 #define FB_DOPUS2F 3
133 #define FB_RUNASYNC 4
134 #define FB_CDSOURCE 5
135 #define FB_CDDEST 6
136 #define FB_DOALLFILES 7
137 #define FB_RECURSEDIR 8
138 #define FB_RELOADFILE 9
139 #define FB_AUTOICONIFY 10
140 #define FB_NOQUOTE 11
141 #define FB_RESCANSOURCE 12
142 #define FB_RESCANDEST 13
143 #define FB_SHELLSTARTUP 14
144 #define FB_DOPUSSTARTUP 15
146 #define FF_OUTPUTWIN (1<<FB_OUTPUTWIN)
147 #define FF_OUTPUTFILE (1<<FB_OUTPUTFILE)
148 #define FF_WB2F (1<<FB_WB2F)
149 #define FF_DOPUS2F (1<<FB_DOPUS2F)
150 #define FF_RUNASYNC (1<<FB_RUNASYNC)
151 #define FF_CDSOURCE (1<<FB_CDSOURCE)
152 #define FF_CDDEST (1<<FB_CDDEST)
153 #define FF_DOALLFILES (1<<FB_DOALLFILES)
154 #define FF_RECURSEDIR (1<<FB_RECURSEDIR)
155 #define FF_RELOADFILE (1<<FB_RELOADFILE)
156 #define FF_AUTOICONIFY (1<<FB_AUTOICONIFY)
157 #define FF_NOQUOTE (1<<FB_NOQUOTE)
158 #define FF_RESCANSOURCE (1<<FB_RESCANSOURCE)
159 #define FF_RESCANDEST (1<<FB_RESCANDEST)
160 #define FF_SHELLSTARTUP (1<<FB_SHELLSTARTUP)
161 #define FF_DOPUSSTARTUP (1<<FB_DOPUSSTARTUP)
163 #define SFB_AUTOICONIFY 0
164 #define SFB_CDDEST 1
165 #define SFB_CDSOURCE 2
166 #define SFB_DOPUS2F 3
167 #define SFB_DOALLFILES 4
168 #define SFB_DOPUSSTARTUP 5
169 #define SFB_SHELLSTARTUP 6
170 #define SFB_NOQUOTE 7
171 #define SFB_OUTPUTFILE 8
172 #define SFB_OUTPUTWIN 9
173 #define SFB_RECURSEDIR 10
174 #define SFB_RELOADFILE 11
175 #define SFB_RESCANDEST 12
176 #define SFB_RESCANSOURCE 13
177 #define SFB_RUNASYNC 14
178 #define SFB_WB2F 15
180 #define FT_INTERNAL 0
181 #define FT_EXECUTABLE 1
182 #define FT_WORKBENCH 2
183 #define FT_BATCH 3
184 #define FT_AREXX 4
186 #define FT_REQUESTER 5
187 #define FT_CHDIR 99
189 #define FC_INTERNAL '*'
190 #define FC_WORKBENCH '%'
191 #define FC_BATCH '$'
192 #define FC_AREXX '&'
193 #define FC_REQUESTER '@'
194 #define FC_CHDIR '!'
196 #define MENUCOUNT 100
197 #define GADCOUNT 84
198 #define DRIVECOUNT 32
199 #define NUMFONTS 16
200 #define USEDRIVECOUNT 30
202 #define FTYC_MATCH 1
203 #define FTYC_MATCHNAME 2
204 #define FTYC_MATCHBITS 3
205 #define FTYC_MATCHCOMMENT 4
206 #define FTYC_MATCHSIZE 5
207 #define FTYC_MATCHDATE 6
208 #define FTYC_MOVETO 7
209 #define FTYC_MOVE 8
210 #define FTYC_SEARCHFOR 9
211 #define FTYC_MATCHI 10
212 #define FTYC_OR 253
213 #define FTYC_AND 254
214 #define FTYC_ENDSECTION 255
216 #define FTYC_ENDLIMIT 252
217 #define FTYC_COMMANDOK 11
218 #define FTYC_CYCLEEND 12
220 #define FILETYPE_FUNCNUM 16
222 struct fileclass {
223 struct fileclass *last,*next;
224 char type[32];
225 char typeid[8];
226 unsigned char *recognition;
229 extern struct TagItem scr_taglist[];
230 extern struct ExtNewScreen configscr;
231 extern struct NewWindow configwin,requestwin;
232 extern struct ExecBase *SysBase;
233 extern struct DOpusBase *DOpusBase;
234 extern struct GfxBase *GfxBase;
235 extern struct DosLibrary *DOSBase;
236 extern struct IntuitionBase *IntuitionBase;
237 extern struct muBase *muBase;
238 extern struct Screen *Screen;
239 extern struct Window *Window;
240 extern struct ViewPort *vp;
241 extern struct RastPort *rp;
242 extern struct Process *myproc;
243 extern struct IntuiMessage *IMsg;
244 extern APTR wsave,realwsave;
245 extern char *spacestring;
246 extern char fontbuf[50];
247 extern struct TextAttr sfont,bsfont;
248 extern struct Config *config,*undoconfig;
249 extern struct dopusfiletype *firsttype;
250 extern struct dopushotkey *firsthotkey;
251 extern struct dopusgadgetbanks *firstbank,*curbank;
252 extern struct DOpusRemember *typekey,*fontkey;
253 extern char configname[256],loadnamebuf[256];
254 extern char filebuf[256],dirbuf[258];
255 extern struct DOpusFileReq filereq;
256 extern int version2;
257 extern struct MsgPort *conport,*cmdport,*appport;
259 extern struct MsgPort *clip_port;
260 extern struct IOClipReq *clip_io;
263 struct ConfigStuff {
264 struct Config *config;
265 struct DOpusRemember *typekey;
266 struct dopusfiletype *firsttype;
267 struct dopusgadgetbanks *firstbank,*curbank;
268 struct dopushotkey *firsthotkey;
271 extern struct ConfigStuff cstuff;
272 extern struct DOpusRemember *mainkey,*gadgetkey,*tickkey,*screenkey,*clipkey,*buttonkey;
273 extern struct Gadget *maingad,*tickgad,*gadgads,*menugads,*drivegads;
274 extern int tickcount;
275 extern struct dopusconfigmsg msg;
277 extern struct TagItem taglist[2];
278 extern UWORD drawinfo[];
279 extern int lchanged,changed;
281 extern struct Image
282 *checkonimage,*checkoffimage,
283 *buttononimage,*buttonoffimage,
284 copy_checkonimage,copy_checkoffimage;
286 #define CTYPE_MOVEREL -3
287 #define CTYPE_MOVE -2
288 #define CTYPE_SKIP -1
289 #define CTYPE_TEXT 1
290 #define CTYPE_GAD 2
291 #define CTYPE_STR 3
292 #define CTYPE_REQ 4
293 #define CTYPE_RAD 5
294 #define CTYPE_MRAD 6
296 struct ConfigGadget {
297 char type;
298 char value;
299 int nameentry;
300 short x,y;
301 short w,h;
302 int bit;
303 int mutualex;
304 char *buffer;
305 struct Gadget *gad;
308 #define CFG_MAINMENU 11
309 #define CFG_GADGET 0
310 #define CFG_DRIVE 1
311 #define CFG_FILETYPE 2
312 #define CFG_HOTKEYS 3
313 #define CFG_MENU 4
314 #define CFG_OPERATION 5
315 #define CFG_SCREEN 6
316 #define CFG_SYSTEM 7
317 #define CFG_SAVE 8
318 #define CFG_OKAY 9
319 #define CFG_CANCEL 10
321 #define OP_COPY 0
322 #define OP_DATEFORMAT 1
323 #define OP_DELETE 2
324 #define OP_ERRORCHECK 3
325 #define OP_GENERAL 4
326 #define OP_ICONS 5
327 #define OP_FORMAT 6
328 #define OP_UPDATE 7
329 #define OP_OKAY 8
330 #define OP_CANCEL 9
332 #define SYS_AMIGADOS 0
333 #define SYS_CLOCK 1
334 #define SYS_DIRECTORIES 2
335 #define SYS_HOTKEYS 3
336 #define SYS_ICONS 4
337 #define SYS_MODULES 5
338 #define SYS_SHOWPATTERN 6
339 #define SYS_STARTUP 7
340 #define SYS_VIEWPLAY 8
341 #define SYS_OKAY 9
342 #define SYS_CANCEL 10
344 #define GAD_NEXTBANK 0
345 #define GAD_NEWBANK 1
346 #define GAD_COPYBANK 2
347 #define GAD_SWAPBANK 3
348 #define GAD_DELETEBANK 4
349 #define GAD_COPYGADGET 5
350 #define GAD_SWAPGADGET 6
351 #define GAD_DELETEGADGET 7
352 #define GAD_OKAY 8
353 #define GAD_CANCEL 9
355 #define MENU_COPYMENU 0
356 #define MENU_SWAPMENU 1
357 #define MENU_DELETEMENU 2
358 #define MENU_SORTMENU 3
359 #define MENU_INSERTITEM 4
360 #define MENU_COPYITEM 5
361 #define MENU_SWAPITEM 6
362 #define MENU_DELETEITEM 7
363 #define MENU_OKAY 8
364 #define MENU_CANCEL 9
365 #define MENU_MOVEUP 10
366 #define MENU_MOVEDOWN 11
367 #define MENU_SLIDER 12
369 #define DRIVE_GETDRIVES 0
370 #define DRIVE_COPYBANK 1
371 #define DRIVE_SWAPBANK 2
372 #define DRIVE_DELETEBANK 3
373 #define DRIVE_SORTBANK 4
374 #define DRIVE_COPYDRIVE 5
375 #define DRIVE_SWAPDRIVE 6
376 #define DRIVE_DELETEDRIVE 7
377 #define DRIVE_OKAY 8
378 #define DRIVE_CANCEL 9
379 #define DRIVE_EDITNAME 10
380 #define DRIVE_EDITSAMPLE 11
381 #define DRIVE_EDITREQ 12
382 #define DRIVE_EDITPATH 13
384 #define FILETYPE_NEW 0
385 #define FILETYPE_SWAP 1
386 #define FILETYPE_DELETE 2
387 #define FILETYPE_OKAY 3
388 #define FILETYPE_CANCEL 4
390 #define HOTKEYS_NEWHOTKEY 0
391 #define HOTKEYS_DELETE 1
392 #define HOTKEYS_DUPLICATE 2
393 #define HOTKEYS_OKAY 3
394 #define HOTKEYS_SWAP 4
395 #define HOTKEYS_CANCEL 5
397 #define EDIT_OKAY 0
398 #define EDIT_CANCEL 1
399 #define EDIT_EDITCLASS 2
400 #define EDIT_NAME 3
401 #define EDIT_SAMPLE 4
402 #define EDIT_NEWENTRY 5
403 #define EDIT_DUPLICATE 6
404 #define EDIT_SWAP 7
405 #define EDIT_DELETE 8
406 #define EDIT_STACK 9
407 #define EDIT_PRIORITY 10
408 #define EDIT_DELAY 11
409 #define EDIT_TYPE 12
410 #define EDIT_FUNC 13
411 #define EDIT_REQUESTER 14
412 #define EDIT_PATH 15
413 #define EDIT_ARGREQ 16
414 #define EDIT_FILETYPEACTION 17
416 #define CLASS_OKAY 0
417 #define CLASS_CANCEL 1
418 #define CLASS_TYPE 3
419 #define CLASS_NEWENTRY 4
420 #define CLASS_DUPLICATE 5
421 #define CLASS_SWAP 6
422 #define CLASS_DELETE 7
423 #define CLASS_OPERATION 8
424 #define CLASS_FUNC 9
425 #define CLASS_FILEVIEWREQ 10
426 #define CLASS_FILEVIEW 11
427 #define CLASS_HEXDEC 12
428 #define CLASS_VIEWSLIDER 13
429 #define CLASS_VIEWUP 14
430 #define CLASS_VIEWDOWN 15
431 #define CLASS_TYPEID 16
433 #define EDIT_FUNCTIONS 1
434 #define EDIT_FLAGS 2
435 #define EDIT_FUNCTIONTYPE 3
437 #define SCREEN_ARROWS 0
438 #define SCREEN_COLOURS 1
439 #define SCREEN_FONTS 2
440 #define SCREEN_GENERAL 3
441 #define SCREEN_PALETTE 4
442 #define SCREEN_SCREENMODE 5
443 #define SCREEN_SLIDERS 6
444 #define SCREEN_OKAY 7
445 #define SCREEN_CANCEL 8
447 #define PALETTE_SLIDER 100
448 #define PALETTE_STRING 103
450 #define COLOURS_SELECT 200
452 #define SCREENMODE_WIDTH 300
453 #define SCREENMODE_HEIGHT 301
454 #define SCREENMODE_DEPTH 302
455 #define SCREENMODE_DEFWIDTH 303
456 #define SCREENMODE_DEFHEIGHT 304
457 #define SCREENMODE_HALFHEIGHT 305
458 #define SCREENMODE_SLIDER 306
460 #define HOTKEY_SAMPLE 400
461 #define HOTKEY_MMB 401
463 #define FORMAT_MAXNUM 9
465 #define FORMAT_WINDOW 500
466 #define FORMAT_RESET 501
467 #define FORMAT_CLEAR 502
468 #define FORMAT_LENGTH 503
469 #define FORMAT_SEPARATE 510
470 #define FORMAT_REVERSESORT 511
471 #define FORMAT_SIZEKMG 512 // HUX
473 #define ICON_ICONREQ 600
474 #define ICON_ICONPATH 601
475 #define ICON_TOOLREQ 602
476 #define ICON_TOOLPATH 603
478 #define ARROWBASE 600
479 #define ARROWCYCLE 610
481 #define FONT_SIZE 700
483 #define SCREEN_SLIDER_LEFTCYCLE 800
484 #define SCREEN_SLIDER_RIGHTCYCLE 801
486 #define COLBIT_STATUS 0
487 #define COLBIT_SELDISKNAME 1
488 #define COLBIT_DISKNAME 2
489 #define COLBIT_SELDIRECTORY 3
490 #define COLBIT_DIRECTORY 4
491 #define COLBIT_SELFILE 5
492 #define COLBIT_FILE 6
493 #define COLBIT_SLIDERS 7
494 #define COLBIT_ARROWS 8
495 #define COLBIT_TINYGADS 9
496 #define COLBIT_CLOCK 10
497 #define COLBIT_REQUESTER 11
498 #define COLBIT_3DBOXES 12
499 #define COLBIT_STRINGS 13
500 #define COLBIT_SELSTRINGS 14
502 #define COLOURS_STATUS (1<<COLBIT_STATUS)
503 #define COLOURS_SELDISKNAME (1<<COLBIT_SELDISKNAME)
504 #define COLOURS_DISKNAME (1<<COLBIT_DISKNAME)
505 #define COLOURS_SELDIRECTORY (1<<COLBIT_SELDIRECTORY)
506 #define COLOURS_DIRECTORY (1<<COLBIT_DIRECTORY)
507 #define COLOURS_SELFILE (1<<COLBIT_SELFILE)
508 #define COLOURS_FILE (1<<COLBIT_FILE)
509 #define COLOURS_SLIDERS (1<<COLBIT_SLIDERS)
510 #define COLOURS_ARROWS (1<<COLBIT_ARROWS)
511 #define COLOURS_TINYGADS (1<<COLBIT_TINYGADS)
512 #define COLOURS_CLOCK (1<<COLBIT_CLOCK)
513 #define COLOURS_REQUESTER (1<<COLBIT_REQUESTER)
514 #define COLOURS_3DBOXES (1<<COLBIT_3DBOXES)
515 #define COLOURS_STRINGS (1<<COLBIT_STRINGS)
516 #define COLOURS_SELSTRINGS (1<<COLBIT_SELSTRINGS)
518 #define COLOURS_ALL ~0
520 struct ColourSel {
521 char item;
522 short x1,y1,x2,y2;
525 extern struct ColourSel coloursel[];
527 extern char
528 *mainmenugads[14],
529 *listviewgads[3],
530 *listviewgads2[4],
531 *operationgads[14],
532 *systemgads[14],
533 *gadgetgads[11],
534 *functypelist[],
535 ftype_funcmap[],
536 *functypestr[],
537 *editfuncgads[6],
538 *editfuncgads2[16],
539 *gadflaglist[17],
540 *editclassgads[10],
541 *menugadgets[11],
542 *drivegadgets[11],
543 *drivegadgets2[5],
544 *screengadgets[14],
545 *formatgadgets[11], // JRZ: was 10
546 *hotkeygadgets[3],
547 *arrowgadtxt[4],
548 *arrowtypetxt[3],
549 *filetypeactiongadgets[11],
551 *commandlist[95],
552 *arglist[18],
553 *classopslist[], // JRZ: was 12
555 *formatnames[FORMAT_MAXNUM+1],
556 *selectedformatnames[FORMAT_MAXNUM+1],
558 *defdir[],
559 *palettegadgets[],*coloursgadgets[],
560 *screenmodegadgets[],
561 *hotkeysgadgets[],
562 *windownames[2],*errorcheckingtxt[],*separatenames[3];
564 extern struct ConfigGadget
565 *operationgadgets[8],*systemgadgets[9],scr_generalgadgets[];
568 #define UNDO_MAIN 1
569 #define UNDO_GADGET 2
570 #define UNDO_MENU 4
571 #define UNDO_FILETYPE 8
572 #define UNDO_DRIVE 16
573 #define UNDO_HOTKEYS 32
574 #define UNDO_ALL (UNDO_MAIN|UNDO_GADGET|UNDO_MENU|UNDO_FILETYPE|UNDO_DRIVE|UNDO_HOTKEYS)
576 struct ConfigUndo {
577 struct Config *config;
578 struct newdopusfunction *menu;
579 struct dopusfunction *drive;
580 struct dopusfiletype *firsttype;
581 struct dopusgadgetbanks *firstbank;
582 struct DOpusRemember *key;
583 struct dopushotkey *firsthotkey;
584 char menutit[5][16];
587 extern struct ConfigUndo *makeundo();
588 extern char *getcopy(),*compilefunclist(),**makefiletypelist(),**makeclasslist();
589 extern struct dopusgadgetbanks *lastbank();
591 extern int fontplaceflags[],fontplacevals[];
592 extern struct RMBGadget nextbankrmb,insertbankrmb,formatclearrmb,sampleclearrmb;
593 extern struct DOpusListView
594 editlists[3],cmdlist,screenmodeview,listlist,iconlistview,
595 fontsizelistview,fontlistview,fontplacelist,editclasslist,hotkeyslist,
596 helplist,filetypeactionlist,
597 modulelist/*,languagelist*/;
598 extern char *external_module_list[],*external_module_name[];
599 extern int external_module_map[];
601 extern struct Gadget
602 editfuncgadgets[15],cmdcancelgad,menuslidergads[3],editdrivegadgets[4],
603 palettegads[6],coloursgad,screenmodegads[7],editclassgadgets[14],
604 listokaygad[3],formatgads[11 /* HUX: was 10 */],hotkeygad,hotkeymmbgad,arrowgadgets[8],
605 fontsizegadget,helpgad,helpcancelgad,draggad,icongads[4],depthgads[2],
606 screen_sliders_gadgets[];
608 extern struct Image menusliderimage;
609 extern struct PropInfo menusliderprop,paletteprop[3];
611 extern char
612 edit_namebuf[256],edit_stackbuf[7],edit_prioritybuf[5],edit_delaybuf[3],
613 edit_funcbuf[256],edit_pathbuf[256],edit_actionbuf[40],
614 palette_buf[3][4],screenwidth_buf[6],screenheight_buf[6],screendepth_buf[4],
615 formatlen_buf[5][8],fontsize_buf[12],edit_typeidbuf[8];
617 extern struct StringInfo namesinfo,funcsinfo;
619 #ifdef __SASC_60
620 extern __chip UBYTE
621 glass_data[2][18],uparrow_data[6],downarrow_data[6],
622 pageflip_data1[5],pageflip_data2[3];
623 #else
624 extern UBYTE
625 __chip glass_data[2][36],
626 __chip uparrow_data[12],
627 __chip downarrow_data[12],
628 __chip pageflip_data1[10],
629 __chip pageflip_data2[6];
630 #endif
632 extern struct IntuiMessage *getintuimsg();
634 extern struct newdopusfunction *selgad;
635 extern struct Gadget *seligad;
637 struct ScreenMode {
638 struct ScreenMode *next;
639 char name[80];
640 UWORD minw,minh;
641 UWORD maxw,maxh;
642 UWORD defw,defh;
643 UWORD maxdepth;
644 ULONG mode;
647 #define MODE_WORKBENCHUSE 1
648 #define MODE_WORKBENCHCLONE 2
649 #define MODE_PUBLICSCREENUSE 3
650 #define MODE_PUBLICSCREENCLONE 4
652 extern char **screenmodelist;
653 extern struct ScreenMode *firstmode,*screenmode;
654 extern struct ScreenMode *showdisplaydesc(),*getscreenmode();
656 #define SCRFLAGS_DEFWIDTH 1
657 #define SCRFLAGS_DEFHEIGHT 2
658 #define SCRFLAGS_HALFHEIGHT 4
660 extern struct MenuItem
661 projectitems[],edititems[],gadrowsitems[],classitems[],neatstuffitem;
662 extern struct Menu projectmenu,editmenu,gadrowsmenu,classmenu,neatstuffmenu;
664 extern int changed,curoperation,clipcount;
666 struct Clip {
667 struct Clip *next;
668 char name[256];
669 struct dopusfunction func;
672 extern struct Clip *firstclip;
674 extern UWORD defpalettes[11][4],def_dopus_palette[16];
675 extern struct DOpusListView palettelist,listformatlists[2];
676 extern int rowtrans[5];
678 extern struct Library *DiskfontBase;
679 extern struct Library *WorkbenchBase;
680 extern struct Library *IconBase;
681 extern struct TextFont *tfont;
682 extern char
683 *fontdatabuf,**fontlist,*(**fontsizelist),
684 **noproplist,*(**nopropsizelist),
685 **only8list,*only8sizelist[];
687 extern int gadflagvals[];
689 extern struct fileclass *firstclass;
690 extern int classopvals[];
691 extern char classname[256];
692 extern struct DOpusRemember *helpkey;
693 extern char *helpbuffer;
694 extern int helpsize;
695 extern char currenthelpname[256];
697 extern char **fileclasslist;
698 extern char *fileclasstype[];
699 extern char maxlength[5];
701 extern struct StringExtend stringex;
703 extern struct DiskObject dropboxobj;
704 extern struct DiskObject *dropboxicon;
705 extern void *appobject;
706 extern struct AppMessage *appmsg;
708 #define MY_APPOBJECT 1
710 extern unsigned char *fileview_buf;
711 extern int fileview_lines,fileview_size,fileview_topline,fileview_type,fileview_oldtop;
712 extern int fileview_offset,fileview_position;
713 extern char *fileview_types[];
715 extern char *icontypes[],*palettenames[14],*fontplacenames[FONT_COUNT+1];
717 extern struct IntuiText
718 newtext,opentext,savetext,saveastext,cuttext,copytext,
719 pastetext,erasetext,newclasstext,editclasstext,deleteclasstext,
720 clearclasstext,duplicateclasstext,clearcliptext,
721 gadrowstext[5],paintmodetext;
723 extern int network;
725 extern char *ftype_funcs[];
727 extern struct StringData stringdata;
729 extern short func_list_items[];
731 extern struct Border *gadget_dog_sel_border,*gadget_dog_unsel_border;
732 extern struct Border *gadget_sel_border,*gadget_unsel_border;
734 extern int x_off,y_off,x_bot,y_bot;
735 extern char help_ok;
736 extern int paint_state,paint_fg,paint_bg;
738 extern int screen_depth;
740 extern short
741 editfuncgadgets_xy[15][2],
742 editdrivegadgets_xy[4][2],
743 menuslidergads_xy[3][2],
744 palettegads_xy[6][2],
745 coloursgad_xy[2],
746 screenmodegads_xy[7][2],
747 formatgads_xy[11 /* HUX: was 10 */][2],
748 icongads_xy[4][2],
749 hotkeymmbgad_xy[2],
750 hotkeygad_xy[2],
751 arrowgadgets_xy[8][2],
752 fontsizegadget_xy[2],
753 editclassgadgets_xy[14][2],
754 screen_sliders_gadgets_xy[2][2];
756 #define FTFUNC_AUTOFUNC1 0
757 #define FTFUNC_AUTOFUNC2 1
758 #define FTFUNC_DOUBLECLICK 2
759 #define FTFUNC_CLICKMCLICK 3
760 #define FTFUNC_ANSIREAD 4
761 #define FTFUNC_AUTOFUNC3 5
762 #define FTFUNC_HEXREAD 6
763 #define FTFUNC_LOOPPLAY 7
764 #define FTFUNC_PLAY 8
765 #define FTFUNC_AUTOFUNC4 9
766 #define FTFUNC_READ 10
767 #define FTFUNC_SHOW 11
769 #define FREQ_FILETYPE 10
770 #define FREQ_FILECLASS 11
771 #define FREQ_ARGREQ 12
772 #define FREQ_PATHREQ 20
773 #define FREQ_GENERIC 21
775 struct ColourTable {
776 ULONG red;
777 ULONG green;
778 ULONG blue;
779 unsigned char pen;
780 char alloc;
783 extern struct ColourTable screen_pens[16];
785 extern short colour_box_xy[2][16][4],colour_box_num;
787 extern struct ScreenMode *curmode;
788 extern ULONG palette_backup[48];
789 extern struct DOpusRemember *borderkey;
790 extern short palettegad_xy[16][4];
791 extern int bpg;
793 extern char *left_right_cycle[3];
795 #include "configstrings.h"
797 #include "functions.h"