#ifndef  CLIB_GRAPHICS_PROTO_H
#define  CLIB_GRAPHICS_PROTO_H
/* "graphics.library" */
#ifndef  GRAPHICS_GFX_H
#include <graphics/gfx.h>
#endif
#ifndef  GRAPHICS_DISPLAYINFO_H
#include <graphics/displayinfo.h>
#endif
/*------ BitMap primitives ------*/
LONG BltBitMap( struct BitMap *srcBitMap, WORD xSrc, WORD ySrc,
	struct BitMap *destBitMap, WORD xDest, WORD yDest, WORD xSize,
	WORD ySize, UBYTE minterm, UBYTE mask, PLANEPTR tempA );
void BltTemplate( PLANEPTR source, WORD xSrc, WORD srcMod,
	struct RastPort *destRP, WORD xDest, WORD yDest, WORD xSize,
	WORD ySize );
/*------ Text routines ------*/
void ClearEOL( struct RastPort *rp );
void ClearScreen( struct RastPort *rp );
WORD TextLength( struct RastPort *rp, STRPTR string, UWORD count );
LONG Text( struct RastPort *rp, STRPTR string, UWORD count );
LONG SetFont( struct RastPort *rp, struct TextFont *textFont );
struct TextFont *OpenFont( struct TextAttr *textAttr );
void CloseFont( struct TextFont *textFont );
ULONG AskSoftStyle( struct RastPort *rp );
ULONG SetSoftStyle( struct RastPort *rp, ULONG style, ULONG enable );
/*------	Gels routines ------*/
void AddBob( struct Bob *bob, struct RastPort *rp );
void AddVSprite( struct VSprite *vSprite, struct RastPort *rp );
void DoCollision( struct RastPort *rp );
void DrawGList( struct RastPort *rp, struct ViewPort *vp );
void InitGels( struct VSprite *head, struct VSprite *tail,
	struct GelsInfo *gelsInfo );
void InitMasks( struct VSprite *vSprite );
void RemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
void RemVSprite( struct VSprite *vSprite );
void SetCollision( ULONG num, void (*routine)(struct VSprite *vSprite, APTR),
	struct GelsInfo *gelsInfo );
void SortGList( struct RastPort *rp );
void AddAnimOb( struct AnimObj *anOb, struct AnimObj **anKey,
	struct RastPort *rp );
void Animate( struct AnimObj **anKey, struct RastPort *rp );
BOOL GetGBuffers( struct AnimObj *anOb, struct RastPort *rp, BOOL flag );
void InitGMasks( struct AnumObj *anOb );
/*------	General graphics routines ------*/
void DrawEllipse( struct RastPort *rp, WORD xCenter, WORD yCenter, WORD a,
	WORD b );
LONG AreaEllipse( struct RastPort *rp, WORD xCenter, WORD yCenter, WORD a,
	WORD b );
void LoadRGB4( struct ViewPort *vp, UWORD *colors, WORD count );
void InitRastPort( struct RastPort *rp );
void InitVPort( struct ViewPort *vp );
void MrgCop( struct View *view );
void MakeVPort( struct View *view, struct ViewPort *vp );
void LoadView( struct View *view );
void WaitBlit( void );
void SetRast( struct RastPort *rp, UBYTE pen );
void Move( struct RastPort *rp, WORD x, WORD y );
void Draw( struct RastPort *rp, WORD x, WORD y );
LONG AreaMove( struct RastPort *rp, WORD x, WORD y );
LONG AreaDraw( struct RastPort *rp, WORD x, WORD y );
LONG AreaEnd( struct RastPort *rp );
void WaitTOF( void );
void QBlit( struct bltnode *blit );
void InitArea( struct AreaInof *areaInfo, APTR vectorBuffer,
	WORD maxVectors );
void SetRGB4( struct ViewPort *vp, WORD index, UBYTE red, UBYTE green,
	UBYTE blue );
void QBSBlit( struct bltnode *blit );
void BltClear( PLANEPTR memBlock, ULONG byteCount, ULONG flags );
void RectFill( struct RastPort *rp, WORD xMin, WORD yMin, WORD xMax,
	WORD yMax );
void BltPattern( struct RastPort *rp, PLANEPTR mask, WORD xMin, WORD yMin,
	WORD xMax, WORD yMax, UWORD maskBPR );
ULONG ReadPixel( struct RastPort *rp, WORD x, WORD y );
LONG WritePixel( struct RastPort *rp, WORD x, WORD y );
BOOL Flood( struct RastPort *rp, ULONG mode, WORD x, WORD y );
void PolyDraw( struct RastPort *rp, WORD count, WORD *polyTable );
void SetAPen( struct RastPort *rp, UBYTE pen );
void SetBPen( struct RastPort *rp, UBYTE pen );
void SetDrMd( struct RastPort *rp, UBYTE drawMode );
void InitView( struct View *view );
void CBump( struct UCopList *copList );
void CMove( struct UCopList *copList, APTR destination, WORD data );
void CWait( struct UCopList *copList, WORD v, WORD h );
LONG VBeamPos( void );
void InitBitMap( struct BitMap *bitMap, BYTE depth, WORD width, WORD height );
void ScrollRaster( struct RastPort *rp, WORD dx, WORD dy, WORD xMin, WORD yMin,
	WORD xMax, WORD yMax );
void WaitBOVP( struct ViewPort *vp );
WORD GetSprite( struct SimpleSprite *sprite, WORD num );
void FreeSprite( WORD num );
void ChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite,
	PLANEPTR newData );
void MoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, WORD x,
	WORD y );
