/**************************************************************************/
/* THIS FILE IS ONLY FOR THE PROGRAMMERS OUT THERE AND SHOULD BE          */
/*   OTHERWISE IGNORED.                                                   */
/**************************************************************************/
/* These structures are used with the status 31, 32 and 33 commands.      */
/* They are C language structures, but can also (with a bit of editing)   */
/*   be used from ARexx.                                                  */
/**************************************************************************/



/**************************************************************************/
/* Some general purpose defines                                           */
/**************************************************************************/

    #define GADGETCOUNT     168 /* Number of gadgets           */
    #define MENUCOUNT       100 /* Number of menus             */
    #define DRIVECOUNT      24  /* Number of drive gadgets     */
    #define ARCCOUNT        6   /* Number of archive functions */



/**************************************************************************/
/* These defines are used for the function type field of the gadgets      */
/*   and menus                                                            */
/**************************************************************************/

    #define FT_EXECUTABLE   0   /* This function is an executable program */
    #define FT_BATCH        1   /* This function is a batch file          */
    #define FT_AREXX        2   /* This function is an ARexx script       */



/**************************************************************************/
/* These defines are used for the flags field of the gadgets, menus,      */
/*   archives and filetypes                                               */
/**************************************************************************/

    #define FF_OUTPUTWIN    1   /* Output window               */
    #define FF_OUTPUTFILE   2   /* Output to file              */
    #define FF_WB2F         4   /* Workbench to front          */
    #define FF_DOPUS2F      8   /* Directory Opus to front     */
    #define FF_RUNASYNC     16  /* Run function asynchronously */
    #define FF_CDSOURCE     32  /* CD source directory         */
    #define FF_CDDEST       64  /* CD destination directory    */
    #define FF_DOALLFILES   128 /* Do all files                */
    #define FF_RECURSEDIR   256 /* Recursive directories       */
    #define FF_RELOADFILE   512 /* Reload each file            */



/**************************************************************************/
/* The dopusgadget structure is used to define one of the user            */
/*   configurable gadgets                                                 */
/**************************************************************************/

    struct dopusgadget {
        char name[10];          /* Gadget name, null terminated         */
        int flags,stack;        /* Function flags, Stack size           */
        unsigned char key,qual; /* Key code and qualifier               */
        char type,pri,delay;    /* Function type, Priority, Close delay */
        char fpen,bpen;         /* Front pen and Back pen               */
    };



/**************************************************************************/
/* The dopusmenu structure is used to define one of the user configurable */
/*   menus                                                                */
/**************************************************************************/

    struct dopusmenu {
        char name[15];          /* Menu name, null terminated           */
        int flags,stack;        /* Function flags, Stack size           */
        unsigned char key,qual; /* Key code and qualifier               */
        char type,pri,delay;    /* Function type, Priority, Close delay */
        char fpen,bpen;         /* Front pen and Back pen               */
    };



/**************************************************************************/
/* The dopusdrive structure is used to define one of the user             */
/*   configurable drive gadgets                                           */
/**************************************************************************/

    struct dopusdrive {
        char name[10];          /* Drive name, null terminated */
        char path[33];          /* Drive path, null terminated */
        unsigned char key,qual; /* Key code and qualifier      */
        char fpen,bpen;         /* Front pen and Back pen      */
    };



/**************************************************************************/
/* Each dopusarchive structure is used to define one of the six archiving */
/*   functions                                                            */
/**************************************************************************/

    struct dopusarchive {
        char name[12];          /* Archiver name, null terminated */
        int flags,stack;        /* Function flags, Stack size */
        char pri,delay;         /* Priority and Close delay */
    };



