home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / inline / layers.h < prev    next >
C/C++ Source or Header  |  1994-09-22  |  15KB  |  479 lines

  1. #ifndef _INLINE_LAYERS_H
  2. #define _INLINE_LAYERS_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL
  11. #define BASE_EXT_DECL0 extern struct Library * LayersBase;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME LayersBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline LONG 
  24. BeginUpdate (BASE_PAR_DECL struct Layer *l)
  25. {
  26.   BASE_EXT_DECL
  27.   register LONG  _res  __asm("d0");
  28.   register struct Library *a6 __asm("a6") = BASE_NAME;
  29.   register struct Layer *a0 __asm("a0") = l;
  30.   __asm __volatile ("jsr a6@(-0x4e)"
  31.   : "=r" (_res)
  32.   : "r" (a6), "r" (a0)
  33.   : "a0","a1","d0","d1", "memory");
  34.   return _res;
  35. }
  36. extern __inline LONG 
  37. BehindLayer (BASE_PAR_DECL long dummy,struct Layer *layer)
  38. {
  39.   BASE_EXT_DECL
  40.   register LONG  _res  __asm("d0");
  41.   register struct Library *a6 __asm("a6") = BASE_NAME;
  42.   register long a0 __asm("a0") = dummy;
  43.   register struct Layer *a1 __asm("a1") = layer;
  44.   __asm __volatile ("jsr a6@(-0x36)"
  45.   : "=r" (_res)
  46.   : "r" (a6), "r" (a0), "r" (a1)
  47.   : "a0","a1","d0","d1", "memory");
  48.   return _res;
  49. }
  50. extern __inline struct Layer *
  51. CreateBehindHookLayer (BASE_PAR_DECL struct Layer_Info *li,struct BitMap *bm,long x0,long y0,long x1,long y1,long flags,struct Hook *hook,struct BitMap *bm2)
  52. {
  53.   BASE_EXT_DECL
  54.   register struct Layer * _res  __asm("d0");
  55.   register struct Library *a6 __asm("a6") = BASE_NAME;
  56.   register struct Layer_Info *a0 __asm("a0") = li;
  57.   register struct BitMap *a1 __asm("a1") = bm;
  58.   register long d0 __asm("d0") = x0;
  59.   register long d1 __asm("d1") = y0;
  60.   register long d2 __asm("d2") = x1;
  61.   register long d3 __asm("d3") = y1;
  62.   register long d4 __asm("d4") = flags;
  63.   register struct Hook *a3 __asm("a3") = hook;
  64.   register struct BitMap *a2 __asm("a2") = bm2;
  65.   __asm __volatile ("jsr a6@(-0xc0)"
  66.   : "=r" (_res)
  67.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a3), "r" (a2)
  68.   : "a0","a1","a2","a3","d0","d1","d2","d3","d4", "memory");
  69.   return _res;
  70. }
  71. extern __inline struct Layer *
  72. CreateBehindLayer (BASE_PAR_DECL struct Layer_Info *li,struct BitMap *bm,long x0,long y0,long x1,long y1,long flags,struct BitMap *bm2)
  73. {
  74.   BASE_EXT_DECL
  75.   register struct Layer * _res  __asm("d0");
  76.   register struct Library *a6 __asm("a6") = BASE_NAME;
  77.   register struct Layer_Info *a0 __asm("a0") = li;
  78.   register struct BitMap *a1 __asm("a1") = bm;
  79.   register long d0 __asm("d0") = x0;
  80.   register long d1 __asm("d1") = y0;
  81.   register long d2 __asm("d2") = x1;
  82.   register long d3 __asm("d3") = y1;
  83.   register long d4 __asm("d4") = flags;
  84.   register struct BitMap *a2 __asm("a2") = bm2;
  85.   __asm __volatile ("jsr a6@(-0x2a)"
  86.   : "=r" (_res)
  87.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a2)
  88.   : "a0","a1","a2","d0","d1","d2","d3","d4", "memory");
  89.   return _res;
  90. }
  91. extern __inline struct Layer *
  92. CreateUpfrontHookLayer (BASE_PAR_DECL struct Layer_Info *li,struct BitMap *bm,long x0,long y0,long x1,long y1,long flags,struct Hook *hook,struct BitMap *bm2)
  93. {
  94.   BASE_EXT_DECL
  95.   register struct Layer * _res  __asm("d0");
  96.   register struct Library *a6 __asm("a6") = BASE_NAME;
  97.   register struct Layer_Info *a0 __asm("a0") = li;
  98.   register struct BitMap *a1 __asm("a1") = bm;
  99.   register long d0 __asm("d0") = x0;
  100.   register long d1 __asm("d1") = y0;
  101.   register long d2 __asm("d2") = x1;
  102.   register long d3 __asm("d3") = y1;
  103.   register long d4 __asm("d4") = flags;
  104.   register struct Hook *a3 __asm("a3") = hook;
  105.   register struct BitMap *a2 __asm("a2") = bm2;
  106.   __asm __volatile ("jsr a6@(-0xba)"
  107.   : "=r" (_res)
  108.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a3), "r" (a2)
  109.   : "a0","a1","a2","a3","d0","d1","d2","d3","d4", "memory");
  110.   return _res;
  111. }
  112. extern __inline struct Layer *
  113. CreateUpfrontLayer (BASE_PAR_DECL struct Layer_Info *li,struct BitMap *bm,long x0,long y0,long x1,long y1,long flags,struct BitMap *bm2)
  114. {
  115.   BASE_EXT_DECL
  116.   register struct Layer * _res  __asm("d0");
  117.   register struct Library *a6 __asm("a6") = BASE_NAME;
  118.   register struct Layer_Info *a0 __asm("a0") = li;
  119.   register struct BitMap *a1 __asm("a1") = bm;
  120.   register long d0 __asm("d0") = x0;
  121.   register long d1 __asm("d1") = y0;
  122.   register long d2 __asm("d2") = x1;
  123.   register long d3 __asm("d3") = y1;
  124.   register long d4 __asm("d4") = flags;
  125.   register struct BitMap *a2 __asm("a2") = bm2;
  126.   __asm __volatile ("jsr a6@(-0x24)"
  127.   : "=r" (_res)
  128.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a2)
  129.   : "a0","a1","a2","d0","d1","d2","d3","d4", "memory");
  130.   return _res;
  131. }
  132. extern __inline LONG 
  133. DeleteLayer (BASE_PAR_DECL long dummy,struct Layer *layer)
  134. {
  135.   BASE_EXT_DECL
  136.   register LONG  _res  __asm("d0");
  137.   register struct Library *a6 __asm("a6") = BASE_NAME;
  138.   register long a0 __asm("a0") = dummy;
  139.   register struct Layer *a1 __asm("a1") = layer;
  140.   __asm __volatile ("jsr a6@(-0x5a)"
  141.   : "=r" (_res)
  142.   : "r" (a6), "r" (a0), "r" (a1)
  143.   : "a0","a1","d0","d1", "memory");
  144.   return _res;
  145. }
  146. extern __inline void 
  147. DisposeLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  148. {
  149.   BASE_EXT_DECL
  150.   register struct Library *a6 __asm("a6") = BASE_NAME;
  151.   register struct Layer_Info *a0 __asm("a0") = li;
  152.   __asm __volatile ("jsr a6@(-0x96)"
  153.   : /* no output */
  154.   : "r" (a6), "r" (a0)
  155.   : "a0","a1","d0","d1", "memory");
  156. }
  157. extern __inline void 
  158. DoHookClipRects (BASE_PAR_DECL struct Hook *hook,struct RastPort *rport,struct Rectangle *rect)
  159. {
  160.   BASE_EXT_DECL
  161.   register struct Library *a6 __asm("a6") = BASE_NAME;
  162.   register struct Hook *a0 __asm("a0") = hook;
  163.   register struct RastPort *a1 __asm("a1") = rport;
  164.   register struct Rectangle *a2 __asm("a2") = rect;
  165.   __asm __volatile ("jsr a6@(-0xd8)"
  166.   : /* no output */
  167.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2)
  168.   : "a0","a1","a2","d0","d1", "memory");
  169. }
  170. extern __inline void 
  171. EndUpdate (BASE_PAR_DECL struct Layer *layer,unsigned long flag)
  172. {
  173.   BASE_EXT_DECL
  174.   register struct Library *a6 __asm("a6") = BASE_NAME;
  175.   register struct Layer *a0 __asm("a0") = layer;
  176.   register unsigned long d0 __asm("d0") = flag;
  177.   __asm __volatile ("jsr a6@(-0x54)"
  178.   : /* no output */
  179.   : "r" (a6), "r" (a0), "r" (d0)
  180.   : "a0","a1","d0","d1", "memory");
  181. }
  182. extern __inline LONG 
  183. FattenLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  184. {
  185.   BASE_EXT_DECL
  186.   register LONG  _res  __asm("d0");
  187.   register struct Library *a6 __asm("a6") = BASE_NAME;
  188.   register struct Layer_Info *a0 __asm("a0") = li;
  189.   __asm __volatile ("jsr a6@(-0x9c)"
  190.   : "=r" (_res)
  191.   : "r" (a6), "r" (a0)
  192.   : "a0","a1","d0","d1", "memory");
  193.   return _res;
  194. }
  195. extern __inline void 
  196. InitLayers (BASE_PAR_DECL struct Layer_Info *li)
  197. {
  198.   BASE_EXT_DECL
  199.   register struct Library *a6 __asm("a6") = BASE_NAME;
  200.   register struct Layer_Info *a0 __asm("a0") = li;
  201.   __asm __volatile ("jsr a6@(-0x1e)"
  202.   : /* no output */
  203.   : "r" (a6), "r" (a0)
  204.   : "a0","a1","d0","d1", "memory");
  205. }
  206. extern __inline struct Region *
  207. InstallClipRegion (BASE_PAR_DECL struct Layer *layer,struct Region *region)
  208. {
  209.   BASE_EXT_DECL
  210.   register struct Region * _res  __asm("d0");
  211.   register struct Library *a6 __asm("a6") = BASE_NAME;
  212.   register struct Layer *a0 __asm("a0") = layer;
  213.   register struct Region *a1 __asm("a1") = region;
  214.   __asm __volatile ("jsr a6@(-0xae)"
  215.   : "=r" (_res)
  216.   : "r" (a6), "r" (a0), "r" (a1)
  217.   : "a0","a1","d0","d1", "memory");
  218.   return _res;
  219. }
  220. extern __inline struct Hook *
  221. InstallLayerHook (BASE_PAR_DECL struct Layer *layer,struct Hook *hook)
  222. {
  223.   BASE_EXT_DECL
  224.   register struct Hook * _res  __asm("d0");
  225.   register struct Library *a6 __asm("a6") = BASE_NAME;
  226.   register struct Layer *a0 __asm("a0") = layer;
  227.   register struct Hook *a1 __asm("a1") = hook;
  228.   __asm __volatile ("jsr a6@(-0xc6)"
  229.   : "=r" (_res)
  230.   : "r" (a6), "r" (a0), "r" (a1)
  231.   : "a0","a1","d0","d1", "memory");
  232.   return _res;
  233. }
  234. extern __inline struct Hook *
  235. InstallLayerInfoHook (BASE_PAR_DECL struct Layer_Info *li,struct Hook *hook)
  236. {
  237.   BASE_EXT_DECL
  238.   register struct Hook * _res  __asm("d0");
  239.   register struct Library *a6 __asm("a6") = BASE_NAME;
  240.   register struct Layer_Info *a0 __asm("a0") = li;
  241.   register struct Hook *a1 __asm("a1") = hook;
  242.