home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / cbm / nduk-v39.lha / V39 / include / workbench / workbench.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  5KB  |  149 lines

  1. #ifndef WORKBENCH_WORKBENCH_H
  2. #define WORKBENCH_WORKBENCH_H
  3. /*
  4. **    $VER: workbench.h 36.25 (02.11.90)
  5. **    Includes Release 39.108
  6. **
  7. **    workbench.library general definitions
  8. **
  9. **    (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **    All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include "exec/types.h"
  15. #endif
  16.  
  17. #ifndef    EXEC_NODES_H
  18. #include "exec/nodes.h"
  19. #endif
  20.  
  21. #ifndef    EXEC_LISTS_H
  22. #include "exec/lists.h"
  23. #endif
  24.  
  25. #ifndef EXEC_TASKS_H
  26. #include "exec/tasks.h"
  27. #endif
  28.  
  29. #ifndef INTUITION_INTUITION_H
  30. #include "intuition/intuition.h"
  31. #endif
  32.  
  33. #define    WBDISK        1
  34. #define    WBDRAWER    2
  35. #define    WBTOOL        3
  36. #define    WBPROJECT    4
  37. #define    WBGARBAGE    5
  38. #define    WBDEVICE    6
  39. #define    WBKICK        7
  40. #define WBAPPICON    8
  41.  
  42. struct OldDrawerData { /* pre V36 definition */
  43.     struct NewWindow    dd_NewWindow;    /* args to open window */
  44.     LONG        dd_CurrentX;    /* current x coordinate of origin */
  45.     LONG        dd_CurrentY;    /* current y coordinate of origin */
  46. };
  47. /* the amount of DrawerData actually written to disk */
  48. #define OLDDRAWERDATAFILESIZE    (sizeof(struct OldDrawerData))
  49.  
  50. struct DrawerData {
  51.     struct NewWindow    dd_NewWindow;    /* args to open window */
  52.     LONG        dd_CurrentX;    /* current x coordinate of origin */
  53.     LONG        dd_CurrentY;    /* current y coordinate of origin */
  54.     ULONG        dd_Flags;    /* flags for drawer */
  55.     UWORD        dd_ViewModes;    /* view mode for drawer */
  56. };
  57. /* the amount of DrawerData actually written to disk */
  58. #define DRAWERDATAFILESIZE    (sizeof(struct DrawerData))
  59.  
  60. struct DiskObject {
  61.     UWORD        do_Magic; /* a magic number at the start of the file */
  62.     UWORD        do_Version; /* a version number, so we can change it */
  63.     struct Gadget    do_Gadget;    /* a copy of in core gadget */
  64.     UBYTE        do_Type;
  65.     char *        do_DefaultTool;
  66.     char **        do_ToolTypes;
  67.     LONG        do_CurrentX;
  68.     LONG        do_CurrentY;
  69.     struct DrawerData *    do_DrawerData;
  70.     char *        do_ToolWindow;    /* only applies to tools */
  71.     LONG        do_StackSize;    /* only applies to tools */
  72.  
  73. };
  74.  
  75. #define WB_DISKMAGIC    0xe310    /* a magic number, not easily impersonated */
  76. #define WB_DISKVERSION    1    /* our current version number */
  77. #define WB_DISKREVISION    1    /* our current revision number */
  78. /* I only use the lower 8 bits of Gadget.UserData for the revision # */
  79. #define WB_DISKREVISIONMASK    255
  80.  
  81. struct FreeList {
  82.     WORD        fl_NumFree;
  83.     struct List        fl_MemList;
  84. };
  85.  
  86. /* each message that comes into the WorkBenchPort must have a type field
  87. ** in the preceeding short.  These are the defines for this type
  88. */
  89.  
  90. #define MTYPE_PSTD        1    /* a "standard Potion" message */
  91. #define MTYPE_TOOLEXIT        2    /* exit message from our tools */
  92. #define MTYPE_DISKCHANGE    3    /* dos telling us of a disk change */
  93. #define MTYPE_TIMER        4    /* we got a timer tick */
  94. #define MTYPE_CLOSEDOWN        5    /* <unimplemented> */
  95. #define MTYPE_IOPROC        6    /* <unimplemented> */
  96. #define MTYPE_APPWINDOW        7    /* msg from an app window */
  97. #define MTYPE_APPICON        8    /* msg from an app icon */
  98. #define MTYPE_APPMENUITEM    9    /* msg from an app menuitem */
  99. #define MTYPE_COPYEXIT        10    /* exit msg from copy process */
  100. #define MTYPE_ICONPUT        11    /* msg from PutDiskObject in icon.library */
  101.  
  102. /* workbench does different complement modes for its gadgets.
  103. ** It supports separate images, complement mode, and backfill mode.
  104. ** The first two are identical to intuitions GADGIMAGE and GADGHCOMP.
  105. ** backfill is similar to GADGHCOMP, but the region outside of the
  106. ** image (which normally would be color three when complemented)
  107. ** is flood-filled to color zero.
  108. */
  109. #define GADGBACKFILL    0x0001
  110.  
  111. /* if an icon does not really live anywhere, set its current position
  112. ** to here
  113. */
  114. #define NO_ICON_POSITION    (0x80000000)
  115.  
  116. /* workbench now is a library.    this is it's name */
  117. #define WORKBENCH_NAME        "workbench.library"
  118.  
  119. /* If you find am_Version >= AM_VERSION, you know this structure has
  120.  * at least the fields defined in this version of the include file
  121.  */
  122. #define    AM_VERSION    1
  123.  
  124. struct AppMessage {
  125.     struct Message am_Message;    /* standard message structure */
  126.     UWORD am_Type;        /* message type */
  127.     ULONG am_UserData;        /* application specific */
  128.     ULONG am_ID;        /* application definable ID */
  129.     LONG am_NumArgs;        /* # of elements in arglist */
  130.     struct WBArg *am_ArgList;    /* the arguements themselves */
  131.     UWORD am_Version;        /* will be AM_VERSION */
  132.     UWORD am_Class;        /* message class */
  133.     WORD am_MouseX;        /* mouse x position of event */
  134.     WORD am_MouseY;        /* mouse y position of event */
  135.     ULONG am_Seconds;        /* current system clock time */
  136.     ULONG am_Micros;        /* current system clock time */
  137.     ULONG am_Reserved[8];    /* avoid recompilation */
  138. };
  139.  
  140. /*
  141.  * The following structures are private.  These are just stub
  142.  * structures for code compatibility...
  143.  */
  144. struct    AppWindow    { void *aw_PRIVATE;  };
  145. struct    AppIcon        { void *ai_PRIVATE;  };
  146. struct        AppMenuItem    { void *ami_PRIVATE; };
  147.  
  148. #endif    /* !WORKBENCH_WORKBENCH_H */
  149.