home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / IntuitionD.def < prev    next >
Text File  |  1996-07-29  |  88KB  |  2,467 lines

  1. (**************************************************************************)
  2. (*                                                                        *)
  3. (* Definition Module IntuitionD.Def Marcel Timmermans.                    *)
  4. (* Date     : 19 Feb 1994                                                 *)
  5. (* Language : Modula-2                                                    *)
  6. (*                                                                        *)
  7. (**************************************************************************)
  8.  
  9. (*$ Implementation- *)
  10. DEFINITION MODULE IntuitionD;
  11.  
  12. FROM SYSTEM IMPORT ADDRESS,SHORTSET,BITSET,BYTE,LONGSET,CAST;
  13.  
  14. FROM ExecD IMPORT
  15.  Interrupt,IOStdReq,Library,List,ListPtr,MemReqSet,Message,MinNode,
  16.  MsgPortPtr,SignalSemaphore,Node,TaskPtr;
  17.  
  18. FROM GraphicsD IMPORT
  19.  jam2,BitMap,BitMapPtr,ClipRect,DBufInfoPtr,DrawModeSet,GfxBasePtr,
  20.  LayerInfo,LayerPtr,Point,RastPort,RastPortPtr,RegionPtr,
  21.  SimpleSpritePtr,TextAttr,TextAttrPtr,TextFontPtr,TmpRas,View,
  22.  ViewModeSet,ViewPort,ViewPortPtr,ViewPtr;
  23.  
  24. FROM UtilityD IMPORT
  25.  TagItemPtr,tagUser,HookPtr,Hook;
  26.  
  27. FROM InputEvent IMPORT
  28.  lButton,rButton,upPrefix,InputEvent,InputEventPtr,
  29.  Qualifiers,QualifierSet,mButton;
  30.  
  31. FROM Timer IMPORT TimeVal;
  32. FROM KeyMapD IMPORT KeyMapPtr;
  33.  
  34. CONST
  35.  intuitionName="intuition.library";
  36.  
  37. (*
  38.  * All pointers are listed here (sorted), because many records have 
  39.  * references to all kind of pointers.
  40.  *)
  41.  
  42. TYPE
  43.  BoolInfoPtr=POINTER TO BoolInfo;
  44.  BorderPtr=POINTER TO Border;
  45.  ColorSpecPtr=POINTER TO ColorSpec;
  46.  DrawInfoPtr=POINTER TO DrawInfo;
  47.  EasyStructPtr=POINTER TO EasyStruct;
  48.  ExtIntuiMessagePtr=POINTER TO ExtIntuiMessage;
  49.  ExtGadgetPtr=POINTER TO ExtGadget;
  50.  ExtNewScreenPtr=POINTER TO ExtNewScreen;
  51.  ExtNewWindowPtr=POINTER TO ExtNewWindow;
  52.  GadgetInfoPtr=POINTER TO GadgetInfo;
  53.  GadgetPtr=POINTER TO Gadget;
  54.  GpGoInactivePtr=POINTER TO GpGoInactive;
  55.  GpHitTestPtr=POINTER TO GpHitTest;
  56.  GpInputPtr=POINTER TO GpInput;
  57.  GpLayoutPtr=POINTER TO GpLayout;
  58.  GpRenderPtr=POINTER TO GpRender;
  59.  IBoxPtr=POINTER TO IBox;
  60.  IClassPtr=POINTER TO IClass;
  61.  ImagePtr=POINTER TO Image;
  62.  ImpDrawPtr=POINTER TO ImpDraw;
  63.  ImpErasePtr=POINTER TO ImpErase;
  64.  ImpFrameBoxPtr=POINTER TO ImpFrameBox;
  65.  ImpHitTestPtr=POINTER TO ImpHitTest;
  66.  IntuiMessagePtr=POINTER TO IntuiMessage;
  67.  IntuiTextPtr=POINTER TO IntuiText;
  68.  IntuitionBasePtr=POINTER TO IntuitionBase;
  69.  MenuItemPtr=POINTER TO MenuItem;
  70.  MenuPtr=POINTER TO Menu;
  71.  NewScreenPtr=POINTER TO NewScreen;
  72.  NewWindowPtr=POINTER TO NewWindow;
  73.  OpGetPtr=POINTER TO OpGet;
  74.  ObjectPtr=POINTER TO Object;
  75.  OpAddTailPtr=POINTER TO OpAddTail;
  76.  OpSetPtr=POINTER TO OpSet;
  77.  OpMemberPtr=POINTER TO OpMember;
  78.  OpUpdatePtr=POINTER TO OpUpdate;
  79.  PGXPtr=POINTER TO PGX;
  80.  PreferencesPtr=POINTER TO Preferences;
  81.  PropInfoPtr=POINTER TO PropInfo;
  82.  PubScreenNodePtr=POINTER TO PubScreenNode;
  83.  RememberPtr=POINTER TO Remember;
  84.  RequesterPtr=POINTER TO Requester;
  85.  ScreenBufferPtr=POINTER TO ScreenBuffer;
  86.  ScreenPtr=POINTER TO Screen;
  87.  StringExtendPtr=POINTER TO StringExtend;
  88.  StringInfoPtr=POINTER TO StringInfo;
  89.  TabletDataPtr=POINTER TO TabletData;
  90.  TabletHookDataPtr=POINTER TO TabletHookData;
  91.  WindowPtr=POINTER TO Window;
  92.  
  93. (*- intuition.h -*)
  94. (* ======================================================================== *)
  95. (* === Menu =============================================================== *)
  96. (* ======================================================================== *)
  97. TYPE
  98.  Menu=RECORD
  99.   nextMenu:MenuPtr;         (* same level *)                  
  100.   leftEdge,topEdge:INTEGER; (* position of the select box *)
  101.   width,height:INTEGER;     (* dimensions of the select box *)      
  102.   flags:BITSET;             (* see flag definitions below *) 
  103.   menuName:ADDRESS;         (* text for this Menu Header *)   
  104.   firstItem:MenuItemPtr;
  105.   (* these mysteriously-named variables are for internal use only *)
  106.   jazzX,jazzY,beatX,beatY:INTEGER;
  107.  END;
  108.  
  109. (* FLAGS SET BY THE APPLIPROG *)
  110.  MenuItemFlags=(
  111.   checkIt,itemText,commSeq,menuToggle,itemEnabled,mif5,
  112.   highComp,highBox,checked,mif9,mif10,mif11,isDrawn,
  113.   highItem,menuToggled,mif15
  114.  );
  115.  MenuItemFlagSet=SET OF MenuItemFlags;
  116.  
  117.  
  118. CONST
  119.  menuEnabled=0;
  120.  highImage=MenuItemFlagSet{};
  121.  highFlags=MenuItemFlagSet{highBox,highComp};
  122.  highNone=MenuItemFlagSet{highBox,highComp};
  123.  
  124. TYPE
  125. (* ======================================================================== *)
  126. (* === MenuItem =========================================================== *)
  127. (* ======================================================================== *)
  128.  MenuItem=RECORD
  129.   nextItem:MenuItemPtr;     (* pointer to next in chained list *)
  130.   leftEdge,topEdge:INTEGER; (* position of the select box *)
  131.   width,height:INTEGER;     (* dimensions of the select box *)
  132.   flags:MenuItemFlagSet;    (* see the defines above *)          
  133.  
  134.   mutualExclude:LONGSET;    (* set bits mean this item excludes that *)
  135.   itemFill:ADDRESS;         (* points to Image, IntuiText, or NULL *)
  136.  
  137.   (* when this item is pointed to by the cursor and the items highlight
  138.    * mode HIGHIMAGE is selected, this alternate image will be displayed
  139.    *)
  140.   selectFill:ADDRESS;       (* points to Image, IntuiText, or NULL *)
  141.   command:CHAR;             (* only if appliprog sets the COMMSEQ flag *)
  142.   subItem:MenuItemPtr;      (* if non-zero, points to MenuItem for submenu *)
  143.  
  144.   (* The NextSelect field represents the menu number of next selected
  145.    *    item (when user has drag-selected several items)
  146.    *)
  147.   nextSelect:CARDINAL;  
  148.  END;
  149.  
  150. (* FLAGS SET BY THE APPLIPROG *)
  151.  RequesterFlags=(
  152.   pointRel,preDrawn,noisyReq,rf3,simpleReq,
  153.   (* New for V36        *)
  154.   useReqImage,noReqBackFill,rf7,rf8,rf9,rf10,rf11,
  155.   (* FLAGS SET BY INTUITION *)
  156.   reqOffWindow,reqActive,sysRequest,deferRefresh
  157.  );
  158.  RequesterFlagSet=SET OF RequesterFlags;
  159.  
  160.  Requester=RECORD
  161.   olderRequest:RequesterPtr;
  162.   leftEdge,topEdge:INTEGER; (* dimensions of the entire box *)
  163.   width,height:INTEGER;     (* dimensions of the entire box *)
  164.   relLeft,relTop:INTEGER;   (* for Pointer relativity offsets *)
  165.   reqGadget:GadgetPtr;      (* pointer to a list of Gadgets *)
  166.   reqBorder:BorderPtr;      (* the box's border *)
  167.   reqText:IntuiTextPtr;     (* the box's text *)
  168.   flags:RequesterFlagSet;   (* see definitions above *)         
  169.   backFill:SHORTCARD;       (* pen number for back-plane fill before draws *)
  170.   reqLayer:LayerPtr;        (* Layer in place of clip rect    *)
  171.   reqPad1:ARRAY [0..31] OF BYTE;
  172.  
  173.     (* If the BitMap plane pointers are non-zero, this tells the system
  174.      * that the image comes pre-drawn (if the appliprog wants to define
  175.      * its own box, in any shape or size it wants!);  this is OK by
  176.      * Intuition as long as there's a good correspondence between
  177.      * the image and the specified Gadgets
  178.      *)
  179.   imageBMap:BitMapPtr;  (* points to the BitMap of PREDRAWN imagery *)
  180.   rWindow:WindowPtr;    (* added.  points back to Window *)            
  181.   reqImage:ImagePtr;    (* new for V36: drawn if USEREQIMAGE set *)
  182.   reqPad2:ARRAY [0..31] OF BYTE;
  183.  END;
  184.  
  185.  GadgetFlags=(
  186.   gadgHBox,gadgHImage,gadgImage,gRelBottom,gRelRight,
  187.   gRelWidth,gRelHeight,selected,gadgDisabled,
  188.   tabCycle,stringExtend,imageDisable,
  189.   labelString,labelImage,
  190.   relSpecial,gfExtended
  191.  );
  192.  GadgetFlagSet=SET OF GadgetFlags;
  193.  
  194. TYPE
  195.  ActivationFlags=(
  196.   relVerify,gadgImmediate,endGadget,followMouse,
  197.   rightBorder,leftBorder,topBorder,bottomBorder,
  198.   toggleSelect,stringCenter,stringRight,longint,
  199.   altKeyMap,boolExtend,activeGadget,borderSniff
  200.  );
  201.  ActivationFlagSet=SET OF ActivationFlags;
  202.  
  203. CONST
  204.  gadgHighbits=CAST(GadgetFlagSet,03H);
  205.  gadgHNone=GadgetFlagSet{gadgHBox,gadgHImage};
  206.  gadgHComp=GadgetFlagSet{};
  207.  
  208.  gadgetType=CAST(BITSET,0FC00H);  (* all Gadget Global Type flags (padded) *)
  209.  sysGadget=8000H; (* 1 = Allocated by the system, 0 = by app. *)
  210.  scrGadget=4000H; (* 1 = ScreenGadget, 0 = WindowGadget *)
  211.  gzzGadget=2000H; (* 1 = for WFLG_GIMMEZEROZERO borders *)
  212.  reqGadget=1000H; (* 1 = this is a Requester Gadget *)          
  213.  
  214.  sizing=0010H;
  215.  wDragging=0020H;
  216.  sDragging=0030H;
  217.  wUpFront=0040H;
  218.  sUpFront=0050H;
  219.  wDownBack=0060H;
  220.  sDownBack=0070H;
  221.  close=0080H;
  222.  
  223. (* application gadgets *)
  224.  boolGadget=0001H;
  225.  gadget0002=0002H;
  226.  propGadget=0003H;
  227.  strGadget=0004H;
  228.  customGadget=0005H;
  229.  
  230. (* This bit in GadgetType is reserved for undocumented internal use
  231.  * by the Gadget Toolkit, and cannot be used nor relied on by
  232.  * applications:    0x0100
  233.  *)
  234.  
  235. (* New for V39.  Gadgets which have the GFLG_EXTENDED flag set are
  236.  * actually ExtGadgets, which have more flags.    The GMORE_xxx
  237.  * identifiers describe those flags:
  238.  *)
  239.  gMoreBounds=0;
  240.  gMoreGadgetHelp=1;
  241.  gMoreScrollRaster=2;
  242.  
  243. TYPE
  244. (* ======================================================================== *)
  245. (* === Gadget ============================================================= *)
  246. (* ======================================================================== *)
  247.  Gadget=RECORD
  248.   nextGadget:GadgetPtr;     (* next gadget in the list *)
  249.   leftEdge,topEdge:INTEGER; (* "hit box" of gadget *)
  250.   width,height:INTEGER;     (* "hit box" of gadget *)    
  251.   flags:GadgetFlagSet;      (* see above for list of defines *)
  252.   activation:ActivationFlagSet; (* see above for list of defines *)
  253.   gadgetType:CARDINAL;
  254.  
  255.   (* appliprog can specify that the Gadget be rendered as either as Border
  256.    * or an Image.  This variable points to which (or equals NULL if there's
  257.    * nothing to be rendered about this Gadget)
  258.    *)
  259.   gadgetRender:ADDRESS;
  260.  
  261.   (* appliprog can specify "highlighted" imagery rather than algorithmic
  262.    * this can point to either Border or Image data
  263.    *)
  264.   selectRender:ADDRESS;
  265.   gadgetText:IntuiTextPtr;  (* text for this gadget *)
  266.  
  267.     (* MutualExclude, never implemented, is now declared obsolete.
  268.      * There are published examples of implementing a more general
  269.      * and practical exclusion in your applications.
  270.      *
  271.      * Starting with V36, this field is used to point to a hook
  272.      * for a custom gadget.
  273.      *
  274.      * Programs using this field for their own processing will
  275.      * continue to work, as long as they don't try the
  276.      * trick with custom gadgets.
  277.      *)
  278.   CASE :INTEGER OF
  279.   |0: mutualExclude:LONGSET;
  280.   |1: hp:HookPtr;
  281.   END;
  282.   (* pointer to a structure of special data required by Proportional,
  283.    * String and Integer Gadgets
  284.    *)
  285.   specialInfo:ADDRESS;
  286.   gadgetID:INTEGER; (* user-definable ID field *)
  287.   userData:ADDRESS; (* ptr to general purpose User data (ignored by In) *)
  288.  END;
  289.  
  290.  ExtGadget=RECORD
  291.   g:Gadget; (* This fields match struct Gadget exactly *)
  292.   (* These fields only exist under V39 and only if GFLG_EXTENDED is set *)
  293.   moreFlags:LONGSET;        (* see GMORE_ flags above *)
  294.   boundsLeftEdge:INTEGER;   (* Bounding extent for gadget, valid   *)
  295.   boundsTopEdge:INTEGER;    (* only if GMORE_BOUNDS is set.  The   *)
  296.   boundsWidth:INTEGER;      (* GFLG_RELxxx flags affect these      *)
  297.   boundsHeight:INTEGER;     (* coordinates as well.           *)        
  298.  END;
  299.  
  300. CONST
  301. (* set BoolInfo.Flags to this flag bit.
  302.  * in the future, additional bits might mean more stuff hanging
  303.  * off of BoolInfo.Reserved.
  304.  *)
  305.  boolMask=1H; (* extension is for masked gadget *)
  306.  
  307. TYPE
  308. (* ======================================================================== *)
  309. (* === BoolInfo======================================================= *)
  310. (* ======================================================================== *)
  311. (* This is the special data needed by an Extended Boolean Gadget
  312.  * Typically this structure will be pointed to by the Gadget field SpecialInfo
  313.  *)
  314.  BoolInfo=RECORD
  315.   flags:BITSET; (* defined above *)
  316.   mask:ADDRESS;    (* bit mask for highlighting and selecting
  317.                      * mask must follow the same rules as an Image
  318.                  * plane.  Its width and height are determined
  319.                      * by the width and height of the gadget's
  320.                      * select box. (i.e. Gadget.Width and .Height).
  321.                      *)
  322.  
  323.   reserved:LONGCARD; (* set to 0    *)
  324.  END;
  325.  
  326. (* --- FLAG BITS ---------------------------------------------------------- *)
  327. (* NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  328.  * you are currently limited to using a single Image of your own
  329.  * design: Intuition won't handle a linked list of images as
  330.  * a proportional gadget knob.
  331.  *)
  332.  PropInfoFlags=(
  333.   autoKnob,freeHoriz,freeVert,propBorderless,
  334.   propNewLook,pf5,pf6,pf7,
  335.   knobHit,pf9,pf10,pf11,pf12,pf13,pf14,pf15
  336.  );
  337.  PropInfoFlagSet=SET OF PropInfoFlags;
  338.  
  339. CONST
  340.  knobVmin=4;
  341.  knobHmin=6;
  342.  maxBody=0FFFFH;
  343.  maxPot=0FFFFH;
  344.  
  345. (* ======================================================================== *)
  346. (* === PropInfo =========================================================== *)
  347. (* ======================================================================== *)
  348. (* this is the special data required by the proportional Gadget
  349.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  350.  *)
  351. TYPE
  352.  PropInfo=RECORD
  353.   flags:PropInfoFlagSet;(* general purpose flag bits (see defines above) *)
  354.  
  355.     (* You initialize the Pot variables before the Gadget is added to
  356.      * the system.  Then you can look here for the current settings
  357.      * any time, even while User is playing with this Gadget.  To
  358.      * adjust these after the Gadget is added to the System, use
  359.      * ModifyProp();  The Pots are the actual proportional settings,
  360.      * where a value of zero means zero and a value of MAXPOT means
  361.      * that the Gadget is set to its maximum setting.
  362.      *)
  363.  
  364.   horizPot:CARDINAL; (* 16-bit FixedPoint horizontal quantity percentage *)
  365.   vertPot:CARDINAL;  (* 16-bit FixedPoint vertical quantity percentage *)  
  366.  
  367.     (* the 16-bit FixedPoint Body variables describe what percentage of
  368.      * the entire body of stuff referred to by this Gadget is actually
  369.      * shown at one time.  This is used with the AUTOKNOB routines,
  370.      * to adjust the size of the AUTOKNOB according to how much of
  371.      * the data can be seen.  This is also used to decide how far
  372.      * to advance the Pots when User hits the Container of the Gadget.
  373.      * For instance, if you were controlling the display of a 5-line
  374.      * Window of text with this Gadget, and there was a total of 15
  375.      * lines that could be displayed, you would set the VertBody value to
  376.      *       (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  377.      * Therefore, the AUTOKNOB would fill 1/3 of the container, and
  378.      * if User hits the Cotainer outside of the knob, the pot would
  379.      * advance 1/3 (plus or minus) If there's no body to show, or
  380.      * the total amount of displayable info is less than the display area,
  381.      * set the Body variables to the MAX.  To adjust these after the
  382.      * Gadget is added to the System, use ModifyProp();
  383.      *)
  384.   horizBody:CARDINAL; (* horizontal Body *)
  385.   vertBody:CARDINAL;  (* vertical Body *)  
  386.  
  387.     (* these are the variables that Intuition sets and maintains *)
  388.   cWidth:CARDINAL;  (* Container width (with any relativity absoluted) *)
  389.   cHeight:CARDINAL; (* Container height (with any relativity absoluted) *)
  390.   hPotRes,vPotRes:CARDINAL; (* pot increments *)
  391.   leftBorder:CARDINAL;  (* Container borders *)
  392.   topBorder:CARDINAL;   (* Container borders *)
  393.  END;
  394.  
  395. (* ======================================================================== *)
  396. (* === StringInfo ========================================================= *)
  397. (* ======================================================================== *)
  398. (* this is the special data required by the string Gadget
  399.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  400.  *)
  401. TYPE
  402.  StringInfo=RECORD
  403.     (* you initialize these variables, and then Intuition maintains them *)
  404.   buffer:ADDRESS;     (* the buffer containing the start and final string *)
  405.   undoBuffer:ADDRESS; (* optional buffer for undoing current entry *)
  406.   bufferPos:INTEGER;  (* character position in Buffer *)
  407.   maxChars:INTEGER;   (* max number of chars in Buffer (including NULL) *)
  408.   dispPos:INTEGER;    (* Buffer position of first displayed character *)    
  409.  
  410.     (* Intuition initializes and maintains these variables for you *)
  411.   undoPos:INTEGER;    (* character position in the undo buffer *)
  412.   numChars:INTEGER;   (* number of characters currently in Buffer *)
  413.   dispCount:INTEGER;  (* number of whole characters visible in Container *)
  414.   cLeft,cTop:INTEGER; (* topleft offset of the container *)                 
  415.  
  416.     (* This unused field is changed to allow extended specification
  417.      * of string gadget parameters.  It is ignored unless the flag
  418.      * GACT_STRINGEXTEND is set in the Gadget's Activation field
  419.      * or the GFLG_STRINGEXTEND flag is set in the Gadget Flags field.
  420.      * (See GFLG_STRINGEXTEND for an important note)
  421.      *)
  422.     (* struct Layer *LayerPtr;    --- obsolete --- *)
  423.   extension:StringExtendPtr;
  424.  
  425.  (* you can initialize this variable before the gadget is submitted to
  426.      * Intuition, and then examine it later to discover what integer
  427.      * the user has entered (if the user never plays with the gadget,
  428.      * the value will be unchanged from your initial setting)
  429.      *)
  430.      longInt:LONGINT;
  431.     (* If you want this Gadget to use your own Console keymapping, you
  432.      * set the GACT_ALTKEYMAP bit in the Activation flags of the Gadget,
  433.      * and then set this variable to point to your keymap.  If you don't
  434.      * set the GACT_ALTKEYMAP, you'll get the standard ASCII keymapping.
  435.      *)
  436.   altKeyMap:KeyMapPtr;
  437.  END;
  438.  
  439. CONST
  440.  autoFrontPen=0;
  441.  autoBackPen=1;
  442.  autoDrawMode=jam2;
  443.  autoLeftEdge=6;
  444.  autoTopEdge=3;
  445.  autoITextFont=NIL;
  446.  autoNextText=NIL;
  447.  
  448. (* ======================================================================== *)
  449. (* === IntuiText ========================================================== *)
  450. (* ======================================================================== *)
  451. (* IntuiText is a series of strings that start with a location
  452.  *  (always relative to the upper-left corner of something) and then the
  453.  *  text of the string.  The text is null-terminated.
  454.  *)
  455. TYPE
  456.  IntuiText=RECORD
  457.   frontPen,backPen:SHORTCARD; (* the pen numbers for the rendering *)
  458.   drawMode:DrawModeSet;       (* the mode for rendering the text *)
  459.   leftEdge:INTEGER;           (* relative start location for the text *)
  460.   topEdge:INTEGER;            (* relative start location for the text *)
  461.   iTextFont:TextAttrPtr;      (* if NULL, you accept the default *)
  462.   iText:ADDRESS;              (* pointer to null-terminated text *)
  463.   nextText:IntuiTextPtr;      (* pointer to another IntuiText to render *)
  464.  END;
  465.  
  466. (* ======================================================================== *)
  467. (* === Border ============================================================= *)
  468. (* ======================================================================== *)
  469. (* Data type Border, used for drawing a series of lines which is intended for
  470.  *  use as a border drawing, but which may, in fact, be used to render any
  471.  *  arbitrary vector shape.
  472.  *  The routine DrawBorder sets up the RastPort with the appropriate
  473.  *  variables, then does a Move to the first coordinate, then does Draws
  474.  *  to the subsequent coordinates.
  475.  *  After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  476.  *  on NextBorder
  477.  *)
  478.  Border=RECORD
  479.   leftEdge,topEdge:INTEGER;   (* initial offsets from the origin *)
  480.   frontPen,backPen:SHORTCARD; (* pens numbers for rendering *)
  481.   drawMode:DrawModeSet;       (* mode for rendering *)
  482.   count:SHORTCARD;            (* number of XY pairs *)
  483.   xy:ADDRESS;                 (* vector coordinate pairs rel to LeftTop *)
  484.   nextBorder:BorderPtr;       (* pointer to any other Border too *)       
  485.  END;
  486.  
  487. (* ======================================================================== *)
  488. (* === Image ============================================================== *)
  489. (* ======================================================================== *)
  490. (* This is a brief image structure for very simple transfers of
  491.  * image data to a RastPort
  492.  *)
  493.  Image=RECORD
  494.   leftEdge:INTEGER; (* starting offset relative to some origin *)
  495.   topEdge:INTEGER;  (* starting offsets relative to some origin *)
  496.   width:INTEGER;    (* pixel size (though data is word-aligned) *)
  497.   height:INTEGER;
  498.   depth:INTEGER;
  499.   imageData:ADDRESS;  (* >= 0, for images you create        *)
  500.  
  501.     (* the PlanePick and PlaneOnOff variables work much the same way as the
  502.      * equivalent GELS Bob variables.  It's a space-saving
  503.      * mechanism for image data.  Rather than defining the image data
  504.      * for every plane of the RastPort, you need define data only
  505.      * for the planes that are not entirely zero or one.  As you
  506.      * define your Imagery, you will often find that most of the planes
  507.      * ARE just as color selectors.  For instance, if you're designing
  508.      * a two-color Gadget to use colors one and three, and the Gadget
  509.      * will reside in a five-plane display, bit plane zero of your
  510.      * imagery would be all ones, bit plane one would have data that
  511.      * describes the imagery, and bit planes two through four would be
  512.      * all zeroes.  Using these flags avoids wasting all
  513.      * that memory in this way:  first, you specify which planes you
  514.      * want your data to appear in using the PlanePick variable.  For
  515.      * each bit set in the variable, the next "plane" of your image
  516.      * data is blitted to the display.    For each bit clear in this
  517.      * variable, the corresponding bit in PlaneOnOff is examined.
  518.      * If that bit is clear, a "plane" of zeroes will be used.
  519.      * If the bit is set, ones will go out instead.  So, for our example:
  520.      *     Gadget.PlanePick = 0x02;
  521.      *     Gadget.PlaneOnOff = 0x01;
  522.      * Note that this also allows for generic Gadgets, like the
  523.      * System Gadgets, which will work in any number of bit planes.
  524.      * Note also that if you want an Image that is only a filled
  525.      * rectangle, you can get this by setting PlanePick to zero
  526.      * (pick no planes of data) and set PlaneOnOff to describe the pen
  527.      * color of the rectangle.
  528.      *
  529.      * NOTE:  Intuition relies on PlanePick to know how many planes
  530.      * of data are found in ImageData.    There should be no more
  531.      * '1'-bits in PlanePick than there are planes in ImageData.
  532.      *)
  533.   planePick,planeOnOff:SHORTCARD;
  534.  
  535.     (* if the NextImage variable is not NULL, Intuition presumes that
  536.      * it points to another Image structure with another Image to be
  537.      * rendered
  538.      *)
  539.   nextImage:ImagePtr;
  540.  END;
  541.  
  542. (* --- IDCMP Classes ------------------------------------------------------ *)
  543. (* Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  544.  * Manual for full details on the IDCMP classes.
  545.  *)
  546.  IDCMPFlags=(
  547.   sizeVerify,newSize,refreshWindow,mouseButtons,
  548.   mouseMove,gadgetDown,gadgetUp,reqSet,menuPick,closeWindow,
  549.   rawKey,reqVerify,reqClear,menuVerify,newPrefs,diskInserted,
  550.   diskRemoved,wbenchMessage,activeWindow,inactiveWindow,
  551.   deltaMove,vanillaKey,intuiTicks,idcmpUpdate,
  552.   menuHelp,changeWindow,gadgetHelp,c27,c28,c29,c30,
  553.  
  554.  (* the IDCMP Flags do not use this special bit, which is cleared when
  555.   * Intuition sends its special message to the Task, and set when Intuition
  556.   * gets its Message back from the Task.  Therefore, I can check here to
  557.   * find out fast whether or not this Message is available for me to send
  558.   *)
  559.   lonelyMessage
  560.  );
  561.  IDCMPFlagSet=SET OF IDCMPFlags;
  562.  
  563. CONST
  564. (* --- IDCMP Codes -------------------------------------------------------- *)
  565. (* This group of codes is for the IDCMP_CHANGEWINDOW message *)
  566.  cwCodeMoveSize=0;  (* Window was moved and/or sized *)
  567.  cwCodeDepth=1;     (* Window was depth-arranged (new for V39) *)
  568.  
  569. (* This group of codes is for the IDCMP_MENUVERIFY message *)
  570.  menuHot=1;         (* IntuiWants verification or MENUCANCEL    *)
  571.  menuCancel=2;      (* HOT Reply of this cancels Menu operation *)
  572.  menuWaiting=3;     (* Intuition simply wants a ReplyMsg() ASAP *)
  573.  
  574. (* These are internal tokens to represent state of verification attempts
  575.  * shown here as a clue.
  576.  *)
  577.  okOk=menuHot;        (* guy didn't care            *)
  578.  okAbort=4;           (* window rendered question moot    *)
  579.  okCancel=menuCancel; (* window sent cancel reply        *)    
  580.  
  581. (* This group of codes is for the IDCMP_WBENCHMESSAGE messages *)
  582.  wbenchOpen=1;
  583.  wbenchClose=2;
  584.  
  585.  selectUp=lButton+upPrefix;
  586.  selectDown=lButton;
  587.  menuUp=rButton+upPrefix;
  588.  menuDown=rButton;
  589.  middleDown=mButton;
  590.  middleUp=mButton+upPrefix;
  591.  
  592.  checkWidth=19;
  593.  commWidth=27;
  594.  lowCheckWidth=13;
  595.  lowCommWidth=16;
  596.  
  597.  menuNull=0FFFFH;
  598.  noMenu=1FH;
  599.  noItem=3FH;
  600.  noSub=1FH;
  601.  
  602.  keyCodeQ=10H;
  603.  keyCodeZ=31H;
  604.  keyCodeX=32H;
  605.  keyCodeV=34H;
  606.  keyCodeB=35H;
  607.  keyCodeN=36H;
  608.  keyCodeM=37H;
  609.  keyCodeLess=38H;
  610.  keyCodeGreater=39H;
  611.  
  612.  cursorUp=4CH;
  613.  cursorDown=4DH;
  614.  cursorRight=4EH;
  615.  cursorLeft=4FH;
  616.  
  617.  deadendAlert=80000000H;
  618.  recoveryAlert=0;
  619.  
  620.  altLeft=QualifierSet{lAlt};
  621.  altRight=QualifierSet{rAlt};
  622.  amigaLeft=QualifierSet{lCommand};
  623.  amigaRight=QualifierSet{rCommand};
  624.  amigaKeys=amigaLeft+amigaRight;
  625.  
  626.  
  627. (* ======================================================================== *)
  628. (* === IntuiMessage ======================================================= *)
  629. (* ======================================================================== *)
  630. TYPE
  631.  IntuiMessage=RECORD
  632.   execMessage:Message;
  633.   (* the Class bits correspond directly with the IDCMP Flags, except for the
  634.    * special bit IDCMP_LONELYMESSAGE (defined above)
  635.    *)
  636.   class:IDCMPFlagSet;
  637.   code:CARDINAL; (* the Code field is for special values like MENU number *)
  638.  
  639.   (* the Qualifier field is a copy of the current InputEvent's Qualifier *)
  640.   qualifier:QualifierSet;
  641.  
  642.   (* IAddress contains particular addresses for Intuition functions, like
  643.    * the pointer to the Gadget or the Screen
  644.    *)
  645.   iAddress:ADDRESS;
  646.  
  647.   (* when getting mouse movement reports, any event you get will have the
  648.    * the mouse coordinates in these variables.  the coordinates are relative
  649.    * to the upper-left corner of your Window (WFLG_GIMMEZEROZERO
  650.    * notwithstanding).  If IDCMP_DELTAMOVE is set, these values will
  651.    * be deltas from the last reported position.
  652.    *)
  653.   mouseX,mouseY:INTEGER;
  654.  
  655.   (* the time values are copies of the current system clock time.  Micros
  656.    * are in units of microseconds, Seconds in seconds.
  657.    *)
  658.   seconds,micros:LONGCARD;
  659.  
  660.   (* the IDCMPWindow variable will always have the address of the Window of
  661.    * this IDCMP
  662.    *)
  663.   idcmpWindow:WindowPtr;
  664.   specialLink:IntuiMessagePtr; (* system-use variable *)
  665.  END;
  666.  
  667. (* New for V39:
  668.  * All IntuiMessages are now slightly extended.  The ExtIntuiMessage
  669.  * structure has an additional field for tablet data, which is usually
  670.  * NULL.  If a tablet driver which is sending IESUBCLASS_NEWTABLET
  671.  * events is installed in the system, windows with the WA_TabletMessages
  672.  * property set will find that eim_TabletData points to the TabletData
  673.  * structure.  Applications must first check that this field is non-NULL;
  674.  * it will be NULL for certain kinds of message, including mouse activity
  675.  * generated from other than the tablet (i.e. the keyboard equivalents
  676.  * or the mouse itself).
  677.  *
  678.  * NEVER EVER examine any extended fields when running under pre-V39!
  679.  *
  680.  * NOTE: This structure is subject to grow in the future.  Making
  681.  * assumptions about its size is A BAD IDEA.
  682.  *)
  683.  ExtIntuiMessage=RECORD
  684.   i:IntuiMessage;
  685.   tabletData:TabletDataPtr;
  686.  END;
  687.  
  688.  (* A data structure common in V36 Intuition processing    *)
  689.  IBox=RECORD
  690.   left:INTEGER;
  691.   top:INTEGER;
  692.   width:INTEGER;
  693.   height:INTEGER;
  694.  END;
  695.  
  696. TYPE
  697.  WindowFlags=(
  698.   windowSizing,windowDrag,windowDepth,windowClose,
  699.   sizeBRight,sizeBBottom,simpleRefresh,superBitMap,
  700.   backDrop,reportMouse,gimmeZeroZero,borderless,
  701.   activate,windowActive,inRequest,menuState,
  702.   rmbTrap,noCareRefresh,nwExtended,wf19,
  703.   wf20,newLookMenus,wf22,wf23,
  704.   windowRefresh,wbenchWindow,windowTicked,visitor,
  705.   zoomed,hasZoom,wf30,wf31
  706.  );
  707.  WindowFlagSet=SET OF WindowFlags;
  708.  
  709. (* --- FLAGS SET BY INTUITION --------------------------------------------- *)
  710. (* The SCREENTYPE bits are reserved for describing various Screen types
  711.  * available under Intuition.
  712.  *)
  713.  ScreenFlags=(
  714.   wbenchScreen,publicScreen,sf2,sf3,
  715.   showTitle,beeping,customBitMap,screenBehind,
  716.   screenQuiet,screenHires,penShared,sf11,
  717.   nsExtended,sf13,autoScroll,sf15
  718.  );
  719.  ScreenFlagSet=SET OF ScreenFlags;
  720.  
  721. CONST
  722.  defaultMouseQueue=5;
  723.  smartRefresh=WindowFlagSet{};
  724.  otherRefresh=WindowFlagSet{simpleRefresh,superBitMap};
  725.  
  726. (* ======================================================================== *)
  727. (* === Window ============================================================= *)
  728. (* ======================================================================== *)
  729. TYPE
  730.  Window=RECORD
  731.   nextWindow:WindowPtr; (* for the linked list in a screen *)
  732.   leftEdge,topEdge:INTEGER;   (* screen dimensions of window *)
  733.   width,height:INTEGER;       (* screen dimensions of window *)
  734.   mouseY,mouseX:INTEGER;      (* relative to upper-left of window *)
  735.   minWidth,minHeight:INTEGER; (* minimum sizes *)
  736.   maxWidth,maxHeight:INTEGER; (* maximum sizes *)
  737.   flags:WindowFlagSet;        (* see above for defines *)
  738.   menuStrip:MenuPtr;          (* the strip of Menu headers *)
  739.   title:ADDRESS;              (* the title text for this window *)
  740.   firstRequest:RequesterPtr;  (* all active Requesters *)
  741.   dmRequest:RequesterPtr;     (* double-click Requester *)
  742.   reqCount:INTEGER;           (* count of reqs blocking Window *)
  743.   wScreen:ScreenPtr;          (* this Window's Screen *)
  744.   rPort:RastPortPtr;          (* this Window's very own RastPort *)    
  745.  
  746.   (* the border variables describe the window border.  If you specify
  747.    * WFLG_GIMMEZEROZERO when you open the window, then the upper-left of
  748.    * the ClipRect for this window will be upper-left of the BitMap (with
  749.    * correct offsets when in SuperBitMap mode; you MUST select
  750.    * WFLG_GIMMEZEROZERO when using SuperBitMap).  If you don't specify
  751.    * ZeroZero, then you save memory (no allocation of RastPort, Layer,
  752.    * ClipRect and associated Bitmaps), but you also must offset all your
  753.    * writes by BorderTop, BorderLeft and do your own mini-clipping to
  754.    * prevent writing over the system gadgets
  755.    *)
  756.   borderLeft,borderTop,borderRight,borderBottom:SHORTINT;
  757.   borderRPort:RastPortPtr;
  758.  
  759.   (* You supply a linked-list of Gadgets for your Window.
  760.    * This list DOES NOT include system gadgets.  You get the standard
  761.    * window system gadgets by setting flag-bits in the variable Flags (see
  762.    * the bit definitions above)
  763.    *)
  764.   firstGadget:GadgetPtr;
  765.  
  766.   parent,descendant:WindowPtr;(* these are for opening/closing the windows *)
  767.  
  768.   (* sprite data information for your own Pointer
  769.    * set these AFTER you Open the Window by calling SetPointer()
  770.    *)
  771.   pointer:ADDRESS;    (* sprite data *)
  772.   ptrHeight:SHORTINT; (* sprite height (not including sprite padding) *)
  773.   ptrWidth:[0..16];   (* sprite width (must be less than or equal to 16) *)
  774.  
  775.   xOffset,yOffset:SHORTINT; (* sprite offsets *)
  776.  
  777.     (* the IDCMP Flags and User's and Intuition's Message Ports *)
  778.   idcmpFlags:IDCMPFlagSet; (* User-selected flags *)
  779.   userPort,windowPort:MsgPortPtr;
  780.   messageKey:IntuiMessagePtr;
  781.  
  782.   detailPen,blockPen:SHORTCARD; (* for bar/border/gadget rendering *)
  783.  
  784.   (* the CheckMark is a pointer to the imagery that will be used when
  785.    * rendering MenuItems of this Window that want to be checkmarked
  786.    * if this is equal to NULL, you'll get the default imagery
  787.    *)
  788.   checkMark:ImagePtr;
  789.   screenTitle:ADDRESS; (* if non-null, Screen title when Window is active *)
  790.  
  791.   (* These variables have the mouse coordinates relative to the
  792.    * inner-Window of WFLG_GIMMEZEROZERO Windows.  This is compared with the
  793.    * MouseX and MouseY variables, which contain the mouse coordinates
  794.    * relative to the upper-left corner of the Window, WFLG_GIMMEZEROZERO
  795.    * notwithstanding
  796.    *)
  797.   gzzMouseX:INTEGER;
  798.   gzzMouseY:INTEGER;
  799.  
  800.   (* these variables contain the width and height of the inner-Window of
  801.    * WFLG_GIMMEZEROZERO Windows
  802.    *)
  803.   gzzWidth:INTEGER;
  804.   gzzHeight:INTEGER;
  805.   extData:ADDRESS;
  806.   userData:ADDRESS; (* general-purpose pointer to User data extension *)
  807.  
  808.   (** 11/18/85: this pointer keeps a duplicate of what
  809.    * Window.RPort->Layer is _supposed_ to be pointing at
  810.    *)
  811.   wLayer:LayerPtr;
  812.  
  813.   (* NEW 1.2: need to keep track of the font that
  814.    * OpenWindow opened, in case user SetFont's into RastPort
  815.    *)
  816.   iFont:TextFontPtr;
  817.   
  818.   (* (V36) another flag word (the Flags field is used up).
  819.    * At present, all flag values are system private.
  820.    * Until further notice, you may not change nor use this field.
  821.    *)
  822.   moreFlags:LONGSET;
  823.   (**** Data beyond this point are Intuition Private.  DO NOT USE ****)
  824.  END;
  825.  
  826.  
  827. (* ======================================================================== *)
  828. (* === NewWindow ========================================================== *)
  829. (* ======================================================================== *)
  830. (*
  831.  * Note that the new extension fields have been removed.  Use ExtNewWindow
  832.  * structure below to make use of these fields
  833.  *)
  834.  NewWindow=RECORD
  835.   leftEdge,topEdge:INTEGER;   (* screen dimensions of window *)
  836.   width,height:INTEGER;       (* screen dimensions of window *)
  837.   detailPen,blockPen:SHORTINT;(* for bar/border/gadget rendering *)
  838.   idcmpFlags:IDCMPFlagSet;    (* User-selected IDCMP flags *)
  839.   flags:WindowFlagSet;        (* see Window struct for defines *)  
  840.  
  841.   (* You supply a linked-list of Gadgets for your Window.
  842.    *    This list DOES NOT include system Gadgets.  You get the standard
  843.    *    system Window Gadgets by setting flag-bits in the variable Flags (see
  844.    *    the bit definitions under the Window structure definition)
  845.    *)
  846.   firstGadget:GadgetPtr;
  847.  
  848.   (* the CheckMark is a pointer to the imagery that will be used when
  849.    * rendering MenuItems of this Window that want to be checkmarked
  850.    * if this is equal to NULL, you'll get the default imagery
  851.    *)
  852.   checkMark:ImagePtr;
  853.  
  854.   title:ADDRESS;  (* the title text for this window *)
  855.  
  856.   (* the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  857.    * want this Window to open in it.    If so, you pass the address of the
  858.    * Custom Screen structure in this variable.  Otherwise, this variable
  859.    * is ignored and doesn't have to be initialized.
  860.    *)
  861.   screen:ScreenPtr;
  862.  
  863.   (* WFLG_SUPER_BITMAP Window?  If so, put the address of your BitMap
  864.    * structure in this variable.  If not, this variable is ignored and
  865.    * doesn't have to be initialized
  866.    *)
  867.   bitMap:BitMapPtr;
  868.  
  869.   (* the values describe the minimum and maximum sizes of your Windows.
  870.    * these matter only if you've chosen the WFLG_SIZEGADGET option,
  871.    * which means that you want to let the User to change the size of
  872.    * this Window.  You describe the minimum and maximum sizes that the
  873.    * Window can grow by setting these variables.  You can initialize
  874.    * any one these to zero, which will mean that you want to duplicate
  875.    * the setting for that dimension (if MinWidth == 0, MinWidth will be
  876.    * set to the opening Width of the Window).
  877.    * You can change these settings later using SetWindowLimits().
  878.    * If you haven't asked for a SIZING Gadget, you don't have to
  879.    * initialize any of these variables.
  880.    *)
  881.   minWidth,minHeight:INTEGER; (* minimums *)
  882.   maxWidth,maxHeight:INTEGER; (* maximums *)
  883.  
  884.   (* the type variable describes the Screen in which you want this Window to
  885.    * open.  The type value can either be CUSTOMSCREEN or one of the
  886.    * system standard Screen Types such as WBENCHSCREEN.  See the
  887.    * type definitions under the Screen structure.
  888.    *)
  889.   type:ScreenFlagSet;
  890.  END;
  891.  
  892. (* The following structure is the future NewWindow.  Compatibility
  893.  * issues require that the size of NewWindow not change.
  894.  * Data in the common part (NewWindow) indicates the the extension
  895.  * fields are being used.
  896.  * NOTE WELL: This structure may be subject to future extension.
  897.  * Writing code depending on its size is not allowed.
  898.  *)
  899.  ExtNewWindow=RECORD
  900.   nw:NewWindow;
  901.   (* ------------------------------------------------------- *
  902.    * extensions for V36
  903.    * if the NewWindow Flag value WFLG_NW_EXTENDED is set, then
  904.    * this field is assumed to point to an array ( or chain of arrays)
  905.    * of TagItem structures.  See also ExtNewScreen for another
  906.    * use of TagItems to pass optional data.
  907.    *
  908.    * see below for tag values and the corresponding data.
  909.    *)
  910.   extension:TagItemPtr;
  911.  END;
  912.  
  913. (*
  914.  * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  915.  * They are values in a TagItem array passed as extension/replacement
  916.  * values for the data in NewWindow.  OpenWindowTagList() can actually
  917.  * work well with a NULL NewWindow pointer.
  918.  *)
  919.  WaTags=(waDummy:=tagUser+99,
  920.         waLeft,
  921.         waTop,
  922.         waWidth,
  923.         waHeight,
  924.         waDetailPen,
  925.         waBlockPen,
  926.         waIDCMP,
  927.         waFlags,
  928.         waGadgets,
  929.         waCheckMark,
  930.         waTitle,
  931.         waScreenTitle,
  932.         waCustomScreen,
  933.         waSuperBitMap,
  934.         waMinWidth,
  935.         waMinHeight,
  936.         waMaxWidth,
  937.         waMaxHeight,
  938.         waInnerWidth,
  939.         waInnerHeight,
  940.         waPubScreenName,
  941.         waPubScreen,
  942.         waPubScreenFallBack,
  943.         waWindowName,
  944.         waColors,
  945.         waZoom,
  946.         waMouseQueue,
  947.         waBackFill,
  948.         waRptQueue,
  949.         waSizeGadget,
  950.         waDragBar,
  951.         waDepthGadget,
  952.         waCloseGadget,
  953.         waBackdrop,
  954.         waReportMouse,
  955.         waNoCareRefresh,
  956.         waBorderless,
  957.         waActivate,
  958.         waRMBTrap,
  959.         waWBenchWindow,
  960.         waSimpleRefresh,
  961.         waSmartRefresh,
  962.         waSizeBRight,
  963.         waSizeBBottom,
  964.         waAutoAdjust,
  965.         waGimmeZeroZero,
  966.         waMenuHelp,
  967.         waNewLookMenus,
  968.         waAmigaKey,
  969.         waNotifyDepth,
  970.         waObsolete33H,
  971.         waPointer,
  972.         waBusyPointer,
  973.         waPointerDelay,
  974.         waTabletMessages,
  975.         waHelpGroup,
  976.         waHelpGroupWindow
  977.        );
  978.  
  979. CONST
  980.  hcGadgetHelp=LONGSET{0}; (* f. HelpControl() *)
  981.  
  982. (**************************************************************************)
  983. (* == include screens.h ================================================= *)
  984. (**************************************************************************)
  985.  
  986. (* ====================================================================== *)
  987. (* === DrawInfo ========================================================= *)
  988. (* ====================================================================== *)
  989.  
  990. (* This is a packet of information for graphics rendering.  It originates
  991.  * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  992.  *)
  993.  
  994. (* You can use the Intuition version number to tell which fields are
  995.  * present in this structure.
  996.  *
  997.  * DRI_VERSION of 1 corresponds to V37 release.
  998.  * DRI_VERSION of 2 corresponds to V39, and includes three new pens
  999.  *    and the dri_CheckMark and dri_AmigaKey fields.
  1000.  *
  1001.  * Note that sometimes applications need to create their own DrawInfo
  1002.  * structures, in which case the DRI_VERSION won't correspond exactly
  1003.  * to the OS version!!!
  1004.  *)
  1005.  
  1006. CONST
  1007.  driVersion37=1;
  1008.  driVersion39=2;
  1009.  
  1010. TYPE
  1011.  DrawPens=(
  1012.   detailPen,blockPen,textPen,shinePen,shadowPen,fillPen,
  1013.   fillTextPen,backGroundPen,highLightTextPen,barDetailPen,
  1014.   barBlockPen,barTrimPen
  1015.  );
  1016.  
  1017. CONST
  1018.  numDriPens37=9;
  1019.  numDriPens39=12;
  1020.  
  1021. (*
  1022.  Bitnummer für DrawInfo.flags
  1023. *)
  1024.  driNewLook=0;
  1025.  
  1026. TYPE
  1027.  DrawInfo=RECORD
  1028.   version:CARDINAL; (* will be  DRI_VERSION            *)
  1029.   numPens:CARDINAL; (* guaranteed to be >= 9        *)
  1030.   pens:POINTER TO ARRAY DrawPens OF CARDINAL; (* pointer to pen array            *)
  1031.  
  1032.   font:TextFontPtr; (* screen default font        *)
  1033.   depth:CARDINAL;   (* (initial) depth of screen bitmap    *)
  1034.   resolution:RECORD(* from DisplayInfo database for initial display mode    *)
  1035.    x,y:CARDINAL;
  1036.   END;
  1037.   flags:LONGSET;
  1038. (* New for V39: dri_CheckMark, dri_AmigaKey. *)
  1039.   checkMark:ADDRESS;(* pointer to scaled checkmark image
  1040.                                * Will be NULL if DRI_VERSION < 2
  1041.                                *)
  1042.   amigaKey:ADDRESS; (* pointer to scaled Amiga-key image
  1043.                                * Will be NULL if DRI_VERSION < 2
  1044.                                *)
  1045.   reserved:ARRAY[0..4] OF LONGCARD; (* avoid recompilation ;^)    *)
  1046.  END;
  1047.  
  1048. CONST
  1049. (* New for V39:  It is sometimes useful to specify that a pen value
  1050.  * is to be the complement of color zero to three.  The "magic" numbers
  1051.  * serve that purpose:
  1052.  *)
  1053.  penC3=0FEFCH;        (* Complement of color 3 *)
  1054.  penC2=0FEFDH;        (* Complement of color 2 *)
  1055.  penC1=0FEFEH;        (* Complement of color 1 *)
  1056.  penC0=0FEFFH;        (* Complement of color 0 *)
  1057.  
  1058. CONST
  1059.  stdScreenHeight=-1;
  1060.  stdScreenWidth=-1;
  1061.  
  1062.  customScreen=ScreenFlagSet{wbenchScreen..sf3};
  1063.  
  1064. (* ======================================================================== *)
  1065. (* === Screen ============================================================= *)
  1066. (* ======================================================================== *)
  1067.  
  1068. (* VERY IMPORTANT NOTE ABOUT Screen->BitMap.  In the future, bitmaps
  1069.  * will need to grow.  The embedded instance of a bitmap in the screen
  1070.  * will no longer be large enough to hold the whole description of
  1071.  * the bitmap.
  1072.  *
  1073.  * YOU ARE STRONGLY URGED to use Screen->RastPort.BitMap in place of
  1074.  * &Screen->BitMap whenever and whereever possible.
  1075.  *)
  1076. TYPE
  1077.  Screen=RECORD
  1078.   nextScreen:ScreenPtr;     (* linked list of screens *)
  1079.   firstWindow:WindowPtr;    (* linked list Screen's Windows *)
  1080.   leftEdge,topEdge:INTEGER; (* parameters of the screen *)
  1081.   width,height:INTEGER;     (* parameters of the screen *)
  1082.   mouseY,mouseX:INTEGER;    (* position relative to upper-left *)
  1083.   flags:ScreenFlagSet;      (* see definitions below *)
  1084.   title:ADDRESS;            (* null-terminated Title text *)
  1085.   defaultTitle:ADDRESS;     (* for Windows without ScreenTitle *)   
  1086.  
  1087.   (* Bar sizes for this Screen and all Window's in this Screen *)
  1088.   (* Note that BarHeight is one less than the actual menu bar
  1089.    * height.    We're going to keep this in V36 for compatibility,
  1090.    * although V36 artwork might use that extra pixel
  1091.    *
  1092.    * Also, the title bar height of a window is calculated from the
  1093.    * screen's WBorTop field, plus the font height, plus one.
  1094.    *)
  1095.   barHeight,barVBorder,barHBorder,menuVBorder,menuHBorder:SHORTINT;
  1096.   wBorTop,wBorLeft,wBorRight,wBorBottom:SHORTINT;
  1097.   font:TextAttrPtr; (* this screen's default font       *)
  1098.  
  1099.     (* the display data structures for this Screen *)
  1100.   viewPort:ViewPort;  (* describing the Screen's display *)
  1101.   rastPort:RastPort;  (* describing Screen rendering       *)
  1102.   bitMap:BitMap;      (* SEE WARNING ABOVE!           *)
  1103.   layerInfo:LayerInfo;(* each screen gets a LayerInfo    *)
  1104.  
  1105.   (* Only system gadgets may be attached to a screen.
  1106.    *    You get the standard system Screen Gadgets automatically
  1107.    *)
  1108.   firstGadget:GadgetPtr;
  1109.   detailPen,blockPen:SHORTCARD; (* for bar/border/gadget rendering *)
  1110.  
  1111.   (* the following variable(s) are maintained by Intuition to support the
  1112.    * DisplayBeep() color flashing technique
  1113.    *)
  1114.   saveColor0:CARDINAL;
  1115.  
  1116.     (* This layer is for the Screen and Menu bars *)
  1117.   barLayer:LayerPtr;
  1118.   extData:ADDRESS;
  1119.   userData:ADDRESS;(* general-purpose pointer to User data extension *)
  1120.     (**** Data below this point are SYSTEM PRIVATE ****)
  1121.  END;
  1122.  
  1123. (* ======================================================================== *)
  1124. (* === NewScreen ========================================================== *)
  1125. (* ======================================================================== *)
  1126. (* note: to use the Extended field, you must use the
  1127.  * new ExtNewScreen structure, below
  1128.  *)
  1129. NewScreen=RECORD
  1130.   leftEdge,topEdge,width,height,depth:INTEGER;
  1131.  
  1132.   detailPen,blockPen:SHORTINT;  (* for bar/border/gadget rendering    *)
  1133.   viewModes:ViewModeSet;        (* the Modes for the ViewPort (and View) *)
  1134.   type:ScreenFlagSet;           (* the Screen type (see defines above)    *)
  1135.   font:TextAttrPtr;             (* this Screen's default text attributes *)
  1136.   defaultTitle:ADDRESS;         (* the default title for this Screen    *)
  1137.   gadgets:GadgetPtr;            (* UNUSED:  Leave this NULL        *)           
  1138.  
  1139.   (* if you are opening a CUSTOMSCREEN and already have a BitMap
  1140.    * that you want used for your Screen, you set the flags CUSTOMBITMAP in
  1141.    * the Type field and you set this variable to point to your BitMap
  1142.    * structure.  The structure will be copied into your Screen structure,
  1143.    * after which you may discard your own BitMap if you want
  1144.    *)
  1145.   customBitMap:BitMapPtr;
  1146.  END;
  1147.  
  1148. (*
  1149.  * For compatibility reasons, we need a new structure for extending
  1150.  * NewScreen.  Use this structure is you need to use the new Extension
  1151.  * field.
  1152.  *
  1153.  * NOTE: V36-specific applications should use the
  1154.  * OpenScreenTagList( newscreen, tags ) version of OpenScreen().
  1155.  * Applications that want to be V34-compatible as well may safely use the
  1156.  * ExtNewScreen structure.  Its tags will be ignored by V34 Intuition.
  1157.  *
  1158.  *)
  1159.  ExtNewScreen=RECORD
  1160.         ns:NewScreen;
  1161.         extension:TagItemPtr
  1162.        END;
  1163.  
  1164. CONST
  1165.  (* === Overscan Types ===    *)
  1166.  oScanText=1;       (* entirely visible    *)
  1167.  oScanStandard=2;   (* just past edges    *)
  1168.  oScanMax=3;        (* as much as possible    *)
  1169.  oScanVideo=4;      (* even more than is possible    *)
  1170.  
  1171.  
  1172. (*
  1173.  * Screen attribute tag ID's.  These are used in the ti_Tag field of
  1174.  * TagItem arrays passed to OpenScreenTagList() (or in the
  1175.  * ExtNewScreen.Extension field).
  1176.  *)
  1177.  TYPE
  1178.  SaTags=(saDummy:=tagUser+32,
  1179.         saLeft,
  1180.         saTop,
  1181.         saWidth,
  1182.         saHeight,
  1183.         saDepth,
  1184.         saDetailPen,
  1185.         saBlockPen,
  1186.         saTitle,
  1187.         saColors,
  1188.         saErrorCode,
  1189.         saFont,
  1190.         saSysFont,
  1191.         saType,
  1192.         saBitMap,
  1193.         saPubName,
  1194.         saPubSig,
  1195.         saPubTask,
  1196.         saDisplayID,
  1197.         saDClip,
  1198.         saOverscan,
  1199.         saObsolete1,
  1200.         saShowTitle,
  1201.         saBehind,
  1202.         saQuiet,
  1203.         saAutoScroll,
  1204.         saPens,
  1205.         saFullPalette,
  1206.         saColorMapEntries,
  1207.         saAttach,
  1208.         saDraggable,
  1209.         saExclusive,
  1210.         saSharePens,
  1211.         saBackFill,
  1212.         saInterleaved,
  1213.         saColors32,
  1214.         saVideoControl,
  1215.         saFrontChild,
  1216.         saBackChild,
  1217.         saLikeWorkbench,
  1218.         saReserved
  1219.        );
  1220.  
  1221. CONST
  1222.  osErrNoMonitor=1;    (* named monitor spec not available    *)
  1223.  osErrNoChips=2;      (* you need newer custom chips        *)
  1224.  osErrNoMem=3;        (* couldn't get normal memory        *)
  1225.  osErrNoChipMem=4;    (* couldn't get chipmem            *)
  1226.  osErrPubNotUnique=5; (* public screen name already used    *)
  1227.  osErrUnknownMode=6;  (* don't recognize mode asked for    *)
  1228.  osErrTooDeep=7;      (* Screen deeper than HW supports    *)
  1229.  osErrAttachFail=8;   (* Failed to attach screens        *)
  1230.  osErrNotAvailable=9; (* Mode not available for other reason    *)     
  1231.  
  1232. (* === Public Shared Screen Node ===    *)
  1233.  
  1234. (* This is the representative of a public shared screen.
  1235.  * This is an internal data structure, but some functions may
  1236.  * present a copy of it to the calling application.  In that case,
  1237.  * be aware that the screen pointer of the structure can NOT be
  1238.  * used safely, since there is no guarantee that the referenced
  1239.  * screen will remain open and a valid data structure.
  1240.  *
  1241.  * Never change one of these.
  1242.  *)
  1243. TYPE
  1244.  PubScreenNode=RECORD
  1245.         node:Node;            (* ln_Name is screen name *)
  1246.         screen:ScreenPtr;
  1247.         flags:BITSET;         (* below        *)
  1248.         size:INTEGER;         (* includes name buffer    *)
  1249.         visitorCount:INTEGER; (* how many visitor windows *)
  1250.         sigTask:TaskPtr;      (* who to signal when visitors gone *)
  1251.         sigBit:SHORTCARD;     (* which signal    *)                      
  1252.        END;
  1253.  
  1254. CONST
  1255.  psnPrivate=0;
  1256.  
  1257.  
  1258. (* NOTE: Due to a bug in NextPubScreen(), make sure your buffer
  1259.  * actually has MAXPUBSCREENNAME+1 characters in it!
  1260.  *)
  1261.  maxPubScreenName=139; (* names no longer, please    *)
  1262.  
  1263. (* pub screen modes    *)
  1264. (* minus 1 because of bitset *)
  1265.  shanghaiBit=1-1;       (* put workbench windows on pub screen *)
  1266.  popPubScreenBit=2-1;   (* pop pub screen to front when visitor opens *)
  1267.  shanghai=BITSET{shanghaiBit};
  1268.  popPubScreen=BITSET{popPubScreenBit};
  1269.  
  1270. (* New for V39:  Intuition has new screen depth-arrangement and movement
  1271.  * functions called ScreenDepth() and ScreenPosition() respectively.
  1272.  * These functions permit the old behavior of ScreenToFront(),
  1273.  * ScreenToBack(), and MoveScreen().  ScreenDepth() also allows
  1274.  * independent depth control of attached screens.  ScreenPosition()
  1275.  * optionally allows positioning screens even though they were opened
  1276.  * {SA_Draggable,FALSE}.
  1277.  *)
  1278.  
  1279. (* For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK,
  1280.  * and optionally also SDEPTH_INFAMILY.
  1281.  *
  1282.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1283.  * SDEPTH_INFAMILY.  Commodities, "input helper" programs,
  1284.  * or any other program that did not open a screen should never
  1285.  * use that flag.  (Note that this is a style-behavior
  1286.  * requirement;  there is no technical requirement that the
  1287.  * task calling this function need be the task which opened
  1288.  * the screen).
  1289.  *)
  1290.  sDepthToFront  =LONGSET{}; (* Bring screen to front *)
  1291.  sDepthToBack   =LONGSET{0};(* Send screen to back *)
  1292.  sDepthInFamily =LONGSET{1};(* Move an attached screen with
  1293.                              * respect to other screens of
  1294.                              * its family
  1295.                              *)                              
  1296.  
  1297. (* For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE,
  1298.  * or SPOS_MAKEVISIBLE to describe the kind of screen positioning you
  1299.  * wish to perform:
  1300.  *
  1301.  * SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe
  1302.  *    the offset in coordinates you wish to move the screen by.
  1303.  * SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe
  1304.  *    the absolute coordinates you wish to move the screen to.
  1305.  * SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the
  1306.  *    screen which you would like autoscrolled into view.
  1307.  *
  1308.  * You may additionally set SPOS_FORCEDRAG along with any of the
  1309.  * above.  Set this if you wish to reposition an {SA_Draggable,FALSE}
  1310.  * screen that you opened.
  1311.  *
  1312.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1313.  * SPOS_FORCEDRAG.  Commodities, "input helper" programs,
  1314.  * or any other program that did not open a screen should never
  1315.  * use that flag.
  1316.  *)
  1317.  
  1318.  sPosRelative   =LONGSET{}; (* Coordinates are relative *)
  1319.  sPosAbsolute   =LONGSET{0};(* Coordinates are expressed as
  1320.                                        * absolutes, not relatives.
  1321.                                        *)
  1322.  sPosMakeVisible=LONGSET{1};(* Coordinates describe a box on
  1323.                                        * the screen you wish to be
  1324.                                        * made visible by autoscrolling
  1325.                                        *)
  1326.  
  1327.  sPosForceDrag  =LONGSET{2}; (* Move non-draggable screen *)
  1328.  
  1329. (* New for V39: Intuition supports double-buffering in screens,
  1330.  * with friendly interaction with menus and certain gadgets.
  1331.  * For each buffer, you need to get one of these structures
  1332.  * from the AllocScreenBuffer() call.  Never allocate your
  1333.  * own ScreenBuffer structures!
  1334.  *
  1335.  * The sb_DBufInfo field is for your use.  See the graphics.library
  1336.  * AllocDBufInfo() autodoc for details.
  1337.  *)
  1338. TYPE
  1339.   ScreenBuffer=RECORD
  1340.    bitMap:BitMap;         (* BitMap of this buffer *)
  1341.    dBufInfo:DBufInfoPtr;  (* DBufInfo for this buffer *)
  1342.   END;
  1343.  
  1344. (* These are the flags that may be passed to AllocScreenBuffer().
  1345.  *)
  1346. CONST
  1347.   screenBitmap=1;
  1348.   copyBitmap=2;
  1349.  
  1350. TYPE
  1351.  StringExtend = RECORD
  1352.     (* display specifications   *)
  1353.     font:TextFontPtr;                     (* must be an open Font (not TextAttr)  *)
  1354.     pens,                                 (* color of text/background             *)
  1355.     activePens:ARRAY [0..1] OF SHORTCARD; (* colors when gadget is active         *)
  1356.  
  1357.     (* edit specifications      *)
  1358.     initialModes:LONGSET;               (* inital mode flags, below             *)
  1359.     editHook:HookPtr;                   (* if non-NULL, must supply WorkBuffer  *)
  1360.     workBuffer:ADDRESS;                 (* must be as large as StringInfo.Buffer*)
  1361.     reserved:ARRAY [0..3] OF LONGCARD;  (* set to 0                             *)
  1362.  END;
  1363.  
  1364.  
  1365.  
  1366. (**************************************************************************)
  1367. (* == include preferences.h ============================================= *)
  1368. (**************************************************************************)
  1369.  
  1370. CONST
  1371.  
  1372. (* these are the definitions for the printer configurations *)
  1373.  filenameSize=30; (* Filename size *)
  1374.  devnameSize=16;  (* Device-name size *)
  1375.  
  1376.  pointerSize=(1+16+1)*2; (* Size of Pointer data buffer *)
  1377.  
  1378. (* These defines are for the default font size.  These actually describe the
  1379.  * height of the defaults fonts.  The default font type is the topaz
  1380.  * font, which is a fixed width font that can be used in either
  1381.  * eighty-column or sixty-column mode.    The Preferences structure reflects
  1382.  * which is currently selected by the value found in the variable FontSize,
  1383.  * which may have either of the values defined below.  These values actually
  1384.  * are used to select the height of the default font.  By changing the
  1385.  * height, the resolution of the font changes as well.
  1386.  *)
  1387.  topazEighty=8;
  1388.  topazSixty=9;
  1389.  
  1390. TYPE
  1391.  BaudRate=(
  1392.   baud110,baud300,baud1200,baud2400,baud4800,baud9600,baud19200,baudMidi,
  1393.   br8,br9,br10,br11,br12,br13,vr14,br15
  1394.  );
  1395.  
  1396.  PrinterFlags=(
  1397.   correctRed,correctGreen,correctBlue,centerImage,boundedDimensions,
  1398.   absoluteDimensions,pixelDimensions,multiplyDimensions,integerScaling,
  1399.   halftoneDithering,floydDithering,antiAlias,greyScale2
  1400.  );
  1401.  PrinterFlagSet=SET OF PrinterFlags;
  1402.  
  1403.  PrinterType=(
  1404.   customName,alphaP101,brother15XL,cbmMps1000,diab630,diabAdvD25,
  1405.   diabC150,epson,epsonJX80,okimate20,qumeLP20,hpLaserjet,hpLaserjetPlus,
  1406.   pt13,pt14,pt15
  1407.  );
  1408.  
  1409.  PrinterPort=(parallelPrinter,serialPrinter);
  1410.  
  1411.  SerParShk=(
  1412.   shakeRts,shakeNone,sps2,sps3,
  1413.   parityEven,parityOdd,paritySpace,sps7
  1414.  );
  1415.  SerParShkSet=SET OF SerParShk;
  1416.  
  1417. CONST
  1418.  shakeXon=SerParShkSet{};
  1419.  parityNone=SerParShkSet{};
  1420.  parityMark=SerParShkSet{parityEven,parityOdd};
  1421.  
  1422. (* Note:  Starting with V36, and continuing with each new version of
  1423.  * Intuition, an increasing number of fields of struct Preferences
  1424.  * are ignored by SetPrefs().  (Some fields are obeyed only at the
  1425.  * initial SetPrefs(), which comes from the devs:system-configuration
  1426.  * file).  Elements are generally superseded as new hardware or software
  1427.  * features demand more information than fits in struct Preferences.
  1428.  * Parts of struct Preferences must be ignored so that applications
  1429.  * calling GetPrefs(), modifying some other part of struct Preferences,
  1430.  * then calling SetPrefs(), don't end up truncating the extended
  1431.  * data.
  1432.  *
  1433.  * Consult the autodocs for SetPrefs() for further information as
  1434.  * to which fields are not always respected.
  1435.  *)
  1436. TYPE
  1437.  Preferences=RECORD
  1438.   fontHeight:SHORTCARD;   (* height for system default font  *)
  1439.   printerPort:PrinterPort;(* printer port connection       *)
  1440.   baudRate:BaudRate;      (* baud rate for the serial port   *)
  1441.  
  1442.     (* various timing rates *)
  1443.   keyRptSpeed:TimeVal;  (* repeat speed for keyboard       *)
  1444.   keyRptDelay:TimeVal;  (* Delay before keys repeat       *)
  1445.   doubleClick:TimeVal;  (* Interval allowed between clicks *)
  1446.  
  1447.     (* Intuition Pointer data *)
  1448.   pointerMatrix:ARRAY [0..pointerSize-1] OF CARDINAL;
  1449.   xOffset:SHORTINT;       (* X-Offset for active 'bit'         *)
  1450.   yOffset:SHORTINT;       (* Y-Offset for active 'bit'         *)
  1451.   color17:CARDINAL;          (***********************************)
  1452.   color18:CARDINAL;          (* Colours for sprite pointer         *)
  1453.   color19:CARDINAL;          (***********************************)
  1454.   pointerTicks:CARDINAL;    (* Sensitivity of the pointer         *)
  1455.  
  1456.     (* Workbench Screen colors *)
  1457.   color0:CARDINAL;    (***********************************)
  1458.   color1:CARDINAL;    (*  Standard default colours         *)
  1459.   color2:CARDINAL;    (*   Used in the Workbench           *)
  1460.   color3:CARDINAL;    (***********************************)
  1461.  
  1462.     (* positioning data for the Intuition View *)
  1463.   viewXOffset:SHORTINT;         (* Offset for top lefthand corner *)
  1464.   viewYOffset:SHORTINT;         (* X and Y dimensions                  *)
  1465.   viewInitX,viewInitY:INTEGER;  (* View initial offset values        *)  
  1466.  
  1467.   enableCLI:BITSET; (* CLI availability switch *)
  1468.  
  1469.   (* printer configurations *)
  1470.   printerType:PrinterType;  (* printer type           *)
  1471.   printerFilename:ARRAY [0..filenameSize-1] OF CHAR; (* file for printer       *)
  1472.  
  1473.     (* print format and quality configurations *)
  1474.   printPitch:CARDINAL;        (* print pitch                      *)
  1475.   printQuality:CARDINAL;      (* print quality                  *)
  1476.   printSpacing:CARDINAL;      (* number of lines per inch      *)
  1477.   printLeftMargin:CARDINAL;      (* left margin in characters    *)
  1478.   printRightMargin:CARDINAL;    (* right margin in characters    *)
  1479.   printImage:CARDINAL;        (* positive or negative            *)
  1480.   printAspect:CARDINAL;       (* horizontal or vertical        *)
  1481.   printShade:CARDINAL;        (* b&w, half-tone, or color      *)
  1482.   printThreshold:INTEGER;     (* darkness ctrl for b/w dumps*)   
  1483.  
  1484.     (* print paper descriptors *)
  1485.   paperSize:CARDINAL;   (* paper size               *)
  1486.   paperLength:CARDINAL; (* paper length in number of lines *)
  1487.   paperType:CARDINAL;   (* continuous or single sheet       *)  
  1488.  
  1489.   (* Serial device settings: These are six nibble-fields in three bytes *)
  1490.   (* (these look a little strange so the defaults will map out to zero) *)
  1491.   serRWBits:SHORTCARD;  (* upper nibble = (8-number of read bits)    *)
  1492.              (* lower nibble = (8-number of write bits)    *)
  1493.   serStopBuf:SHORTCARD; (* upper nibble = (number of stop bits - 1)    *)
  1494.              (* lower nibble = (table value for BufSize)    *)
  1495.   serParShk:SerParShkSet; (* upper nibble = (value for Parity setting)    *)
  1496.              (* lower nibble = (value for Handshake mode)    *)
  1497.   laceWB:SHORTSET; (* if workbench is to be interlaced        *)
  1498.  
  1499.   pad: ARRAY[0..11] OF SHORTINT;
  1500.   prtDevName : ARRAY[0..devnameSize-1] OF CHAR; (* device used by printer.device
  1501.                                               * (omit the ".device")
  1502.                                               *)
  1503.   defaultPrtUnit:SHORTINT;       (* default unit opened by printer.device *)
  1504.   defaultSerUnit:SHORTINT;       (* default serial unit *)
  1505.  
  1506.   rowSizeChange:SHORTINT;  (* affect NormalDisplayRows/Columns *)
  1507.   columnSizeChange:SHORTINT;
  1508.  
  1509.   printFlags:PrinterFlagSet;  (* user preference flags *)
  1510.   printMaxWidth:CARDINAL;     (* max width of printed picture in 10ths/in *)
  1511.   printMaxHeight:CARDINAL;    (* max height of printed picture in 10ths/in *)
  1512.   printDensity:SHORTCARD;     (* print density *)
  1513.   printXOffset:SHORTCARD;     (* offset of printed picture in 10ths/inch *)  
  1514.  
  1515.   width:CARDINAL;             (* override default workbench width  *)
  1516.   height:CARDINAL;            (* override default workbench height *)
  1517.   depth:SHORTCARD;            (* override default workbench depth  *)
  1518.   extSize:SHORTCARD;          (* extension information -- do not touch! *)
  1519.                               (* extension size in blocks of 64 bytes *)   
  1520.  END;
  1521.  
  1522. CONST
  1523. (* Workbench Interlace (use one bit) *)
  1524.  lacewb=0;
  1525.  
  1526. (* Enable_CLI    *)
  1527.  screenDrag=14;
  1528.  mouseAccel=15;
  1529.  
  1530. (* PrinterPort *)
  1531. (* see Above *)
  1532.  
  1533. (* PaperType *)
  1534.   fanfold=0;
  1535.   single=080H;
  1536.  
  1537. (* PrintPitch *)
  1538.   pica=0000H;
  1539.   elite=0400H;
  1540.   fine=0800H;
  1541.  
  1542. (* PrintQuality *)
  1543.   draft=0000H;
  1544.   letter=0100H;
  1545.  
  1546. (* PrintSpacing *)
  1547.   sixLPI=0000H;
  1548.   eightLPI=0200H;
  1549.  
  1550. (* Print Image *)
  1551.   imagePositive=000H;
  1552.   imageNegative=001H;
  1553.  
  1554. (* PrintAspect *)
  1555.   aspectHoriz=000H;
  1556.   aspectVert=001H;
  1557.  
  1558. (* PrintShade *)
  1559.   shadeBW=000H;
  1560.   shadeGreyScale=001H;
  1561.   shadeColor=002H;
  1562.  
  1563. (* PaperSize *)
  1564.   usLetter=000H;
  1565.   usLegal=010H;
  1566.   nTractor=020H;
  1567.   wTractor=030H;
  1568.   custom=040H;
  1569.  
  1570.   euroA0=050H;  (* European size A0: 841 x 1189 *)
  1571.   euroA1=060H;  (* European size A1: 594 x 841 *)
  1572.   euroA2=070H;  (* European size A2: 420 x 594 *)
  1573.   euroA3=080H;  (* European size A3: 297 x 420 *)
  1574.   euroA4=090H;  (* European size A4: 210 x 297 *)
  1575.   euroA5=0A0H;  (* European size A5: 148 x 210 *)
  1576.   euroA6=0B0H;  (* European size A6: 105 x 148 *)
  1577.   euroA7=0C0H;  (* European size A7: 74 x 105  *)
  1578.   euroA8=0D0H;  (* European size A8: 52 x 74   *)   
  1579.  
  1580. (* Serial Input Buffer Sizes *)
  1581.   buf512=0;
  1582.   buf1024=1;
  1583.   buf2048=2;
  1584.   buf4096=3;
  1585.   buf8000=4;
  1586.   buf16000=5;
  1587.  
  1588. (* Serial Bit Masks *)
  1589.   readBits=0F0H;  (* for SerRWBits    *)
  1590.   writeBits=0FH;
  1591.  
  1592.   stopBits=0F0H;  (* for SerStopBuf    *)
  1593.   bufSizeBits=0FH;
  1594.  
  1595.   parityBits=0F0H; (* for SerParShk   *)
  1596.   hShakeBits=00FH;
  1597.  
  1598. CONST
  1599.   correctRGBMask=PrinterFlagSet{correctRed..correctBlue};
  1600.   dimensionsMask=PrinterFlagSet{boundedDimensions..multiplyDimensions};
  1601.   ditheringMask=PrinterFlagSet{halftoneDithering,floydDithering};
  1602.  
  1603.  
  1604. (* ======================================================================== *)
  1605. (* === Remember =========================================================== *)
  1606. (* ======================================================================== *)
  1607. (* this structure is used for remembering what memory has been allocated to
  1608.  * date by a given routine, so that a premature abort or systematic exit
  1609.  * can deallocate memory cleanly, easily, and completely
  1610.  *)
  1611. TYPE
  1612.  Remember=RECORD
  1613.   nextRemember:RememberPtr;
  1614.   rememberSize:LONGCARD;
  1615.   memory:ADDRESS;
  1616.  END;
  1617.  
  1618. (* === Color Spec ====================================================== *)
  1619. (* How to tell Intuition about RGB values for a color table entry.
  1620.  * NOTE:  The way the structure was defined, the color value was
  1621.  * right-justified within each UWORD.  This poses problems for
  1622.  * extensibility to more bits-per-gun.    The SA_Colors32 tag to
  1623.  * OpenScreenTags() provides an alternate way to specify colors
  1624.  * with greater precision.
  1625.  *)
  1626.  ColorSpec=RECORD
  1627.   colorIndex:INTEGER;   (* -1 terminates an array of ColorSpec    *)
  1628.   red:CARDINAL;         (* only the _bottom_ 4 bits recognized *)
  1629.   green:CARDINAL;       (* only the _bottom_ 4 bits recognized *)
  1630.   blue:CARDINAL;        (* only the _bottom_ 4 bits recognized *) 
  1631.  END;
  1632.  
  1633. (* === Easy Requester Specification ======================================= *)
  1634. (* see also autodocs for EasyRequest and BuildEasyRequest    *)
  1635. (* NOTE: This structure may grow in size in the future        *)
  1636.  EasyStruct=RECORD
  1637.   structSize:LONGCARD;
  1638.   flags:LONGSET;
  1639.   title:ADDRESS;
  1640.   textFormat:ADDRESS;
  1641.   gadgetFormat:ADDRESS;
  1642.  END;
  1643.  
  1644. (* New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass
  1645.  * of the IECLASS_NEWPOINTERPOS event.    The ie_EventAddress of such
  1646.  * an event points to a TabletData structure (see below).
  1647.  *
  1648.  * The TabletData structure contains certain elements including a taglist.
  1649.  * The taglist can be used for special tablet parameters.  A tablet driver
  1650.  * should include only those tag-items the tablet supports.  An application
  1651.  * can listen for any tag-items that interest it.  Note: an application
  1652.  * must set the WA_TabletMessages attribute to TRUE to receive this
  1653.  * extended information in its IntuiMessages.
  1654.  *
  1655.  * The definitions given here MUST be followed.  Pay careful attention
  1656.  * to normalization and the interpretation of signs.
  1657.  *
  1658.  * TABLETA_TabletZ:  the current value of the tablet in the Z direction.
  1659.  * This unsigned value should typically be in the natural units of the
  1660.  * tablet.  You should also provide TABLETA_RangeZ.
  1661.  *
  1662.  * TABLETA_RangeZ:  the maximum value of the tablet in the Z direction.
  1663.  * Normally specified along with TABLETA_TabletZ, this allows the
  1664.  * application to scale the actual Z value across its range.
  1665.  *
  1666.  * TABLETA_AngleX:  the angle of rotation or tilt about the X-axis.  This
  1667.  * number should be normalized to fill a signed long integer.  Positive
  1668.  * values imply a clockwise rotation about the X-axis when viewing
  1669.  * from +X towards the origin.
  1670.  *
  1671.  * TABLETA_AngleY:  the angle of rotation or tilt about the Y-axis.  This
  1672.  * number should be normalized to fill a signed long integer.  Positive
  1673.  * values imply a clockwise rotation about the Y-axis when viewing
  1674.  * from +Y towards the origin.
  1675.  *
  1676.  * TABLETA_AngleZ:  the angle of rotation or tilt about the Z axis.  This
  1677.  * number should be normalized to fill a signed long integer.  Positive
  1678.  * values imply a clockwise rotation about the Z-axis when viewing
  1679.  * from +Z towards the origin.
  1680.  *
  1681.  *    Note: a stylus that supports tilt should use the TABLETA_AngleX
  1682.  *    and TABLETA_AngleY attributes.    Tilting the stylus so the tip
  1683.  *    points towards increasing or decreasing X is actually a rotation
  1684.  *    around the Y-axis.  Thus, if the stylus tip points towards
  1685.  *    positive X, then that tilt is represented as a negative
  1686.  *    TABLETA_AngleY.  Likewise, if the stylus tip points towards
  1687.  *    positive Y, that tilt is represented by positive TABLETA_AngleX.
  1688.  *
  1689.  * TABLETA_Pressure:  the pressure reading of the stylus.  The pressure
  1690.  * should be normalized to fill a signed long integer.    Typical devices
  1691.  * won't generate negative pressure, but the possibility is not precluded.
  1692.  * The pressure threshold which is considered to cause a button-click is
  1693.  * expected to be set in a Preferences program supplied by the tablet
  1694.  * vendor.  The tablet driver would send IECODE_LBUTTON-type events as
  1695.  * the pressure crossed that threshold.
  1696.  *
  1697.  * TABLETA_ButtonBits:    ti_Data is a long integer whose bits are to
  1698.  * be interpreted at the state of the first 32 buttons of the tablet.
  1699.  *
  1700.  * TABLETA_InProximity:  ti_Data is a boolean.    For tablets that support
  1701.  * proximity, they should send the {TABLETA_InProximity,FALSE} tag item
  1702.  * when the stylus is out of proximity.  One possible use we can forsee
  1703.  * is a mouse-blanking commodity which keys off this to blank the
  1704.  * mouse.  When this tag is absent, the stylus is assumed to be
  1705.  * in proximity.
  1706.  *)
  1707. CONST
  1708.   tabletaDummy=tagUser+3A000H;
  1709.   tabletaTabletZ=tabletaDummy+1;
  1710.   tabletaRangeZ=tabletaDummy+2;
  1711.   tabletaAngleX=tabletaDummy+3;
  1712.   tabletaAngleY=tabletaDummy+4;
  1713.   tabletaAngleZ=tabletaDummy+5;
  1714.   tabletaPressure=tabletaDummy+6;
  1715.   tabletaButtonBits=tabletaDummy+7;
  1716.   tabletaInProximity=tabletaDummy+8;
  1717.  
  1718. (* If your window sets WA_TabletMessages to TRUE, then it will receive
  1719.  * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData
  1720.  * field points at a TabletData structure.  This structure contains
  1721.  * additional information about the input event.
  1722.  *)
  1723.  TYPE
  1724.   TabletData=RECORD
  1725.    (* Sub-pixel position of tablet, in screen coordinates,
  1726.     * scaled to fill a UWORD fraction:
  1727.     *)
  1728.    xFraction,yFraction:CARDINAL;
  1729.  
  1730.    (* Current tablet coordinates along each axis: *)
  1731.    tabletX,tabletY:LONGCARD;
  1732.  
  1733.    (* Tablet range along each axis.  For example, if td_TabletX
  1734.     * can take values 0-999, td_RangeX should be 1000.
  1735.     *)
  1736.    rangeX,rangeY:LONGCARD;
  1737.    (* Pointer to tag-list of additional tablet attributes.
  1738.     * See <intuition/intuition.h> for the tag values.
  1739.     *)
  1740.    tagList:ADDRESS;
  1741.   END;
  1742.  
  1743. (* If a tablet driver supplies a hook for td_CallBack, it will be
  1744.  * invoked in the standard hook manner.  A0 will point to the Hook
  1745.  * itself, A2 will point to the InputEvent that was sent, and
  1746.  * A1 will point to a TabletHookData structure.  The InputEvent's
  1747.  * ie_EventAddress field points at the IENewTablet structure that
  1748.  * the driver supplied.
  1749.  *
  1750.  * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  1751.  * should scale the ient_TabletX and ient_TabletY fields and store the
  1752.  * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  1753.  * ient_ScaledYFraction.
  1754.  *
  1755.  * The tablet hook must currently return NULL.    This is the only
  1756.  * acceptable return-value under V39.
  1757.  *)
  1758.   TabletHookData=RECORD
  1759.    (* Pointer to the active screen:
  1760.     * Note: if there are no open screens, thd_Screen will be NULL.
  1761.     * thd_Width and thd_Height will then describe an NTSC 640x400
  1762.     * screen.    Please scale accordingly.
  1763.     *)
  1764.    screen:ScreenPtr;
  1765.  
  1766.    (* The width and height (measured in pixels of the active screen)
  1767.     * that your are to scale to:
  1768.     *)
  1769.    width:LONGCARD;
  1770.    height:LONGCARD;
  1771.  
  1772.    (* Non-zero if the screen or something about the screen
  1773.     * changed since the last time you were invoked:
  1774.     *)
  1775.    screenChanged:LONGINT;
  1776.   END;
  1777.  
  1778.  
  1779. (*- cghooks -*)
  1780.  
  1781. (*
  1782.  * Package of information passed to custom and 'boopsi'
  1783.  * gadget "hook" functions.  This structure is READ ONLY.
  1784.  *)
  1785.  
  1786.  GadgetInfo=RECORD
  1787.   screen:ScreenPtr;
  1788.   window:WindowPtr;           (* null for screen gadgets *)
  1789.   requester:RequesterPtr;     (* null if not GTYP_REQGADGET *)
  1790.   rastPort:RastPortPtr;
  1791.   layer:LayerPtr;
  1792.     (* copy of dimensions of screen/window/g00/req(/group)
  1793.      * that gadget resides in.    Left/Top of this box is
  1794.      * offset from window mouse coordinates to gadget coordinates
  1795.      *        screen gadgets:            0,0 (from screen coords)
  1796.      *    window gadgets (no g00):    0,0
  1797.      *    GTYP_GZZGADGETs (borderlayer):        0,0
  1798.      *    GZZ innerlayer gadget:        borderleft, bordertop
  1799.      *    Requester gadgets:        reqleft, reqtop
  1800.      *)
  1801.   domain:IBox;
  1802.     (* these are the pens for the window or screen    *)
  1803.   detailPen:SHORTCARD;
  1804.   blockPen:SHORTCARD;
  1805.     (* the Detail and Block pens in gi_DrInfo->dri_Pens[] are
  1806.      * for the screen.    Use the above for window-sensitive
  1807.      * colors.
  1808.      *)
  1809.   drInfo:DrawInfoPtr;
  1810.   reserved:ARRAY [0..5] OF LONGCARD;
  1811.  END;
  1812.  
  1813. (*** system private data structure for now ***)
  1814. (* prop gadget extra info    *)
  1815.  PGX=RECORD
  1816.   container:IBox;
  1817.   newKnob:IBox;
  1818.  END;
  1819.  
  1820. (*******************************************)
  1821. (*** "White box" access to struct IClass ***)
  1822. (*******************************************)
  1823.  
  1824. ClassID=ADDRESS;
  1825.  
  1826. (* This structure is READ-ONLY, and allocated only by Intuition *)
  1827. IClass=RECORD
  1828.  dispatcher:Hook;
  1829.  reserved:LONGCARD;
  1830.  super:IClassPtr;
  1831.  id:ClassID;
  1832.  instOffset:CARDINAL;
  1833.  instSize:CARDINAL;
  1834.  userData:LONGCARD;
  1835.  subclassCount:LONGCARD;
  1836.  objectCount:LONGCARD;
  1837.  flags:LONGSET;
  1838. END;
  1839.  
  1840. (**************************************************)
  1841. (*** "White box" access to struct _Object    ***)
  1842. (**************************************************)
  1843.  
  1844. (*
  1845.  * We have this, the instance data of the root class, PRECEDING
  1846.  * the "object".  This is so that Gadget objects are Gadget pointers,
  1847.  * and so on.  If this structure grows, it will always have o_Class
  1848.  * at the end, so the macro OCLASS(o) will always have the same
  1849.  * offset back from the pointer returned from NewObject().
  1850.  *
  1851.  * This data structure is subject to change.  Do not use the o_Node
  1852.  * embedded structure.
  1853.  *)
  1854.  Object=RECORD
  1855.   node:MinNode;
  1856.   class:IClassPtr;
  1857.  END;
  1858.  
  1859. (*- classuser.h -*)
  1860. (* you can use this type to point to a "generic" message,
  1861.  * in the object-oriented programming parlance.  Based on
  1862.  * the value of 'MethodID', you dispatch to processing
  1863.  * for the various message types.  The meaningful parameter
  1864.  * packet structure definitions are defined below.
  1865.  *)
  1866.  
  1867.  Msg=POINTER TO RECORD
  1868.   methodID:LONGCARD;
  1869.      (* method-specific data follows, some examples below *)
  1870.  END;
  1871.  
  1872. CONST
  1873.  
  1874. (*
  1875.  * Class id strings for Intuition classes.
  1876.  * There's no real reason to use the uppercase constants
  1877.  * over the lowercase strings, but this makes a good place
  1878.  * to list the names of the built-in classes.
  1879.  *)
  1880.   rootClass="rootclass";             (* classusr.h   *)
  1881.   imageClass="imageclass";            (* imageclass.h *)
  1882.   frameIClass="frameiclass";
  1883.   sysIClass="sysiclass";
  1884.   fillRectClass="fillrectclass";
  1885.   gadgetClass="gadgetclass";           (* gadgetclass.h *)
  1886.   progGClass="propgclass";
  1887.   strGClass="strgclass";
  1888.   buttonGClass="buttongclass";
  1889.   frButtonClass="frbuttonclass";
  1890.   groupGClass="groupgclass";
  1891.   icClass="icclass";               (* icclass.h    *)
  1892.   modelClass="modelclass";
  1893.  
  1894.   omDummy=0100H;      
  1895.   omNEW=0101H;        (* 'object' parameter is "true class"    *)
  1896.   omDISPOSE=0102H;    (* delete self (no parameters)        *)
  1897.   omSET=0103H;        (* set attributes (in tag list)        *)
  1898.   omGET=0104H;        (* return single attribute value    *)
  1899.   omADDTAIL=0105H;    (* add self to a List (let root do it)    *)
  1900.   omREMOVE=0106H;     (* remove self from list        *)
  1901.   omNOTIFY=0107H;     (* send to self: notify dependents    *)
  1902.   omUPDATE=0108H;     (* notification message from somebody    *)
  1903.   omADDMEMBER=0109H;  (* used by various classes with lists    *)
  1904.   omREMMEMBER=010AH;  (* used by various classes with lists    *)       
  1905.  
  1906. (* Parameter "Messages" passed to methods    *)
  1907. TYPE
  1908.   OpSet=RECORD
  1909.    methodID:LONGCARD;
  1910.    attrList:TagItemPtr;
  1911.    gInfo:GadgetInfoPtr;
  1912.   END;
  1913.  
  1914.   OpUpdate=RECORD
  1915.    methodID:LONGCARD;
  1916.    attrList:TagItemPtr; (* new attributes    *)
  1917.    gInfo:GadgetInfoPtr; (* non-NULL when SetGadgetAttrs or
  1918.                                    * notification resulting from gadget
  1919.                                    * input occurs.
  1920.                                    *)
  1921.  
  1922.    flags:LONGSET;       (* defined below    *)
  1923.   END;
  1924.  
  1925. (* this flag means that the update message is being issued from
  1926.  * something like an active gadget, a la GACT_FOLLOWMOUSE.  When
  1927.  * the gadget goes inactive, it will issue a final update
  1928.  * message with this bit cleared.  Examples of use are for
  1929.  * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes
  1930.  * for buttons.
  1931.  *)
  1932.  
  1933. CONST
  1934.   opufINTERIM=LONGSET{0};
  1935.  
  1936. TYPE
  1937.   OpGet=RECORD
  1938.    methodID:LONGCARD;
  1939.    attrID:LONGCARD;
  1940.    storage:POINTER TO LONGCARD; (* may be other types, but "int"
  1941.                                            * types are all ULONG
  1942.                                            *)
  1943.   END;
  1944.  
  1945. (* OM_ADDTAIL    *)
  1946.   OpAddTail=RECORD
  1947.    methodID:LONGCARD;
  1948.    list:ListPtr;
  1949.   END;
  1950.  
  1951. (* OM_ADDMEMBER, OM_REMMEMBER    *)
  1952.   OpMember=RECORD
  1953.    methodID:LONGCARD;
  1954.    object:ObjectPtr;
  1955.   END;
  1956.  
  1957.   OpAddMember=OpMember;
  1958.   OpAddMemberPtr=OpMemberPtr;
  1959.  
  1960. (*- gadgetclass.h -*)
  1961. (* Gadget Class attributes    *)
  1962. GaTags=(gaDummy:=tagUser+030000H,
  1963.         gaLeft,
  1964.         gaRelRight,
  1965.         gaTop,
  1966.         gaRelBottom,
  1967.         gaWidth,
  1968.         gaRelWidth,
  1969.         gaHeight,
  1970.         gaRelHeight,
  1971.         gaText,
  1972.         gaImage,
  1973.         gaBorder,
  1974.         gaSelectRender,
  1975.         gaHighlight,
  1976.         gaDisabled,
  1977.         gaGZZGadget,
  1978.         gaID,
  1979.         gaUserData,
  1980.         gaSpecialInfo,
  1981.         gaSelected,
  1982.         gaEndGadget,
  1983.         gaImmediate,
  1984.         gaRelVerify,
  1985.         gaFollowMouse,
  1986.         gaRightBorder,
  1987.         gaLeftBorder,
  1988.         gaTopBorder,
  1989.         gaBottomBorder,
  1990.         gaToggleSelect,
  1991.         gaSysGadget, (* internal use only, until further notice, please *)
  1992.         gaSysGType,  (* bool, sets GTYP_SYSGADGET field in type    *)
  1993.         gaPrevious,  
  1994.           (* previous gadget (or (struct Gadget) in linked list
  1995.            * NOTE: This attribute CANNOT be used to link new gadgets
  1996.            * into the gadget list of an open window or requester.
  1997.            * You must use AddGList().
  1998.             *)
  1999.         gaNext,           (* not implemented *)
  2000.         gaDrawInfo,
  2001.           (* some fancy gadgets need to see a DrawInfo
  2002.            * when created or for layout
  2003.            *)
  2004.         gaIntuiText,  (* ti_Data is (struct IntuiText *)
  2005.         gaLabelImage,
  2006.         (* ti_Data is an image (object), used in place of
  2007.            * GadgetText
  2008.         *)
  2009.         gaTabCycle,
  2010.           (* New for V37:
  2011.            * Boolean indicates that this gadget is to participate in
  2012.            * cycling activation with Tab or Shift-Tab.
  2013.            *)
  2014.         gaGadgetHelp,
  2015.           (* New for V39:
  2016.            * Boolean indicates that this gadget sends gadget-help
  2017.            *)
  2018.         gaBounds,
  2019.           (* New for V39:
  2020.            * ti_Data is a pointer to an IBox structure which is
  2021.            * to be copied into the extended gadget's bounds.
  2022.            *)
  2023.         gaRelSpecial
  2024.           (* New for V39:
  2025.            * Boolean indicates that this gadget has the "special relativity"
  2026.            * property, which is useful for certain fancy relativity
  2027.            * operations through the GM_LAYOUT method.
  2028.            *)
  2029.        );
  2030.  
  2031. PgaTags=(pgaDummy:=tagUser+031000H,
  2032.         pgaFreedom,
  2033.         pgaBorderless,
  2034.         pgaHorizPot,
  2035.         pgaHorizBody,
  2036.         pgaVertPot,
  2037.         pgaVertBody,
  2038.         pgaTotal,
  2039.         pgaVisible,
  2040.         pgaTop,
  2041.         pgaNewLook   (* New for V37: *)
  2042.        );
  2043.  
  2044. StringaTags=(stringaDummy:=tagUser+032000H,
  2045.         stringaMaxChars,
  2046.  
  2047. (* Note:  There is a minor problem with Intuition when using boopsi integer
  2048.  * gadgets (which are requested by using STRINGA_LongInt).  Such gadgets
  2049.  * must not have a STRINGA_MaxChars to be bigger than 15.  Setting
  2050.  * STRINGA_MaxChars for a boopsi integer gadget will cause a mismatched
  2051.  * FreeMem() to occur.
  2052.  *)
  2053.  
  2054.         stringaBuffer,
  2055.         stringaUndoBuffer,
  2056.         stringaWorkBuffer,
  2057.         stringaBufferPos,
  2058.         stringaDispPos,
  2059.         stringaAltKeyMap,
  2060.         stringaFont,
  2061.         stringaPens,
  2062.         stringaActivePens,
  2063.         stringaEditHook,
  2064.         stringaEditModes,
  2065. (* booleans *)
  2066.         stringaReplaceMode,
  2067.         stringaFixedFieldMode,
  2068.         stringaNoFilterMode,
  2069.         stringaJustification,
  2070.     (* GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT *)
  2071.         stringaLongVal,
  2072.         stringaTextVal,
  2073.         stringaExitHelp
  2074.           (* STRINGA_ExitHelp is new for V37, and ignored by V36.
  2075.            * Set this if you want the gadget to exit when Help is
  2076.            * pressed.  Look for a code of 0x5F, the rawkey code for Help
  2077.            *)
  2078.        );
  2079.  
  2080. CONST
  2081.  sgDefaultMaxChars=128;
  2082.  
  2083. TYPE
  2084.  LayoutaTags=(layoutaDummy:=tagUser+038000H,
  2085.         layoutaLayoutObj,
  2086.         layoutaSpacing,
  2087.         layoutaOrientation
  2088.        );
  2089.  
  2090. CONST
  2091.  lorientNone=0;
  2092.  lorientHoriz=1;
  2093.  lorientVert=2;
  2094.  
  2095.  gmDummy=-1;        (* not used for anything        *)
  2096.  gmHITTEST=0;       (* return GMR_GADGETHIT if you are clicked on
  2097.                              * (whether or not you are disabled).
  2098.                          *)
  2099.  gmRENDER=1;        (* draw yourself, in the appropriate state *)
  2100.  gmGOACTIVE=2;      (* you are now going to be fed input    *)
  2101.  gmHANDLEINPUT=3;   (* handle that input            *)
  2102.  gmGOINACTIVE=4;    (* whether or not by choice, you are done  *)
  2103.  gmHelpTest=5;      (* Will you send gadget help if the mouse is  
  2104.                              * at the specified coordinates?  See below
  2105.                              * for possible GMR_ values.
  2106.                              *)
  2107.  gmLayout=6;        (* re-evaluate your size based on the GadgetInfo
  2108.                              * Domain.  Do NOT re-render yourself yet, you
  2109.                              * will be called when it is time...
  2110.                              *)
  2111.  
  2112.  
  2113. TYPE
  2114. (* Parameter "Messages" passed to gadget class methods    *)
  2115.  
  2116. (* GM_HITTEST and GM_HELPTEST send this message.
  2117.  * For GM_HITTEST, gpht_Mouse are coordinates relative to the gadget
  2118.  * select box.    For GM_HELPTEST, the coordinates are relative to
  2119.  * the gadget bounding box (which defaults to the select box).
  2120.  *)
  2121.  GpHitTest=RECORD
  2122.         methodID:LONGCARD;
  2123.         gInfo:GadgetInfoPtr;
  2124.         mouse:Point;
  2125.        END;
  2126.  
  2127. (* For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit,
  2128.  * otherwise return zero.
  2129.  *
  2130.  * For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit.
  2131.  * Typically, return GMR_HELPHIT if you were hit.
  2132.  * It is possible to pass a UWORD to the application via the Code field
  2133.  * of the IDCMP_GADGETHELP message.  Return GMR_HELPCODE or'd with
  2134.  * the UWORD-sized result you wish to return.
  2135.  *
  2136.  * GMR_HELPHIT yields a Code value of ((UWORD) ~0), which should
  2137.  * mean "nothing particular" to the application.
  2138.  *)
  2139. CONST
  2140.  gmrGadgetHit=000000004H; (* GM_HITTEST hit *)
  2141.  
  2142.  gmrNoHelpHit=000000000H; (* GM_HELPTEST didn't hit *)
  2143.  gmrHelpHit  =0FFFFFFFFH; (* GM_HELPTEST hit, return code = ~0 *)
  2144.  gmrHelpCode =000010000H; (* GM_HELPTEST hit, return low word as code *)
  2145.  
  2146. TYPE
  2147. (* GM_RENDER    *)
  2148.  GpRender=RECORD
  2149.         methodID:LONGCARD;
  2150.         gInfo:GadgetInfoPtr;  (* gadget context        *)
  2151.         rPort:RastPortPtr;    (* all ready for use        *)
  2152.         redraw:LONGINT;       (* might be a "highlight pass"    *)
  2153.        END;
  2154.  
  2155. CONST
  2156. (* values of gpr_Redraw    *)
  2157.  gRedrawUpdate=2;(* incremental update, e.g. prop slider    *)
  2158.  gRedrawRedraw=1;(* redraw gadget    *)
  2159.  gRedrawToggle=0;(* toggle highlight, if applicable    *)     
  2160.  
  2161. TYPE
  2162. (* GM_GOACTIVE, GM_HANDLEINPUT    *)
  2163.  GpInput=RECORD
  2164.         methodID:LONGCARD;
  2165.         gInfo:GadgetInfoPtr;
  2166.         iEvent:InputEventPtr;
  2167.         termination:ADDRESS;
  2168.         mouse:Point;
  2169.         (* (V39) Pointer to TabletData structure, if this event originated
  2170.          * from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if
  2171.          * not.
  2172.          *
  2173.          * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
  2174.          * IT WILL BE INVALID!
  2175.         *)
  2176.         tabletData:TabletDataPtr;
  2177.        END;
  2178.  
  2179. CONST
  2180. (* GM_HANDLEINPUT and GM_GOACTIVE  return code flags    *)
  2181. (* return GMR_MEACTIVE (0) alone if you want more input.
  2182.  * Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally
  2183.  * GMR_VERIFY.
  2184.  *)
  2185.  gmrMeActive=0;
  2186.  gmrNoReuse=1;
  2187.  gmrReuse=2;
  2188.  gmrVerify=3;
  2189. (* New for V37:
  2190.  * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE,
  2191.  * which instructs Intuition to activate the next or previous gadget
  2192.  * that has GFLG_TABCYCLE set.
  2193.  *)
  2194.  gmrNextActive=4;
  2195.  gmrPrevActive=5;
  2196.  
  2197. TYPE
  2198.  GpGoInactive=RECORD
  2199.         methodID:LONGCARD;
  2200.         gInfo:GadgetInfoPtr;
  2201.         abort:LONGCARD;
  2202.        END;
  2203.  
  2204. (* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when
  2205.  * the window opens, or when the gadget is activated, or when the
  2206.  * window is sized.  Your gadget can set the GA_RelSpecial property
  2207.  * to get GM_LAYOUT events without Intuition changing the interpretation
  2208.  * of your gadget select box.
  2209.  *)
  2210. (* GM_LAYOUT *)
  2211.  GpLayout=RECORD
  2212.         methodID:LONGCARD;
  2213.         gInfo:GadgetInfoPtr;
  2214.         initial:LONGCARD; (* non-zero if this method was invoked
  2215.                                      * during AddGList() or OpenWindow()
  2216.                                      * time.  zero if this method was invoked
  2217.                                      * during window resizing.
  2218.                                      *)
  2219.        END;
  2220.  
  2221. (*- icclass.h -*)
  2222. CONST
  2223.   icmDummy=0401H;       (* used for nothing        *)
  2224.   icmSETLOOP=0402H;     (* set/increment loop counter    *)
  2225.   icmCLEARLOOP=0403H;   (* clear/decrement loop counter    *)
  2226.   icmCHECKLOOP=0404H;   (* set/increment loop        *)
  2227.  
  2228. (* no parameters for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP    *)
  2229.  
  2230. (* interconnection attributes used by icclass, modelclass, and gadgetclass *)
  2231. TYPE
  2232.  IcaTags=(icaDummy:=tagUser+040000H,
  2233.         icaTarget,    (* interconnection target        *)
  2234.         icaMap, (* interconnection map tagitem list    *)
  2235.         icspecialCode (* a "pseudo-attribute", see below.    *)
  2236.  );
  2237.  
  2238. CONST
  2239. (* Normally, the value for ICA_TARGET is some object pointer,
  2240.  * but if you specify the special value ICTARGET_IDCMP, notification
  2241.  * will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's
  2242.  * IDCMP port.    See the definition of IDCMP_IDCMPUPDATE.
  2243.  *
  2244.  * When you specify ICTARGET_IDCMP for ICA_TARGET, the map you
  2245.  * specify will be applied to derive the attribute list that is
  2246.  * sent with the IDCMP_IDCMPUPDATE message.  If you specify a map list
  2247.  * which results in the attribute tag id ICSPECIAL_CODE, the
  2248.  * lower sixteen bits of the corresponding ti_Data value will
  2249.  * be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage.
  2250.  *)
  2251.  icTargetIDCMP=-1;
  2252.  
  2253. (*- imageclass.h -*)
  2254.  
  2255.  customImageDepth=-1;
  2256. (* if image.Depth is this, it's a new Image class object *)
  2257.  
  2258. TYPE
  2259.  IaTags=(iaDummy:=tagUser+020000H,
  2260.         iaLeft,
  2261.         iaTop,
  2262.         iaWidth,
  2263.         iaHeight,
  2264.         iaFGPen,
  2265.             (* IA_FGPen also means "PlanePick"    *)
  2266.         iaBGPen,
  2267.             (* IA_BGPen also means "PlaneOnOff"    *)
  2268.         iaData,
  2269.             (* bitplanes, for classic image,
  2270.              * other image classes may use it for other things
  2271.              *)
  2272.         iaLineWidth,
  2273.         iaShadowPen,
  2274.         iaHighlightPen,
  2275. (**** "sysiclass" attributes            *****)
  2276.         sysiaSize,
  2277.         sysiaDepth,
  2278.             (* this is unused by Intuition.  SYSIA_DrawInfo
  2279.              * is used instead for V36
  2280.              *)
  2281.         sysiaWhich,
  2282.         iaPens,
  2283.             (* pointer to UWORD pens[],
  2284.              * ala DrawInfo.Pens, MUST be
  2285.              * terminated by ~0.  Some classes can
  2286.              * choose to have this, or SYSIA_DrawInfo,
  2287.              * or both.
  2288.              *)
  2289.         iaResolution,
  2290.             (* packed uwords for x/y resolution into a longword
  2291.              * ala DrawInfo.Resolution
  2292.              *)
  2293.  
  2294. (**** see class documentation to learn which    *****)
  2295. (**** classes recognize these            *****)
  2296.         iaAPattern,
  2297.         iaAPatSize,
  2298.         iaMode,
  2299.         iaFont,
  2300.         iaOutline,
  2301.         iaRecessed,
  2302.         iaDoubleEmboss,
  2303.         iaEdgesOnly,
  2304.         sysiaDrawInfo,
  2305. (* New for V39: *)
  2306.         sysiaReferenceFont,
  2307.             (* Font to use as reference for scaling
  2308.              * certain sysiclass images
  2309.              *)
  2310.         iaSupportsDisable,
  2311.             (* By default, Intuition ghosts gadgets itself,
  2312.              * instead of relying on IDS_DISABLED or
  2313.              * IDS_SELECTEDDISABLED.  An imageclass that
  2314.              * supports these states should return this attribute
  2315.              * as TRUE.  You cannot set or clear this attribute,
  2316.              * however.
  2317.              *)
  2318.         iaFrameType
  2319.             (* Starting with V39, FrameIClass recognizes
  2320.              * several standard types of frame.  Use one
  2321.              * of the FRAME_ specifiers below.    Defaults
  2322.              * to FRAME_DEFAULT.
  2323.              *)
  2324.        );
  2325.  
  2326. (** next attribute: (IA_Dummy + 0x1c)    **)
  2327. (*************************************************)
  2328.  
  2329. (* data values for SYSIA_Size    *)
  2330. CONST
  2331.  sysiaPens=iaPens;
  2332.  
  2333.  sysisizeMedres=0;
  2334.  sysisizeLowres=1;
  2335.  sysisizeHires= 2;
  2336.  
  2337. (*
  2338.  * SYSIA_Which tag data values:
  2339.  * Specifies which system gadget you want an image for.
  2340.  * Some numbers correspond to internal Intuition #defines
  2341.  *)
  2342.  depthImage=00H;  (* Window depth gadget image *)
  2343.  zoomImage=01H;   (* Window zoom gadget image *)
  2344.  sizeImage=02H;   (* Window sizing gadget image *)
  2345.  closeImage=03H;  (* Window close gadget image *)
  2346.  sdepthImage=05H; (* Screen depth gadget image *)
  2347.  leftImage=0AH;   (* Left-arrow gadget image *)
  2348.  upImage=0BH;     (* Up-arrow gadget image *)
  2349.  rightImage=0CH;  (* Right-arrow gadget image *)
  2350.  downImage=0DH;   (* Down-arrow gadget image *)
  2351.  checkImage=0EH;  (* GadTools checkbox image *)
  2352.  mxImage=0FH;     (* GadTools mutual exclude "button" image *)
  2353. (* New for V39: *)
  2354.  menuCheck=10H;   (* Menu checkmark image *)
  2355.  amigakey=11H;    (* Menu Amiga-key image *)
  2356.  
  2357. (* Data values for IA_FrameType (recognized by FrameIClass)
  2358.  *
  2359.  * FRAME_DEFAULT:  The standard V37-type frame, which has
  2360.  *    thin edges.
  2361.  * FRAME_BUTTON:  Standard button gadget frames, having thicker
  2362.  *    sides and nicely edged corners.
  2363.  * FRAME_RIDGE:  A ridge such as used by standard string gadgets.
  2364.  *    You can recess the ridge to get a groove image.
  2365.  * FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
  2366.  *    for areas in AppWindows where icons may be dropped.
  2367.  *)
  2368.  frameDefault=0;
  2369.  frameButton=1;
  2370.  frameRidge=2;
  2371.  frameIconDropBox=3;
  2372.  
  2373. (* image message id's    *)
  2374.  imDraw=202H;     (* draw yourself, with "state"        *)
  2375.  imHitTest=203H;  (* return TRUE if click hits image    *)
  2376.  imErase=204H;    (* erase yourself            *)
  2377.  imMove=205H;     (* draw new and erase old, smoothly    *)
  2378.  
  2379.  imDrawFrame=206H;  (* draw with specified dimensions    *)
  2380.  imFrameBox=207H;   (* get recommended frame around some box*)
  2381.  imHitFrame=208H;   (* hittest with dimensions        *)
  2382.  imEraseFrame=209H; (* hittest with dimensions        *)           
  2383.  
  2384. (* image draw states or styles, for IM_DRAW *)
  2385. (* Note that they have no bitwise meanings (unfortunately) *)
  2386.  idsNormal=0;
  2387.  idsSelected=1;           (* for selected gadgets        *)
  2388.  idsDisabled=2;           (* for disabled gadgets        *)
  2389.  idsBusy=3;               (* for future functionality *)
  2390.  idsIndeterminate=4;      (* for future functionality *)
  2391.  idsInactiveNormal=5;     (* normal, in inactive window border *)
  2392.  idsInactiveSelected=6;   (* selected, in inactive border *)
  2393.  idsInactiveDisabled=7;   (* disabled, in inactive border *)
  2394.  idsSelectedDisabled=8;   (* disabled and selected    *)           
  2395.  
  2396. TYPE
  2397. (* IM_FRAMEBOX    *)
  2398.  ImpFrameBox=RECORD
  2399.         methodID:LONGCARD;   
  2400.         contentsBox:IBoxPtr;  (* input: relative box of contents *)
  2401.         frameBox:IBoxPtr;     (* output: rel. box of encl frame  *)
  2402.         drInfo:DrawInfoPtr;   (* NB: May be NULL *)                
  2403.         frameFlags:LONGSET;
  2404.        END;
  2405.  
  2406. CONST
  2407.  framefSpecify=LONGSET{0};  (* Make do with the dimensions of FrameBox
  2408.                                      * provided.
  2409.                                      *)
  2410.  
  2411. TYPE
  2412. (* IM_DRAW, IM_DRAWFRAME    *)
  2413.  ImpDraw=RECORD
  2414.         methodID:LONGCARD;
  2415.         rPort:RastPortPtr;
  2416.         offset:RECORD
  2417.          x:INTEGER;
  2418.          y:INTEGER;
  2419.         END;
  2420.         state:LONGCARD;
  2421.         drInfo:DrawInfoPtr; (* NB: May be NULL *)
  2422.         dimensions:RECORD (* these parameters only valid for IM_DRAWFRAME *)
  2423.          width:INTEGER;
  2424.          height:INTEGER;
  2425.         END;
  2426.        END;
  2427.  
  2428. (* IM_ERASE, IM_ERASEFRAME    *)
  2429. (* NOTE: This is a subset of impDraw    *)
  2430.  ImpErase=RECORD
  2431.         methodID:LONGCARD;
  2432.         rPort:RastPortPtr;
  2433.         offset:RECORD
  2434.          x:INTEGER;
  2435.          y:INTEGER;
  2436.         END;
  2437.         dimensions:RECORD
  2438.          width:INTEGER;
  2439.          height:INTEGER;
  2440.         END;
  2441.        END;
  2442.  
  2443. (* IM_HITTEST, IM_HITFRAME    *)
  2444.  ImpHitTest=RECORD
  2445.         methodID:LONGCARD;
  2446.         point:Point;
  2447.         dimensions:RECORD
  2448.          width:INTEGER;
  2449.          height:INTEGER;
  2450.         END;
  2451.        END;
  2452.  
  2453. (* IntuitionBase *)
  2454.  IntuitionBase=RECORD
  2455.   libNode:Library;
  2456.   viewLord:View;
  2457.   activeWindow:WindowPtr;
  2458.   activeScreen:ScreenPtr;
  2459.   firstScreen:ScreenPtr;
  2460.   flags:LONGSET;
  2461.   mouseY:INTEGER;
  2462.   mouseX:INTEGER;
  2463.   seconds:LONGCARD;
  2464.   micros:LONGCARD;
  2465.  END;
  2466.  
  2467. END IntuitionD.