home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / gcc233.lha / os-include / inline / layers.h < prev    next >
C/C++ Source or Header  |  1992-12-29  |  15KB  |  474 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 extern struct Library*  LayersBase;
  11. #endif
  12. #ifndef BASE_PAR_DECL
  13. #define BASE_PAR_DECL
  14. #define BASE_PAR_DECL0 void
  15. #endif
  16. #ifndef BASE_NAME
  17. #define BASE_NAME LayersBase
  18. #endif
  19.  
  20. static __inline LONG 
  21. BeginUpdate (BASE_PAR_DECL struct Layer *l)
  22. {
  23.   BASE_EXT_DECL
  24.   register LONG  _res  __asm("d0");
  25.   register struct Library* a6 __asm("a6") = BASE_NAME;
  26.   register struct Layer *a0 __asm("a0") = l;
  27.   __asm __volatile ("jsr a6@(-0x4e)"
  28.   : "=r" (_res)
  29.   : "r" (a6), "r" (a0)
  30.   : "a0","a1","d0","d1", "memory");
  31.   return _res;
  32. }
  33. static __inline LONG 
  34. BehindLayer (BASE_PAR_DECL long dummy,struct Layer *layer)
  35. {
  36.   BASE_EXT_DECL
  37.   register LONG  _res  __asm("d0");
  38.   register struct Library* a6 __asm("a6") = BASE_NAME;
  39.   register long a0 __asm("a0") = dummy;
  40.   register struct Layer *a1 __asm("a1") = layer;
  41.   __asm __volatile ("jsr a6@(-0x36)"
  42.   : "=r" (_res)
  43.   : "r" (a6), "r" (a0), "r" (a1)
  44.   : "a0","a1","d0","d1", "memory");
  45.   return _res;
  46. }
  47. static __inline struct Layer *
  48. 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)
  49. {
  50.   BASE_EXT_DECL
  51.   register struct Layer * _res  __asm("d0");
  52.   register struct Library* a6 __asm("a6") = BASE_NAME;
  53.   register struct Layer_Info *a0 __asm("a0") = li;
  54.   register struct BitMap *a1 __asm("a1") = bm;
  55.   register long d0 __asm("d0") = x0;
  56.   register long d1 __asm("d1") = y0;
  57.   register long d2 __asm("d2") = x1;
  58.   register long d3 __asm("d3") = y1;
  59.   register long d4 __asm("d4") = flags;
  60.   register struct Hook *a3 __asm("a3") = hook;
  61.   register struct BitMap *a2 __asm("a2") = bm2;
  62.   __asm __volatile ("jsr a6@(-0xc0)"
  63.   : "=r" (_res)
  64.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a3), "r" (a2)
  65.   : "a0","a1","a2","a3","d0","d1","d2","d3","d4", "memory");
  66.   return _res;
  67. }
  68. static __inline struct Layer *
  69. CreateBehindLayer (BASE_PAR_DECL struct Layer_Info *li,struct BitMap *bm,long x0,long y0,long x1,long y1,long flags,struct BitMap *bm2)
  70. {
  71.   BASE_EXT_DECL
  72.   register struct Layer * _res  __asm("d0");
  73.   register struct Library* a6 __asm("a6") = BASE_NAME;
  74.   register struct Layer_Info *a0 __asm("a0") = li;
  75.   register struct BitMap *a1 __asm("a1") = bm;
  76.   register long d0 __asm("d0") = x0;
  77.   register long d1 __asm("d1") = y0;
  78.   register long d2 __asm("d2") = x1;
  79.   register long d3 __asm("d3") = y1;
  80.   register long d4 __asm("d4") = flags;
  81.   register struct BitMap *a2 __asm("a2") = bm2;
  82.   __asm __volatile ("jsr a6@(-0x2a)"
  83.   : "=r" (_res)
  84.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a2)
  85.   : "a0","a1","a2","d0","d1","d2","d3","d4", "memory");
  86.   return _res;
  87. }
  88. static __inline struct Layer *
  89. 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)
  90. {
  91.   BASE_EXT_DECL
  92.   register struct Layer * _res  __asm("d0");
  93.   register struct Library* a6 __asm("a6") = BASE_NAME;
  94.   register struct Layer_Info *a0 __asm("a0") = li;
  95.   register struct BitMap *a1 __asm("a1") = bm;
  96.   register long d0 __asm("d0") = x0;
  97.   register long d1 __asm("d1") = y0;
  98.   register long d2 __asm("d2") = x1;
  99.   register long d3 __asm("d3") = y1;
  100.   register long d4 __asm("d4") = flags;
  101.   register struct Hook *a3 __asm("a3") = hook;
  102.   register struct BitMap *a2 __asm("a2") = bm2;
  103.   __asm __volatile ("jsr a6@(-0xba)"
  104.   : "=r" (_res)
  105.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a3), "r" (a2)
  106.   : "a0","a1","a2","a3","d0","d1","d2","d3","d4", "memory");
  107.   return _res;
  108. }
  109. static __inline struct Layer *
  110. CreateUpfrontLayer (BASE_PAR_DECL struct Layer_Info *li,struct BitMap *bm,long x0,long y0,long x1,long y1,long flags,struct BitMap *bm2)
  111. {
  112.   BASE_EXT_DECL
  113.   register struct Layer * _res  __asm("d0");
  114.   register struct Library* a6 __asm("a6") = BASE_NAME;
  115.   register struct Layer_Info *a0 __asm("a0") = li;
  116.   register struct BitMap *a1 __asm("a1") = bm;
  117.   register long d0 __asm("d0") = x0;
  118.   register long d1 __asm("d1") = y0;
  119.   register long d2 __asm("d2") = x1;
  120.   register long d3 __asm("d3") = y1;
  121.   register long d4 __asm("d4") = flags;
  122.   register struct BitMap *a2 __asm("a2") = bm2;
  123.   __asm __volatile ("jsr a6@(-0x24)"
  124.   : "=r" (_res)
  125.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (a2)
  126.   : "a0","a1","a2","d0","d1","d2","d3","d4", "memory");
  127.   return _res;
  128. }
  129. static __inline LONG 
  130. DeleteLayer (BASE_PAR_DECL long dummy,struct Layer *layer)
  131. {
  132.   BASE_EXT_DECL
  133.   register LONG  _res  __asm("d0");
  134.   register struct Library* a6 __asm("a6") = BASE_NAME;
  135.   register long a0 __asm("a0") = dummy;
  136.   register struct Layer *a1 __asm("a1") = layer;
  137.   __asm __volatile ("jsr a6@(-0x5a)"
  138.   : "=r" (_res)
  139.   : "r" (a6), "r" (a0), "r" (a1)
  140.   : "a0","a1","d0","d1", "memory");
  141.   return _res;
  142. }
  143. static __inline void 
  144. DisposeLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  145. {
  146.   BASE_EXT_DECL
  147.   register struct Library* a6 __asm("a6") = BASE_NAME;
  148.   register struct Layer_Info *a0 __asm("a0") = li;
  149.   __asm __volatile ("jsr a6@(-0x96)"
  150.   : /* no output */
  151.   : "r" (a6), "r" (a0)
  152.   : "a0","a1","d0","d1", "memory");
  153. }
  154. static __inline void 
  155. DoHookClipRects (BASE_PAR_DECL struct Hook *hook,struct RastPort *rport,struct Rectangle *rect)
  156. {
  157.   BASE_EXT_DECL
  158.   register struct Library* a6 __asm("a6") = BASE_NAME;
  159.   register struct Hook *a0 __asm("a0") = hook;
  160.   register struct RastPort *a1 __asm("a1") = rport;
  161.   register struct Rectangle *a2 __asm("a2") = rect;
  162.   __asm __volatile ("jsr a6@(-0xd8)"
  163.   : /* no output */
  164.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2)
  165.   : "a0","a1","a2","d0","d1", "memory");
  166. }
  167. static __inline void 
  168. EndUpdate (BASE_PAR_DECL struct Layer *layer,unsigned long flag)
  169. {
  170.   BASE_EXT_DECL
  171.   register struct Library* a6 __asm("a6") = BASE_NAME;
  172.   register struct Layer *a0 __asm("a0") = layer;
  173.   register unsigned long d0 __asm("d0") = flag;
  174.   __asm __volatile ("jsr a6@(-0x54)"
  175.   : /* no output */
  176.   : "r" (a6), "r" (a0), "r" (d0)
  177.   : "a0","a1","d0","d1", "memory");
  178. }
  179. static __inline LONG 
  180. FattenLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  181. {
  182.   BASE_EXT_DECL
  183.   register LONG  _res  __asm("d0");
  184.   register struct Library* a6 __asm("a6") = BASE_NAME;
  185.   register struct Layer_Info *a0 __asm("a0") = li;
  186.   __asm __volatile ("jsr a6@(-0x9c)"
  187.   : "=r" (_res)
  188.   : "r" (a6), "r" (a0)
  189.   : "a0","a1","d0","d1", "memory");
  190.   return _res;
  191. }
  192. static __inline void 
  193. InitLayers (BASE_PAR_DECL struct Layer_Info *li)
  194. {
  195.   BASE_EXT_DECL
  196.   register struct Library* a6 __asm("a6") = BASE_NAME;
  197.   register struct Layer_Info *a0 __asm("a0") = li;
  198.   __asm __volatile ("jsr a6@(-0x1e)"
  199.   : /* no output */
  200.   : "r" (a6), "r" (a0)
  201.   : "a0","a1","d0","d1", "memory");
  202. }
  203. static __inline struct Region *
  204. InstallClipRegion (BASE_PAR_DECL struct Layer *layer,struct Region *region)
  205. {
  206.   BASE_EXT_DECL
  207.   register struct Region * _res  __asm("d0");
  208.   register struct Library* a6 __asm("a6") = BASE_NAME;
  209.   register struct Layer *a0 __asm("a0") = layer;
  210.   register struct Region *a1 __asm("a1") = region;
  211.   __asm __volatile ("jsr a6@(-0xae)"
  212.   : "=r" (_res)
  213.   : "r" (a6), "r" (a0), "r" (a1)
  214.   : "a0","a1","d0","d1", "memory");
  215.   return _res;
  216. }
  217. static __inline struct Hook *
  218. InstallLayerHook (BASE_PAR_DECL struct Layer *layer,struct Hook *hook)
  219. {
  220.   BASE_EXT_DECL
  221.   register struct Hook * _res  __asm("d0");
  222.   register struct Library* a6 __asm("a6") = BASE_NAME;
  223.   register struct Layer *a0 __asm("a0") = layer;
  224.   register struct Hook *a1 __asm("a1") = hook;
  225.   __asm __volatile ("jsr a6@(-0xc6)"
  226.   : "=r" (_res)
  227.   : "r" (a6), "r" (a0), "r" (a1)
  228.   : "a0","a1","d0","d1", "memory");
  229.   return _res;
  230. }
  231. static __inline struct Hook *
  232. InstallLayerInfoHook (BASE_PAR_DECL struct Layer_Info *li,struct Hook *hook)
  233. {
  234.   BASE_EXT_DECL
  235.   register struct Hook * _res  __asm("d0");
  236.   register struct Library* a6 __asm("a6") = BASE_NAME;
  237.   register struct Layer_Info *a0 __asm("a0") = li;
  238.   register struct Hook *a1 __asm("a1") = hook;
  239.   __asm __volatile ("jsr a6@(-0xcc)"
  240.   : "=r" (_res)
  241.   : "r" (a6), "r" (a0), "r" (a1)
  242.   : "a0","a1","d0","d1", "memory");
  243.   return _res;
  244. }
  245. static __inline void 
  246. LockLayer (BASE_PAR_DECL long dummy,struct Layer *layer)
  247. {
  248.   BASE_EXT_DECL
  249.   register struct Library* a6 __asm("a6") = BASE_NAME;
  250.   register long a0 __asm("a0") = dummy;
  251.   register struct Layer *a1 __asm("a1") = layer;
  252.   __asm __volatile ("jsr a6@(-0x60)"
  253.   : /* no output */
  254.   : "r" (a6), "r" (a0), "r" (a1)
  255.   : "a0","a1","d0","d1", "memory");
  256. }
  257. static __inline void 
  258. LockLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  259. {
  260.   BASE_EXT_DECL
  261.   register struct Library* a6 __asm("a6") = BASE_NAME;
  262.   register struct Layer_Info *a0 __asm("a0") = li;
  263.   __asm __volatile ("jsr a6@(-0x78)"
  264.   : /* no output */
  265.   : "r" (a6), "r" (a0)
  266.   : "a0","a1","d0","d1", "memory");
  267. }
  268. static __inline void 
  269. LockLayers (BASE_PAR_DECL struct Layer_Info *li)
  270. {
  271.   BASE_EXT_DECL
  272.   register struct Library* a6 __asm("a6") = BASE_NAME;
  273.   register struct Layer_Info *a0 __asm("a0") = li;
  274.   __asm __volatile ("jsr a6@(-0x6c)"
  275.   : /* no output */
  276.   : "r" (a6), "r" (a0)
  277.   : "a0","a1","d0","d1", "memory");
  278. }
  279. static __inline LONG 
  280. MoveLayer (BASE_PAR_DECL long dummy,struct Layer *layer,long dx,long dy)
  281. {
  282.   BASE_EXT_DECL
  283.   register LONG  _res  __asm("d0");
  284.   register struct Library* a6 __asm("a6") = BASE_NAME;
  285.   register long a0 __asm("a0") = dummy;
  286.   register struct Layer *a1 __asm("a1") = layer;
  287.   register long d0 __asm("d0") = dx;
  288.   register long d1 __asm("d1") = dy;
  289.   __asm __volatile ("jsr a6@(-0x3c)"
  290.   : "=r" (_res)
  291.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1)
  292.   : "a0","a1","d0","d1", "memory");
  293.   return _res;
  294. }
  295. static __inline LONG 
  296. MoveLayerInFrontOf (BASE_PAR_DECL struct Layer *layer_to_move,struct Layer *other_layer)
  297. {
  298.   BASE_EXT_DECL
  299.   register LONG  _res  __asm("d0");
  300.   register struct Library* a6 __asm("a6") = BASE_NAME;
  301.   register struct Layer *a0 __asm("a0") = layer_to_move;
  302.   register struct Layer *a1 __asm("a1") = other_layer;
  303.   __asm __volatile ("jsr a6@(-0xa8)"
  304.   : "=r" (_res)
  305.   : "r" (a6), "r" (a0), "r" (a1)
  306.   : "a0","a1","d0","d1", "memory");
  307.   return _res;
  308. }
  309. static __inline LONG 
  310. MoveSizeLayer (BASE_PAR_DECL struct Layer *layer,long dx,long dy,long dw,long dh)
  311. {
  312.   BASE_EXT_DECL
  313.   register LONG  _res  __asm("d0");
  314.   register struct Library* a6 __asm("a6") = BASE_NAME;
  315.   register struct Layer *a0 __asm("a0") = layer;
  316.   register long d0 __asm("d0") = dx;
  317.   register long d1 __asm("d1") = dy;
  318.   register long d2 __asm("d2") = dw;
  319.   register long d3 __asm("d3") = dh;
  320.   __asm __volatile ("jsr a6@(-0xb4)"
  321.   : "=r" (_res)
  322.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2), "r" (d3)
  323.   : "a0","a1","d0","d1","d2","d3", "memory");
  324.   return _res;
  325. }
  326. static __inline struct Layer_Info *
  327. NewLayerInfo (BASE_PAR_DECL0)
  328. {
  329.   BASE_EXT_DECL
  330.   register struct Layer_Info * _res  __asm("d0");
  331.   register struct Library* a6 __asm("a6") = BASE_NAME;
  332.   __asm __volatile ("jsr a6@(-0x90)"
  333.   : "=r" (_res)
  334.   : "r" (a6)
  335.   : "a0","a1","d0","d1", "memory");
  336.   return _res;
  337. }
  338. static __inline void 
  339. ScrollLayer (BASE_PAR_DECL long dummy,struct Layer *layer,long dx,long dy)
  340. {
  341.   BASE_EXT_DECL
  342.   register struct Library* a6 __asm("a6") = BASE_NAME;
  343.   register long a0 __asm("a0") = dummy;
  344.   register struct Layer *a1 __asm("a1") = layer;
  345.   register long d0 __asm("d0") = dx;
  346.   register long d1 __asm("d1") = dy;
  347.   __asm __volatile ("jsr a6@(-0x48)"
  348.   : /* no output */
  349.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1)
  350.   : "a0","a1","d0","d1", "memory");
  351. }
  352. static __inline LONG 
  353. SizeLayer (BASE_PAR_DECL long dummy,struct Layer *layer,long dx,long dy)
  354. {
  355.   BASE_EXT_DECL
  356.   register LONG  _res  __asm("d0");
  357.   register struct Library* a6 __asm("a6") = BASE_NAME;
  358.   register long a0 __asm("a0") = dummy;
  359.   register struct Layer *a1 __asm("a1") = layer;
  360.   register long d0 __asm("d0") = dx;
  361.   register long d1 __asm("d1") = dy;
  362.   __asm __volatile ("jsr a6@(-0x42)"
  363.   : "=r" (_res)
  364.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1)
  365.   : "a0","a1","d0","d1", "memory");
  366.   return _res;
  367. }
  368. static __inline void 
  369. SortLayerCR (BASE_PAR_DECL struct Layer *layer,long dx,long dy)
  370. {
  371.   BASE_EXT_DECL
  372.   register struct Library* a6 __asm("a6") = BASE_NAME;
  373.   register struct Layer *a0 __asm("a0") = layer;
  374.   register long d0 __asm("d0") = dx;
  375.   register long d1 __asm("d1") = dy;
  376.   __asm __volatile ("jsr a6@(-0xd2)"
  377.   : /* no output */
  378.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  379.   : "a0","a1","d0","d1", "memory");
  380. }
  381. static __inline void 
  382. SwapBitsRastPortClipRect (BASE_PAR_DECL struct RastPort *rp,struct ClipRect *cr)
  383. {
  384.   BASE_EXT_DECL
  385.   register struct Library* a6 __asm("a6") = BASE_NAME;
  386.   register struct RastPort *a0 __asm("a0") = rp;
  387.   register struct ClipRect *a1 __asm("a1") = cr;
  388.   __asm __volatile ("jsr a6@(-0x7e)"
  389.   : /* no output */
  390.   : "r" (a6), "r" (a0), "r" (a1)
  391.   : "a0","a1","d0","d1", "memory");
  392. }
  393. static __inline void 
  394. ThinLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  395. {
  396.   BASE_EXT_DECL
  397.   register struct Library* a6 __asm("a6") = BASE_NAME;
  398.   register struct Layer_Info *a0 __asm("a0") = li;
  399.   __asm __volatile ("jsr a6@(-0xa2)"
  400.   : /* no output */
  401.   : "r" (a6), "r" (a0)
  402.   : "a0","a1","d0","d1", "memory");
  403. }
  404. static __inline void 
  405. UnlockLayer (BASE_PAR_DECL struct Layer *layer)
  406. {
  407.   BASE_EXT_DECL
  408.   register struct Library* a6 __asm("a6") = BASE_NAME;
  409.   register struct Layer *a0 __asm("a0") = layer;
  410.   __asm __volatile ("jsr a6@(-0x66)"
  411.   : /* no output */
  412.   : "r" (a6), "r" (a0)
  413.   : "a0","a1","d0","d1", "memory");
  414. }
  415. static __inline void 
  416. UnlockLayerInfo (BASE_PAR_DECL struct Layer_Info *li)
  417. {
  418.   BASE_EXT_DECL
  419.   register struct Library* a6 __asm("a6") = BASE_NAME;
  420.   register struct Layer_Info *a0 __asm("a0") = li;
  421.   __asm __volatile ("jsr a6@(-0x8a)"
  422.   : /* no output */
  423.   : "r" (a6), "r" (a0)
  424.   : "a0","a1","d0","d1", "memory");
  425. }
  426. static __inline void 
  427. UnlockLayers (BASE_PAR_DECL struct Layer_Info *li)
  428. {
  429.   BASE_EXT_DECL
  430.   register struct Library* a6 __asm("a6") = BASE_NAME;
  431.   register struct Layer_Info *a0 __asm("a0") = li;
  432.   __asm __volatile ("jsr a6@(-0x72)"
  433.   : /* no output */
  434.   : "r" (a6), "r" (a0)
  435.   : "a0","a1","d0","d1", "memory");
  436. }
  437. static __inline LONG 
  438. UpfrontLayer (BASE_PAR_DECL long dummy,struct Layer *layer)
  439. {
  440.   BASE_EXT_DECL
  441.   register LONG  _res  __asm("d0");
  442.   register struct Library* a6 __asm("a6") = BASE_NAME;
  443.   register long a0 __asm("a0") = dummy;
  444.   register struct Layer *a1 __asm("a1") = layer;
  445.   __asm __volatile ("jsr a6@(-0x30)"
  446.   : "=r" (_res)
  447.   : "r" (a6), "r" (a0), "r" (a1)
  448.   : "a0","a1","d0","d1", "memory");
  449.   return _res;
  450. }
  451. static __inline struct Layer *
  452. WhichLayer (BASE_PAR_DECL struct Layer_Info *li,long x,long y)
  453. {
  454.   BASE_EXT_DECL
  455.   register struct Layer * _res  __asm("d0");
  456.   register struct Library* a6 __asm("a6") = BASE_NAME;
  457.   register struct Layer_Info *a0 __asm("a0") = li;
  458.   register long d0 __asm("d0") = x;
  459.   register long d1 __asm("d1") = y;
  460.   __asm __volatile ("jsr a6@(-0x84)"
  461.   : "=r" (_res)
  462.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  463.   : "a0","a1","d0","d1", "memory");
  464.   return _res;
  465. }
  466. #undef BASE_EXT_DECL
  467. #undef BASE_PAR_DECL
  468. #undef BASE_PAR_DECL0
  469. #undef BASE_NAME
  470.  
  471. __END_DECLS
  472.  
  473. #endif /* _INLINE_LAYERS_H */
  474.