home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / oberon-a-1.4ß.lha / Oberon-A / source / amiga / Intuition.mod < prev    next >
Text File  |  1994-08-08  |  184KB  |  4,898 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Intuition.mod $
  4.   Description: Interface to intuition.library
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:58:11 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. MODULE Intuition;
  23.  
  24. (*
  25. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  26. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  27. ** $V- OvflChk       $Z- ZeroVars
  28. *)
  29.  
  30. IMPORT
  31.   E := Exec, T := Timer, U := Utility, G := Graphics, IE := InputEvent,
  32.   KM := KeyMap, SYS := SYSTEM;
  33.  
  34. (*-- Pointer declarations ---------------------------------------------*)
  35.  
  36. TYPE
  37.  
  38.   MenuPtr *          = CPOINTER TO Menu;
  39.   MenuItemPtr *      = CPOINTER TO MenuItem;
  40.   RequesterPtr *     = CPOINTER TO Requester;
  41.   GadgetPtr *        = CPOINTER TO Gadget;
  42.   BoolInfoPtr *      = CPOINTER TO BoolInfo;
  43.   PropInfoPtr *      = CPOINTER TO PropInfo;
  44.   StringInfoPtr *    = CPOINTER TO StringInfo;
  45.   IntuiTextPtr *     = CPOINTER TO IntuiText;
  46.   BorderPtr *        = CPOINTER TO Border;
  47.   ImagePtr *         = CPOINTER TO Image;
  48.   IntuiMessagePtr *  = CPOINTER TO IntuiMessage;
  49.   IBoxPtr *          = CPOINTER TO IBox;
  50.   WindowPtr *        = CPOINTER TO Window;
  51.   NewWindowPtr *     = CPOINTER TO NewWindow;
  52.   ExtNewWindowPtr *  = CPOINTER TO ExtNewWindow;
  53.   DrawInfoPtr *      = CPOINTER TO DrawInfo;
  54.   ScreenPtr *        = CPOINTER TO Screen;
  55.   NewScreenPtr *     = CPOINTER TO NewScreen;
  56.   ExtNewScreenPtr *  = CPOINTER TO ExtNewScreen;
  57.   PubScreenNodePtr * = CPOINTER TO PubScreenNode;
  58.   PreferencesPtr *   = CPOINTER TO Preferences;
  59.   RememberPtr *      = CPOINTER TO Remember;
  60.   ColorSpecPtr *     = CPOINTER TO ColorSpec;
  61.   EasyStructPtr *    = CPOINTER TO EasyStruct;
  62.   StringExtendPtr *  = CPOINTER TO StringExtend;
  63.   SGWorkPtr *        = CPOINTER TO SGWork;
  64.   GadgetInfoPtr *    = CPOINTER TO GadgetInfo;
  65.   PGXPtr *           = CPOINTER TO PGX;
  66.   MsgPtr *           = CPOINTER TO Msg;
  67.   OpSetPtr *         = CPOINTER TO OpSet;
  68.   OpUpdatePtr *      = CPOINTER TO OpUpdate;
  69.   OpGetPtr *         = CPOINTER TO OpGet;
  70.   OpAddTailPtr *     = CPOINTER TO OpAddTail;
  71.   IClassPtr *        = CPOINTER TO IClass;
  72.   ObjectPtr *        = CPOINTER TO Object;
  73.   OpMemberPtr *      = CPOINTER TO OpMember;
  74.   HitTestPtr *       = CPOINTER TO HitTest;
  75.   RenderPtr *        = CPOINTER TO Render;
  76.   InputPtr *         = CPOINTER TO Input;
  77.   GoInactivePtr *    = CPOINTER TO GoInactive;
  78.   FrameBoxPtr *      = CPOINTER TO FrameBox;
  79.   DrawPtr *          = CPOINTER TO Draw;
  80.   ErasePtr *         = CPOINTER TO Erase;
  81.   IMHitTestPtr *     = CPOINTER TO IMHitTest;
  82.   DRIPenArrayPtr*    = CPOINTER TO DRIPenArray;
  83.   GadSpecialInfoPtr* = CPOINTER TO GadSpecialInfo;
  84.   ExtGadgetPtr *     = CPOINTER TO ExtGadget;
  85.   ScreenBufferPtr *  = CPOINTER TO ScreenBuffer;
  86.   TabletDataPtr *    = CPOINTER TO TabletData;
  87.   TabletHookDataPtr * = CPOINTER TO TabletHookData;
  88.   LayoutPtr *        = CPOINTER TO Layout;
  89.  
  90.  
  91. (*
  92. **  $VER: intuition.h 38.26 (15.2.93)
  93. **
  94. **  Interface definitions for Intuition applications.
  95. *)
  96.  
  97. (* ======================================================================== *)
  98. (* === Menu =============================================================== *)
  99. (* ======================================================================== *)
  100.  
  101. TYPE
  102.  
  103.   Menu * = RECORD
  104.     nextMenu *            : MenuPtr;     (* same level *)
  105.     leftEdge *, topEdge * : INTEGER;     (* position of the select box *)
  106.     width *, height *     : INTEGER;     (* dimensions of the select box *)
  107.     flags *               : E.WSET;      (* see flag definitions below *)
  108.     menuName *            : E.STRPTR;    (* text for this Menu Header *)
  109.     firstItem *           : MenuItemPtr; (* pointer to first in chain *)
  110.  
  111.     (* these mysteriously-named variables are for internal use only *)
  112.     jazzX *, jazzY *, beatX *, beatY * : INTEGER;
  113.   END; (* Menu *)
  114.  
  115. CONST
  116.  
  117. (* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION *)
  118.   menuEnabled * = 0;      (* whether or not this menu is enabled *)
  119.  
  120. (* FLAGS SET BY INTUITION *)
  121.   miDrawn * = 8;          (* this menu's items are currently drawn *)
  122.  
  123. (* ======================================================================== *)
  124. (* === MenuItem =========================================================== *)
  125. (* ======================================================================== *)
  126.  
  127. TYPE
  128.  
  129.   MenuItem * = RECORD
  130.     nextItem *            : MenuItemPtr; (* pointer to next in chained list *)
  131.     leftEdge *, topEdge * : INTEGER;     (* position of the select box *)
  132.     width *, height *     : INTEGER;     (* dimensions of the select box *)
  133.     flags *               : E.WSET;      (* see the defines below *)
  134.  
  135.     mutualExclude *       : SET;         (* set bits mean this item excludes that *)
  136.  
  137.     itemFill *            : E.APTR;      (* points to Image, IntuiText, or NULL *)
  138.  
  139.     (* when this item is pointed to by the cursor and the items highlight
  140.      * mode HIGHIMAGE is selected, this alternate image will be displayed
  141.      *)
  142.     selectFill *          : E.APTR;      (* points to Image, IntuiText, or NULL *)
  143.  
  144.     command *             : CHAR;        (* only if appliprog sets the COMMSEQ flag *)
  145.  
  146.     subItem *             : MenuItemPtr; (* if non-zero, points to MenuItem for submenu *)
  147.  
  148.     (* The NextSelect field represents the menu number of next selected
  149.      * item (when user has drag-selected several items)
  150.      *)
  151.     nextSelect *          : E.UWORD;
  152.   END; (* MenuItem *)
  153.  
  154.  
  155. CONST
  156.  
  157. (* FLAGS SET BY THE APPLIPROG *)
  158.   checkIt *         = 0;  (* set to indicate checkmarkable item *)
  159.   itemText *        = 1;  (* set if textual, clear if graphical item *)
  160.   commSeq *         = 2;  (* set if there's an command sequence *)
  161.   menuToggle *      = 3;  (* set for toggling checks (else mut. exclude) *)
  162.   itemEnabled *     = 4;  (* set if this item is enabled *)
  163.  
  164. (* these are the SPECIAL HIGHLIGHT FLAG state meanings *)
  165.   highFlags *       = {6,7};  (* see definitions below for these bits *)
  166.   highImage *       = {};     (* use the user's "select image" *)
  167.   highComp *        = {6};    (* highlight by complementing the selectbox *)
  168.   highBox *         = {7};    (* highlight by "boxing" the selectbox *)
  169.   highNone *        = {6,7};  (* don't highlight *)
  170.  
  171. (* FLAGS SET BY BOTH APPLIPROG AND INTUITION *)
  172.   checked * = 8;  (* state of the checkmark *)
  173.  
  174. (* FLAGS SET BY INTUITION *)
  175.   isDrawn *         = 12;  (* this item's subs are currently drawn *)
  176.   highItem *        = 13;  (* this item is currently highlighted *)
  177.   menuToggled *     = 14;  (* this item was already toggled *)
  178.  
  179. (* ======================================================================== *)
  180. (* === Requester ========================================================== *)
  181. (* ======================================================================== *)
  182.  
  183. TYPE
  184.  
  185.   Requester * = RECORD
  186.     olderRequest *        : RequesterPtr;
  187.     leftEdge *, topEdge * : INTEGER;      (* dimensions of the entire box *)
  188.     width *, height *     : INTEGER;      (* dimensions of the entire box *)
  189.     relLeft *, relTop *   : INTEGER;      (* for Pointer relativity offsets *)
  190.  
  191.     reqGadget *           : GadgetPtr;    (* pointer to a list of Gadgets *)
  192.     reqBorder *           : BorderPtr;    (* the box's border *)
  193.     reqText *             : IntuiTextPtr; (* the box's text *)
  194.     flags *               : E.WSET;       (* see definitions below *)
  195.  
  196.     (* pen number for back-plane fill before draws *)
  197.     backFill *            : E.UBYTE;
  198.     (* Layer in place of clip rect      *)
  199.     reqLayer *            : G.LayerPtr;
  200.  
  201.     reqPad1 *             : ARRAY 32 OF E.UBYTE;
  202.  
  203.     (* If the BitMap plane pointers are non-zero, this tells the system
  204.      * that the image comes pre-drawn (if the appliprog wants to define
  205.      * its own box, in any shape or size it wants!);  this is OK by
  206.      * Intuition as long as there's a good correspondence between
  207.      * the image and the specified Gadgets
  208.      *)
  209.     imageBMap *           : G.BitMapPtr;  (* points to the G.BitMap of PREDRAWN imagery *)
  210.     rWindow *             : WindowPtr;    (* added.  points back to Window *)
  211.  
  212.     reqImage *            : ImagePtr;     (* new for V36: drawn if USEREQIMAGE set *)
  213.  
  214.     reqPad2 *             : ARRAY 32 OF E.UBYTE;
  215.   END; (* Requester *)
  216.  
  217. CONST
  218.  
  219. (* FLAGS SET BY THE APPLIPROG *)
  220.   pointRel *        = 0;
  221.                           (* if POINTREL set, TopLeft is relative to pointer
  222.                            * for DMRequester, relative to window center
  223.                            * for Request().
  224.                            *)
  225.   preDrawn *        = 1;
  226.         (* set if Requester.ImageBMap points to predrawn Requester imagery *)
  227.   noisyReq *        = 2;
  228.         (* if you don't want requester to filter input     *)
  229.   simpleReq *       = 4;
  230.         (* to use SIMPLEREFRESH layer (recommended)     *)
  231.  
  232. (* New for V36          *)
  233.   useReqImage *     = 5;
  234.         (*  render linked list ReqImage after BackFill
  235.          * but before gadgets and text
  236.          *)
  237.   noReqBackFill *   = 6;
  238.         (* don't bother filling requester with Requester.BackFill pen   *)
  239.  
  240.  
  241. (* FLAGS SET BY INTUITION *)
  242.   reqOffWindow *    = 12;  (* part of one of the Gadgets was offwindow *)
  243.   reqActive *       = 13;  (* this requester is active *)
  244.   sysRequest *      = 14;  (* (unused) this requester caused by system *)
  245.   deferRefresh *    = 15;  (* this Requester stops a Refresh broadcast *)
  246.  
  247. (* ======================================================================== *)
  248. (* === Gadget ============================================================= *)
  249. (* ======================================================================== *)
  250.  
  251. TYPE
  252.   GadSpecialInfo * = RECORD END;
  253.  
  254.   Gadget * = RECORD
  255.     nextGadget *          : GadgetPtr;    (* next gadget in the list *)
  256.  
  257.     leftEdge* , topEdge * : INTEGER;      (* "hit box" of gadget *)
  258.     width* , height *     : INTEGER;      (* "hit box" of gadget *)
  259.  
  260.     flags *               : E.WSET;       (* see below for list of defines *)
  261.  
  262.     activation *          : E.WSET;       (* see below for list of defines *)
  263.  
  264.     gadgetType *          : E.WSET;       (* see below for defines *)
  265.  
  266.     (* appliprog can specify that the Gadget be rendered as either as Border
  267.      * or an Image.  This variable points to which (or equals NULL if there's
  268.      * nothing to be rendered about this Gadget)
  269.      *)
  270.     gadgetRender *        : E.APTR;
  271.  
  272.     (* appliprog can specify "highlighted" imagery rather than algorithmic
  273.      * this can point to either Border or Image data
  274.      *)
  275.     selectRender *        : E.APTR;
  276.  
  277.     gadgetText *          : IntuiTextPtr; (* text for this gadget *)
  278.  
  279.     (* MutualExclude, never implemented, is now declared obsolete.
  280.      * There are published examples of implementing a more general
  281.      * and practical exclusion in your applications.
  282.      *
  283.      * Starting with V36, this field is used to point to a hook
  284.      * for a custom gadget.
  285.      *
  286.      * Programs using this field for their own processing will
  287.      * continue to work, as long as they don't try the
  288.      * trick with custom gadgets.
  289.      *)
  290.     mutualExclude *       : SET;          (* obsolete *)
  291.  
  292.     (* pointer to a structure of special data required by Proportional,
  293.      * String and Integer Gadgets
  294.      *)
  295.     specialInfo *         : GadSpecialInfoPtr;
  296.  
  297.     gadgetID *            : E.UWORD;      (* user-definable ID field *)
  298.     userData *            : E.APTR;       (* ptr to general purpose User data (ignored by In) *)
  299.   END; (* Gadget *)
  300.  
  301.   ExtGadget * = RECORD (Gadget)  (* The first fields match struct Gadget exactly *)
  302.     (* These fields only exist under V39 and only if gflgExtended is set *)
  303.     moreFlags *      : SET;      (* see gmore* flags below *)
  304.     boundsLeftEdge * : INTEGER;  (* Bounding extent for gadget, valid   *)
  305.     boundsTopEdge *  : INTEGER;  (* only if gmoreBounds is set.  The   *)
  306.     boundsWidth *    : INTEGER;  (* gflgRelxxx flags affect these      *)
  307.     boundsHeight *   : INTEGER;  (* coordinates as well.        *)
  308.   END;
  309.  
  310. CONST
  311.  
  312. (* --- Gadget.Flags values      --- *)
  313. (* combinations in these bits describe the highlight technique to be used *)
  314.   gflgGadgHighBits * = {0,1};
  315.   gflgGadgHComp *    = {};     (* Complement the select box *)
  316.   gflgGadgHBox *     = {0};    (* Draw a box around the image *)
  317.   gflgGadgHImage *   = {1};    (* Blast in this alternate image *)
  318.   gflgGadgHNone *    = {0,1};  (* don't highlight *)
  319.  
  320.   gflgGadgImage *    = 2;      (* set if GadgetRender and SelectRender
  321.                                 * point to an Image structure, clear
  322.                                 * if they point to Border structures
  323.                                 *)
  324.  
  325. (* combinations in these next two bits specify to which corner the gadget's
  326.  * Left & Top coordinates are relative.  If relative to Top/Left,
  327.  * these are "normal" coordinates (everything is relative to something in
  328.  * this universe).
  329.  *
  330.  * Gadget positions and dimensions are relative to the window or
  331.  * requester which contains the gadget
  332.  *)
  333.   gflgRelBottom *  = 3;  (* vert. pos. is relative to bottom edge *)
  334.   gflgRelRight *   = 4;  (* horiz. pos. is relative to right edge *)
  335.   gflgRelWidth *   = 5;  (* width is relative to req/window    *)
  336.   gflgRelHeight *  = 6;  (* height is relative to req/window   *)
  337.  
  338. (* New for V39: gflgRelSpecial allows custom gadget implementors to
  339.  * make gadgets whose position and size depend in an arbitrary way
  340.  * on their window's dimensions.  The gmLayout method will be invoked
  341.  * for such a gadget (or any other grelXxx gadget) at suitable times,
  342.  * such as when the window opens or the window's size changes.
  343.  *)
  344.   gflgRelSpecial * = 14;  (* custom gadget has special relativity.
  345.                            * Gadget box values are absolutes, but
  346.                            * can be changed via the GM_LAYOUT method.
  347.                            *)
  348.   gflgSelected *    = 7;  (* you may initialize and look at this        *)
  349.  
  350. (* the gflgDISABLED flag is initialized by you and later set by Intuition
  351.  * according to your calls to On/OffGadget().  It specifies whether or not
  352.  * this Gadget is currently disabled from being selected
  353.  *)
  354.   gflgDisabled *     = 8;
  355.  
  356. (* These flags specify the type of text field that Gadget.GadgetText
  357.  * points to.  In all normal (pre-V36) gadgets which you initialize
  358.  * this field should always be zero.  Some types of gadget objects
  359.  * created from classes will use these fields to keep track of
  360.  * types of labels/contents that different from IntuiText, but are
  361.  * stashed in GadgetText.
  362.  *)
  363.  
  364.   gflgLabelMask *    = {12,13};
  365.   gflgLabelIText *   = {};    (* GadgetText points to IntuiText     *)
  366.   gflgLabelString *  = 12;    (* GadgetText points to string *)
  367.   gflgLabelImage *   = 13;    (* GadgetText points to Image (object)        *)
  368.  
  369. (* New for V37: gflgTabCycle *)
  370.   gflgTabCycle     * = 9;   (* (string or custom) gadget participates in
  371.                              * cycling activation with Tab or Shift-Tab
  372.                          *)
  373. (* New for V37: gflgStringExtend.  We discovered that V34 doesn't properly
  374.  * ignore the value we had chosen for the Gadget->Activation flag
  375.  * gactStringExtend.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  376.  * The Gadget->Flags bit gflgStringExtend is provided as a synonym which is
  377.  * safe under V34, and equivalent to gactStringExtend under V37.
  378.  * (Note that the two flags are not numerically equal)
  379.  *)
  380.   gflgStringExtend * = 10;  (* this String Gadget has StringExtend        *)
  381.  
  382. (* New for V39: gflgImageDisable.  This flag is automatically set if
  383.  * the custom image of this gadget knows how to do disabled rendering
  384.  * (more specifically, if its IA_SupportsDisable attribute is TRUE).
  385.  * Intuition uses this to defer the ghosting to the image-class,
  386.  * instead of doing it itself (the old compatible way).
  387.  * Do not set this flag yourself - Intuition will do it for you.
  388.  *)
  389.  
  390.   gflgImageDisable * = 11;     (* Gadget's image knows how to do disabled
  391.                                 * rendering
  392.                                 *)
  393.  
  394. (* New for V39:  If set, this bit means that the Gadget is actually
  395.  * a struct ExtGadget, with new fields and flags.  All V39 boopsi
  396.  * gadgets are ExtGadgets.  Never ever attempt to read the extended
  397.  * fields of a gadget if this flag is not set.
  398.  *)
  399.   gflgExtended * = 15;        (* Gadget is extended *)
  400.  
  401. (* ---  Gadget.Activation flag values   --- *)
  402. (* Set gactRelVerify if you want to verify that the pointer was still over
  403.  * the gadget when the select button was released.  Will cause
  404.  * an idcmpGadgetUp message to be sent if so.
  405.  *)
  406.   gactRelVerify *    = 0;
  407.  
  408. (* the flag gactImmediate, when set, informs the caller that the gadget
  409.  * was activated when it was activated.  This flag works in conjunction with
  410.  * the gactRelVerify flag
  411.  *)
  412.   gactImmediate *    = 1;
  413.  
  414. (* the flag gactEndGadget, when set, tells the system that this gadget,
  415.  * when selected, causes the Requester to be ended.  Requesters
  416.  * that are ended are erased and unlinked from the system.
  417.  *)
  418.   gactEndGadget *    = 2;
  419.  
  420. (* the gactFollowMouse flag, when set, specifies that you want to receive
  421.  * reports on mouse movements while this gadget is active.
  422.  * You probably want to set the gactImmediate flag when using
  423.  * gactFollowMouse, since that's the only reasonable way you have of
  424.  * learning why Intuition is suddenly sending you a stream of mouse
  425.  * movement events.  If you don't set gactRelVerify, you'll get at
  426.  * least one Mouse Position event.
  427.  * Note: boolean FollowMouse gadgets require gactRelVerify to get
  428.  * any mouse movement events (this unusual behavior is a compatibility
  429.  * hold-over from the old days).
  430.  *)
  431.   gactFollowMouse *  = 3;
  432.  
  433. (* if any of the Border flags are set in a Gadget that's included in the
  434.  * Gadget list when a Window is opened, the corresponding Border will
  435.  * be adjusted to make room for the Gadget
  436.  *)
  437.   gactRightBorder *  = 4;
  438.   gactLeftBorder *   = 5;
  439.   gactTopBorder *    = 6;
  440.   gactBottomBorder * = 7;
  441.   gactBorderSniff *  = 15;  (* neither set nor rely on this bit   *)
  442.  
  443.   gactToggleSelect * = 8;   (* this bit for toggle-select mode *)
  444.   gactBoolExtend *   = 13;  (* this Boolean Gadget has a BoolInfo *)
  445.  
  446. (* should properly be in StringInfo, but aren't *)
  447.   gactStringLeft *   = {};  (* NOTE WELL: that this has value zero        *)
  448.   gactStringCenter * = 9;
  449.   gactStringRight *  = 10;
  450.   gactLongint *      = 11;  (* this String Gadget is for Long Ints        *)
  451.   gactAltKeymap *    = 12;  (* this String has an alternate keymap        *)
  452.   gactStringExtend * = 13;  (* this String Gadget has StringExtend        *)
  453.                             (* NOTE: NEVER SET gactStringExtend IF YOU
  454.                              * ARE RUNNING ON LESS THAN V36!  SEE
  455.                              * gflgStringExtend (ABOVE) INSTEAD
  456.                              *)
  457.  
  458.   gactActiveGadget * = 14;  (* this gadget is "active".  This flag
  459.                              * is maintained by Intuition, and you
  460.                              * cannot count on its value persisting
  461.                              * while you do something on your program's
  462.                              * task.  It can only be trusted by
  463.                              * people implementing custom gadgets
  464.                              *)
  465.  
  466. (* note 15 is used above (gactBorderSniff)
  467.  * all Activation flags defined *)
  468.  
  469. (* --- GADGET TYPES ------------------------------------------------------- *)
  470. (* These are the Gadget Type definitions for the variable GadgetType
  471.  * gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  472.  * first comes the mask for Gadget flags reserved for Gadget typing
  473.  *)
  474.   gtypGadgetType * = {10..15};  (* all Gadget Global Type flags (padded) *)
  475.  
  476.   gtypScrGadget *  = {14};      (* 1 * = ScreenGadget, 0 * = WindowGadget *)
  477.   gtypGzzGadget *  = {13};      (* 1 * = for wflgGimmeZeroZero borders *)
  478.   gtypReqGadget *  = {12};      (* 1 * = this is a Requester Gadget *)
  479.  
  480. (* gtypSysGadget means that Intuition ALLOCATED the gadget.
  481.  * gtypSysTypeMask is the mask you can apply to tell what type of
  482.  * system-gadget it is.  The possible types follow.
  483.  *)
  484.   gtypSysGadget *   = {15};
  485.   gtypSysTypeMask * = {4..7};
  486.  
  487. (* These definitions describe system gadgets in V36 and higher: *)
  488.   gtypSizing *    = {4};      (* Window sizing gadget *)
  489.   gtypWDragging * = {5};      (* Window drag bar *)
  490.   gtypSDragging * = {4,5};    (* Screen drag bar *)
  491.   gtypWDepth *    = {6};      (* Window depth gadget *)
  492.   gtypSDepth *    = {4,6};    (* Screen depth gadget *)
  493.   gtypWZoom *     = {5,6};    (* Window zoom gadget *)
  494.   gtypSUnused *   = {4,5,6};  (* Unused screen gadget *)
  495.   gtypClose *     = {7};      (* Window close gadget *)
  496.  
  497. (* These definitions describe system gadgets prior to V36: *)
  498.   gtypWUpFront *  = gtypWDepth;   (* Window to-front gadget *)
  499.   gtypSUpFront *  = gtypSDepth;   (* Screen to-front gadget *)
  500.   gtypWDownBack * = gtypWZoom;    (* Window to-back gadget *)
  501.   gtypSDownBack * = gtypSUnused;  (* Screen to-back gadget *)
  502.  
  503. (* gtypGTypeMask is a mask you can apply to tell what class
  504.  * of gadget this is.  The possible classes follow.
  505.  *)
  506.   gtypGTypeMask * = {0..2};
  507.  
  508.   gtypBoolGadget *   = {0};
  509.   gtypGadget0002 *   = {1};
  510.   gtypPropGadget *   = {0,1};
  511.   gtypStrGadget *    = {2};
  512.   gtypCustomGadget * = {0,2};
  513.  
  514. (* This bit in GadgetType is reserved for undocumented internal use
  515.  * by the Gadget Toolkit, and cannot be used nor relied on by
  516.  * applications:        {8}
  517.  *)
  518.  
  519. (* New for V39.  Gadgets which have the gflgExtended flag set are
  520.  * actually ExtGadgets, which have more flags.  The gmoreXxx
  521.  * identifiers describe those flags.  For gmoreScrollRaster, see
  522.  * important information in the ScrollWindowRaster() autodoc.
  523.  * NB: gmoreScrollRaster must be set before the gadget is
  524.  * added to a window.
  525.  *)
  526.   gmoreBounds *       = 0;  (* ExtGadget has valid Bounds *)
  527.   gmoreGadgetHelp *   = 1;  (* This gadget responds to gadget help *)
  528.   gmoreScrollRaster * = 2;  (* This (custom) gadget uses ScrollRaster *)
  529.  
  530. (* ======================================================================== *)
  531. (* === BoolInfo======================================================= *)
  532. (* ======================================================================== *)
  533. (* This is the special data needed by an Extended Boolean Gadget
  534.  * Typically this structure will be pointed to by the Gadget field SpecialInfo
  535.  *)
  536.  
  537. TYPE
  538.  
  539.   BoolInfo * = RECORD (GadSpecialInfo)
  540.     flags *    : E.WSET;  (* defined below *)
  541.     mask *     : E.APTR;  (* bit mask for highlighting and selecting
  542.                            * mask must follow the same rules as an Image
  543.                            * plane.  Its width and height are determined
  544.                            * by the width and height of the gadget's
  545.                            * select box. (i.e. Gadget.Width and .Height).
  546.                            *)
  547.     reserved * : E.ULONG; (* set to 0     *)
  548.   END; (* BoolInfo *)
  549.  
  550. CONST
  551.  
  552. (* set BoolInfo.Flags to this flag bit.
  553.  * in the future, additional bits might mean more stuff hanging
  554.  * off of BoolInfo.Reserved.
  555.  *)
  556.   boolMask *        = 0;  (* extension is for masked gadget *)
  557.  
  558. (* ======================================================================== *)
  559. (* === PropInfo =========================================================== *)
  560. (* ======================================================================== *)
  561. (* this is the special data required by the proportional Gadget
  562.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  563.  *)
  564.  
  565. TYPE
  566.  
  567.   PropInfo * = RECORD (GadSpecialInfo)
  568.     flags *               : E.WSET;  (* general purpose flag bits (see defines below) *)
  569.  
  570.     (* You initialize the Pot variables before the Gadget is added to
  571.      * the system.  Then you can look here for the current settings
  572.      * any time, even while User is playing with this Gadget.  To
  573.      * adjust these after the Gadget is added to the System, use
  574.      * ModifyProp();  The Pots are the actual proportional settings,
  575.      * where a value of zero means zero and a value of MAXPOT means
  576.      * that the Gadget is set to its maximum setting.
  577.      *)
  578.     horizPot *            : E.UWORD; (* 16-bit FixedPoint horizontal quantity percentage *)
  579.     vertPot *             : E.UWORD; (* 16-bit FixedPoint vertical quantity percentage *)
  580.  
  581.     (* the 16-bit FixedPoint Body variables describe what percentage of
  582.      * the entire body of stuff referred to by this Gadget is actually
  583.      * shown at one time.  This is used with the AUTOKNOB routines,
  584.      * to adjust the size of the AUTOKNOB according to how much of
  585.      * the data can be seen.  This is also used to decide how far
  586.      * to advance the Pots when User hits the Container of the Gadget.
  587.      * For instance, if you were controlling the display of a 5-line
  588.      * Window of text with this Gadget, and there was a total of 15
  589.      * lines that could be displayed, you would set the VertBody value to
  590.      * (MAXBODY / (TotalLines / DisplayLines)) * = MAXBODY / 3.
  591.      * Therefore, the AUTOKNOB would fill 1/3 of the container, and
  592.      * if User hits the Cotainer outside of the knob, the pot would
  593.      * advance 1/3 (plus or minus) If there's no body to show, or
  594.      * the total amount of displayable info is less than the display area,
  595.      * set the Body variables to the MAX.  To adjust these after the
  596.      * Gadget is added to the System, use ModifyProp();
  597.      *)
  598.     horizBody *           : E.UWORD; (* horizontal Body *)
  599.     vertBody *            : E.UWORD; (* vertical Body *)
  600.  
  601.     (* these are the variables that Intuition sets and maintains *)
  602.     cWidth *              : E.UWORD; (* Container width (with any relativity absoluted) *)
  603.     cHeight *             : E.UWORD; (* Container height (with any relativity absoluted) *)
  604.     hPotRes *, vPotRes *  : E.UWORD; (* pot increments *)
  605.     leftBorder *          : E.UWORD; (* Container borders *)
  606.     topBorder *           : E.UWORD; (* Container borders *)
  607.   END; (* PropInfo *)
  608.  
  609.  
  610. CONST
  611.  
  612. (* --- FLAG BITS ---------------------------------------------------------- *)
  613.   autoKnob *        = 0;  (* this flag sez:  gimme that old auto-knob *)
  614. (* NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  615.  * you are currently limited to using a single Image of your own
  616.  * design: Intuition won't handle a linked list of images as
  617.  * a proportional gadget knob.
  618.  *)
  619.  
  620.   freeHoriz *       = 1;  (* if set, the knob can move horizontally *)
  621.   freeVert *        = 2;  (* if set, the knob can move vertically *)
  622.   propBorderless *  = 3;  (* if set, no border will be rendered *)
  623.   knobHit *         = 8;  (* set when this Knob is hit *)
  624.   propNewlook *     = 4;  (* set this if you want to get the new
  625.                            * V36 look
  626.                            *)
  627.  
  628.   knobHMin *        = 6;       (* minimum horizontal size of the Knob *)
  629.   knobVMin *        = 4;       (* minimum vertical size of the Knob *)
  630.   maxBody *         = 0FFFFH;  (* maximum body value *)
  631.   maxPot *          = 0FFFFH;  (* maximum pot value *)
  632.  
  633. (* ======================================================================== *)
  634. (* === StringInfo ========================================================= *)
  635. (* ======================================================================== *)
  636. (* this is the special data required by the string Gadget
  637.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  638.  *)
  639.  
  640. TYPE
  641.  
  642.   StringInfo * = RECORD (GadSpecialInfo)
  643.     (* you initialize these variables, and then Intuition maintains them *)
  644.     buffer *       : E.STRPTR;  (* the buffer containing the start and final string *)
  645.     undoBuffer *   : E.STRPTR;  (* optional buffer for undoing current entry *)
  646.     bufferPos *    : INTEGER;   (* character position in Buffer *)
  647.     maxChars *     : INTEGER;   (* max number of chars in Buffer (including NULL) *)
  648.     dispPos *      : INTEGER;   (* Buffer position of first displayed character *)
  649.  
  650.     (* Intuition initializes and maintains these variables for you *)
  651.     undoPos *      : INTEGER;   (* character position in the undo buffer *)
  652.     numChars *     : INTEGER;   (* number of characters currently in Buffer *)
  653.     dispCount *    : INTEGER;   (* number of whole characters visible in Container *)
  654.     cLeft *, cTop * : INTEGER;  (* topleft offset of the container *)
  655.  
  656.     (* This unused field is changed to allow extended specification
  657.      * of string gadget parameters.  It is ignored unless the flag
  658.      * gactSTRINGEXTEND is set in the Gadget's Activation field
  659.      * or the gflgSTRINGEXTEND flag is set in the Gadget Flags field.
  660.      * (See gflgSTRINGEXTEND for an important note)
  661.      *)
  662.     (* struct Layer *LayerPtr;  --- obsolete --- *)
  663.     extension *    : StringExtendPtr;
  664.  
  665.     (* you can initialize this variable before the gadget is submitted to
  666.      * Intuition, and then examine it later to discover what integer
  667.      * the user has entered (if the user never plays with the gadget,
  668.      * the value will be unchanged from your initial setting)
  669.      *)
  670.     longInt *      : LONGINT;
  671.  
  672.     (* If you want this Gadget to use your own Console keymapping, you
  673.      * set the gactALTKEYMAP bit in the Activation flags of the Gadget,
  674.      * and then set this variable to point to your keymap.  If you don't
  675.      * set the gactALTKEYMAP, you'll get the standard ASCII keymapping.
  676.      *)
  677.     altKeyMap *    : KM.KeyMapPtr;
  678.   END; (* StringInfo *)
  679.  
  680. (* ======================================================================== *)
  681. (* === IntuiText ========================================================== *)
  682. (* ======================================================================== *)
  683. (* IntuiText is a series of strings that start with a location
  684.  * (always relative to the upper-left corner of something) and then the
  685.  * text of the string.  The text is null-terminated.
  686.  *)
  687.  
  688. TYPE
  689.  
  690.   IntuiText * = RECORD
  691.     frontPen *, backPen * : E.UBYTE; (* the pen numbers for the rendering *)
  692.     drawMode *     : E.BSET;         (* the mode for rendering the text *)
  693.     leftEdge *     : INTEGER;        (* relative start location for the text *)
  694.     topEdge *      : INTEGER;        (* relative start location for the text *)
  695.     iTextFont *    : G.TextAttrPtr;  (* if NULL, you accept the default *)
  696.     iText *        : E.STRPTR;       (* pointer to null-terminated text *)
  697.     nextText *     : IntuiTextPtr;   (* pointer to another IntuiText to render *)
  698.   END; (* IntuiText *)
  699.  
  700. (* ======================================================================== *)
  701. (* === Border ============================================================= *)
  702. (* ======================================================================== *)
  703. (* Data type Border, used for drawing a series of lines which is intended for
  704.  * use as a border drawing, but which may, in fact, be used to render any
  705.  * arbitrary vector shape.
  706.  * The routine DrawBorder sets up the RastPort with the appropriate
  707.  * variables, then does a Move to the first coordinate, then does Draws
  708.  * to the subsequent coordinates.
  709.  * After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  710.  * on NextBorder
  711.  *)
  712.  
  713. TYPE
  714.  
  715.   Border * = RECORD
  716.     leftEdge *, topEdge * : INTEGER; (* initial offsets from the origin *)
  717.     frontPen *, backPen * : E.UBYTE; (* pens numbers for rendering *)
  718.     drawMode *     : E.BSET;         (* mode for rendering *)
  719.     count *        : SHORTINT;       (* number of XY pairs *)
  720.     xy *           : E.APTR;         (* vector coordinate pairs rel to LeftTop *)
  721.     nextBorder *   : BorderPtr;      (* pointer to any other Border too *)
  722.   END; (* Border *)
  723.  
  724. (* ======================================================================== *)
  725. (* === Image ============================================================== *)
  726. (* ======================================================================== *)
  727. (* This is a brief image structure for very simple transfers of
  728.  * image data to a RastPort
  729.  *)
  730.  
  731. TYPE
  732.  
  733.   Image * = RECORD
  734.     leftEdge *     : INTEGER;  (* starting offset relative to some origin *)
  735.     topEdge *      : INTEGER;  (* starting offsets relative to some origin *)
  736.     width *        : INTEGER;  (* pixel size (though data is word-aligned) *)
  737.     height *       : INTEGER;
  738.     depth *        : INTEGER;  (* >= 0, for images you create          *)
  739.     imageData *    : E.APTR;   (* pointer to the actual word-aligned bits *)
  740.  
  741.     (* the PlanePick and PlaneOnOff variables work much the same way as the
  742.      * equivalent GELS Bob variables.  It's a space-saving
  743.      * mechanism for image data.  Rather than defining the image data
  744.      * for every plane of the RastPort, you need define data only
  745.      * for the planes that are not entirely zero or one.  As you
  746.      * define your Imagery, you will often find that most of the planes
  747.      * ARE just as color selectors.  For instance, if you're designing
  748.      * a two-color Gadget to use colors one and three, and the Gadget
  749.      * will reside in a five-plane display, bit plane zero of your
  750.      * imagery would be all ones, bit plane one would have data that
  751.      * describes the imagery, and bit planes two through four would be
  752.      * all zeroes.  Using these flags avoids wasting all
  753.      * that memory in this way:  first, you specify which planes you
  754.      * want your data to appear in using the PlanePick variable.  For
  755.      * each bit set in the variable, the next "plane" of your image
  756.      * data is blitted to the display.  For each bit clear in this
  757.      * variable, the corresponding bit in PlaneOnOff is examined.
  758.      * If that bit is clear, a "plane" of zeroes will be used.
  759.      * If the bit is set, ones will go out instead.  So, for our example:
  760.      *   Gadget.PlanePick * = 02H;
  761.      *   Gadget.PlaneOnOff * = 01H;
  762.      * Note that this also allows for generic Gadgets, like the
  763.      * System Gadgets, which will work in any number of bit planes.
  764.      * Note also that if you want an Image that is only a filled
  765.      * rectangle, you can get this by setting PlanePick to zero
  766.      * (pick no planes of data) and set PlaneOnOff to describe the pen
  767.      * color of the rectangle.
  768.      *
  769.      * NOTE:  Intuition relies on PlanePick to know how many planes
  770.      * of data are found in ImageData.  There should be no more
  771.      * '1'-bits in PlanePick than there are planes in ImageData.
  772.      *)
  773.     planePick *, planeOnOff * : E.BSET;
  774.  
  775.     (* if the NextImage variable is not NULL, Intuition presumes that
  776.      * it points to another Image structure with another Image to be
  777.      * rendered
  778.      *)
  779.     nextImage *    : ImagePtr;
  780.   END; (* Image *)
  781.  
  782. (* ======================================================================== *)
  783. (* === IntuiMessage ======================================================= *)
  784. (* ======================================================================== *)
  785.  
  786. TYPE
  787.  
  788.   IntuiMessage * = RECORD (E.Message)
  789.     (* the Class bits correspond directly with the IDCMP Flags, except for the
  790.      * special bit idcmpLONELYMESSAGE (defined below)
  791.      *)
  792.     class *        : SET;
  793.  
  794.     (* the Code field is for special values like MENU number *)
  795.     code *         : E.UWORD;
  796.  
  797.     (* the Qualifier field is a copy of the current InputEvent's Qualifier *)
  798.     qualifier *    : E.WSET;
  799.  
  800.     (* IAddress contains particular addresses for Intuition functions, like
  801.      * the pointer to the Gadget or the Screen
  802.      *)
  803.     iAddress *     : E.APTR;
  804.  
  805.     (* when getting mouse movement reports, any event you get will have the
  806.      * the mouse coordinates in these variables.  the coordinates are relative
  807.      * to the upper-left corner of your Window (WflgGIMMEZEROZERO
  808.      * notwithstanding).  If idcmpDELTAMOVE is set, these values will
  809.      * be deltas from the last reported position.
  810.      *)
  811.     mouseX *, mouseY * : INTEGER;
  812.  
  813.     (* the time values are copies of the current system clock time.  Micros
  814.      * are in units of microseconds, Seconds in seconds.
  815.      *)
  816.     seconds *, micros * : E.ULONG;
  817.  
  818.     (* the IDCMPWindow variable will always have the address of the Window of
  819.      * this IDCMP
  820.      *)
  821.     idcmpWindow *  : WindowPtr;
  822.  
  823.     (* system-use variable *)
  824.     specialLink *  : IntuiMessagePtr;
  825.   END; (* IntuiMessage *)
  826.  
  827. (* New for V39:
  828.  * All IntuiMessages are now slightly extended.  The ExtIntuiMessage
  829.  * structure has an additional field for tablet data, which is usually
  830.  * NULL.  If a tablet driver which is sending IE.subClassNewTablet
  831.  * events is installed in the system, windows with the WA_TabletMessages
  832.  * property set will find that tabletData points to the TabletData
  833.  * structure.  Applications must first check that this field is non-NULL;
  834.  * it will be NULL for certain kinds of message, including mouse activity
  835.  * generated from other than the tablet (i.e. the keyboard equivalents
  836.  * or the mouse itself).
  837.  *
  838.  * NEVER EVER examine any extended fields when running under pre-V39!
  839.  *
  840.  * NOTE: This structure is subject to grow in the future.  Making
  841.  * assumptions about its size is A BAD IDEA.
  842.  *)
  843.  
  844.   ExtIntuiMessage * = RECORD (IntuiMessage)
  845.     tabletData * : TabletDataPtr;
  846.   END;
  847.  
  848.  
  849. CONST
  850.  
  851. (* --- IDCMP Classes ------------------------------------------------------ *)
  852. (* Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  853.  * Manual for full details on the IDCMP classes.
  854.  *)
  855.   idcmpSizeVerify *        = 0;
  856.   idcmpNewSize *           = 1;
  857.   idcmpRefreshWindow *     = 2;
  858.   idcmpMouseButtons *      = 3;
  859.   idcmpMouseMove *         = 4;
  860.   idcmpGadgetDown *        = 5;
  861.   idcmpGadgetUp *          = 6;
  862.   idcmpReqSet *            = 7;
  863.   idcmpMenuPick *          = 8;
  864.   idcmpCloseWindow *       = 9;
  865.   idcmpRawKey *            = 10;
  866.   idcmpReqVerify *         = 11;
  867.   idcmpReqClear *          = 12;
  868.   idcmpMenuVerify *        = 13;
  869.   idcmpNewPrefs *          = 14;
  870.   idcmpDiskInserted *      = 15;
  871.   idcmpDiskRemoved *       = 16;
  872.   idcmpWBenchMessage *     = 17;  (*  System use only         *)
  873.   idcmpActiveWindow *      = 18;
  874.   idcmpInactiveWindow *    = 19;
  875.   idcmpDeltaMove *         = 20;
  876.   idcmpVanillaKey *        = 21;
  877.   idcmpIntuiTicks *        = 22;
  878. (*  for notifications from "boopsi" gadgets     *)
  879.   idcmpIdcmpUpdate *       = 23;  (* new for V36      *)
  880. (* for getting help key report during menu session      *)
  881.   idcmpMenuHelp *          = 24;  (* new for V36      *)
  882. (* for notification of any move/size/zoom/change window         *)
  883.   idcmpChangeWindow *      = 25;  (* new for V36      *)
  884.   idcmpGadgetHelp *        = 26;  (* new for V39      *)
  885.  
  886. (* NOTEZ-BIEN:                          31 is reserved for internal use   *)
  887.  
  888. (* the IDCMP Flags do not use this special bit, which is cleared when
  889.  * Intuition sends its special message to the Task, and set when Intuition
  890.  * gets its Message back from the Task.  Therefore, I can check here to
  891.  * find out fast whether or not this Message is available for me to send
  892.  *)
  893.   idcmpLonelyMessage *     = 31;
  894.  
  895.  
  896. (* --- IDCMP Codes -------------------------------------------------------- *)
  897. (* This group of codes is for the idcmpChangeWindow message *)
  898.   cwCodeMoveSize *  = 00000H; (* Window was moved and/or sized *)
  899.   cwCodeDepth *     = 00001H; (* Window was depth-arranged (new for V39) *)
  900.  
  901. (* This group of codes is for the idcmpMenuVerify function *)
  902.   menuHot *         = 0001H;  (* IntuiWants verification or MenuCancel    *)
  903.   menuCancel *      = 0002H;  (* Hot Reply of this cancels Menu operation *)
  904.   menuWaiting *     = 0003H;  (* Intuition simply wants a ReplyMsg() ASAP *)
  905.  
  906. (* These are internal tokens to represent state of verification attempts
  907.  * shown here as a clue.
  908.  *)
  909.   okOk *            = menuHot; (* guy didn't care                      *)
  910.   okAbort *         = 0004H;  (* window rendered question moot        *)
  911.   okCancel *        = menuCancel; (* window sent cancel reply          *)
  912.  
  913. (* This group of codes is for the idcmpWBenchMessage messages *)
  914.   wbenchOpen *      = 0001H;
  915.   wbenchClose *     = 0002H;
  916.  
  917. TYPE
  918.  
  919. (* A data structure common in V36 Intuition processing  *)
  920.  
  921.   IBox * = RECORD
  922.     left *   : INTEGER;
  923.     top *    : INTEGER;
  924.     width *  : INTEGER;
  925.     height * : INTEGER;
  926.   END; (* IBox *)
  927.  
  928. (* ======================================================================== *)
  929. (* === Window ============================================================= *)
  930. (* ======================================================================== *)
  931.  
  932. TYPE
  933.  
  934.   Window * = RECORD
  935.     nextWindow *   : WindowPtr;        (* for the linked list in a screen *)
  936.  
  937.     leftEdge *, topEdge * : INTEGER;   (* screen dimensions of window *)
  938.     width *, height * : INTEGER;       (* screen dimensions of window *)
  939.  
  940.     mouseY *, mouseX * : INTEGER;      (* relative to upper-left of window *)
  941.  
  942.     minWidth *, minHeight * : INTEGER; (* minimum sizes *)
  943.     maxWidth *, maxHeight * : E.UWORD; (* maximum sizes *)
  944.  
  945.     flags *        : SET;              (* see below for defines *)
  946.  
  947.     menuStrip *    : MenuPtr;          (* the strip of Menu headers *)
  948.  
  949.     title *        : E.STRPTR;         (* the title text for this window *)
  950.  
  951.     firstRequest * : RequesterPtr;     (* all active Requesters *)
  952.  
  953.     dmRequest *    : RequesterPtr;     (* double-click Requester *)
  954.  
  955.     reqCount *     : INTEGER;          (* count of reqs blocking Window *)
  956.  
  957.     wScreen *      : ScreenPtr;        (* this Window's Screen *)
  958.     rPort *        : G.RastPortPtr;    (* this Window's very own G.RastPort *)
  959.  
  960.     (* the border variables describe the window border.  If you specify
  961.      * wflgGIMMEZEROZERO when you open the window, then the upper-left of
  962.      * the ClipRect for this window will be upper-left of the G.BitMap (with
  963.      * correct offsets when in SuperBitMap mode; you MUST select
  964.      * wflgGIMMEZEROZERO when using SuperBitMap).  If you don't specify
  965.      * ZeroZero, then you save memory (no allocation of RastPort, Layer,
  966.      * ClipRect and associated Bitmaps), but you also must offset all your
  967.      * writes by BorderTop, BorderLeft and do your own mini-clipping to
  968.      * prevent writing over the system gadgets
  969.      *)
  970.     borderLeft *, borderTop *, borderRight *, borderBottom * : SHORTINT;
  971.     borderRPort *  : G.RastPortPtr;
  972.  
  973.  
  974.     (* You supply a linked-list of Gadgets for your Window.
  975.      * This list DOES NOT include system gadgets.  You get the standard
  976.      * window system gadgets by setting flag-bits in the variable Flags (see
  977.      * the bit definitions below)
  978.      *)
  979.     firstGadget *  : GadgetPtr;
  980.  
  981.     (* these are for opening/closing the windows *)
  982.     parent *, descendant * : WindowPtr;
  983.  
  984.     (* sprite data information for your own Pointer
  985.      * set these AFTER you Open the Window by calling SetPointer()
  986.      *)
  987.     pointer *      : E.APTR;           (* sprite data *)
  988.     ptrHeight *    : SHORTINT;         (* sprite height (not including sprite padding) *)
  989.     ptrWidth *     : SHORTINT;         (* sprite width (must be less than or equal to 16) *)
  990.     xOffset *, yOffset * : SHORTINT;   (* sprite offsets *)
  991.  
  992.     (* the IDCMP Flags and User's and Intuition's Message Ports *)
  993.     idcmpFlags *   : SET;              (* User-selected flags *)
  994.     userPort *, windowPort * : E.MsgPortPtr;
  995.     messageKey *   : IntuiMessagePtr;
  996.  
  997.     detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
  998.  
  999.     (* the CheckMark is a pointer to the imagery that will be used when
  1000.      * rendering MenuItems of this Window that want to be checkmarked
  1001.      * if this is equal to NULL, you'll get the default imagery
  1002.      *)
  1003.     checkMark *    : ImagePtr;
  1004.  
  1005.     screenTitle *  : E.STRPTR;         (* if non-null, Screen title when Window is active *)
  1006.  
  1007.     (* These variables have the mouse coordinates relative to the
  1008.      * inner-Window of wflgGIMMEZEROZERO Windows.  This is compared with the
  1009.      * MouseX and MouseY variables, which contain the mouse coordinates
  1010.      * relative to the upper-left corner of the Window, wflgGIMMEZEROZERO
  1011.      * notwithstanding
  1012.      *)
  1013.     gzzMouseX *    : INTEGER;
  1014.     gzzMouseY *    : INTEGER;
  1015.     (* these variables contain the width and height of the inner-Window of
  1016.      * wflgGIMMEZEROZERO Windows
  1017.      *)
  1018.     gzzWidth *     : INTEGER;
  1019.     gzzHeight *    : INTEGER;
  1020.  
  1021.     extData *      : E.APTR;
  1022.  
  1023.     userData *     : E.APTR;           (* general-purpose pointer to User data extension *)
  1024.  
  1025.     (** 11/18/85: this pointer keeps a duplicate of what
  1026.      * Window.RPort->Layer is supposed to be pointing at
  1027.      *)
  1028.     wLayer *       : G.LayerPtr;
  1029.  
  1030.     (* NEW 1.2: need to keep track of the font that
  1031.      * OpenWindow opened, in case user SetFont's into RastPort
  1032.      *)
  1033.     iFont *        : G.TextFontPtr;
  1034.  
  1035.     (* (V36) another flag word (the Flags field is used up).
  1036.      * At present, all flag values are system private.
  1037.      * Until further notice, you may not change nor use this field.
  1038.      *)
  1039.     moreFlags      : SET;
  1040.  
  1041.     (**** Data beyond this point are Intuition Private.  DO NOT USE ****)
  1042.   END; (* Window *)
  1043.  
  1044.  
  1045. CONST
  1046.  
  1047. (* --- Flags requested at OpenWindow() time by the application --------- *)
  1048.   wflgSizeGadget *     = 0;  (* include sizing system-gadget? *)
  1049.   wflgDragBar *        = 1;  (* include dragging system-gadget? *)
  1050.   wflgDepthGadget *    = 2;  (* include depth arrangement gadget? *)
  1051.   wflgCloseGadget *    = 3;  (* include close-box system-gadget? *)
  1052.  
  1053.   wflgSizeBRight *     = 4;  (* size gadget uses right border *)
  1054.   wflgSizeBBottom *    = 5;  (* size gadget uses bottom border *)
  1055.  
  1056. (* --- refresh modes ------------------------------------------------------ *)
  1057. (* combinations of the refreshBits select the refresh type *)
  1058.   wflgRefreshBits *   = {6,7};
  1059.   wflgSmartRefresh *  = {};
  1060.   wflgSimpleRefresh * = 6;
  1061.   wflgSuperBitmap *   = 7;
  1062.   wflgOtherRefresh *  = {6,7};
  1063.  
  1064.   wflgBackdrop *      = 8;   (* this is a backdrop window *)
  1065.  
  1066.   wflgReportMouse *   = 9;   (* to hear about every mouse move *)
  1067.  
  1068.   wflgGimmeZeroZero * = 10;  (* a GimmeZeroZero window       *)
  1069.  
  1070.   wflgBorderless *    = 11;  (* to get a Window sans border *)
  1071.  
  1072.   wflgActivate *      = 12;  (* when Window opens, it's Active *)
  1073.  
  1074.  
  1075. (* --- Other User Flags --------------------------------------------------- *)
  1076.   wflgRMBTrap *        = 16;  (* Catch RMB events for your own *)
  1077.   wflgNoCareRefresh *  = 17;  (* not to be bothered with REFRESH *)
  1078.  
  1079. (* - V36 new Flags which the programmer may specify in NewWindow.Flags  *)
  1080.   wflgNwExtended *     = 18;  (* extension data provided      *)
  1081.                               (* see struct ExtNewWindow      *)
  1082.  
  1083. (* - V39 new Flags which the programmer may specify in NewWindow.Flags  *)
  1084.   wflgNewLookMenus *   = 21;  (* window has NewLook menus     *)
  1085.  
  1086.  
  1087. (* These flags are set only by Intuition.  YOU MAY NOT SET THEM YOURSELF! *)
  1088.   wflgWindowActive *   = 13;  (* this window is the active one *)
  1089.   wflgInRequest *      = 14;  (* this window is in request mode *)
  1090.   wflgMenuState *      = 15;  (* Window is active with Menus on *)
  1091.   wflgWindowRefresh *  = 24;  (* Window is currently refreshing *)
  1092.   wflgWbenchWindow *   = 25;  (* WorkBench tool ONLY Window *)
  1093.   wflgWindowTicked *   = 26;  (* only one timer tick at a time *)
  1094.  
  1095. (* V36 and higher flags to be set only by Intuition: *)
  1096.   wflgVisitor *        = 27;  (* visitor window               *)
  1097.   wflgZoomed *         = 28;  (* identifies "zoom state"      *)
  1098.   wflgHasZoom *        = 29;  (* windowhas a zoom gadget      *)
  1099.  
  1100.  
  1101. (* --- Other Window Values ---------------------------------------------- *)
  1102.   defaultMouseQueue *       = 5;     (* no more mouse messages       *)
  1103.  
  1104. (* --- see struct IntuiMessage for the IDCMP Flag definitions ------------- *)
  1105.  
  1106. (* ======================================================================== *)
  1107. (* === NewWindow ========================================================== *)
  1108. (* ======================================================================== *)
  1109. (*
  1110.  * Note that the new extension fields have been removed.  Use ExtNewWindow
  1111.  * structure below to make use of these fields
  1112.  *)
  1113.  
  1114. TYPE
  1115.  
  1116.   NewWindow * = RECORD
  1117.     leftEdge *, topEdge * : INTEGER;   (* screen dimensions of window *)
  1118.     width *, height * : INTEGER;       (* screen dimensions of window *)
  1119.  
  1120.     detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
  1121.  
  1122.     idcmpFlags *   : SET;              (* User-selected IDCMP flags *)
  1123.  
  1124.     flags *        : SET;              (* see Window struct for defines *)
  1125.  
  1126.     (* You supply a linked-list of Gadgets for your Window.
  1127.      *  This list DOES NOT include system Gadgets.  You get the standard
  1128.      *  system Window Gadgets by setting flag-bits in the variable Flags (see
  1129.      *  the bit definitions under the Window structure definition)
  1130.      *)
  1131.     firstGadget *  : GadgetPtr;
  1132.  
  1133.     (* the CheckMark is a pointer to the imagery that will be used when
  1134.      * rendering MenuItems of this Window that want to be checkmarked
  1135.      * if this is equal to NULL, you'll get the default imagery
  1136.      *)
  1137.     checkMark *    : ImagePtr;
  1138.  
  1139.     title *        : E.STRPTR;         (* the title text for this window *)
  1140.  
  1141.     (* the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1142.      * want this Window to open in it.  If so, you pass the address of the
  1143.      * Custom Screen structure in this variable.  Otherwise, this variable
  1144.      * is ignored and doesn't have to be initialized.
  1145.      *)
  1146.     screen *       : ScreenPtr;
  1147.  
  1148.     (* wflgSuperBITMAP Window?  If so, put the address of your G.BitMap
  1149.      * structure in this variable.  If not, this variable is ignored and
  1150.      * doesn't have to be initialized
  1151.      *)
  1152.     bitMap *       : G.BitMapPtr;
  1153.  
  1154.     (* the values describe the minimum and maximum sizes of your Windows.
  1155.      * these matter only if you've chosen the wflgSIZEGADGET option,
  1156.      * which means that you want to let the User to change the size of
  1157.      * this Window.  You describe the minimum and maximum sizes that the
  1158.      * Window can grow by setting these variables.  You can initialize
  1159.      * any one these to zero, which will mean that you want to duplicate
  1160.      * the setting for that dimension (if MinWidth == 0, MinWidth will be
  1161.      * set to the opening Width of the Window).
  1162.      * You can change these settings later using SetWindowLimits().
  1163.      * If you haven't asked for a SIZING Gadget, you don't have to
  1164.      * initialize any of these variables.
  1165.      *)
  1166.     minWidth *, minHeight * : INTEGER; (* minimums *)
  1167.     maxWidth *, maxHeight * : E.UWORD; (* maximums *)
  1168.  
  1169.     (* the type variable describes the Screen in which you want this Window to
  1170.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1171.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1172.      * type definitions under the Screen structure.
  1173.      *)
  1174.     type *         : E.WSET;
  1175.  
  1176.   END; (* NewWindow *)
  1177.  
  1178. (* The following structure is the future NewWindow.  Compatibility
  1179.  * issues require that the size of NewWindow not change.
  1180.  * Data in the common part (NewWindow) indicates the the extension
  1181.  * fields are being used.
  1182.  * NOTE WELL: This structure may be subject to future extension.
  1183.  * Writing code depending on its size is not allowed.
  1184.  *)
  1185.  
  1186.   ExtNewWindow * = RECORD (NewWindow)
  1187.  
  1188.     (* ------------------------------------------------------- *
  1189.      * extensions for V36
  1190.      * if the NewWindow Flag value wflgNwEXTENDED is set, then
  1191.      * this field is assumed to point to an array ( or chain of arrays)
  1192.      * of TagItem structures.  See also ExtNewScreen for another
  1193.      * use of TagItems to pass optional data.
  1194.      *
  1195.      * see below for tag values and the corresponding data.
  1196.      *)
  1197.     extension * : U.TagListPtr;
  1198.   END; (* ExtNewWindow *)
  1199.  
  1200. CONST
  1201.  
  1202. (*
  1203.  * The TagItem ID's (tiTag values) for OpenWindowTagList() follow.
  1204.  * They are values in a TagItem array passed as extension/replacement
  1205.  * values for the data in NewWindow.  OpenWindowTagList() can actually
  1206.  * work well with a NULL NewWindow pointer.
  1207.  *)
  1208.  
  1209.   waDummy *        = U.tagUser + 99; (* 80000063H   *)
  1210.  
  1211. (* these tags simply override NewWindow parameters *)
  1212.   waLeft *                 = waDummy + 01H;
  1213.   waTop *                  = waDummy + 02H;
  1214.   waWidth *                = waDummy + 03H;
  1215.   waHeight *               = waDummy + 04H;
  1216.   waDetailPen *            = waDummy + 05H;
  1217.   waBlockPen *             = waDummy + 06H;
  1218.   waIDCMP *                = waDummy + 07H;
  1219.                         (* "bulk" initialization of NewWindow.Flags *)
  1220.   waFlags *                = waDummy + 08H;
  1221.   waGadgets *              = waDummy + 09H;
  1222.   waCheckmark *            = waDummy + 0AH;
  1223.   waTitle *                = waDummy + 0BH;
  1224.                         (* means you don't have to call SetWindowTitles
  1225.                          * after you open your window
  1226.                          *)
  1227.   waScreenTitle *          = waDummy + 0CH;
  1228.   waCustomScreen *         = waDummy + 0DH;
  1229.   waSuperBitMap *          = waDummy + 0EH;
  1230.                         (* also implies wflgSuperBITMAP property      *)
  1231.   waMinWidth *             = waDummy + 0FH;
  1232.   waMinHeight *            = waDummy + 10H;
  1233.   waMaxWidth *             = waDummy + 11H;
  1234.   waMaxHeight *            = waDummy + 12H;
  1235.  
  1236. (* The following are specifications for new features    *)
  1237.  
  1238.   waInnerWidth *           = waDummy + 13H;
  1239.   waInnerHeight *          = waDummy + 14H;
  1240.                         (* You can specify the dimensions of the interior
  1241.                          * region of your window, independent of what
  1242.                          * the border widths will be.  You probably want
  1243.                          * to also specify waAutoAdjust to allow
  1244.                          * Intuition to move your window or even
  1245.                          * shrink it so that it is completely on screen.
  1246.                          *)
  1247.  
  1248.   waPubScreenName *        = waDummy + 15H;
  1249.                         (* declares that you want the window to open as
  1250.                          * a visitor on the public screen whose name is
  1251.                          * pointed to by (E.UBYTE * ) tiData
  1252.                          *)
  1253.   waPubScreen *            = waDummy + 16H;
  1254.                         (* open as a visitor window on the public screen
  1255.                          * whose address is in (struct Screen * ) tiData.
  1256.                          * To ensure that this screen remains open, you
  1257.                          * should either be the screen's owner, have a
  1258.                          * window open on the screen, or use LockPubScreen().
  1259.                          *)
  1260.   waPubScreenFallBack *    = waDummy + 17H;
  1261.                         (* A Boolean, specifies whether a visitor window
  1262.                          * should "fall back" to the default public screen
  1263.                          * (or Workbench) if the named public screen isn't
  1264.                          * available
  1265.                          *)
  1266.   waWindowName *           = waDummy + 18H;
  1267.                         (* not implemented      *)
  1268.   waColors *               = waDummy + 19H;
  1269.                         (* a ColorSpec array for colors to be set
  1270.                          * when this window is active.  This is not
  1271.                          * implemented, and may not be, since the default
  1272.                          * values to restore would be hard to track.
  1273.                          * We'd like to at least support per-window colors
  1274.                          * for the mouse pointer sprite.
  1275.                          *)
  1276.   waZoom *         = waDummy + 1AH;
  1277.                         (* tiData points to an array of four INTEGER's,
  1278.                          * the initial Left/Top/Width/Height values of
  1279.                          * the "alternate" zoom position/dimensions.
  1280.                          * It also specifies that you want a Zoom gadget
  1281.                          * for your window, whether or not you have a
  1282.                          * sizing gadget.
  1283.                          *)
  1284.   waMouseQueue *           = waDummy + 1BH;
  1285.                         (* tiData contains initial value for the mouse
  1286.                          * message backlog limit for this window.
  1287.                          *)
  1288.   waBackFill *             = waDummy + 1CH;
  1289.                         (* unimplemented at present: provides a "backfill
  1290.                          * hook" for your window's layer.
  1291.                          *)
  1292.   waRptQueue *             = waDummy + 1DH;
  1293.                         (* initial value of repeat key backlog limit    *)
  1294.  
  1295.     (* These Boolean tag items are alternatives to the NewWindow.Flags
  1296.      * boolean flags with similar names.
  1297.      *)
  1298.   waSizeGadget *           = waDummy + 1EH;
  1299.   waDragBar *              = waDummy + 1FH;
  1300.   waDepthGadget *          = waDummy + 20H;
  1301.   waCloseGadget *          = waDummy + 21H;
  1302.   waBackdrop *             = waDummy + 22H;
  1303.   waReportMouse *          = waDummy + 23H;
  1304.   waNoCareRefresh *        = waDummy + 24H;
  1305.   waBorderless *           = waDummy + 25H;
  1306.   waActivate *             = waDummy + 26H;
  1307.   waRMBTrap *              = waDummy + 27H;
  1308.   waWBenchWindow  *        = waDummy + 28H;       (* PRIVATE!! *)
  1309.   waSimpleRefresh *        = waDummy + 29H;
  1310.                         (* only specify if TRUE *)
  1311.   waSmartRefresh *         = waDummy + 2AH;
  1312.                         (* only specify if TRUE *)
  1313.   waSizeBRight *           = waDummy + 2BH;
  1314.   waSizeBBottom *          = waDummy + 2CH;
  1315.  
  1316.     (* New Boolean properties   *)
  1317.   waAutoAdjust *           = waDummy + 2DH;
  1318.                         (* shift or squeeze the window's position and
  1319.                          * dimensions to fit it on screen.
  1320.                          *)
  1321.  
  1322.   waGimmeZeroZero *        = waDummy + 2EH;
  1323.                         (* equiv. to NewWindow.Flags wflgGIMMEZEROZERO *)
  1324.  
  1325. (* New for V37: waMenuHelp (ignored by V36) *)
  1326.   waMenuHelp *             = waDummy + 2FH;
  1327.                         (* Enables idcmpMENUHELP:  Pressing HELP during menus
  1328.                          * will return idcmpMENUHELP message.
  1329.                          *)
  1330.  
  1331. (* New for V39:  (ignored by V37 and earlier) *)
  1332.   waNewLookMenus * = waDummy + 30H;
  1333.                         (* Set to TRUE if you want NewLook menus *)
  1334.   waAmigaKey * = waDummy + 31H;
  1335.                         (* Pointer to image for Amiga-key equiv in menus *)
  1336.   waNotifyDepth * = waDummy + 32H;
  1337.                         (* Requests idcmpChangeWindow message when
  1338.                          * window is depth arranged
  1339.                          * (imsg->Code = cwCodeDepth)
  1340.                          *)
  1341.  
  1342. (* waDummy + 33H is obsolete *)
  1343.  
  1344.   waPointer * = waDummy + 34H;
  1345.                         (* Allows you to specify a custom pointer
  1346.                          * for your window.  ti_Data points to a
  1347.                          * pointer object you obtained via
  1348.                          * "pointerclass". NULL signifies the
  1349.                          * default pointer.
  1350.                          * This tag may be passed to OpenWindowTags()
  1351.                          * or SetWindowPointer().
  1352.                          *)
  1353.  
  1354.   waBusyPointer * = waDummy + 35H;
  1355.                         (* ti_Data is boolean.  Set to TRUE to
  1356.                          * request the standard busy pointer.
  1357.                          * This tag may be passed to OpenWindowTags()
  1358.                          * or SetWindowPointer().
  1359.                          *)
  1360.  
  1361.   waPointerDelay * = waDummy + 36H;
  1362.                         (* ti_Data is boolean.  Set to TRUE to
  1363.                          * request that the changing of the
  1364.                          * pointer be slightly delayed.  The change
  1365.                          * will be called off if you call NewSetPointer()
  1366.                          * before the delay expires.  This allows
  1367.                          * you to post a busy-pointer even if you think
  1368.                          * the busy-time may be very short, without
  1369.                          * fear of a flashing pointer.
  1370.                          * This tag may be passed to OpenWindowTags()
  1371.                          * or SetWindowPointer().
  1372.                          *)
  1373.  
  1374.   waTabletMessages * = waDummy + 37H;
  1375.                         (* ti_Data is a boolean.  Set to TRUE to
  1376.                          * request that tablet information be included
  1377.                          * in IntuiMessages sent to your window.
  1378.                          * Requires that something (i.e. a tablet driver)
  1379.                          * feed IE.subClassNewTablet InputEvents into
  1380.                          * the system.  For a pointer to the TabletData,
  1381.                          * examine the ExtIntuiMessage.tabletData
  1382.                          * field.  It is UNSAFE to check this field
  1383.                          * when running on pre-V39 systems.  It's always
  1384.                          * safe to check this field under V39 and up,
  1385.                          * though it may be NULL.
  1386.                          *)
  1387.  
  1388.   waHelpGroup * = waDummy + 38H;
  1389.                         (* When the active window has gadget help enabled,
  1390.                          * other windows of the same HelpGroup number
  1391.                          * will also get GadgetHelp.  This allows GadgetHelp
  1392.                          * to work for multi-windowed applications.
  1393.                          * Use GetGroupID() to get an ID number.  Pass
  1394.                          * this number as ti_Data to all your windows.
  1395.                          * See also the HelpControl() function.
  1396.                          *)
  1397.  
  1398.   waHelpGroupWindow * = waDummy + 39H;
  1399.                         (* When the active window has gadget help enabled,
  1400.                          * other windows of the same HelpGroup will also get
  1401.                          * GadgetHelp.  This allows GadgetHelp to work
  1402.                          * for multi-windowed applications.  As an alternative
  1403.                          * to WA_HelpGroup, you can pass a pointer to any
  1404.                          * other window of the same group to join its help
  1405.                          * group.  Defaults to NULL, which has no effect.
  1406.                          * See also the HelpControl() function.
  1407.                          *)
  1408.  
  1409.  
  1410. (* HelpControl() flags:
  1411.  *
  1412.  * hcGadgetHelp - Set this flag to enable Gadget-Help for one or more
  1413.  * windows.
  1414.  *)
  1415.  
  1416.   hcGadgetHelp * = 1;
  1417.  
  1418. (*
  1419. **  $VER: screens.h 38.25 (15.2.93)
  1420. **
  1421. **  The Screen and NewScreen structures and attributes
  1422. *)
  1423.  
  1424.  
  1425. (* ======================================================================== *)
  1426. (* === DrawInfo ========================================================= *)
  1427. (* ======================================================================== *)
  1428.  
  1429. (* This is a packet of information for graphics rendering.  It originates
  1430.  * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  1431.  *)
  1432.  
  1433. CONST
  1434.  
  1435. (* You can use the Intuition version number to tell which fields are
  1436.  * present in this structure.
  1437.  *
  1438.  * driVersion of 1 corresponds to V37 release.
  1439.  * driVersion of 2 corresponds to V39, and includes three new pens
  1440.  *      and the checkMark and amigaKey fields.
  1441.  *
  1442.  * Note that sometimes applications need to create their own DrawInfo
  1443.  * structures, in which case the driVersion won't correspond exactly
  1444.  * to the OS version!!!
  1445.  *)
  1446.   driVersion *     = 2;
  1447.  
  1448. TYPE
  1449.  
  1450.   DrawInfo * = RECORD
  1451.     version *      : E.UWORD;        (* will be  driVersion                 *)
  1452.     numPens *      : E.UWORD;        (* guaranteed to be >= numDrIPens       *)
  1453.     pens *         : DRIPenArrayPtr; (* pointer to pen array                 *)
  1454.  
  1455.     font *         : G.TextFontPtr;  (* screen default font          *)
  1456.     depth *        : E.UWORD;        (* (initial) depth of screen bitmap     *)
  1457.  
  1458.     resolution *   : G.Point;        (* from DisplayInfo database for initial display mode *)
  1459.  
  1460.     flags *        : SET;            (* defined below                *)
  1461. (* New for V39: checkMark, amigaKey. *)
  1462.     checkMark *    : ImagePtr;       (* pointer to scaled checkmark image
  1463.                                       * Will be NULL if DRI_VERSION < 2
  1464.                                       *)
  1465.     amigaKey *     : ImagePtr;       (* pointer to scaled Amiga-key image
  1466.                                       * Will be NULL if DRI_VERSION < 2
  1467.                                       *)
  1468.     reserved *     : ARRAY 5 OF E.ULONG; (* avoid recompilation ;^)      *)
  1469.   END; (* DrawInfo *)
  1470.  
  1471. CONST
  1472.  
  1473.   driNewLook *    = 0;      (* specified saPens, full treatment *)
  1474.  
  1475. (* rendering pen number indexes into DrawInfo.driPens[]        *)
  1476.   detailPen *        = 0;       (* compatible Intuition rendering pens  *)
  1477.   blockPen *         = 1;       (* compatible Intuition rendering pens  *)
  1478.   textPen *          = 2;       (* text on background                   *)
  1479.   shinePen *         = 3;       (* bright edge on 3D objects            *)
  1480.   shadowPen *        = 4;       (* dark edge on 3D objects              *)
  1481.   fillPen *          = 5;       (* active-window/selected-gadget fill   *)
  1482.   fillTextPen *      = 6;       (* text over FILLPEN                    *)
  1483.   backGroundPen *    = 7;       (* always color 0                       *)
  1484.   highlightTextPen * = 8;       (* special color text, on background    *)
  1485. (* New for V39, only present if driVersion >= 2: *)
  1486.   barDetailPen *     = 9;       (* text/detail in screen-bar/menus *)
  1487.   barBlockPen *      = 10;      (* screen-bar/menus fill *)
  1488.   barTrimPen *       = 11;      (* trim under screen-bar *)
  1489.  
  1490.   numDRIPens *       = 9;
  1491.  
  1492.  
  1493. (* New for V39:  It is sometimes useful to specify that a pen value
  1494.  * is to be the complement of color zero to three.  The "magic" numbers
  1495.  * serve that purpose:
  1496.  *)
  1497.   penC3 * = 0FEFCH;                     (* Complement of color 3 *)
  1498.   penC2 * = 0FEFDH;                     (* Complement of color 2 *)
  1499.   penC1 * = 0FEFEH;                     (* Complement of color 1 *)
  1500.   penC0 * = 0FEFFH;                     (* Complement of color 0 *)
  1501.  
  1502. TYPE
  1503.  
  1504.   DRIPenArray * = ARRAY numDRIPens OF E.UWORD;
  1505.  
  1506. (* ======================================================================== *)
  1507. (* === Screen ============================================================= *)
  1508. (* ======================================================================== *)
  1509.  
  1510. (* VERY IMPORTANT NOTE ABOUT Screen->BitMap.  In the future, bitmaps
  1511.  * will need to grow.  The embedded instance of a bitmap in the screen
  1512.  * will no longer be large enough to hold the whole description of
  1513.  * the bitmap.
  1514.  *
  1515.  * YOU ARE STRONGLY URGED to use Screen.rastPort.bitMap in place of
  1516.  * SYS.ADR (Screen.bitMap) whenever and whereever possible.
  1517.  *)
  1518.  
  1519. TYPE
  1520.  
  1521.   Screen * = RECORD
  1522.     nextScreen *   : ScreenPtr;        (* linked list of screens *)
  1523.     firstWindow *  : WindowPtr;        (* linked list Screen's Windows *)
  1524.  
  1525.     leftEdge *, topEdge * : INTEGER;   (* parameters of the screen *)
  1526.     width *, height * : INTEGER;       (* parameters of the screen *)
  1527.  
  1528.     mouseY *, mouseX * : INTEGER;      (* position relative to upper-left *)
  1529.  
  1530.     flags *        : E.WSET;           (* see definitions below *)
  1531.  
  1532.     title *        : E.STRPTR;         (* null-terminated Title text *)
  1533.     defaultTitle * : E.STRPTR;         (* for Windows without ScreenTitle *)
  1534.  
  1535.     (* Bar sizes for this Screen and all Window's in this Screen *)
  1536.     (* Note that BarHeight is one less than the actual menu bar
  1537.      * height.  We're going to keep this in V36 for compatibility,
  1538.      * although V36 artwork might use that extra pixel
  1539.      *
  1540.      * Also, the title bar height of a window is calculated from the
  1541.      * screen's WBorTop field, plus the font height, plus one.
  1542.      *)
  1543.     barHeight *,
  1544.     barVBorder *, barHBorder *,
  1545.     menuVBorder *, menuHBorder * : SHORTINT;
  1546.     wBorTop *, wBorLeft *, wBorRight *, wBorBottom * : SHORTINT;
  1547.  
  1548.     font *         : G.TextAttrPtr;    (* this screen's default font      *)
  1549.  
  1550.     (* the display data structures for this Screen *)
  1551.     viewPort *     : G.ViewPort;       (* describing the Screen's display *)
  1552.     rastPort *     : G.RastPort;       (* describing Screen rendering     *)
  1553.     bitMap *       : G.BitMap;         (* extra copy of RastPort G.BitMap   *)
  1554.     layerInfo *    : G.LayerInfo;      (* each screen gets a LayerInfo    *)
  1555.  
  1556.     (* Only system gadgets may be attached to a screen.
  1557.      *  You get the standard system Screen Gadgets automatically
  1558.      *)
  1559.     firstGadget *  : GadgetPtr;
  1560.  
  1561.     detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
  1562.  
  1563.     (* the following variable(s) are maintained by Intuition to support the
  1564.      * DisplayBeep() color flashing technique
  1565.      *)
  1566.     saveColor0 *   : E.UWORD;
  1567.  
  1568.     (* This layer is for the Screen and Menu bars *)
  1569.     barLayer *     : G.LayerPtr;
  1570.  
  1571.     extData *      : E.APTR;
  1572.  
  1573.     userData *     : E.APTR;           (* general-purpose pointer to User data extension *)
  1574.  
  1575.     (**** Data below this point are SYSTEM PRIVATE ****)
  1576.   END; (* Screen *)
  1577.  
  1578.  
  1579. CONST
  1580.  
  1581. (* --- FLAGS SET BY INTUITION --------------------------------------------- *)
  1582. (* The SCREENTYPE bits are reserved for describing various Screen types
  1583.  * available under Intuition.
  1584.  *)
  1585.   screenType *      = {0..3};  (* all the screens types available      *)
  1586. (* --- the definitions for the Screen Type ------------------------------- *)
  1587.   wbenchScreen *    = 0;  (* identifies the Workbench screen      *)
  1588.   publicScreen *    = 1;  (* public shared (custom) screen        *)
  1589.   customScreen *    = {0..3};  (* original custom screens              *)
  1590.  
  1591.   showTitle *       = 4;  (* this gets set by a call to ShowTitle() *)
  1592.  
  1593.   beeping *         = 5;  (* set when Screen is beeping (private) *)
  1594.  
  1595.   customBitmap *    = 6;  (* if you are supplying your own G.BitMap *)
  1596.  
  1597.   screenBehind *    = 7;  (* if you want your screen to open behind
  1598.                            * already open screens
  1599.                            *)
  1600.   screenQuiet * = 8;      (* if you do not want Intuition to render
  1601.                            * into your screen (gadgets, title)
  1602.                            *)
  1603.   screenHires *     = 9;  (* do not use lowres gadgets  (private) *)
  1604.  
  1605.   nsExtended *     = 12;  (* ExtNewScreen.Extension is valid      *)
  1606. (* V36 applications can use OpenScreenTagList() instead of nsEXTENDED  *)
  1607.  
  1608.   autoScroll *      = 14; (* screen is to autoscoll               *)
  1609.  
  1610. (* New for V39: *)
  1611.   penShared *       = 10; (* Screen opener set {saSharePens,TRUE} *)
  1612.  
  1613.   stdScreenHeight * = -1;      (* supply in NewScreen.Height           *)
  1614.   stdScreenWidth *  = -1;      (* supply in NewScreen.Width            *)
  1615.  
  1616. (*
  1617.  * Screen attribute tag ID's.  These are used in the tiTag field of
  1618.  * TagItem arrays passed to OpenScreenTagList() (or in the
  1619.  * ExtNewScreen.Extension field).
  1620.  *)
  1621.  
  1622. (* Screen attribute tags.  Please use these versions, not those in
  1623.  * iobsolete.h.
  1624.  *)
  1625.  
  1626.   saDummy *        = U.tagUser + 32;
  1627. (*
  1628.  * these items specify items equivalent to fields in NewScreen
  1629.  *)
  1630.   saLeft *         = saDummy + 0001H;
  1631.   saTop *          = saDummy + 0002H;
  1632.   saWidth *        = saDummy + 0003H;
  1633.   saHeight *       = saDummy + 0004H;
  1634.                      (* traditional screen positions and dimensions  *)
  1635.   saDepth *        = saDummy + 0005H;
  1636.                      (* screen bitmap depth                          *)
  1637.   saDetailPen *    = saDummy + 0006H;
  1638.                      (* serves as default for windows, too           *)
  1639.   saBlockPen *     = saDummy + 0007H;
  1640.   saTitle *        = saDummy + 0008H;
  1641.                      (* default screen title                         *)
  1642.   saColors *       = saDummy + 0009H;
  1643.                      (* tiData is an array of struct ColorSpec,
  1644.                       * terminated by ColorIndex * = -1.  Specifies
  1645.                       * initial screen palette colors.
  1646.                       *)
  1647.   saErrorCode *    = saDummy + 000AH;
  1648.                      (* data points to LONGINT error code (values below)*)
  1649.   saFont *         = saDummy + 000BH;
  1650.                      (* equiv. to NewScreen.Font                     *)
  1651.   saSysFont *      = saDummy + 000CH;
  1652.                      (* Selects one of the preferences system fonts:
  1653.                       *      0 - old DefaultFont, fixed-width
  1654.                       *      1 - WB Screen preferred font
  1655.                       *)
  1656.   saType *         = saDummy + 000DH;
  1657.                      (* data is publicScreen or customScreen.  For other
  1658.                       * fields of NewScreen.type, see individual tags,
  1659.                       * eg. saBehind, saQuiet.
  1660.                       *)
  1661.   saBitMap *       = saDummy + 000EH;
  1662.                      (* tiData is pointer to custom G.BitMap.  This
  1663.                       * implies type of customBitmap
  1664.                       *)
  1665.   saPubName *      = saDummy + 000FH;
  1666.                      (* presence of this tag means that the screen
  1667.                       * is to be a public screen.  Please specify
  1668.                       * BEFORE the two tags below
  1669.                       *)
  1670.   saPubSig *       = saDummy + 0010H;
  1671.   saPubTask *      = saDummy + 0011H;
  1672.                      (* Task ID and signal for being notified that
  1673.                       * the last window has closed on a public screen.
  1674.                       *)
  1675.   saDisplayID *    = saDummy + 0012H;
  1676.                      (* data is new extended display ID from
  1677.                       * <graphics/displayinfo.h> (V37) or from
  1678.                       * <graphics/modeid.h> (V39 and up)
  1679.                       *)
  1680.   saDClip *        = saDummy + 0013H;
  1681.                      (* data points to a rectangle which defines
  1682.                       * screen display clip region
  1683.                       *)
  1684.   saOverscan *     = saDummy + 0014H;
  1685.                      (* Set to one of the oscan*
  1686.                       * specifiers below to get a system standard
  1687.                       * overscan region for your display clip,
  1688.                       * screen dimensions (unless otherwise specified),
  1689.                       * and automatically centered position (partial
  1690.                       * support only so far).
  1691.                       * If you use this, you shouldn't specify
  1692.                       * saDClip.  saOverscan is for "standard"
  1693.                       * overscan dimensions, saDClip is for
  1694.                       * your custom numeric specifications.
  1695.                       *)
  1696.   saObsolete1 *    = saDummy + 0015H;
  1697.                      (* obsolete sMonitorName                       *)
  1698.  
  1699. (** booleans **)
  1700.   saShowTitle *    = saDummy + 0016H;
  1701.                      (* boolean equivalent to flag showTitle         *)
  1702.   saBehind *       = saDummy + 0017H;
  1703.                      (* boolean equivalent to flag screenBehind      *)
  1704.   saQuiet *        = saDummy + 0018H;
  1705.                      (* boolean equivalent to flag screenQuiet       *)
  1706.   saAutoScroll *   = saDummy + 0019H;
  1707.                      (* boolean equivalent to flag autoScroll        *)
  1708.   saPens *         = saDummy + 001AH;
  1709.                      (* pointer to ~0 terminated E.UWORD array, as
  1710.                       * found in struct DrawInfo
  1711.                       *)
  1712.   saFullPalette *  = saDummy + 001BH;
  1713.                      (* boolean: initialize color table to entire
  1714.                       * preferences palette (32 for V36), rather
  1715.                       * than compatible pens 0-3, 17-19, with
  1716.                       * remaining palette as returned by GetColorMap()
  1717.                       *)
  1718.  
  1719.   saColorMapEntries * = saDummy + 001CH;
  1720.                      (* New for V39:
  1721.                       * Allows you to override the number of entries
  1722.                       * in the ColorMap for your screen.  Intuition
  1723.                       * normally allocates (1<<depth) or 32, whichever
  1724.                       * is more, but you may require even more if you
  1725.                       * use certain V39 graphics.library features
  1726.                       * (eg. palette-banking).
  1727.                       *)
  1728.  
  1729.   saParent *        = saDummy + 001DH;
  1730.                       (* New for V39:
  1731.                        * ti_Data is a pointer to a "parent" screen to
  1732.                        * attach this one to.  Attached screens slide
  1733.                        * and depth-arrange together.
  1734.                        *)
  1735.  
  1736.   saDraggable *      = saDummy + 001EH;
  1737.                        (* New for V39:
  1738.                         * Boolean tag allowing non-draggable screens.
  1739.                         * Do not use without good reason!
  1740.                         * (Defaults to TRUE).
  1741.                         *)
  1742.  
  1743.   saExclusive *       = saDummy + 001FH;
  1744.                         (* New for V39:
  1745.                          * Boolean tag allowing screens that won't share
  1746.                          * the display.  Use sparingly!  Starting with 3.01,
  1747.                          * attached screens may be SA_Exclusive.  Setting
  1748.                          * SA_Exclusive for each screen will produce an
  1749.                          * exclusive family.   (Defaults to FALSE).
  1750.                          *)
  1751.  
  1752.   saSharePens *        = saDummy + 0020H;
  1753.                          (* New for V39:
  1754.                           * For those pens in the screen's DrawInfo->dri_Pens,
  1755.                           * Intuition obtains them in shared mode (see
  1756.                           * graphics.library/ObtainPen()).  For compatibility,
  1757.                           * Intuition obtains the other pens of a public
  1758.                           * screen as PEN_EXCLUSIVE.  Screens that wish to
  1759.                           * manage the pens themselves should generally set
  1760.                           * this tag to TRUE.  This instructs Intuition to
  1761.                           * leave the other pens unallocated.
  1762.                           *)
  1763.  
  1764.   saBackFill *         = saDummy + 0021H;
  1765.                         (* New for V39:
  1766.                          * provides a "backfill hook" for your screen's
  1767.                          * Layer_Info.
  1768.                          * See layers.library/InstallLayerInfoHook()
  1769.                          *)
  1770.  
  1771.   saInterleaved *      = saDummy + 0022H;
  1772.                         (* New for V39:
  1773.                          * Boolean tag requesting that the bitmap
  1774.                          * allocated for you be interleaved.
  1775.                          * (Defaults to FALSE).
  1776.                          *)
  1777.  
  1778.   saColors32 *         = saDummy + 0023H;
  1779.                         (* New for V39:
  1780.                          * Tag to set the screen's initial palette colors
  1781.                          * at 32 bits-per-gun.  ti_Data is a pointer
  1782.                          * to a table to be passed to the
  1783.                          * graphics.library/LoadRGB32() function.
  1784.                          * This format supports both runs of color
  1785.                          * registers and sparse registers.  See the
  1786.                          * autodoc for that function for full details.
  1787.                          * Any color set here has precedence over
  1788.                          * the same register set by SA_Colors.
  1789.                          *)
  1790.  
  1791.   saVideoControl *     = saDummy + 0024H;
  1792.                         (* New for V39:
  1793.                          * ti_Data is a pointer to a taglist that Intuition
  1794.                          * will pass to graphics.library/VideoControl(),
  1795.                          * upon opening the screen.
  1796.                          *)
  1797.  
  1798.   saFrontChild *       = saDummy + 0025H;
  1799.                         (* New for V39:
  1800.                          * ti_Data is a pointer to an already open screen
  1801.                          * that is to be the child of the screen being
  1802.                          * opened.  The child screen will be moved to the
  1803.                          * front of its family.
  1804.                          *)
  1805.  
  1806.   saBackChild *        = saDummy + 0026H;
  1807.                         (* New for V39:
  1808.                          * ti_Data is a pointer to an already open screen
  1809.                          * that is to be the child of the screen being
  1810.                          * opened.  The child screen will be moved to the
  1811.                          * back of its family.
  1812.                          *)
  1813.  
  1814.   saLikeWorkbench *    = saDummy + 0027H;
  1815.                         (* New for V39:
  1816.                          * Set ti_Data to 1 to request a screen which
  1817.                          * is just like the Workbench.  This gives
  1818.                          * you the same screen mode, depth, size,
  1819.                          * colors, etc., as the Workbench screen.
  1820.                          *)
  1821.  
  1822.   saReserved *         = saDummy + 0028H;
  1823.                         (* Reserved for private Intuition use *)
  1824.  
  1825.   saMinimizeISG *      = saDummy + 0029H;
  1826.                         (* New for V40:
  1827.                          * For compatibility, Intuition always ensures
  1828.                          * that the inter-screen gap is at least three
  1829.                          * non-interlaced lines.  If your application
  1830.                          * would look best with the smallest possible
  1831.                          * inter-screen gap, set ti_Data to TRUE.
  1832.                          * If you use the new graphics VideoControl()
  1833.                          * VC_NoColorPaletteLoad tag for your screen's
  1834.                          * ViewPort, you should also set this tag.
  1835.                          *)
  1836.  
  1837. (* this is an obsolete tag included only for compatibility with V35
  1838.  * interim release for the A2024 and Viking monitors
  1839.  *)
  1840.   nstagExtVPMode * = U.tagUser + 1;
  1841.  
  1842.  
  1843. (* OpenScreen error codes, which are returned in the (optional) LONGINT
  1844.  * pointed to by tiData for the saErrorCode tag item
  1845.  *)
  1846.   osErrNoMonitor *    = 1;  (* named monitor spec not available     *)
  1847.   osErrNoChips *      = 2;  (* you need newer custom chips          *)
  1848.   osErrNoMem *        = 3;  (* couldn't get normal memory           *)
  1849.   osErrNoChipMem *    = 4;  (* couldn't get chipmem                 *)
  1850.   osErrPubNotUnique * = 5;  (* public screen name already used      *)
  1851.   osErrUnknownMode *  = 6;  (* don't recognize mode asked for       *)
  1852.   osErrTooDeep *      = 7;  (* Screen deeper than HW supports       *)
  1853.   osErrAttachFail *   = 8;  (* Failed to attach screens             *)
  1854.   osErrNotAvailable * = 9;  (* Mode not available for other reason  *)
  1855.  
  1856. (* ======================================================================== *)
  1857. (* === NewScreen ========================================================== *)
  1858. (* ======================================================================== *)
  1859. (* note: to use the Extended field, you must use the
  1860.  * new ExtNewScreen structure, below
  1861.  *)
  1862.  
  1863. TYPE
  1864.  
  1865.   NewScreen * = RECORD
  1866.     leftEdge *, topEdge *,
  1867.     width *, height *, depth * : INTEGER; (* screen dimensions *)
  1868.  
  1869.     detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering      *)
  1870.  
  1871.     viewModes *    : E.WSET;           (* the Modes for the ViewPort (and View) *)
  1872.  
  1873.     type *         : E.WSET;           (* the Screen type (see defines above)  *)
  1874.  
  1875.     font *         : G.TextAttrPtr;    (* this Screen's default text attributes *)
  1876.  
  1877.     defaultTitle * : E.STRPTR;         (* the default title for this Screen    *)
  1878.  
  1879.     gadgets *      : GadgetPtr;        (* UNUSED:  Leave this NULL             *)
  1880.  
  1881.     (* if you are opening a CUSTOMSCREEN and already have a G.BitMap
  1882.      * that you want used for your Screen, you set the flags CUSTOMBITMAP in
  1883.      * the Type field and you set this variable to point to your G.BitMap
  1884.      * structure.  The structure will be copied into your Screen structure,
  1885.      * after which you may discard your own G.BitMap if you want
  1886.      *)
  1887.     customBitMap * : G.BitMapPtr;
  1888. END; (* NewScreen *)
  1889.  
  1890. (*
  1891.  * For compatibility reasons, we need a new structure for extending
  1892.  * NewScreen.  Use this structure is you need to use the new Extension
  1893.  * field.
  1894.  *
  1895.  * NOTE: V36-specific applications should use the
  1896.  * OpenScreenTagList( newscreen, tags ) version of OpenScreen().
  1897.  * Applications that want to be V34-compatible as well may safely use the
  1898.  * ExtNewScreen structure.  Its tags will be ignored by V34 Intuition.
  1899.  *
  1900.  *)
  1901.  
  1902.   ExtNewScreen * = RECORD (NewScreen)
  1903.     extension * : U.TagListPtr;
  1904.                                 (* more specification data, scanned if
  1905.                                  * nsExtended is set in NewScreen.type
  1906.                                  *)
  1907.   END; (* ExtNewScreen *)
  1908.  
  1909. CONST
  1910.  
  1911. (* === Overscan Types ===       *)
  1912.   oscanText *      = 1;     (* entirely visible     *)
  1913.   oscanStandard *  = 2;     (* just past edges      *)
  1914.   oscanMax *       = 3;     (* as much as possible  *)
  1915.   oscanVideo *     = 4;     (* even more than is possible   *)
  1916.  
  1917. (* === Public Shared Screen Node ===    *)
  1918.  
  1919. (* This is the representative of a public shared screen.
  1920.  * This is an internal data structure, but some functions may
  1921.  * present a copy of it to the calling application.  In that case,
  1922.  * be aware that the screen pointer of the structure can NOT be
  1923.  * used safely, since there is no guarantee that the referenced
  1924.  * screen will remain open and a valid data structure.
  1925.  *
  1926.  * Never change one of these.
  1927.  *)
  1928.  
  1929. TYPE
  1930.  
  1931.   PubScreenNode * = RECORD (E.Node) (* name is screen name *)
  1932.     screen         : ScreenPtr;
  1933.     flags -        : E.WSET;        (* below                *)
  1934.     size -         : INTEGER;       (* includes name buffer *)
  1935.     visitorCount - : INTEGER;       (* how many visitor windows *)
  1936.     sigTask -      : E.TaskPtr;     (* who to signal when visitors gone *)
  1937.     sigBit -       : E.UBYTE;       (* which signal *)
  1938.   END; (* PubScreenNode *)
  1939.  
  1940. CONST
  1941.  
  1942.   psnPrivate *    = 0;
  1943.  
  1944. (* NOTE: Due to a bug in NextPubScreen(), make sure your buffer
  1945.  * actually has maxPubScreenName+1 characters in it!
  1946.  *)
  1947.   maxPubScreenName * = 139;   (* names no longer, please      *)
  1948.  
  1949. (* pub screen modes     *)
  1950.   shanghai *        = 0;  (* put workbench windows on pub screen *)
  1951.   popPubScreen *    = 1;  (* pop pub screen to front when visitor opens *)
  1952.  
  1953. (* New for V39:  Intuition has new screen depth-arrangement and movement
  1954.  * functions called ScreenDepth() and ScreenPosition() respectively.
  1955.  * These functions permit the old behavior of ScreenToFront(),
  1956.  * ScreenToBack(), and MoveScreen().  ScreenDepth() also allows
  1957.  * independent depth control of attached screens.  ScreenPosition()
  1958.  * optionally allows positioning screens even though they were opened
  1959.  * {saDraggable,FALSE}.
  1960.  *)
  1961.  
  1962. (* For ScreenDepth(), specify one of sDepthToFront or sDepthToBack,
  1963.  * and optionally also sDepthInFamily.
  1964.  *
  1965.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1966.  * sDepthInFamily.  Commodities, "input helper" programs,
  1967.  * or any other program that did not open a screen should never
  1968.  * use that flag.  (Note that this is a style-behavior
  1969.  * requirement;  there is no technical requirement that the
  1970.  * task calling this function need be the task which opened
  1971.  * the screen).
  1972.  *)
  1973.  
  1974.   sDepthToFront *  = 0;  (* Bring screen to front *)
  1975.   sDepthToBack *   = 1;  (* Send screen to back *)
  1976.   sDepthInFamily * = 2;  (* Move an attached screen with
  1977.                           * respect to other screens of
  1978.                           * its family
  1979.                           *)
  1980.  
  1981. (* Here's an obsolete name equivalent to sDepthInFamily: *)
  1982.   sDepthChildOnly * = sDepthInFamily;
  1983.  
  1984.  
  1985. (* For ScreenPosition(), specify one of sPosRelative, sPosAbsolute,
  1986.  * or sPosMakeVisible to describe the kind of screen positioning you
  1987.  * wish to perform:
  1988.  *
  1989.  * sPosRelative: The x1 and y1 parameters to ScreenPosition() describe
  1990.  *      the offset in coordinates you wish to move the screen by.
  1991.  * sPosAbsolute: The x1 and y1 parameters to ScreenPosition() describe
  1992.  *      the absolute coordinates you wish to move the screen to.
  1993.  * sPosMakeVisible: (x1,y1)-(x2,y2) describes a rectangle on the
  1994.  *      screen which you would like autoscrolled into view.
  1995.  *
  1996.  * You may additionally set sPosForceDrag along with any of the
  1997.  * above.  Set this if you wish to reposition an {saDraggable,FALSE}
  1998.  * screen that you opened.
  1999.  *
  2000.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  2001.  * sPosForceDrag.  Commodities, "input helper" programs,
  2002.  * or any other program that did not open a screen should never
  2003.  * use that flag.
  2004.  *)
  2005.  
  2006.   sPosRelative *    = 0;  (* Coordinates are relative *)
  2007.  
  2008.   sPosAbsolute *    = 1;  (* Coordinates are expressed as
  2009.                            * absolutes, not relatives.
  2010.                            *)
  2011.  
  2012.   sPosMakeVisible * = 2;  (* Coordinates describe a box on
  2013.                            * the screen you wish to be
  2014.                            * made visible by autoscrolling
  2015.                            *)
  2016.  
  2017.   sPosForceDrag * = 4;    (* Move non-draggable screen *)
  2018.  
  2019. (* New for V39: Intuition supports double-buffering in screens,
  2020.  * with friendly interaction with menus and certain gadgets.
  2021.  * For each buffer, you need to get one of these structures
  2022.  * from the AllocScreenBuffer() call.  Never allocate your
  2023.  * own ScreenBuffer structures!
  2024.  *
  2025.  * The sbDBufInfo field is for your use.  See the graphics.library
  2026.  * AllocDBufInfo() autodoc for details.
  2027.  *)
  2028.  
  2029. TYPE
  2030.  
  2031.   ScreenBuffer * = RECORD
  2032.     bitMap *   : G.BitMapPtr;
  2033.     dBufInfo * : G.DBufInfoPtr;
  2034.   END;
  2035.  
  2036. CONST
  2037.  
  2038. (* These are the flags that may be passed to AllocScreenBuffer().
  2039.  *)
  2040.   sbScreenBitmap * = 1;
  2041.   sbCopyBitmap *   = 2;
  2042.  
  2043. (*
  2044. **  $VER: preferences.h 38.2 (16.9.92)
  2045. **
  2046. **  Structure definition for old-style preferences
  2047. *)
  2048.  
  2049.  
  2050. (* ======================================================================== *)
  2051. (* === Preferences ======================================================== *)
  2052. (* ======================================================================== *)
  2053.  
  2054. CONST
  2055.  
  2056. (* these are the definitions for the printer configurations *)
  2057.   filenameSize *   = 30;               (* Filename size *)
  2058.   devnameSize * = 16;                  (* Device-name size *)
  2059.  
  2060.   pointerSize * = (1 + 16 + 1) * 2;    (* Size of Pointer data buffer *)
  2061.  
  2062. (* These defines are for the default font size.  These actually describe the
  2063.  * height of the defaults fonts.  The default font type is the topaz
  2064.  * font, which is a fixed width font that can be used in either
  2065.  * eighty-column or sixty-column mode.  The Preferences structure reflects
  2066.  * which is currently selected by the value found in the variable FontSize,
  2067.  * which may have either of the values defined below.  These values actually
  2068.  * are used to select the height of the default font.  By changing the
  2069.  * height, the resolution of the font changes as well.
  2070.  *)
  2071.   topazEighty * = 8;
  2072.   topazSixty * = 9;
  2073.  
  2074. (* Note:  Starting with V36, and continuing with each new version of
  2075.  * Intuition, an increasing number of fields of struct Preferences
  2076.  * are ignored by SetPrefs().  (Some fields are obeyed only at the
  2077.  * initial SetPrefs(), which comes from the devs:system-configuration
  2078.  * file).  Elements are generally superseded as new hardware or software
  2079.  * features demand more information than fits in struct Preferences.
  2080.  * Parts of struct Preferences must be ignored so that applications
  2081.  * calling GetPrefs(), modifying some other part of struct Preferences,
  2082.  * then calling SetPrefs(), don't end up truncating the extended
  2083.  * data.
  2084.  *
  2085.  * Consult the autodocs for SetPrefs() for further information as
  2086.  * to which fields are not always respected.
  2087.  *)
  2088.  
  2089. TYPE
  2090.  
  2091.   Preferences * = RECORD
  2092.     (* the default font height *)
  2093.     fontHeight *   : SHORTINT;         (* height for system default font  *)
  2094.  
  2095.     (* constant describing what's hooked up to the port *)
  2096.     printerPort *  : E.UBYTE;          (* printer port connection         *)
  2097.  
  2098.     (* the baud rate of the port *)
  2099.     baudRate *     : E.UWORD;          (* baud rate for the serial port   *)
  2100.  
  2101.     (* various timing rates *)
  2102.     keyRptSpeed *  : T.TimeVal;        (* repeat speed for keyboard       *)
  2103.     keyRptDelay *  : T.TimeVal;        (* Delay before keys repeat        *)
  2104.     doubleClick *  : T.TimeVal;        (* Interval allowed between clicks *)
  2105.  
  2106.     (* Intuition Pointer data *)
  2107.     pointerMatrix * : ARRAY pointerSize OF E.UWORD; (* Definition of pointer sprite    *)
  2108.     xOffset *      : SHORTINT;         (* X-Offset for active 'bit'       *)
  2109.     yOffset *      : SHORTINT;         (* Y-Offset for active 'bit'       *)
  2110.     color17 *      : E.UWORD;          (***********************************)
  2111.     color18 *      : E.UWORD;          (* Colours for sprite pointer      *)
  2112.     color19 *      : E.UWORD;          (***********************************)
  2113.     pointerTicks * : E.UWORD;          (* Sensitivity of the pointer      *)
  2114.  
  2115.     (* Workbench Screen colors *)
  2116.     color0 *       : E.UWORD;          (***********************************)
  2117.     color1 *       : E.UWORD;          (*  Standard default colours       *)
  2118.     color2 *       : E.UWORD;          (*   Used in the Workbench         *)
  2119.     color3 *       : E.UWORD;          (***********************************)
  2120.  
  2121.     (* positioning data for the Intuition View *)
  2122.     viewXOffset *  : SHORTINT;         (* Offset for top lefthand corner  *)
  2123.     viewYOffset *  : SHORTINT;         (* X and Y dimensions              *)
  2124.     viewInitX *, ViewInitY * : INTEGER; (* View initial offset values      *)
  2125.  
  2126.     enableCLI *    : E.WSET;           (* CLI availability switch *)
  2127.  
  2128.     (* printer configurations *)
  2129.     printerType *  : E.UWORD;          (* printer type            *)
  2130.     printerFilename * : ARRAY filenameSize OF CHAR; (* file for printer       *)
  2131.  
  2132.     (* print format and quality configurations *)
  2133.     printPitch *   : E.UWORD;          (* print pitch                     *)
  2134.     printQuality * : E.UWORD;          (* print quality                   *)
  2135.     printSpacing * : E.UWORD;          (* number of lines per inch        *)
  2136.     printLeftMargin * : E.UWORD;       (* left margin in characters       *)
  2137.     printRightMargin * : E.UWORD;      (* right margin in characters      *)
  2138.     printImage *   : E.UWORD;          (* positive or negative            *)
  2139.     printAspect *  : E.UWORD;          (* horizontal or vertical          *)
  2140.     printShade *   : E.UWORD;          (* b&w, half-tone, or color        *)
  2141.     printThreshold * : INTEGER;        (* darkness ctrl for b/w dumps     *)
  2142.  
  2143.     (* print paper descriptors *)
  2144.     paperSize *    : E.UWORD;          (* paper size                      *)
  2145.     paperLength *  : E.UWORD;          (* paper length in number of lines *)
  2146.     paperType *    : E.UWORD;          (* continuous or single sheet      *)
  2147.  
  2148.     (* Serial device settings: These are six nibble-fields in three bytes *)
  2149.     (* (these look a little strange so the defaults will map out to zero) *)
  2150.     serRWBits *    : E.UBYTE;          (* upper nibble * = (8-number of read bits)      *)
  2151.                                        (* lower nibble * = (8-number of write bits)     *)
  2152.     serStopBuf *   : E.UBYTE;          (* upper nibble * = (number of stop bits - 1)    *)
  2153.                                        (* lower nibble * = (table value for BufSize)    *)
  2154.     serParShk *    : E.UBYTE;          (* upper nibble * = (value for Parity setting)   *)
  2155.                                        (* lower nibble * = (value for Handshake mode)   *)
  2156.     laceWB *       : E.BSET;           (* if workbench is to be interlaced            *)
  2157.  
  2158.     pad *          : ARRAY 12 OF E.UBYTE;
  2159.     prtDevName *   : ARRAY devnameSize OF CHAR; (* device used by printer.device
  2160.                                         * (omit the ".device")
  2161.                                         *)
  2162.     defaultPrtUnit * :  E.UBYTE;       (* default unit opened by printer.device *)
  2163.     defaultSerUnit * :  E.UBYTE;       (* default serial unit *)
  2164.  
  2165.     rowSizeChange * : SHORTINT;        (* affect NormalDisplayRows/Columns     *)
  2166.     columnSizeChange * : SHORTINT;
  2167.  
  2168.     printFlags *   : E.WSET;           (* user preference flags *)
  2169.     printMaxWidth * : E.UWORD;         (* max width of printed picture in 10ths/in *)
  2170.     printMaxHeight * : E.UWORD;        (* max height of printed picture in 10ths/in *)
  2171.     printDensity * : E.UBYTE;          (* print density *)
  2172.     printXOffset * : E.UBYTE;          (* offset of printed picture in 10ths/inch *)
  2173.  
  2174.     width *        : E.UWORD;          (* override default workbench width  *)
  2175.     height *       : E.UWORD;          (* override default workbench height *)
  2176.     depth *        : E.UBYTE;          (* override default workbench depth  *)
  2177.  
  2178.     extsize *      : E.UBYTE;          (* extension information -- do not touch! *)
  2179.                                        (* extension size in blocks of 64 bytes *)
  2180.   END; (* Preferences *)
  2181.  
  2182.  
  2183. CONST
  2184.  
  2185. (* Workbench Interlace (use one bit) *)
  2186.   laceWB *         = 0;
  2187.   lwReserved *     = 1;               (* internal use only *)
  2188.  
  2189. (* EnableCLI   *)
  2190.   screenDrag *     = 14;
  2191.   mouseAccel *     = 15;
  2192.  
  2193. (* PrinterPort *)
  2194.   parallelPrinter * = 00H;
  2195.   serialPrinter *   = 01H;
  2196.  
  2197. (* BaudRate *)
  2198.   baud110 *        = 00H;
  2199.   baud300 *        = 01H;
  2200.   baud1200 *       = 02H;
  2201.   baud2400 *       = 03H;
  2202.   baud4800 *       = 04H;
  2203.   baud9600 *       = 05H;
  2204.   baud19200 *      = 06H;
  2205.   baudMidi *       = 07H;
  2206.  
  2207. (* PaperType *)
  2208.   fanfold * = 00H;
  2209.   single *          = 80H;
  2210.  
  2211. (* PrintPitch *)
  2212.   pica *            = 000H;
  2213.   elite *           = 400H;
  2214.   fine *            = 800H;
  2215.  
  2216. (* PrintQuality *)
  2217.   draft *           = 000H;
  2218.   letter *          = 100H;
  2219.  
  2220. (* PrintSpacing *)
  2221.   sixLPI *         = 000H;
  2222.   eightLPI *       = 200H;
  2223.  
  2224. (* Print Image *)
  2225.   imagePositive *  = 00H;
  2226.   imageNegative *  = 01H;
  2227.  
  2228. (* PrintAspect *)
  2229.   aspectHoriz *    = 00H;
  2230.   aspectVert *     = 01H;
  2231.  
  2232. (* PrintShade *)
  2233.   shadeBW *        = 00H;
  2234.   shadeGreyscale * = 01H;
  2235.   shadeColor *     = 02H;
  2236.  
  2237. (* PaperSize (all paper sizes have a zero in the lowest nybble) *)
  2238.   usLetter *       = 00H;
  2239.   usLegal *        = 10H;
  2240.   nTractor *       = 20H;
  2241.   wTractor *       = 30H;
  2242.   custom *         = 40H;
  2243.  
  2244. (* New PaperSizes for V36: *)
  2245.   euroA0 * =  50H;            (* European size A0: 841 x 1189 *)
  2246.   euroA1 * =  60H;            (* European size A1: 594 x 841 *)
  2247.   euroA2 * =  70H;            (* European size A2: 420 x 594 *)
  2248.   euroA3 * =  80H;            (* European size A3: 297 x 420 *)
  2249.   euroA4 * =  90H;            (* European size A4: 210 x 297 *)
  2250.   euroA5 * = 0A0H;            (* European size A5: 148 x 210 *)
  2251.   euroA6 * = 0B0H;            (* European size A6: 105 x 148 *)
  2252.   euroA7 * = 0C0H;            (* European size A7: 74 x 105 *)
  2253.   euroA8 * = 0D0H;            (* European size A8: 52 x 74 *)
  2254.  
  2255.  
  2256. (* PrinterType *)
  2257.   customName *             = 00H;
  2258.   alphaP101 *              = 01H;
  2259.   brother15XL *            = 02H;
  2260.   cbmMps1000 *             = 03H;
  2261.   diab630 *                = 04H;
  2262.   diabAdvD25 *             = 05H;
  2263.   diabC150 *               = 06H;
  2264.   epson *                  = 07H;
  2265.   epsonJX80 *              = 08H;
  2266.   okimate20 *              = 09H;
  2267.   qumeLP20 *               = 0AH;
  2268. (* new printer entries, 3 October 1985 *)
  2269.   hpLaserjet *             = 0BH;
  2270.   hpLaserjetPlus *         = 0CH;
  2271.  
  2272. (* Serial Input Buffer Sizes *)
  2273.   sbuf512 *        = 00H;
  2274.   sbuf1024 *       = 01H;
  2275.   sbuf2048 *       = 02H;
  2276.   sbuf4096 *       = 03H;
  2277.   sbuf8000 *       = 04H;
  2278.   sbuf16000 *      = 05H;
  2279.  
  2280. (* Serial Bit Masks *)
  2281.   sReadBits *      = 0F0X; (* for SerRWBits   *)
  2282.   sWriteBits *     = 0FX;
  2283.  
  2284.   sStopBits *      = 0F0X; (* for SerStopBuf  *)
  2285.   sBufSizeBits *   = 0FX;
  2286.  
  2287.   sParityBits *    = 0F0X; (* for SerParShk   *)
  2288.   sHShakeBits *    = 0FX;
  2289.  
  2290. (* Serial Parity (upper nibble, after being shifted by
  2291.  * macro SPARNUM() )
  2292.  *)
  2293.   sParityNone *     = 0;
  2294.   sParityEven *     = 1;
  2295.   sParityOdd *      = 2;
  2296. (* New parity definitions for V36: *)
  2297.   sParityMark *     = 3;
  2298.   sParitySpace *    = 4;
  2299.  
  2300. (* Serial Handshake Mode (lower nibble, after masking using
  2301.  * macro SHANKNUM() )
  2302.  *)
  2303.   sHShakeXon *      = 0;
  2304.   sHShakeRts *      = 1;
  2305.   sHShakeNone *     = 2;
  2306.  
  2307. (* new defines for PrintFlags *)
  2308.  
  2309.   correctRed *         = 0;  (* color correct red shades *)
  2310.   correctGreen *       = 1;  (* color correct green shades *)
  2311.   correctBlue *        = 2;  (* color correct blue shades *)
  2312.  
  2313.   centerImage *        = 3;  (* center image on paper *)
  2314.  
  2315.   ignoreDimensions *   = {}; (* ignore max width/height settings *)
  2316.   boundedDimensions *  = 4;  (* use max width/height as boundaries *)
  2317.   absoluteDimensions * = 5;  (* use max width/height as absolutes *)
  2318.   pixelDimensions *    = 6;  (* use max width/height as prt pixels *)
  2319.   multiplyDimensions * = 7; (* use max width/height as multipliers *)
  2320.  
  2321.   integerScaling *     = 8;  (* force integer scaling *)
  2322.  
  2323.   orderedDithering *   = {}; (* ordered dithering *)
  2324.   halftoneDithering *  = 9;  (* halftone dithering *)
  2325.   floydDithering *     = 10; (* Floyd-Steinberg dithering *)
  2326.  
  2327.   antiAlias *          = 11; (* anti-alias image *)
  2328.   greyScale2 *         = 12; (* for use with hi-res monitor *)
  2329.  
  2330. (* masks used for checking bits *)
  2331.  
  2332.   correctRGBMask *     = { correctRed, correctGreen, correctBlue };
  2333.   dimensionsMask *     = { boundedDimensions, absoluteDimensions, pixelDimensions, multiplyDimensions };
  2334.   ditheringMask *      = { halftoneDithering, floydDithering };
  2335.  
  2336. (*
  2337. **  $VER: intuition.h 38.26 (15.2.93)
  2338. **
  2339. **  Interface definitions for Intuition applications.
  2340. **  (Continued...)
  2341. *)
  2342.  
  2343. (* ======================================================================== *)
  2344. (* === Remember =========================================================== *)
  2345. (* ======================================================================== *)
  2346. (* this structure is used for remembering what memory has been allocated to
  2347.  * date by a given routine, so that a premature abort or systematic exit
  2348.  * can deallocate memory cleanly, easily, and completely
  2349.  *)
  2350.  
  2351. TYPE
  2352.  
  2353.   Remember * = RECORD
  2354.     nextRemember * : RememberPtr;
  2355.     rememberSize * : E.ULONG;
  2356.     memory *       : E.APTR;
  2357.   END; (* Remember *)
  2358.  
  2359. (* === Color Spec ====================================================== *)
  2360. (* How to tell Intuition about RGB values for a color table entry.
  2361.  * NOTE:  The way the structure was defined, the color value was
  2362.  * right-justified within each UWORD.  This poses problems for
  2363.  * extensibility to more bits-per-gun.  The saColors32 tag to
  2364.  * OpenScreenTags() provides an alternate way to specify colors
  2365.  * with greater precision.
  2366.  *)
  2367.  
  2368. TYPE
  2369.  
  2370.   ColorSpec * = RECORD
  2371.     colorIndex * : INTEGER;  (* -1 terminates an array of ColorSpec  *)
  2372.     red *        : E.UWORD;  (* only 6 bits recognized in V36        *)
  2373.     green *      : E.UWORD;  (* only 6 bits recognized in V36        *)
  2374.     blue *       : E.UWORD;  (* only 6 bits recognized in V36        *)
  2375.   END; (* ColorSpec *)
  2376.  
  2377. (* === Easy Requester Specification ======================================= *)
  2378. (* see also autodocs for EasyRequest and BuildEasyRequest       *)
  2379. (* NOTE: This structure may grow in size in the future          *)
  2380.  
  2381. TYPE
  2382.  
  2383.   EasyStruct * = RECORD
  2384.     structSize *   : E.ULONG;   (* should be sizeof (struct EasyStruct )*)
  2385.     flags *        : SET;       (* should be 0 for now                  *)
  2386.     title *        : E.STRPTR;  (* title of requester window            *)
  2387.     textFormat *   : E.STRPTR;  (* 'printf' style formatting string     *)
  2388.     gadgetFormat * : E.STRPTR;  (* 'printf' style formatting string     *)
  2389.   END; (* EasyStruct *)
  2390.  
  2391. (* ======================================================================== *)
  2392. (* === Miscellaneous ====================================================== *)
  2393. (* ======================================================================== *)
  2394.  
  2395. CONST
  2396.  
  2397. (* = MENU STUFF =========================================================== *)
  2398.   noMenu *   = 001FH;
  2399.   noItem *   = 003FH;
  2400.   noSub *    = 001FH;
  2401.   menuNull * = -1; (* 0FFFFH *)
  2402.  
  2403.  
  2404. (* these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  2405.  * I'll use a generic Width (for all resolutions) for the CheckMark.
  2406.  * If COMMSEQ, likewise I'll use this generic stuff
  2407.  *)
  2408.   checkWidth *      = 19;
  2409.   commWidth *       = 27;
  2410.   lowCheckWidth *   = 13;
  2411.   lowCommWidth *    = 16;
  2412.  
  2413.  
  2414. (* these are the AlertNumber defines.  if you are calling DisplayAlert()
  2415.  * the AlertNumber you supply must have the alertTYPE bits set to one
  2416.  * of these patterns
  2417.  *)
  2418.   alertType *      = 80000000H;
  2419.   recoveryAlert *  = 00000000H;      (* the system can recover from this *)
  2420.   deadendAlert *   = 80000000H;      (* no recovery possible, this is it *)
  2421.  
  2422.  
  2423. (* When you're defining IntuiText for the Positive and Negative Gadgets
  2424.  * created by a call to AutoRequest(), these defines will get you
  2425.  * reasonable-looking text.  The only field without a define is the IText
  2426.  * field; you decide what text goes with the Gadget
  2427.  *)
  2428.   autoFrontPen *    = 0;
  2429.   autoBackPen *     = 1;
  2430.   autoDrawMode *    = G.jam2;
  2431.   autoLeftEdge *    = 6;
  2432.   autoTopEdge *     = 3;
  2433.   autoITextFont *   = E.NULL;
  2434.   autoNextText *    = E.NULL;
  2435.  
  2436.  
  2437. (* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- *)
  2438.   selectUp *        = IE.codeLButton + IE.codeUpPrefix;
  2439.   selectDown *      = IE.codeLButton;
  2440.   menuUp *          = IE.codeRButton + IE.codeUpPrefix;
  2441.   menuDown *        = IE.codeRButton;
  2442.   middleUp *        = IE.codeMButton + IE.codeUpPrefix;
  2443.   middleDown *      = IE.codeMButton;
  2444.   altLeft *         = { IE.qualLAlt };
  2445.   altRight *        = { IE.qualRAlt };
  2446.   amigaLeft *       = { IE.qualLCommand };
  2447.   amigaRight *      = { IE.qualRCommand };
  2448.   amigaKeys *       = amigaLeft + amigaRight;
  2449.  
  2450.   cursorUp *        = 4CH;
  2451.   cursorLeft *      = 4FH;
  2452.   cursorRight *     = 4EH;
  2453.   cursorDown *      = 4DH;
  2454.   keycodeQ *        = 10H;
  2455.   keycodeZ *        = 31H;
  2456.   keycodeX *        = 32H;
  2457.   keycodeV *        = 34H;
  2458.   keycodeB *        = 35H;
  2459.   keycodeN *        = 36H;
  2460.   keycodeM *        = 37H;
  2461.   keycodeLess *     = 38H;
  2462.   keycodeGreater *  = 39H;
  2463.  
  2464. (* New for V39, Intuition supports the IE.subClassNewTablet subclass
  2465.  * of the IE.classNewPointerPos event.  The eventAddress of such
  2466.  * an event points to a TabletData structure (see below).
  2467.  *
  2468.  * The TabletData structure contains certain elements including a taglist.
  2469.  * The taglist can be used for special tablet parameters.  A tablet driver
  2470.  * should include only those tag-items the tablet supports.  An application
  2471.  * can listen for any tag-items that interest it.  Note: an application
  2472.  * must set the waTabletMessages attribute to TRUE to receive this
  2473.  * extended information in its IntuiMessages.
  2474.  *
  2475.  * The definitions given here MUST be followed.  Pay careful attention
  2476.  * to normalization and the interpretation of signs.
  2477.  *
  2478.  * tabletaTabletZ:  the current value of the tablet in the Z direction.
  2479.  * This unsigned value should typically be in the natural units of the
  2480.  * tablet.  You should also provide tabletaRangeZ.
  2481.  *
  2482.  * tabletaRangeZ:  the maximum value of the tablet in the Z direction.
  2483.  * Normally specified along with tabletaTabletZ, this allows the
  2484.  * application to scale the actual Z value across its range.
  2485.  *
  2486.  * tabletaAngleX:  the angle of rotation or tilt about the X-axis.  This
  2487.  * number should be normalized to fill a signed long integer.  Positive
  2488.  * values imply a clockwise rotation about the X-axis when viewing
  2489.  * from +X towards the origin.
  2490.  *
  2491.  * tabletaAngleY:  the angle of rotation or tilt about the Y-axis.  This
  2492.  * number should be normalized to fill a signed long integer.  Positive
  2493.  * values imply a clockwise rotation about the Y-axis when viewing
  2494.  * from +Y towards the origin.
  2495.  *
  2496.  * tabletaAngleZ:  the angle of rotation or tilt about the Z axis.  This
  2497.  * number should be normalized to fill a signed long integer.  Positive
  2498.  * values imply a clockwise rotation about the Z-axis when viewing
  2499.  * from +Z towards the origin.
  2500.  *
  2501.  *      Note: a stylus that supports tilt should use the tabletaAngleX
  2502.  *      and tabletaAngleY attributes.  Tilting the stylus so the tip
  2503.  *      points towards increasing or decreasing X is actually a rotation
  2504.  *      around the Y-axis.  Thus, if the stylus tip points towards
  2505.  *      positive X, then that tilt is represented as a negative
  2506.  *      tabletaAngleY.  Likewise, if the stylus tip points towards
  2507.  *      positive Y, that tilt is represented by positive tabletaAngleX.
  2508.  *
  2509.  * tabletaPressure:  the pressure reading of the stylus.  The pressure
  2510.  * should be normalized to fill a signed long integer.  Typical devices
  2511.  * won't generate negative pressure, but the possibility is not precluded.
  2512.  * The pressure threshold which is considered to cause a button-click is
  2513.  * expected to be set in a Preferences program supplied by the tablet
  2514.  * vendor.  The tablet driver would send IE.codeLButton-type events as
  2515.  * the pressure crossed that threshold.
  2516.  *
  2517.  * tabletaButtonBits:  ti_Data is a long integer whose bits are to
  2518.  * be interpreted at the state of the first 32 buttons of the tablet.
  2519.  *
  2520.  * tabletaInProximity:  ti_Data is a boolean.  For tablets that support
  2521.  * proximity, they should send the {tabletaInProximity,FALSE} tag item
  2522.  * when the stylus is out of proximity.  One possible use we can forsee
  2523.  * is a mouse-blanking commodity which keys off this to blank the
  2524.  * mouse.  When this tag is absent, the stylus is assumed to be
  2525.  * in proximity.
  2526.  *
  2527.  * tabletaResolutionX:  ti_Data is an unsigned long integer which
  2528.  * is the x-axis resolution in dots per inch.
  2529.  *
  2530.  * tabletaResolutionY:  ti_Data is an unsigned long integer which
  2531.  * is the y-axis resolution in dots per inch.
  2532.  *)
  2533.  
  2534. CONST
  2535.  
  2536.   tabletaDummy *       = U.tagUser + 03A000H;
  2537.   tabletaTabletZ *     = tabletaDummy + 01H;
  2538.   tabletaRangeZ *      = tabletaDummy + 02H;
  2539.   tabletaAngleX *      = tabletaDummy + 03H;
  2540.   tabletaAngleY *      = tabletaDummy + 04H;
  2541.   tabletaAngleZ *      = tabletaDummy + 05H;
  2542.   tabletaPressure *    = tabletaDummy + 06H;
  2543.   tabletaButtonBits *  = tabletaDummy + 07H;
  2544.   tabletaInProximity * = tabletaDummy + 08H;
  2545.   tabletaResolutionX * = tabletaDummy + 09H;
  2546.   tabletaResolutionY * = tabletaDummy + 0AH;
  2547.  
  2548. (* If your window sets waTabletMessages to TRUE, then it will receive
  2549.  * extended IntuiMessages (struct ExtIntuiMessage) whose tabletData
  2550.  * field points at a TabletData structure.  This structure contains
  2551.  * additional information about the input event.
  2552.  *)
  2553.  
  2554. TYPE
  2555.  
  2556.   TabletData * = RECORD
  2557.     (* Sub-pixel position of tablet, in screen coordinates,
  2558.      * scaled to fill a UWORD fraction:
  2559.      *)
  2560.     xFraction *, yFraction * : E.UWORD;
  2561.  
  2562.     (* Current tablet coordinates along each axis: *)
  2563.     tabletX *, tabletY * : E.ULONG;
  2564.  
  2565.     (* Tablet range along each axis.  For example, if td_TabletX
  2566.      * can take values 0-999, td_RangeX should be 1000.
  2567.      *)
  2568.     rangeX *, rangeY * : E.ULONG;
  2569.  
  2570.     (* Pointer to tag-list of additional tablet attributes.
  2571.      * See <intuition/intuition.h> for the tag values.
  2572.      *)
  2573.     tagList *      : U.TagListPtr;
  2574.   END;
  2575.  
  2576. (* If a tablet driver supplies a hook for callBack, it will be
  2577.  * invoked in the standard hook manner.  A0 will point to the Hook
  2578.  * itself, A2 will point to the InputEvent that was sent, and
  2579.  * A1 will point to a TabletHookData structure.  The InputEvent's
  2580.  * ie_EventAddress field points at the IENewTablet structure that
  2581.  * the driver supplied.
  2582.  *
  2583.  * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  2584.  * should scale the ient_TabletX and ient_TabletY fields and store the
  2585.  * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  2586.  * ient_ScaledYFraction.
  2587.  *
  2588.  * The tablet hook must currently return NULL.  This is the only
  2589.  * acceptable return-value under V39.
  2590.  *)
  2591.  
  2592. TYPE
  2593.  
  2594.   TabletHookData * = RECORD
  2595.     (* Pointer to the active screen:
  2596.      * Note: if there are no open screens, thd_Screen will be NULL.
  2597.      * thd_Width and thd_Height will then describe an NTSC 640x400
  2598.      * screen.  Please scale accordingly.
  2599.      *)
  2600.     screen *       :  ScreenPtr;
  2601.  
  2602.     (* The width and height (measured in pixels of the active screen)
  2603.      * that your are to scale to:
  2604.      *)
  2605.     width *        :  E.ULONG;
  2606.     height *       :  E.ULONG;
  2607.  
  2608.     (* Non-zero if the screen or something about the screen
  2609.      * changed since the last time you were invoked:
  2610.      *)
  2611.     screenChanged * :  LONGINT;
  2612.   END;
  2613.  
  2614. (*
  2615. **  $VER: sghooks.h 38.1 (11.11.91)
  2616. **
  2617. **  string gadget extensions and hooks
  2618. *)
  2619.  
  2620.  
  2621. TYPE
  2622.  
  2623.   StringExtend * = RECORD
  2624.     (* display specifications   *)
  2625.     font *         : G.TextFontPtr;      (* must be an open Font (not TextAttr)  *)
  2626.     pens *         : ARRAY 2 OF E.UBYTE; (* color of text/backgroun              *)
  2627.     activePens *   : ARRAY 2 OF E.UBYTE; (* colors when gadget is active         *)
  2628.  
  2629.     (* edit specifications      *)
  2630.     initialModes * : SET;                (* initial mode flags, below            *)
  2631.     editHook *     : U.HookPtr;          (* if non-NULL, must supply WorkBuffer  *)
  2632.     workBuffer *   : E.APTR;             (* must be as large as StringInfo.Buffer*)
  2633.  
  2634.     reserved *     : ARRAY 4 OF E.ULONG; (* set to 0                             *)
  2635.   END; (* StringExtend *)
  2636.  
  2637.   SGWork * = RECORD
  2638.     (* set up when gadget is first activated    *)
  2639.     gadget *       : GadgetPtr;        (* the contestant itself        *)
  2640.     stringInfo *   : StringInfoPtr;    (* easy access to sinfo         *)
  2641.     workBuffer *   : E.APTR;           (* intuition's planned result   *)
  2642.     prevBuffer *   : E.APTR;           (* what was there before        *)
  2643.     modes *        : SET;              (* current mode                 *)
  2644.  
  2645.     (* modified for each input event    *)
  2646.     iEvent *       : IE.InputEventBasePtr; (* actual event: do not change  *)
  2647.     code *         : E.UWORD;          (* character code, if one byte  *)
  2648.     bufferPos *    : INTEGER;          (* cursor position              *)
  2649.     numChars *     : INTEGER;
  2650.     actions *      : SET;              (* what Intuition will do       *)
  2651.     longInt *      : LONGINT;          (* temp storage for longint     *)
  2652.  
  2653.     gadgetInfo *   : GadgetInfoPtr;    (* see cghooks.h                *)
  2654.     editOp *       : E.UWORD;          (* from constants below         *)
  2655.   END; (* SGWork *)
  2656.  
  2657. CONST
  2658.  
  2659. (* SGWork.EditOp -
  2660.  * These values indicate what basic type of operation the global
  2661.  * editing hook has performed on the string before your gadget's custom
  2662.  * editing hook gets called.  You do not have to be concerned with the
  2663.  * value your custom hook leaves in the EditOp field, only if you
  2664.  * write a global editing hook.
  2665.  *
  2666.  * For most of these general edit operations, you'll want to compare
  2667.  * the BufferPos and NumChars of the StringInfo (before global editing)
  2668.  * and SGWork (after global editing).
  2669.  *)
  2670.  
  2671.   eoNoOp *         = 0001H;
  2672.     (* did nothing                                                  *)
  2673.   eoDelBackward *  = 0002H;
  2674.     (* deleted some chars (maybe 0).                                *)
  2675.   eoDelForward *   = 0003H;
  2676.     (* deleted some characters under and in front of the cursor     *)
  2677.   eoMoveCursor *   = 0004H;
  2678.     (* moved the cursor                                             *)
  2679.   eoEnter *        = 0005H;
  2680.     (* "enter" or "return" key, terminate                           *)
  2681.   eoReset *        = 0006H;
  2682.     (* current Intuition-style undo                                 *)
  2683.   eoReplaceChar *  = 0007H;
  2684.     (* replaced one character and (maybe) advanced cursor           *)
  2685.   eoInsertChar *   = 0008H;
  2686.     (* inserted one char into string or added one at end            *)
  2687.   eoBadFormat *    = 0009H;
  2688.     (* didn't like the text data, e.g., Bad LONGINT                 *)
  2689.   eoBigChange *    = 000AH; (* unused by Intuition  *)
  2690.     (* complete or major change to the text, e.g. new string        *)
  2691.   eoUndo *         = 000BH; (* unused by Intuition  *)
  2692.     (* some other style of undo                                     *)
  2693.   eoClear *        = 000CH;
  2694.     (* clear the string                                             *)
  2695.   eoSpecial *      = 000DH; (* unused by Intuition  *)
  2696.     (* some operation that doesn't fit into the categories here     *)
  2697.  
  2698.  
  2699. (* Mode Flags definitions (ONLY first group allowed as InitialModes)    *)
  2700.   sgmReplace *     = 0;       (* replace mode                 *)
  2701. (* please initialize StringInfo with in-range value of BufferPos
  2702.  * if you are using sgmREPLACE mode.
  2703.  *)
  2704.  
  2705.   sgmFixedField *  = 1;       (* fixed length buffer          *)
  2706.                                         (* always set sgmREPLACE, too  *)
  2707.   sgmNoFilter *    = 2;       (* don't filter control chars   *)
  2708.  
  2709. (* sgmExitHelp is new for V37, and ignored by V36: *)
  2710.   sgmExitHelp *    = 7;       (* exit with code * = 5FH if HELP hit *)
  2711.  
  2712.  
  2713. (* These Mode Flags are for internal use only                           *)
  2714.   sgmNoChange *    = 3;       (* no edit changes yet          *)
  2715.   sgmNoWorkB *     = 4;       (* Buffer == PrevBuffer         *)
  2716.   sgmControl *     = 5;       (* control char escape mode     *)
  2717.   sgmLongint *     = 6;       (* an intuition longint gadget  *)
  2718.  
  2719. (* String Gadget Action Flags (put in SGWork.Actions by EditHook)       *)
  2720.   sgaUse *         = 0;  (* use contents of SGWork               *)
  2721.   sgaEnd *         = 1;  (* terminate gadget, code in Code field *)
  2722.   sgaBeep *        = 2;  (* flash the screen for the user        *)
  2723.   sgaReuse *       = 3;  (* reuse input event                    *)
  2724.   sgaRedisplay *   = 4; (* gadget visuals changed               *)
  2725.  
  2726. (* New for V37: *)
  2727.   sgaNextActive *  = 5; (* Make next possible gadget active.    *)
  2728.   sgaPrevActive *  = 6; (* Make previous possible gadget active.*)
  2729.  
  2730. (* function id for only existing custom string gadget edit hook *)
  2731.  
  2732.   sghKey *         = 1;    (* process editing keystroke            *)
  2733.   sghClick *       = 2;    (* process mouse click cursor position  *)
  2734.  
  2735. (* Here's a brief summary of how the custom string gadget edit hook works:
  2736.  *      You provide a hook in StringInfo.Extension.EditHook.
  2737.  *      The hook is called in the standard way with the 'object'
  2738.  *      a pointer to SGWork, and the 'message' a pointer to a command
  2739.  *      block, starting either with (longword) sghKey, sghClick,
  2740.  *      or something new.
  2741.  *
  2742.  *      You return 0 if you don't understand the command (sghKey is
  2743.  *      required and assumed).  Return non-zero if you implement the
  2744.  *      command.
  2745.  *
  2746.  *   sghKEY:
  2747.  *      There are no parameters following the command longword.
  2748.  *
  2749.  *      Intuition will put its idea of proper values in the SGWork
  2750.  *      before calling you, and if you leave sgaUse set in the
  2751.  *      SGWork.Actions field, Intuition will use the values
  2752.  *      found in SGWork fields WorkBuffer, NumChars, BufferPos,
  2753.  *      and LongInt, copying the WorkBuffer back to the StringInfo
  2754.  *      Buffer.
  2755.  *
  2756.  *      NOTE WELL: You may NOT change other SGWork fields.
  2757.  *
  2758.  *      If you clear sgaUSE, the string gadget will be unchanged.
  2759.  *
  2760.  *      If you set sgaEND, Intuition will terminate the activation
  2761.  *      of the string gadget.  If you also set sgaREUSE, Intuition
  2762.  *      will reuse the input event after it deactivates your gadget.
  2763.  *
  2764.  *      In this case, Intuition will put the value found in SGWork.Code
  2765.  *      into the IntuiMessage.Code field of the idcmpGADGETUP message it
  2766.  *      sends to the application.
  2767.  *
  2768.  *      If you set sgaBEEP, Intuition will call DisplayBeep(); use
  2769.  *      this if the user has typed in error, or buffer is full.
  2770.  *
  2771.  *      Set sgaREDISPLAY if the changes to the gadget warrant a
  2772.  *      gadget redisplay.  Note: cursor movement requires a redisplay.
  2773.  *
  2774.  *      Starting in V37, you may set sgaPREVACTIVE or sgaNEXTACTIVE
  2775.  *      when you set sgaEND.  This tells Intuition that you want
  2776.  *      the next or previous gadget with gflgTABCYCLE to be activated.
  2777.  *
  2778.  *   sghCLICK:
  2779.  *      This hook command is called when Intuition wants to position
  2780.  *      the cursor in response to a mouse click in the string gadget.
  2781.  *
  2782.  *      Again, here are no parameters following the command longword.
  2783.  *
  2784.  *      This time, Intuition has already calculated the mouse position
  2785.  *      character cell and put it in SGWork.BufferPos.  The previous
  2786.  *      BufferPos value remains in the SGWork.StringInfo.BufferPos.
  2787.  *
  2788.  *      Intuition will again use the SGWork fields listed above for
  2789.  *      sghKEY.  One restriction is that you are NOT allowed to set
  2790.  *      sgaEND or sgaREUSE for this command.  Intuition will not
  2791.  *      stand for a gadget which goes inactive when you click in it.
  2792.  *
  2793.  *      You should always leave the sgaREDISPLAY flag set, since Intuition
  2794.  *      uses this processing when activating a string gadget.
  2795.  *)
  2796.  
  2797. (*
  2798. **  $VER: cghooks.h 38.1 (11.11.91)
  2799. **
  2800. **  Custom Gadget processing
  2801. *)
  2802.  
  2803.  
  2804. TYPE
  2805.  
  2806. (*
  2807.  * Package of information passed to custom and 'boopsi'
  2808.  * gadget "hook" functions.  This structure is READ ONLY.
  2809.  *)
  2810.  
  2811.   GadgetInfo * = RECORD
  2812.  
  2813.     screen -       : ScreenPtr;
  2814.     window -       : WindowPtr;        (* null for screen gadgets *)
  2815.     requester -    : RequesterPtr;     (* null if not gtypREQGADGET *)
  2816.  
  2817.     (* rendering information:
  2818.      * don't use these without cloning/locking.
  2819.      * Official way is to call ObtainRPort()
  2820.      *)
  2821.     rastPort -     : G.RastPortPtr;
  2822.     layer -        : G.LayerPtr;
  2823.  
  2824.     (* copy of dimensions of screen/window/g00/req(/group)
  2825.      * that gadget resides in.  Left/Top of this box is
  2826.      * offset from window mouse coordinates to gadget coordinates
  2827.      *          screen gadgets:        0,0 (from screen coords)
  2828.      * window gadgets (no g00):        0,0
  2829.      * gtypGZZGADGETs (borderlayer):   0,0
  2830.      * GZZ innerlayer gadget:          borderleft, bordertop
  2831.      * Requester gadgets:              reqleft, reqtop
  2832.      *)
  2833.     domain -       : IBox;
  2834.  
  2835.     (* these are the pens for the window or screen      *)
  2836.     pens - : RECORD
  2837.       detailPen -  : E.UBYTE;
  2838.       blockPen -   : E.UBYTE;
  2839.     END;
  2840.  
  2841.     (* the Detail and Block pens in giDrInfo->driPens[] are
  2842.      * for the screen.  Use the above for window-sensitive
  2843.      * colors.
  2844.      *)
  2845.     drInfo -       : DrawInfoPtr;
  2846.  
  2847.     (* reserved space: this structure is extensible
  2848.      * anyway, but using these saves some recompilation
  2849.      *)
  2850.     reserved -     : ARRAY 6 OF E.ULONG;
  2851.   END; (* GadgetInfo *)
  2852.  
  2853. (*** system private data structure for now ***)
  2854. (* prop gadget extra info       *)
  2855.  
  2856.   PGX = RECORD
  2857.     container * : IBox;
  2858.     newKnob *   : IBox;
  2859.   END; (* PGX *)
  2860.  
  2861. (*
  2862. **  $VER: classusr.h 38.2 (14.4.92)
  2863. **
  2864. **  For application users of Intuition object classes
  2865. *)
  2866.  
  2867. TYPE
  2868.  
  2869. (*** User visible handles on objects, classes, messages ***)
  2870.   ObjectUsr * = E.ULONG;          (* abstract handle *)
  2871.  
  2872.   ClassID * = E.STRPTR;
  2873.  
  2874. (* you can use this type to point to a "generic" message,
  2875.  * in the object-oriented programming parlance.  Based on
  2876.  * the value of 'MethodID', you dispatch to processing
  2877.  * for the various message types.  The meaningful parameter
  2878.  * packet structure definitions are defined below.
  2879.  *)
  2880.  
  2881.   Msg * = RECORD
  2882.     methodID * : E.ULONG
  2883.     (* method-specific data follows, some examples below *)
  2884.   END; (* Msg *)
  2885.  
  2886. CONST
  2887.  
  2888. (*
  2889.  * Class id strings for Intuition classes.
  2890.  * There's no real reason to use the uppercase constants
  2891.  * over the lowercase strings, but this makes a good place
  2892.  * to list the names of the built-in classes.
  2893.  *)
  2894.   rootClass *       = "rootclass";     (* classusr.h   *)
  2895.   imageClass *      = "imageclass";    (* imageclass.h *)
  2896.   frameIClass *     = "frameiclass";
  2897.   sysIClass *       = "sysiclass";
  2898.   fillRectClass *   = "fillrectclass";
  2899.   gadgetClass *     = "gadgetclass";   (* gadgetclass.h *)
  2900.   propGClass *      = "propgclass";
  2901.   strGClass *       = "strgclass";
  2902.   buttonGClass *    = "buttongclass";
  2903.   frButtonClass *   = "frbuttonclass";
  2904.   groupGClass *     = "groupgclass";
  2905.   icClass *         = "icclass";       (* icclass.h    *)
  2906.   modelClass *      = "modelclass";
  2907.   iTextIClass *     = "itexticlass";
  2908.   pointerClass *    = "pointerclass";  (* pointerclass.h *)
  2909.  
  2910. (* Dispatched method ID's
  2911.  * NOTE: Applications should use Intuition entry points, not direct
  2912.  * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  2913.  * SetGadgetAttrs, and GetAttr.
  2914.  *)
  2915.  
  2916.   omDummy *        = 100H;
  2917.   omNew *          = 101H; (* 'object' parameter is "true class"   *)
  2918.   omDispose *      = 102H; (* delete self (no parameters)          *)
  2919.   omSet *          = 103H; (* set attributes (in tag list)         *)
  2920.   omGet *          = 104H; (* return single attribute value        *)
  2921.   omAddTail *      = 105H; (* add self to a List (let root do it)  *)
  2922.   omRemove *       = 106H; (* remove self from list                *)
  2923.   omNotify *       = 107H; (* send to self: notify dependents      *)
  2924.   omUpdate *       = 108H; (* notification message from somebody   *)
  2925.   omAddMember *    = 109H; (* used by various classes with lists   *)
  2926.   omRemMember *    = 10AH; (* used by various classes with lists   *)
  2927.  
  2928. (* Parameter "Messages" passed to methods       *)
  2929.  
  2930. (* omNew and omSet    *)
  2931.  
  2932. TYPE
  2933.  
  2934.   OpSet * = RECORD (Msg)
  2935.     attrList * : U.TagListPtr;  (* new attributes       *)
  2936.     gInfo *    : GadgetInfoPtr; (* always there for gadgets,
  2937.                                  * when SetGadgetAttrs() is used,
  2938.                                  * but will be NULL for omNEW
  2939.                                  *)
  2940.   END; (* OpSet *)
  2941.  
  2942. (* omNOTIFY, and omUPDATE     *)
  2943.  
  2944.   OpUpdate * = RECORD (Msg)
  2945.     attrList * : U.TagListPtr;  (* new attributes       *)
  2946.     gInfo *    : GadgetInfoPtr; (* non-NULL when SetGadgetAttrs or
  2947.                                  * notification resulting from gadget
  2948.                                  * input occurs.
  2949.                                  *)
  2950.     flags *    : SET;           (* defined below        *)
  2951.   END; (* OpUpdate *)
  2952.  
  2953. CONST
  2954.  
  2955. (* this flag means that the update message is being issued from
  2956.  * something like an active gadget, a la gactFollowMouse.  When
  2957.  * the gadget goes inactive, it will issue a final update
  2958.  * message with this bit cleared.  Examples of use are for
  2959.  * gactFollowMouse equivalents for propgadclass, and repeat strobes
  2960.  * for buttons.
  2961.  *)
  2962.   opuInterim *    = 0;
  2963.  
  2964. (* omGet       *)
  2965.  
  2966. TYPE
  2967.  
  2968.   OpGet * = RECORD (Msg)
  2969.     attrID *  : E.ULONG;
  2970.     storage * : CPOINTER TO SYS.LONGWORD; (* may be other types, but "int"
  2971.                                            * types are all E.ULONG
  2972.                                            *)
  2973.   END; (* OpGet *)
  2974.  
  2975. (* omAddTail   *)
  2976.  
  2977.   OpAddTail * = RECORD (Msg)
  2978.     list * : E.ListPtr;
  2979.   END; (* OpAddTail *)
  2980.  
  2981. (* omAddMember, omRemMember   *)
  2982.  
  2983.   OpMember * = RECORD (Msg)
  2984.     object : ObjectPtr;
  2985.   END; (* OpMember *)
  2986.  
  2987. (*
  2988. **  $VER: classes.h 38.1 (11.11.91)
  2989. **
  2990. **  Used only by class implementors
  2991. *)
  2992.  
  2993.  
  2994. TYPE
  2995.  
  2996. (*******************************************)
  2997. (*** "White box" access to struct IClass ***)
  2998. (*******************************************)
  2999.  
  3000. (* This structure is READ-ONLY, and allocated only by Intuition *)
  3001.  
  3002.   IClass * = RECORD (U.Hook)
  3003.     reserved -     : E.ULONG;    (* must be 0  *)
  3004.     super -        : IClassPtr;
  3005.     id -           : ClassID;
  3006.  
  3007.     (* where within an object is the instance data for this class? *)
  3008.     instOffset -   : E.UWORD;
  3009.     instSize -     : E.UWORD;
  3010.  
  3011.     userData -     : E.ULONG;    (* per-class data of your choice *)
  3012.     subclassCount - : E.ULONG;   (* how many direct subclasses?  *)
  3013.     objectCount -  : E.ULONG;    (* how many objects created of this class? *)
  3014.     flags -        : SET;
  3015.   END; (* IClass *)
  3016.  
  3017.   Class * = IClass;
  3018.  
  3019. CONST
  3020.  
  3021.   clInList *      = 0;      (* class is in public class list *)
  3022.  
  3023. TYPE
  3024.  
  3025. (**************************************************)
  3026. (*** "White box" access to struct Object       ***)
  3027. (**************************************************)
  3028.  
  3029. (*
  3030.  * We have this, the instance data of the root class, PRECEDING
  3031.  * the "object".  This is so that Gadget objects are Gadget pointers,
  3032.  * and so on.  If this structure grows, it will always have oClass
  3033.  * at the end, so the macro OCLASS(o) will always have the same
  3034.  * offset back from the pointer returned from NewObject().
  3035.  *
  3036.  * This data structure is subject to change.  Do not use the oNode
  3037.  * embedded structure.
  3038.  *)
  3039.  
  3040.   Object * = RECORD (E.MinNode)
  3041.     class * : IClassPtr;
  3042.   END; (* Object *)
  3043.  
  3044. (*
  3045. **  $VER: gadgetclass.h 38.10 (8.1.93)
  3046. **
  3047. **  Custom and 'boopsi' gadget class interface
  3048. *)
  3049.  
  3050.  
  3051. CONST
  3052.  
  3053. (* Gadget Class attributes      *)
  3054.  
  3055.   gaDummy *             = U.tagUser  + 30000H;
  3056.   gaLeft *              = gaDummy + 0001H;
  3057.   gaRelRight *          = gaDummy + 0002H;
  3058.   gaTop *               = gaDummy + 0003H;
  3059.   gaRelBottom *         = gaDummy + 0004H;
  3060.   gaWidth *             = gaDummy + 0005H;
  3061.   gaRelWidth *          = gaDummy + 0006H;
  3062.   gaHeight *            = gaDummy + 0007H;
  3063.   gaRelHeight *         = gaDummy + 0008H;
  3064.   gaText *              = gaDummy + 0009H; (* tiData is (E.UBYTE *  *)
  3065.   gaImage *             = gaDummy + 000AH;
  3066.   gaBorder *            = gaDummy + 000BH;
  3067.   gaSelectRender *      = gaDummy + 000CH;
  3068.   gaHighlight *         = gaDummy + 000DH;
  3069.   gaDisabled *          = gaDummy + 000EH;
  3070.   gaGZZGadget *         = gaDummy + 000FH;
  3071.   gaID *                = gaDummy + 0010H;
  3072.   gaUserData *          = gaDummy + 0011H;
  3073.   gaSpecialInfo *       = gaDummy + 0012H;
  3074.   gaSelected *          = gaDummy + 0013H;
  3075.   gaEndGadget *         = gaDummy + 0014H;
  3076.   gaImmediate *         = gaDummy + 0015H;
  3077.   gaRelVerify *         = gaDummy + 0016H;
  3078.   gaFollowMouse *       = gaDummy + 0017H;
  3079.   gaRightBorder *       = gaDummy + 0018H;
  3080.   gaLeftBorder *        = gaDummy + 0019H;
  3081.   gaTopBorder *         = gaDummy + 001AH;
  3082.   gaBottomBorder *      = gaDummy + 001BH;
  3083.   gaToggleSelect *      = gaDummy + 001CH;
  3084.  
  3085.     (* internal use only, until further notice, please *)
  3086.   gaSysGadget *         = gaDummy + 001DH;
  3087.         (* bool, sets gtypSysGadget field in type      *)
  3088.   gaSysGType *          = gaDummy + 001EH;
  3089.         (* e.g., gtypWUpFront, ...     *)
  3090.  
  3091.   gaPrevious *          = gaDummy + 001FH;
  3092.         (* previous gadget (or (struct Gadget ** )) in linked list
  3093.          * NOTE: This attribute CANNOT be used to link new gadgets
  3094.          * into the gadget list of an open window or requester.
  3095.          * You must use AddGList().
  3096.          *)
  3097.  
  3098.   gaNext *              = gaDummy + 0020H;
  3099.          (* not implemented *)
  3100.  
  3101.   gaDrawInfo *          = gaDummy + 0021H;
  3102.         (* some fancy gadgets need to see a DrawInfo
  3103.          * when created or for layout
  3104.          *)
  3105.  
  3106. (* You should use at most ONE of gaText, gaIntuiText, and gaLabelImage *)
  3107.   gaIntuiText *            = gaDummy + 0022H;
  3108.         (* tiData is (struct IntuiText * ) *)
  3109.  
  3110.   gaLabelImage *           = gaDummy + 0023H;
  3111.         (* tiData is an image (object), used in place of
  3112.          * GadgetText
  3113.          *)
  3114.  
  3115.   gaTabCycle *             = gaDummy + 0024H;
  3116.         (* New for V37:
  3117.          * Boolean indicates that this gadget is to participate in
  3118.          * cycling activation with Tab or Shift-Tab.
  3119.          *)
  3120.  
  3121.   gaGadgetHelp * = gaDummy + 0025H;
  3122.         (* New for V39:
  3123.          * Boolean indicates that this gadget sends gadget-help
  3124.          *)
  3125.  
  3126.   gaBounds * = gaDummy + 0026H;
  3127.         (* New for V39:
  3128.          * ti_Data is a pointer to an IBox structure which is
  3129.          * to be copied into the extended gadget's bounds.
  3130.          *)
  3131.  
  3132.   gaRelSpecial * = gaDummy + 0027H;
  3133.         (* New for V39:
  3134.          * Boolean indicates that this gadget has the "special relativity"
  3135.          * property, which is useful for certain fancy relativity
  3136.          * operations through the gmLayout method.
  3137.          *)
  3138.  
  3139. (* PROPGCLASS attributes *)
  3140.  
  3141.   pgaDummy *       = U.tagUser   + 31000H;
  3142.   pgaFreedom *     = pgaDummy + 0001H;
  3143.         (* only one of FREEVERT or FREEHORIZ *)
  3144.   pgaBorderless *  = pgaDummy + 0002H;
  3145.   pgaHorizPot *    = pgaDummy + 0003H;
  3146.   pgaHorizBody *   = pgaDummy + 0004H;
  3147.   pgaVertPot *     = pgaDummy + 0005H;
  3148.   pgaVertBody *    = pgaDummy + 0006H;
  3149.   pgaTotal *       = pgaDummy + 0007H;
  3150.   pgaVisible *     = pgaDummy + 0008H;
  3151.   pgaTop *         = pgaDummy + 0009H;
  3152. (* New for V37: *)
  3153.   pgaNewLook *     = pgaDummy + 000AH;
  3154.  
  3155. (* STRGCLASS attributes *)
  3156.  
  3157.   stringaDummy *           = U.tagUser       + 32000H;
  3158.   stringaMaxChars *        = stringaDummy + 0001H;
  3159. (* Note:  There is a minor problem with Intuition when using boopsi integer
  3160.  * gadgets (which are requested by using stringaLongInt).  Such gadgets
  3161.  * must not have a stringaMaxChars to be bigger than 15.  Setting
  3162.  * stringaMaxChars for a boopsi integer gadget will cause a mismatched
  3163.  * FreeMem() to occur.
  3164.  *)
  3165.  
  3166.   stringaBuffer *          = stringaDummy + 0002H;
  3167.   stringaUndoBuffer *      = stringaDummy + 0003H;
  3168.   stringaWorkBuffer *      = stringaDummy + 0004H;
  3169.   stringaBufferPos *       = stringaDummy + 0005H;
  3170.   stringaDispPos *         = stringaDummy + 0006H;
  3171.   stringaAltKeyMap *       = stringaDummy + 0007H;
  3172.   stringaFont *            = stringaDummy + 0008H;
  3173.   stringaPens *            = stringaDummy + 0009H;
  3174.   stringaActivePens *      = stringaDummy + 000AH;
  3175.   stringaEditHook *        = stringaDummy + 000BH;
  3176.   stringaEditModes *       = stringaDummy + 000CH;
  3177.  
  3178. (* booleans *)
  3179.   stringaReplaceMode *     = stringaDummy + 000DH;
  3180.   stringaFixedFieldMode *  = stringaDummy + 000EH;
  3181.   stringaNoFilterMode *    = stringaDummy + 000FH;
  3182.  
  3183.   stringaJustification *   = stringaDummy + 0010H;
  3184.         (* gactSTRINGCENTER, gactSTRINGLEFT, gactSTRINGRIGHT *)
  3185.   stringaLongVal *         = stringaDummy + 0011H;
  3186.   stringaTextVal *         = stringaDummy + 0012H;
  3187.  
  3188.   stringaExitHelp *        = stringaDummy + 0013H;
  3189.         (* stringaExitHelp is new for V37, and ignored by V36.
  3190.          * Set this if you want the gadget to exit when Help is
  3191.          * pressed.  Look for a code of 5FH, the rawkey code for Help
  3192.          *)
  3193.  
  3194.   sgDefaultMaxChars *      = 128;
  3195.  
  3196. (* Gadget Layout related attributes     *)
  3197.  
  3198.   layoutaDummy *           = U.tagUser + 38000H;
  3199.   layoutaLayoutObj *       = layoutaDummy + 0001H;
  3200.   layoutaSpacing *         = layoutaDummy + 0002H;
  3201.   layoutaOrientation *     = layoutaDummy + 0003H;
  3202.  
  3203. (* orientation values   *)
  3204.   lOrientNone *    = 0;
  3205.   lOrientHoriz *   = 1;
  3206.   lOrientVert *    = 2;
  3207.  
  3208.  
  3209. (* Gadget Method ID's   *)
  3210.  
  3211.   gmDummy *        = -1;    (* not used for anything                *)
  3212.   gmHitTest *      = 0;     (* return gmrGADGETHIT if you are clicked on
  3213.                              * (whether or not you are disabled).
  3214.                              *)
  3215.   gmRender *       = 1;     (* draw yourself, in the appropriate state *)
  3216.   gmGoActive *     = 2;     (* you are now going to be fed input    *)
  3217.   gmHandleInput *  = 3;     (* handle that input                    *)
  3218.   gmGoInactive *   = 4;     (* whether or not by choice, you are done  *)
  3219.   gmHelpTest *     = 5;     (* Will you send gadget help if the mouse is
  3220.                              * at the specified coordinates?  See below
  3221.                              * for possible GMR_ values.
  3222.                              *)
  3223.   gmLayout *       = 6;     (* re-evaluate your size based on the GadgetInfo
  3224.                              * Domain.  Do NOT re-render yourself yet, you
  3225.                              * will be called when it is time...
  3226.                              *)
  3227.  
  3228. (* Parameter "Messages" passed to gadget class methods  *)
  3229.  
  3230. TYPE
  3231.  
  3232. (* gmHitTest and gmHelpTest send this message.
  3233.  * For gmHitTest, mouse are coordinates relative to the gadget
  3234.  * select box.  For gmHelpTest, the coordinates are relative to
  3235.  * the gadget bounding box (which defaults to the select box).
  3236.  *)
  3237.  
  3238.   HitTest * = RECORD (Msg)
  3239.     gInfo * : GadgetInfoPtr;
  3240.     mouse * : G.Point;
  3241.   END; (* HitTest *)
  3242.  
  3243. (* For gmHitTest, return gmrGadgetHit if you were indeed hit,
  3244.  * otherwise return zero.
  3245.  *
  3246.  * For gmHelpTest, return gmrNoHelpHit (zero) if you were not hit.
  3247.  * Typically, return gmrHelpHit if you were hit.
  3248.  * It is possible to pass a UWORD to the application via the Code field
  3249.  * of the idcmpGadgetHelp message.  Return gmrHelpCode or'd with
  3250.  * the UWORD-sized result you wish to return.
  3251.  *
  3252.  * gmrHelpHit yields a Code value of -1, which should
  3253.  * mean "nothing particular" to the application.
  3254.  *)
  3255.  
  3256. CONST
  3257.  
  3258.   gmrGadgetHit * = 000000004H;  (* gmHitTest hit *)
  3259.  
  3260.   gmrNoHelpHit * = 000000000H;  (* gmHelpTest didn't hit *)
  3261.   gmrHelpHit *   = 0FFFFFFFFH;  (* gmHelpTest hit, return code = ~0 *)
  3262.   gmrHelpCode *  = 000010000H;  (* gmHelpTest hit, return low word as code *)
  3263.  
  3264. TYPE
  3265.  
  3266. (* gmRender    *)
  3267.  
  3268.   Render * = RECORD (Msg)
  3269.     gInfo *  : GadgetInfoPtr;  (* gadget context               *)
  3270.     rPort *  : G.RastPortPtr;  (* all ready for use            *)
  3271.     redraw * : LONGINT;        (* might be a "highlight pass"  *)
  3272.   END; (* Render *)
  3273.  
  3274. CONST
  3275.  
  3276. (* values of gprRedraw *)
  3277.   gRedrawUpdate *  = 2;     (* incremental update, e.g. prop slider *)
  3278.   gRedrawRedraw *  = 1;     (* redraw gadget        *)
  3279.   gRedrawToggle *  = 0;     (* toggle highlight, if applicable      *)
  3280.  
  3281. (* gmGoActive, gmHandleInput  *)
  3282.  
  3283. TYPE
  3284.  
  3285.   Input * = RECORD (Msg)
  3286.     gInfo *       : GadgetInfoPtr;
  3287.     iEvent *      : IE.InputEventBasePtr;
  3288.     termination * : E.APTR;
  3289.     mouse *       : G.Point;
  3290.  
  3291.     (* (V39) Pointer to TabletData structure, if this event originated
  3292.      * from a tablet which sends IE.subClassNewTablet events, or NULL if
  3293.      * not.
  3294.      *
  3295.      * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
  3296.      * IT WILL BE INVALID!
  3297.      *)
  3298.     tabletData *  :  TabletDataPtr;
  3299.   END; (* Input *)
  3300.  
  3301. CONST
  3302.  
  3303. (* gmHandleInput and gmGoActive  return code flags    *)
  3304. (* return gmrMeActive (0) alone if you want more input.
  3305.  * Otherwise, return ONE of gmrNoReuse and gmrReuse, and optionally
  3306.  * gmrVerify.
  3307.  *)
  3308.   gmrMeActive *    = 0;
  3309.   gmrNoReuse *     = 2;
  3310.   gmrReuse *       = 4;
  3311.   gmrVerify *      = 8;        (* you MUST set cgpTermination *)
  3312.  
  3313. (* New for V37:
  3314.  * You can end activation with one of gmrNEXTACTIVE and gmrPREVACTIVE,
  3315.  * which instructs Intuition to activate the next or previous gadget
  3316.  * that has gflgTABCYCLE set.
  3317.  *)
  3318.   gmrNextActive *  = 16;
  3319.   gmrPrevActive *  = 32;
  3320.  
  3321. (* gmGoInactive *)
  3322.  
  3323. TYPE
  3324.  
  3325.   GoInactive * = RECORD (Msg)
  3326.     gInfo * : GadgetInfoPtr;
  3327.     (* V37 field only!  DO NOT attempt to read under V36! *)
  3328.     abort * : E.ULONG;     (* abort=1 if gadget was aborted
  3329.                             * by Intuition and 0 if gadget went
  3330.                             * inactive at its own request
  3331.                             *)
  3332.   END; (* GoInactive *)
  3333.  
  3334. (* New for V39: Intuition sends gmLayout to any grel* gadget when
  3335.  * the gadget is added to the window (or when the window opens, if
  3336.  * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
  3337.  * list), or when the window is resized.  Your gadget can set the
  3338.  * GA_RelSpecial property to get gmLayout events without Intuition
  3339.  * changing the interpretation of your gadget select box.  This
  3340.  * allows for completely arbitrary resizing/repositioning based on
  3341.  * window size.
  3342.  *)
  3343.  
  3344. (* GM_LAYOUT *)
  3345.   Layout * = RECORD (Msg)
  3346.     gInfo *   :  GadgetInfoPtr;
  3347.     initial * :  E.ULONG;       (* non-zero if this method was invoked
  3348.                                  * during AddGList() or OpenWindow()
  3349.                                  * time.  zero if this method was invoked
  3350.                                  * during window resizing.
  3351.                                  *)
  3352.   END;
  3353.  
  3354. (*
  3355. **  $VER: icclass.h 38.1 (11.11.91)
  3356. **
  3357. **  Gadget/object interconnection classes
  3358. *)
  3359.  
  3360.  
  3361. CONST
  3362.  
  3363.   icmDummy *       = 0401H;       (* used for nothing             *)
  3364.   icmSetLoop *     = 0402H;       (* set/increment loop counter   *)
  3365.   icmClearLoop *   = 0403H;       (* clear/decrement loop counter *)
  3366.   icmCheckLoop *   = 0404H;       (* set/increment loop           *)
  3367.  
  3368. (* no parameters for icmSetLoop, icmClearLoop, icmCheckLoop  *)
  3369.  
  3370. (* interconnection attributes used by icclass, modelclass, and gadgetclass *)
  3371.   icaDummy *       = U.tagUser + 40000H;
  3372.   icaTarget *      = icaDummy + 1;
  3373.         (* interconnection target               *)
  3374.   icaMap *         = icaDummy + 2;
  3375.         (* interconnection map tagitem list     *)
  3376.   icSpecialCode *  = icaDummy + 3;
  3377.         (* a "pseudo-attribute", see below.     *)
  3378.  
  3379. (* Normally, the value for icaTarget is some object pointer,
  3380.  * but if you specify the special value icTargetIDCMP, notification
  3381.  * will be send as an idcmpIDCMPUpdate message to the appropriate window's
  3382.  * IDCMP port.  See the definition of idcmpIDCMPUpdate.
  3383.  *
  3384.  * When you specify icTargetIDCMP for icaTarget, the map you
  3385.  * specify will be applied to derive the attribute list that is
  3386.  * sent with the idcmpIDCMPUpdate message.  If you specify a map list
  3387.  * which results in the attribute tag id icSpecialCode, the
  3388.  * lower sixteen bits of the corresponding tiData value will
  3389.  * be copied into the Code field of the idcmpIDCMPUpdate IntuiMessage.
  3390.  *)
  3391.   icTargetIDCMP *  = {0..31};
  3392.  
  3393. (*
  3394. **  $VER: imageclass.h 38.5 (26.3.92)
  3395. **
  3396. **  Definitions for the image classes
  3397. *)
  3398.  
  3399.  
  3400. CONST
  3401.  
  3402.   customImageDepth *        = -1;
  3403. (* if image.Depth is this, it's a new Image class object *)
  3404.  
  3405. (******************************************************)
  3406.   iaDummy *                = U.tagUser + 20000H;
  3407.   iaLeft *                 = iaDummy + 01H;
  3408.   iaTop *                  = iaDummy + 02H;
  3409.   iaWidth *                = iaDummy + 03H;
  3410.   iaHeight *               = iaDummy + 04H;
  3411.   iaFGPen *                = iaDummy + 05H;
  3412.                     (* iaFGPen also means "PlanePick"  *)
  3413.   iaBGPen *                = iaDummy + 06H;
  3414.                     (* iaBGPen also means "PlaneOnOff" *)
  3415.   iaData *                 = iaDummy + 07H;
  3416.                     (* bitplanes, for classic image,
  3417.                      * other image classes may use it for other things
  3418.                      *)
  3419.   iaLineWidth *            = iaDummy + 08H;
  3420.   iaPens *                 = iaDummy + 0EH;
  3421.                     (* pointer to E.UWORD pens[],
  3422.                      * ala DrawInfo.Pens, MUST be
  3423.                      * terminated by ~0.  Some classes can
  3424.                      * choose to have this, or sysiaDrawInfo,
  3425.                      * or both.
  3426.                      *)
  3427.   iaResolution *           = iaDummy + 0FH;
  3428.                     (* packed uwords for x/y resolution into a longword
  3429.                      * ala DrawInfo.Resolution
  3430.                      *)
  3431.  
  3432. (**** see class documentation to learn which    *****)
  3433. (**** classes recognize these                   *****)
  3434.   iaAPattern *             = iaDummy + 10H;
  3435.   iaAPatSize *             = iaDummy + 11H;
  3436.   iaMode *                 = iaDummy + 12H;
  3437.   iaFont *                 = iaDummy + 13H;
  3438.   iaOutline *              = iaDummy + 14H;
  3439.   iaRecessed *             = iaDummy + 15H;
  3440.   iaDoubleEmboss *         = iaDummy + 16H;
  3441.   iaEdgesOnly *            = iaDummy + 17H;
  3442.  
  3443. (**** "sysiclass" attributes                    *****)
  3444.   sysiaSize *              = iaDummy + 0BH;
  3445.                     (* #define's below          *)
  3446.   sysiaDepth *             = iaDummy + 0CH;
  3447.                     (* this is unused by Intuition.  sysiaDrawInfo
  3448.                      * is used instead for V36
  3449.                      *)
  3450.   sysiaWhich *             = iaDummy + 0DH;
  3451.                     (* see #define's below      *)
  3452.   sysiaDrawInfo *          = iaDummy + 18H;
  3453.                     (* pass to sysiclass, please *)
  3454.  
  3455. (*****  obsolete: don't use these, use iaPens  *****)
  3456.   sysiaPens *              = iaPens;
  3457.   iaShadowPen *            = iaDummy + 09H;
  3458.   iaHighlightPen *         = iaDummy + 0AH;
  3459.  
  3460. (* New for V39: *)
  3461.   sysiaReferenceFont * = iaDummy + 19H;
  3462.                     (* Font to use as reference for scaling
  3463.                      * certain sysiclass images
  3464.                      *)
  3465.   iaSupportsDisable * = iaDummy + 1AH;
  3466.                     (* By default, Intuition ghosts gadgets itself,
  3467.                      * instead of relying on idsDisabled or
  3468.                      * idsSelectedDisabled.  An imageclass that
  3469.                      * supports these states should return this attribute
  3470.                      * as TRUE.  You cannot set or clear this attribute,
  3471.                      * however.
  3472.                      *)
  3473.  
  3474.   iaFrameType * = iaDummy + 1BH;
  3475.                     (* Starting with V39, FrameIClass recognizes
  3476.                      * several standard types of frame.  Use one
  3477.                      * of the frame* specifiers below.  Defaults
  3478.                      * to frameDefault.
  3479.                      *)
  3480.  
  3481. (** next attribute: (iaDummy + 1CH)   **)
  3482. (*************************************************)
  3483.  
  3484. (* data values for sysiaSize   *)
  3485.   sysISizeMedRes * = 0;
  3486.   sysISizeLowRes * = 1;
  3487.   sysISizeHires *  = 2;
  3488.  
  3489. (*
  3490.  * sysiaWhich tag data values:
  3491.  * Specifies which system gadget you want an image for.
  3492.  * Some numbers correspond to internal Intuition #defines
  3493.  *)
  3494.   depthImage *      = 00H;
  3495.   zoomImage *       = 01H;
  3496.   sizeImage *       = 02H;
  3497.   closeImage *      = 03H;
  3498.   sDepthImage *     = 05H; (* screen depth gadget *)
  3499.   leftImage *       = 0AH;
  3500.   upImage *         = 0BH;
  3501.   rightImage *      = 0CH;
  3502.   downImage *       = 0DH;
  3503.   checkImage *      = 0EH;
  3504.   mxImage *         = 0FH; (* mutual exclude "button" *)
  3505. (* New for V39: *)
  3506.   menuCheck * = 10H;       (* Menu checkmark image *)
  3507.   amigaKey * = 11H;        (* Menu Amiga-key image *)
  3508.  
  3509. (* Data values for iaFrameType (recognized by FrameIClass)
  3510.  *
  3511.  * frameDefault:  The standard V37-type frame, which has
  3512.  *      thin edges.
  3513.  * frameButton:  Standard button gadget frames, having thicker
  3514.  *      sides and nicely edged corners.
  3515.  * frameRidge:  A ridge such as used by standard string gadgets.
  3516.  *      You can recess the ridge to get a groove image.
  3517.  * frameIconDropBox: A broad ridge which is the standard imagery
  3518.  *      for areas in AppWindows where icons may be dropped.
  3519.  *)
  3520.  
  3521.   frameDefault * = 0;
  3522.   frameButton * = 1;
  3523.   frameRidge * = 2;
  3524.   frameIconDropBox * = 3;
  3525.  
  3526.  
  3527. (* image message id's   *)
  3528.   imDraw *       = 202H;  (* draw yourself, with "state"          *)
  3529.   imHitTest *    = 203H;  (* return TRUE if click hits image      *)
  3530.   imErase *      = 204H;  (* erase yourself                       *)
  3531.   imMove *       = 205H;  (* draw new and erase old, smoothly     *)
  3532.  
  3533.   imDrawFrame *  = 206H;  (* draw with specified dimensions       *)
  3534.   imFrameBox *   = 207H;  (* get recommended frame around some box*)
  3535.   imHitFrame *   = 208H;  (* hittest with dimensions              *)
  3536.   imEraseFrame * = 209H;  (* hittest with dimensions              *)
  3537.  
  3538. (* image draw states or styles, for imDRAW *)
  3539. (* Note that they have no bitwise meanings (unfortunately) *)
  3540.   idsNormal *           = 0;
  3541.   idsSelected *         = 1;    (* for selected gadgets     *)
  3542.   idsDisabled *         = 2;    (* for disabled gadgets     *)
  3543.   idsBusy *             = 3;    (* for future functionality *)
  3544.   idsIndeterminate *    = 4;    (* for future functionality *)
  3545.   idsInactiveNormal *   = 5;    (* normal, in inactive window border *)
  3546.   idsInactiveSelected * = 6;    (* selected, in inactive bor`er *)
  3547.   idsInactiveDisabled * = 7;    (* disabled, in inactive border *)
  3548.   idsSelectedDisabled * = 8;    (* disabled and selected    *)
  3549.  
  3550. (* oops, please forgive spelling error by jimm *)
  3551.   idsIndeterminant * = idsIndeterminate;
  3552.  
  3553. (* imFrameBox  *)
  3554.  
  3555. TYPE
  3556.  
  3557.   FrameBox * = RECORD (Msg)
  3558.     contentsBox * : IBoxPtr;     (* input: relative box of contents *)
  3559.     frameBox *    : IBoxPtr;     (* output: rel. box of encl frame  *)
  3560.     drInfo *      : DrawInfoPtr; (* NB: May be NULL *)
  3561.     frameFlags *  : SET;
  3562.   END; (* FrameBox *)
  3563.  
  3564. CONST
  3565.  
  3566.   frameSpecify  * = 0;  (* Make do with the dimensions of FrameBox
  3567.                          * provided.
  3568.                          *)
  3569.  
  3570. (* imDraw, imDrawFrame        *)
  3571.  
  3572. TYPE
  3573.  
  3574.   Dimensions = RECORD
  3575.     width * : INTEGER;
  3576.     height * : INTEGER;
  3577.   END; (* Dimensions *)
  3578.  
  3579.   Draw * = RECORD (Msg)
  3580.     rPort *      : G.RastPortPtr;
  3581.     offset *     : G.Point;
  3582.     state *      : E.ULONG;
  3583.     drInfo *     : DrawInfoPtr;    (* NB: May be NULL *)
  3584.  
  3585.     (* these parameters only valid for imDRAWFRAME *)
  3586.     dimensions * : Dimensions;
  3587.   END; (* Draw *)
  3588.  
  3589. (* imErase, imEraseFrame      *)
  3590. (* NOTE: This is a subset of Draw    *)
  3591.  
  3592. TYPE
  3593.  
  3594.   Erase * = RECORD (Msg)
  3595.     rPort *      : G.RastPortPtr;
  3596.     offset *     : G.Point;
  3597.  
  3598.     (* these parameters only valid for imERASEFRAME *)
  3599.     dimensions * : Dimensions;
  3600.   END; (* Erase *)
  3601.  
  3602. (* imHitTest, imHitFrame      *)
  3603.  
  3604. TYPE
  3605.  
  3606.   IMHitTest * = RECORD (Msg)
  3607.     point *       : G.Point;
  3608.  
  3609.     (* these parameters only valid for imHitFrame *)
  3610.     dimensions * : Dimensions;
  3611.   END; (* IMHitTest *)
  3612.  
  3613. (*
  3614. **  $VER: pointerclass.h 39.6 (15.2.93)
  3615. **
  3616. **  'boopsi' pointer class interface
  3617. *)
  3618.  
  3619. (* The following tags are recognized at NewObject() time by
  3620.  * pointerclass:
  3621.  *
  3622.  * pointeraBitMap (BitMapPtr) - Pointer to bitmap to
  3623.  *      get pointer imagery from.  Bitplane data need not be
  3624.  *      in chip RAM.
  3625.  * pointeraXOffset (LONG) - X-offset of the pointer hotspot.
  3626.  * pointeraYOffset (LONG) - Y-offset of the pointer hotspot.
  3627.  * pointeraWordWidth (ULONG) - designed width of the pointer in words
  3628.  * pointeraXResolution (ULONG) - one of the pointerXResn* flags below
  3629.  * pointeraYResolution (ULONG) - one of the pointerYResn* flags below
  3630.  *
  3631.  *)
  3632.  
  3633. CONST
  3634.  
  3635.   pointeraDummy *       = U.tagUser + 039000H;
  3636.  
  3637.   pointeraBitMap *      = pointeraDummy + 01H;
  3638.   pointeraXOffset *     = pointeraDummy + 02H;
  3639.   pointeraYOffset *     = pointeraDummy + 03H;
  3640.   pointeraWordWidth *   = pointeraDummy + 04H;
  3641.   pointeraXResolution * = pointeraDummy + 05H;
  3642.   pointeraYResolution * = pointeraDummy + 06H;
  3643.  
  3644. (* These are the choices for the pointeraXResolution attribute which
  3645.  * will determine what resolution pixels are used for this pointer.
  3646.  *
  3647.  * pointerXResnDefault (ECS-compatible pointer width)
  3648.  *      = 70 ns if SUPERHIRES-type mode, 140 ns if not
  3649.  *
  3650.  * pointerXResnScreenRes
  3651.  *      = Same as pixel speed of screen
  3652.  *
  3653.  * pointerXResnLores (pointer always in lores-like pixels)
  3654.  *      = 140 ns in 15kHz modes, 70 ns in 31kHz modes
  3655.  *
  3656.  * pointerXResnHires (pointer always in hires-like pixels)
  3657.  *      = 70 ns in 15kHz modes, 35 ns in 31kHz modes
  3658.  *
  3659.  * pointerXResn140ns (pointer always in 140 ns pixels)
  3660.  *      = 140 ns always
  3661.  *
  3662.  * pointerXResn70ns (pointer always in 70 ns pixels)
  3663.  *      = 70 ns always
  3664.  *
  3665.  * pointerXResn35ns (pointer always in 35 ns pixels)
  3666.  *      = 35 ns always
  3667.  *)
  3668.  
  3669. CONST
  3670.  
  3671.   pointerXResnDefault *   = 0;
  3672.   pointerXResn140ns *     = 1;
  3673.   pointerXResn70ns *      = 2;
  3674.   pointerXResn35ns *      = 3;
  3675.  
  3676.   pointerXResnScreenRes * = 4;
  3677.   pointerXResnLores *     = 5;
  3678.   pointerXResnHires *     = 6;
  3679.  
  3680. (* These are the choices for the pointeraYResolution attribute which
  3681.  * will determine what vertical resolution is used for this pointer.
  3682.  *
  3683.  * pointerYResnDefault
  3684.  *      = In 15 kHz modes, the pointer resolution will be the same
  3685.  *        as a non-interlaced screen.  In 31 kHz modes, the pointer
  3686.  *        will be doubled vertically.  This means there will be about
  3687.  *        200-256 pointer lines per screen.
  3688.  *
  3689.  * pointerYResnHigh
  3690.  * pointerYResnHighAspect
  3691.  *      = Where the hardware/software supports it, the pointer resolution
  3692.  *        will be high.  This means there will be about 400-480 pointer
  3693.  *        lines per screen.  pointerYResnHighAspect also means that
  3694.  *        when the pointer comes out double-height due to hardware/software
  3695.  *        restrictions, its width would be doubled as well, if possible
  3696.  *        (to preserve aspect).
  3697.  *
  3698.  * pointerYResnScreenRes
  3699.  * pointerYResnScreenResAspect
  3700.  *      = Will attempt to match the vertical resolution of the pointer
  3701.  *        to the screen's vertical resolution.  pointerYResnScreenAspect also
  3702.  *        means that when the pointer comes out double-height due to
  3703.  *        hardware/software restrictions, its width would be doubled as well,
  3704.  *        if possible (to preserve aspect).
  3705.  *
  3706.  *)
  3707.  
  3708. CONST
  3709.  
  3710.   pointerYResnDefault * = 0;
  3711.   pointerYResnHigh * = 2;
  3712.   pointerYResnHighAspect * = 3;
  3713.   pointerYResnScreenRes * = 4;
  3714.   pointerYResnScreenResAspect * = 5;
  3715.  
  3716. (* Compatibility note:
  3717.  *
  3718.  * The AA chipset supports variable sprite width and resolution, but
  3719.  * the setting of width and resolution is global for all sprites.
  3720.  * When no other sprites are in use, Intuition controls the sprite
  3721.  * width and sprite resolution for correctness based on pointerclass
  3722.  * attributes specified by the creator of the pointer.  Intuition
  3723.  * controls sprite resolution with the vtagDefSpriteResnSet tag
  3724.  * to VideoControl().  Applications can override this on a per-viewport
  3725.  * basis with the vtagSpriteResnSet tag to VideoControl().
  3726.  *
  3727.  * If an application uses a sprite other than the pointer sprite,
  3728.  * Intuition will automatically regenerate the pointer sprite's image in
  3729.  * a compatible width.  This might involve BitMap scaling of the imagery
  3730.  * you supply.
  3731.  *
  3732.  * If any sprites other than the pointer sprite were obtained with the
  3733.  * old GetSprite() call, Intuition assumes that the owner of those
  3734.  * sprites is unaware of sprite resolution, hence Intuition will set the
  3735.  * default sprite resolution (vtagDefSpriteResnSet) to ECS-compatible,
  3736.  * instead of as requested by the various pointerclass attributes.
  3737.  *
  3738.  * No resolution fallback occurs when applications use ExtSprites.
  3739.  * Such applications are expected to use vtagSpriteResnSet tag if
  3740.  * necessary.
  3741.  *
  3742.  * NB:  Under release V39, only sprite width compatibility is implemented.
  3743.  * Sprite resolution compatibility was added for V40.
  3744.  *)
  3745.  
  3746. (*
  3747. **  $VER: iobsolete.h 38.1 (22.1.92)
  3748. **
  3749. **  Obsolete identifiers for Intuition.  Use the new ones instead!
  3750. *)
  3751.  
  3752.  
  3753. (* This file contains:
  3754.  *
  3755.  * 1.  The traditional identifiers for gadget Flags, Activation, and Type,
  3756.  * and for window Flags and IDCMP classes.  They are defined in terms
  3757.  * of their new versions, which serve to prevent confusion between
  3758.  * similar-sounding but different identifiers (like IDCMP_WINDOWACTIVE
  3759.  * and WFLG_ACTIVATE).
  3760.  *
  3761.  * 2.  Some tag names and constants whose labels were adjusted after V36.
  3762.  *
  3763.  * By default, 1 and 2 are enabled.
  3764.  *
  3765.  * #define INTUI_V36_NAMES_ONLY to exclude the traditional identifiers and
  3766.  * the original V36 names of some identifiers.
  3767.  *
  3768.  * Oberon-A note: the tags in 2 are not declared here because the only
  3769.  * difference was in case, which has already been adjusted in the
  3770.  * translation from C.
  3771.  *
  3772.  *)
  3773.  
  3774. CONST
  3775.  
  3776. (* V34-style Gadget->Flags names: *)
  3777.  
  3778.   gadgHighBits * = gflgGadgHighBits;
  3779.   gadgHComp * = gflgGadgHComp;
  3780.   gadgHBox * = gflgGadgHBox;
  3781.   gadgHImage * = gflgGadgHImage;
  3782.   gadgHNone * = gflgGadgHNone;
  3783.   gadgImage * = gflgGadgImage;
  3784.   gRelBottom * = gflgRelBottom;
  3785.   gRelRight * = gflgRelRight;
  3786.   gRelWidth * = gflgRelWidth;
  3787.   gRelHeight * = gflgRelHeight;
  3788.   selected * = gflgSelected;
  3789.   gadgDisabled * = gflgDisabled;
  3790.   labelMask * = gflgLabelMask;
  3791.   labelIText * = gflgLabelIText;
  3792.   labelString * = gflgLabelString;
  3793.   labelImage * = gflgLabelImage;
  3794.  
  3795. CONST
  3796.  
  3797. (* V34-style Gadget->Activation flag names: *)
  3798.  
  3799.   relVerify * = gactRelVerify;
  3800.   gadgImmediate * = gactImmediate;
  3801.   endGadget * = gactEndGadget;
  3802.   followMouse * = gactFollowMouse;
  3803.   rightBorder * = gactRightBorder;
  3804.   leftBorder * = gactLeftBorder;
  3805.   topBorder * = gactTopBorder;
  3806.   bottomBorder * = gactBottomBorder;
  3807.   borderSniff * = gactBorderSniff;
  3808.   toggleSelect * = gactToggleSelect;
  3809.   boolExtend * = gactBoolExtend;
  3810.   stringLeft * = gactStringLeft;
  3811.   stringCenter * = gactStringCenter;
  3812.   stringRight * = gactStringRight;
  3813.   longint * = gactLongint;
  3814.   altKeymap * = gactAltKeymap;
  3815.   stringExtend * = gactStringExtend;
  3816.   activeGadget * = gactActiveGadget;
  3817.  
  3818. CONST
  3819.  
  3820. (* V34-style Gadget->Type names: *)
  3821.  
  3822.   gadgetType * = gtypGadgetType;
  3823.   sysGadget * = gtypSysGadget;
  3824.   scrGadget * = gtypScrGadget;
  3825.   gzzGadget * = gtypGzzGadget;
  3826.   reqGadget * = gtypReqGadget;
  3827.   sizing * = gtypSizing;
  3828.   wDragging * = gtypWDragging;
  3829.   sDragging * = gtypSDragging;
  3830.   wUpFront * = gtypWUpFront;
  3831.   sUpFront * = gtypSUpFront;
  3832.   wDownBack * = gtypWDownBack;
  3833.   sDownBack * = gtypSDownBack;
  3834.   close * = gtypClose;
  3835.   boolGadget * = gtypBoolGadget;
  3836.   gadget0002 * = gtypGadget0002;
  3837.   propGadget * = gtypPropGadget;
  3838.   strGadget * = gtypStrGadget;
  3839.   customGadget * = gtypCustomGadget;
  3840.   gTypeMask * = gtypGTypeMask;
  3841.  
  3842. CONST
  3843.  
  3844. (* V34-style IDCMP class names: *)
  3845.  
  3846.   sizeVerify * = idcmpSizeVerify;
  3847.   newSize * = idcmpNewSize;
  3848.   refreshWindow * = idcmpRefreshWindow;
  3849.   mouseButtons * = idcmpMouseButtons;
  3850.   mouseMove * = idcmpMouseMove;
  3851.   gadgetDown * = idcmpGadgetDown;
  3852.   gadgetUp * = idcmpGadgetUp;
  3853.   reqSet * = idcmpReqSet;
  3854.   menuPick * = idcmpMenuPick;
  3855.   closeWindow * = idcmpCloseWindow;
  3856.   rawKey * = idcmpRawKey;
  3857.   reqVerify * = idcmpReqVerify;
  3858.   reqClear * = idcmpReqClear;
  3859.   menuVerify * = idcmpMenuVerify;
  3860.   newPrefs * = idcmpNewPrefs;
  3861.   diskInserted * = idcmpDiskInserted;
  3862.   diskRemoved * = idcmpDiskRemoved;
  3863.   wBenchMessage * = idcmpWBenchMessage;
  3864.   activeWindow * = idcmpActiveWindow;
  3865.   inactiveWindow * = idcmpInactiveWindow;
  3866.   deltaMove * = idcmpDeltaMove;
  3867.   vanillaKey * = idcmpVanillaKey;
  3868.   intuiTicks * = idcmpIntuiTicks;
  3869.   idcmpUpdate * = idcmpIdcmpUpdate;
  3870.   menuHelp * = idcmpMenuHelp;
  3871.   changeWindow * = idcmpChangeWindow;
  3872.   lonelyMessage * = idcmpLonelyMessage;
  3873.  
  3874. CONST
  3875.  
  3876. (* V34-style Window->Flags names: *)
  3877.  
  3878.   windowSizing * = wflgSizeGadget;
  3879.   windowDrag * = wflgDragBar;
  3880.   windowDepth * = wflgDepthGadget;
  3881.   windowClose * = wflgCloseGadget;
  3882.   sizeBRight * = wflgSizeBRight;
  3883.   sizeBBottom * = wflgSizeBBottom;
  3884.   refreshBits * = wflgRefreshBits;
  3885.   smartRefresh * = wflgSmartRefresh;
  3886.   simpleRefresh * = wflgSimpleRefresh;
  3887.   superBitmap * = wflgSuperBitmap;
  3888.   otherRefresh * = wflgOtherRefresh;
  3889.   backdrop * = wflgBackdrop;
  3890.   reportMouse * = wflgReportMouse;
  3891.   gimmeZeroZero * = wflgGimmeZeroZero;
  3892.   borderless * = wflgBorderless;
  3893.   activate * = wflgActivate;
  3894.   windowActive * = wflgWindowActive;
  3895.   inRequest * = wflgInRequest;
  3896.   menuState * = wflgMenuState;
  3897.   rmbTrap * = wflgRMBTrap;
  3898.   noCareRefresh * = wflgNoCareRefresh;
  3899.   windowRefresh * = wflgWindowRefresh;
  3900.   wBenchWindow * = wflgWbenchWindow;
  3901.   windowTicked * = wflgWindowTicked;
  3902.   nwExtended * = wflgNwExtended;
  3903.   visitor * = wflgVisitor;
  3904.   zoomed * = wflgZoomed;
  3905.   hasZoom * = wflgHasZoom;
  3906.  
  3907. (*
  3908. **  $VER: intuitionbase.h 38.0 (12.6.91)
  3909. **
  3910. **  Public part of IntuitionBase structure and supporting structures
  3911. *)
  3912.  
  3913.  
  3914. CONST
  3915.  
  3916. (* these are the display modes for which we have corresponding parameter
  3917.  * settings in the config arrays
  3918.  *)
  3919.   dModeCount *      = 0002H;  (* how many modes there are *)
  3920.   hiresPick *       = 0000H;
  3921.   lowresPick *      = 0001H;
  3922.  
  3923.   eventMax * = 10;             (* size of event array *)
  3924.  
  3925. (* these are the system Gadget defines *)
  3926.   resCount *        = 2;
  3927.   hiresGadget *     = 0;
  3928.   lowresGadget *    = 1;
  3929.  
  3930.   gadgetCount *     = 8;
  3931.   upFrontGadget *   = 0;
  3932.   downBackGadget *  = 1;
  3933.   sizeGadget *      = 2;
  3934.   closeGadget *     = 3;
  3935.   dragGadget *      = 4;
  3936.   sUpFrontGadget *  = 5;
  3937.   sDownBackGadget * = 6;
  3938.   sDragGadget *     = 7;
  3939.  
  3940. (* ======================================================================== *)
  3941. (* === IntuitionBase ====================================================== *)
  3942. (* ======================================================================== *)
  3943. (*
  3944.  * Be sure to protect yourself against someone modifying these data as
  3945.  * you look at them.  This is done by calling:
  3946.  *
  3947.  * lock = LockIBase(0), which returns a E.ULONG.  When done call
  3948.  * UnlockIBase(lock) where lock is what LockIBase() returned.
  3949.  *)
  3950.  
  3951. TYPE
  3952.  
  3953. (* This structure is strictly READ ONLY *)
  3954.  
  3955.   IntuitionBasePtr * = CPOINTER TO IntuitionBase;
  3956.   IntuitionBase * = RECORD (E.Library)
  3957.     viewLord -     : G.View;
  3958.  
  3959.     activeWindow - : WindowPtr;
  3960.     activeScreen - : ScreenPtr;
  3961.  
  3962.     (* the FirstScreen variable points to the frontmost Screen.  Screens are
  3963.      * then maintained in a front to back order using Screen.NextScreen
  3964.      *)
  3965.     firstScreen -  : ScreenPtr;        (* for linked list of all screens *)
  3966.  
  3967.     ibFlags -      : SET;              (* values are all system private *)
  3968.     mouseY -, mouseX - : INTEGER;
  3969.                         (* note "backwards" order of these              *)
  3970.  
  3971.     seconds -      : E.ULONG;          (* timestamp of most current input event *)
  3972.     micros -       : E.ULONG;          (* timestamp of most current input event *)
  3973.  
  3974.     (* I told you this was private.
  3975.      * The data beyond this point has changed, is changing, and
  3976.      * will continue to change.
  3977.      *)
  3978.   END; (* IntuitionBase *)
  3979.  
  3980.  
  3981. (*-- Library Base variable --------------------------------------------*)
  3982.  
  3983. VAR
  3984.  
  3985.   base * : IntuitionBasePtr;
  3986.  
  3987. CONST
  3988.  
  3989.   name * = "intuition.library";
  3990.  
  3991. (*-- Library Functions ------------------------------------------------*)
  3992.  
  3993. (*
  3994. **      $VER: intuition_protos.h 38.16 (28.8.92)
  3995. *)
  3996.  
  3997. (* Public functions OpenIntuition () and Intuition () are intentionally *)
  3998. (* not documented. *)
  3999.  
  4000. LIBCALL (base : IntuitionBasePtr) OpenIntuition * ();
  4001.   -30;
  4002. LIBCALL (base : IntuitionBasePtr) Intuition*
  4003.   ( iEvent [8] : IE.InputEventBasePtr );
  4004.   -36;
  4005. LIBCALL (base : IntuitionBasePtr) AddGadget*
  4006.   ( window     [8] : WindowPtr;
  4007.     VAR gadget [9] : Gadget;
  4008.     position   [0] : LONGINT )
  4009.   : E.UWORD;
  4010.   -42;
  4011. LIBCALL (base : IntuitionBasePtr) ClearDMRequest*
  4012.   ( window [8] : WindowPtr )
  4013.   : BOOLEAN;
  4014.   -48;
  4015. LIBCALL (base : IntuitionBasePtr) ClearMenuStrip*
  4016.   ( window [8] : WindowPtr );
  4017.   -54;
  4018. LIBCALL (base : IntuitionBasePtr) ClearPointer*
  4019.   ( window [8] : WindowPtr );
  4020.   -60;
  4021. LIBCALL (base : IntuitionBasePtr) CloseScreen*
  4022.   ( screen [8] : ScreenPtr )
  4023.   : BOOLEAN;
  4024.   -66;
  4025. LIBCALL (base : IntuitionBasePtr) OldCloseScreen*
  4026.   ( screen [8] : ScreenPtr );
  4027.   -66;
  4028. LIBCALL (base : IntuitionBasePtr) CloseWindow*
  4029.   ( window [8] : WindowPtr );
  4030.   -72;
  4031. LIBCALL (base : IntuitionBasePtr) CloseWorkBench * ()
  4032.   : BOOLEAN;
  4033.   -78;
  4034. LIBCALL (base : IntuitionBasePtr) CurrentTime*
  4035.   ( VAR seconds [8] : E.ULONG;
  4036.     VAR micros  [9] : E.ULONG );
  4037.   -84;
  4038. LIBCALL (base : IntuitionBasePtr) DisplayAlert*
  4039.   ( alertNumber [0] : E.ULONG;
  4040.     string      [8] : ARRAY OF CHAR;
  4041.     height      [1] : LONGINT )
  4042.   : BOOLEAN;
  4043.   -90;
  4044. LIBCALL (base : IntuitionBasePtr) DisplayBeep*
  4045.   ( screen [8] : ScreenPtr );
  4046.   -96;
  4047. LIBCALL (base : IntuitionBasePtr) DoubleClick*
  4048.   ( sSeconds [0] : E.ULONG;
  4049.     sMicros  [1] : E.ULONG;
  4050.     cSeconds [2] : E.ULONG;
  4051.     cMicros  [3] : E.ULONG )
  4052.   : BOOLEAN;
  4053.   -102;
  4054. LIBCALL (base : IntuitionBasePtr) DrawBorder*
  4055.   ( rp         [8] : G.RastPortPtr;
  4056.     border     [9] : BorderPtr;
  4057.     leftOffset [0] : LONGINT;
  4058.     topOffset  [1] : LONGINT );
  4059.   -108;
  4060. LIBCALL (base : IntuitionBasePtr) DrawImage*
  4061.   ( rp         [8] : G.RastPortPtr;
  4062.     VAR image  [9] : Image;
  4063.     leftOffset [0] : LONGINT;
  4064.     topOffset  [1] : LONGINT );
  4065.   -114;
  4066. LIBCALL (base : IntuitionBasePtr) EndRequest*
  4067.   ( requester [8] : RequesterPtr;
  4068.     window    [9] : WindowPtr );
  4069.   -120;
  4070. LIBCALL (base : IntuitionBasePtr) GetDefPrefs*
  4071.   ( VAR preferences [8] : ARRAY OF SYS.BYTE;
  4072.     size            [0] : LONGINT );
  4073.   -126;
  4074. LIBCALL (base : IntuitionBasePtr) GetPrefs*
  4075.   ( VAR preferences [8] : ARRAY OF SYS.BYTE;
  4076.     size            [0] : LONGINT );
  4077.   -132;
  4078. LIBCALL (base : IntuitionBasePtr) InitRequester*
  4079.   ( VAR requester [8] : Requester );
  4080.   -138;
  4081. LIBCALL (base : IntuitionBasePtr) ItemAddress*
  4082.   ( VAR menuStrip [8] : Menu;
  4083.     menuNumber    [0] : LONGINT )
  4084.   : MenuItemPtr;
  4085.   -144;
  4086. LIBCALL (base : IntuitionBasePtr) ModifyIDCMP*
  4087.   ( window [8] : WindowPtr;
  4088.     flags  [0] : SET )
  4089.   : BOOLEAN;
  4090.   -150;
  4091. LIBCALL (base : IntuitionBasePtr) OldModifyIDCMP*
  4092.   ( window [8] : WindowPtr;
  4093.     flags  [0] : SET );
  4094.   -150;
  4095. LIBCALL (base : IntuitionBasePtr) ModifyProp*
  4096.   ( VAR gadget [8] : Gadget;
  4097.     window     [9] : WindowPtr;
  4098.     requester [10] : RequesterPtr;
  4099.     flags      [0] : E.WSET;
  4100.     horizPot   [1] : LONGINT;
  4101.     vertPot    [2] : LONGINT;
  4102.     horizBody  [3] : LONGINT;
  4103.     vertBody   [4] : LONGINT );
  4104.   -156;
  4105. LIBCALL (base : IntuitionBasePtr) MoveScreen*
  4106.   ( screen [8] : ScreenPtr;
  4107.     dx     [0] : LONGINT;
  4108.     dy     [1] : LONGINT );
  4109.   -162;
  4110. LIBCALL (base : IntuitionBasePtr) MoveWindow*
  4111.   ( window [8] : WindowPtr;
  4112.     dx     [0] : LONGINT;
  4113.     dy     [1] : LONGINT );
  4114.   -168;
  4115. LIBCALL (base : IntuitionBasePtr) OffGadget*
  4116.   ( VAR gadget [8] : Gadget;
  4117.     window     [9] : WindowPtr;
  4118.     requester [10] : RequesterPtr );
  4119.   -174;
  4120. LIBCALL (base : IntuitionBasePtr) OffMenu*
  4121.   ( window     [8] : WindowPtr;
  4122.     menuNumber [0] : E.ULONG );
  4123.   -180;
  4124. LIBCALL (base : IntuitionBasePtr) OnGadget*
  4125.   ( VAR gadget [8] : Gadget;
  4126.     window     [9] : WindowPtr;
  4127.     requester [10] : RequesterPtr );
  4128.   -186;
  4129. LIBCALL (base : IntuitionBasePtr) OnMenu*
  4130.   ( window     [8] : WindowPtr;
  4131.     menuNumber [0] : E.ULONG );
  4132.   -192;
  4133. LIBCALL (base : IntuitionBasePtr) OpenScreen*
  4134.   ( VAR newScreen [8] : NewScreen )
  4135.   : ScreenPtr;
  4136.   -198;
  4137. LIBCALL (base : IntuitionBasePtr) OpenWindow*
  4138.   ( VAR newWindow [8] : NewWindow )
  4139.   : WindowPtr;
  4140.   -204;
  4141. LIBCALL (base : IntuitionBasePtr) OpenWorkBench * ()
  4142.   : ScreenPtr;
  4143.   -210;
  4144. LIBCALL (base : IntuitionBasePtr) PrintIText*
  4145.   ( rp        [8] : G.RastPortPtr;
  4146.     VAR iText [9] : IntuiText;
  4147.     left      [0] : LONGINT;
  4148.     top       [1] : LONGINT );
  4149.   -216;
  4150. LIBCALL (base : IntuitionBasePtr) RefreshGadgets*
  4151.   ( gadgets    [8] : GadgetPtr;
  4152.     window     [9] : WindowPtr;
  4153.     requester [10] : RequesterPtr );
  4154.   -222;
  4155. LIBCALL (base : IntuitionBasePtr) RemoveGadget*
  4156.   ( window     [8] : WindowPtr;
  4157.     VAR gadget [9] : Gadget )
  4158.   : E.UWORD;
  4159.   -228;
  4160.  
  4161. (* The official calling sequence for ReportMouse is given below. *)
  4162. (* Note the register order.  For the complete story; read the ReportMouse *)
  4163. (* autodoc. *)
  4164.  
  4165. LIBCALL (base : IntuitionBasePtr) ReportMouse*
  4166.   ( window [8] : WindowPtr;
  4167.     flag   [0] : E.LBOOL );
  4168.   -234;
  4169. LIBCALL (base : IntuitionBasePtr) Request*
  4170.   ( requester [8] : RequesterPtr;
  4171.     window    [9] : WindowPtr )
  4172.   : BOOLEAN;
  4173.   -240;
  4174. LIBCALL (base : IntuitionBasePtr) ScreenToBack*
  4175.   ( screen [8] : ScreenPtr );
  4176.   -246;
  4177. LIBCALL (base : IntuitionBasePtr) ScreenToFront*
  4178.   ( screen [8] : ScreenPtr );
  4179.   -252;
  4180. LIBCALL (base : IntuitionBasePtr) SetDMRequest*
  4181.   ( window    [8] : WindowPtr;
  4182.     requester [9] : RequesterPtr )
  4183.   : BOOLEAN;
  4184.   -258;
  4185. LIBCALL (base : IntuitionBasePtr) SetMenuStrip*
  4186.   ( window   [8] : WindowPtr;
  4187.     VAR menu [9] : Menu )
  4188.   : BOOLEAN;
  4189.   -264;
  4190. LIBCALL (base : IntuitionBasePtr) SetPointer*
  4191.   ( window  [8] : WindowPtr;
  4192.     pointer [9] : ARRAY OF SYS.BYTE;
  4193.     height  [0] : LONGINT;
  4194.     width   [1] : LONGINT;
  4195.     xOffset [2] : LONGINT;
  4196.     yOffset [3] : LONGINT );
  4197.   -270;
  4198. LIBCALL (base : IntuitionBasePtr) SetWindowTitles*
  4199.   ( window       [8] : WindowPtr;
  4200.     windowTitle  [9] : E.STRPTR;
  4201.     screenTitle [10] : E.STRPTR );
  4202.   -276;
  4203. LIBCALL (base : IntuitionBasePtr) ShowTitle*
  4204.   ( screen [8] : ScreenPtr;
  4205.     showIt [0] : E.LBOOL );
  4206.   -282;
  4207. LIBCALL (base : IntuitionBasePtr) SizeWindow*
  4208.   ( window [8] : WindowPtr;
  4209.     dx     [0] : LONGINT;
  4210.     dy     [1] : LONGINT );
  4211.   -288;
  4212. LIBCALL (base : IntuitionBasePtr) ViewAddress * ()
  4213.   : G.ViewPtr;
  4214.   -294;
  4215. LIBCALL (base : IntuitionBasePtr) ViewPortAddress*
  4216.   ( window [8] : WindowPtr )
  4217.   : G.ViewPortPtr;
  4218.   -300;
  4219. LIBCALL (base : IntuitionBasePtr) WindowToBack*
  4220.   ( window [8] : WindowPtr );
  4221.   -306;
  4222. LIBCALL (base : IntuitionBasePtr) WindowToFront*
  4223.   ( window [8] : WindowPtr );
  4224.   -312;
  4225. LIBCALL (base : IntuitionBasePtr) WindowLimits*
  4226.   ( window    [8] : WindowPtr;
  4227.     widthMin  [0] : LONGINT;
  4228.     heightMin [1] : LONGINT;
  4229.     widthMax  [2] : LONGINT;
  4230.     heightMax [3] : LONGINT )
  4231.   : BOOLEAN;
  4232.   -318;
  4233.  
  4234. (* --- start of next generation of names -------------------------------------*)
  4235.  
  4236. LIBCALL (base : IntuitionBasePtr) SetPrefs*
  4237.   ( preferences [8] : ARRAY OF SYS.BYTE;
  4238.     size        [0] : LONGINT;
  4239.     inform      [1] : E.LBOOL );
  4240.   -324;
  4241.  
  4242. (* --- start of next next generation of names --------------------------------*)
  4243.  
  4244. LIBCALL (base : IntuitionBasePtr) IntuiTextLength*
  4245.   ( VAR iText [8] : IntuiText )
  4246.   : INTEGER;
  4247.   -330;
  4248. LIBCALL (base : IntuitionBasePtr) WBenchToBack * ()
  4249.   : BOOLEAN;
  4250.   -336;
  4251. LIBCALL (base : IntuitionBasePtr) WBenchToFront * ()
  4252.   : BOOLEAN;
  4253.   -342;
  4254.  
  4255. (* --- start of next next next generation of names ---------------------------*)
  4256.  
  4257. LIBCALL (base : IntuitionBasePtr) AutoRequest*
  4258.   ( window   [8] : WindowPtr;
  4259.     body     [9] : IntuiTextPtr;
  4260.     posText [10] : IntuiTextPtr;
  4261.     negText [11] : IntuiTextPtr;
  4262.     pFlag    [0] : SET;
  4263.     nFlag    [1] : SET;
  4264.     width    [2] : LONGINT;
  4265.     height   [3] : LONGINT )
  4266.   : BOOLEAN;
  4267.   -348;
  4268. LIBCALL (base : IntuitionBasePtr) BeginRefresh*
  4269.   ( window [8] : WindowPtr );
  4270.   -354;
  4271. LIBCALL (base : IntuitionBasePtr) BuildSysRequest*
  4272.   ( window   [8] : WindowPtr;
  4273.     body     [9] : IntuiTextPtr;
  4274.     posText [10] : IntuiTextPtr;
  4275.     negText [11] : IntuiTextPtr;
  4276.     flags    [0] : SET;
  4277.     width    [1] : LONGINT;
  4278.     height   [2] : LONGINT )
  4279.   : WindowPtr;
  4280.   -360;
  4281. LIBCALL (base : IntuitionBasePtr) EndRefresh*
  4282.   ( window   [8] : WindowPtr;
  4283.     complete [0] : E.LBOOL );
  4284.   -366;
  4285. LIBCALL (base : IntuitionBasePtr) FreeSysRequest*
  4286.   ( window [8] : WindowPtr );
  4287.   -372;
  4288. LIBCALL (base : IntuitionBasePtr) MakeScreen*
  4289.   ( screen [8] : ScreenPtr );
  4290.   -378;
  4291. LIBCALL (base : IntuitionBasePtr) RemakeDisplay * ();
  4292.   -384;
  4293. LIBCALL (base : IntuitionBasePtr) RethinkDisplay * ();
  4294.   -390;
  4295.  
  4296. (* --- start of next next next next generation of names ----------------------*)
  4297.  
  4298. LIBCALL (base : IntuitionBasePtr) AllocRemember*
  4299.   ( VAR rememberKey [8] : RememberPtr;
  4300.     size            [0] : E.ULONG;
  4301.     flags           [1] : SET )
  4302.   : E.APTR;
  4303.   -396;
  4304.  
  4305. (* Public function AlohaWorkbench () is intentionally not documented *)
  4306.  
  4307. LIBCALL (base : IntuitionBasePtr) AlohaWorkbench*
  4308.   ( wbport [8] : E.MsgPortPtr );
  4309.   -402;
  4310. LIBCALL (base : IntuitionBasePtr) FreeRemember*
  4311.   ( VAR rememberPtr [8] : RememberPtr;
  4312.     reallyForget    [0] : E.LBOOL );
  4313.   -408;
  4314.  
  4315. (* --- start of 15 Nov 85 names ------------------------*)
  4316.  
  4317. LIBCALL (base : IntuitionBasePtr) LockIBase*
  4318.   ( dontknow [0] : E.ULONG )
  4319.   : E.ULONG;
  4320.   -414;
  4321. LIBCALL (base : IntuitionBasePtr) UnlockIBase*
  4322.   ( ibLock [8] : E.ULONG );
  4323.   -420;
  4324.  
  4325. (* --- functions in V33 or higher (distributed as Release 1.2) ---*)
  4326.  
  4327. LIBCALL (base : IntuitionBasePtr) GetScreenData*
  4328.   ( VAR buffer [8] : Screen;
  4329.     size       [0] : E.ULONG;
  4330.     type       [1] : E.WSET;
  4331.     screen     [9] : ScreenPtr )
  4332.   : BOOLEAN;
  4333.   -426;
  4334. LIBCALL (base : IntuitionBasePtr) RefreshGList*
  4335.   ( gadgets    [8] : GadgetPtr;
  4336.     window     [9] : WindowPtr;
  4337.     requester [10] : RequesterPtr;
  4338.     numGad     [0] : LONGINT );
  4339.   -432;
  4340. LIBCALL (base : IntuitionBasePtr) AddGList*
  4341.   ( window     [8] : WindowPtr;
  4342.     gadget     [9] : GadgetPtr;
  4343.     position   [0] : LONGINT;
  4344.     numGad     [1] : LONGINT;
  4345.     requester [10] : RequesterPtr )
  4346.   : E.UWORD;
  4347.   -438;
  4348. LIBCALL (base : IntuitionBasePtr) RemoveGList*
  4349.   ( remPtr [8] : WindowPtr;
  4350.     gadget [9] : GadgetPtr;
  4351.     numGad [0] : LONGINT )
  4352.   : E.UWORD;
  4353.   -444;
  4354. LIBCALL (base : IntuitionBasePtr) ActivateWindow*
  4355.   ( window [8] : WindowPtr );
  4356.   -450;
  4357. LIBCALL (base : IntuitionBasePtr) RefreshWindowFrame*
  4358.   ( window [8] : WindowPtr );
  4359.   -456;
  4360. LIBCALL (base : IntuitionBasePtr) ActivateGadget*
  4361.   ( VAR gadgets [8] : Gadget;
  4362.     window      [9] : WindowPtr;
  4363.     requester  [10] : RequesterPtr )
  4364.   : BOOLEAN;
  4365.   -462;
  4366. LIBCALL (base : IntuitionBasePtr) NewModifyProp*
  4367.   ( VAR gadget [8] : Gadget;
  4368.     window     [9] : WindowPtr;
  4369.     requester [10] : RequesterPtr;
  4370.     flags      [0] : E.WSET;
  4371.     horizPot   [1] : LONGINT;
  4372.     vertPot    [2] : LONGINT;
  4373.     horizBody  [3] : LONGINT;
  4374.     vertBody   [4] : LONGINT;
  4375.     numGad     [5] : LONGINT );
  4376.   -468;
  4377.  
  4378. (* --- functions in V36 or higher (distributed as Release 2.0) ---*)
  4379.  
  4380. LIBCALL (base : IntuitionBasePtr) QueryOverscan*
  4381.   ( displayID [8] : E.ULONG;
  4382.     VAR rect  [9] : G.Rectangle;
  4383.     oScanType [0] : LONGINT )
  4384.   : LONGINT;
  4385.   -474;
  4386. LIBCALL (base : IntuitionBasePtr) MoveWindowInFrontOf*
  4387.   ( window       [8] : WindowPtr;
  4388.     behindWindow [9] : WindowPtr );
  4389.   -480;
  4390. LIBCALL (base : IntuitionBasePtr) ChangeWindowBox*
  4391.   ( window [8] : WindowPtr;
  4392.     left   [0] : LONGINT;
  4393.     top    [1] : LONGINT;
  4394.     width  [2] : LONGINT;
  4395.     height [3] : LONGINT );
  4396.   -486;
  4397. LIBCALL (base : IntuitionBasePtr) SetEditHook*
  4398.   ( hook [8] : U.HookPtr )
  4399.   : U.HookPtr;
  4400.   -492;
  4401. LIBCALL (base : IntuitionBasePtr) SetMouseQueue*
  4402.   ( window      [8] : WindowPtr;
  4403.     queueLength [0] : LONGINT )
  4404.   : LONGINT;
  4405.   -498;
  4406. LIBCALL (base : IntuitionBasePtr) ZipWindow*
  4407.   ( window [8] : WindowPtr );
  4408.   -504;
  4409.  
  4410. (* --- public screens ---*)
  4411.  
  4412. LIBCALL (base : IntuitionBasePtr) LockPubScreen*
  4413.   ( name [8] : ARRAY OF CHAR )
  4414.   : ScreenPtr;
  4415.   -510;
  4416. LIBCALL (base : IntuitionBasePtr) UnlockPubScreen*
  4417.   ( name   [8] : ARRAY OF CHAR;
  4418.     screen [9] : ScreenPtr );
  4419.   -516;
  4420. LIBCALL (base : IntuitionBasePtr) LockPubScreenList * ()
  4421.   : E.ListPtr;
  4422.   -522;
  4423. LIBCALL (base : IntuitionBasePtr) UnlockPubScreenList * ();
  4424.   -528;
  4425. LIBCALL (base : IntuitionBasePtr) NextPubScreen*
  4426.   ( screen      [8] : ScreenPtr;
  4427.     VAR nameBuf [9] : ARRAY OF CHAR )
  4428.   : E.STRPTR;
  4429.   -534;
  4430. LIBCALL (base : IntuitionBasePtr) SetDefaultPubScreen*
  4431.   ( name [8] : ARRAY OF CHAR );
  4432.   -540;
  4433. LIBCALL (base : IntuitionBasePtr) SetPubScreenModes*
  4434.   ( modes [0] : E.WSET )
  4435.   : E.WSET;
  4436.   -546;
  4437. LIBCALL (base : IntuitionBasePtr) PubScreenStatus*
  4438.   ( screen      [8] : ScreenPtr;
  4439.     statusFlags [0] : E.WSET )
  4440.   : E.WSET;
  4441.   -552;
  4442.  
  4443. LIBCALL (base : IntuitionBasePtr) ObtainGIRPort*
  4444.   ( gInfo [8] : GadgetInfoPtr )
  4445.   : G.RastPortPtr;
  4446.   -558;
  4447. LIBCALL (base : IntuitionBasePtr) ReleaseGIRPort*
  4448.   ( rp [8] : G.RastPortPtr );
  4449.   -564;
  4450. LIBCALL (base : IntuitionBasePtr) GadgetMouse*
  4451.   ( VAR gadget      [8] : Gadget;
  4452.     gInfo           [9] : GadgetInfoPtr;
  4453.     VAR mousePoint [10] : G.Point );
  4454.   -570;
  4455. LIBCALL (base : IntuitionBasePtr) GetDefaultPubScreen*
  4456.   ( VAR nameBuffer [8] : ARRAY OF CHAR );
  4457.   -582;
  4458. LIBCALL (base : IntuitionBasePtr) EasyRequestArgs*
  4459.   ( window     [8] : WindowPtr;
  4460.     easyStruct [9] : EasyStructPtr;
  4461.     idcmpPtr  [10] : E.APTR;
  4462.     args      [11] : ARRAY OF SYS.LONGWORD )
  4463.   : LONGINT;
  4464.   -588;
  4465. LIBCALL (base : IntuitionBasePtr) EasyRequest*
  4466.   ( window     [8]   : WindowPtr;
  4467.     easyStruct [9]   : EasyStructPtr;
  4468.     idcmpPtr  [10]   : E.APTR;
  4469.     args      [11].. : SYS.LONGWORD )
  4470.   : LONGINT;
  4471.   -588;
  4472. LIBCALL (base : IntuitionBasePtr) BuildEasyRequestArgs*
  4473.   ( window     [8] : WindowPtr;
  4474.     easyStruct [9] : EasyStructPtr;
  4475.     idcmp      [0] : SET;
  4476.     args      [10] : ARRAY OF SYS.LONGWORD )
  4477.   : WindowPtr;
  4478.   -594;
  4479. LIBCALL (base : IntuitionBasePtr) BuildEasyRequest*
  4480.   ( window     [8]   : WindowPtr;
  4481.     easyStruct [9]   : EasyStructPtr;
  4482.     idcmp      [0]   : SET;
  4483.     args      [10].. : SYS.LONGWORD )
  4484.   : WindowPtr;
  4485.   -594;
  4486. LIBCALL (base : IntuitionBasePtr) SysReqHandler*
  4487.   ( window    [8] : WindowPtr;
  4488.     idcmpPtr  [9] : E.APTR;
  4489.     waitInput [0] : E.LBOOL )
  4490.   : LONGINT;
  4491.   -600;
  4492. LIBCALL (base : IntuitionBasePtr) OpenWindowTagList*
  4493.   ( VAR newWindow [8] : NewWindow;
  4494.     tagList       [9] : ARRAY OF U.TagItem )
  4495.   : WindowPtr;
  4496.   -606;
  4497. LIBCALL (base : IntuitionBasePtr) OpenWindowTags*
  4498.   ( VAR newWindow [8]   : NewWindow;
  4499.     tagList       [9].. : U.Tag )
  4500.   : WindowPtr;
  4501.   -606;
  4502. LIBCALL (base : IntuitionBasePtr) OpenWindowTagListA*
  4503.   ( newWindow [8] : NewWindowPtr;
  4504.     tagList   [9] : ARRAY OF U.TagItem )
  4505.   : WindowPtr;
  4506.   -606;
  4507. LIBCALL (base : IntuitionBasePtr) OpenWindowTagsA*
  4508.   ( newWindow [8]   : NewWindowPtr;
  4509.     tagList   [9].. : U.Tag )
  4510.   : WindowPtr;
  4511.   -606;
  4512. LIBCALL (base : IntuitionBasePtr) OpenScreenTagList*
  4513.   ( VAR newScreen [8] : NewScreen;
  4514.     tagList       [9] : ARRAY OF U.TagItem )
  4515.   : ScreenPtr;
  4516.   -612;
  4517. LIBCALL (base : IntuitionBasePtr) OpenScreenTags*
  4518.   ( VAR newScreen [8]   : NewScreen;
  4519.     tagList       [9].. : U.Tag )
  4520.   : ScreenPtr;
  4521.   -612;
  4522. LIBCALL (base : IntuitionBasePtr) OpenScreenTagListA*
  4523.   ( newScreen [8] : NewScreenPtr;
  4524.     tagList   [9] : ARRAY OF U.TagItem )
  4525.   : ScreenPtr;
  4526.   -612;
  4527. LIBCALL (base : IntuitionBasePtr) OpenScreenTagsA*
  4528.   ( newScreen [8]   : NewScreenPtr;
  4529.     tagList   [9].. : U.Tag )
  4530.   : ScreenPtr;
  4531.   -612;
  4532.  
  4533. (*      new Image functions *)
  4534.  
  4535. LIBCALL (base : IntuitionBasePtr) DrawImageState*
  4536.   ( rp         [8] : G.RastPortPtr;
  4537.     VAR image  [9] : Image;
  4538.     leftOffset [0] : LONGINT;
  4539.     topOffset  [1] : LONGINT;
  4540.     state      [2] : E.ULONG;
  4541.     drawInfo  [10] : DrawInfoPtr );
  4542.   -618;
  4543. LIBCALL (base : IntuitionBasePtr) PointInImage*
  4544.   ( point     [0] : E.ULONG;
  4545.     VAR image [8] : Image )
  4546.   : BOOLEAN;
  4547.   -624;
  4548. LIBCALL (base : IntuitionBasePtr) EraseImage*
  4549.   ( rp         [8] : G.RastPortPtr;
  4550.     VAR image  [9] : Image;
  4551.     leftOffset [0] : LONGINT;
  4552.     topOffset  [1] : LONGINT );
  4553.   -630;
  4554.  
  4555. LIBCALL (base : IntuitionBasePtr) NewObjectA*
  4556.   ( classPtr [8] : IClassPtr;
  4557.     classID  [9] : ARRAY OF CHAR;
  4558.     tagList [10] : ARRAY OF U.TagItem )
  4559.   : E.APTR;
  4560.   -636;
  4561. LIBCALL (base : IntuitionBasePtr) NewObject*
  4562.   ( classPtr [8]   : IClassPtr;
  4563.     classID  [9]   : ARRAY OF CHAR;
  4564.     tagList [10].. : U.Tag )
  4565.   : E.APTR;
  4566.   -636;
  4567.  
  4568. LIBCALL (base : IntuitionBasePtr) DisposeObject*
  4569.   ( object [8] : E.APTR );
  4570.   -642;
  4571. LIBCALL (base : IntuitionBasePtr) SetAttrsA*
  4572.   ( object  [8] : E.APTR;
  4573.     tagList [9] : ARRAY OF U.TagItem )
  4574.   : E.ULONG;
  4575.   -648;
  4576. LIBCALL (base : IntuitionBasePtr) SetAttrs*
  4577.   ( object  [8]   : E.APTR;
  4578.     tagList [9].. : U.Tag )
  4579.   : E.ULONG;
  4580.   -648;
  4581.  
  4582. LIBCALL (base : IntuitionBasePtr) GetAttr*
  4583.   ( attrID      [0] : E.ULONG;
  4584.     object      [8] : E.APTR;
  4585.     VAR storage [9] : ARRAY OF SYS.BYTE )
  4586.   : E.ULONG;
  4587.   -654;
  4588.  
  4589. (*      special set attribute call for gadgets *)
  4590.  
  4591. LIBCALL (base : IntuitionBasePtr) SetGadgetAttrsA*
  4592.   ( VAR gadget [8] : Gadget;
  4593.     window     [9] : WindowPtr;
  4594.     requester [10] : RequesterPtr;
  4595.     tagList   [11] : ARRAY OF U.TagItem )
  4596.   : E.ULONG;
  4597.   -660;
  4598. LIBCALL (base : IntuitionBasePtr) SetGadgetAttrs*
  4599.   ( VAR gadget [8]   : Gadget;
  4600.     window     [9]   : WindowPtr;
  4601.     requester [10]   : RequesterPtr;
  4602.     tagList   [11].. : U.Tag )
  4603.   : E.ULONG;
  4604.   -660;
  4605.  
  4606. (*      for class implementors only *)
  4607.  
  4608. LIBCALL (base : IntuitionBasePtr) NextObject*
  4609.   ( VAR objectPtr [8] : ObjectPtr )
  4610.   : E.APTR;
  4611.   -666;
  4612. LIBCALL (base : IntuitionBasePtr) MakeClass*
  4613.   ( classID        [8] : ARRAY OF CHAR;
  4614.     superClassID   [9] : ARRAY OF CHAR;
  4615.     superClassPtr [10] : IClassPtr;
  4616.     instanceSize   [0] : LONGINT;
  4617.     flags          [1] : SET )
  4618.   : IClassPtr;
  4619.   -678;
  4620. LIBCALL (base : IntuitionBasePtr) AddClass*
  4621.   ( classPtr [8] : IClassPtr );
  4622.   -684;
  4623.  
  4624.  
  4625. LIBCALL (base : IntuitionBasePtr) GetScreenDrawInfo*
  4626.   ( screen [8] : ScreenPtr ) : DrawInfoPtr;
  4627.   -690;
  4628. LIBCALL (base : IntuitionBasePtr) FreeScreenDrawInfo*
  4629.   ( screen   [8] : ScreenPtr;
  4630.     drawInfo [9] : DrawInfoPtr );
  4631.   -696;
  4632.  
  4633. LIBCALL (base : IntuitionBasePtr) ResetMenuStrip*
  4634.   ( window   [8] : WindowPtr;
  4635.     VAR menu [9] : Menu )
  4636.   : BOOLEAN;
  4637.   -702;
  4638. LIBCALL (base : IntuitionBasePtr) RemoveClass*
  4639.   ( classPtr [8] : IClassPtr );
  4640.   -708;
  4641. LIBCALL (base : IntuitionBasePtr) FreeClass*
  4642.   ( classPtr [8] : IClassPtr )
  4643.   : BOOLEAN;
  4644.   -714;
  4645.  
  4646. (*--- functions in V39 or higher (Release 3) ---*)
  4647.  
  4648. LIBCALL (base : IntuitionBasePtr) AllocScreenBuffer *
  4649.   ( sc    [8] : ScreenPtr;
  4650.     bm    [9] : G.BitMapPtr;
  4651.     flags [0] : SET )
  4652.   : ScreenBufferPtr;
  4653.   -768;
  4654. LIBCALL (base : IntuitionBasePtr) FreeScreenBuffer *
  4655.   ( sc [8] : ScreenPtr;
  4656.     sb [9] : ScreenBufferPtr );
  4657.   -774;
  4658. LIBCALL (base : IntuitionBasePtr) ChangeScreenBuffer *
  4659.   ( sc [8] : ScreenPtr;
  4660.     sb [9] : ScreenBufferPtr )
  4661.   : BOOLEAN;
  4662.   -780;
  4663. LIBCALL (base : IntuitionBasePtr) ScreenDepth *
  4664.   ( screen   [8] : ScreenPtr;
  4665.     flags    [0] : SET;
  4666.     reserved [9] : E.APTR );
  4667.   -786;
  4668. LIBCALL (base : IntuitionBasePtr) ScreenPosition *
  4669.   ( screen [8] : ScreenPtr;
  4670.     flags  [0] : SET;
  4671.     x1     [1] : LONGINT;
  4672.     y1     [2] : LONGINT;
  4673.     x2     [3] : LONGINT;
  4674.     y2     [4] : LONGINT );
  4675.   -792;
  4676. LIBCALL (base : IntuitionBasePtr) ScrollWindowRaster *
  4677.   ( win  [9] : WindowPtr;
  4678.     dx   [0] : LONGINT;
  4679.     dy   [1] : LONGINT;
  4680.     xMin [2] : LONGINT;
  4681.     yMin [3] : LONGINT;
  4682.     xMax [4] : LONGINT;
  4683.     yMax [5] : LONGINT );
  4684.   -798;
  4685. LIBCALL (base : IntuitionBasePtr) LendMenus *
  4686.   ( fromwindow [8] : WindowPtr;
  4687.     towindow   [9] : WindowPtr );
  4688.   -804;
  4689. LIBCALL (base : IntuitionBasePtr) DoGadgetMethodA *
  4690.   ( gad          [8] : GadgetPtr;
  4691.     win          [9] : WindowPtr;
  4692.     req         [10] : RequesterPtr;
  4693.     VAR message [11] : Msg )
  4694.   : E.ULONG;
  4695.   -810;
  4696. LIBCALL (base : IntuitionBasePtr) DoGadgetMethod *
  4697.   ( gad      [8]  : GadgetPtr;
  4698.     win      [9]  : WindowPtr;
  4699.     req     [10]  : RequesterPtr;
  4700.     message [11]..: SYS.LONGWORD )
  4701.   : E.ULONG;
  4702.   -810;
  4703. LIBCALL (base : IntuitionBasePtr) SetWindowPointerA *
  4704.   ( win     [8] : WindowPtr;
  4705.     taglist [9] : ARRAY OF U.TagItem );
  4706.   -816;
  4707. LIBCALL (base : IntuitionBasePtr) SetWindowPointer *
  4708.   ( win     [8]  : WindowPtr;
  4709.     taglist [9]..: U.Tag );
  4710.   -816;
  4711. LIBCALL (base : IntuitionBasePtr) TimedDisplayAlert *
  4712.   ( alertNumber [0] : E.ULONG;
  4713.     string      [8] : ARRAY OF CHAR;
  4714.     height      [1] : E.ULONG;
  4715.     time        [9] : E.ULONG )
  4716.   : BOOLEAN;
  4717.   -822;
  4718. LIBCALL (base : IntuitionBasePtr) HelpControl *
  4719.   ( win   [8] : WindowPtr;
  4720.     flags [0] : SET );
  4721.   -828;
  4722.  
  4723.  
  4724. (*-- C Macros defined as procedures -----------------------------------*)
  4725. (* $L+ Absolute long addressing for globals *)
  4726.  
  4727.  
  4728. (*-----------------------------------*)
  4729. PROCEDURE MenuNum * (n : INTEGER) : INTEGER;
  4730.  
  4731. BEGIN (* MenuNum *)
  4732.   RETURN SYS.AND (n, 01FH)
  4733. END MenuNum;
  4734.  
  4735. (*-----------------------------------*)
  4736. PROCEDURE ItemNum * (n : INTEGER) : INTEGER;
  4737.  
  4738. BEGIN (* ItemNum *)
  4739.   RETURN SYS.AND (SYS.LSH (n, -5), 03FH)
  4740. END ItemNum;
  4741.  
  4742. (*-----------------------------------*)
  4743. PROCEDURE SubNum * (n : INTEGER) : INTEGER;
  4744.  
  4745. BEGIN (* SubNum *)
  4746.   RETURN SYS.AND (SYS.LSH (n, -11), 01FH)
  4747. END SubNum;
  4748.  
  4749. (*-----------------------------------*)
  4750. PROCEDURE ShiftMenu * (n : INTEGER) : INTEGER;
  4751.  
  4752. BEGIN (* ShiftMenu *)
  4753.   RETURN SYS.AND (n, 01FH)
  4754. END ShiftMenu;
  4755.  
  4756. (*-----------------------------------*)
  4757. PROCEDURE ShiftItem * (n : INTEGER) : INTEGER;
  4758.  
  4759. BEGIN (* ShiftItem *)
  4760.   RETURN SYS.LSH (SYS.AND (n, 03FH), 5)
  4761. END ShiftItem;
  4762.  
  4763. (*-----------------------------------*)
  4764. PROCEDURE ShiftSub * (n : INTEGER) : INTEGER;
  4765.  
  4766. BEGIN (* ShiftSub *)
  4767.   RETURN SYS.LSH (SYS.AND (n, 01FH), 11)
  4768. END ShiftSub;
  4769.  
  4770. (*-----------------------------------*)
  4771. PROCEDURE FullMenuNum * (menu, item, sub : INTEGER) : INTEGER;
  4772.  
  4773. BEGIN (* FullMenuNum *)
  4774.   RETURN ShiftMenu (menu) + ShiftItem (item) + ShiftSub (sub)
  4775. END FullMenuNum;
  4776.  
  4777. (*------------------------------------*)
  4778. PROCEDURE SRBNum * ( n : E.UBYTE ) : SHORTINT;
  4779. (* SerRWBits -> read bits per char *)
  4780. BEGIN (* SRBNum *)
  4781.   RETURN (8 - SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
  4782. END SRBNum;
  4783.  
  4784. (*------------------------------------*)
  4785. PROCEDURE SWBNum * ( n : E.UBYTE ) : SHORTINT;
  4786. (* SerRWBits -> write bits per chr *)
  4787. BEGIN (* SWBNum *)
  4788.   RETURN (8 - SYS.VAL (SHORTINT, SYS.AND (n, 0FH)))
  4789. END SWBNum;
  4790.  
  4791.  
  4792. (*------------------------------------*)
  4793. PROCEDURE SSBNum * ( n : E.UBYTE ) : SHORTINT;
  4794. (* SerStopBuf -> stop bits per chr *)
  4795. BEGIN (* SSBNum *)
  4796.   RETURN (1 + SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
  4797. END SSBNum;
  4798.  
  4799.  
  4800. (*------------------------------------*)
  4801. PROCEDURE SParNum * ( n : E.UBYTE ) : SHORTINT;
  4802. (* SerParShk -> parity setting    *)
  4803. BEGIN (* SParNum *)
  4804.   RETURN SYS.LSH (n, -4)
  4805. END SParNum;
  4806.  
  4807.  
  4808. (*------------------------------------*)
  4809. PROCEDURE ShakNum * ( n : E.UBYTE ) : SHORTINT;
  4810. (* SerParShk -> handshake mode    *)
  4811. BEGIN (* ShakNum *)
  4812.   RETURN SYS.AND (n, 0FH)
  4813. END ShakNum;
  4814.  
  4815. (* some convenient macros and casts *)
  4816.  
  4817. (*-----------------------------------*)
  4818. PROCEDURE GadgetBox * (VAR g : Gadget) : IBoxPtr;
  4819.  
  4820. BEGIN (* GadgetBox *)
  4821.   RETURN SYS.ADR (g.leftEdge)
  4822. END GadgetBox;
  4823.  
  4824. (*-----------------------------------*)
  4825. PROCEDURE IMBox * (VAR im : Image) : IBoxPtr;
  4826.  
  4827. BEGIN (* IMBox *)
  4828.   RETURN SYS.ADR (im.leftEdge)
  4829. END IMBox;
  4830.  
  4831. (*-----------------------------------*)
  4832. PROCEDURE FGPen * (VAR im : Image) : SHORTINT;
  4833.  
  4834. BEGIN (* FGPen *)
  4835.   RETURN SYS.VAL (SHORTINT, im.planePick)
  4836. END FGPen;
  4837.  
  4838. (*-----------------------------------*)
  4839. PROCEDURE BGPen * (VAR im : Image) : SHORTINT;
  4840.  
  4841. BEGIN (* BGPen *)
  4842.   RETURN SYS.VAL (SHORTINT, im.planeOnOff)
  4843. END BGPen;
  4844.  
  4845. (*-----------------------------------*)
  4846. PROCEDURE CustomHook * (VAR gadget : Gadget) : U.HookPtr;
  4847. (* this casts MutualExclude for easy assignment of a hook
  4848.  * pointer to the unused MutualExclude field of a custom gadget
  4849.  *)
  4850.  
  4851. BEGIN (* CustomHook *)
  4852.   RETURN SYS.VAL (U.HookPtr, gadget.mutualExclude)
  4853. END CustomHook;
  4854.  
  4855. (*------------------------------------*)
  4856. PROCEDURE InstData* (cl : IClassPtr; o : ObjectPtr) : E.APTR;
  4857. BEGIN
  4858.   RETURN SYS.VAL (E.APTR, (SYS.VAL(LONGINT,o) + LONG(cl.instOffset)));
  4859. END InstData;
  4860.  
  4861. (*------------------------------------*)
  4862. PROCEDURE SizeOfInstance* (cl : IClassPtr) : LONGINT;
  4863. BEGIN
  4864.   RETURN cl.instOffset + cl.instSize + SIZE(Object);
  4865. END SizeOfInstance;
  4866.  
  4867. (*------------------------------------*)
  4868. PROCEDURE BaseObject * ( obj : ObjectPtr ) : ObjectPtr;
  4869. BEGIN (* BaseObject *)
  4870.   RETURN SYS.VAL (ObjectPtr, SYS.VAL (LONGINT, obj) + SIZE (Object));
  4871. END BaseObject;
  4872.  
  4873. (*------------------------------------*)
  4874. PROCEDURE OClass* (o : ObjectPtr) : IClassPtr;
  4875. BEGIN
  4876.   o := SYS.VAL (ObjectPtr, SYS.VAL (LONGINT, o) - SIZE (Object));
  4877.   RETURN o.class
  4878. END OClass;
  4879.  
  4880. (*-- Library Base variable --------------------------------------------*)
  4881. (* $L- Address globals through A4 *)
  4882.  
  4883.  
  4884. PROCEDURE* Close ();
  4885.  
  4886. BEGIN (* Close *)
  4887.   IF base # NIL THEN E.base.CloseLibrary (base) END
  4888. END Close;
  4889.  
  4890. BEGIN (* Library *)
  4891.   base :=
  4892.     SYS.VAL
  4893.       ( IntuitionBasePtr,
  4894.         E.base.OpenLibrary (name, E.libraryMinimum));
  4895.   IF base = NIL THEN HALT (100) END;
  4896.   SYS.SETCLEANUP (Close)
  4897. END Intuition.
  4898.