/**************************************************************************/
/* This is the big one. This structure contains almost all of the         */
/*   Directory Opus configuration information. The only stuff not kept    */
/*   here are the call functions for the gadgets, menus and archives,     */
/*   and the file type information                                        */
/**************************************************************************/

    struct Config {
        int magicword;          /* Magic identifier for the config        */
                                /*   structure                            */
        char pad[100];          /* Padding for future expansion           */
        USHORT Palette[16];     /* Palette of up to 16 colours            */
        char lace,              /* Interlaced screen (boolean)            */
             displayinfo,       /* Display info (boolean)                 */
             filedoubleclick,   /* File doubleclick (boolean)             */
             hiddenbit;         /* Hide files with hidden bit set         */
                                /*   (boolean)                            */
        int flags,stack;        /* Default run function flags and         */
                                /*    stack size                          */
        char closedelay,        /* Default run close delay                */
             rpriority,         /* Default run priority                   */
             showfree,          /* Show free; 0=Bytes,1=K/MBytes,         */
                                /*   2=Blocks, 3=Percentage               */
            smartparent;        /* Smart parent/root (boolean)            */
        UBYTE key,qual;         /* Hotkey code and qualifier              */
        char autodc,            /* Auto diskchange (boolean)              */
             cpumon,            /* CPU monitor (boolean)                  */
             arctype;           /* Archive type to use, 0 to 5            */
        short iconx,icony;      /* Iconfied window x and y positions      */
        char icontype,          /* Iconfied window type; 0=24hr clock,    */
                                /*   1=12hr clock, 2=No clock,            */
                                /*   3=No window                          */
             scrclktype,        /* Screen clock type; 0=24hr clock,       */
                                /*   1=12hr clock                         */
             priority,          /* Directory Opus priority                */
             showdelay,         /* Show delay                             */
             fontbuf[40],       /* Font to use (including .font suffix)   */
             arrowpos[3],       /* Arrow positions for up/down,           */
                                /*   left/right and buffer left/right     */
                                /*   0 = --<> ,1 = <>-- ,2 = <-->         */
             screenmode,        /* Special screen modes (only under 2.0); */
                                /*   0=NORMAL, 1=SUPERHIRES,              */
                                /*   2=PRODUCTIVITY                       */
             output[80],        /* Output window                          */
             outputcmd[80],     /* Output command                         */
             toolicon[80],      /* Tool icon to use for add icon          */
             projecticon[80],   /* Project icon to use for add icon       */
             drawericon[80],    /* Drawer icon to use for add icon        */
             defaulttool[80],   /* Default tool to use for add icon       */
             helpfile[80],      /* Help file                              */
             startupscript[80]; /* Auto ARexx script                      */
        struct dopusgadget
            gadget[GADGETCOUNT];/* Array of gadgets                       */
        struct dopusmenu
            menu[MENUCOUNT];    /* Array of menus                         */
        char menutit[5][15];    /* Titles of the five menus               */
        struct dopusdrive
            drive[DRIVECOUNT];  /* Array of drive gadgets                 */
        struct dopusarchive
            archive[ARCCOUNT];  /* Array of archivers                     */
        char copyflags,         /* Copy flags; 1=Keep datestamp,          */
                                /*   2=Keep protection, 4=Keep comments,  */
                                /*   8=Set archive bit                    */
             deleteflags,       /* Delete flags; 1=Ask before commencing, */
                                /*   2=Ask before files,                  */
                                /*   4=Ask before dirs,                   */
                                /*   8=Set delete protection bit          */
             updateflags,       /* Update flags; 1=Update free disk space,*/
                                /*   2=Scroll directory window to         */
                                /*     follow operations                  */
             errorflags,        /* Error flags; 1=Disable DOS requesters, */
                                /*   2=Display error requester            */
             replaceflags,      /* Replace flags; 1=Always, 2=Never,      */
                                /*   4=Older, 8=Ask                       */
             iconflags,         /* Icon flags; 1=Create with dirs,        */
                                /*   2=Perform actions on, 4=Auto select  */
             sepflags,          /* Separate flags; 1=Mix, 2=Dirs first,   */
                                /*   4=Files first                        */
             sortflags,         /* Sort flags; 1=Name, 2=Date, 4=Size     */
             gadgettopcol,      /* 3D-box top/left colour                 */
             gadgetbotcol,      /* 3D-box bottom/right colour             */
             statusfg,          /* Status text text colour                */
             statusbg,          /* Status text background colour          */
             filesfg,           /* Files text colour                      */
             filesbg,           /* Files background colour                */
             filesselfg,        /* Selected files text colour             */
             filesselbg,        /* Selected files background colour       */
             dirsfg,            /* Directories text colour                */
             dirsbg,            /* Directories background colour          */
             dirsselfg,         /* Selected directories text colour       */
             dirsselbg,         /* Selected directories background colour */
             clockfg,           /* Screen clock text colour               */
             clockbg,           /* Screen clock background colour         */
             requestfg,         /* Requester text colour                  */
             requestbg,         /* Requester background colour            */
             disknamefg,        /* Disk name text colour                  */
             disknamebg,        /* Disk name background colour            */
             disknameselfg,     /* Selected disk name text colour         */
             disknameselbg,     /* Selected disk name background colour   */
             scrdepth,          /* Screen depth; 2,3 or 4                 */
             autodirs[2][30],   /* Left and right auto directories        */
             showpat[40],       /* Show pattern                           */
             hidepat[40],       /* Hide pattern                           */
             slidercol,         /* Sliders pen colour                     */
             arrowfg,           /* Arrows foreground colour               */
             arrowbg,           /* Arrows background colour               */
             tinygadfg,         /* Tiny gadgets text colour               */
             tinygadbg,         /* Tiny gadgets background colour         */

             showpatpars[40],   /* Show pattern parsed by ARP PreParse()  */
                                /*   routine                              */
             hidepatpars[40],   /* Hide pattern parsed by ARP PreParse()  */
                                /*   routine                              */
             fadetime,          /* Fade time for picture viewer           */
             showblack;         /* Show black between pictures (boolean)  */
        int scrw,scrh;          /* Screen width and height                */
        char bufcount,          /* Number of buffered directories         */
             loadconfig,        /* Load ConfigOpus and keep in memory     */
                                /*   (boolean)                            */
             wbsize,            /* Use Workbench screen size (boolean)    */
             pad1[487];         /* Padding for future expansion           */
    };


/**************************************************************************/
/* A linked list of these structures is used to define the filetypes.     */
/**************************************************************************/

    struct dopusfiletype {
        struct dopusfiletype *next; /* Pointer to next filetype           */
        char type[40];              /* Name of this filetype              */
        char filepat[60];           /* Pattern to recognise filenames by  */
        char recogchars[100];       /* Characters to check files for      */
        char action[4][60];         /* Action strings for each of the     */
                                    /*   four function types              */
        int flags[4],stack[4];      /* Function flags and stack sizes     */
        char pri[4],delay[4];       /* Priorities and Close delays        */
        char *function[4];          /* Pointers to the four call          */
                                    /*   functions                        */
    };