void LockLayerRom( struct Layer *layer );
void UnlockLayerRom( struct Layer *layer );
void SyncSBitMap( struct Layer *layer );
void CopySBitMap( struct Layer *layer );
void OwnBlitter( void );
void DisownBlitter( void );
void InitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer, LONG size );
void AskFont( struct RastPort *rp, struct TextAttr *textAttr );
void AddFont( struct TextFont *textFont );
void RemFont( struct TextFont *textFont );
PLANEPTR AllocRaster( UWORD width, UWORD height );
void FreeRaster( PLANEPTR p, UWORD width, UWORD height );
void AndRectRegion( struct Region *region, struct Rectangle *rectangle );
BOOL OrRectRegion( struct Region *region, struct Rectangle *rectangle );
struct Region *NewRegion( void );
BOOL ClearRectRegion( struct Region *region, struct Rectangle *rectangle );
void ClearRegion( struct Region *region );
void DisposeRegion( struct Region *region );
void FreeVPortCopLists( struct ViewPort *vp );
void FreeCopList( struct CopList *copList );
void ClipBlit( struct RastPort *srcRP, WORD xSrc, WORD ySrc,
	struct RastPort *destRP, WORD xDest, WORD yDest, WORD xSize,
	WORD ySize, UBYTE minterm );
BOOL XorRectRegion( struct Region *region, struct Rectangle *rectangle );
void FreeCprList( struct cprlist *cprList );
struct ColorMap *GetColorMap( LONG entries );
void FreeColorMap( struct ColorMap *colorMap );
ULONG GetRGB4( struct ColorMap *colorMap, LONG entry );
void ScrollVPort( struct ViewPort *vp );
struct CopList *UCopperListInit( struct UCopList *uCopList, WORD n );
void FreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, BOOL flag );
void BltBitMapRastPort( struct BitMap *srcBitMap, WORD xSrc, WORD ySrc,
	struct RastPort *destRP, WORD xDest, WORD yDest, WORD xSize,
	WORD ySize, UBYTE minterm );
BOOL OrRegionRegion( struct Region *srcRegion, struct Region *destRegion );
BOOL XorRegionRegion( struct Region *srcRegion, struct Region *destRegion );
BOOL AndRegionRegion( struct Region *srcRegion, struct Region *destRegion );
void SetRGB4CM( struct ColorMap *colorMap, WORD index, UBYTE red, UBYTE green,
	UBYTE blue );
void BltMaskBitMapRastPort( struct BitMap *srcBitMap, WORD xSrc, WORD ySrc,
	struct RastPort *destRP, WORD xDest, WORD yDest, WORD xSize,
	WORD ySize, UBYTE minterm, PLANEPTR bltMask );
BOOL AttemptLockLayerRom( struct Layer *layer );
/*--- functions in V36 or higher (distributed as Release 2.0 Beta) ---*/
APTR GfxNew( ULONG gfxNodeType );
void GfxFree( APTR gfxNodePtr );
void GfxAssociate( APTR associateNode, APTR gfxNodePtr );
void BitMapScale( struct BitScaleArgs *bitScaleArgs );
UWORD ScalerDiv( UWORD factor, UWORD numerator, UWORD denominator );
WORD TextExtent( struct RastPort *rp, STRPTR string, WORD count,
	struct TextExtent *textExtent );
ULONG TextFit( struct RastPort *rp, STRPTR string, UWORD strLen,
	struct TextExtent *textExtent, struct TextExtent *constrainingExtent,
	WORD strDirection, UWORD constrainingBitWidth,
	UWORD constrainingBitHeight );
APTR GfxLookUp( APTR associateNode );
BOOL VideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
struct MonitorSpec *OpenMonitor( STRPTR monitorName, ULONG displayID );
BOOL CloseMonitor( struct MonitorSpec *monitorSpec );
DisplayInfoHandle FindDisplayInfo( ULONG displayID );
ULONG NextDisplayInfo( ULONG displayID );
void AddDisplayInfo( APTR displayInfoRecord );
void AddDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf, ULONG size,
	ULONG tagID, ULONG displayID );
void SetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf, ULONG size,
	ULONG tagID, ULONG displayID );
ULONG GetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf, ULONG size,
	ULONG tagID, ULONG displayID );
void FontExtent( struct TextFont *font, struct TextExtent *fontExtent );
LONG ReadPixelLine8( struct RastPort *rp, UWORD xstart, UWORD ystart,
	UWORD width, UBYTE *array, struct RastPort *tempRP );
LONG WritePixelLine8( struct RastPort *rp, UWORD xstart, UWORD ystart,
	UWORD width, UBYTE *array, struct RastPort *tempRP );
LONG ReadPixelArray8( struct RastPort *rp, UWORD xstart, UWORD ystart,
	UWORD xstop, UWORD ystop, UBYTE *array, struct RastPort *temprp );
LONG WritePixelArray8( struct RastPort *rp, UWORD xstart, UWORD ystart,
	UWORD xstop, UWORD ystop, UBYTE *array, struct RastPort *temprp );
LONG GetVPModeID( struct ViewPort *vp );
LONG ModeNotAvailable( ULONG modeID );
WORD WeighTAMatch( struct TextAttr *reqTextAttr,
	struct TextAttr *targetTextAttr, struct TagItem *targetTags );
void EraseRect( struct RastPort *rp, WORD xMin, WORD yMin, WORD xMax,
	WORD yMax );
ULONG ExtendFont( struct TextFont *font, struct TagItem *fontTags );
void StripFont( struct TextFont *font );
#endif   /* CLIB_GRAPHICS_PROTO_H */
