home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / includes / workbench / workbench.h < prev    next >
C/C++ Source or Header  |  1992-09-01  |  5KB  |  151 lines

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