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

  1. #ifndef _INLINE_INTUITION_H
  2. #define _INLINE_INTUITION_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 IntuitionBase * IntuitionBase;
  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 IntuitionBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline BOOL 
  24. ActivateGadget (BASE_PAR_DECL struct Gadget *gadgets,struct Window *window,struct Requester *requester)
  25. {
  26.   BASE_EXT_DECL
  27.   register BOOL  _res  __asm("d0");
  28.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  29.   register struct Gadget *a0 __asm("a0") = gadgets;
  30.   register struct Window *a1 __asm("a1") = window;
  31.   register struct Requester *a2 __asm("a2") = requester;
  32.   __asm __volatile ("jsr a6@(-0x1ce)"
  33.   : "=r" (_res)
  34.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2)
  35.   : "a0","a1","a2","d0","d1", "memory");
  36.   return _res;
  37. }
  38. extern __inline void 
  39. ActivateWindow (BASE_PAR_DECL struct Window *window)
  40. {
  41.   BASE_EXT_DECL
  42.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  43.   register struct Window *a0 __asm("a0") = window;
  44.   __asm __volatile ("jsr a6@(-0x1c2)"
  45.   : /* no output */
  46.   : "r" (a6), "r" (a0)
  47.   : "a0","a1","d0","d1", "memory");
  48. }
  49. extern __inline void 
  50. AddClass (BASE_PAR_DECL struct IClass *classPtr)
  51. {
  52.   BASE_EXT_DECL
  53.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  54.   register struct IClass *a0 __asm("a0") = classPtr;
  55.   __asm __volatile ("jsr a6@(-0x2ac)"
  56.   : /* no output */
  57.   : "r" (a6), "r" (a0)
  58.   : "a0","a1","d0","d1", "memory");
  59. }
  60. extern __inline UWORD 
  61. AddGList (BASE_PAR_DECL struct Window *window,struct Gadget *gadget,unsigned long position,long numGad,struct Requester *requester)
  62. {
  63.   BASE_EXT_DECL
  64.   register UWORD  _res  __asm("d0");
  65.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  66.   register struct Window *a0 __asm("a0") = window;
  67.   register struct Gadget *a1 __asm("a1") = gadget;
  68.   register unsigned long d0 __asm("d0") = position;
  69.   register long d1 __asm("d1") = numGad;
  70.   register struct Requester *a2 __asm("a2") = requester;
  71.   __asm __volatile ("jsr a6@(-0x1b6)"
  72.   : "=r" (_res)
  73.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1), "r" (a2)
  74.   : "a0","a1","a2","d0","d1", "memory");
  75.   return _res;
  76. }
  77. extern __inline UWORD 
  78. AddGadget (BASE_PAR_DECL struct Window *window,struct Gadget *gadget,unsigned long position)
  79. {
  80.   BASE_EXT_DECL
  81.   register UWORD  _res  __asm("d0");
  82.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  83.   register struct Window *a0 __asm("a0") = window;
  84.   register struct Gadget *a1 __asm("a1") = gadget;
  85.   register unsigned long d0 __asm("d0") = position;
  86.   __asm __volatile ("jsr a6@(-0x2a)"
  87.   : "=r" (_res)
  88.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  89.   : "a0","a1","d0","d1", "memory");
  90.   return _res;
  91. }
  92. extern __inline APTR 
  93. AllocRemember (BASE_PAR_DECL struct Remember **rememberKey,unsigned long size,unsigned long flags)
  94. {
  95.   BASE_EXT_DECL
  96.   register APTR  _res  __asm("d0");
  97.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  98.   register struct Remember **a0 __asm("a0") = rememberKey;
  99.   register unsigned long d0 __asm("d0") = size;
  100.   register unsigned long d1 __asm("d1") = flags;
  101.   __asm __volatile ("jsr a6@(-0x18c)"
  102.   : "=r" (_res)
  103.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  104.   : "a0","a1","d0","d1", "memory");
  105.   return _res;
  106. }
  107. extern __inline struct ScreenBuffer *
  108. AllocScreenBuffer (BASE_PAR_DECL struct Screen *sc,struct BitMap *bm,unsigned long flags)
  109. {
  110.   BASE_EXT_DECL
  111.   register struct ScreenBuffer * _res  __asm("d0");
  112.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  113.   register struct Screen *a0 __asm("a0") = sc;
  114.   register struct BitMap *a1 __asm("a1") = bm;
  115.   register unsigned long d0 __asm("d0") = flags;
  116.   __asm __volatile ("jsr a6@(-0x300)"
  117.   : "=r" (_res)
  118.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  119.   : "a0","a1","d0","d1", "memory");
  120.   return _res;
  121. }
  122. extern __inline void 
  123. AlohaWorkbench (BASE_PAR_DECL long wbport)
  124. {
  125.   BASE_EXT_DECL
  126.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  127.   register long a0 __asm("a0") = wbport;
  128.   __asm __volatile ("jsr a6@(-0x192)"
  129.   : /* no output */
  130.   : "r" (a6), "r" (a0)
  131.   : "a0","a1","d0","d1", "memory");
  132. }
  133. extern __inline BOOL 
  134. AutoRequest (BASE_PAR_DECL struct Window *window,struct IntuiText *body,struct IntuiText *posText,struct IntuiText *negText,unsigned long pFlag,unsigned long nFlag,unsigned long width,unsigned long height)
  135. {
  136.   BASE_EXT_DECL
  137.   register BOOL  _res  __asm("d0");
  138.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  139.   register struct Window *a0 __asm("a0") = window;
  140.   register struct IntuiText *a1 __asm("a1") = body;
  141.   register struct IntuiText *a2 __asm("a2") = posText;
  142.   register struct IntuiText *a3 __asm("a3") = negText;
  143.   register unsigned long d0 __asm("d0") = pFlag;
  144.   register unsigned long d1 __asm("d1") = nFlag;
  145.   register unsigned long d2 __asm("d2") = width;
  146.   register unsigned long d3 __asm("d3") = height;
  147.   __asm __volatile ("jsr a6@(-0x15c)"
  148.   : "=r" (_res)
  149.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (a3), "r" (d0), "r" (d1), "r" (d2), "r" (d3)
  150.   : "a0","a1","a2","a3","d0","d1","d2","d3", "memory");
  151.   return _res;
  152. }
  153. extern __inline void 
  154. BeginRefresh (BASE_PAR_DECL struct Window *window)
  155. {
  156.   BASE_EXT_DECL
  157.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  158.   register struct Window *a0 __asm("a0") = window;
  159.   __asm __volatile ("jsr a6@(-0x162)"
  160.   : /* no output */
  161.   : "r" (a6), "r" (a0)
  162.   : "a0","a1","d0","d1", "memory");
  163. }
  164. extern __inline struct Window *
  165. BuildEasyRequestArgs (BASE_PAR_DECL struct Window *window,struct EasyStruct *easyStruct,unsigned long idcmp,APTR args)
  166. {
  167.   BASE_EXT_DECL
  168.   register struct Window * _res  __asm("d0");
  169.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  170.   register struct Window *a0 __asm("a0") = window;
  171.   register struct EasyStruct *a1 __asm("a1") = easyStruct;
  172.   register unsigned long d0 __asm("d0") = idcmp;
  173.   register APTR a3 __asm("a3") = args;
  174.   __asm __volatile ("jsr a6@(-0x252)"
  175.   : "=r" (_res)
  176.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (a3)
  177.   : "a0","a1","a3","d0","d1", "memory");
  178.   return _res;
  179. }
  180. #ifndef NO_INLINE_STDARG
  181. #define BuildEasyRequest(a0, a1, a2, tags...) \
  182.   ({ struct TagItem _tags[] = { tags }; BuildEasyRequestArgs ((a0), (a1), (a2), _tags); })
  183. #endif /* not NO_INLINE_STDARG */
  184. extern __inline struct Window *
  185. BuildSysRequest (BASE_PAR_DECL struct Window *window,struct IntuiText *body,struct IntuiText *posText,struct IntuiText *negText,unsigned long flags,unsigned long width,unsigned long height)
  186. {
  187.   BASE_EXT_DECL
  188.   register struct Window * _res  __asm("d0");
  189.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  190.   register struct Window *a0 __asm("a0") = window;
  191.   register struct IntuiText *a1 __asm("a1") = body;
  192.   register struct IntuiText *a2 __asm("a2") = posText;
  193.   register struct IntuiText *a3 __asm("a3") = negText;
  194.   register unsigned long d0 __asm("d0") = flags;
  195.   register unsigned long d1 __asm("d1") = width;
  196.   register unsigned long d2 __asm("d2") = height;
  197.   __asm __volatile ("jsr a6@(-0x168)"
  198.   : "=r" (_res)
  199.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (a3), "r" (d0), "r" (d1), "r" (d2)
  200.   : "a0","a1","a2","a3","d0","d1","d2", "memory");
  201.   return _res;
  202. }
  203. extern __inline ULONG 
  204. ChangeScreenBuffer (BASE_PAR_DECL struct Screen *sc,struct ScreenBuffer *sb)
  205. {
  206.   BASE_EXT_DECL
  207.   register ULONG  _res  __asm("d0");
  208.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  209.   register struct Screen *a0 __asm("a0") = sc;
  210.   register struct ScreenBuffer *a1 __asm("a1") = sb;
  211.   __asm __volatile ("jsr a6@(-0x30c)"
  212.   : "=r" (_res)
  213.   : "r" (a6), "r" (a0), "r" (a1)
  214.   : "a0","a1","d0","d1", "memory");
  215.   return _res;
  216. }
  217. extern __inline void 
  218. ChangeWindowBox (BASE_PAR_DECL struct Window *window,long left,long top,long width,long height)
  219. {
  220.   BASE_EXT_DECL
  221.   register struct IntuitionBase *a6 __asm("a6") = BASE_NAME;
  222.   register struct Window *a0 __asm("a0") = window;
  223.   register long d0 __asm("d0") = left;
  224.   register long d1 __asm("d1") = top;
  225.   register long d2 __asm("d2") = width;
  226.   register long d3 __asm("d3") = height;
  227.   __asm __volatile ("jsr a6@(-0x1e6)"
  228.   : /* no output */
  229.