home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / ace_gpl_release / include / workbench / workbench.h < prev   
Encoding:
C/C++ Source or Header  |  1996-08-28  |  5.2 KB  |  185 lines

  1. #ifndef WORKBENCH_WORKBENCH_H
  2. #define WORKBENCH_WORKBENCH_H 1
  3. /*
  4. ** workbench.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/03/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for workbench.h
  17. */
  18. #ifndef AppIconPtr
  19. #define AppIconPtr ADDRESS
  20. #endif
  21. #ifndef AppMenuItemPtr
  22. #define AppMenuItemPtr ADDRESS
  23. #endif
  24. #ifndef AppMessagePtr
  25. #define AppMessagePtr ADDRESS
  26. #endif
  27. #ifndef AppWindowPtr
  28. #define AppWindowPtr ADDRESS
  29. #endif
  30. #ifndef DiskObjectPtr
  31. #define DiskObjectPtr ADDRESS
  32. #endif
  33. #ifndef DrawerDataPtr
  34. #define DrawerDataPtr ADDRESS
  35. #endif
  36. #ifndef FreeListPtr
  37. #define FreeListPtr ADDRESS
  38. #endif
  39. #ifndef OldDrawerDataPtr
  40. #define OldDrawerDataPtr ADDRESS
  41. #endif
  42. /*
  43. ** End of StructPointer defines for workbench.h
  44. */
  45.  
  46. #ifndef EXEC_TYPES_H
  47. #include <exec/types.h>
  48. #endif
  49.  
  50. #ifndef EXEC_NODES_H
  51. #include <exec/nodes.h>
  52. #endif
  53.  
  54. #ifndef EXEC_LISTS_H
  55. #include <exec/lists.h>
  56. #endif
  57.  
  58. #ifndef EXEC_TASKS_H
  59. #include <exec/tasks.h>
  60. #endif
  61.  
  62. #ifndef INTUITION_INTUITION_H
  63. #include <intuition/intuition.h>
  64. #endif
  65.  
  66. #ifndef WORKBENCH_STARTUP_H
  67. #include <workbench/startup.h>
  68. #endif
  69.  
  70. #define WBDISK      1
  71. #define WBDRAWER    2
  72. #define WBTOOL      3
  73. #define WBPROJECT   4
  74. #define WBGARBAGE   5
  75. #define WBDEVICE    6
  76. #define WBKICK      7
  77. #define WBAPPICON   8
  78.  
  79. STRUCT OldDrawerData   /* pre V36 definition */
  80.     NewWindow dd_NewWindow    /* args to open window */
  81.     LONGINT        dd_CurrentX     /* current x coordinate of origin */
  82.     LONGINT        dd_CurrentY     /* current y coordinate of origin */
  83. END STRUCT 
  84. /* the amount of DrawerData actually written to disk */
  85. #define OLDDRAWERDATAFILESIZE   (SIZEOF(OldDrawerData))
  86.  
  87. STRUCT DrawerData  
  88.     NewWindow dd_NewWindow    /* args to open window */
  89.     LONGINT        dd_CurrentX     /* current x coordinate of origin */
  90.     LONGINT        dd_CurrentY     /* current y coordinate of origin */
  91.     LONGINT       dd_Flags    /* flags for drawer */
  92.     SHORTINT       dd_ViewModes    /* view mode for drawer */
  93. END STRUCT 
  94. /* the amount of DrawerData actually written to disk */
  95. #define DRAWERDATAFILESIZE  (SIZEOF(DrawerData))
  96.  
  97. STRUCT DiskObject  
  98.     SHORTINT       do_Magic  /* a magic number at the start of the file */
  99.     SHORTINT       do_Version  /* a version number,  so we can change it */
  100.     _Gadget do_Gadget   /* a copy of in core gadget */
  101.     BYTE        do_Type 
  102.     ADDRESS   do_DefaultTool 
  103.     ADDRESS   do_ToolTypes
  104.     LONGINT        do_CurrentX 
  105.     LONGINT        do_CurrentY 
  106.     DrawerDataPtr  do_DrawerData 
  107.     ADDRESS   do_ToolWindow   /* only applies to tools */
  108.     LONGINT        do_StackSize    /* only applies to tools */
  109.  
  110. END STRUCT 
  111.  
  112. #define WB_DISKMAGIC    &He310  /* a magic number,  not easily impersonated */
  113. #define WB_DISKVERSION  1   /* our current version number */
  114. #define WB_DISKREVISION 1   /* our current revision number */
  115. /* I only use the lower 8 bits of Gadget.UserData for the revision # */
  116. #define WB_DISKREVISIONMASK 255
  117.  
  118. STRUCT FreeList  
  119.     SHORTINT        fl_NumFree 
  120.     _List fl_MemList 
  121. END STRUCT 
  122.  
  123. /* workbench does different complement modes for its gadgets.
  124. ** It supports separate images,  complement mode,  and backfill mode.
  125. ** The first two are identical to intuitions GFLG_GADGIMAGE and GFLG_GADGHCOMP.
  126. ** backfill is similar to GFLG_GADGHCOMP,  but the region outside of the
  127. ** image (which normally would be color three when complemented)
  128. ** is flood-filled to color zero.
  129. */
  130. #define GFLG_GADGBACKFILL &H0001
  131. #define GADGBACKFILL      &H0001    /* an old synonym */
  132.  
  133. /* if an icon does not really live anywhere,  set its current position
  134. ** to here
  135. */
  136. #define NO_ICON_POSITION    (&H80000000)
  137.  
  138. /* workbench now is a library.  this is it's name */
  139. #define WORKBENCH_NAME      "workbench.library"
  140.  
  141. /* If you find am_Version >= AM_VERSION,  you know this structure has
  142.  * at least the fields defined in this version of the include file
  143.  */
  144. #define AM_VERSION  1
  145.  
  146. STRUCT AppMessage  
  147.     _Message am_Message   /* standard message structure */
  148.     SHORTINT am_Type       /* message type */
  149.     LONGINT am_UserData       /* application specific */
  150.     LONGINT am_ID         /* application definable ID */
  151.     LONGINT am_NumArgs         /* # of elements in arglist */
  152.     WBArgPtr  am_ArgList    /* the arguements themselves */
  153.     SHORTINT am_Version        /* will be AM_VERSION */
  154.     SHORTINT am_Class      /* message class */
  155.     SHORTINT am_MouseX      /* mouse x position of event */
  156.     SHORTINT am_MouseY      /* mouse y position of event */
  157.     LONGINT am_Seconds        /* current system clock time */
  158.     LONGINT am_Micros         /* current system clock time */
  159.     STRING am_Reserved SIZE 32  /* 8*SIZEOF(LONGINT) */   /* avoid recompilation */
  160. END STRUCT 
  161.  
  162. /* types of app messages */
  163. #define AMTYPE_APPWINDOW   7    /* app window message    */
  164. #define AMTYPE_APPICON     8    /* app icon message  */
  165. #define AMTYPE_APPMENUITEM 9    /* app menu item message */
  166.  
  167.  
  168. /*
  169.  * The following structures are private.  These are just stub
  170.  * structures for code compatibility...
  171.  */
  172. STRUCT  AppWindow    
  173.     ADDRESS   aw_PRIVATE 
  174. END STRUCT 
  175.  
  176. STRUCT  AppIcon      
  177.     ADDRESS   ai_PRIVATE 
  178. END STRUCT 
  179.  
  180. STRUCT      AppMenuItem  
  181.     ADDRESS   ami_PRIVATE 
  182. END STRUCT 
  183.  
  184. #endif  /* !WORKBENCH_WORKBENCH_H */
  185.