home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / systempatch / sysi2 / sysi2.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-11  |  1.9 KB  |  81 lines

  1. #ifndef SYSI2_H
  2. #define SYSI2_H
  3.  
  4. #include <proto/exec.h>
  5. #include <proto/intuition.h>
  6. #include <proto/utility.h>
  7. #include <proto/graphics.h>
  8. #include <graphics/gfxmacros.h>
  9. #include <dos.h>
  10. #include <graphics/gfx.h>
  11.  
  12. #include <stdio.h>
  13. #include <exec/types.h>
  14. #include <exec/memory.h>
  15. #include <utility/tagitem.h>
  16. #include <intuition/intuition.h>
  17. #include <intuition/intuitionbase.h>
  18. #include <intuition/screens.h>
  19. #include <intuition/gadgetclass.h>
  20. #include <intuition/icclass.h>
  21. #include <intuition/imageclass.h>
  22. #include <math.h>
  23.  
  24.  
  25. /* Instance data for image objects */
  26. struct SysIData
  27. {
  28.   ULONG si_Which;
  29.   WORD  si_X,
  30.         si_Y;
  31.   WORD  si_Width,
  32.         si_Height,
  33.         si_OW,
  34.         si_OH;
  35.   struct DrawInfo *si_DrawInfo;
  36. };
  37.  
  38. typedef union MsgUnion
  39. {
  40.   ULONG  MethodID;
  41.   struct opSet    opSet;
  42.   struct opUpdate opUpdate;
  43.   struct opGet    opGet;
  44.   struct impDraw  impDraw;
  45. } *Msgs;
  46.  
  47. /* prototypes */
  48.  
  49. ULONG __saveds __asm Dispatcher(register __a0 Class *C, register __a2 struct Image *O, register __a1 Msgs M );
  50. struct BitMap *MyAllocBM(LONG Width, LONG Height, LONG Depth, LONG Flags, struct BitMap *Friend);
  51. void           MyFreeBM(struct BitMap *BM);
  52.  
  53. /* Draws a multi point line */
  54. void DrawPoly(struct RastPort *RP,LONG Count, ...);
  55.  
  56. /* Draws a filled polygon upto MAX_FILLPOLYPOINTS, See below */
  57. void FillPoly(struct RastPort *RP,ULONG Points, ...);
  58.  
  59. /* This function draws the images */
  60. ULONG RenderImage(Class *C, struct Image *Image, Msgs M);
  61.  
  62. /* Used to draw button backgrounds */
  63. void DrawBack(struct RastPort *RP, 
  64.               UBYTE TopEdgePen,
  65.               UBYTE BottomEdgePen,
  66.               UBYTE FillPen,
  67.               WORD X1,
  68.               WORD Y1,
  69.               WORD X2,
  70.               WORD Y2);
  71.  
  72. /* RectFill with error checking */
  73. void MyRectFill(struct RastPort *RP,
  74.               WORD X1,
  75.               WORD Y1,
  76.               WORD X2,
  77.               WORD Y2);
  78.  
  79.  
  80. #endif /* SYSI2_H */
  81.