#ifndef GTX_SOURCE_H
#define GTX_SOURCE_H
/*
**      $Filename: GenGTXSource.h $
**      $Release: 1.0 $
**      $Revision: 38.4 $
**
**      Header for GenGTXource.
**
**      (C) Copyright 1992 Jaba Development.
**          Written by Jan van den Baard.
**/

/*
 *      Include a whole bunch of stuff
 */
#include <exec/types.h>
#include <exec/memory.h>
#include <dos/dos.h>
#include <dos/rdargs.h>
#include <dos/dostags.h>
#include <libraries/nofrag.h>
#include <libraries/gadtools.h>
#include <libraries/iffparse.h>
#include <libraries/locale.h>
#include <intuition/intuition.h>
#include <intuition/classes.h>
#include <intuition/classusr.h>
#include <intuition/imageclass.h>
#include <intuition/gadgetclass.h>
#include <intuition/sghooks.h>
#include <graphics/gfx.h>
#include <graphics/gfxmacros.h>
#include <workbench/workbench.h>
#include <workbench/startup.h>
#include <workbench/icon.h>
#include <gadtoolsbox/gtxbase.h>
#include <gadtoolsbox/hotkey.h>
#include <gadtoolsbox/forms.h>
#include <gadtoolsbox/prefs.h>
#include <gadtoolsbox/gui.h>

#ifndef abs
#define abs
#endif

#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#include <clib/alib_protos.h>
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/nofrag_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/iffparse_protos.h>
#include <clib/intuition_protos.h>
#include <clib/graphics_protos.h>
#include <clib/utility_protos.h>
#include <clib/icon_protos.h>
#include <clib/gtx_protos.h>
#include <clib/locale_protos.h>

/*
 *      Include CatComp header *without* the STRINGARRAY!
 *      The string array is included and exported in
 *      "LocaleStrings.c".
 */
#include "GenGTXSource_locale.h"

/*
 *      DICE macros for "MakeProto".
 */
#define Prototype                   extern
#define Local                       static

/*
 *      Shell arguments.
 */
struct ShellArgs {
    UBYTE               *Name;              /* GUI file name */
    UBYTE               *SourceName;        /* Source output name */
    UBYTE               *BuiltIn;           /* BuildIn language */
    UBYTE               *Catalog;           /* Catalog to use */
    UBYTE               *Prepend;           /* User catalog strings */
    LONG                *CatVersion;        /* Catalog version to open */
    LONG                 Quiet;             /* Quiet mode? */
};

/*
 *      Duplicate string detection.
 */
struct StringNode {
    struct StringNode   *sn_Next;
    struct StringNode   *sn_Prev;
    UBYTE               *sn_String;
    UWORD                sn_Number;
};

struct StringList {
    struct StringNode   *sl_First;
    struct StringNode   *sl_EndMark;
    struct StringNode   *sl_Last;
};

struct ArrayNode {
    struct AarayNode    *an_Next;
    struct ArrayNode    *an_Prev;
    UBYTE              **an_Array;
    UWORD                an_Number;
};

struct ArrayList {
    struct ArrayNode    *al_First;
    struct ArrayNode    *al_EndMark;
    struct ArrayNode    *al_Last;
};

/*
 *      Miscellanious macros.
 */
#define SET(v,b)                    ((ULONG)v&(ULONG)b)
#define NSET(v,b)                   (((ULONG)v&(ULONG)b)!=(ULONG)b)
#define STAT                        (SourceConfig.gc_GenCFlags0&CS0_STATIC)
#define NSTAT                       ((STAT)!=CS0_STATIC)

/*
 *      Define the AppString structure since
 *      this is not included above.
 */
struct AppString {
    LONG            as_ID;
    STRPTR          as_Str;
};

/*
 *      A shortcut to get to the string.
 */
#define STRING(n)                   AppStrings[ n ].as_Str

/*
 *      Generated by "MakeProto". (See DMakeFile...)
 */
#include "GenGTXProtos.h"

#endif
