/* gio.h devdocs v1.0 © Almathera 1994, All Rights Reserved */


#ifndef GRAPHICS_GFXBASE_H
#include <graphics/gfxbase.h>
#endif

#ifndef INTUITION_INTUITIONBASE_H
#include <intuition/intuitionbase.h>
#endif

#define GIOF_LOADER8		1
#define GIOF_LOADER24	2
#define GIOF_SAVER8		4
#define GIOF_SAVER24		8
#define GIOF_LOADFILE	16
#define GIOF_SAVEFILE	32
#define GIOF_PLANAR		64				// data is loaded in planar format
#define GIOF_NOID			128			// not able to identify file 
												// (skip in universial loader search)
#define GIOF_NOFILEOPEN	256			// do file access internally
												// (giodata->Data and 
												// giodata->Filehandle are not set up)

IMPORTANT! Only fields marked as //* PUBLIC 
should be accessed in the GIO structure..


struct GIOData 
{
	struct	GIOData *Next;
	struct	GIOData *Prev;
	char		*Filename;								//* PUBLIC
	UBYTE		Data[64];								//* PUBLIC
	BPTR		Filehandle;								//* PUBLIC
	ULONG		Width;									//* PUBLIC
	ULONG		Height;									//* PUBLIC
	ULONG		Depth;									//* PUBLIC
	ULONG		P_width;
	ULONG		P_height;
	ULONG		P_top;
	ULONG		P_left;
	ULONG		VP_mode;									//* PUBLIC
	UWORD		Aspect_x;
	UWORD		Aspect_y;
	struct 	BitMap *Bitmap;
	APTR		*Linetable;
	APTR		*Linetable2;
	UBYTE		*Palette;								//* PUBLIC
	ULONG		Flags;									//* PUBLIC
	ULONG		Headerlength;							//* PUBLIC
	ULONG		Error;									//* PUBLIC
	ULONG		UserData;								//* PUBLIC - for your own use
	ULONG		UserData2;								//* PUBLIC - for your own use
	ULONG		UserData3;								//* PUBLIC - for your own use
	struct 	Library *PgsBase;						//* PUBLIC
	ULONG		SkipBytes;								//* PUBLIC
	struct 	Library *DOSBase;						//* PUBLIC
	struct	GfxBase *GfxBase;						//* PUBLIC
	struct	IntuitionBase *IntuitionBase;		//* PUBLIC
	struct	Library *UtilityBase;				//* PUBLIC
	struct	Library *GadtoolsBase;				//* PUBLIC
	struct	Library *AslBase;						//* PUBLIC
	struct	Library *ColorwheelBase;			//* PUBLIC
	ULONG 	obsolete;					
	struct 	Screen  *PgsScreen;					//* PUBLIC
};

#define LOAD_OK			 0
#define LOAD_RAMERR		 1
#define LOAD_FILEERR		 2
#define LOAD_WRONGTYPE	 3
#define LOAD_SYSERR		 4
#define LOAD_ABORTED		 5
#define LOAD_UNAVAILABLE 6

#define	PCLONG	ULONG
#define	PCWORD	UWORD
