home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / include / intuition / intuition.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  72KB  |  1,844 lines

  1. #ifndef INTUITION_INTUITION_H
  2. #define INTUITION_INTUITION_H TRUE
  3. /*
  4. ** intuition.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. ** Note: Fixed some missing kludgefill.
  13. **       It was missing in:
  14. **       Struct IntuiText
  15. **       Struct Requester
  16. **       Struct MenuItem
  17. **       Date 14-Oct-95   Nils Sjoholm
  18. **
  19. */
  20.  
  21.  
  22. /*
  23. ** This are the StructPointer defines for intuition.h
  24. */
  25. #ifndef BoolInfoPtr
  26. #define BoolInfoPtr ADDRESS
  27. #endif
  28. #ifndef BorderPtr
  29. #define BorderPtr ADDRESS
  30. #endif
  31. #ifndef ColorSpecPtr
  32. #define ColorSpecPtr ADDRESS
  33. #endif
  34. #ifndef EasyStructPtr
  35. #define EasyStructPtr ADDRESS
  36. #endif
  37. #ifndef ExtGadgetPtr
  38. #define ExtGadgetPtr ADDRESS
  39. #endif
  40. #ifndef ExtIntuiMessagePtr
  41. #define ExtIntuiMessagePtr ADDRESS
  42. #endif
  43. #ifndef ExtNewWindowPtr
  44. #define ExtNewWindowPtr ADDRESS
  45. #endif
  46. #ifndef GadgetPtr
  47. #define GadgetPtr ADDRESS
  48. #endif
  49. #ifndef IBoxPtr
  50. #define IBoxPtr ADDRESS
  51. #endif
  52. #ifndef ImagePtr
  53. #define ImagePtr ADDRESS
  54. #endif
  55. #ifndef IntuiMessagePtr
  56. #define IntuiMessagePtr ADDRESS
  57. #endif
  58. #ifndef IntuiTextPtr
  59. #define IntuiTextPtr ADDRESS
  60. #endif
  61. #ifndef MenuPtr
  62. #define MenuPtr ADDRESS
  63. #endif
  64. #ifndef MenuItemPtr
  65. #define MenuItemPtr ADDRESS
  66. #endif
  67. #ifndef NewWindowPtr
  68. #define NewWindowPtr ADDRESS
  69. #endif
  70. #ifndef PropInfoPtr
  71. #define PropInfoPtr ADDRESS
  72. #endif
  73. #ifndef RememberPtr
  74. #define RememberPtr ADDRESS
  75. #endif
  76. #ifndef RequesterPtr
  77. #define RequesterPtr ADDRESS
  78. #endif
  79. #ifndef StringInfoPtr
  80. #define StringInfoPtr ADDRESS
  81. #endif
  82. #ifndef TabletDataPtr
  83. #define TabletDataPtr ADDRESS
  84. #endif
  85. #ifndef TabletHookDataPtr
  86. #define TabletHookDataPtr ADDRESS
  87. #endif
  88. #ifndef WindowPtr
  89. #define WindowPtr ADDRESS
  90. #endif
  91. /*
  92. ** End of StructPointer defines for intuition.h
  93. */                  
  94.  
  95.  
  96.  
  97. #ifndef EXEC_TYPES_H
  98. #include <exec/types.h>
  99. #endif
  100.  
  101. #ifndef GRAPHICS_GFX_H
  102. #include <graphics/gfx.h>
  103. #endif
  104.  
  105. #ifndef GRAPHICS_CLIP_H
  106. #include <graphics/clip.h>
  107. #endif
  108.  
  109. #ifndef GRAPHICS_VIEW_H
  110. #include <graphics/view.h>
  111. #endif
  112.  
  113. #ifndef GRAPHICS_RASTPORT_H
  114. #include <graphics/rastport.h>
  115. #endif
  116.  
  117. #ifndef GRAPHICS_LAYERS_H
  118. #include <graphics/layers.h>
  119. #endif
  120.  
  121. #ifndef GRAPHICS_TEXT_H
  122. #include <graphics/text.h>
  123. #endif
  124.  
  125. #ifndef EXEC_PORTS_H
  126. #include <exec/ports.h>
  127. #endif
  128.  
  129. #ifndef DEVICES_INPUTEVENT_H
  130. #include <devices/inputevent.h>
  131. #endif
  132.  
  133. #ifndef UTILITY_TAGITEM_H
  134. #include <utility/tagitem.h>
  135. #endif
  136.  
  137.  
  138. #ifndef KeyMapPtr
  139. #define KeyMapPtr ADDRESS
  140. #endif
  141. #ifndef ScreenPtr
  142. #define ScreenPtr ADDRESS
  143. #endif
  144. #ifndef StringExtendPtr
  145. #define StringExtendPtr ADDRESS
  146. #endif
  147.  
  148. /*
  149.  * NOTE:  intuition/iobsolete.h is included at the END of this file!
  150.  */
  151.  
  152. /* ======================================================================== */
  153. /* === Menu =============================================================== */
  154. /* ======================================================================== */
  155. STRUCT _Menu
  156.  
  157.     MenuPtr  NextMenu  /* same level */
  158.     SHORTINT LeftEdge 
  159.     SHORTINT   TopEdge    /* position of the select box */
  160.     SHORTINT _Width 
  161.     SHORTINT   Height  /* dimensions of the select box */
  162.     SHORTINT Flags      /* see flag definitions below */
  163.     ADDRESS   MenuName      /* text for this Menu Header */
  164.     MenuItemPtr  FirstItem  /* pointer to first in chain */
  165.  
  166.     /* these mysteriously-named variables are for internal use only */
  167.     SHORTINT JazzX 
  168.     SHORTINT   JazzY 
  169.     SHORTINT   BeatX 
  170.     SHORTINT   BeatY 
  171. END STRUCT 
  172.  
  173.  
  174. /* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION */
  175. #define MENUENABLED &H0001 /* whether or not this menu is enabled */
  176.  
  177. /* FLAGS SET BY INTUITION */
  178. #define MIDRAWN &H0100     /* this menu's items are currently drawn */
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185. /* ======================================================================== */
  186. /* === MenuItem =========================================================== */
  187. /* ======================================================================== */
  188. STRUCT MenuItem
  189.  
  190.     MenuItemPtr  NextItem    /* pointer to next in chained list */
  191.     SHORTINT LeftEdge 
  192.     SHORTINT   TopEdge    /* position of the select box */
  193.     SHORTINT _Width 
  194.     SHORTINT   Height     /* dimensions of the select box */
  195.     SHORTINT Flags      /* see the defines below */
  196.  
  197.     LONGINT MutualExclude     /* set bits mean this item excludes that */
  198.  
  199.     ADDRESS ItemFill       /* points to Image,  IntuiText,  or NULL */
  200.  
  201.     /* when this item is pointed to by the cursor and the items highlight
  202.      *   mode HIGHIMAGE is selected,  this alternate image will be displayed
  203.      */
  204.     ADDRESS SelectFill     /* points to Image,  IntuiText,  or NULL */
  205.  
  206.     BYTE Command     /* only if appliprog sets the COMMSEQ flag */
  207.     BYTE KludgeFill000
  208.     MenuItemPtr  SubItem  /* if non-zero,  points to MenuItem for submenu */
  209.  
  210.     /* The NextSelect field represents the menu number of next selected
  211.      *   item (when user has drag-selected several items)
  212.      */
  213.     SHORTINT NextSelect 
  214. END STRUCT 
  215.  
  216.  
  217. /* FLAGS SET BY THE APPLIPROG */
  218. #define CHECKIT      &H0001   /* set to indicate checkmarkable item */
  219. #define ITEMTEXT  &H0002   /* set if textual,  clear if graphical item */
  220. #define COMMSEQ      &H0004   /* set if there's an command sequence */
  221. #define MENUTOGGLE   &H0008   /* set for toggling checks (else mut. exclude) */
  222. #define ITEMENABLED  &H0010   /* set if this item is enabled */
  223.  
  224. /* these are the SPECIAL HIGHLIGHT FLAG state meanings */
  225. #define HIGHFLAGS &H00C0   /* see definitions below for these bits */
  226. #define HIGHIMAGE &H0000   /* use the user's "select image" */
  227. #define HIGHCOMP  &H0040   /* highlight by complementing the selectbox */
  228. #define HIGHBOX      &H0080   /* highlight by "boxing" the selectbox */
  229. #define HIGHNONE  &H00C0   /* don't highlight */
  230.  
  231. /* FLAGS SET BY BOTH APPLIPROG AND INTUITION */
  232. #define CHECKED   &H0100   /* state of the checkmark */
  233.  
  234. /* FLAGS SET BY INTUITION */
  235. #define ISDRAWN      &H1000   /* this item's subs are currently drawn */
  236. #define HIGHITEM  &H2000   /* this item is currently highlighted */
  237. #define MENUTOGGLED  &H4000   /* this item was already toggled */
  238.  
  239.  
  240.  
  241.  
  242.  
  243. /* ======================================================================== */
  244. /* === Requester ========================================================== */
  245. /* ======================================================================== */
  246. STRUCT Requester
  247.  
  248.     RequesterPtr  OlderRequest 
  249.     SHORTINT LeftEdge 
  250.     SHORTINT   TopEdge       /* dimensions of the entire box */
  251.     SHORTINT _Width 
  252.     SHORTINT   Height        /* dimensions of the entire box */
  253.     SHORTINT RelLeft 
  254.     SHORTINT   RelTop      /* for Pointer relativity offsets */
  255.  
  256.     GadgetPtr  ReqGadget     /* pointer to a list of Gadgets */
  257.     BorderPtr  ReqBorder     /* the box's border */
  258.     IntuiTextPtr  ReqText       /* the box's text */
  259.     SHORTINT Flags         /* see definitions below */
  260.  
  261.     /* pen number for back-plane fill before draws */
  262.     BYTE  BackFill 
  263.     BYTE  KludgeFill00
  264.     /* Layer in place of clip rect  */
  265.     LayerPtr  ReqLayer 
  266.  
  267.     STRING ReqPad1 SIZE 32  
  268.  
  269.     /* If the BitMap plane pointers are non-zero,  this tells the system
  270.      * that the image comes pre-drawn (if the appliprog wants to define
  271.      * its own box,  in any shape or size it wants!)   this is OK by
  272.      * Intuition as LONGINT as there's a good correspondence between
  273.      * the image and the specified Gadgets
  274.      */
  275.     BitMapPtr  ImageBMap  /* points to the BitMap of PREDRAWN imagery */
  276.     WindowPtr  RWindow    /* added.  points back to Window */
  277.  
  278.     ImagePtr  ReqImage   /* new for V36: drawn if USEREQIMAGE set */
  279.  
  280.     STRING ReqPad2 SIZE 32  
  281. END STRUCT 
  282.  
  283.  
  284. /* FLAGS SET BY THE APPLIPROG */
  285. #define POINTREL  &H0001
  286.            /* if POINTREL set,  TopLeft is relative to pointer
  287.             * for DMRequester,  relative to window center
  288.             * for Request().
  289.             */
  290. #define PREDRAWN  &H0002
  291.    /* set if Requester.ImageBMap points to predrawn Requester imagery */
  292. #define NOISYREQ  &H0004
  293.    /* if you don't want requester to filter input     */
  294. #define SIMPLEREQ &H0010
  295.    /* to use SIMPLEREFRESH layer (recommended)  */
  296.  
  297. /* New for V36    */
  298. #define USEREQIMAGE  &H0020
  299.    /*  render linked list ReqImage after BackFill
  300.     * but before gadgets and text
  301.     */
  302. #define NOREQBACKFILL   &H0040
  303.    /* don't bother filling requester with Requester.BackFill pen  */
  304.  
  305.  
  306. /* FLAGS SET BY INTUITION */
  307. #define REQOFFWINDOW &H1000   /* part of one of the Gadgets was offwindow */
  308. #define REQACTIVE &H2000   /* this requester is active */
  309. #define SYSREQUEST   &H4000   /* (unused) this requester caused by system */
  310. #define DEFERREFRESH &H8000   /* this Requester stops a Refresh broadcast */
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317. /* ======================================================================== */
  318. /* === Gadget ============================================================= */
  319. /* ======================================================================== */
  320. STRUCT _Gadget
  321.  
  322.     GadgetPtr  NextGadget    /* next gadget in the list */
  323.  
  324.     SHORTINT LeftEdge 
  325.     SHORTINT   TopEdge    /* "hit box" of gadget */
  326.     SHORTINT _Width 
  327.     SHORTINT   Height     /* "hit box" of gadget */
  328.  
  329.     SHORTINT Flags      /* see below for list of defines */
  330.  
  331.     SHORTINT Activation       /* see below for list of defines */
  332.  
  333.     SHORTINT GadgetType       /* see below for defines */
  334.  
  335.     /* appliprog can specify that the Gadget be rendered as either as Border
  336.      * or an Image.  This variable points to which (or equals NULL if there's
  337.      * nothing to be rendered about this Gadget)
  338.      */
  339.     ADDRESS GadgetRender 
  340.  
  341.     /* appliprog can specify "highlighted" imagery rather than algorithmic
  342.      * this can point to either Border or Image data
  343.      */
  344.     ADDRESS SelectRender 
  345.  
  346.     IntuiTextPtr  GadgetText    /* text for this gadget */
  347.  
  348.     /* MutualExclude,  never implemented,  is now declared obsolete.
  349.      * There are published examples of implementing a more general
  350.      * and practical exclusion in your applications.
  351.      *
  352.      * Starting with V36,  this field is used to point to a hook
  353.      * for a custom gadget.
  354.      *
  355.      * Programs using this field for their own processing will
  356.      * continue to work,  as LONGINT as they don't try the
  357.      * trick with custom gadgets.
  358.      */
  359.     LONGINT MutualExclude   /* obsolete */
  360.  
  361.     /* pointer to a structure of special data required by Proportional, 
  362.      * String and Integer Gadgets
  363.      */
  364.     ADDRESS SpecialInfo 
  365.  
  366.     SHORTINT GadgetID   /* user-definable ID field */
  367.     ADDRESS UserData    /* ptr to general purpose User data (ignored by In) */
  368. END STRUCT 
  369.  
  370.  
  371. STRUCT ExtGadget
  372.  
  373.     /* The first fields match STRUCT Gadget exactly */
  374.     ExtGadgetPtr  NextGadget  /* Matches STRUCT Gadget */
  375.     SHORTINT LeftEdge 
  376.     SHORTINT   TopEdge      /* Matches STRUCT Gadget */
  377.     SHORTINT _Width 
  378.     SHORTINT   Height       /* Matches STRUCT Gadget */
  379.     SHORTINT Flags        /* Matches STRUCT Gadget */
  380.     SHORTINT Activation         /* Matches STRUCT Gadget */
  381.     SHORTINT GadgetType         /* Matches STRUCT Gadget */
  382.     ADDRESS GadgetRender        /* Matches STRUCT Gadget */
  383.     ADDRESS SelectRender        /* Matches STRUCT Gadget */
  384.     IntuiTextPtr  GadgetText  /* Matches STRUCT Gadget */
  385.     LONGINT MutualExclude       /* Matches STRUCT Gadget */
  386.     ADDRESS SpecialInfo         /* Matches STRUCT Gadget */
  387.     SHORTINT GadgetID        /* Matches STRUCT Gadget */
  388.     ADDRESS UserData         /* Matches STRUCT Gadget */
  389.  
  390.     /* These fields only exist under V39 and only if GFLG_EXTENDED is set */
  391.     LONGINT MoreFlags     /* see GMORE_ flags below */
  392.     SHORTINT BoundsLeftEdge    /* Bounding extent for gadget,  valid   */
  393.     SHORTINT BoundsTopEdge     /* only if GMORE_BOUNDS is set.  The   */
  394.     SHORTINT BoundsWidth       /* GFLG_RELxxx flags affect these      */
  395.     SHORTINT BoundsHeight      /* coordinates as well.        */
  396. END STRUCT 
  397.  
  398.  
  399. /* --- Gadget.Flags values --- */
  400. /* combinations in these bits describe the highlight technique to be used */
  401. #define GFLG_GADGHIGHBITS &H0003
  402. #define GFLG_GADGHCOMP    &H0000  /* Complement the select box */
  403. #define GFLG_GADGHBOX     &H0001  /* Draw a box around the image */
  404. #define GFLG_GADGHIMAGE   &H0002  /* Blast in this alternate image */
  405. #define GFLG_GADGHNONE    &H0003  /* don't highlight */
  406.  
  407. #define GFLG_GADGIMAGE       &H0004  /* set if GadgetRender and SelectRender
  408.                * point to an Image structure,  clear
  409.                * if they point to Border structures
  410.                */
  411.  
  412. /* combinations in these next two bits specify to which corner the gadget's
  413.  *  Left & Top coordinates are relative.  If relative to Top/Left, 
  414.  *  these are "normal" coordinates (everything is relative to something in
  415.  *  this universe).
  416.  *
  417.  * Gadget positions and dimensions are relative to the window or
  418.  * requester which contains the gadget
  419.  */
  420. #define GFLG_RELBOTTOM    &H0008  /* vert. pos. is relative to bottom edge */
  421. #define GFLG_RELRIGHT     &H0010  /* horiz. pos. is relative to right edge */
  422. #define GFLG_RELWIDTH     &H0020  /* width is relative to req/window */
  423. #define GFLG_RELHEIGHT    &H0040  /* height is relative to req/window   */
  424.  
  425. /* New for V39: GFLG_RELSPECIAL allows custom gadget implementors to
  426.  * make gadgets whose position and size depend in an arbitrary way
  427.  * on their window's dimensions.  The GM_LAYOUT method will be invoked
  428.  * for such a gadget (or any other GREL_xxx gadget) at suitable times, 
  429.  * such as when the window opens or the window's size changes.
  430.  */
  431. #define GFLG_RELSPECIAL   &H4000  /* custom gadget has special relativity.
  432.                * Gadget box values are absolutes,  but
  433.                * can be changed via the GM_LAYOUT method.
  434.                */
  435. #define GFLG_SELECTED     &H0080  /* you may initialize and look at this   */
  436.  
  437. /* the GFLG_DISABLED flag is initialized by you and later set by Intuition
  438.  * according to your calls to On/OffGadget().  It specifies whether or not
  439.  * this Gadget is currently disabled from being selected
  440.  */
  441. #define GFLG_DISABLED     &H0100
  442.  
  443. /* These flags specify the type of text field that Gadget.GadgetText
  444.  * points to.  In all normal (pre-V36) gadgets which you initialize
  445.  * this field should always be zero.  Some types of gadget objects
  446.  * created from classes will use these fields to keep track of
  447.  * types of labels/contents that different from IntuiText,  but are
  448.  * stashed in GadgetText.
  449.  */
  450.  
  451. #define GFLG_LABELMASK    &H3000
  452. #define GFLG_LABELITEXT   &H0000  /* GadgetText points to IntuiText  */
  453. #define  GFLG_LABELSTRING  &H1000  /* GadgetText points to (BYTE  *) */
  454. #define GFLG_LABELIMAGE   &H2000  /* GadgetText points to Image (object)   */
  455.  
  456. /* New for V37: GFLG_TABCYCLE */
  457. #define GFLG_TABCYCLE     &H0200  /* (string or custom) gadget participates in
  458.                * cycling activation with Tab or Shift-Tab
  459.                */
  460. /* New for V37: GFLG_STRINGEXTEND.  We discovered that V34 doesn't properly
  461.  * ignore the value we had chosen for the Gadget->Activation flag
  462.  * GACT_STRINGEXTEND.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  463.  * The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  464.  * safe under V34,  and equivalent to GACT_STRINGEXTEND under V37.
  465.  * (Note that the two flags are not numerically equal)
  466.  */
  467. #define GFLG_STRINGEXTEND &H0400  /* this String Gadget has StringExtend   */
  468.  
  469. /* New for V39: GFLG_IMAGEDISABLE.  This flag is automatically set if
  470.  * the custom image of this gadget knows how to do disabled rendering
  471.  * (more specifically,  if its IA_SupportsDisable attribute is TRUE).
  472.  * Intuition uses this to defer the ghosting to the image-class, 
  473.  * instead of doing it itself (the old compatible way).
  474.  * Do not set this flag yourself - Intuition will do it for you.
  475.  */
  476.  
  477. #define GFLG_IMAGEDISABLE &H0800  /* Gadget's image knows how to do disabled
  478.                * rendering
  479.                */
  480.  
  481. /* New for V39:  If set,  this bit means that the Gadget is actually
  482.  * a STRUCT ExtGadget,  with new fields and flags.  All V39 boopsi
  483.  * gadgets are ExtGadgets.  Never ever attempt to read the extended
  484.  * fields of a gadget if this flag is not set.
  485.  */
  486. #define GFLG_EXTENDED     &H8000  /* Gadget is extended */
  487.  
  488. /* ---   Gadget.Activation flag values --- */
  489. /* Set GACT_RELVERIFY if you want to verify that the pointer was still over
  490.  * the gadget when the select button was released.  Will cause
  491.  * an IDCMP_GADGETUP message to be sent if so.
  492.  */
  493. #define GACT_RELVERIFY    &H0001
  494.  
  495. /* the flag GACT_IMMEDIATE,  when set,  informs the caller that the gadget
  496.  *  was activated when it was activated.  This flag works in conjunction with
  497.  *  the GACT_RELVERIFY flag
  498.  */
  499. #define GACT_IMMEDIATE    &H0002
  500.  
  501. /* the flag GACT_ENDGADGET,  when set,  tells the system that this gadget, 
  502.  * when selected,  causes the Requester to be ended.  Requesters
  503.  * that are ended are erased and unlinked from the system.
  504.  */
  505. #define GACT_ENDGADGET    &H0004
  506.  
  507. /* the GACT_FOLLOWMOUSE flag,  when set,  specifies that you want to receive
  508.  * reports on mouse movements while this gadget is active.
  509.  * You probably want to set the GACT_IMMEDIATE flag when using
  510.  * GACT_FOLLOWMOUSE,  since that's the only reasonable way you have of
  511.  * learning why Intuition is suddenly sending you a stream of mouse
  512.  * movement events.  If you don't set GACT_RELVERIFY,  you'll get at
  513.  * least one Mouse Position event.
  514.  * Note: boolean FOLLOWMOUSE gadgets require GACT_RELVERIFY to get
  515.  * _any_ mouse movement events (this unusual behavior is a compatibility
  516.  * hold-over from the old days).
  517.  */
  518. #define GACT_FOLLOWMOUSE  &H0008
  519.  
  520. /* if any of the BORDER flags are set in a Gadget that's included in the
  521.  * Gadget list when a Window is opened,  the corresponding Border will
  522.  * be adjusted to make room for the Gadget
  523.  */
  524. #define GACT_RIGHTBORDER  &H0010
  525. #define GACT_LEFTBORDER   &H0020
  526. #define GACT_TOPBORDER    &H0040
  527. #define GACT_BOTTOMBORDER &H0080
  528. #define GACT_BORDERSNIFF  &H8000  /* neither set nor rely on this bit   */
  529.  
  530. #define GACT_TOGGLESELECT &H0100  /* this bit for toggle-select mode */
  531. #define GACT_BOOLEXTEND   &H2000  /* this Boolean Gadget has a BoolInfo */
  532.  
  533. /* should properly be in StringInfo,  but aren't */
  534. #define GACT_STRINGLEFT   &H0000  /* NOTE WELL: that this has value zero   */
  535. #define GACT_STRINGCENTER &H0200
  536. #define GACT_STRINGRIGHT  &H0400
  537. #define GACT_LONGINT   &H0800  /* this String Gadget is for LONGINT Ints   */
  538. #define GACT_ALTKEYMAP    &H1000  /* this String has an alternate keymap   */
  539. #define GACT_STRINGEXTEND &H2000  /* this String Gadget has StringExtend   */
  540.               /* NOTE: NEVER SET GACT_STRINGEXTEND IF YOU
  541.                * ARE RUNNING ON LESS THAN V36!  SEE
  542.                * GFLG_STRINGEXTEND (ABOVE) INSTEAD
  543.                */
  544.  
  545. #define GACT_ACTIVEGADGET &H4000  /* this gadget is "active".  This flag
  546.                * is maintained by Intuition,  and you
  547.                * cannot count on its value persisting
  548.                * while you do something on your program's
  549.                * task.  It can only be trusted by
  550.                * people implementing custom gadgets
  551.                */
  552.  
  553. /* note &H8000 is used above (GACT_BORDERSNIFF) 
  554.  * all Activation flags defined */
  555.  
  556. /* --- GADGET TYPES ------------------------------------------------------- */
  557. /* These are the Gadget Type definitions for the variable GadgetType
  558.  * gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  559.  * first comes the mask for Gadget flags reserved for Gadget typing
  560.  */
  561. #define GTYP_GADGETTYPE &HFC00   /* all Gadget Global Type flags (padded) */
  562.  
  563. #define GTYP_SCRGADGET     &H4000   /* 1 = ScreenGadget,  0 = WindowGadget */
  564. #define GTYP_GZZGADGET     &H2000   /* 1 = for WFLG_GIMMEZEROZERO borders */
  565. #define GTYP_REQGADGET     &H1000   /* 1 = this is a Requester Gadget */
  566.  
  567. /* GTYP_SYSGADGET means that Intuition ALLOCATED the gadget.
  568.  * GTYP_SYSTYPEMASK is the mask you can apply to tell what type of
  569.  * system-gadget it is.  The possible types follow.
  570.  */
  571. #define GTYP_SYSGADGET     &H8000
  572. #define GTYP_SYSTYPEMASK   &H00F0
  573.  
  574. /* These definitions describe system gadgets in V36 and higher: */
  575. #define GTYP_SIZING     &H0010   /* Window sizing gadget */
  576. #define GTYP_WDRAGGING     &H0020   /* Window drag bar */
  577. #define GTYP_SDRAGGING     &H0030   /* Screen drag bar */
  578. #define GTYP_WDEPTH     &H0040   /* Window depth gadget */
  579. #define GTYP_SDEPTH     &H0050   /* Screen depth gadget */
  580. #define GTYP_WZOOM      &H0060   /* Window zoom gadget */
  581. #define GTYP_SUNUSED    &H0070   /* Unused screen gadget */
  582. #define GTYP_CLOSE      &H0080   /* Window close gadget */
  583.  
  584. /* These definitions describe system gadgets prior to V36: */
  585. #define GTYP_WUPFRONT      GTYP_WDEPTH /* Window to-front gadget */
  586. #define GTYP_SUPFRONT      GTYP_SDEPTH /* Screen to-front gadget */
  587. #define GTYP_WDOWNBACK     GTYP_WZOOM  /* Window to-back gadget */
  588. #define GTYP_SDOWNBACK     GTYP_SUNUSED   /* Screen to-back gadget */
  589.  
  590. /* GTYP_GTYPEMASK is a mask you can apply to tell what class
  591.  * of gadget this is.  The possible classes follow.
  592.  */
  593. #define GTYP_GTYPEMASK     &H0007
  594.  
  595. #define GTYP_BOOLGADGET    &H0001
  596. #define GTYP_GADGET0002    &H0002
  597. #define GTYP_PROPGADGET    &H0003
  598. #define GTYP_STRGADGET     &H0004
  599. #define GTYP_CUSTOMGADGET  &H0005
  600.  
  601. /* This bit in GadgetType is reserved for undocumented internal use
  602.  * by the Gadget Toolkit,  and cannot be used nor relied on by
  603.  * applications:  &H0100
  604.  */
  605.  
  606. /* New for V39.  Gadgets which have the GFLG_EXTENDED flag set are
  607.  * actually ExtGadgets,  which have more flags.  The GMORE_xxx
  608.  * identifiers describe those flags.  For GMORE_SCROLLRASTER,  see
  609.  * important information in the ScrollWindowRaster() autodoc.
  610.  * NB: GMORE_SCROLLRASTER must be set before the gadget is
  611.  * added to a window.
  612.  */
  613. #define GMORE_BOUNDS    &H00000001 /* ExtGadget has valid Bounds */
  614. #define GMORE_GADGETHELP   &H00000002 /* This gadget responds to gadget help */
  615. #define GMORE_SCROLLRASTER &H00000004 /* This (custom) gadget uses ScrollRaster */
  616.  
  617.  
  618. /* ======================================================================== */
  619. /* === BoolInfo======================================================= */
  620. /* ======================================================================== */
  621. /* This is the special data needed by an Extended Boolean Gadget
  622.  * Typically this structure will be pointed to by the Gadget field SpecialInfo
  623.  */
  624. STRUCT BoolInfo
  625.  
  626.     SHORTINT  Flags  /* defined below */
  627.     ADDRESS   Mask  /* bit mask for highlighting and selecting
  628.           * mask must follow the same rules as an Image
  629.           * plane.  Its width and height are determined
  630.           * by the width and height of the gadget's
  631.           * select box. (i.e. Gadget.Width and .Height).
  632.           */
  633.     LONGINT  Reserved  /* set to 0 */
  634. END STRUCT 
  635.  
  636. /* set BoolInfo.Flags to this flag bit.
  637.  * in the future,  additional bits might mean more stuff hanging
  638.  * off of BoolInfo.Reserved.
  639.  */
  640. #define BOOLMASK  &H0001   /* extension is for masked gadget */
  641.  
  642. /* ======================================================================== */
  643. /* === PropInfo =========================================================== */
  644. /* ======================================================================== */
  645. /* this is the special data required by the proportional Gadget
  646.  * typically,  this data will be pointed to by the Gadget variable SpecialInfo
  647.  */
  648. STRUCT PropInfo
  649.  
  650.     SHORTINT Flags   /* general purpose flag bits (see defines below) */
  651.  
  652.     /* You initialize the Pot variables before the Gadget is added to
  653.      * the system.  Then you can look here for the current settings
  654.      * any time,  even while User is playing with this Gadget.  To
  655.      * adjust these after the Gadget is added to the System,  use
  656.      * ModifyProp()   The Pots are the actual proportional settings, 
  657.      * where a value of zero means zero and a value of MAXPOT means
  658.      * that the Gadget is set to its maximum setting.
  659.      */
  660.     SHORTINT HorizPot   /* 16-bit FixedPoint horizontal quantity percentage */
  661.     SHORTINT VertPot    /* 16-bit FixedPoint vertical quantity percentage */
  662.  
  663.     /* the 16-bit FixedPoint Body variables describe what percentage of
  664.      * the entire body of stuff referred to by this Gadget is actually
  665.      * shown at one time.  This is used with the AUTOKNOB routines, 
  666.      * to adjust the size of the AUTOKNOB according to how much of
  667.      * the data can be seen.  This is also used to decide how far
  668.      * to advance the Pots when User hits the Container of the Gadget.
  669.      * For instance,  if you were controlling the display of a 5-line
  670.      * Window of text with this Gadget,  and there was a total of 15
  671.      * lines that could be displayed,  you would set the VertBody value to
  672.      *      (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  673.      * Therefore,  the AUTOKNOB would fill 1/3 of the container,  and
  674.      * if User hits the Cotainer outside of the knob,  the pot would
  675.      * advance 1/3 (plus or minus) If there's no body to show,  or
  676.      * the total amount of displayable info is less than the display area, 
  677.      * set the Body variables to the MAX.  To adjust these after the
  678.      * Gadget is added to the System,  use ModifyProp() 
  679.      */
  680.     SHORTINT HorizBody     /* horizontal Body */
  681.     SHORTINT VertBody      /* vertical Body */
  682.  
  683.     /* these are the variables that Intuition sets and maintains */
  684.     SHORTINT CWidth  /* Container width (with any relativity absoluted) */
  685.     SHORTINT CHeight    /* Container height (with any relativity absoluted) */
  686.     SHORTINT HPotRes 
  687.     SHORTINT   VPotRes    /* pot increments */
  688.     SHORTINT LeftBorder       /* Container borders */
  689.     SHORTINT TopBorder     /* Container borders */
  690. END STRUCT 
  691.  
  692.  
  693. /* --- FLAG BITS ---------------------------------------------------------- */
  694. #define AUTOKNOB  &H0001   /* this flag sez:  gimme that old auto-knob */
  695. /* NOTE: if you do not use an AUTOKNOB for a proportional gadget, 
  696.  * you are currently limited to using a single Image of your own
  697.  * design: Intuition won't handle a linked list of images as
  698.  * a proportional gadget knob.
  699.  */
  700.  
  701. #define FREEHORIZ &H0002   /* if set,  the knob can move horizontally */
  702. #define FREEVERT  &H0004   /* if set,  the knob can move vertically */
  703. #define PROPBORDERLESS  &H0008   /* if set,  no border will be rendered */
  704. #define KNOBHIT      &H0100   /* set when this Knob is hit */
  705. #define PROPNEWLOOK  &H0010   /* set this if you want to get the new
  706.              * V36 look
  707.              */
  708.  
  709. #define KNOBHMIN  6  /* minimum horizontal size of the Knob */
  710. #define KNOBVMIN  4  /* minimum vertical size of the Knob */
  711. #define MAXBODY      &HFFFF   /* maximum body value */
  712. #define MAXPOT       &HFFFF   /* maximum pot value */
  713.  
  714.  
  715. /* ======================================================================== */
  716. /* === StringInfo ========================================================= */
  717. /* ======================================================================== */
  718. /* this is the special data required by the string Gadget
  719.  * typically,  this data will be pointed to by the Gadget variable SpecialInfo
  720.  */
  721. STRUCT StringInfo
  722.  
  723.     /* you initialize these variables,  and then Intuition maintains them */
  724.     ADDRESS   Buffer    /* the buffer containing the start and final string */
  725.     ADDRESS   UndoBuffer   /* optional buffer for undoing current entry */
  726.     SHORTINT BufferPos   /* character position in Buffer */
  727.     SHORTINT MaxChars    /* max number of chars in Buffer (including NULL) */
  728.     SHORTINT DispPos  /* Buffer position of first displayed character */
  729.  
  730.     /* Intuition initializes and maintains these variables for you */
  731.     SHORTINT UndoPos  /* character position in the undo buffer */
  732.     SHORTINT NumChars    /* number of characters currently in Buffer */
  733.     SHORTINT DispCount   /* number of whole characters visible in Container */
  734.     SHORTINT CLeft 
  735.     SHORTINT   CTop    /* topleft offset of the container */
  736.  
  737.     /* This unused field is changed to allow extended specification
  738.      * of string gadget parameters.  It is ignored unless the flag
  739.      * GACT_STRINGEXTEND is set in the Gadget's Activation field
  740.      * or the GFLG_STRINGEXTEND flag is set in the Gadget Flags field.
  741.      * (See GFLG_STRINGEXTEND for an important note)
  742.      */
  743.     /* STRUCT Layer *LayerPtr    --- obsolete --- */
  744.     StringExtendPtr  Extension 
  745.  
  746.     /* you can initialize this variable before the gadget is submitted to
  747.      * Intuition,  and then examine it later to discover what integer
  748.      * the user has entered (if the user never plays with the gadget, 
  749.      * the value will be unchanged from your initial setting)
  750.      */
  751.     LONGINT _LongInt 
  752.  
  753.     /* If you want this Gadget to use your own Console keymapping,  you
  754.      * set the GACT_ALTKEYMAP bit in the Activation flags of the Gadget, 
  755.      * and then set this variable to point to your keymap.  If you don't
  756.      * set the GACT_ALTKEYMAP,  you'll get the standard ASCII keymapping.
  757.      */
  758.     KeyMapPtr  AltKeyMap 
  759. END STRUCT 
  760.  
  761. /* ======================================================================== */
  762. /* === IntuiText ========================================================== */
  763. /* ======================================================================== */
  764. /* IntuiText is a series of strings that start with a location
  765.  *  (always relative to the upper-left corner of something) and then the
  766.  *  text of the string.  The text is null-terminated.
  767.  */
  768. STRUCT IntuiText
  769.  
  770.     BYTE  FrontPen 
  771.     BYTE   BackPen   /* the pen numbers for the rendering */
  772.     BYTE  DrawMode      /* the mode for rendering the text */
  773.     BYTE  KludgeFill00
  774.     SHORTINT LeftEdge       /* relative start location for the text */
  775.     SHORTINT TopEdge     /* relative start location for the text */
  776.     TextAttrPtr  ITextFont   /* if NULL,  you accept the default */
  777.     ADDRESS   IText     /* pointer to null-terminated text */
  778.     IntuiTextPtr  NextText  /* pointer to another IntuiText to render */
  779. END STRUCT 
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. /* ======================================================================== */
  787. /* === Border ============================================================= */
  788. /* ======================================================================== */
  789. /* Data type Border,  used for drawing a series of lines which is intended for
  790.  *  use as a border drawing,  but which may,  in fact,  be used to render any
  791.  *  arbitrary vector shape.
  792.  *  The routine DrawBorder sets up the RastPort with the appropriate
  793.  *  variables,  then does a Move to the first coordinate,  then does Draws
  794.  *  to the subsequent coordinates.
  795.  *  After all the Draws are done,  if NextBorder is non-zero we call DrawBorder
  796.  *  on NextBorder
  797.  */
  798. STRUCT Border
  799.  
  800.     SHORTINT LeftEdge 
  801.     SHORTINT   TopEdge    /* initial offsets from the origin */
  802.     BYTE  FrontPen 
  803.     BYTE   BackPen   /* pens numbers for rendering */
  804.     BYTE  DrawMode      /* mode for rendering */
  805.     BYTE Count          /* number of XY pairs */
  806.     ADDRESS   XY         /* vector coordinate pairs rel to LeftTop */
  807.     BorderPtr  NextBorder    /* pointer to any other Border too */
  808. END STRUCT 
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815. /* ======================================================================== */
  816. /* === Image ============================================================== */
  817. /* ======================================================================== */
  818. /* This is a brief image structure for very simple transfers of
  819.  * image data to a RastPort
  820.  */
  821. STRUCT Image
  822.  
  823.     SHORTINT LeftEdge       /* starting offset relative to some origin */
  824.     SHORTINT TopEdge     /* starting offsets relative to some origin */
  825.     SHORTINT _Width          /* pixel size (though data is SHORTINT-aligned) */
  826.     SHORTINT Height 
  827.     SHORTINT Depth          /* >= 0,  for images you create      */
  828.     ADDRESS   ImageData       /* pointer to the actual SHORTINT-aligned bits */
  829.  
  830.     /* the PlanePick and PlaneOnOff variables work much the same way as the
  831.      * equivalent GELS Bob variables.  It's a space-saving
  832.      * mechanism for image data.  Rather than defining the image data
  833.      * for every plane of the RastPort,  you need define data only
  834.      * for the planes that are not entirely zero or one.  As you
  835.      * define your Imagery,  you will often find that most of the planes
  836.      * ARE just as color selectors.  For instance,  if you're designing
  837.      * a two-color Gadget to use colors one and three,  and the Gadget
  838.      * will reside in a five-plane display,  bit plane zero of your
  839.      * imagery would be all ones,  bit plane one would have data that
  840.      * describes the imagery,  and bit planes two through four would be
  841.      * all zeroes.  Using these flags avoids wasting all
  842.      * that memory in this way:  first,  you specify which planes you
  843.      * want your data to appear in using the PlanePick variable.  For
  844.      * each bit set in the variable,  the next "plane" of your image
  845.      * data is blitted to the display. For each bit clear in this
  846.      * variable,  the corresponding bit in PlaneOnOff is examined.
  847.      * If that bit is clear,  a "plane" of zeroes will be used.
  848.      * If the bit is set,  ones will go out instead.  So,  for our example:
  849.      *    Gadget.PlanePick = &H02 
  850.      *    Gadget.PlaneOnOff = &H01 
  851.      * Note that this also allows for generic Gadgets,  like the
  852.      * System Gadgets,  which will work in any number of bit planes.
  853.      * Note also that if you want an Image that is only a filled
  854.      * rectangle,  you can get this by setting PlanePick to zero
  855.      * (pick no planes of data) and set PlaneOnOff to describe the pen
  856.      * color of the rectangle.
  857.      *
  858.      * NOTE:  Intuition relies on PlanePick to know how many planes
  859.      * of data are found in ImageData. There should be no more
  860.      * '1'-bits in PlanePick than there are planes in ImageData.
  861.      */
  862.     BYTE  PlanePick 
  863.     BYTE   PlaneOnOff 
  864.  
  865.     /* if the NextImage variable is not NULL,  Intuition presumes that
  866.      * it points to another Image structure with another Image to be
  867.      * rendered
  868.      */
  869.     ImagePtr  NextImage 
  870. END STRUCT 
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877. /* ======================================================================== */
  878. /* === IntuiMessage ======================================================= */
  879. /* ======================================================================== */
  880. STRUCT IntuiMessage
  881.  
  882.     _Message ExecMessage 
  883.  
  884.     /* the Class bits correspond directly with the IDCMP Flags,  except for the
  885.      * special bit IDCMP_LONELYMESSAGE (defined below)
  886.      */
  887.     LONGINT Class 
  888.  
  889.     /* the Code field is for special values like MENU number */
  890.     SHORTINT Code 
  891.  
  892.     /* the Qualifier field is a copy of the current InputEvent's Qualifier */
  893.     SHORTINT Qualifier 
  894.  
  895.     /* IAddress contains particular addresses for Intuition functions,  like
  896.      * the pointer to the Gadget or the Screen
  897.      */
  898.     ADDRESS IAddress 
  899.  
  900.     /* when getting mouse movement reports,  any event you get will have the
  901.      * the mouse coordinates in these variables.  the coordinates are relative
  902.      * to the upper-left corner of your Window (WFLG_GIMMEZEROZERO
  903.      * notwithstanding).  If IDCMP_DELTAMOVE is set,  these values will
  904.      * be deltas from the last reported position.
  905.      */
  906.     SHORTINT MouseX 
  907.     SHORTINT   MouseY 
  908.  
  909.     /* the time values are copies of the current system clock time.  Micros
  910.      * are in units of microseconds,  Seconds in seconds.
  911.      */
  912.     LONGINT Seconds 
  913.     LONGINT   Micros 
  914.  
  915.     /* the IDCMPWindow variable will always have the address of the Window of
  916.      * this IDCMP
  917.      */
  918.     WindowPtr  IDCMPWindow 
  919.  
  920.     /* system-use variable */
  921.     IntuiMessagePtr  SpecialLink 
  922. END STRUCT 
  923.  
  924. /* New for V39:
  925.  * All IntuiMessages are now slightly extended.  The ExtIntuiMessage
  926.  * structure has an additional field for tablet data,  which is usually
  927.  * NULL.  If a tablet driver which is sending IESUBCLASS_NEWTABLET
  928.  * events is installed in the system,  windows with the WA_TabletMessages
  929.  * property set will find that eim_TabletData points to the TabletData
  930.  * structure.  Applications must first check that this field is non-NULL 
  931.  * it will be NULL for certain kinds of message,  including mouse activity
  932.  * generated from other than the tablet (i.e. the keyboard equivalents
  933.  * or the mouse itself).
  934.  *
  935.  * NEVER EVER examine any extended fields when running under pre-V39!
  936.  *
  937.  * NOTE: This structure is subject to grow in the future.  Making
  938.  * assumptions about its size is A BAD IDEA.
  939.  */
  940.  
  941. STRUCT ExtIntuiMessage
  942.  
  943.     IntuiMessage eim_IntuiMessage 
  944.     TabletDataPtr  eim_TabletData 
  945. END STRUCT 
  946.  
  947. /* --- IDCMP Classes ------------------------------------------------------ */
  948. /* Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  949.  * Manual for full details on the IDCMP classes.
  950.  */
  951. #define IDCMP_SIZEVERIFY   &H00000001
  952. #define IDCMP_NEWSIZE      &H00000002
  953. #define IDCMP_REFRESHWINDOW   &H00000004
  954. #define IDCMP_MOUSEBUTTONS &H00000008
  955. #define IDCMP_MOUSEMOVE    &H00000010
  956. #define IDCMP_GADGETDOWN   &H00000020
  957. #define IDCMP_GADGETUP     &H00000040
  958. #define IDCMP_REQSET    &H00000080
  959. #define IDCMP_MENUPICK     &H00000100
  960. #define IDCMP_CLOSEWINDOW  &H00000200
  961. #define IDCMP_RAWKEY    &H00000400
  962. #define IDCMP_REQVERIFY    &H00000800
  963. #define IDCMP_REQCLEAR     &H00001000
  964. #define IDCMP_MENUVERIFY   &H00002000
  965. #define IDCMP_NEWPREFS     &H00004000
  966. #define IDCMP_DISKINSERTED &H00008000
  967. #define IDCMP_DISKREMOVED  &H00010000
  968. #define IDCMP_WBENCHMESSAGE   &H00020000  /* System use only      */
  969. #define IDCMP_ACTIVEWINDOW &H00040000
  970. #define IDCMP_INACTIVEWINDOW  &H00080000
  971. #define IDCMP_DELTAMOVE    &H00100000
  972. #define IDCMP_VANILLAKEY   &H00200000
  973. #define IDCMP_INTUITICKS   &H00400000
  974. /*  for notifications from "boopsi" gadgets  */
  975. #define IDCMP_IDCMPUPDATE  &H00800000  /* new for V36 */
  976. /* for getting help key report during menu session */
  977. #define IDCMP_MENUHELP     &H01000000  /* new for V36 */
  978. /* for notification of any move/size/zoom/change window     */
  979. #define IDCMP_CHANGEWINDOW &H02000000  /* new for V36 */
  980. #define IDCMP_GADGETHELP   &H04000000  /* new for V39 */
  981.  
  982. /* NOTEZ-BIEN:          &H80000000 is reserved for internal use   */
  983.  
  984. /* the IDCMP Flags do not use this special bit,  which is cleared when
  985.  * Intuition sends its special message to the Task,  and set when Intuition
  986.  * gets its Message back from the Task.  Therefore,  I can check here to
  987.  * find out fast whether or not this Message is available for me to send
  988.  */
  989. #define IDCMP_LONELYMESSAGE   &H80000000
  990.  
  991.  
  992. /* --- IDCMP Codes -------------------------------------------------------- */
  993. /* This group of codes is for the IDCMP_CHANGEWINDOW message */
  994. #define CWCODE_MOVESIZE &H0000   /* Window was moved and/or sized */
  995. #define CWCODE_DEPTH &H0001   /* Window was depth-arranged (new for V39) */
  996.  
  997. /* This group of codes is for the IDCMP_MENUVERIFY message */
  998. #define MENUHOT      &H0001   /* IntuiWants verification or MENUCANCEL    */
  999. #define MENUCANCEL   &H0002   /* HOT Reply of this cancels Menu operation */
  1000. #define MENUWAITING  &H0003   /* Intuition simply wants a ReplyMsg() ASAP */
  1001.  
  1002. /* These are internal tokens to represent state of verification attempts
  1003.  * shown here as a clue.
  1004.  */
  1005. #define OKOK      MENUHOT  /* guy didn't care         */
  1006. #define OKABORT      &H0004   /* window rendered question moot */
  1007. #define OKCANCEL  MENUCANCEL /* window sent cancel reply    */
  1008.  
  1009. /* This group of codes is for the IDCMP_WBENCHMESSAGE messages */
  1010. #define WBENCHOPEN   &H0001
  1011. #define WBENCHCLOSE  &H0002
  1012.  
  1013.  
  1014. /* A data structure common in V36 Intuition processing   */
  1015. STRUCT IBox
  1016.  
  1017.     SHORTINT Left 
  1018.     SHORTINT Top 
  1019.     SHORTINT _Width 
  1020.     SHORTINT Height 
  1021. END STRUCT 
  1022.  
  1023.  
  1024.  
  1025. /* ======================================================================== */
  1026. /* === Window ============================================================= */
  1027. /* ======================================================================== */
  1028. STRUCT _Window
  1029.  
  1030.     WindowPtr  NextWindow       /* for the linked list in a screen */
  1031.  
  1032.     SHORTINT LeftEdge 
  1033.     SHORTINT   TopEdge       /* screen dimensions of window */
  1034.     SHORTINT _Width 
  1035.     SHORTINT   Height        /* screen dimensions of window */
  1036.  
  1037.     SHORTINT MouseY 
  1038.     SHORTINT   MouseX       /* relative to upper-left of window */
  1039.  
  1040.     SHORTINT MinWidth 
  1041.     SHORTINT   MinHeight     /* minimum sizes */
  1042.     SHORTINT MaxWidth 
  1043.     SHORTINT   MaxHeight       /* maximum sizes */
  1044.  
  1045.     LONGINT Flags         /* see below for defines */
  1046.  
  1047.     MenuPtr  MenuStrip       /* the strip of Menu headers */
  1048.  
  1049.     ADDRESS   Title        /* the title text for this window */
  1050.  
  1051.     RequesterPtr  FirstRequest  /* all active Requesters */
  1052.  
  1053.     RequesterPtr  DMRequest  /* double-click Requester */
  1054.  
  1055.     SHORTINT ReqCount          /* count of reqs blocking Window */
  1056.  
  1057.     ScreenPtr  WScreen       /* this Window's Screen */
  1058.     RastPortPtr  RPort       /* this Window's very own RastPort */
  1059.  
  1060.     /* the border variables describe the window border.  If you specify
  1061.      * WFLG_GIMMEZEROZERO when you open the window,  then the upper-left of
  1062.      * the ClipRect for this window will be upper-left of the BitMap (with
  1063.      * correct offsets when in SuperBitMap mode  you MUST select
  1064.      * WFLG_GIMMEZEROZERO when using SuperBitMap).  If you don't specify
  1065.      * ZeroZero,  then you save memory (no allocation of RastPort,  Layer, 
  1066.      * ClipRect and associated Bitmaps),  but you also must offset all your
  1067.      * writes by BorderTop,  BorderLeft and do your own mini-clipping to
  1068.      * prevent writing over the system gadgets
  1069.      */
  1070.     BYTE BorderLeft 
  1071.     BYTE   BorderTop 
  1072.     BYTE   BorderRight 
  1073.     BYTE   BorderBottom 
  1074.     RastPortPtr  BorderRPort 
  1075.  
  1076.  
  1077.     /* You supply a linked-list of Gadgets for your Window.
  1078.      * This list DOES NOT include system gadgets.  You get the standard
  1079.      * window system gadgets by setting flag-bits in the variable Flags (see
  1080.      * the bit definitions below)
  1081.      */
  1082.     GadgetPtr  FirstGadget 
  1083.  
  1084.     /* these are for opening/closing the windows */
  1085.     WindowPtr  Parent 
  1086.     WindowPtr  Descendant 
  1087.  
  1088.     /* sprite data information for your own Pointer
  1089.      * set these AFTER you Open the Window by calling SetPointer()
  1090.      */
  1091.     ADDRESS   Pointer   /* sprite data */
  1092.     BYTE PtrHeight   /* sprite height (not including sprite padding) */
  1093.     BYTE PtrWidth    /* sprite width (must be less than or equal to 16) */
  1094.     BYTE XOffset 
  1095.     BYTE   YOffset  /* sprite offsets */
  1096.  
  1097.     /* the IDCMP Flags and User's and Intuition's Message Ports */
  1098.     LONGINT IDCMPFlags    /* User-selected flags */
  1099.     MsgPortPtr  UserPort 
  1100.     MsgPortPtr  WindowPort 
  1101.     IntuiMessagePtr  MessageKey 
  1102.  
  1103.     BYTE  DetailPen 
  1104.     BYTE   BlockPen    /* for bar/border/gadget rendering */
  1105.  
  1106.     /* the CheckMark is a pointer to the imagery that will be used when
  1107.      * rendering MenuItems of this Window that want to be checkmarked
  1108.      * if this is equal to NULL,  you'll get the default imagery
  1109.      */
  1110.     ImagePtr  CheckMark 
  1111.  
  1112.     ADDRESS   ScreenTitle  /* if non-null,  Screen title when Window is active */
  1113.  
  1114.     /* These variables have the mouse coordinates relative to the
  1115.      * inner-Window of WFLG_GIMMEZEROZERO Windows.  This is compared with the
  1116.      * MouseX and MouseY variables,  which contain the mouse coordinates
  1117.      * relative to the upper-left corner of the Window,  WFLG_GIMMEZEROZERO
  1118.      * notwithstanding
  1119.      */
  1120.     SHORTINT GZZMouseX 
  1121.     SHORTINT GZZMouseY 
  1122.     /* these variables contain the width and height of the inner-Window of
  1123.      * WFLG_GIMMEZEROZERO Windows
  1124.      */
  1125.     SHORTINT GZZWidth 
  1126.     SHORTINT GZZHeight 
  1127.  
  1128.     ADDRESS   ExtData 
  1129.  
  1130.     ADDRESS   UserData   /* general-purpose pointer to User data extension */
  1131.  
  1132.     /** 11/18/85: this pointer keeps a duplicate of what
  1133.      * Window.RPort->Layer is _supposed_ to be pointing at
  1134.      */
  1135.     LayerPtr  WLayer 
  1136.  
  1137.     /* NEW 1.2: need to keep track of the font that
  1138.      * OpenWindow opened,  in case user SetFont's into RastPort
  1139.      */
  1140.     TextFontPtr  IFont 
  1141.  
  1142.     /* (V36) another flag SHORTINT (the Flags field is used up).
  1143.      * At present,  all flag values are system private.
  1144.      * Until further notice,  you may not change nor use this field.
  1145.      */
  1146.     LONGINT   MoreFlags 
  1147.  
  1148.     /**** Data beyond this point are Intuition Private.  DO NOT USE ****/
  1149. END STRUCT 
  1150.  
  1151.  
  1152. /* --- Flags requested at OpenWindow() time by the application --------- */
  1153. #define WFLG_SIZEGADGET     &H00000001 /* include sizing system-gadget? */
  1154. #define WFLG_DRAGBAR     &H00000002 /* include dragging system-gadget? */
  1155. #define WFLG_DEPTHGADGET    &H00000004 /* include depth arrangement gadget? */
  1156. #define WFLG_CLOSEGADGET    &H00000008 /* include close-box system-gadget? */
  1157.  
  1158. #define WFLG_SIZEBRIGHT     &H00000010 /* size gadget uses right border */
  1159. #define WFLG_SIZEBBOTTOM    &H00000020 /* size gadget uses bottom border */
  1160.  
  1161. /* --- refresh modes ------------------------------------------------------ */
  1162. /* combinations of the WFLG_REFRESHBITS select the refresh type */
  1163. #define WFLG_REFRESHBITS    &H000000C0
  1164. #define WFLG_SMART_REFRESH  &H00000000
  1165. #define WFLG_SIMPLE_REFRESH &H00000040
  1166. #define WFLG_SUPER_BITMAP   &H00000080
  1167. #define WFLG_OTHER_REFRESH  &H000000C0
  1168.  
  1169. #define WFLG_BACKDROP       &H00000100 /* this is a backdrop window */
  1170.  
  1171. #define WFLG_REPORTMOUSE    &H00000200 /* to hear about every mouse move */
  1172.  
  1173. #define WFLG_GIMMEZEROZERO  &H00000400 /* a GimmeZeroZero window  */
  1174.  
  1175. #define WFLG_BORDERLESS     &H00000800 /* to get a Window sans border */
  1176.  
  1177. #define WFLG_ACTIVATE       &H00001000 /* when Window opens,  it's Active */
  1178.  
  1179. /* --- Other User Flags --------------------------------------------------- */
  1180. #define WFLG_RMBTRAP     &H00010000 /* Catch RMB events for your own */
  1181. #define WFLG_NOCAREREFRESH  &H00020000 /* not to be bothered with REFRESH */
  1182.  
  1183. /* - V36 new Flags which the programmer may specify in NewWindow.Flags  */
  1184. #define WFLG_NW_EXTENDED    &H00040000 /* extension data provided */
  1185.                /* see STRUCT ExtNewWindow */
  1186.  
  1187. /* - V39 new Flags which the programmer may specify in NewWindow.Flags  */
  1188. #define WFLG_NEWLOOKMENUS   &H00200000 /* window has NewLook menus   */
  1189.  
  1190.  
  1191. /* These flags are set only by Intuition.  YOU MAY NOT SET THEM YOURSELF! */
  1192. #define WFLG_WINDOWACTIVE   &H00002000 /* this window is the active one */
  1193. #define WFLG_INREQUEST      &H00004000 /* this window is in request mode */
  1194. #define WFLG_MENUSTATE      &H00008000 /* Window is active with Menus on */
  1195. #define WFLG_WINDOWREFRESH  &H01000000 /* Window is currently refreshing */
  1196. #define WFLG_WBENCHWINDOW   &H02000000 /* WorkBench tool ONLY Window */
  1197. #define WFLG_WINDOWTICKED   &H04000000 /* only one timer tick at a time */
  1198.  
  1199. /* V36 and higher flags to be set only by Intuition: */
  1200. #define WFLG_VISITOR     &H08000000 /* visitor window    */
  1201. #define WFLG_ZOOMED      &H10000000 /* identifies "zoom state" */
  1202. #define WFLG_HASZOOM     &H20000000 /* window has a zoom gadget   */
  1203.  
  1204.  
  1205. /* --- Other Window Values ---------------------------------------------- */
  1206. #define DEFAULTMOUSEQUEUE  (5)   /* no more mouse messages  */
  1207.  
  1208. /* --- see STRUCT IntuiMessage for the IDCMP Flag definitions ------------- */
  1209.  
  1210.  
  1211. /* ======================================================================== */
  1212. /* === NewWindow ========================================================== */
  1213. /* ======================================================================== */
  1214. /*
  1215.  * Note that the new extension fields have been removed.  Use ExtNewWindow
  1216.  * structure below to make use of these fields
  1217.  */
  1218. STRUCT NewWindow
  1219.  
  1220.     SHORTINT LeftEdge 
  1221.     SHORTINT   TopEdge       /* screen dimensions of window */
  1222.     SHORTINT _Width 
  1223.     SHORTINT   Height        /* screen dimensions of window */
  1224.  
  1225.     BYTE  DetailPen 
  1226.     BYTE   BlockPen       /* for bar/border/gadget rendering */
  1227.  
  1228.     LONGINT IDCMPFlags          /* User-selected IDCMP flags */
  1229.  
  1230.     LONGINT Flags         /* see Window STRUCT for defines */
  1231.  
  1232.     /* You supply a linked-list of Gadgets for your Window.
  1233.      *   This list DOES NOT include system Gadgets.  You get the standard
  1234.      *   system Window Gadgets by setting flag-bits in the variable Flags (see
  1235.      *   the bit definitions under the Window structure definition)
  1236.      */
  1237.     GadgetPtr  FirstGadget 
  1238.  
  1239.     /* the CheckMark is a pointer to the imagery that will be used when
  1240.      * rendering MenuItems of this Window that want to be checkmarked
  1241.      * if this is equal to NULL,  you'll get the default imagery
  1242.      */
  1243.     ImagePtr  CheckMark 
  1244.  
  1245.     ADDRESS   Title          /* the title text for this window */
  1246.  
  1247.     /* the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1248.      * want this Window to open in it. If so,  you pass the address of the
  1249.      * Custom Screen structure in this variable.  Otherwise,  this variable
  1250.      * is ignored and doesn't have to be initialized.
  1251.      */
  1252.     ScreenPtr  _Screen 
  1253.  
  1254.     /* WFLG_SUPER_BITMAP Window?  If so,  put the address of your BitMap
  1255.      * structure in this variable.  If not,  this variable is ignored and
  1256.      * doesn't have to be initialized
  1257.      */
  1258.     BitMapPtr  BitMap 
  1259.  
  1260.     /* the values describe the minimum and maximum sizes of your Windows.
  1261.      * these matter only if you've chosen the WFLG_SIZEGADGET option, 
  1262.      * which means that you want to let the User to change the size of
  1263.      * this Window.  You describe the minimum and maximum sizes that the
  1264.      * Window can grow by setting these variables.  You can initialize
  1265.      * any one these to zero,  which will mean that you want to duplicate
  1266.      * the setting for that dimension (if MinWidth == 0,  MinWidth will be
  1267.      * set to the opening Width of the Window).
  1268.      * You can change these settings later using SetWindowLimits().
  1269.      * If you haven't asked for a SIZING Gadget,  you don't have to
  1270.      * initialize any of these variables.
  1271.      */
  1272.     SHORTINT MinWidth 
  1273.     SHORTINT   MinHeight      /* minimums */
  1274.     SHORTINT MaxWidth 
  1275.     SHORTINT   MaxHeight         /* maximums */
  1276.  
  1277.     /* the type variable describes the Screen in which you want this Window to
  1278.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1279.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1280.      * type definitions under the Screen structure.
  1281.      */
  1282.     SHORTINT _Type 
  1283.  
  1284. END STRUCT 
  1285.  
  1286. /* The following structure is the future NewWindow.  Compatibility
  1287.  * issues require that the size of NewWindow not change.
  1288.  * Data in the common part (NewWindow) indicates the the extension
  1289.  * fields are being used.
  1290.  * NOTE WELL: This structure may be subject to future extension.
  1291.  * Writing code depending on its size is not allowed.
  1292.  */
  1293. STRUCT ExtNewWindow
  1294.  
  1295.     SHORTINT LeftEdge 
  1296.     SHORTINT   TopEdge 
  1297.     SHORTINT _Width 
  1298.     SHORTINT   Height 
  1299.  
  1300.     BYTE  DetailPen 
  1301.     BYTE   BlockPen 
  1302.     LONGINT IDCMPFlags 
  1303.     LONGINT Flags 
  1304.     GadgetPtr  FirstGadget 
  1305.  
  1306.     ImagePtr  CheckMark 
  1307.  
  1308.     ADDRESS   Title 
  1309.     ScreenPtr  _Screen 
  1310.     BitMapPtr  BitMap 
  1311.  
  1312.     SHORTINT MinWidth 
  1313.     SHORTINT   MinHeight 
  1314.     SHORTINT MaxWidth 
  1315.     SHORTINT   MaxHeight 
  1316.  
  1317.     /* the type variable describes the Screen in which you want this Window to
  1318.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1319.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1320.      * type definitions under the Screen structure.
  1321.      * A new possible value for this field is PUBLICSCREEN,  which
  1322.      * defines the window as a 'visitor' window.  See below for
  1323.      * additional information provided.
  1324.      */
  1325.     SHORTINT _Type 
  1326.  
  1327.     /* ------------------------------------------------------- *
  1328.      * extensions for V36
  1329.      * if the NewWindow Flag value WFLG_NW_EXTENDED is set,  then
  1330.      * this field is assumed to point to an array ( or chain of arrays)
  1331.      * of TagItem structures.  See also ExtNewScreen for another
  1332.      * use of TagItems to pass optional data.
  1333.      *
  1334.      * see below for tag values and the corresponding data.
  1335.      */
  1336.     TagItemPtr  Extension 
  1337. END STRUCT 
  1338.  
  1339. /*
  1340.  * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1341.  * They are values in a TagItem array passed as extension/replacement
  1342.  * values for the data in NewWindow.  OpenWindowTagList() can actually
  1343.  * work well with a NULL NewWindow pointer.
  1344.  */
  1345.  
  1346. #define WA_Dummy  (TAG_USER + 99)   /* &H80000063  */
  1347.  
  1348. /* these tags simply override NewWindow parameters */
  1349. #define WA_Left         (WA_Dummy + &H01)
  1350. #define WA_Top       (WA_Dummy + &H02)
  1351. #define WA_Width     (WA_Dummy + &H03)
  1352. #define WA_Height    (WA_Dummy + &H04)
  1353. #define WA_DetailPen    (WA_Dummy + &H05)
  1354. #define WA_BlockPen     (WA_Dummy + &H06)
  1355. #define WA_IDCMP     (WA_Dummy + &H07)
  1356.          /* "bulk" initialization of NewWindow.Flags */
  1357. #define WA_Flags     (WA_Dummy + &H08)
  1358. #define WA_Gadgets      (WA_Dummy + &H09)
  1359. #define WA_Checkmark    (WA_Dummy + &H0A)
  1360. #define WA_Title     (WA_Dummy + &H0B)
  1361.          /* means you don't have to call SetWindowTitles
  1362.           * after you open your window
  1363.           */
  1364. #define WA_ScreenTitle     (WA_Dummy + &H0C)
  1365. #define WA_CustomScreen    (WA_Dummy + &H0D)
  1366. #define WA_SuperBitMap     (WA_Dummy + &H0E)
  1367.          /* also implies WFLG_SUPER_BITMAP property   */
  1368. #define WA_MinWidth     (WA_Dummy + &H0F)
  1369. #define WA_MinHeight    (WA_Dummy + &H10)
  1370. #define WA_MaxWidth     (WA_Dummy + &H11)
  1371. #define WA_MaxHeight    (WA_Dummy + &H12)
  1372.  
  1373. /* The following are specifications for new features  */
  1374.  
  1375. #define WA_InnerWidth      (WA_Dummy + &H13)
  1376. #define WA_InnerHeight     (WA_Dummy + &H14)
  1377.          /* You can specify the dimensions of the interior
  1378.           * region of your window,  independent of what
  1379.           * the border widths will be.  You probably want
  1380.           * to also specify WA_AutoAdjust to allow
  1381.           * Intuition to move your window or even
  1382.           * shrink it so that it is completely on screen.
  1383.           */
  1384.  
  1385. #define WA_PubScreenName   (WA_Dummy + &H15)
  1386.          /* declares that you want the window to open as
  1387.           * a visitor on the public screen whose name is
  1388.           * pointed to by (BYTE  *) ti_Data
  1389.           */
  1390. #define WA_PubScreen    (WA_Dummy + &H16)
  1391.          /* open as a visitor window on the public screen
  1392.           * whose address is in (STRUCT Screen *) ti_Data.
  1393.           * To ensure that this screen remains open,  you
  1394.           * should either be the screen's owner,  have a
  1395.           * window open on the screen,  or use LockPubScreen().
  1396.           */
  1397. #define WA_PubScreenFallBack  (WA_Dummy + &H17)
  1398.          /* A Boolean,  specifies whether a visitor window
  1399.           * should "fall back" to the default public screen
  1400.           * (or Workbench) if the named public screen isn't
  1401.           * available
  1402.           */
  1403. #define WA_WindowName      (WA_Dummy + &H18)
  1404.          /* not implemented   */
  1405. #define WA_Colors    (WA_Dummy + &H19)
  1406.          /* a ColorSpec array for colors to be set
  1407.           * when this window is active.   This is not
  1408.           * implemented,  and may not be,  since the default
  1409.           * values to restore would be hard to track.
  1410.           * We'd like to at least support per-window colors
  1411.           * for the mouse pointer sprite.
  1412.           */
  1413. #define WA_Zoom      (WA_Dummy + &H1A)
  1414.          /* ti_Data points to an array of four WORD's, 
  1415.           * the initial Left/Top/Width/Height values of
  1416.           * the "alternate" zoom position/dimensions.
  1417.           * It also specifies that you want a Zoom gadget
  1418.           * for your window,  whether or not you have a
  1419.           * sizing gadget.
  1420.           */
  1421. #define WA_MouseQueue      (WA_Dummy + &H1B)
  1422.          /* ti_Data contains initial value for the mouse
  1423.           * message backlog limit for this window.
  1424.           */
  1425. #define WA_BackFill     (WA_Dummy + &H1C)
  1426.          /* provides a "backfill hook" for your window's Layer.
  1427.           * See layers.library/CreateUpfrontHookLayer().
  1428.           */
  1429. #define WA_RptQueue     (WA_Dummy + &H1D)
  1430.          /* initial value of repeat key backlog limit */
  1431.  
  1432.     /* These Boolean tag items are alternatives to the NewWindow.Flags
  1433.      * boolean flags with similar names.
  1434.      */
  1435. #define WA_SizeGadget      (WA_Dummy + &H1E)
  1436. #define WA_DragBar      (WA_Dummy + &H1F)
  1437. #define WA_DepthGadget     (WA_Dummy + &H20)
  1438. #define WA_CloseGadget     (WA_Dummy + &H21)
  1439. #define WA_Backdrop     (WA_Dummy + &H22)
  1440. #define WA_ReportMouse     (WA_Dummy + &H23)
  1441. #define WA_NoCareRefresh   (WA_Dummy + &H24)
  1442. #define WA_Borderless      (WA_Dummy + &H25)
  1443. #define WA_Activate     (WA_Dummy + &H26)
  1444. #define WA_RMBTrap      (WA_Dummy + &H27)
  1445. #define WA_WBenchWindow    (WA_Dummy + &H28) /* PRIVATE!! */
  1446. #define WA_SimpleRefresh   (WA_Dummy + &H29)
  1447.          /* only specify if TRUE */
  1448. #define WA_SmartRefresh    (WA_Dummy + &H2A)
  1449.          /* only specify if TRUE */
  1450. #define WA_SizeBRight      (WA_Dummy + &H2B)
  1451. #define WA_SizeBBottom     (WA_Dummy + &H2C)
  1452.  
  1453.     /* New Boolean properties */
  1454. #define WA_AutoAdjust      (WA_Dummy + &H2D)
  1455.          /* shift or squeeze the window's position and
  1456.           * dimensions to fit it on screen.
  1457.           */
  1458.  
  1459. #define WA_GimmeZeroZero   (WA_Dummy + &H2E)
  1460.          /* equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO */
  1461.  
  1462. /* New for V37: WA_MenuHelp (ignored by V36) */
  1463. #define WA_MenuHelp     (WA_Dummy + &H2F)
  1464.          /* Enables IDCMP_MENUHELP:  Pressing HELP during menus
  1465.           * will return IDCMP_MENUHELP message.
  1466.           */
  1467.  
  1468. /* New for V39:  (ignored by V37 and earlier) */
  1469. #define WA_NewLookMenus    (WA_Dummy + &H30)
  1470.          /* Set to TRUE if you want NewLook menus */
  1471. #define WA_AmigaKey     (WA_Dummy + &H31)
  1472.          /* Pointer to image for Amiga-key equiv in menus */
  1473. #define WA_NotifyDepth     (WA_Dummy + &H32)
  1474.          /* Requests IDCMP_CHANGEWINDOW message when
  1475.           * window is depth arranged
  1476.           * (imsg->Code = CWCODE_DEPTH)
  1477.           */
  1478.  
  1479. /* WA_Dummy + &H33 is obsolete */
  1480.  
  1481. #define WA_Pointer      (WA_Dummy + &H34)
  1482.          /* Allows you to specify a custom pointer
  1483.           * for your window.  ti_Data points to a
  1484.           * pointer object you obtained via
  1485.           * "pointerclass". NULL signifies the
  1486.           * default pointer.
  1487.           * This tag may be passed to OpenWindowTags()
  1488.           * or SetWindowPointer().
  1489.           */
  1490.  
  1491. #define WA_BusyPointer     (WA_Dummy + &H35)
  1492.          /* ti_Data is boolean.  Set to TRUE to
  1493.           * request the standard busy pointer.
  1494.           * This tag may be passed to OpenWindowTags()
  1495.           * or SetWindowPointer().
  1496.           */
  1497.  
  1498. #define WA_PointerDelay    (WA_Dummy + &H36)
  1499.          /* ti_Data is boolean.  Set to TRUE to
  1500.           * request that the changing of the
  1501.           * pointer be slightly delayed.  The change
  1502.           * will be called off if you call NewSetPointer()
  1503.           * before the delay expires.  This allows
  1504.           * you to post a busy-pointer even if you think
  1505.           * the busy-time may be very SHORTINT,  without
  1506.           * fear of a flashing pointer.
  1507.           * This tag may be passed to OpenWindowTags()
  1508.           * or SetWindowPointer().
  1509.           */
  1510.  
  1511. #define WA_TabletMessages  (WA_Dummy + &H37)
  1512.          /* ti_Data is a boolean.  Set to TRUE to
  1513.           * request that tablet information be included
  1514.           * in IntuiMessages sent to your window.
  1515.           * Requires that something (i.e. a tablet driver)
  1516.           * feed IESUBCLASS_NEWTABLET InputEvents into
  1517.           * the system. For a pointer to the TabletData, 
  1518.           * examine the ExtIntuiMessage->eim_TabletData
  1519.           * field.  It is UNSAFE to check this field
  1520.           * when running on pre-V39 systems.  It's always
  1521.           * safe to check this field under V39 and up, 
  1522.           * though it may be NULL.
  1523.           */
  1524.  
  1525. #define WA_HelpGroup    (WA_Dummy + &H38)
  1526.          /* When the active window has gadget help enabled, 
  1527.           * other windows of the same HelpGroup number
  1528.           * will also get GadgetHelp.  This allows GadgetHelp
  1529.           * to work for multi-windowed applications.
  1530.           * Use GetGroupID() to get an ID number.  Pass
  1531.           * this number as ti_Data to all your windows.
  1532.           * See also the HelpControl() function.
  1533.           */
  1534.  
  1535. #define WA_HelpGroupWindow (WA_Dummy + &H39)
  1536.          /* When the active window has gadget help enabled, 
  1537.           * other windows of the same HelpGroup will also get
  1538.           * GadgetHelp. This allows GadgetHelp to work
  1539.           * for multi-windowed applications.  As an alternative
  1540.           * to WA_HelpGroup,  you can pass a pointer to any
  1541.           * other window of the same group to join its help
  1542.           * group.  Defaults to NULL,  which has no effect.
  1543.           * See also the HelpControl() function.
  1544.           */
  1545.  
  1546.  
  1547. /* HelpControl() flags:
  1548.  *
  1549.  * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more
  1550.  * windows.
  1551.  */
  1552.  
  1553. #define HC_GADGETHELP   (1)
  1554.  
  1555.  
  1556. #ifndef INTUITION_SCREENS_H
  1557. #include <intuition/screens.h>
  1558. #endif
  1559.  
  1560. #ifndef INTUITION_PREFERENCES_H
  1561. #include <intuition/preferences.h>
  1562. #endif
  1563.  
  1564. /* ======================================================================== */
  1565. /* === Remember =========================================================== */
  1566. /* ======================================================================== */
  1567. /* this structure is used for remembering what memory has been allocated to
  1568.  * date by a given routine,  so that a premature abort or systematic exit
  1569.  * can deallocate memory cleanly,  easily,  and completely
  1570.  */
  1571. STRUCT Remember
  1572.  
  1573.     RememberPtr  NextRemember 
  1574.     LONGINT RememberSize 
  1575.     ADDRESS   Memory 
  1576. END STRUCT 
  1577.  
  1578.  
  1579. /* === Color Spec ====================================================== */
  1580. /* How to tell Intuition about RGB values for a color table entry.
  1581.  * NOTE:  The way the structure was defined,  the color value was
  1582.  * right-justified within each UWORD.  This poses problems for
  1583.  * extensibility to more bits-per-gun. The SA_Colors32 tag to
  1584.  * OpenScreenTags() provides an alternate way to specify colors
  1585.  * with greater precision.
  1586.  */
  1587. STRUCT ColorSpec
  1588.  
  1589.     SHORTINT ColorIndex  /* -1 terminates an array of ColorSpec */
  1590.     SHORTINT   Red   /* only the _bottom_ 4 bits recognized */
  1591.     SHORTINT   Green    /* only the _bottom_ 4 bits recognized */
  1592.     SHORTINT   Blue  /* only the _bottom_ 4 bits recognized */
  1593. END STRUCT 
  1594.  
  1595. /* === Easy Requester Specification ======================================= */
  1596. /* see also autodocs for EasyRequest and BuildEasyRequest   */
  1597. /* NOTE: This structure may grow in size in the future      */
  1598. STRUCT EasyStruct  
  1599.     LONGINT   es_StructSize  /* should be sizeof (STRUCT EasyStruct )*/
  1600.     LONGINT   es_Flags    /* should be 0 for now        */
  1601.     ADDRESS   es_Title   /* title of requester window     */
  1602.     ADDRESS   es_TextFormat    /* 'printf' style formatting string */
  1603.     ADDRESS   es_GadgetFormat  /* 'printf' style formatting string */
  1604. END STRUCT 
  1605.  
  1606.  
  1607.  
  1608. /* ======================================================================== */
  1609. /* === Miscellaneous ====================================================== */
  1610. /* ======================================================================== */
  1611.  
  1612.  
  1613. /* = MENU STUFF =========================================================== */
  1614. #define NOMENU &H001F
  1615. #define NOITEM &H003F
  1616. #define NOSUB  &H001F
  1617. #define MENUNULL &HFFFF
  1618.  
  1619.  
  1620. /* = =RJ='s peculiarities ================================================= */
  1621. /*
  1622. #define FOREVER for( ;)
  1623. #define SIGN(x) ( ((x) > 0) - ((x) < 0) )
  1624. #define NOT !
  1625. */
  1626.  
  1627. /* these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT, 
  1628.  * I'll use a generic Width (for all resolutions) for the CheckMark.
  1629.  * If COMMSEQ,  likewise I'll use this generic stuff
  1630.  */
  1631. #define CHECKWIDTH   19
  1632. #define COMMWIDTH 27
  1633. #define LOWCHECKWIDTH   13
  1634. #define LOWCOMMWIDTH 16
  1635.  
  1636.  
  1637. /* these are the AlertNumber defines.  if you are calling DisplayAlert()
  1638.  * the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1639.  * of these patterns
  1640.  */
  1641. #define ALERT_TYPE   &H80000000
  1642. #define RECOVERY_ALERT  &H00000000  /* the system can recover from this */
  1643. #define DEADEND_ALERT   &H80000000  /* no recovery possible,  this is it */
  1644.  
  1645.  
  1646. /* When you're defining IntuiText for the Positive and Negative Gadgets
  1647.  * created by a call to AutoRequest(),  these defines will get you
  1648.  * reasonable-looking text.  The only field without a define is the IText
  1649.  * field  you decide what text goes with the Gadget
  1650.  */
  1651. #define AUTOFRONTPEN 0
  1652. #define AUTOBACKPEN  1
  1653. #define AUTODRAWMODE JAM2
  1654. #define AUTOLEFTEDGE 6
  1655. #define AUTOTOPEDGE  3
  1656. #define AUTOITEXTFONT   NULL
  1657. #define AUTONEXTTEXT NULL
  1658.  
  1659.  
  1660. /* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- */
  1661. #define SELECTUP  (IECODE_LBUTTON OR IECODE_UP_PREFIX)
  1662. #define SELECTDOWN   (IECODE_LBUTTON)
  1663. #define MENUUP    (IECODE_RBUTTON OR IECODE_UP_PREFIX)
  1664. #define MENUDOWN  (IECODE_RBUTTON)
  1665. #define MIDDLEUP  (IECODE_MBUTTON OR IECODE_UP_PREFIX)
  1666. #define MIDDLEDOWN   (IECODE_MBUTTON)
  1667. #define ALTLEFT      (IEQUALIFIER_LALT)
  1668. #define ALTRIGHT  (IEQUALIFIER_RALT)
  1669. #define AMIGALEFT (IEQUALIFIER_LCOMMAND)
  1670. #define AMIGARIGHT   (IEQUALIFIER_RCOMMAND)
  1671. #define AMIGAKEYS (AMIGALEFT OR AMIGARIGHT)
  1672.  
  1673. #define CURSORUP  &H4C
  1674. #define CURSORLEFT   &H4F
  1675. #define CURSORRIGHT  &H4E
  1676. #define CURSORDOWN   &H4D
  1677. #define KEYCODE_Q &H10
  1678. #define KEYCODE_Z &H31
  1679. #define KEYCODE_X &H32
  1680. #define KEYCODE_V &H34
  1681. #define KEYCODE_B &H35
  1682. #define KEYCODE_N &H36
  1683. #define KEYCODE_M &H37
  1684. #define KEYCODE_LESS &H38
  1685. #define KEYCODE_GREATER &H39
  1686.  
  1687.  
  1688.  
  1689. /* New for V39,  Intuition supports the IESUBCLASS_NEWTABLET subclass
  1690.  * of the IECLASS_NEWPOINTERPOS event. The ie_EventAddress of such
  1691.  * an event points to a TabletData structure (see below).
  1692.  *
  1693.  * The TabletData structure contains certain elements including a taglist.
  1694.  * The taglist can be used for special tablet parameters.  A tablet driver
  1695.  * should include only those tag-items the tablet supports.  An application
  1696.  * can listen for any tag-items that interest it.  Note: an application
  1697.  * must set the WA_TabletMessages attribute to TRUE to receive this
  1698.  * extended information in its IntuiMessages.
  1699.  *
  1700.  * The definitions given here MUST be followed.  Pay careful attention
  1701.  * to normalization and the interpretation of signs.
  1702.  *
  1703.  * TABLETA_TabletZ:  the current value of the tablet in the Z direction.
  1704.  * This unsigned value should typically be in the natural units of the
  1705.  * tablet.  You should also provide TABLETA_RangeZ.
  1706.  *
  1707.  * TABLETA_RangeZ:  the maximum value of the tablet in the Z direction.
  1708.  * Normally specified along with TABLETA_TabletZ,  this allows the
  1709.  * application to scale the actual Z value across its range.
  1710.  *
  1711.  * TABLETA_AngleX:  the angle of rotation or tilt about the X-axis.  This
  1712.  * number should be normalized to fill a signed LONGINT integer.  Positive
  1713.  * values imply a clockwise rotation about the X-axis when viewing
  1714.  * from +X towards the origin.
  1715.  *
  1716.  * TABLETA_AngleY:  the angle of rotation or tilt about the Y-axis.  This
  1717.  * number should be normalized to fill a signed LONGINT integer.  Positive
  1718.  * values imply a clockwise rotation about the Y-axis when viewing
  1719.  * from +Y towards the origin.
  1720.  *
  1721.  * TABLETA_AngleZ:  the angle of rotation or tilt about the Z axis.  This
  1722.  * number should be normalized to fill a signed LONGINT integer.  Positive
  1723.  * values imply a clockwise rotation about the Z-axis when viewing
  1724.  * from +Z towards the origin.
  1725.  *
  1726.  * Note: a stylus that supports tilt should use the TABLETA_AngleX
  1727.  * and TABLETA_AngleY attributes.   Tilting the stylus so the tip
  1728.  * points towards increasing or decreasing X is actually a rotation
  1729.  * around the Y-axis.  Thus,  if the stylus tip points towards
  1730.  * positive X,  then that tilt is represented as a negative
  1731.  * TABLETA_AngleY.  Likewise,  if the stylus tip points towards
  1732.  * positive Y,  that tilt is represented by positive TABLETA_AngleX.
  1733.  *
  1734.  * TABLETA_Pressure:  the pressure reading of the stylus.  The pressure
  1735.  * should be normalized to fill a signed LONGINT integer.   Typical devices
  1736.  * won't generate negative pressure,  but the possibility is not precluded.
  1737.  * The pressure threshold which is considered to cause a button-click is
  1738.  * expected to be set in a Preferences program supplied by the tablet
  1739.  * vendor.  The tablet driver would send IECODE_LBUTTON-type events as
  1740.  * the pressure crossed that threshold.
  1741.  *
  1742.  * TABLETA_ButtonBits:  ti_Data is a LONGINT integer whose bits are to
  1743.  * be interpreted at the state of the first 32 buttons of the tablet.
  1744.  *
  1745.  * TABLETA_InProximity:  ti_Data is a boolean.  For tablets that support
  1746.  * proximity,  they should send the  TABLETA_InProximity, FALSEEND STRUCT tag item
  1747.  * when the stylus is out of proximity.  One possible use we can forsee
  1748.  * is a mouse-blanking commodity which keys off this to blank the
  1749.  * mouse.  When this tag is absent,  the stylus is assumed to be
  1750.  * in proximity.
  1751.  *
  1752.  * TABLETA_ResolutionX:  ti_Data is an unsigned LONGINT integer which
  1753.  * is the x-axis resolution in dots per inch.
  1754.  *
  1755.  * TABLETA_ResolutionY:  ti_Data is an unsigned LONGINT integer which
  1756.  * is the y-axis resolution in dots per inch.
  1757.  */
  1758.  
  1759. #define TABLETA_Dummy      (TAG_USER + &H3A000)
  1760. #define TABLETA_TabletZ    (TABLETA_Dummy + &H01)
  1761. #define TABLETA_RangeZ     (TABLETA_Dummy + &H02)
  1762. #define TABLETA_AngleX     (TABLETA_Dummy + &H03)
  1763. #define TABLETA_AngleY     (TABLETA_Dummy + &H04)
  1764. #define TABLETA_AngleZ     (TABLETA_Dummy + &H05)
  1765. #define TABLETA_Pressure   (TABLETA_Dummy + &H06)
  1766. #define TABLETA_ButtonBits (TABLETA_Dummy + &H07)
  1767. #define TABLETA_InProximity   (TABLETA_Dummy + &H08)
  1768. #define TABLETA_ResolutionX   (TABLETA_Dummy + &H09)
  1769. #define TABLETA_ResolutionY   (TABLETA_Dummy + &H0A)
  1770.  
  1771. /* If your window sets WA_TabletMessages to TRUE,  then it will receive
  1772.  * extended IntuiMessages (STRUCT ExtIntuiMessage) whose eim_TabletData
  1773.  * field points at a TabletData structure.  This structure contains
  1774.  * additional information about the input event.
  1775.  */
  1776.  
  1777. STRUCT TabletData
  1778.  
  1779.     /* Sub-pixel position of tablet,  in screen coordinates, 
  1780.      * scaled to fill a SHORTINT fraction:
  1781.      */
  1782.     SHORTINT td_XFraction 
  1783.     SHORTINT   td_YFraction 
  1784.  
  1785.     /* Current tablet coordinates along each axis: */
  1786.     LONGINT td_TabletX 
  1787.     LONGINT   td_TabletY 
  1788.  
  1789.     /* Tablet range along each axis.  For example,  if td_TabletX
  1790.      * can take values 0-999,  td_RangeX should be 1000.
  1791.      */
  1792.     LONGINT td_RangeX 
  1793.     LONGINT   td_RangeY 
  1794.  
  1795.     /* Pointer to tag-list of additional tablet attributes.
  1796.      * See <intuition/intuition.h> for the tag values.
  1797.      */
  1798.     TagItemPtr  td_TagList 
  1799. END STRUCT 
  1800.  
  1801. /* If a tablet driver supplies a hook for ient_CallBack,  it will be
  1802.  * invoked in the standard hook manner.  A0 will point to the Hook
  1803.  * itself,  A2 will point to the InputEvent that was sent,  and
  1804.  * A1 will point to a TabletHookData structure.  The InputEvent's
  1805.  * ie_EventAddress field points at the IENewTablet structure that
  1806.  * the driver supplied.
  1807.  *
  1808.  * Based on the thd_Screen,  thd_Width,  and thd_Height fields,  the driver
  1809.  * should scale the ient_TabletX and ient_TabletY fields and store the
  1810.  * result in ient_ScaledX,  ient_ScaledY,  ient_ScaledXFraction,  and
  1811.  * ient_ScaledYFraction.
  1812.  *
  1813.  * The tablet hook must currently return NULL.  This is the only
  1814.  * acceptable return-value under V39.
  1815.  */
  1816.  
  1817. STRUCT TabletHookData
  1818.  
  1819.     /* Pointer to the active screen:
  1820.      * Note: if there are no open screens,  thd_Screen will be NULL.
  1821.      * thd_Width and thd_Height will then describe an NTSC 64&H400
  1822.      * screen. Please scale accordingly.
  1823.      */
  1824.     ScreenPtr  thd_Screen 
  1825.  
  1826.     /* The width and height (measured in pixels of the active screen)
  1827.      * that your are to scale to:
  1828.      */
  1829.     LONGINT thd_Width 
  1830.     LONGINT thd_Height 
  1831.  
  1832.     /* Non-zero if the screen or something about the screen
  1833.      * changed since the last time you were invoked:
  1834.      */
  1835.     LONGINT thd_ScreenChanged 
  1836. END STRUCT 
  1837.  
  1838. /* Include obsolete identifiers: */
  1839. #ifndef INTUITION_IOBSOLETE_H
  1840. #include <intuition/iobsolete.h>
  1841. #endif
  1842.  
  1843. #endif
  1844.