#include <libraries/SysInfo.h>

#define err_nomem       0
#define err_nowin       1
#define err_nopor       2
#define err_noboo       3
#define err_nodev       4
#define err_nosta       5
#define err_nopre       6
#define err_nolis       7

#define idle_none       0
#define idle_executive  1
#define idle_own        2

#define col_label       0
#define col_format      1
#define col_base        2
#define col_current     3
#define col_negative    4
#define col_bright      5
#define col_dark        6
#define col_bg          7

#define bg_none         0
#define bg_file         1
#define bg_snap         2

#define win_normal      0
#define win_fixed       1

#define win_front       1
#define win_back        2

#define bd_none         0
#define bd_simple       1
#define bd_standard     2
#define bd_double       3

#define ind_centered    0
#define ind_left        1
#define ind_right       2

#define typ_none            0
#define typ_all             1
#define typ_chip            2
#define typ_fast            3
#define typ_volume          4
#define typ_idle            5
#define typ_retina          6
#define typ_largest_chip    7
#define typ_largest_fast    8
#define typ_largest_total   9
#define typ_largest_retina  10
#define typ_clock_          11
#define typ_simplelauncher  12
#define typ_iconlauncher    13
#define typ_image           14
#define typ_virtual         15
#define typ_appgadget       16

#define typ_gauge       0
#define typ_histmeter   1
#define typ_clock       2

struct tm_gau_set
{
    UWORD   type;
    UWORD   gauge_type;

    UWORD   size_y;     /* in 100+x percent of the font size ! */

    char    font[128];
    UWORD   font_size;

    char    label[16];
    char    format[128];

    char    expansion[128]; /* used for image type and volume */
    UWORD   indent;

    UWORD   sty_3d;
    UWORD   sty_border;
    UWORD   sty_bg;
    UWORD   sty_shadow;
    UWORD   sty_nogauge;
    UWORD   sty_noformat;
    UWORD   sty_nobase;

    struct  GAU_Color Colors[8];

    struct  tm_gau_set *next;
};

struct tm_lau_set
{
    UWORD   type;
    UWORD   gauge_type;

    UWORD   size_y;     /* in 100+x percent of the font size ! */

    char    font[128];
    UWORD   font_size;

    char    label[16];
    char    dummy1[128];

    char    file[128]; /* used for image type and volume */
    UWORD   indent;

    UWORD   sty_xen;
    UWORD   sty_border;
    UWORD   sty_bg;
    UWORD   sty_shadow;
    UWORD   sty_down;
    UWORD   sty_transparent;
    UWORD   dummy4;

    struct  GAU_Color Colors[8];

    struct  tm_gau_set *next;
};


struct tm_sys_set
{
    char    set_header[4];
    UWORD   set_version;

    UWORD   x_pos;
    UWORD   y_pos;
    UWORD   x_siz;
    UWORD   colums;

    char    pub_name[128];

    char    font_name[40];
    UWORD   font_size;

    UWORD   bg_type;
    char    bg_picture[126];
    BYTE    lay_falling;
    BYTE    pri;
    struct  GAU_Color bg_color;

    UWORD   vol_refresh;
    UWORD   mem_refresh;

    UWORD   start_wait;
    UWORD   start_usescreennotify;

    UWORD   win_move;
    UWORD   win_backfront;
    UWORD   win_border_x;
    UWORD   win_border_y;
    UWORD   win_space_x;
    UWORD   win_space_y;

    UWORD   bd_type;
    struct  GAU_Color bright_color;
    struct  GAU_Color dark_color;

    UWORD   Executive;

};

struct PathList
{
    BPTR NextPath;
    BPTR PathLock;
};

struct tm_data
{
    struct tm_gau_set   *list;
    struct Window       *win;
    struct Screen       *scr;
    struct BitMap       *bg_bm;
    struct TextFont     *Font[64];
    BOOL   on_public;
    UWORD  executive;
    UWORD  labelpos;
    UWORD  gauge_y_size[64];
    UWORD  gauge_y_pos[64];
    UWORD  gauge_y_size_falling[64];
    UWORD  gauge_x_size;
    UWORD  min_x_size;
    UBYTE  num_of_gaug;
    UBYTE  num_of_rows;
    ULONG  bg_color;
    ULONG  bright_color;
    ULONG  dark_color;
    Object *dt_object;
    struct Gadget       *gdg[64];
    struct PathList     *GlobalPath;
    BOOL   vmm;
    BOOL   scrnot;
    struct MsgPort      *appport;
    struct AppWindow    *appwin;
};
