home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / workbench / workbench.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  4KB  |  140 lines

  1. #ifndef WORKBENCH_WORKBENCH_H
  2. #define WORKBENCH_WORKBENCH_H
  3. /*
  4. **    $VER: workbench.h 40.1 (26.8.93)
  5. **    Includes Release 40.15
  6. **
  7. **    workbench.library general definitions
  8. **
  9. **    (C) Copyright 1985-1993 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. /* workbench does different complement modes for its gadgets.
  87. ** It supports separate images, complement mode, and backfill mode.
  88. ** The first two are identical to intuitions GFLG_GADGIMAGE and GFLG_GADGHCOMP.
  89. ** backfill is similar to GFLG_GADGHCOMP, but the region outside of the
  90. ** image (which normally would be color three when complemented)
  91. ** is flood-filled to color zero.
  92. */
  93. #define GFLG_GADGBACKFILL 0x0001
  94. #define GADGBACKFILL      0x0001    /* an old synonym */
  95.  
  96. /* if an icon does not really live anywhere, set its current position
  97. ** to here
  98. */
  99. #define NO_ICON_POSITION    (0x80000000)
  100.  
  101. /* workbench now is a library.    this is it's name */
  102. #define WORKBENCH_NAME        "workbench.library"
  103.  
  104. /* If you find am_Version >= AM_VERSION, you know this structure has
  105.  * at least the fields defined in this version of the include file
  106.  */
  107. #define    AM_VERSION    1
  108.  
  109. struct AppMessage {
  110.     struct Message am_Message;    /* standard message structure */
  111.     UWORD am_Type;        /* message type */
  112.     ULONG am_UserData;        /* application specific */
  113.     ULONG am_ID;        /* application definable ID */
  114.     LONG am_NumArgs;        /* # of elements in arglist */
  115.     struct WBArg *am_ArgList;    /* the arguements themselves */
  116.     UWORD am_Version;        /* will be AM_VERSION */
  117.     UWORD am_Class;        /* message class */
  118.     WORD am_MouseX;        /* mouse x position of event */
  119.     WORD am_MouseY;        /* mouse y position of event */
  120.     ULONG am_Seconds;        /* current system clock time */
  121.     ULONG am_Micros;        /* current system clock time */
  122.     ULONG am_Reserved[8];    /* avoid recompilation */
  123. };
  124.  
  125. /* types of app messages */
  126. #define AMTYPE_APPWINDOW   7    /* app window message     */
  127. #define AMTYPE_APPICON       8    /* app icon message     */
  128. #define AMTYPE_APPMENUITEM 9    /* app menu item message */
  129.  
  130.  
  131. /*
  132.  * The following structures are private.  These are just stub
  133.  * structures for code compatibility...
  134.  */
  135. struct    AppWindow    { void *aw_PRIVATE;  };
  136. struct    AppIcon        { void *ai_PRIVATE;  };
  137. struct        AppMenuItem    { void *ami_PRIVATE; };
  138.  
  139. #endif    /* !WORKBENCH_WORKBENCH_H */
  140.