home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / includes / clib / graphics_protos.h < prev    next >
C/C++ Source or Header  |  1992-09-01  |  10KB  |  226 lines

  1. #ifndef  CLIB_GRAPHICS_PROTOS_H
  2. #define  CLIB_GRAPHICS_PROTOS_H
  3. /*
  4. **    $Filename: clib/graphics_protos.h $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 37.0 $
  7. **    $Date: 91/01/07 $
  8. **
  9. **    C prototypes. For use with 32 bit integers only.
  10. **
  11. **    (C) Copyright 1990-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14. #ifndef  GRAPHICS_GFX_H
  15. #include <graphics/gfx.h>
  16. #endif
  17. #ifndef  GRAPHICS_DISPLAYINFO_H
  18. #include <graphics/displayinfo.h>
  19. #endif
  20. #ifndef  GRAPHICS_GELS_H
  21. #include <graphics/gels.h>
  22. #endif
  23. #ifndef  GRAPHICS_RASTPORT_H
  24. #include <graphics/rastport.h>
  25. #endif
  26. #ifndef  GRAPHICS_VIEW_H
  27. #include <graphics/view.h>
  28. #endif
  29. #ifndef  GRAPHICS_COPPER_H
  30. #include <graphics/copper.h>
  31. #endif
  32. #ifndef  GRAPHICS_CLIP_H
  33. #include <graphics/clip.h>
  34. #endif
  35. #ifndef  GRAPHICS_REGIONS_H
  36. #include <graphics/regions.h>
  37. #endif
  38. #ifndef  GRAPHICS_SPRITE_H
  39. #include <graphics/sprite.h>
  40. #endif
  41. #ifndef  GRAPHICS_TEXT_H
  42. #include <graphics/text.h>
  43. #endif
  44. #ifndef  HARDWARE_BLIT_H
  45. #include <hardware/blit.h>
  46. #endif
  47. /*------ BitMap primitives ------*/
  48. LONG BltBitMap( struct BitMap *srcBitMap, long xSrc, long ySrc,
  49.     struct BitMap *destBitMap, long xDest, long yDest, long xSize,
  50.     long ySize, unsigned long minterm, unsigned long mask,
  51.     PLANEPTR tempA );
  52. void BltTemplate( PLANEPTR source, long xSrc, long srcMod,
  53.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  54.     long ySize );
  55. /*------ Text routines ------*/
  56. void ClearEOL( struct RastPort *rp );
  57. void ClearScreen( struct RastPort *rp );
  58. WORD TextLength( struct RastPort *rp, STRPTR string, unsigned long count );
  59. LONG Text( struct RastPort *rp, STRPTR string, unsigned long count );
  60. LONG SetFont( struct RastPort *rp, struct TextFont *textFont );
  61. struct TextFont *OpenFont( struct TextAttr *textAttr );
  62. void CloseFont( struct TextFont *textFont );
  63. ULONG AskSoftStyle( struct RastPort *rp );
  64. ULONG SetSoftStyle( struct RastPort *rp, unsigned long style,
  65.     unsigned long enable );
  66. /*------    Gels routines ------*/
  67. void AddBob( struct Bob *bob, struct RastPort *rp );
  68. void AddVSprite( struct VSprite *vSprite, struct RastPort *rp );
  69. void DoCollision( struct RastPort *rp );
  70. void DrawGList( struct RastPort *rp, struct ViewPort *vp );
  71. void InitGels( struct VSprite *head, struct VSprite *tail,
  72.     struct GelsInfo *gelsInfo );
  73. void InitMasks( struct VSprite *vSprite );
  74. void RemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
  75. void RemVSprite( struct VSprite *vSprite );
  76. void SetCollision( unsigned long num,
  77.     void (*routine)(struct VSprite *vSprite, APTR),
  78.     struct GelsInfo *gelsInfo );
  79. void SortGList( struct RastPort *rp );
  80. void AddAnimOb( struct AnimOb *anOb, struct AnimOb **anKey,
  81.     struct RastPort *rp );
  82. void Animate( struct AnimOb **anKey, struct RastPort *rp );
  83. BOOL GetGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  84. void InitGMasks( struct AnimOb *anOb );
  85. /*------    General graphics routines ------*/
  86. void DrawEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  87.     long b );
  88. LONG AreaEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  89.     long b );
  90. void LoadRGB4( struct ViewPort *vp, UWORD *colors, long count );
  91. void InitRastPort( struct RastPort *rp );
  92. void InitVPort( struct ViewPort *vp );
  93. void MrgCop( struct View *view );
  94. void MakeVPort( struct View *view, struct ViewPort *vp );
  95. void LoadView( struct View *view );
  96. void WaitBlit( void );
  97. void SetRast( struct RastPort *rp, unsigned long pen );
  98. void Move( struct RastPort *rp, long x, long y );
  99. void Draw( struct RastPort *rp, long x, long y );
  100. LONG AreaMove( struct RastPort *rp, long x, long y );
  101. LONG AreaDraw( struct RastPort *rp, long x, long y );
  102. LONG AreaEnd( struct RastPort *rp );
  103. void WaitTOF( void );
  104. void QBlit( struct bltnode *blit );
  105. void InitArea( struct AreaInfo *areaInfo, APTR vectorBuffer,
  106.     long maxVectors );
  107. void SetRGB4( struct ViewPort *vp, long index, unsigned long red,
  108.     unsigned long green, unsigned long blue );
  109. void QBSBlit( struct bltnode *blit );
  110. void BltClear( PLANEPTR memBlock, unsigned long byteCount,
  111.     unsigned long flags );
  112. void RectFill( struct RastPort *rp, long xMin, long yMin, long xMax,
  113.     long yMax );
  114. void BltPattern( struct RastPort *rp, PLANEPTR mask, long xMin, long yMin,
  115.     long xMax, long yMax, unsigned long maskBPR );
  116. ULONG ReadPixel( struct RastPort *rp, long x, long y );
  117. LONG WritePixel( struct RastPort *rp, long x, long y );
  118. BOOL Flood( struct RastPort *rp, unsigned long mode, long x, long y );
  119. void PolyDraw( struct RastPort *rp, long count, WORD *polyTable );
  120. void SetAPen( struct RastPort *rp, unsigned long pen );
  121. void SetBPen( struct RastPort *rp, unsigned long pen );
  122. void SetDrMd( struct RastPort *rp, unsigned long drawMode );
  123. void InitView( struct View *view );
  124. void CBump( struct UCopList *copList );
  125. void CMove( struct UCopList *copList, APTR destination, long data );
  126. void CWait( struct UCopList *copList, long v, long h );
  127. LONG VBeamPos( void );
  128. void InitBitMap( struct BitMap *bitMap, long depth, long width, long height );
  129. void ScrollRaster( struct RastPort *rp, long dx, long dy, long xMin, long yMin,
  130.     long xMax, long yMax );
  131. void WaitBOVP( struct ViewPort *vp );
  132. WORD GetSprite( struct SimpleSprite *sprite, long num );
  133. void FreeSprite( long num );
  134. void ChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite,
  135.     PLANEPTR newData );
  136. void MoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, long x,
  137.     long y );
  138. void LockLayerRom( struct Layer *layer );
  139. void UnlockLayerRom( struct Layer *layer );
  140. void SyncSBitMap( struct Layer *layer );
  141. void CopySBitMap( struct Layer *layer );
  142. void OwnBlitter( void );
  143. void DisownBlitter( void );
  144. struct TmpRas *InitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer,
  145.     long size );
  146. void AskFont( struct RastPort *rp, struct TextAttr *textAttr );
  147. void AddFont( struct TextFont *textFont );
  148. void RemFont( struct TextFont *textFont );
  149. PLANEPTR AllocRaster( unsigned long width, unsigned long height );
  150. void FreeRaster( PLANEPTR p, unsigned long width, unsigned long height );
  151. void AndRectRegion( struct Region *region, struct Rectangle *rectangle );
  152. BOOL OrRectRegion( struct Region *region, struct Rectangle *rectangle );
  153. struct Region *NewRegion( void );
  154. BOOL ClearRectRegion( struct Region *region, struct Rectangle *rectangle );
  155. void ClearRegion( struct Region *region );
  156. void DisposeRegion( struct Region *region );
  157. void FreeVPortCopLists( struct ViewPort *vp );
  158. void FreeCopList( struct CopList *copList );
  159. void ClipBlit( struct RastPort *srcRP, long xSrc, long ySrc,
  160.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  161.     long ySize, unsigned long minterm );
  162. BOOL XorRectRegion( struct Region *region, struct Rectangle *rectangle );
  163. void FreeCprList( struct cprlist *cprList );
  164. struct ColorMap *GetColorMap( long entries );
  165. void FreeColorMap( struct ColorMap *colorMap );
  166. ULONG GetRGB4( struct ColorMap *colorMap, long entry );
  167. void ScrollVPort( struct ViewPort *vp );
  168. struct CopList *UCopperListInit( struct UCopList *uCopList, long n );
  169. void FreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  170. void BltBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  171.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  172.     long ySize, unsigned long minterm );
  173. BOOL OrRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  174. BOOL XorRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  175. BOOL AndRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  176. void SetRGB4CM( struct ColorMap *colorMap, long index, unsigned long red,
  177.     unsigned long green, unsigned long blue );
  178. void BltMaskBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  179.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  180.     long ySize, unsigned long minterm, PLANEPTR bltMask );
  181. BOOL AttemptLockLayerRom( struct Layer *layer );
  182. /*--- functions in V36 or higher (distributed as Release 2.0) ---*/
  183. APTR GfxNew( unsigned long gfxNodeType );
  184. void GfxFree( APTR gfxNodePtr );
  185. void GfxAssociate( APTR associateNode, APTR gfxNodePtr );
  186. void BitMapScale( struct BitScaleArgs *bitScaleArgs );
  187. UWORD ScalerDiv( unsigned long factor, unsigned long numerator,
  188.     unsigned long denominator );
  189. WORD TextExtent( struct RastPort *rp, STRPTR string, long count,
  190.     struct TextExtent *textExtent );
  191. ULONG TextFit( struct RastPort *rp, STRPTR string, unsigned long strLen,
  192.     struct TextExtent *textExtent, struct TextExtent *constrainingExtent,
  193.     long strDirection, unsigned long constrainingBitWidth,
  194.     unsigned long constrainingBitHeight );
  195. APTR GfxLookUp( APTR associateNode );
  196. BOOL VideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
  197. struct MonitorSpec *OpenMonitor( STRPTR monitorName,
  198.     unsigned long displayID );
  199. BOOL CloseMonitor( struct MonitorSpec *monitorSpec );
  200. DisplayInfoHandle FindDisplayInfo( unsigned long displayID );
  201. ULONG NextDisplayInfo( unsigned long displayID );
  202. ULONG GetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf,
  203.     unsigned long size, unsigned long tagID, unsigned long displayID );
  204. void FontExtent( struct TextFont *font, struct TextExtent *fontExtent );
  205. LONG ReadPixelLine8( struct RastPort *rp, unsigned long xstart,
  206.     unsigned long ystart, unsigned long width, UBYTE *array,
  207.     struct RastPort *tempRP );
  208. LONG WritePixelLine8( struct RastPort *rp, unsigned long xstart,
  209.     unsigned long ystart, unsigned long width, UBYTE *array,
  210.     struct RastPort *tempRP );
  211. LONG ReadPixelArray8( struct RastPort *rp, unsigned long xstart,
  212.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  213.     UBYTE *array, struct RastPort *temprp );
  214. LONG WritePixelArray8( struct RastPort *rp, unsigned long xstart,
  215.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  216.     UBYTE *array, struct RastPort *temprp );
  217. LONG GetVPModeID( struct ViewPort *vp );
  218. LONG ModeNotAvailable( unsigned long modeID );
  219. WORD WeighTAMatch( struct TextAttr *reqTextAttr,
  220.     struct TextAttr *targetTextAttr, struct TagItem *targetTags );
  221. void EraseRect( struct RastPort *rp, long xMin, long yMin, long xMax,
  222.     long yMax );
  223. ULONG ExtendFont( struct TextFont *font, struct TagItem *fontTags );
  224. void StripFont( struct TextFont *font );
  225. #endif     /* CLIB_GRAPHICS_PROTOS_H */
  226.