home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / programi / gcc_9112.lzh / include20 / inline / wb.h < prev   
Encoding:
C/C++ Source or Header  |  1991-12-15  |  3.8 KB  |  144 lines

  1. #include <inline/stub.h>
  2. #ifndef BASE_EXT_DECL
  3. #define BASE_EXT_DECL extern struct WorkbenchBase * WorkbenchBase;
  4. #endif
  5. #ifndef BASE_PAR_DECL
  6. #define BASE_PAR_DECL
  7. #define BASE_PAR_DECL0 void
  8. #endif
  9. #ifndef BASE_NAME
  10. #define BASE_NAME WorkbenchBase
  11. #endif
  12. #ifdef PRIVATE
  13. #endif
  14. __inline static struct AppWindow* AddAppWindowA(BASE_PAR_DECL long unsigned int id, long unsigned int userdata, struct Window* window, struct MsgPort* msgport, struct TagItem* taglist)
  15. {
  16.     BASE_EXT_DECL
  17.     register struct AppWindow* res __asm("d0");
  18.     register void *a6 __asm ("a6");
  19.     register long unsigned int d0 __asm("d0");
  20.     register long unsigned int d1 __asm("d1");
  21.     register struct Window* a0 __asm("a0");
  22.     register struct MsgPort* a1 __asm("a1");
  23.     register struct TagItem* a2 __asm("a2");
  24.  
  25.     a6 = BASE_NAME;
  26.     d0 = id;
  27.     d1 = userdata;
  28.     a0 = window;
  29.     a1 = msgport;
  30.     a2 = taglist;
  31.     __asm volatile ("
  32.     jsr a6@(-0x30)"
  33.     : "=g" (res)
  34.     : "g" (a6), "g" (d0), "g" (d1), "g" (a0), "g" (a1), "g" (a2)
  35.     : "d0", "d1", "a0", "a1", "a2");
  36.     return res;
  37. }
  38. __inline static BOOL RemoveAppWindow(BASE_PAR_DECL struct AppWindow* appWindow)
  39. {
  40.     BASE_EXT_DECL
  41.     register BOOL res __asm("d0");
  42.     register void *a6 __asm ("a6");
  43.     register struct AppWindow* a0 __asm("a0");
  44.  
  45.     a6 = BASE_NAME;
  46.     a0 = appWindow;
  47.     __asm volatile ("
  48.     jsr a6@(-0x36)"
  49.     : "=g" (res)
  50.     : "g" (a6), "g" (a0)
  51.     : "d0", "d1", "a0", "a1");
  52.     return res;
  53. }
  54. __inline static struct AppIcon* AddAppIconA(BASE_PAR_DECL long unsigned int id, long unsigned int userdata, UBYTE* text, struct MsgPort* msgport, struct FileLock* lock, struct DiskObject* diskobj, struct TagItem* taglist)
  55. {
  56.     BASE_EXT_DECL
  57.     register struct AppIcon* res __asm("d0");
  58.     register void *a6 __asm ("a6");
  59.     register long unsigned int d0 __asm("d0");
  60.     register long unsigned int d1 __asm("d1");
  61.     register UBYTE* a0 __asm("a0");
  62.     register struct MsgPort* a1 __asm("a1");
  63.     register struct FileLock* a2 __asm("a2");
  64.     register struct DiskObject* a3 __asm("a3");
  65.     register struct TagItem* a4 __asm("a4");
  66.  
  67.     a6 = BASE_NAME;
  68.     d0 = id;
  69.     d1 = userdata;
  70.     a0 = text;
  71.     a1 = msgport;
  72.     a2 = lock;
  73.     a3 = diskobj;
  74.     a4 = taglist;
  75.     __asm volatile ("" : /* no input */
  76.     : "g" (d0));
  77.     __asm volatile ("
  78.     jsr a6@(-0x3c)"
  79.     : "=g" (res)
  80.     : "g" (a6), "g" (d0), "g" (d1), "g" (a0), "g" (a1), "g" (a2), "g" (a3)
  81.     : "d0", "d1", "a0", "a1", "a2", "a3", "a4");
  82.     return res;
  83. }
  84. __inline static BOOL RemoveAppIcon(BASE_PAR_DECL struct AppIcon* appIcon)
  85. {
  86.     BASE_EXT_DECL
  87.     register BOOL res __asm("d0");
  88.     register void *a6 __asm ("a6");
  89.     register struct AppIcon* a0 __asm("a0");
  90.  
  91.     a6 = BASE_NAME;
  92.     a0 = appIcon;
  93.     __asm volatile ("
  94.     jsr a6@(-0x42)"
  95.     : "=g" (res)
  96.     : "g" (a6), "g" (a0)
  97.     : "d0", "d1", "a0", "a1");
  98.     return res;
  99. }
  100. __inline static struct AppMenuItem* AddAppMenuItemA(BASE_PAR_DECL long unsigned int id, long unsigned int userdata, UBYTE* text, struct MsgPort* msgport, struct TagItem* taglist)
  101. {
  102.     BASE_EXT_DECL
  103.     register struct AppMenuItem* res __asm("d0");
  104.     register void *a6 __asm ("a6");
  105.     register long unsigned int d0 __asm("d0");
  106.     register long unsigned int d1 __asm("d1");
  107.     register UBYTE* a0 __asm("a0");
  108.     register struct MsgPort* a1 __asm("a1");
  109.     register struct TagItem* a2 __asm("a2");
  110.  
  111.     a6 = BASE_NAME;
  112.     d0 = id;
  113.     d1 = userdata;
  114.     a0 = text;
  115.     a1 = msgport;
  116.     a2 = taglist;
  117.     __asm volatile ("
  118.     jsr a6@(-0x48)"
  119.     : "=g" (res)
  120.     : "g" (a6), "g" (d0), "g" (d1), "g" (a0), "g" (a1), "g" (a2)
  121.     : "d0", "d1", "a0", "a1", "a2");
  122.     return res;
  123. }
  124. __inline static BOOL RemoveAppMenuItem(BASE_PAR_DECL struct AppMenuItem* appMenuItem)
  125. {
  126.     BASE_EXT_DECL
  127.     register BOOL res __asm("d0");
  128.     register void *a6 __asm ("a6");
  129.     register struct AppMenuItem* a0 __asm("a0");
  130.  
  131.     a6 = BASE_NAME;
  132.     a0 = appMenuItem;
  133.     __asm volatile ("
  134.     jsr a6@(-0x4e)"
  135.     : "=g" (res)
  136.     : "g" (a6), "g" (a0)
  137.     : "d0", "d1", "a0", "a1");
  138.     return res;
  139. }
  140. #undef BASE_EXT_DECL
  141. #undef BASE_PAR_DECL
  142. #undef BASE_PAR_DECL0
  143. #undef BASE_NAME
  144.