home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-26 | 173.5 KB | 4,671 lines |
- (**************************************************************************
-
- $RCSfile: Intuition.mod $
- Description: Interface to intuition.library
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.7 $
- $Author: fjc $
- $Date: 1995/01/26 02:39:55 $
-
- Includes Release 40.15
-
- (C) Copyright 1985-1993 Commodore-Amiga, Inc.
- All Rights Reserved
-
- Oberon-A interface Copyright © 1994-1995, Frank Copeland.
- This file is part of the Oberon-A Interface.
- See Oberon-A.doc for conditions of use and distribution.
-
- ***************************************************************************)
-
- <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
- <*$ CaseChk- IndexChk- LongVars+ NilChk- *>
- <*$ RangeChk- StackChk- TypeChk- OvflChk- *>
-
- MODULE [2] Intuition;
-
- IMPORT
- SYS := SYSTEM, Kernel, e := Exec, t := Timer, u := Utility,
- gfx := Graphics, ie := InputEvent, km := KeyMap, s := Sets;
-
- (*-- Pointer declarations ---------------------------------------------*)
-
- TYPE
-
- MenuPtr * = POINTER TO Menu;
- MenuItemPtr * = POINTER TO MenuItem;
- RequesterPtr * = POINTER TO Requester;
- GadgetPtr * = POINTER TO Gadget;
- BoolInfoPtr * = POINTER TO BoolInfo;
- PropInfoPtr * = POINTER TO PropInfo;
- StringInfoPtr * = POINTER TO StringInfo;
- IntuiTextPtr * = POINTER TO IntuiText;
- BorderPtr * = POINTER TO Border;
- ImagePtr * = POINTER TO Image;
- IntuiMessagePtr * = POINTER TO IntuiMessage;
- IBoxPtr * = POINTER TO IBox;
- WindowPtr * = POINTER TO Window;
- NewWindowPtr * = POINTER TO NewWindow;
- ExtNewWindowPtr * = POINTER TO ExtNewWindow;
- DrawInfoPtr * = POINTER TO DrawInfo;
- ScreenPtr * = POINTER TO Screen;
- NewScreenPtr * = POINTER TO NewScreen;
- ExtNewScreenPtr * = POINTER TO ExtNewScreen;
- PubScreenNodePtr * = POINTER TO PubScreenNode;
- PreferencesPtr * = POINTER TO Preferences;
- RememberPtr * = POINTER TO Remember;
- ColorSpecPtr * = POINTER TO ColorSpec;
- EasyStructPtr * = POINTER TO EasyStruct;
- StringExtendPtr * = POINTER TO StringExtend;
- SGWorkPtr * = POINTER TO SGWork;
- GadgetInfoPtr * = POINTER TO GadgetInfo;
- PGXPtr * = POINTER TO PGX;
- MsgPtr * = POINTER TO Msg;
- OpSetPtr * = POINTER TO OpSet;
- OpUpdatePtr * = POINTER TO OpUpdate;
- OpGetPtr * = POINTER TO OpGet;
- OpAddTailPtr * = POINTER TO OpAddTail;
- IClassPtr * = POINTER TO IClass;
- ObjectPtr * = POINTER TO Object;
- OpMemberPtr * = POINTER TO OpMember;
- HitTestPtr * = POINTER TO HitTest;
- RenderPtr * = POINTER TO Render;
- InputPtr * = POINTER TO Input;
- GoInactivePtr * = POINTER TO GoInactive;
- FrameBoxPtr * = POINTER TO FrameBox;
- DrawPtr * = POINTER TO Draw;
- ErasePtr * = POINTER TO Erase;
- IMHitTestPtr * = POINTER TO IMHitTest;
- DRIPenArrayPtr* = POINTER TO DRIPenArray;
- GadSpecialInfoPtr* = POINTER TO GadSpecialInfo;
- ExtGadgetPtr * = POINTER TO ExtGadget;
- ScreenBufferPtr * = POINTER TO ScreenBuffer;
- TabletDataPtr * = POINTER TO TabletData;
- TabletHookDataPtr * = POINTER TO TabletHookData;
- LayoutPtr * = POINTER TO Layout;
-
-
- (*
- ** $VER: intuition.h 38.26 (15.2.93)
- **
- ** Interface definitions for Intuition applications.
- *)
-
- (* ======================================================================== *)
- (* === Menu =============================================================== *)
- (* ======================================================================== *)
-
- TYPE
-
- Menu * = RECORD
- nextMenu * : MenuPtr; (* same level *)
- leftEdge *, topEdge * : INTEGER; (* position of the select box *)
- width *, height * : INTEGER; (* dimensions of the select box *)
- flags * : s.SET16; (* see flag definitions below *)
- menuName * : e.LSTRPTR; (* text for this Menu Header *)
- firstItem * : MenuItemPtr; (* pointer to first in chain *)
-
- (* these mysteriously-named variables are for internal use only *)
- jazzX *, jazzY *, beatX *, beatY * : INTEGER;
- END; (* Menu *)
-
- CONST
-
- (* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION *)
- menuEnabled * = 0; (* whether or not this menu is enabled *)
-
- (* FLAGS SET BY INTUITION *)
- miDrawn * = 8; (* this menu's items are currently drawn *)
-
- (* ======================================================================== *)
- (* === MenuItem =========================================================== *)
- (* ======================================================================== *)
-
- TYPE
-
- MenuItem * = RECORD
- nextItem * : MenuItemPtr; (* pointer to next in chained list *)
- leftEdge *, topEdge * : INTEGER; (* position of the select box *)
- width *, height * : INTEGER; (* dimensions of the select box *)
- flags * : s.SET16; (* see the defines below *)
-
- mutualExclude * : s.SET32; (* set bits mean this item excludes that *)
-
- itemFill * : e.APTR; (* points to Image, IntuiText, or NULL *)
-
- (* when this item is pointed to by the cursor and the items highlight
- * mode HIGHIMAGE is selected, this alternate image will be displayed
- *)
- selectFill * : e.APTR; (* points to Image, IntuiText, or NULL *)
-
- command * : CHAR; (* only if appliprog sets the COMMSEQ flag *)
-
- subItem * : MenuItemPtr; (* if non-zero, points to MenuItem for submenu *)
-
- (* The NextSelect field represents the menu number of next selected
- * item (when user has drag-selected several items)
- *)
- nextSelect * : e.UWORD;
- END; (* MenuItem *)
-
-
- CONST
-
- (* FLAGS SET BY THE APPLIPROG *)
- checkIt * = 0; (* set to indicate checkmarkable item *)
- itemText * = 1; (* set if textual, clear if graphical item *)
- commSeq * = 2; (* set if there's an command sequence *)
- menuToggle * = 3; (* set for toggling checks (else mut. exclude) *)
- itemEnabled * = 4; (* set if this item is enabled *)
-
- (* these are the SPECIAL HIGHLIGHT FLAG state meanings *)
- highFlags * = {6,7}; (* see definitions below for these bits *)
- highImage * = {}; (* use the user's "select image" *)
- highComp * = {6}; (* highlight by complementing the selectbox *)
- highBox * = {7}; (* highlight by "boxing" the selectbox *)
- highNone * = {6,7}; (* don't highlight *)
-
- (* FLAGS SET BY BOTH APPLIPROG AND INTUITION *)
- checked * = 8; (* state of the checkmark *)
-
- (* FLAGS SET BY INTUITION *)
- isDrawn * = 12; (* this item's subs are currently drawn *)
- highItem * = 13; (* this item is currently highlighted *)
- menuToggled * = 14; (* this item was already toggled *)
-
- (* ======================================================================== *)
- (* === Requester ========================================================== *)
- (* ======================================================================== *)
-
- TYPE
-
- Requester * = RECORD
- olderRequest * : RequesterPtr;
- leftEdge *, topEdge * : INTEGER; (* dimensions of the entire box *)
- width *, height * : INTEGER; (* dimensions of the entire box *)
- relLeft *, relTop * : INTEGER; (* for Pointer relativity offsets *)
-
- reqGadget * : GadgetPtr; (* pointer to a list of Gadgets *)
- reqBorder * : BorderPtr; (* the box's border *)
- reqText * : IntuiTextPtr; (* the box's text *)
- flags * : s.SET16; (* see definitions below *)
-
- (* pen number for back-plane fill before draws *)
- backFill * : SHORTINT;
- (* Layer in place of clip rect *)
- reqLayer * : gfx.LayerPtr;
-
- reqPad1 * : ARRAY 32 OF e.UBYTE;
-
- (* If the BitMap plane pointers are non-zero, this tells the system
- * that the image comes pre-drawn (if the appliprog wants to define
- * its own box, in any shape or size it wants!); this is OK by
- * Intuition as long as there's a good correspondence between
- * the image and the specified Gadgets
- *)
- imageBMap * : gfx.BitMapPtr; (* points to the gfx.BitMap of PREDRAWN imagery *)
- rWindow * : WindowPtr; (* added. points back to Window *)
-
- reqImage * : ImagePtr; (* new for V36: drawn if USEREQIMAGE set *)
-
- reqPad2 * : ARRAY 32 OF e.UBYTE;
- END; (* Requester *)
-
- CONST
-
- (* FLAGS SET BY THE APPLIPROG *)
- pointRel * = 0;
- (* if POINTREL set, TopLeft is relative to pointer
- * for DMRequester, relative to window center
- * for Request().
- *)
- preDrawn * = 1;
- (* set if Requester.ImageBMap points to predrawn Requester imagery *)
- noisyReq * = 2;
- (* if you don't want requester to filter input *)
- simpleReq * = 4;
- (* to use SIMPLEREFRESH layer (recommended) *)
-
- (* New for V36 *)
- useReqImage * = 5;
- (* render linked list ReqImage after BackFill
- * but before gadgets and text
- *)
- noReqBackFill * = 6;
- (* don't bother filling requester with Requester.BackFill pen *)
-
-
- (* FLAGS SET BY INTUITION *)
- reqOffWindow * = 12; (* part of one of the Gadgets was offwindow *)
- reqActive * = 13; (* this requester is active *)
- sysRequest * = 14; (* (unused) this requester caused by system *)
- deferRefresh * = 15; (* this Requester stops a Refresh broadcast *)
-
- (* ======================================================================== *)
- (* === Gadget ============================================================= *)
- (* ======================================================================== *)
-
- TYPE
- GadSpecialInfo * = RECORD END;
-
- Gadget * = RECORD
- nextGadget * : GadgetPtr; (* next gadget in the list *)
-
- leftEdge* , topEdge * : INTEGER; (* "hit box" of gadget *)
- width* , height * : INTEGER; (* "hit box" of gadget *)
-
- flags * : s.SET16; (* see below for list of defines *)
-
- activation * : s.SET16; (* see below for list of defines *)
-
- gadgetType * : INTEGER; (* see below for defines *)
-
- (* appliprog can specify that the Gadget be rendered as either as Border
- * or an Image. This variable points to which (or equals NULL if there's
- * nothing to be rendered about this Gadget)
- *)
- gadgetRender * : e.APTR;
-
- (* appliprog can specify "highlighted" imagery rather than algorithmic
- * this can point to either Border or Image data
- *)
- selectRender * : e.APTR;
-
- gadgetText * : IntuiTextPtr; (* text for this gadget *)
-
- (* MutualExclude, never implemented, is now declared obsolete.
- * There are published examples of implementing a more general
- * and practical exclusion in your applications.
- *
- * Starting with V36, this field is used to point to a hook
- * for a custom gadget.
- *
- * Programs using this field for their own processing will
- * continue to work, as long as they don't try the
- * trick with custom gadgets.
- *)
- mutualExclude * : s.SET32; (* obsolete *)
-
- (* pointer to a structure of special data required by Proportional,
- * String and Integer Gadgets
- *)
- specialInfo * : GadSpecialInfoPtr;
-
- gadgetID * : e.UWORD; (* user-definable ID field *)
- userData * : e.APTR; (* ptr to general purpose User data (ignored by In) *)
- END; (* Gadget *)
-
- GadgetDummy * = Gadget;
- GadgetDummyPtr * = GadgetPtr;
-
- ExtGadget * = RECORD (Gadget) (* The first fields match struct Gadget exactly *)
- (* These fields only exist under V39 and only if gflgExtended is set *)
- moreFlags * : s.SET32; (* see gmore* flags below *)
- boundsLeftEdge * : INTEGER; (* Bounding extent for gadget, valid *)
- boundsTopEdge * : INTEGER; (* only if gmoreBounds is set. The *)
- boundsWidth * : INTEGER; (* gflgRelxxx flags affect these *)
- boundsHeight * : INTEGER; (* coordinates as well. *)
- END;
-
- CONST
-
- (* --- Gadget.Flags values --- *)
- (* combinations in these bits describe the highlight technique to be used *)
- gadgHighBits * = {0,1};
- gadgHComp * = {}; (* Complement the select box *)
- gadgHBox * = {0}; (* Draw a box around the image *)
- gadgHImage * = {1}; (* Blast in this alternate image *)
- gadgHNone * = {0,1}; (* don't highlight *)
-
- gadgImage * = 2; (* set if GadgetRender and SelectRender
- * point to an Image structure, clear
- * if they point to Border structures
- *)
-
- (* combinations in these next two bits specify to which corner the gadget's
- * Left & Top coordinates are relative. If relative to Top/Left,
- * these are "normal" coordinates (everything is relative to something in
- * this universe).
- *
- * Gadget positions and dimensions are relative to the window or
- * requester which contains the gadget
- *)
- gRelBottom * = 3; (* vert. pos. is relative to bottom edge *)
- gRelRight * = 4; (* horiz. pos. is relative to right edge *)
- gRelWidth * = 5; (* width is relative to req/window *)
- gRelHeight * = 6; (* height is relative to req/window *)
-
- (* New for V39: gflgRelSpecial allows custom gadget implementors to
- * make gadgets whose position and size depend in an arbitrary way
- * on their window's dimensions. The gmLayout method will be invoked
- * for such a gadget (or any other grelXxx gadget) at suitable times,
- * such as when the window opens or the window's size changes.
- *)
- gRelSpecial * = 14; (* custom gadget has special relativity.
- * Gadget box values are absolutes, but
- * can be changed via the GM_LAYOUT method.
- *)
- selected * = 7; (* you may initialize and look at this *)
-
- (* the gflgDISABLED flag is initialized by you and later set by Intuition
- * according to your calls to On/OffGadget(). It specifies whether or not
- * this Gadget is currently disabled from being selected
- *)
- gadgDisabled * = 8;
-
- (* These flags specify the type of text field that Gadget.GadgetText
- * points to. In all normal (pre-V36) gadgets which you initialize
- * this field should always be zero. Some types of gadget objects
- * created from classes will use these fields to keep track of
- * types of labels/contents that different from IntuiText, but are
- * stashed in GadgetText.
- *)
-
- labelMask * = {12,13};
- labelIText * = {}; (* GadgetText points to IntuiText *)
- labelString * = 12; (* GadgetText points to string *)
- labelImage * = 13; (* GadgetText points to Image (object) *)
-
- (* New for V37: gflgTabCycle *)
- tabCycle * = 9; (* (string or custom) gadget participates in
- * cycling activation with Tab or Shift-Tab
- *)
- (* New for V37: gflgStringExtend. We discovered that V34 doesn't properly
- * ignore the value we had chosen for the Gadget->Activation flag
- * gactStringExtend. NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
- * The Gadget->Flags bit gflgStringExtend is provided as a synonym which is
- * safe under V34, and equivalent to gactStringExtend under V37.
- * (Note that the two flags are not numerically equal)
- *)
- stringExtend * = 10; (* this String Gadget has StringExtend *)
-
- (* New for V39: gflgImageDisable. This flag is automatically set if
- * the custom image of this gadget knows how to do disabled rendering
- * (more specifically, if its IA_SupportsDisable attribute is TRUE).
- * Intuition uses this to defer the ghosting to the image-class,
- * instead of doing it itself (the old compatible way).
- * Do not set this flag yourself - Intuition will do it for you.
- *)
-
- gImagedisable * = 11; (* Gadget's image knows how to do disabled
- * rendering
- *)
-
- (* New for V39: If set, this bit means that the Gadget is actually
- * a struct ExtGadget, with new fields and flags. All V39 boopsi
- * gadgets are ExtGadgets. Never ever attempt to read the extended
- * fields of a gadget if this flag is not set.
- *)
- gExtended * = 15; (* Gadget is extended *)
-
- (* --- Gadget.Activation flag values --- *)
- (* Set gactRelVerify if you want to verify that the pointer was still over
- * the gadget when the select button was released. Will cause
- * an idcmpGadgetUp message to be sent if so.
- *)
- relVerify * = 0;
-
- (* the flag gactImmediate, when set, informs the caller that the gadget
- * was activated when it was activated. This flag works in conjunction with
- * the gactRelVerify flag
- *)
- gadgImmediate * = 1;
-
- (* the flag gactEndGadget, when set, tells the system that this gadget,
- * when selected, causes the Requester to be ended. Requesters
- * that are ended are erased and unlinked from the system.
- *)
- endGadget * = 2;
-
- (* the gactFollowMouse flag, when set, specifies that you want to receive
- * reports on mouse movements while this gadget is active.
- * You probably want to set the gactImmediate flag when using
- * gactFollowMouse, since that's the only reasonable way you have of
- * learning why Intuition is suddenly sending you a stream of mouse
- * movement events. If you don't set gactRelVerify, you'll get at
- * least one Mouse Position event.
- * Note: boolean FollowMouse gadgets require gactRelVerify to get
- * any mouse movement events (this unusual behavior is a compatibility
- * hold-over from the old days).
- *)
- followMouse * = 3;
-
- (* if any of the Border flags are set in a Gadget that's included in the
- * Gadget list when a Window is opened, the corresponding Border will
- * be adjusted to make room for the Gadget
- *)
- rightBorder * = 4;
- leftBorder * = 5;
- topBorder * = 6;
- bottomBorder * = 7;
- borderSniff * = 15; (* neither set nor rely on this bit *)
-
- toggleSelect * = 8; (* this bit for toggle-select mode *)
- boolExtend * = 13; (* this Boolean Gadget has a BoolInfo *)
-
- (* should properly be in StringInfo, but aren't *)
- stringLeft * = {}; (* NOTE WELL: that this has value zero *)
- stringCenter * = 9;
- stringRight * = 10;
- longint * = 11; (* this String Gadget is for Long Ints *)
- altKeymap * = 12; (* this String has an alternate keymap *)
- actStringExtend * = 13; (* this String Gadget has StringExtend *)
- (* NOTE: NEVER SET gactStringExtend IF YOU
- * ARE RUNNING ON LESS THAN V36! SEE
- * gflgStringExtend (ABOVE) INSTEAD
- *)
-
- activeGadget * = 14; (* this gadget is "active". This flag
- * is maintained by Intuition, and you
- * cannot count on its value persisting
- * while you do something on your program's
- * task. It can only be trusted by
- * people implementing custom gadgets
- *)
-
- (* note 15 is used above (gactBorderSniff)
- * all Activation flags defined *)
-
- (* --- GADGET TYPES ------------------------------------------------------- *)
- (* These are the Gadget Type definitions for the variable GadgetType
- * gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED.
- * first comes the mask for Gadget flags reserved for Gadget typing
- *)
- gadgetType * = -0400H; (* all Gadget Global Type flags (padded) *)
- scrGadget * = 04000H; (* 1 = ScreenGadget, 0 = WindowGadget *)
- gzzGadget * = 02000H; (* 1 = for WFLG_GIMMEZEROZERO borders *)
- reqGadget * = 01000H; (* 1 = this is a Requester Gadget *)
-
- (* gtypSysGadget means that Intuition ALLOCATED the gadget.
- * gtypSysTypeMask is the mask you can apply to tell what type of
- * system-gadget it is. The possible types follow.
- *)
- sysGadget * = -10000H;
- sysTypeMask * = 000F0H;
-
- (* These definitions describe system gadgets in V36 and higher: *)
- sizing * = 00010H; (* Window sizing gadget *)
- wDragging * = 00020H; (* Window drag bar *)
- sDragging * = 00030H; (* Screen drag bar *)
- wDepth * = 00040H; (* Window depth gadget *)
- sDepth * = 00050H; (* Screen depth gadget *)
- wZoom * = 00060H; (* Window zoom gadget *)
- sUnused * = 00070H; (* Unused screen gadget *)
- close * = 00080H; (* Window close gadget *)
-
- (* These definitions describe system gadgets prior to V36: *)
- wUpFront * = wDepth; (* Window to-front gadget *)
- sUpFront * = sDepth; (* Screen to-front gadget *)
- wDownBack * = wZoom; (* Window to-back gadget *)
- sDownBack * = sUnused; (* Screen to-back gadget *)
-
- (* gtypGTypeMask is a mask you can apply to tell what class
- * of gadget this is. The possible classes follow.
- *)
- gTypeMask * = 00007H;
-
- boolGadget * = 00001H;
- gadget0002 * = 00002H;
- propGadget * = 00003H;
- strGadget * = 00004H;
- customGadget * = 00005H;
-
- (* This bit in GadgetType is reserved for undocumented internal use
- * by the Gadget Toolkit, and cannot be used nor relied on by
- * applications: 0x0100
- *)
-
- (* New for V39. Gadgets which have the gflgExtended flag set are
- * actually ExtGadgets, which have more flags. The gmoreXxx
- * identifiers describe those flags. For gmoreScrollRaster, see
- * important information in the ScrollWindowRaster() autodoc.
- * NB: gmoreScrollRaster must be set before the gadget is
- * added to a window.
- *)
- gmoreBounds * = 0; (* ExtGadget has valid Bounds *)
- gmoreGadgetHelp * = 1; (* This gadget responds to gadget help *)
- gmoreScrollRaster * = 2; (* This (custom) gadget uses ScrollRaster *)
-
- (* ======================================================================== *)
- (* === BoolInfo======================================================= *)
- (* ======================================================================== *)
- (* This is the special data needed by an Extended Boolean Gadget
- * Typically this structure will be pointed to by the Gadget field SpecialInfo
- *)
-
- TYPE
-
- BoolInfo * = RECORD (GadSpecialInfo)
- flags * : s.SET16; (* defined below *)
- mask * : e.APTR; (* bit mask for highlighting and selecting
- * mask must follow the same rules as an Image
- * plane. Its width and height are determined
- * by the width and height of the gadget's
- * select box. (i.e. Gadget.Width and .Height).
- *)
- reserved * : e.ULONG; (* set to 0 *)
- END; (* BoolInfo *)
-
- CONST
-
- (* set BoolInfo.Flags to this flag bit.
- * in the future, additional bits might mean more stuff hanging
- * off of BoolInfo.Reserved.
- *)
- boolMask * = 0; (* extension is for masked gadget *)
-
- (* ======================================================================== *)
- (* === PropInfo =========================================================== *)
- (* ======================================================================== *)
- (* this is the special data required by the proportional Gadget
- * typically, this data will be pointed to by the Gadget variable SpecialInfo
- *)
-
- TYPE
-
- PropInfo * = RECORD (GadSpecialInfo)
- flags * : s.SET16; (* general purpose flag bits (see defines below) *)
-
- (* You initialize the Pot variables before the Gadget is added to
- * the system. Then you can look here for the current settings
- * any time, even while User is playing with this Gadget. To
- * adjust these after the Gadget is added to the System, use
- * ModifyProp(); The Pots are the actual proportional settings,
- * where a value of zero means zero and a value of MAXPOT means
- * that the Gadget is set to its maximum setting.
- *)
- horizPot * : e.UWORD; (* 16-bit FixedPoint horizontal quantity percentage *)
- vertPot * : e.UWORD; (* 16-bit FixedPoint vertical quantity percentage *)
-
- (* the 16-bit FixedPoint Body variables describe what percentage of
- * the entire body of stuff referred to by this Gadget is actually
- * shown at one time. This is used with the AUTOKNOB routines,
- * to adjust the size of the AUTOKNOB according to how much of
- * the data can be seen. This is also used to decide how far
- * to advance the Pots when User hits the Container of the Gadget.
- * For instance, if you were controlling the display of a 5-line
- * Window of text with this Gadget, and there was a total of 15
- * lines that could be displayed, you would set the VertBody value to
- * (MAXBODY / (TotalLines / DisplayLines)) * = MAXBODY / 3.
- * Therefore, the AUTOKNOB would fill 1/3 of the container, and
- * if User hits the Cotainer outside of the knob, the pot would
- * advance 1/3 (plus or minus) If there's no body to show, or
- * the total amount of displayable info is less than the display area,
- * set the Body variables to the MAX. To adjust these after the
- * Gadget is added to the System, use ModifyProp();
- *)
- horizBody * : e.UWORD; (* horizontal Body *)
- vertBody * : e.UWORD; (* vertical Body *)
-
- (* these are the variables that Intuition sets and maintains *)
- cWidth * : e.UWORD; (* Container width (with any relativity absoluted) *)
- cHeight * : e.UWORD; (* Container height (with any relativity absoluted) *)
- hPotRes *, vPotRes * : e.UWORD; (* pot increments *)
- leftBorder * : e.UWORD; (* Container borders *)
- topBorder * : e.UWORD; (* Container borders *)
- END; (* PropInfo *)
-
-
- CONST
-
- (* --- FLAG BITS ---------------------------------------------------------- *)
- autoKnob * = 0; (* this flag sez: gimme that old auto-knob *)
- (* NOTE: if you do not use an AUTOKNOB for a proportional gadget,
- * you are currently limited to using a single Image of your own
- * design: Intuition won't handle a linked list of images as
- * a proportional gadget knob.
- *)
-
- freeHoriz * = 1; (* if set, the knob can move horizontally *)
- freeVert * = 2; (* if set, the knob can move vertically *)
- propBorderless * = 3; (* if set, no border will be rendered *)
- knobHit * = 8; (* set when this Knob is hit *)
- propNewlook * = 4; (* set this if you want to get the new
- * V36 look
- *)
-
- knobHmin * = 6; (* minimum horizontal size of the Knob *)
- knobVmin * = 4; (* minimum vertical size of the Knob *)
- maxBody * = 0FFFFH; (* maximum body value *)
- maxPot * = 0FFFFH; (* maximum pot value *)
-
- (* ======================================================================== *)
- (* === StringInfo ========================================================= *)
- (* ======================================================================== *)
- (* this is the special data required by the string Gadget
- * typically, this data will be pointed to by the Gadget variable SpecialInfo
- *)
-
- TYPE
-
- StringInfo * = RECORD (GadSpecialInfo)
- (* you initialize these variables, and then Intuition maintains them *)
- buffer * : e.LSTRPTR; (* the buffer containing the start and final string *)
- undoBuffer * : e.LSTRPTR; (* optional buffer for undoing current entry *)
- bufferPos * : INTEGER; (* character position in Buffer *)
- maxChars * : INTEGER; (* max number of chars in Buffer (including NULL) *)
- dispPos * : INTEGER; (* Buffer position of first displayed character *)
-
- (* Intuition initializes and maintains these variables for you *)
- undoPos * : INTEGER; (* character position in the undo buffer *)
- numChars * : INTEGER; (* number of characters currently in Buffer *)
- dispCount * : INTEGER; (* number of whole characters visible in Container *)
- cLeft *, cTop * : INTEGER; (* topleft offset of the container *)
-
- (* This unused field is changed to allow extended specification
- * of string gadget parameters. It is ignored unless the flag
- * gactSTRINGEXTEND is set in the Gadget's Activation field
- * or the gflgSTRINGEXTEND flag is set in the Gadget Flags field.
- * (See gflgSTRINGEXTEND for an important note)
- *)
- (* struct Layer *LayerPtr; --- obsolete --- *)
- extension * : StringExtendPtr;
-
- (* you can initialize this variable before the gadget is submitted to
- * Intuition, and then examine it later to discover what integer
- * the user has entered (if the user never plays with the gadget,
- * the value will be unchanged from your initial setting)
- *)
- longInt * : LONGINT;
-
- (* If you want this Gadget to use your own Console keymapping, you
- * set the gactALTKEYMAP bit in the Activation flags of the Gadget,
- * and then set this variable to point to your keymap. If you don't
- * set the gactALTKEYMAP, you'll get the standard ASCII keymapping.
- *)
- altKeyMap * : km.KeyMapPtr;
- END; (* StringInfo *)
-
- (* ======================================================================== *)
- (* === IntuiText ========================================================== *)
- (* ======================================================================== *)
- (* IntuiText is a series of strings that start with a location
- * (always relative to the upper-left corner of something) and then the
- * text of the string. The text is null-terminated.
- *)
-
- TYPE
-
- IntuiText * = RECORD
- frontPen *, backPen * : SHORTINT; (* the pen numbers for the rendering *)
- drawMode * : s.SET8; (* the mode for rendering the text *)
- leftEdge * : INTEGER; (* relative start location for the text *)
- topEdge * : INTEGER; (* relative start location for the text *)
- iTextFont * : gfx.TextAttrPtr; (* if NULL, you accept the default *)
- iText * : e.LSTRPTR; (* pointer to null-terminated text *)
- nextText * : IntuiTextPtr; (* pointer to another IntuiText to render *)
- END; (* IntuiText *)
-
- (* ======================================================================== *)
- (* === Border ============================================================= *)
- (* ======================================================================== *)
- (* Data type Border, used for drawing a series of lines which is intended for
- * use as a border drawing, but which may, in fact, be used to render any
- * arbitrary vector shape.
- * The routine DrawBorder sets up the RastPort with the appropriate
- * variables, then does a Move to the first coordinate, then does Draws
- * to the subsequent coordinates.
- * After all the Draws are done, if NextBorder is non-zero we call DrawBorder
- * on NextBorder
- *)
-
- TYPE
-
- Border * = RECORD
- leftEdge *, topEdge * : INTEGER; (* initial offsets from the origin *)
- frontPen *, backPen * : SHORTINT; (* pens numbers for rendering *)
- drawMode * : s.SET8; (* mode for rendering *)
- count * : SHORTINT; (* number of XY pairs *)
- xy * : e.APTR; (* vector coordinate pairs rel to LeftTop *)
- nextBorder * : BorderPtr; (* pointer to any other Border too *)
- END; (* Border *)
-
- (* ======================================================================== *)
- (* === Image ============================================================== *)
- (* ======================================================================== *)
- (* This is a brief image structure for very simple transfers of
- * image data to a RastPort
- *)
-
- TYPE
-
- Image * = RECORD
- leftEdge * : INTEGER; (* starting offset relative to some origin *)
- topEdge * : INTEGER; (* starting offsets relative to some origin *)
- width * : INTEGER; (* pixel size (though data is word-aligned) *)
- height * : INTEGER;
- depth * : INTEGER; (* >= 0, for images you create *)
- imageData * : e.APTR; (* pointer to the actual word-aligned bits *)
-
- (* the PlanePick and PlaneOnOff variables work much the same way as the
- * equivalent GELS Bob variables. It's a space-saving
- * mechanism for image data. Rather than defining the image data
- * for every plane of the RastPort, you need define data only
- * for the planes that are not entirely zero or one. As you
- * define your Imagery, you will often find that most of the planes
- * ARE just as color selectors. For instance, if you're designing
- * a two-color Gadget to use colors one and three, and the Gadget
- * will reside in a five-plane display, bit plane zero of your
- * imagery would be all ones, bit plane one would have data that
- * describes the imagery, and bit planes two through four would be
- * all zeroes. Using these flags avoids wasting all
- * that memory in this way: first, you specify which planes you
- * want your data to appear in using the PlanePick variable. For
- * each bit set in the variable, the next "plane" of your image
- * data is blitted to the display. For each bit clear in this
- * variable, the corresponding bit in PlaneOnOff is examined.
- * If that bit is clear, a "plane" of zeroes will be used.
- * If the bit is set, ones will go out instead. So, for our example:
- * Gadget.PlanePick * = 02H;
- * Gadget.PlaneOnOff * = 01H;
- * Note that this also allows for generic Gadgets, like the
- * System Gadgets, which will work in any number of bit planes.
- * Note also that if you want an Image that is only a filled
- * rectangle, you can get this by setting PlanePick to zero
- * (pick no planes of data) and set PlaneOnOff to describe the pen
- * color of the rectangle.
- *
- * NOTE: Intuition relies on PlanePick to know how many planes
- * of data are found in ImageData. There should be no more
- * '1'-bits in PlanePick than there are planes in ImageData.
- *)
- planePick *, planeOnOff * : s.SET8;
-
- (* if the NextImage variable is not NULL, Intuition presumes that
- * it points to another Image structure with another Image to be
- * rendered
- *)
- nextImage * : ImagePtr;
- END; (* Image *)
-
- (* ======================================================================== *)
- (* === IntuiMessage ======================================================= *)
- (* ======================================================================== *)
-
- TYPE
-
- IntuiMessageBase *= RECORD (e.MessageBase) END;
- IntuiMessageBasePtr *= POINTER TO IntuiMessageBase;
-
- IntuiMessage * = RECORD (IntuiMessageBase)
- execMessage * : e.Message;
- (* the Class bits correspond directly with the IDCMP Flags, except for the
- * special bit idcmpLONELYMESSAGE (defined below)
- *)
- class * : s.SET32;
-
- (* the Code field is for special values like MENU number *)
- code * : e.UWORD;
-
- (* the Qualifier field is a copy of the current InputEvent's Qualifier *)
- qualifier * : s.SET16;
-
- (* IAddress contains particular addresses for Intuition functions, like
- * the pointer to the Gadget or the Screen
- *)
- iAddress * : e.APTR;
-
- (* when getting mouse movement reports, any event you get will have the
- * the mouse coordinates in these variables. the coordinates are relative
- * to the upper-left corner of your Window (WflgGIMMEZEROZERO
- * notwithstanding). If idcmpDELTAMOVE is set, these values will
- * be deltas from the last reported position.
- *)
- mouseX *, mouseY * : INTEGER;
-
- (* the time values are copies of the current system clock time. Micros
- * are in units of microseconds, Seconds in seconds.
- *)
- time * : t.TimeVal;
-
- (* the IDCMPWindow variable will always have the address of the Window of
- * this IDCMP
- *)
- idcmpWindow * : WindowPtr;
-
- (* system-use variable *)
- specialLink * : IntuiMessagePtr;
- END; (* IntuiMessage *)
-
- (* New for V39:
- * All IntuiMessages are now slightly extended. The ExtIntuiMessage
- * structure has an additional field for tablet data, which is usually
- * NULL. If a tablet driver which is sending ie.subClassNewTablet
- * events is installed in the system, windows with the WA_TabletMessages
- * property set will find that tabletData points to the TabletData
- * structure. Applications must first check that this field is non-NULL;
- * it will be NULL for certain kinds of message, including mouse activity
- * generated from other than the tablet (i.e. the keyboard equivalents
- * or the mouse itself).
- *
- * NEVER EVER examine any extended fields when running under pre-V39!
- *
- * NOTE: This structure is subject to grow in the future. Making
- * assumptions about its size is A BAD IDEA.
- *)
-
- ExtIntuiMessage * = RECORD (IntuiMessageBase)
- intuiMessage * : IntuiMessage;
- tabletData * : TabletDataPtr;
- END;
-
-
- CONST
-
- (* --- IDCMP Classes ------------------------------------------------------ *)
- (* Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
- * Manual for full details on the IDCMP classes.
- *)
- sizeVerify * = 0;
- newSize * = 1;
- refreshWindow * = 2;
- mouseButtons * = 3;
- mouseMove * = 4;
- gadgetDown * = 5;
- gadgetUp * = 6;
- reqSet * = 7;
- menuPick * = 8;
- closeWindow * = 9;
- rawKey * = 10;
- reqVerify * = 11;
- reqClear * = 12;
- menuVerify * = 13;
- newPrefs * = 14;
- diskInserted * = 15;
- diskRemoved * = 16;
- wBenchMessage * = 17; (* System use only *)
- activeWindow * = 18;
- inactiveWindow * = 19;
- deltaMove * = 20;
- vanillaKey * = 21;
- intuiTicks * = 22;
- (* for notifications from "boopsi" gadgets *)
- idcmpUpdate * = 23; (* new for V36 *)
- (* for getting help key report during menu session *)
- menuHelp * = 24; (* new for V36 *)
- (* for notification of any move/size/zoom/change window *)
- changeWindow * = 25; (* new for V36 *)
- gadgetHelp * = 26; (* new for V39 *)
-
- (* NOTEZ-BIEN: 31 is reserved for internal use *)
-
- (* the IDCMP Flags do not use this special bit, which is cleared when
- * Intuition sends its special message to the Task, and set when Intuition
- * gets its Message back from the Task. Therefore, I can check here to
- * find out fast whether or not this Message is available for me to send
- *)
- lonelyMessage * = 31;
-
-
- (* --- IDCMP Codes -------------------------------------------------------- *)
- (* This group of codes is for the idcmpChangeWindow message *)
- cwcodeMoveSize * = 00000H; (* Window was moved and/or sized *)
- cwcodeDepth * = 00001H; (* Window was depth-arranged (new for V39) *)
-
- (* This group of codes is for the idcmpMenuVerify function *)
- menuHot * = 0001H; (* IntuiWants verification or MenuCancel *)
- menuCancel * = 0002H; (* Hot Reply of this cancels Menu operation *)
- menuWaiting * = 0003H; (* Intuition simply wants a ReplyMsg() ASAP *)
-
- (* These are internal tokens to represent state of verification attempts
- * shown here as a clue.
- *)
- okOk * = menuHot; (* guy didn't care *)
- okAbort * = 0004H; (* window rendered question moot *)
- okCancel * = menuCancel; (* window sent cancel reply *)
-
- (* This group of codes is for the idcmpWBenchMessage messages *)
- wbenchOpen * = 0001H;
- wbenchClose * = 0002H;
-
- TYPE
-
- (* A data structure common in V36 Intuition processing *)
-
- IBox * = RECORD
- left * : INTEGER;
- top * : INTEGER;
- width * : INTEGER;
- height * : INTEGER;
- END; (* IBox *)
-
- (* ======================================================================== *)
- (* === Window ============================================================= *)
- (* ======================================================================== *)
-
- TYPE
-
- Window * = RECORD
- nextWindow * : WindowPtr; (* for the linked list in a screen *)
-
- leftEdge *, topEdge * : INTEGER; (* screen dimensions of window *)
- width *, height * : INTEGER; (* screen dimensions of window *)
-
- mouseY *, mouseX * : INTEGER; (* relative to upper-left of window *)
-
- minWidth *, minHeight * : INTEGER; (* minimum sizes *)
- maxWidth *, maxHeight * : e.UWORD; (* maximum sizes *)
-
- flags * : s.SET32; (* see below for defines *)
-
- menuStrip * : MenuPtr; (* the strip of Menu headers *)
-
- title * : e.LSTRPTR; (* the title text for this window *)
-
- firstRequest * : RequesterPtr; (* all active Requesters *)
-
- dmRequest * : RequesterPtr; (* double-click Requester *)
-
- reqCount * : INTEGER; (* count of reqs blocking Window *)
-
- wScreen * : ScreenPtr; (* this Window's Screen *)
- rPort * : gfx.RastPortPtr; (* this Window's very own gfx.RastPort *)
-
- (* the border variables describe the window border. If you specify
- * wflgGIMMEZEROZERO when you open the window, then the upper-left of
- * the ClipRect for this window will be upper-left of the gfx.BitMap (with
- * correct offsets when in SuperBitMap mode; you MUST select
- * wflgGIMMEZEROZERO when using SuperBitMap). If you don't specify
- * ZeroZero, then you save memory (no allocation of RastPort, Layer,
- * ClipRect and associated Bitmaps), but you also must offset all your
- * writes by BorderTop, BorderLeft and do your own mini-clipping to
- * prevent writing over the system gadgets
- *)
- borderLeft *, borderTop *, borderRight *, borderBottom * : SHORTINT;
- borderRPort * : gfx.RastPortPtr;
-
-
- (* You supply a linked-list of Gadgets for your Window.
- * This list DOES NOT include system gadgets. You get the standard
- * window system gadgets by setting flag-bits in the variable Flags (see
- * the bit definitions below)
- *)
- firstGadget * : GadgetPtr;
-
- (* these are for opening/closing the windows *)
- parent *, descendant * : WindowPtr;
-
- (* sprite data information for your own Pointer
- * set these AFTER you Open the Window by calling SetPointer()
- *)
- pointer * : e.APTR; (* sprite data *)
- ptrHeight * : SHORTINT; (* sprite height (not including sprite padding) *)
- ptrWidth * : SHORTINT; (* sprite width (must be less than or equal to 16) *)
- xOffset *, yOffset * : SHORTINT; (* sprite offsets *)
-
- (* the IDCMP Flags and User's and Intuition's Message Ports *)
- idcmpFlags * : s.SET32; (* User-selected flags *)
- userPort *, windowPort * : e.MsgPortPtr;
- messageKey * : IntuiMessagePtr;
-
- detailPen *, blockPen * : SHORTINT;(* for bar/border/gadget rendering *)
-
- (* the CheckMark is a pointer to the imagery that will be used when
- * rendering MenuItems of this Window that want to be checkmarked
- * if this is equal to NULL, you'll get the default imagery
- *)
- checkMark * : ImagePtr;
-
- screenTitle * : e.LSTRPTR; (* if non-null, Screen title when Window is active *)
-
- (* These variables have the mouse coordinates relative to the
- * inner-Window of wflgGIMMEZEROZERO Windows. This is compared with the
- * MouseX and MouseY variables, which contain the mouse coordinates
- * relative to the upper-left corner of the Window, wflgGIMMEZEROZERO
- * notwithstanding
- *)
- gzzMouseX * : INTEGER;
- gzzMouseY * : INTEGER;
- (* these variables contain the width and height of the inner-Window of
- * wflgGIMMEZEROZERO Windows
- *)
- gzzWidth * : INTEGER;
- gzzHeight * : INTEGER;
-
- extData * : e.APTR;
-
- userData * : e.APTR; (* general-purpose pointer to User data extension *)
-
- (** 11/18/85: this pointer keeps a duplicate of what
- * Window.RPort->Layer is supposed to be pointing at
- *)
- wLayer * : gfx.LayerPtr;
-
- (* NEW 1.2: need to keep track of the font that
- * OpenWindow opened, in case user SetFont's into RastPort
- *)
- iFont * : gfx.TextFontPtr;
-
- (* (V36) another flag word (the Flags field is used up).
- * At present, all flag values are system private.
- * Until further notice, you may not change nor use this field.
- *)
- moreFlags : s.SET32;
-
- (**** Data beyond this point are Intuition Private. DO NOT USE ****)
- END; (* Window *)
-
-
- CONST
-
- (* --- Flags requested at OpenWindow() time by the application --------- *)
- windowSizing * = 0; (* include sizing system-gadget? *)
- windowDrag * = 1; (* include dragging system-gadget? *)
- windowDepth * = 2; (* include depth arrangement gadget? *)
- windowClose * = 3; (* include close-box system-gadget? *)
-
- sizeBRight * = 4; (* size gadget uses right border *)
- sizeBBottom * = 5; (* size gadget uses bottom border *)
-
- (* --- refresh modes ------------------------------------------------------ *)
- (* combinations of the refreshBits select the refresh type *)
- refreshBits * = {6,7};
- smartRefresh * = {};
- simpleRefresh * = 6;
- superBitmap * = 7;
- otherRefresh * = {6,7};
-
- backDrop * = 8; (* this is a backdrop window *)
-
- reportMouse * = 9; (* to hear about every mouse move *)
-
- gimmeZeroZero * = 10; (* a GimmeZeroZero window *)
-
- borderless * = 11; (* to get a Window sans border *)
-
- activate * = 12; (* when Window opens, it's Active *)
-
-
- (* --- Other User Flags --------------------------------------------------- *)
- rmbTrap * = 16; (* Catch RMB events for your own *)
- noCareRefresh * = 17; (* not to be bothered with REFRESH *)
-
- (* - V36 new Flags which the programmer may specify in NewWindow.Flags *)
- nwExtended * = 18; (* extension data provided *)
- (* see struct ExtNewWindow *)
-
- (* - V39 new Flags which the programmer may specify in NewWindow.Flags *)
- newLookMenus * = 21; (* window has NewLook menus *)
-
-
- (* These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF! *)
- windowActive * = 13; (* this window is the active one *)
- inRequest * = 14; (* this window is in request mode *)
- menuState * = 15; (* Window is active with Menus on *)
- windowRefresh * = 24; (* Window is currently refreshing *)
- wbenchWindow * = 25; (* WorkBench tool ONLY Window *)
- windowTicked * = 26; (* only one timer tick at a time *)
-
- (* V36 and higher flags to be set only by Intuition: *)
- visitor * = 27; (* visitor window *)
- zoomed * = 28; (* identifies "zoom state" *)
- hasZoom * = 29; (* windowhas a zoom gadget *)
-
-
- (* --- Other Window Values ---------------------------------------------- *)
- defaultMouseQueue * = 5; (* no more mouse messages *)
-
- (* --- see struct IntuiMessage for the IDCMP Flag definitions ------------- *)
-
- (* ======================================================================== *)
- (* === NewWindow ========================================================== *)
- (* ======================================================================== *)
- (*
- * Note that the new extension fields have been removed. Use ExtNewWindow
- * structure below to make use of these fields
- *)
-
- TYPE
-
- NewWindowBase *= RECORD END;
- NewWindowBasePtr *= POINTER TO NewWindowBase;
-
- NewWindow * = RECORD (NewWindowBase)
- leftEdge *, topEdge * : INTEGER; (* screen dimensions of window *)
- width *, height * : INTEGER; (* screen dimensions of window *)
-
- detailPen *, blockPen * : SHORTINT;(* for bar/border/gadget rendering *)
-
- idcmpFlags * : s.SET32; (* User-selected IDCMP flags *)
-
- flags * : s.SET32; (* see Window struct for defines *)
-
- (* You supply a linked-list of Gadgets for your Window.
- * This list DOES NOT include system Gadgets. You get the standard
- * system Window Gadgets by setting flag-bits in the variable Flags (see
- * the bit definitions under the Window structure definition)
- *)
- firstGadget * : GadgetPtr;
-
- (* the CheckMark is a pointer to the imagery that will be used when
- * rendering MenuItems of this Window that want to be checkmarked
- * if this is equal to NULL, you'll get the default imagery
- *)
- checkMark * : ImagePtr;
-
- title * : e.LSTRPTR; (* the title text for this window *)
-
- (* the Screen pointer is used only if you've defined a CUSTOMSCREEN and
- * want this Window to open in it. If so, you pass the address of the
- * Custom Screen structure in this variable. Otherwise, this variable
- * is ignored and doesn't have to be initialized.
- *)
- screen * : ScreenPtr;
-
- (* wflgSuperBITMAP Window? If so, put the address of your gfx.BitMap
- * structure in this variable. If not, this variable is ignored and
- * doesn't have to be initialized
- *)
- bitMap * : gfx.BitMapPtr;
-
- (* the values describe the minimum and maximum sizes of your Windows.
- * these matter only if you've chosen the wflgSIZEGADGET option,
- * which means that you want to let the User to change the size of
- * this Window. You describe the minimum and maximum sizes that the
- * Window can grow by setting these variables. You can initialize
- * any one these to zero, which will mean that you want to duplicate
- * the setting for that dimension (if MinWidth == 0, MinWidth will be
- * set to the opening Width of the Window).
- * You can change these settings later using SetWindowLimits().
- * If you haven't asked for a SIZING Gadget, you don't have to
- * initialize any of these variables.
- *)
- minWidth *, minHeight * : INTEGER; (* minimums *)
- maxWidth *, maxHeight * : e.UWORD; (* maximums *)
-
- (* the type variable describes the Screen in which you want this Window to
- * open. The type value can either be CUSTOMSCREEN or one of the
- * system standard Screen Types such as WBENCHSCREEN. See the
- * type definitions under the Screen structure.
- *)
- type * : s.SET16;
-
- END; (* NewWindow *)
-
- (* The following structure is the future NewWindow. Compatibility
- * issues require that the size of NewWindow not change.
- * Data in the common part (NewWindow) indicates the the extension
- * fields ara being used.
- * NOTE WELL: This structure may be subject to future extension.
- * Writing code depending on its size is not allowed.
- *)
-
- ExtNewWindow * = RECORD (NewWindowBase)
- nw * : NewWindow;
-
- (* ------------------------------------------------------- *
- * extensions for V36
- * if the NewWindow Flag value wflgNwEXTENDED is set, then
- * this field is assumed to point to an array ( or chain of arrays)
- * of TagItem structures. See also ExtNewScreen for another
- * use of TagItems to pass optional data.
- *
- * see below for tag values and the corresponding data.
- *)
- extension * : u.TagListPtr;
- END; (* ExtNewWindow *)
-
- CONST
-
- (*
- * The TagItem ID's (tiTag values) for OpenWindowTagList() follow.
- * They are values in a TagItem array passed as extension/replacement
- * values for the data in NewWindow. OpenWindowTagList() can actually
- * work well with a NULL NewWindow pointer.
- *)
-
- waDummy * = u.user + 99; (* 80000063H *)
-
- (* these tags simply override NewWindow parameters *)
- waLeft * = waDummy + 01H;
- waTop * = waDummy + 02H;
- waWidth * = waDummy + 03H;
- waHeight * = waDummy + 04H;
- waDetailPen * = waDummy + 05H;
- waBlockPen * = waDummy + 06H;
- waIDCMP * = waDummy + 07H;
- (* "bulk" initialization of NewWindow.Flags *)
- waFlags * = waDummy + 08H;
- waGadgets * = waDummy + 09H;
- waCheckmark * = waDummy + 0AH;
- waTitle * = waDummy + 0BH;
- (* means you don't have to call SetWindowTitles
- * after you open your window
- *)
- waScreenTitle * = waDummy + 0CH;
- waCustomScreen * = waDummy + 0DH;
- waSuperBitMap * = waDummy + 0EH;
- (* also implies wflgSuperBITMAP property *)
- waMinWidth * = waDummy + 0FH;
- waMinHeight * = waDummy + 10H;
- waMaxWidth * = waDummy + 11H;
- waMaxHeight * = waDummy + 12H;
-
- (* The following are specifications for new features *)
-
- waInnerWidth * = waDummy + 13H;
- waInnerHeight * = waDummy + 14H;
- (* You can specify the dimensions of the interior
- * region of your window, independent of what
- * the border widths will be. You probably want
- * to also specify waAutoAdjust to allow
- * Intuition to move your window or even
- * shrink it so that it is completely on screen.
- *)
-
- waPubScreenName * = waDummy + 15H;
- (* declares that you want the window to open as
- * a visitor on the public screen whose name is
- * pointed to by (e.UBYTE * ) tiData
- *)
- waPubScreen * = waDummy + 16H;
- (* open as a visitor window on the public screen
- * whose address is in (struct Screen * ) tiData.
- * To ensure that this screen remains open, you
- * should either be the screen's owner, have a
- * window open on the screen, or use LockPubScreen().
- *)
- waPubScreenFallBack * = waDummy + 17H;
- (* A Boolean, specifies whether a visitor window
- * should "fall back" to the default public screen
- * (or Workbench) if the named public screen isn't
- * available
- *)
- waWindowName * = waDummy + 18H;
- (* not implemented *)
- waColors * = waDummy + 19H;
- (* a ColorSpec array for colors to be set
- * when this window is active. This is not
- * implemented, and may not be, since the default
- * values to restore would be hard to track.
- * We'd like to at least support per-window colors
- * for the mouse pointer sprite.
- *)
- waZoom * = waDummy + 1AH;
- (* tiData points to an array of four INTEGER's,
- * the initial Left/Top/Width/Height values of
- * the "alternate" zoom position/dimensions.
- * It also specifies that you want a Zoom gadget
- * for your window, whether or not you have a
- * sizing gadget.
- *)
- waMouseQueue * = waDummy + 1BH;
- (* tiData contains initial value for the mouse
- * message backlog limit for this window.
- *)
- waBackFill * = waDummy + 1CH;
- (* unimplemented at present: provides a "backfill
- * hook" for your window's layer.
- *)
- waRptQueue * = waDummy + 1DH;
- (* initial value of repeat key backlog limit *)
-
- (* These Boolean tag items are alternatives to the NewWindow.Flags
- * boolean flags with similar names.
- *)
- waSizeGadget * = waDummy + 1EH;
- waDragBar * = waDummy + 1FH;
- waDepthGadget * = waDummy + 20H;
- waCloseGadget * = waDummy + 21H;
- waBackdrop * = waDummy + 22H;
- waReportMouse * = waDummy + 23H;
- waNoCareRefresh * = waDummy + 24H;
- waBorderless * = waDummy + 25H;
- waActivate * = waDummy + 26H;
- waRMBTrap * = waDummy + 27H;
- waWBenchWindow * = waDummy + 28H; (* PRIVATE!! *)
- waSimpleRefresh * = waDummy + 29H;
- (* only specify if TRUE *)
- waSmartRefresh * = waDummy + 2AH;
- (* only specify if TRUE *)
- waSizeBRight * = waDummy + 2BH;
- waSizeBBottom * = waDummy + 2CH;
-
- (* New Boolean properties *)
- waAutoAdjust * = waDummy + 2DH;
- (* shift or squeeze the window's position and
- * dimensions to fit it on screen.
- *)
-
- waGimmeZeroZero * = waDummy + 2EH;
- (* equiv. to NewWindow.Flags wflgGIMMEZEROZERO *)
-
- (* New for V37: waMenuHelp (ignored by V36) *)
- waMenuHelp * = waDummy + 2FH;
- (* Enables idcmpMENUHELP: Pressing HELP during menus
- * will return idcmpMENUHELP message.
- *)
-
- (* New for V39: (ignored by V37 and earlier) *)
- waNewLookMenus * = waDummy + 30H;
- (* Set to TRUE if you want NewLook menus *)
- waAmigaKey * = waDummy + 31H;
- (* Pointer to image for Amiga-key equiv in menus *)
- waNotifyDepth * = waDummy + 32H;
- (* Requests idcmpChangeWindow message when
- * window is depth arranged
- * (imsg->Code = cwCodeDepth)
- *)
-
- (* waDummy + 33H is obsolete *)
-
- waPointer * = waDummy + 34H;
- (* Allows you to specify a custom pointer
- * for your window. ti_Data points to a
- * pointer object you obtained via
- * "pointerclass". NULL signifies the
- * default pointer.
- * This tag may be passed to OpenWindowTags()
- * or SetWindowPointer().
- *)
-
- waBusyPointer * = waDummy + 35H;
- (* ti_Data is boolean. Set to TRUE to
- * request the standard busy pointer.
- * This tag may be passed to OpenWindowTags()
- * or SetWindowPointer().
- *)
-
- waPointerDelay * = waDummy + 36H;
- (* ti_Data is boolean. Set to TRUE to
- * request that the changing of the
- * pointer be slightly delayed. The change
- * will be called off if you call NewSetPointer()
- * before the delay expires. This allows
- * you to post a busy-pointer even if you think
- * the busy-time may be very short, without
- * fear of a flashing pointer.
- * This tag may be passed to OpenWindowTags()
- * or SetWindowPointer().
- *)
-
- waTabletMessages * = waDummy + 37H;
- (* ti_Data is a boolean. Set to TRUE to
- * request that tablet information be included
- * in IntuiMessages sent to your window.
- * Requires that something (i.e. a tablet driver)
- * feed ie.subClassNewTablet InputEvents into
- * the system. For a pointer to the TabletData,
- * examine the ExtIntuiMessage.tabletData
- * field. It is UNSAFE to check this field
- * when running on pre-V39 systems. It's always
- * safe to check this field under V39 and up,
- * though it may be NULL.
- *)
-
- waHelpGroup * = waDummy + 38H;
- (* When the active window has gadget help enabled,
- * other windows of the same HelpGroup number
- * will also get GadgetHelp. This allows GadgetHelp
- * to work for multi-windowed applications.
- * Use GetGroupID() to get an ID number. Pass
- * this number as ti_Data to all your windows.
- * See also the HelpControl() function.
- *)
-
- waHelpGroupWindow * = waDummy + 39H;
- (* When the active window has gadget help enabled,
- * other windows of the same HelpGroup will also get
- * GadgetHelp. This allows GadgetHelp to work
- * for multi-windowed applications. As an alternative
- * to WA_HelpGroup, you can pass a pointer to any
- * other window of the same group to join its help
- * group. Defaults to NULL, which has no effect.
- * See also the HelpControl() function.
- *)
-
-
- (* HelpControl() flags:
- *
- * hcGadgetHelp - Set this flag to enable Gadget-Help for one or more
- * windows.
- *)
-
- hcGadgetHelp * = 1;
-
- (*
- ** $VER: screens.h 38.25 (15.2.93)
- **
- ** The Screen and NewScreen structures and attributes
- *)
-
-
- (* ======================================================================== *)
- (* === DrawInfo ========================================================= *)
- (* ======================================================================== *)
-
- (* This is a packet of information for graphics rendering. It originates
- * with a Screen, and is gotten using GetScreenDrawInfo( screen );
- *)
-
- CONST
-
- (* You can use the Intuition version number to tell which fields are
- * present in this structure.
- *
- * driVersion of 1 corresponds to V37 release.
- * driVersion of 2 corresponds to V39, and includes three new pens
- * and the checkMark and amigaKey fields.
- *
- * Note that sometimes applications need to create their own DrawInfo
- * structures, in which case the driVersion won't correspond exactly
- * to the OS version!!!
- *)
- driVersion * = 2;
-
- TYPE
-
- DrawInfo * = RECORD
- version * : e.UWORD; (* will be driVersion *)
- numPens * : e.UWORD; (* guaranteed to be >= numDrIPens *)
- pens * : DRIPenArrayPtr; (* pointer to pen array *)
-
- font * : gfx.TextFontPtr; (* screen default font *)
- depth * : e.UWORD; (* (initial) depth of screen bitmap *)
-
- resolution * : gfx.Point; (* from DisplayInfo database for initial display mode *)
-
- flags * : s.SET32; (* defined below *)
- (* New for V39: checkMark, amigaKey. *)
- checkMark * : ImagePtr; (* pointer to scaled checkmark image
- * Will be NULL if DRI_VERSION < 2
- *)
- amigaKey * : ImagePtr; (* pointer to scaled Amiga-key image
- * Will be NULL if DRI_VERSION < 2
- *)
- reserved * : ARRAY 5 OF e.ULONG; (* avoid recompilation ;^) *)
- END; (* DrawInfo *)
-
- CONST
-
- drifNewLook * = 0; (* specified saPens, full treatment *)
-
- (* rendering pen number indexes into DrawInfo.driPens[] *)
- detailPen * = 0; (* compatible Intuition rendering pens *)
- blockPen * = 1; (* compatible Intuition rendering pens *)
- textPen * = 2; (* text on background *)
- shinePen * = 3; (* bright edge on 3D objects *)
- shadowPen * = 4; (* dark edge on 3D objects *)
- fillPen * = 5; (* active-window/selected-gadget fill *)
- fillTextPen * = 6; (* text over FILLPEN *)
- backGroundPen * = 7; (* always color 0 *)
- highLightTextPen * = 8; (* special color text, on background *)
- (* New for V39, only present if driVersion >= 2: *)
- barDetailPen * = 9; (* text/detail in screen-bar/menus *)
- barBlockPen * = 10; (* screen-bar/menus fill *)
- barTrimPen * = 11; (* trim under screen-bar *)
-
- numDRIPens * = 9;
-
-
- (* New for V39: It is sometimes useful to specify that a pen value
- * is to be the complement of color zero to three. The "magic" numbers
- * serve that purpose:
- *)
- penC3 * = 0FEFCH; (* Complement of color 3 *)
- penC2 * = 0FEFDH; (* Complement of color 2 *)
- penC1 * = 0FEFEH; (* Complement of color 1 *)
- penC0 * = 0FEFFH; (* Complement of color 0 *)
-
- TYPE
-
- DRIPenArray * = ARRAY numDRIPens OF e.UWORD;
-
- (* ======================================================================== *)
- (* === Screen ============================================================= *)
- (* ======================================================================== *)
-
- (* VERY IMPORTANT NOTE ABOUT Screen->BitMap. In the future, bitmaps
- * will need to grow. The embedded instance of a bitmap in the screen
- * will no longer be large enough to hold the whole description of
- * the bitmap.
- *
- * YOU ARE STRONGLY URGED to use Screen.rastPort.bitMap in place of
- * SYS.ADR (Screen.bitMap) whenever and whereever possible.
- *)
-
- TYPE
-
- Screen * = RECORD
- nextScreen * : ScreenPtr; (* linked list of screens *)
- firstWindow * : WindowPtr; (* linked list Screen's Windows *)
-
- leftEdge *, topEdge * : INTEGER; (* parameters of the screen *)
- width *, height * : INTEGER; (* parameters of the screen *)
-
- mouseY *, mouseX * : INTEGER; (* position relative to upper-left *)
-
- flags * : s.SET16; (* see definitions below *)
-
- title * : e.LSTRPTR; (* null-terminated Title text *)
- defaultTitle * : e.LSTRPTR; (* for Windows without ScreenTitle *)
-
- (* Bar sizes for this Screen and all Window's in this Screen *)
- (* Note that BarHeight is one less than the actual menu bar
- * height. We're going to keep this in V36 for compatibility,
- * although V36 artwork might use that extra pixel
- *
- * Also, the title bar height of a window is calculated from the
- * screen's WBorTop field, plus the font height, plus one.
- *)
- barHeight *,
- barVBorder *, barHBorder *,
- menuVBorder *, menuHBorder * : SHORTINT;
- wBorTop *, wBorLeft *, wBorRight *, wBorBottom * : SHORTINT;
-
- font * : gfx.TextAttrPtr; (* this screen's default font *)
-
- (* the display data structures for this Screen *)
- viewPort * : gfx.ViewPort; (* describing the Screen's display *)
- rastPort * : gfx.RastPort; (* describing Screen rendering *)
- bitMap * : gfx.BitMap; (* extra copy of RastPort gfx.BitMap *)
- layerInfo * : gfx.LayerInfo; (* each screen gets a LayerInfo *)
-
- (* Only system gadgets may be attached to a screen.
- * You get the standard system Screen Gadgets automatically
- *)
- firstGadget * : GadgetPtr;
-
- detailPen *, blockPen * : SHORTINT; (* for bar/border/gadget rendering *)
-
- (* the following variable(s) are maintained by Intuition to support the
- * DisplayBeep() color flashing technique
- *)
- saveColor0 * : e.UWORD;
-
- (* This layer is for the Screen and Menu bars *)
- barLayer * : gfx.LayerPtr;
-
- extData * : e.APTR;
-
- userData * : e.APTR; (* general-purpose pointer to User data extension *)
-
- (**** Data below this point are SYSTEM PRIVATE ****)
- END; (* Screen *)
-
-
- CONST
-
- (* --- FLAGS SET BY INTUITION --------------------------------------------- *)
- (* The SCREENTYPE bits are reserved for describing various Screen types
- * available under Intuition.
- *)
- screenType * = {0..3}; (* all the screens types available *)
- (* --- the definitions for the Screen Type ------------------------------- *)
- wbenchScreen * = 0; (* identifies the Workbench screen *)
- publicScreen * = 1; (* public shared (custom) screen *)
- customScreen * = {0..3}; (* original custom screens *)
-
- showTitle * = 4; (* this gets set by a call to ShowTitle() *)
-
- beeping * = 5; (* set when Screen is beeping (private) *)
-
- customBitmap * = 6; (* if you are supplying your own gfx.BitMap *)
-
- screenBehind * = 7; (* if you want your screen to open behind
- * already open screens
- *)
- screenQuiet * = 8; (* if you do not want Intuition to render
- * into your screen (gadgets, title)
- *)
- screenHires * = 9; (* do not use lowres gadgets (private) *)
-
- nsExtended * = 12; (* ExtNewScreen.Extension is valid *)
- (* V36 applications can use OpenScreenTagList() instead of nsEXTENDED *)
-
- autoScroll * = 14; (* screen is to autoscoll *)
-
- (* New for V39: *)
- penshared * = 10; (* Screen opener set {saSharePens,TRUE} *)
-
- stdScreenHeight * = -1; (* supply in NewScreen.Height *)
- stdScreenWidth * = -1; (* supply in NewScreen.Width *)
-
- (*
- * Screen attribute tag ID's. These are used in the tiTag field of
- * TagItem arrays passed to OpenScreenTagList() (or in the
- * ExtNewScreen.Extension field).
- *)
-
- (* Screen attribute tags. Please use these versions, not those in
- * iobsolete.h.
- *)
-
- saDummy * = u.user + 32;
- (*
- * these items specify items equivalent to fields in NewScreen
- *)
- saLeft * = saDummy + 0001H;
- saTop * = saDummy + 0002H;
- saWidth * = saDummy + 0003H;
- saHeight * = saDummy + 0004H;
- (* traditional screen positions and dimensions *)
- saDepth * = saDummy + 0005H;
- (* screen bitmap depth *)
- saDetailPen * = saDummy + 0006H;
- (* serves as default for windows, too *)
- saBlockPen * = saDummy + 0007H;
- saTitle * = saDummy + 0008H;
- (* default screen title *)
- saColors * = saDummy + 0009H;
- (* tiData is an array of struct ColorSpec,
- * terminated by ColorIndex * = -1. Specifies
- * initial screen palette colors.
- *)
- saErrorCode * = saDummy + 000AH;
- (* data points to LONGINT error code (values below)*)
- saFont * = saDummy + 000BH;
- (* equiv. to NewScreen.Font *)
- saSysFont * = saDummy + 000CH;
- (* Selects one of the preferences system fonts:
- * 0 - old DefaultFont, fixed-width
- * 1 - WB Screen preferred font
- *)
- saType * = saDummy + 000DH;
- (* data is publicScreen or customScreen. For other
- * fields of NewScreen.type, see individual tags,
- * eg. saBehind, saQuiet.
- *)
- saBitMap * = saDummy + 000EH;
- (* tiData is pointer to custom gfx.BitMap. This
- * implies type of customBitmap
- *)
- saPubName * = saDummy + 000FH;
- (* presence of this tag means that the screen
- * is to be a public screen. Please specify
- * BEFORE the two tags below
- *)
- saPubSig * = saDummy + 0010H;
- saPubTask * = saDummy + 0011H;
- (* Task ID and signal for being notified that
- * the last window has closed on a public screen.
- *)
- saDisplayID * = saDummy + 0012H;
- (* data is new extended display ID from
- * <graphics/displayinfo.h> (V37) or from
- * <graphics/modeid.h> (V39 and up)
- *)
- saDClip * = saDummy + 0013H;
- (* data points to a rectangle which defines
- * screen display clip region
- *)
- saOverscan * = saDummy + 0014H;
- (* Set to one of the oscan*
- * specifiers below to get a system standard
- * overscan region for your display clip,
- * screen dimensions (unless otherwise specified),
- * and automatically centered position (partial
- * support only so far).
- * If you use this, you shouldn't specify
- * saDClip. saOverscan is for "standard"
- * overscan dimensions, saDClip is for
- * your custom numeric specifications.
- *)
- saObsolete1 * = saDummy + 0015H;
- (* obsolete sMonitorName *)
-
- (** booleans **)
- saShowTitle * = saDummy + 0016H;
- (* boolean equivalent to flag showTitle *)
- saBehind * = saDummy + 0017H;
- (* boolean equivalent to flag screenBehind *)
- saQuiet * = saDummy + 0018H;
- (* boolean equivalent to flag screenQuiet *)
- saAutoScroll * = saDummy + 0019H;
- (* boolean equivalent to flag autoScroll *)
- saPens * = saDummy + 001AH;
- (* pointer to ~0 terminated e.UWORD array, as
- * found in struct DrawInfo
- *)
- saFullPalette * = saDummy + 001BH;
- (* boolean: initialize color table to entire
- * preferences palette (32 for V36), rather
- * than compatible pens 0-3, 17-19, with
- * remaining palette as returned by GetColorMap()
- *)
-
- saColorMapEntries * = saDummy + 001CH;
- (* New for V39:
- * Allows you to override the number of entries
- * in the ColorMap for your screen. Intuition
- * normally allocates (1<<depth) or 32, whichever
- * is more, but you may require even more if you
- * use certain V39 graphics.library features
- * (eg. palette-banking).
- *)
-
- saParent * = saDummy + 001DH;
- (* New for V39:
- * ti_Data is a pointer to a "parent" screen to
- * attach this one to. Attached screens slide
- * and depth-arrange together.
- *)
-
- saDraggable * = saDummy + 001EH;
- (* New for V39:
- * Boolean tag allowing non-draggable screens.
- * Do not use without good reason!
- * (Defaults to TRUE).
- *)
-
- saExclusive * = saDummy + 001FH;
- (* New for V39:
- * Boolean tag allowing screens that won't share
- * the display. Use sparingly! Starting with 3.01,
- * attached screens may be SA_Exclusive. Setting
- * SA_Exclusive for each screen will produce an
- * exclusive family. (Defaults to FALSE).
- *)
-
- saSharePens * = saDummy + 0020H;
- (* New for V39:
- * For those pens in the screen's DrawInfo->dri_Pens,
- * Intuition obtains them in shared mode (see
- * graphics.library/ObtainPen()). For compatibility,
- * Intuition obtains the other pens of a public
- * screen as PEN_EXCLUSIVe. Screens that wish to
- * manage the pens themselves should generally set
- * this tag to TRUe. This instructs Intuition to
- * leave the other pens unallocated.
- *)
-
- saBackFill * = saDummy + 0021H;
- (* New for V39:
- * provides a "backfill hook" for your screen's
- * Layer_Info.
- * See layers.library/InstallLayerInfoHook()
- *)
-
- saInterleaved * = saDummy + 0022H;
- (* New for V39:
- * Boolean tag requesting that the bitmap
- * allocated for you be interleaved.
- * (Defaults to FALSE).
- *)
-
- saColors32 * = saDummy + 0023H;
- (* New for V39:
- * Tag to set the screen's initial palette colors
- * at 32 bits-per-gun. ti_Data is a pointer
- * to a table to be passed to the
- * graphics.library/LoadRGB32() function.
- * This format supports both runs of color
- * registers and sparse registers. See the
- * autodoc for that function for full details.
- * Any color set here has precedence over
- * the same register set by SA_Colors.
- *)
-
- saVideoControl * = saDummy + 0024H;
- (* New for V39:
- * ti_Data is a pointer to a taglist that Intuition
- * will pass to graphics.library/VideoControl(),
- * upon opening the screen.
- *)
-
- saFrontChild * = saDummy + 0025H;
- (* New for V39:
- * ti_Data is a pointer to an already open screen
- * that is to be the child of the screen being
- * opened. The child screen will be moved to the
- * front of its family.
- *)
-
- saBackChild * = saDummy + 0026H;
- (* New for V39:
- * ti_Data is a pointer to an already open screen
- * that is to be the child of the screen being
- * opened. The child screen will be moved to the
- * back of its family.
- *)
-
- saLikeWorkbench * = saDummy + 0027H;
- (* New for V39:
- * Set ti_Data to 1 to request a screen which
- * is just like the Workbench. This gives
- * you the same screen mode, depth, size,
- * colors, etc., as the Workbench screen.
- *)
-
- saReserved * = saDummy + 0028H;
- (* Reserved for private Intuition use *)
-
- saMinimizeISG * = saDummy + 0029H;
- (* New for V40:
- * For compatibility, Intuition always ensures
- * that the inter-screen gap is at least three
- * non-interlaced lines. If your application
- * would look best with the smallest possible
- * inter-screen gap, set ti_Data to TRUe.
- * If you use the new graphics VideoControl()
- * VC_NoColorPaletteLoad tag for your screen's
- * ViewPort, you should also set this tag.
- *)
-
- (* this is an obsolete tag included only for compatibility with V35
- * interim release for the A2024 and Viking monitors
- *)
- nstagExtVPMode * = u.user + 1;
-
-
- (* OpenScreen error codes, which are returned in the (optional) LONGINT
- * pointed to by tiData for the saErrorCode tag item
- *)
- osErrNoMonitor * = 1; (* named monitor spec not available *)
- osErrNoChips * = 2; (* you need newer custom chips *)
- osErrNoMem * = 3; (* couldn't get normal memory *)
- osErrNoChipMem * = 4; (* couldn't get chipmem *)
- osErrPubNotUnique * = 5; (* public screen name already used *)
- osErrUnknownMode * = 6; (* don't recognize mode asked for *)
- oserrTooDeep * = 7; (* Screen deeper than HW supports *)
- oserrAttachFail * = 8; (* Failed to attach screens *)
- oserrNotAvailable * = 9; (* Mode not available for other reason *)
-
- (* ======================================================================== *)
- (* === NewScreen ========================================================== *)
- (* ======================================================================== *)
- (* note: to use the Extended field, you must use the
- * new ExtNewScreen structure, below
- *)
-
- TYPE
-
- NewScreenBase *= RECORD END;
- NewScreenBasePtr *= POINTER TO NewScreenBase;
-
- NewScreen * = RECORD (NewScreenBase)
- leftEdge *, topEdge *,
- width *, height *, depth * : INTEGER; (* screen dimensions *)
-
- detailPen *, blockPen * : SHORTINT; (* for bar/border/gadget rendering *)
-
- viewModes * : s.SET16; (* the Modes for the ViewPort (and View) *)
-
- type * : s.SET16; (* the Screen type (see defines above) *)
-
- font * : gfx.TextAttrPtr; (* this Screen's default text attributes *)
-
- defaultTitle * : e.LSTRPTR; (* the default title for this Screen *)
-
- gadgets * : GadgetPtr; (* UNUSED: Leave this NULL *)
-
- (* if you are opening a CUSTOMSCREEN and already have a gfx.BitMap
- * that you want used for your Screen, you set the flags CUSTOMBITMAP in
- * the Type field and you set this variable to point to your gfx.BitMap
- * structure. The structure will be copied into your Screen structure,
- * after which you may discard your own gfx.BitMap if you want
- *)
- customBitMap * : gfx.BitMapPtr;
- END; (* NewScreen *)
-
- (*
- * For compatibility reasons, we need a new structure for extending
- * NewScreen. Use this structure is you need to use the new Extension
- * field.
- *
- * NOTE: V36-specific applications should use the
- * OpenScreenTagList( newscreen, tags ) version of OpenScreen().
- * Applications that want to be V34-compatible as well may safely use the
- * ExtNewScreen structure. Its tags will be ignored by V34 Intuition.
- *
- *)
-
- ExtNewScreen * = RECORD (NewScreenBase)
- ns * : NewScreen;
- extension * : u.TagListPtr;
- (* more specification data, scanned if
- * nsExtended is set in NewScreen.type
- *)
- END; (* ExtNewScreen *)
-
- CONST
-
- (* === Overscan Types === *)
- oScanText * = 1; (* entirely visible *)
- oScanStandard * = 2; (* just past edges *)
- oScanMax * = 3; (* as much as possible *)
- oScanVideo * = 4; (* even more than is possible *)
-
- (* === Public Shared Screen Node === *)
-
- (* This is the representative of a public shared screen.
- * This is an internal data structure, but some functions may
- * present a copy of it to the calling application. In that case,
- * be aware that the screen pointer of the structure can NOT be
- * used safely, since there is no guarantee that the referenced
- * screen will remain open and a valid data structure.
- *
- * Never change one of these.
- *)
-
- TYPE
-
- PubScreenNode * = RECORD (e.NodeBase)
- node * : e.Node; (* name is screen name *)
- screen * : ScreenPtr;
- flags * : s.SET16; (* below *)
- size * : INTEGER; (* includes name buffer *)
- visitorCount * : INTEGER; (* how many visitor windows *)
- sigTask * : e.TaskPtr; (* who to signal when visitors gone *)
- sigBit * : SHORTINT; (* which signal *)
- END; (* PubScreenNode *)
-
- CONST
-
- psnfPrivate * = 0;
-
- (* NOTE: Due to a bug in NextPubScreen(), make sure your buffer
- * actually has maxPubScreenName+1 characters in it!
- *)
- maxPubScreenName * = 139; (* names no longer, please *)
-
- (* pub screen modes *)
- shanghai * = 0; (* put workbench windows on pub screen *)
- popPubScreen * = 1; (* pop pub screen to front when visitor opens *)
-
- (* New for V39: Intuition has new screen depth-arrangement and movement
- * functions called ScreenDepth() and ScreenPosition() respectively.
- * These functions permit the old behavior of ScreenToFront(),
- * ScreenToBack(), and MoveScreen(). ScreenDepth() also allows
- * independent depth control of attached screens. ScreenPosition()
- * optionally allows positioning screens even though they were opened
- * {saDraggable,FALSE}.
- *)
-
- (* For ScreenDepth(), specify one of sDepthToFront or sDepthToBack,
- * and optionally also sDepthInFamily.
- *
- * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
- * sDepthInFamily. Commodities, "input helper" programs,
- * or any other program that did not open a screen should never
- * use that flag. (Note that this is a style-behavior
- * requirement; there is no technical requirement that the
- * task calling this function need be the task which opened
- * the screen).
- *)
-
- sdepthToFront * = 0; (* Bring screen to front *)
- sdepthToBack * = 1; (* Send screen to back *)
- sdepthInFamily * = 2; (* Move an attached screen with
- * respect to other screens of
- * its family
- *)
-
- (* Here's an obsolete name equivalent to sDepthInFamily: *)
- sdepthChildOnly * = sdepthInFamily;
-
-
- (* For ScreenPosition(), specify one of sPosRelative, sPosAbsolute,
- * or sPosMakeVisible to describe the kind of screen positioning you
- * wish to perform:
- *
- * sPosRelative: The x1 and y1 parameters to ScreenPosition() describe
- * the offset in coordinates you wish to move the screen by.
- * sPosAbsolute: The x1 and y1 parameters to ScreenPosition() describe
- * the absolute coordinates you wish to move the screen to.
- * sPosMakeVisible: (x1,y1)-(x2,y2) describes a rectangle on the
- * screen which you would like autoscrolled into view.
- *
- * You may additionally set sPosForceDrag along with any of the
- * above. Set this if you wish to reposition an {saDraggable,FALSE}
- * screen that you opened.
- *
- * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
- * sPosForceDrag. Commodities, "input helper" programs,
- * or any other program that did not open a screen should never
- * use that flag.
- *)
-
- sposRelative * = {}; (* Coordinates are relative *)
-
- sposAbsolute * = {0}; (* Coordinates are expressed as
- * absolutes, not relatives.
- *)
-
- sposMakeVisible * = {1}; (* Coordinates describe a box on
- * the screen you wish to be
- * made visible by autoscrolling
- *)
-
- sposForceDrag * = {2}; (* Move non-draggable screen *)
-
- (* New for V39: Intuition supports double-buffering in screens,
- * with friendly interaction with menus and certain gadgets.
- * For each buffer, you need to get one of these structures
- * from the AllocScreenBuffer() call. Never allocate your
- * own ScreenBuffer structures!
- *
- * The sbDBufInfo field is for your use. See the graphics.library
- * AllocDBufInfo() autodoc for details.
- *)
-
- TYPE
-
- ScreenBuffer * = RECORD
- bitMap * : gfx.BitMapPtr;
- dBufInfo * : gfx.DBufInfoPtr;
- END;
-
- CONST
-
- (* These are the flags that may be passed to AllocScreenBuffer().
- *)
- sbScreenBitmap * = 0;
- sbCopyBitmap * = 1;
-
- (*
- ** $VER: preferences.h 38.2 (16.9.92)
- **
- ** Structure definition for old-style preferences
- *)
-
-
- (* ======================================================================== *)
- (* === Preferences ======================================================== *)
- (* ======================================================================== *)
-
- CONST
-
- (* these are the definitions for the printer configurations *)
- filenameSize * = 30; (* Filename size *)
- devNameSize * = 16; (* Device-name size *)
-
- pointerSize * = (1 + 16 + 1) * 2; (* Size of Pointer data buffer *)
-
- (* These defines are for the default font size. These actually describe the
- * height of the defaults fonts. The default font type is the topaz
- * font, which is a fixed width font that can be used in either
- * eighty-column or sixty-column mode. The Preferences structure reflects
- * which is currently selected by the value found in the variable FontSize,
- * which may have either of the values defined below. These values actually
- * are used to select the height of the default font. By changing the
- * height, the resolution of the font changes as well.
- *)
- topazEighty * = 8;
- topazSixty * = 9;
-
- (* Note: Starting with V36, and continuing with each new version of
- * Intuition, an increasing number of fields of struct Preferences
- * are ignored by SetPrefs(). (Some fields are obeyed only at the
- * initial SetPrefs(), which comes from the devs:system-configuration
- * file). Elements are generally superseded as new hardware or software
- * features demand more information than fits in struct Preferences.
- * Parts of struct Preferences must be ignored so that applications
- * calling GetPrefs(), modifying some other part of struct Preferences,
- * then calling SetPrefs(), don't end up truncating the extended
- * data.
- *
- * Consult the autodocs for SetPrefs() for further information as
- * to which fields are not always respected.
- *)
-
- TYPE
-
- Filename * = ARRAY filenameSize OF CHAR;
-
- Preferences * = RECORD
- (* the default font height *)
- fontHeight * : SHORTINT; (* height for system default font *)
-
- (* constant describing what's hooked up to the port *)
- printerPort * : SHORTINT; (* printer port connection *)
-
- (* the baud rate of the port *)
- baudRate * : e.UWORD; (* baud rate for the serial port *)
-
- (* various timing rates *)
- oeyRptSpeed * : t.TimeVal; (* repeat spemd for keyboard *)
- oeyRptDelay * : t.TimeVal; (* Delay before keys repeat *)
- doubleClick * : t.TimeVal; (* Interval allowed between clicks *)
-
- (* Intuition Pointer data *)
- pointerMatrix * : ARRAY pointerSize OF e.UWORD; (* Definition of pointer sprite *)
- xOffset * : SHORTINT; (* X-Offset for active 'bit' *)
- yOffset * : SHORTINT; (* Y-Offset for active 'bit' *)
- color17 * : e.UWORD; (***********************************)
- color18 * : e.UWORD; (* Colours for sprite pointer *)
- color19 * : e.UWORD; (***********************************)
- pointerTicks * : e.UWORD; (* Sensitivity of the pointer *)
-
- (* Workbench Screen colors *)
- color0 * : e.UWORD; (***********************************)
- color1 * : e.UWORD; (* Standard default colours *)
- color2 * : e.UWORD; (* Used in the Workbench *)
- color3 * : e.UWORD; (***********************************)
-
- (* positioning data for the Intuition View *)
- viewXOffset * : SHORTINT; (* Offset for top lefthand corner *)
- viewYOffset * : SHORTINT; (* X and Y dimensions *)
- viewInitX *, ViewInitY * : INTEGER; (* View initial offset values *)
-
- enableCLI * : s.SET16; (* CLI availability switch *)
-
- (* printer configurations *)
- printerType * : e.UWORD; (* printer type *)
- printerFilename * : Filename; (* file for printer *)
-
- (* print format and quality configurations *)
- printPitch * : e.UWORD; (* print pitch *)
- printQuality * : e.UWORD; (* print quality *)
- printSpacing * : e.UWORD; (* number of lines per inch *)
- printLeftMargin * : e.UWORD; (* left margin in characters *)
- printRightMargin * : e.UWORD; (* right margin in characters *)
- printImage * : e.UWORD; (* positive or negative *)
- printAspect * : e.UWORD; (* horizontal or vertical *)
- printShade * : e.UWORD; (* b&w, half-tone, or color *)
- printThreshold * : INTEGER; (* darkness ctrl for b/w dumps *)
-
- (* print paper descriptors *)
- paperSize * : e.UWORD; (* paper size *)
- paperLength * : e.UWORD; (* paper length in number of lines *)
- paperType * : e.UWORD; (* continuous or single sheet *)
-
- (* Serial device settings: These are six nibble-fields in three bytes *)
- (* (these look a little strange so the defaults will map out to zero) *)
- serRWBits * : e.UBYTE; (* upper nibble * = (8-number of read bits) *)
- (* lower nibble * = (8-number of write bits) *)
- serStopBuf * : e.UBYTE; (* upper nibble * = (number of stop bits - 1) *)
- (* lower nibble * = (table value for BufSize) *)
- serParShk * : e.UBYTE; (* upper nibble * = (value for Parity setting) *)
- (* lower nibble * = (value for Handshake mode) *)
- laceWB * : s.SET8; (* if workbench is to be interlaced *)
-
- pad * : ARRAY 12 OF e.UBYTE;
- prtDevName * : ARRAY devNameSize OF CHAR; (* device used by printer.device
- * (omit the ".device")
- *)
- defaultPrtUnit * : SHORTINT; (* default unit opened by printer.device *)
- defaultSerUnit * : SHORTINT; (* default serial unit *)
-
- rowSizeChange * : SHORTINT; (* affect NormalDisplayRows/Columns *)
- columnSizeChange * : SHORTINT;
-
- printFlags * : s.SET16; (* user preference flags *)
- printMaxWidth * : e.UWORD; (* max width of printed picture in 10ths/in *)
- printMaxHeight * : e.UWORD; (* max height of printed picture in 10ths/in *)
- printDensity * : SHORTINT; (* print density *)
- printXOffset * : SHORTINT; (* offset of printed picture in 10ths/inch *)
-
- width * : e.UWORD; (* override default workbench width *)
- height * : e.UWORD; (* override default workbench height *)
- depth * : SHORTINT; (* override default workbench depth *)
-
- extSize * : SHORTINT; (* extension information -- do not touch! *)
- (* extension size in blocks of 64 bytes *)
- END; (* Preferences *)
-
-
- CONST
-
- (* Workbench Interlace (use one bit) *)
- laceWB * = 0;
- lwReserved * = 1; (* internal use only *)
-
- (* EnableCLI *)
- screenDrag * = 14;
- mouseAccel * = 15;
-
- (* PrinterPort *)
- parallelPrinter * = 00H;
- serialPrinter * = 01H;
-
- (* BaudRate *)
- baud110 * = 00H;
- baud300 * = 01H;
- baud1200 * = 02H;
- baud2400 * = 03H;
- baud4800 * = 04H;
- baud9600 * = 05H;
- baud19200 * = 06H;
- baudMidi * = 07H;
-
- (* PaperType *)
- fanfold * = 00H;
- single * = 80H;
-
- (* PrintPitch *)
- pica * = 000H;
- elite * = 400H;
- fine * = 800H;
-
- (* PrintQuality *)
- draft * = 000H;
- letter * = 100H;
-
- (* PrintSpacing *)
- sixLPI * = 000H;
- eightLPI * = 200H;
-
- (* Print Image *)
- imagePositive * = 00H;
- imageNegative * = 01H;
-
- (* PrintAspect *)
- aspectHoriz * = 00H;
- aspectVert * = 01H;
-
- (* PrintShade *)
- shadeBW * = 00H;
- shadeGreyscale * = 01H;
- shadeColor * = 02H;
-
- (* PaperSize (all paper sizes have a zero in the lowest nybble) *)
- usLetter * = 00H;
- usLegal * = 10H;
- nTractor * = 20H;
- wTractor * = 30H;
- custom * = 40H;
-
- (* New PaperSizes for V36: *)
- euroA0 * = 50H; (* European size A0: 841 x 1189 *)
- euroA1 * = 60H; (* European size A1: 594 x 841 *)
- euroA2 * = 70H; (* European size A2: 420 x 594 *)
- euroA3 * = 80H; (* European size A3: 297 x 420 *)
- euroA4 * = 90H; (* European size A4: 210 x 297 *)
- euroA5 * = 0A0H; (* European size A5: 148 x 210 *)
- euroA6 * = 0B0H; (* European size A6: 105 x 148 *)
- euroA7 * = 0C0H; (* European size A7: 74 x 105 *)
- euroA8 * = 0D0H; (* European size A8: 52 x 74 *)
-
-
- (* PrinterType *)
- customName * = 00H;
- alphaP101 * = 01H;
- brother15XL * = 02H;
- cbmMps1000 * = 03H;
- diab630 * = 04H;
- diabAdvD25 * = 05H;
- diabC150 * = 06H;
- epson * = 07H;
- epsonJX80 * = 08H;
- okimate20 * = 09H;
- qumeLP20 * = 0AH;
- (* new printer entries, 3 October 1985 *)
- hpLaserjet * = 0BH;
- hpLaserjetPlus * = 0CH;
-
- (* Serial Input Buffer Sizes *)
- buf512 * = 00H;
- buf1024 * = 01H;
- buf2048 * = 02H;
- buf4096 * = 03H;
- buf8000 * = 04H;
- buf16000 * = 05H;
-
- (* Serial Bit Masks *)
- readBits * = 0F0X; (* for SerRWBits *)
- writeBits * = 0FX;
-
- stopBits * = 0F0X; (* for SerStopBuf *)
- bufSizeBits * = 0FX;
-
- parityBits * = 0F0X; (* for SerParShk *)
- hShakeBits * = 0FX;
-
- (* Serial Parity (upper nibble, after being shifted by
- * macro SPARNUM() )
- *)
- parityNone * = 0;
- parityEven * = 1;
- parityOdd * = 2;
- (* New parity definitions for V36: *)
- parityMark * = 3;
- paritySpace * = 4;
-
- (* Serial Handshake Mode (lower nibble, after masking using
- * macro SHANKNUM() )
- *)
- shakeXon * = 0;
- shakeRts * = 1;
- shakeNone * = 2;
-
- (* new defines for PrintFlags *)
-
- correctRed * = 0; (* color correct red shades *)
- correctGreen * = 1; (* color correct green shades *)
- correctBlue * = 2; (* color correct blue shades *)
-
- centerImage * = 3; (* center image on paper *)
-
- ignoreDimensions * = {}; (* ignore max width/height settings *)
- boundedDimensions * = 4; (* use max width/height as boundaries *)
- absoluteDimensions * = 5; (* use max width/height as absolutes *)
- pixelDimensions * = 6; (* use max width/height as prt pixels *)
- multiplyDimensions * = 7; (* use max width/height as multipliers *)
-
- integerScaling * = 8; (* force integer scaling *)
-
- orderedDithering * = {}; (* ordered dithering *)
- halftoneDithering * = 9; (* halftone dithering *)
- floydDithering * = 10; (* Floyd-Steinberg dithering *)
-
- antiAlias * = 11; (* anti-alias image *)
- greyScale2 * = 12; (* for use with hi-res monitor *)
-
- (* masks used for checking bits *)
-
- correctRGBMask * = { correctRed, correctGreen, correctBlue };
- dimensionsMask * = { boundedDimensions, absoluteDimensions, pixelDimensions, multiplyDimensions };
- ditheringMask * = { halftoneDithering, floydDithering };
-
- (*
- ** $VER: intuition.h 38.26 (15.2.93)
- **
- ** Interface definitions for Intuition applications.
- ** (Continued...)
- *)
-
- (* ======================================================================== *)
- (* === Remember =========================================================== *)
- (* ======================================================================== *)
- (* this structure is used for remembering what memory has been allocated to
- * date by a given routine, so that a premature abort or systematic exit
- * can deallocate memory cleanly, easily, and completely
- *)
-
- TYPE
-
- Remember * = RECORD
- nextRemember * : RememberPtr;
- rememberSize * : e.ULONG;
- memory * : e.APTR;
- END; (* Remember *)
-
- (* === Color Spec ====================================================== *)
- (* How to tell Intuition about RGB values for a color table entry.
- * NOTE: The way the structure was defined, the color value was
- * right-justified within each UWORD. This poses problems for
- * extensibility to more bits-per-gun. The saColors32 tag to
- * OpenScreenTags() provides an alternate way to specify colors
- * with greater precision.
- *)
-
- TYPE
-
- ColorSpec * = RECORD
- colorIndex * : INTEGER; (* -1 terminates an array of ColorSpec *)
- red * : e.UWORD; (* only 6 bits recognized in V36 *)
- green * : e.UWORD; (* only 6 bits recognized in V36 *)
- blue * : e.UWORD; (* only 6 bits recognized in V36 *)
- END; (* ColorSpec *)
-
- (* === Easy Requester Specification ======================================= *)
- (* see also autodocs for EasyRequest and BuildEasyRequest *)
- (* NOTE: This structure may grow in size in the future *)
-
- TYPE
-
- EasyStruct * = RECORD
- structSize * : e.ULONG; (* should be sizeof (struct EasyStruct )*)
- flags * : s.SET32; (* should be 0 for now *)
- title * : e.LSTRPTR; (* title of requester window *)
- textFormat * : e.LSTRPTR; (* 'printf' style formatting string *)
- gadgetFormat * : e.LSTRPTR; (* 'printf' style formatting string *)
- END; (* EasyStruct *)
-
- (* ======================================================================== *)
- (* === Miscellaneous ====================================================== *)
- (* ======================================================================== *)
-
- CONST
-
- (* = MENU STUFF =========================================================== *)
- noMenu * = 001FH;
- noItem * = 003FH;
- noSub * = 001FH;
- menuNull * = -1; (* 0FFFFH *)
-
-
- (* these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT,
- * I'll use a generic Width (for all resolutions) for the CheckMark.
- * If COMMSEQ, likewise I'll use this generic stuff
- *)
- checkWidth * = 19;
- commWidth * = 27;
- lowCheckWidth * = 13;
- lowCommWidth * = 16;
-
-
- (* these are the AlertNumber defines. if you are calling DisplayAlert()
- * the AlertNumber you supply must have the alertTYPE bits set to one
- * of these patterns
- *)
- alertType * = 80000000H;
- recoveryAlert * = 00000000H; (* the system can recover from this *)
- deadendAlert * = 80000000H; (* no recovery possible, this is it *)
-
-
- (* When you're defining IntuiText for the Positive and Negative Gadgets
- * created by a call to AutoRequest(), these defines will get you
- * reasonable-looking text. The only field without a define is the IText
- * field; you decide what text goes with the Gadget
- *)
- autoFrontPen * = 0;
- autoBackPen * = 1;
- autoDrawMode * = gfx.jam2;
- autoLeftEdge * = 6;
- autoTopEdge * = 3;
- autoITextFont * = NIL;
- autoNextText * = NIL;
-
-
- (* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- *)
- selectUp * = ie.lButton + ie.upPrefix;
- selectDown * = ie.lButton;
- menuUp * = ie.rButton + ie.upPrefix;
- menuDown * = ie.rButton;
- middleUp * = ie.mButton + ie.upPrefix;
- middleDown * = ie.mButton;
- altLeft * = { ie.lAlt };
- altRight * = { ie.rAlt };
- amigaLeft * = { ie.lCommand };
- amigaRight * = { ie.rCommand };
- amigaKeys * = amigaLeft + amigaRight;
-
- cursorUp * = 4CH;
- cursorLeft * = 4FH;
- cursorRight * = 4EH;
- cursorDown * = 4DH;
- keycodeQ * = 10H;
- keycodeZ * = 31H;
- keycodeX * = 32H;
- keycodeV * = 34H;
- keycodeB * = 35H;
- keycodeN * = 36H;
- keycodeM * = 37H;
- keycodeLess * = 38H;
- keycodeGreater * = 39H;
-
- (* New for V39, Intuition supports the ie.subClassNewTablet subclass
- * of the ie.classNewPointerPos event. The eventAddress of such
- * an event points to a TabletData structure (see below).
- *
- * The TabletData structure contains certain elements including a taglist.
- * The taglist can be used for special tablet parameters. A tablet driver
- * should include only those tag-items the tablet supports. An application
- * can listen for any tag-items that interest it. Note: an application
- * must set the waTabletMessages attribute to TRUE to receive this
- * extended information in its IntuiMessages.
- *
- * The definitions given here MUST be followed. Pay careful attention
- * to normalization and the interpretation of signs.
- *
- * tabletaTabletZ: the current value of the tablet in the Z direction.
- * This unsigned value should typically be in the natural units of the
- * tablet. You should also provide tabletaRangeZ.
- *
- * tabletaRangeZ: the maximum value of the tablet in the Z direction.
- * Normally specified along with tabletaTabletZ, this allows the
- * application to scale the actual Z value across its range.
- *
- * tabletaAngleX: the angle of rotation or tilt about the X-axis. This
- * number should be normalized to fill a signed long integer. Positive
- * values imply a clockwise rotation about the X-axis when viewing
- * from +X towards the origin.
- *
- * tabletaAngleY: the angle of rotation or tilt about the Y-axis. This
- * number should be normalized to fill a signed long integer. Positive
- * values imply a clockwise rotation about the Y-axis when viewing
- * from +Y towards the origin.
- *
- * tabletaAngleZ: the angle of rotation or tilt about the Z axis. This
- * number should be normalized to fill a signed long integer. Positive
- * values imply a clockwise rotation about the Z-axis when viewing
- * from +Z towards the origin.
- *
- * Note: a stylus that supports tilt should use the tabletaAngleX
- * and tabletaAngleY attributes. Tilting the stylus so the tip
- * points towards increasing or decreasing X is actually a rotation
- * around the Y-axis. Thus, if the stylus tip points towards
- * positive X, then that tilt is represented as a negative
- * tabletaAngleY. Likewise, if the stylus tip points towards
- * positive Y, that tilt is represented by positive tabletaAngleX.
- *
- * tabletaPressure: the pressure reading of the stylus. The pressure
- * should be normalized to fill a signed long integer. Typical devices
- * won't generate negative pressure, but the possibility is not precluded.
- * The pressure threshold which is considered to cause a button-click is
- * expected to be set in a Preferences program supplied by the tablet
- * vendor. The tablet driver would send ie.codeLButton-type events as
- * the pressure crossed that threshold.
- *
- * tabletaButtonBits: ti_Data is a long integer whose bits are to
- * be interpreted at the state of the first 32 buttons of the tablet.
- *
- * tabletaInProximity: ti_Data is a boolean. For tablets that support
- * proximity, they should send the {tabletaInProximity,FALSE} tag item
- * when the stylus is out of proximity. One possible use we can forsee
- * is a mouse-blanking commodity which keys off this to blank the
- * mouse. When this tag is absent, the stylus is assumed to be
- * in proximity.
- *
- * tabletaResolutionX: ti_Data is an unsigned long integer which
- * is the x-axis resolution in dots per inch.
- *
- * tabletaResolutionY: ti_Data is an unsigned long integer which
- * is the y-axis resolution in dots per inch.
- *)
-
- CONST
-
- tabletaDummy * = u.user + 03A000H;
- tabletaTabletZ * = tabletaDummy + 01H;
- tabletaRangeZ * = tabletaDummy + 02H;
- tabletaAngleX * = tabletaDummy + 03H;
- tabletaAngleY * = tabletaDummy + 04H;
- tabletaAngleZ * = tabletaDummy + 05H;
- tabletaPressure * = tabletaDummy + 06H;
- tabletaButtonBits * = tabletaDummy + 07H;
- tabletaInProximity * = tabletaDummy + 08H;
- tabletaResolutionX * = tabletaDummy + 09H;
- tabletaResolutionY * = tabletaDummy + 0AH;
-
- (* If your window sets waTabletMessages to TRUE, then it will receive
- * extended IntuiMessages (struct ExtIntuiMessage) whose tabletData
- * field points at a TabletData structure. This structure contains
- * additional information about the input event.
- *)
-
- TYPE
-
- TabletData * = RECORD
- (* Sub-pixel position of tablet, in screen coordinates,
- * scaled to fill a UWORD fraction:
- *)
- xFraction *, yFraction * : e.UWORD;
-
- (* Current tablet coordinates along each axis: *)
- tabletX *, tabletY * : e.ULONG;
-
- (* Tablet range along each axis. For example, if td_TabletX
- * can take values 0-999, td_RangeX should be 1000.
- *)
- rangeX *, rangeY * : e.ULONG;
-
- (* Pointer to tag-list of additional tablet attributes.
- * See <intuition/intuition.h> for the tag values.
- *)
- tagList * : u.TagListPtr;
- END;
-
- (* If a tablet driver supplies a hook for callBack, it will be
- * invoked in the standard hook manner. A0 will point to the Hook
- * itself, A2 will point to the InputEvent that was sent, and
- * A1 will point to a TabletHookData structure. The InputEvent's
- * ie_EventAddress field points at the IENewTablet structure that
- * the driver supplied.
- *
- * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
- * should scale the ient_TabletX and ient_TabletY fields and store the
- * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
- * ient_ScaledYFraction.
- *
- * The tablet hook must currently return NULL. This is the only
- * acceptable return-value under V39.
- *)
-
- TYPE
-
- TabletHookData * = RECORD
- (* Pointer to the active screen:
- * Note: if there are no open screens, thd_Screen will be NULL.
- * thd_Width and thd_Height will then describe an NTSC 640x400
- * screen. Please scale accordingly.
- *)
- screen * : ScreenPtr;
-
- (* The width and height (measured in pixels of the active screen)
- * that your are to scale to:
- *)
- width * : e.ULONG;
- height * : e.ULONG;
-
- (* Non-zero if the screen or something about the screen
- * changed since the last time you were invoked:
- *)
- screenChanged * : LONGINT;
- END;
-
- (*
- ** $VER: sghooks.h 38.1 (11.11.91)
- **
- ** string gadget extensions and hooks
- *)
-
-
- TYPE
-
- StringExtend * = RECORD
- (* display specifications *)
- font * : gfx.TextFontPtr; (* must be an open Font (not TextAttr) *)
- pens * : ARRAY 2 OF e.UBYTE; (* color of text/backgroun *)
- activePens * : ARRAY 2 OF e.UBYTE; (* colors when gadget is active *)
-
- (* edit specifications *)
- initialModes * : s.SET32; (* initial mode flags, below *)
- editHook * : u.HookPtr; (* if non-NULL, must supply WorkBuffer *)
- workBuffer * : e.APTR; (* must be as large as StringInfo.Buffer*)
-
- reserved * : ARRAY 4 OF e.ULONG; (* set to 0 *)
- END; (* StringExtend *)
-
- SGWork * = RECORD
- (* set up when gadget is first activated *)
- gadget * : GadgetPtr; (* the contestant itself *)
- stringInfo * : StringInfoPtr; (* easy access to sinfo *)
- workBuffer * : e.APTR; (* intuition's planned result *)
- prevBuffer * : e.APTR; (* what was there before *)
- modes * : s.SET32; (* current mode *)
-
- (* modified for each input event *)
- iEvent * : ie.InputEventDummyPtr; (* actual event: do not change *)
- code * : e.UWORD; (* character code, if one byte *)
- bufferPos * : INTEGER; (* cursor position *)
- numChars * : INTEGER;
- actions * : s.SET32; (* what Intuition will do *)
- longInt * : LONGINT; (* temp storage for longint *)
-
- gadgetInfo * : GadgetInfoPtr; (* see cghooks.h *)
- editOp * : e.UWORD; (* from constants below *)
- END; (* SGWork *)
-
- CONST
-
- (* SGWork.EditOp -
- * These values indicate what basic type of operation the global
- * editing hook has performed on the string before your gadget's custom
- * editing hook gets called. You do not have to be concerned with the
- * value your custom hook leaves in the EditOp field, only if you
- * write a global editing hook.
- *
- * For most of these general edit operations, you'll want to compare
- * the BufferPos and NumChars of the StringInfo (before global editing)
- * and SGWork (after global editing).
- *)
-
- eoNoOp * = 0001H;
- (* did nothing *)
- eoDelBackward * = 0002H;
- (* deleted some chars (maybe 0). *)
- eoDelForward * = 0003H;
- (* deleted some characters under and in front of the cursor *)
- eoMoveCursor * = 0004H;
- (* moved the cursor *)
- eoEnter * = 0005H;
- (* "enter" or "return" key, terminate *)
- eoReset * = 0006H;
- (* current Intuition-style undo *)
- eoReplaceChar * = 0007H;
- (* replaced one character and (maybe) advanced cursor *)
- eoInsertChar * = 0008H;
- (* inserted one char into string or added one at end *)
- eoBadFormat * = 0009H;
- (* didn't like the text data, e.g., Bad LONGINT *)
- eoBigChange * = 000AH; (* unused by Intuition *)
- (* complete or major change to the text, e.g. new string *)
- eoUndo * = 000BH; (* unused by Intuition *)
- (* some other style of undo *)
- eoClear * = 000CH;
- (* clear the string *)
- eoSpecial * = 000DH; (* unused by Intuition *)
- (* some operation that doesn't fit into the categories here *)
-
-
- (* Mode Flags definitions (ONLY first group allowed as InitialModes) *)
- sgmReplace * = 0; (* replace mode *)
- (* please initialize StringInfo with in-range value of BufferPos
- * if you are using sgmREPLACE mode.
- *)
-
- sgmFixedField * = 1; (* fixed length buffer *)
- (* always set sgmREPLACE, too *)
- sgmNoFilter * = 2; (* don't filter control chars *)
-
- (* sgmExitHelp is new for V37, and ignored by V36: *)
- sgmExitHelp * = 7; (* exit with code * = 5FH if HELP hit *)
-
-
- (* These Mode Flags are for internal use only *)
- sgmNoChange * = 3; (* no edit changes yet *)
- sgmNoWorkB * = 4; (* Buffer == PrevBuffer *)
- sgmControl * = 5; (* control char escape mode *)
- sgmLongint * = 6; (* an intuition longint gadget *)
-
- (* String Gadget Action Flags (put in SGWork.Actions by EditHook) *)
- sgaUse * = 0; (* use contents of SGWork *)
- sgaEnd * = 1; (* terminate gadget, code in Code field *)
- sgaBeep * = 2; (* flash the screen for the user *)
- sgaReuse * = 3; (* reuse input event *)
- sgaRedisplay * = 4; (* gadget visuals changed *)
-
- (* New for V37: *)
- sgaNextActive * = 5; (* Make next possible gadget active. *)
- sgaPrevActive * = 6; (* Make previous possible gadget active.*)
-
- (* function id for only existing custom string gadget edit hook *)
-
- sghKey * = 1; (* process editing keystroke *)
- sghClick * = 2; (* process mouse click cursor position *)
-
- (* Here's a brief summary of how the custom string gadget edit hook works:
- * You provide a hook in StringInfo.Extension.EditHook.
- * The hook is called in the standard way with the 'object'
- * a pointer to SGWork, and the 'message' a pointer to a command
- * block, starting either with (longword) sghKey, sghClick,
- * or something new.
- *
- * You return 0 if you don't understand the command (sghKey is
- * required and assumed). Return non-zero if you implement the
- * command.
- *
- * sghKEY:
- * There are no parameters following the command longword.
- *
- * Intuition will put its idea of proper values in the SGWork
- * before calling you, and if you leave sgaUse set in the
- * SGWork.Actions field, Intuition will use the values
- * found in SGWork fields WorkBuffer, NumChars, BufferPos,
- * and LongInt, copying the WorkBuffer back to the StringInfo
- * Buffer.
- *
- * NOTE WELL: You may NOT change other SGWork fields.
- *
- * If you clear sgaUSE, the string gadget will be unchanged.
- *
- * If you set sgaEND, Intuition will terminate the activation
- * of the string gadget. If you also set sgaREUSE, Intuition
- * will reuse the input event after it deactivates your gadget.
- *
- * In this case, Intuition will put the value found in SGWork.Code
- * into the IntuiMessage.Code field of the idcmpGADGETUP message it
- * sends to the application.
- *
- * If you set sgaBEEP, Intuition will call DisplayBeep(); use
- * this if the user has typed in error, or buffer is full.
- *
- * Set sgaREDISPLAY if the changes to the gadget warrant a
- * gadget redisplay. Note: cursor movement requires a redisplay.
- *
- * Starting in V37, you may set sgaPREVACTIVE or sgaNEXTACTIVE
- * when you set sgaEND. This tells Intuition that you want
- * the next or previous gadget with gflgTABCYCLE to be activated.
- *
- * sghCLICK:
- * This hook command is called when Intuition wants to position
- * the cursor in response to a mouse click in the string gadget.
- *
- * Again, here are no parameters following the command longword.
- *
- * This time, Intuition has already calculated the mouse position
- * character cell and put it in SGWork.BufferPos. The previous
- * BufferPos value remains in the SGWork.StringInfo.BufferPos.
- *
- * Intuition will again use the SGWork fields listed above for
- * sghKEY. One restriction is that you are NOT allowed to set
- * sgaEND or sgaREUSE for this command. Intuition will not
- * stand for a gadget which goes inactive when you click in it.
- *
- * You should always leave the sgaREDISPLAY flag set, since Intuition
- * uses this processing when activating a string gadget.
- *)
-
- (*
- ** $VER: cghooks.h 38.1 (11.11.91)
- **
- ** Custom Gadget processing
- *)
-
-
- TYPE
-
- (*
- * Package of information passed to custom and 'boopsi'
- * gadget "hook" functions. This structure is READ ONLY.
- *)
-
- GadgetInfo * = RECORD
-
- screen - : ScreenPtr;
- window - : WindowPtr; (* null for screen gadgets *)
- requester - : RequesterPtr; (* null if not gtypREQGADGET *)
-
- (* rendering information:
- * don't use these without cloning/locking.
- * Official way is to call ObtainRPort()
- *)
- rastPort - : gfx.RastPortPtr;
- layer - : gfx.LayerPtr;
-
- (* copy of dimensions of screen/window/g00/req(/group)
- * that gadget resides in. Left/Top of this box is
- * offset from window mouse coordinates to gadget coordinates
- * screen gadgets: 0,0 (from screen coords)
- * window gadgets (no g00): 0,0
- * gtypGZZGADGETs (borderlayer): 0,0
- * GZZ innerlayer gadget: borderleft, bordertop
- * Requester gadgets: reqleft, reqtop
- *)
- domain - : IBox;
-
- (* these are the pens for the window or screen *)
- pens - : RECORD
- detailPen - : e.UBYTE;
- blockPen - : e.UBYTE;
- END;
-
- (* the Detail and Block pens in giDrInfo->driPens[] are
- * for the screen. Use the above for window-sensitive
- * colors.
- *)
- drInfo - : DrawInfoPtr;
-
- (* reserved space: this structure is extensible
- * anyway, but using these saves some recompilation
- *)
- reserved - : ARRAY 6 OF e.ULONG;
- END; (* GadgetInfo *)
-
- (*** system private data structure for now ***)
- (* prop gadget extra info *)
-
- PGX = RECORD
- container * : IBox;
- newKnob * : IBox;
- END; (* PGX *)
-
- (*
- ** $VER: classusr.h 38.2 (14.4.92)
- **
- ** For application users of Intuition object classes
- *)
-
- TYPE
-
- (*** User visible handles on objects, classes, messages ***)
- ObjectUsr * = e.ULONG; (* abstract handle *)
-
- ClassID * = e.LSTRPTR;
-
- (* you can use this type to point to a "generic" message,
- * in the object-oriented programming parlance. Based on
- * the value of 'MethodID', you dispatch to processing
- * for the various message types. The meaningful parameter
- * packet structure definitions are defined below.
- *)
-
- MsgBase *= RECORD END;
- MsgBasePtr *= POINTER TO MsgBase;
-
- Msg * = RECORD (MsgBase)
- methodID * : e.ULONG
- (* method-specific data follows, some examples below *)
- END; (* Msg *)
-
- CONST
-
- (*
- * Class id strings for Intuition classes.
- * There's no real reason to use the uppercase constants
- * over the lowercase strings, but this makes a good place
- * to list the names of the built-in classes.
- *)
- rootClass * = "rootclass"; (* classusr.h *)
- imageClass * = "imageclass"; (* imageclass.h *)
- frameIClass * = "frameiclass";
- sysIClass * = "sysiclass";
- fillRectClass * = "fillrectclass";
- gadgetClass * = "gadgetclass"; (* gadgetclass.h *)
- propGClass * = "propgclass";
- strGClass * = "strgclass";
- buttonGClass * = "buttongclass";
- frButtonClass * = "frbuttonclass";
- groupGClass * = "groupgclass";
- icClass * = "icclass"; (* icclass.h *)
- modelClass * = "modelclass";
- iTextIClass * = "itexticlass";
- pointerClass * = "pointerclass"; (* pointerclass.h *)
-
- (* Dispatched method ID's
- * NOTE: Applications should use Intuition entry points, not direct
- * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
- * SetGadgetAttrs, and GetAttr.
- *)
-
- omDummy * = 100H;
- omNew * = 101H; (* 'object' parameter is "true class" *)
- omDispose * = 102H; (* delete self (no parameters) *)
- omSet * = 103H; (* set attributes (in tag list) *)
- omGet * = 104H; (* return single attribute value *)
- omAddTail * = 105H; (* add self to a List (let root do it) *)
- omRemove * = 106H; (* remove self from list *)
- omNotify * = 107H; (* send to self: notify dependents *)
- omUpdate * = 108H; (* notification message from somebody *)
- omAddMember * = 109H; (* used by various classes with lists *)
- omRemMember * = 10AH; (* used by various classes with lists *)
-
- (* Parameter "Messages" passed to methods *)
-
- (* omNew and omSet *)
-
- TYPE
-
- OpSet * = RECORD (MsgBase)
- msg * : Msg;
- attrList * : u.TagListPtr; (* new attributes *)
- gInfo * : GadgetInfoPtr; (* always there for gadgets,
- * when SetGadgetAttrs() is used,
- * but will be NULL for omNEW
- *)
- END; (* OpSet *)
-
- (* omNOTIFY, and omUPDATE *)
-
- OpUpdate * = RECORD (MsgBase)
- msg * : Msg;
- attrList * : u.TagListPtr; (* new attributes *)
- gInfo * : GadgetInfoPtr; (* non-NULL when SetGadgetAttrs or
- * notification resulting from gadget
- * input occurs.
- *)
- flags * : s.SET32; (* defined below *)
- END; (* OpUpdate *)
-
- CONST
-
- (* this flag means that the update message is being issued from
- * something like an active gadget, a la gactFollowMouse. When
- * the gadget goes inactive, it will issue a final update
- * message with this bit cleared. Examples of use are for
- * gactFollowMouse equivalents for propgadclass, and repeat strobes
- * for buttons.
- *)
- opuInterim * = 0;
-
- (* omGet *)
-
- TYPE
-
- OpGet * = RECORD (MsgBase)
- msg * : Msg;
- attrID * : e.ULONG;
- storage * : SYS.ADDRESS; (* may be other types, but "int"
- * types are all e.ULONG
- *)
- END; (* OpGet *)
-
- (* omAddTail *)
-
- OpAddTail * = RECORD (MsgBase)
- msg * : Msg;
- list * : e.ListPtr;
- END; (* OpAddTail *)
-
- (* omAddMember, omRemMember *)
-
- OpMember * = RECORD (MsgBase)
- msg * : Msg;
- object : ObjectPtr;
- END; (* OpMember *)
-
- (*
- ** $VER: classes.h 38.1 (11.11.91)
- **
- ** Used only by class implementors
- *)
-
-
- TYPE
-
- (*******************************************)
- (*** "White box" access to struct IClass ***)
- (*******************************************)
-
- (* This structure is READ-ONLY, and allocated only by Intuition *)
-
- IClass * = RECORD (u.HookBase)
- dispatcher - : u.Hook;
- reserved - : e.ULONG; (* must be 0 *)
- super - : IClassPtr;
- id - : ClassID;
-
- (* where within an object is the instance data for this class? *)
- instOffset - : e.UWORD;
- instSize - : e.UWORD;
-
- userData - : e.ULONG; (* per-class data of your choice *)
- subclassCount - : e.ULONG; (* how many direct subclasses? *)
- objectCount - : e.ULONG; (* how many objects created of this class? *)
- flags - : s.SET32;
- END; (* IClass *)
-
- Class * = IClass;
-
- CONST
-
- clInList * = 0; (* class is in public class list *)
-
- TYPE
-
- (**************************************************)
- (*** "White box" access to struct Object ***)
- (**************************************************)
-
- (*
- * We have this, the instance data of the root class, PRECEDING
- * the "object". This is so that Gadget objects are Gadget pointers,
- * and so on. If this structure grows, it will always have oClass
- * at the end, so the macro OCLASS(o) will always have the same
- * offset back from the pointer returned from NewObject().
- *
- * This data structure is subject to change. Do not use the oNode
- * embedded structure.
- *)
-
- Object * = RECORD (e.MinNodeBase)
- node * : e.MinNode;
- class * : IClassPtr;
- END; (* Object *)
-
- (*
- ** $VER: gadgetclass.h 38.10 (8.1.93)
- **
- ** Custom and 'boopsi' gadget class interface
- *)
-
-
- CONST
-
- (* Gadget Class attributes *)
-
- gaDummy * = u.user + 30000H;
- gaLeft * = gaDummy + 0001H;
- gaRelRight * = gaDummy + 0002H;
- gaTop * = gaDummy + 0003H;
- gaRelBottom * = gaDummy + 0004H;
- gaWidth * = gaDummy + 0005H;
- gaRelWidth * = gaDummy + 0006H;
- gaHeight * = gaDummy + 0007H;
- gaRelHeight * = gaDummy + 0008H;
- gaText * = gaDummy + 0009H; (* tiData is (e.UBYTE * *)
- gaImage * = gaDummy + 000AH;
- gaBorder * = gaDummy + 000BH;
- gaSelectRender * = gaDummy + 000CH;
- gaHighlight * = gaDummy + 000DH;
- gaDisabled * = gaDummy + 000EH;
- gaGZZGadget * = gaDummy + 000FH;
- gaID * = gaDummy + 0010H;
- gaUserData * = gaDummy + 0011H;
- gaSpecialInfo * = gaDummy + 0012H;
- gaSelected * = gaDummy + 0013H;
- gaEndGadget * = gaDummy + 0014H;
- gaImmediate * = gaDummy + 0015H;
- gaRelVerify * = gaDummy + 0016H;
- gaFollowMouse * = gaDummy + 0017H;
- gaRightBorder * = gaDummy + 0018H;
- gaLeftBorder * = gaDummy + 0019H;
- gaTopBorder * = gaDummy + 001AH;
- gaBottomBorder * = gaDummy + 001BH;
- gaToggleSelect * = gaDummy + 001CH;
-
- (* internal use only, until further notice, please *)
- gaSysGadget * = gaDummy + 001DH;
- (* bool, sets gtypSysGadget field in type *)
- gaSysGType * = gaDummy + 001EH;
- (* e.g., gtypWUpFront, ... *)
-
- gaPrevious * = gaDummy + 001FH;
- (* previous gadget (or (struct Gadget ** )) in linked list
- * NOTE: This attribute CANNOT be used to link new gadgets
- * into the gadget list of an open window or requester.
- * You must use AddGList().
- *)
-
- gaNext * = gaDummy + 0020H;
- (* not implemented *)
-
- gaDrawInfo * = gaDummy + 0021H;
- (* some fancy gadgets need to see a DrawInfo
- * when created or for layout
- *)
-
- (* You should use at most ONE of gaText, gaIntuiText, and gaLabelImage *)
- gaIntuiText * = gaDummy + 0022H;
- (* tiData is (struct IntuiText * ) *)
-
- gaLabelImage * = gaDummy + 0023H;
- (* tiData is an image (object), used in place of
- * GadgetText
- *)
-
- gaTabCycle * = gaDummy + 0024H;
- (* New for V37:
- * Boolean indicates that this gadget is to participate in
- * cycling activation with Tab or Shift-Tab.
- *)
-
- gaGadgetHelp * = gaDummy + 0025H;
- (* New for V39:
- * Boolean indicates that this gadget sends gadget-help
- *)
-
- gaBounds * = gaDummy + 0026H;
- (* New for V39:
- * ti_Data is a pointer to an IBox structure which is
- * to be copied into the extended gadget's bounds.
- *)
-
- gaRelSpecial * = gaDummy + 0027H;
- (* New for V39:
- * Boolean indicates that this gadget has the "special relativity"
- * property, which is useful for certain fancy relativity
- * operations through the gmLayout method.
- *)
-
- (* PROPGCLASS attributes *)
-
- pgaDummy * = u.user + 31000H;
- pgaFreedom * = pgaDummy + 0001H;
- (* only one of FREEVERT or FREEHORIZ *)
- pgaBorderless * = pgaDummy + 0002H;
- pgaHorizPot * = pgaDummy + 0003H;
- pgaHorizBody * = pgaDummy + 0004H;
- pgaVertPot * = pgaDummy + 0005H;
- pgaVertBody * = pgaDummy + 0006H;
- pgaTotal * = pgaDummy + 0007H;
- pgaVisible * = pgaDummy + 0008H;
- pgaTop * = pgaDummy + 0009H;
- (* New for V37: *)
- pgaNewLook * = pgaDummy + 000AH;
-
- (* STRGCLASS attributes *)
-
- stringaDummy * = u.user + 32000H;
- stringaMaxChars * = stringaDummy + 0001H;
- (* Note: There is a minor problem with Intuition when using boopsi integer
- * gadgets (which are requested by using stringaLongInt). Such gadgets
- * must not have a stringaMaxChars to be bigger than 15. Setting
- * stringaMaxChars for a boopsi integer gadget will cause a mismatched
- * FreeMem() to occur.
- *)
-
- stringaBuffer * = stringaDummy + 0002H;
- stringaUndoBuffer * = stringaDummy + 0003H;
- stringaWorkBuffer * = stringaDummy + 0004H;
- stringaBufferPos * = stringaDummy + 0005H;
- stringaDispPos * = stringaDummy + 0006H;
- stringaAltKeyMap * = stringaDummy + 0007H;
- stringaFont * = stringaDummy + 0008H;
- stringaPens * = stringaDummy + 0009H;
- stringaActivePens * = stringaDummy + 000AH;
- stringaEditHook * = stringaDummy + 400BH;
- stringaEditModes * = stringaDummy + 000CH;
-
- (* booleans *)
- stringaReplaceMode * = stringaDummy + 000DH;
- stringaFixedFieldMode * = stringaDummy + 000EH;
- stringaNoFilterMode * = stringaDummy + 000FH;
-
- stringaJustification * = stringaDummy + 0010H;
- (* gactSTRINGCENTER, gactSTRINGLEFT, gactSTRINGRIGHT *)
- stringaLongVal * = stringaDummy + 0011H;
- stringaTextVal * = stringaDummy + 0012H;
-
- stringaExitHelp * = stringaDummy + 0013H;
- (* stringaExitHelp is new for V37, and ignored by V36.
- * Set this if you want the gadget to exit when Help is
- * pressed. Look for a code of 5FH, the rawkey code for Help
- *)
-
- sgDefaultMaxChars * = 128;
-
- (* Gadget Layout related attributes *)
-
- layoutaDummy * = u.user + 38000H;
- layoutaLayoutObj * = layoutaDummy + 0001H;
- layoutaSpacing * = layoutaDummy + 0002H;
- layoutaOrientation * = layoutaDummy + 0003H;
-
- (* orientation values *)
- lOrientNone * = 0;
- lOrientHoriz * = 1;
- lOrientVert * = 2;
-
-
- (* Gadget Method ID's *)
-
- gmDummy * = -1; (* not used for anything *)
- gmHitTest * = 0; (* return gmrGADGETHIT if you are clicked on
- * (whether or not you are disabled).
- *)
- gmRender * = 1; (* draw yourself, in the appropriate state *)
- gmGoActive * = 2; (* you are now going to be fed input *)
- gmHandleInput * = 3; (* handle that input *)
- gmGoInactive * = 4; (* whether or not by choice, you are done *)
- gmHelpTest * = 5; (* Will you send gadget help if the mouse is
- * at the specified coordinates? See below
- * for possible GMR_ values.
- *)
- gmLayout * = 6; (* re-evaluate your size based on the GadgetInfo
- * Domain. Do NOT re-render yourself yet, you
- * will be called when it is time...
- *)
-
- (* Parameter "Messages" passed to gadget class methods *)
-
- TYPE
-
- (* gmHitTest and gmHelpTest send this message.
- * For gmHitTest, mouse are coordinates relative to the gadget
- * select box. For gmHelpTest, the coordinates are relative to
- * the gadget bounding box (which defaults to the select box).
- *)
-
- HitTest * = RECORD (MsgBase)
- msg * : Msg;
- gInfo * : GadgetInfoPtr;
- mouse * : gfx.Point;
- END; (* HitTest *)
- (* For gmHitTest, return gmrGadgetHit if you were indeed hit,
- * otherwise return zero.
- *
- * For gmHelpTest, return gmrNoHelpHit (zero) if you were not hit.
- * Typically, return gmrHelpHit if you were hit.
- * It is possible to pass a UWORD to the application via the Code field
- * of the idcmpGadgetHelp message. Return gmrHelpCode or'd with
- * the UWORD-sized result you wish to return.
- *
- * gmrHelpHit yields a Code value of -1, which should
- * mean "nothing particular" to the application.
- *)
-
- CONST
-
- gmrGadgetHit * = 000000004H; (* gmHitTest hit *)
-
- gmrNoHelpHit * = 000000000H; (* gmHelpTest didn't hit *)
- gmrHelpHit * = 0FFFFFFFFH; (* gmHelpTest hit, return code = ~0 *)
- gmrHelpCode * = 000010000H; (* gmHelpTest hit, return low word as code *)
-
- TYPE
-
- (* gmRender *)
-
- Render * = RECORD (MsgBase)
- msg * : Msg;
- gInfo * : GadgetInfoPtr; (* gadget context *)
- rPort * : gfx.RastPortPtr; (* all ready for use *)
- redraw * : LONGINT; (* might be a "highlight pass" *)
- END; (* Render *)
-
- CONST
-
- (* values of gprRedraw *)
- gRedrawUpdate * = 2; (* incremental update, e.g. prop slider *)
- gRedrawRedraw * = 1; (* redraw gadget *)
- gRedrawToggle * = 0; (* toggle highlight, if applicable *)
-
- (* gmGoActive, gmHandleInput *)
-
- TYPE
-
- Input * = RECORD (MsgBase)
- msg * : Msg;
- gInfo * : GadgetInfoPtr;
- iEvent * : ie.InputEventDummyPtr;
- termination * : e.APTR;
- mouse * : gfx.Point;
-
- (* (V39) Pointer to TabletData structure, if this event originated
- * from a tablet which sends ie.subClassNewTablet events, or NULL if
- * not.
- *
- * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
- * IT WILL BE INVALID!
- *)
- tabletData * : TabletDataPtr;
- END; (* Input *)
-
- CONST
-
- (* gmHandleInput and gmGoActive return code flags *)
- (* return gmrMeActive (0) alone if you want more input.
- * Otherwise, return ONE of gmrNoReuse and gmrReuse, and optionally
- * gmrVerify.
- *)
- gmrMeActive * = 0;
- gmrNoReuse * = 2;
- gmrReuse * = 4;
- gmrVerify * = 8; (* you MUST set cgpTermination *)
-
- (* New for V37:
- * You can end activation with one of gmrNEXTACTIVE and gmrPREVACTIVE,
- * which instructs Intuition to activate the next or previous gadget
- * that has gflgTABCYCLE set.
- *)
- gmrNextActive * = 16;
- gmrPrevActive * = 32;
-
- (* gmGoInactive *)
-
- TYPE
-
- GoInactive * = RECORD (MsgBase)
- msg * : Msg;
- gInfo * : GadgetInfoPtr;
- (* V37 field only! DO NOT attempt to read under V36! *)
- abort * : e.ULONG; (* abort=1 if gadget was aborted
- * by Intuition and 0 if gadget went
- * inactive at its own request
- *)
- END; (* GoInactive *)
-
- (* New for V39: Intuition sends gmLayout to any grel* gadget when
- * the gadget is added to the window (or when the window opens, if
- * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
- * list), or when the window is resized. Your gadget can set the
- * GA_RelSpecial property to get gmLayout events without Intuition
- * changing the interpretation of your gadget select box. This
- * allows for completely arbitrary resizing/repositioning based on
- * window size.
- *)
-
- (* GM_LAYOUT *)
- Layout * = RECORD (MsgBase)
- msg * : Msg;
- gInfo * : GadgetInfoPtr;
- initial * : e.ULONG; (* non-zero if this method was invoked
- * during AddGList() or OpenWindow()
- * time. zero if this method was invoked
- * during window resizing.
- *)
- END;
-
- (*
- ** $VER: icclass.h 38.1 (11.11.91)
- **
- ** Gadget/object interconnection classes
- *)
-
-
- CONST
-
- icmDummy * = 0401H; (* used for nothing *)
- icmSetLoop * = 0402H; (* set/increment loop counter *)
- icmClearLoop * = 0403H; (* clear/decrement loop counter *)
- icmCheckLoop * = 0404H; (* set/increment loop *)
-
- (* no parameters for icmSetLoop, icmClearLoop, icmCheckLoop *)
-
- (* interconnection attributes used by icclass, modelclass, and gadgetclass *)
- icaDummy * = u.user + 40000H;
- icaTarget * = icaDummy + 1;
- (* interconnection target *)
- icaMap * = icaDummy + 2;
- (* interconnection map tagitem list *)
- icSpecialCode * = icaDummy + 3;
- (* a "pseudo-attribute", see below. *)
-
- (* Normally, the value for icaTarget is some object pointer,
- * but if you specify the special value icTargetIDCMP, notification
- * will be send as an idcmpIDCMPUpdate message to the appropriate window's
- * IDCMP port. See the definition of idcmpIDCMPUpdate.
- *
- * When you specify icTargetIDCMP for icaTarget, the map you
- * specify will be applied to derive the attribute list that is
- * sent with the idcmpIDCMPUpdate message. If you specify a map list
- * which results in the attribute tag id icSpecialCode, the
- * lower sixteen bits of the corresponding tiData value will
- * be copied into the Code field of the idcmpIDCMPUpdate IntuiMessage.
- *)
- icTargetIDCMP * = {0..31};
-
- (*
- ** $VER: imageclass.h 38.5 (26.3.92)
- **
- ** Definitions for the image classes
- *)
-
-
- CONST
-
- customImageDepth * = -1;
- (* if image.Depth is this, it's a new Image class object *)
-
- (******************************************************)
- iaDummy * = u.user + 20000H;
- iaLeft * = iaDummy + 01H;
- iaTop * = iaDummy + 02H;
- iaWidth * = iaDummy + 03H;
- iaHeight * = iaDummy + 04H;
- iaFGPen * = iaDummy + 05H;
- (* iaFGPen also means "PlanePick" *)
- iaBGPen * = iaDummy + 06H;
- (* iaBGPen also means "PlaneOnOff" *)
- iaData * = iaDummy + 07H;
- (* bitplanes, for classic image,
- * other image classes may use it for other things
- *)
- iaLineWidth * = iaDummy + 08H;
- iaPens * = iaDummy + 0EH;
- (* pointer to e.UWORD pens[],
- * ala DrawInfo.Pens, MUST be
- * terminated by ~0. Some classes can
- * choose to have this, or sysiaDrawInfo,
- * or both.
- *)
- iaResolution * = iaDummy + 0FH;
- (* packed uwords for x/y resolution into a longword
- * ala DrawInfo.Resolution
- *)
-
- (**** see class documentation to learn which *****)
- (**** classes recognize these *****)
- iaAPattern * = iaDummy + 10H;
- iaAPatSize * = iaDummy + 11H;
- iaMode * = iaDummy + 12H;
- iaFont * = iaDummy + 13H;
- iaOutline * = iaDummy + 14H;
- iaRecessed * = iaDummy + 15H;
- iaDoubleEmboss * = iaDummy + 16H;
- iaEdgesOnly * = iaDummy + 17H;
-
- (**** "sysiclass" attributes *****)
- sysiaSize * = iaDummy + 0BH;
- (* #define's below *)
- sysiaDepth * = iaDummy + 0CH;
- (* this is unused by Intuition. sysiaDrawInfo
- * is used instead for V36
- *)
- sysiaWhich * = iaDummy + 0DH;
- (* see #define's below *)
- sysiaDrawInfo * = iaDummy + 18H;
- (* pass to sysiclass, please *)
-
- (***** obsolete: don't use these, use iaPens *****)
- sysiaPens * = iaPens;
- iaShadowPen * = iaDummy + 09H;
- iaHighlightPen * = iaDummy + 0AH;
-
- (* New for V39: *)
- sysiaReferenceFont * = iaDummy + 19H;
- (* Font to use as reference for scaling
- * certain sysiclass images
- *)
- iaSupportsDisable * = iaDummy + 1AH;
- (* By default, Intuition ghosts gadgets itself,
- * instead of relying on idsDisabled or
- * idsSelectedDisabled. An imageclass that
- * supports these states should return this attribute
- * as TRUe. You cannot set or clear this attribute,
- * however.
- *)
-
- iaFrameType * = iaDummy + 1BH;
- (* Starting with V39, FrameIClass recognizes
- * several standard types of frame. Use one
- * of the frame* specifiers below. Defaults
- * to frameDefault.
- *)
-
- (** next attribute: (iaDummy + 1CH) **)
- (*************************************************)
-
- (* data values for sysiaSize *)
- sysISizeMedRes * = 0;
- sysISizeLowRes * = 1;
- sysISizeHires * = 2;
-
- (*
- * sysiaWhich tag data values:
- * Specifies which system gadget you want an image for.
- * Some numbers correspond to internal Intuition #defines
- *)
- depthImage * = 00H;
- zoomImage * = 01H;
- sizeImage * = 02H;
- closeImage * = 03H;
- sDepthImage * = 05H; (* screen depth gadget *)
- leftImage * = 0AH;
- upImage * = 0BH;
- rightImage * = 0CH;
- downImage * = 0DH;
- checkImage * = 0EH;
- mxImage * = 0FH; (* mutual exclude "button" *)
- (* New for V39: *)
- menuCheck * = 10H; (* Menu checkmark image *)
- amigaKey * = 11H; (* Menu Amiga-key image *)
-
- (* Data values for iaFrameType (recognized by FrameIClass)
- *
- * frameDefault: The standard V37-type frame, which has
- * thin edges.
- * frameButton: Standard button gadget frames, having thicker
- * sides and nicely edged corners.
- * frameRidge: A ridge such as used by standard string gadgets.
- * You can recess the ridge to get a groove image.
- * frameIconDropBox: A broad ridge which is the standard imagery
- * for areas in AppWindows where icons may be dropped.
- *)
-
- frameDefault * = 0;
- frameButton * = 1;
- frameRidge * = 2;
- frameIconDropBox * = 3;
-
-
- (* image message id's *)
- imDraw * = 202H; (* draw yourself, with "state" *)
- imHitTest * = 203H; (* return TRUE if click hits image *)
- imErase * = 204H; (* erase yourself *)
- imMove * = 205H; (* draw new and erase old, smoothly *)
-
- imDrawFrame * = 206H; (* draw with specified dimensions *)
- imFrameBox * = 207H; (* get recommended frame around some box*)
- imHitFrame * = 208H; (* hittest with dimensions *)
- imEraseFrame * = 209H; (* hittest with dimensions *)
-
- (* image draw states or styles, for imDRAW *)
- (* Note that they have no bitwise meanings (unfortunately) *)
- idsNormal * = 0;
- idsSelected * = 1; (* for selected gadgets *)
- idsDisabled * = 2; (* for disabled gadgets *)
- idsBusy * = 3; (* for future functionality *)
- idsIndeterminate * = 4; (* for future functionality *)
- idsInactiveNormal * = 5; (* normal, in inactive window border *)
- idsInactiveSelected * = 6; (* selected, in inactive bor`er *)
- idsInactiveDisabled * = 7; (* disabled, in inactive border *)
- idsSelectedDisabled * = 8; (* disabled and selected *)
-
- (* oops, please forgive spelling error by jimm *)
- idsIndeterminant * = idsIndeterminate;
-
- (* imFrameBox *)
-
- TYPE
-
- FrameBox * = RECORD (MsgBase)
- msg * : Msg;
- contentsBox * : IBoxPtr; (* input: relative box of contents *)
- frameBox * : IBoxPtr; (* output: rel. box of encl frame *)
- drInfo * : DrawInfoPtr; (* NB: May be NULL *)
- frameFlags * : s.SET32;
- END; (* FrameBox *)
-
- CONST
-
- frameSpecify * = 0; (* Make do with the dimensions of FrameBox
- * provided.
- *)
-
- (* imDraw, imDrawFrame *)
-
- TYPE
-
- Dimensions = RECORD
- width * : INTEGER;
- height * : INTEGER;
- END; (* Dimensions *)
-
- Draw * = RECORD (MsgBase)
- msg * : Msg;
- rPort * : gfx.RastPortPtr;
- offset * : gfx.Point;
- state * : e.ULONG;
- drInfo * : DrawInfoPtr; (* NB: May be NULL *)
-
- (* these parameters only valid for imDRAWFRAME *)
- dimensions * : Dimensions;
- END; (* Draw *)
-
- (* imErase, imEraseFrame *)
- (* NOTE: This is a subset of Draw *)
-
- TYPE
-
- Erase * = RECORD (MsgBase)
- msg * : Msg;
- rPort * : gfx.RastPortPtr;
- offset * : gfx.Point;
-
- (* these parameters only valid for imERASEFRAME *)
- dimensions * : Dimensions;
- END; (* Erase *)
-
- (* imHitTest, imHitFrame *)
-
- TYPE
-
- IMHitTest * = RECORD (MsgBase)
- msg * : Msg;
- point * : gfx.Point;
-
- (* these parameters only valid for imHitFrame *)
- dimensions * : Dimensions;
- END; (* IMHitTest *)
-
- (*
- ** $VER: pointerclass.h 39.6 (15.2.93)
- **
- ** 'boopsi' pointer class interface
- *)
-
- (* The following tags are recognized at NewObject() time by
- * pointerclass:
- *
- * pointeraBitMap (BitMapPtr) - Pointer to bitmap to
- * get pointer imagery from. Bitplane data need not be
- * in chip RAM.
- * pointeraXOffset (LONG) - X-offset of the pointer hotspot.
- * pointeraYOffset (LONG) - Y-offset of the pointer hotspot.
- * pointeraWordWidth (ULONG) - designed width of the pointer in words
- * pointeraXResolution (ULONG) - one of the pointerXResn* flags below
- * pointeraYResolution (ULONG) - one of the pointerYResn* flags below
- *
- *)
-
- CONST
-
- pointeraDummy * = u.user + 039000H;
-
- pointeraBitMap * = pointeraDummy + 01H;
- pointeraXOffset * = pointeraDummy + 02H;
- pointeraYOffset * = pointeraDummy + 03H;
- pointeraWordWidth * = pointeraDummy + 04H;
- pointeraXResolution * = pointeraDummy + 05H;
- pointeraYResolution * = pointeraDummy + 06H;
-
- (* These are the choices for the pointeraXResolution attribute which
- * will determine what resolution pixels are used for this pointer.
- *
- * pointerXResnDefault (ECS-compatible pointer width)
- * = 70 ns if SUPERHIRES-type mode, 140 ns if not
- *
- * pointerXResnScreenRes
- * = Same as pixel speed of screen
- *
- * pointerXResnLores (pointer always in lores-like pixels)
- * = 140 ns in 15kHz modes, 70 ns in 31kHz modes
- *
- * pointerXResnHires (pointer always in hires-like pixels)
- * = 70 ns in 15kHz modes, 35 ns in 31kHz modes
- *
- * pointerXResn140ns (pointer always in 140 ns pixels)
- * = 140 ns always
- *
- * pointerXResn70ns (pointer always in 70 ns pixels)
- * = 70 ns always
- *
- * pointerXResn35ns (pointer always in 35 ns pixels)
- * = 35 ns always
- *)
-
- CONST
-
- pointerXResnDefault * = 0;
- pointerXResn140ns * = 1;
- pointerXResn70ns * = 2;
- pointerXResn35ns * = 3;
-
- pointerXResnScreenRes * = 4;
- pointerXResnLores * = 5;
- pointerXResnHires * = 6;
-
- (* These are the choices for the pointeraYResolution attribute which
- * will determine what vertical resolution is used for this pointer.
- *
- * pointerYResnDefault
- * = In 15 kHz modes, the pointer resolution will be the same
- * as a non-interlaced screen. In 31 kHz modes, the pointer
- * will be doubled vertically. This means there will be about
- * 200-256 pointer lines per screen.
- *
- * pointerYResnHigh
- * pointerYResnHighAspect
- * = Where the hardware/software supports it, the pointer resolution
- * will be high. This means there will be about 400-480 pointer
- * lines per screen. pointerYResnHighAspect also means that
- * when the pointer comes out double-height due to hardware/software
- * restrictions, its width would be doubled as well, if possible
- * (to preserve aspect).
- *
- * pointerYResnScreenRes
- * pointerYResnScreenResAspect
- * = Will attempt to match the vertical resolution of the pointer
- * to the screen's vertical resolution. pointerYResnScreenAspect also
- * means that when the pointer comes out double-height due to
- * hardware/software restrictions, its width would be doubled as well,
- * if possible (to preserve aspect).
- *
- *)
-
- CONST
-
- pointerYResnDefault * = 0;
- pointerYResnHigh * = 2;
- pointerYResnHighAspect * = 3;
- pointerYResnScreenRes * = 4;
- pointerYResnScreenResAspect * = 5;
-
- (* Compatibility note:
- *
- * The AA chipset supports variable sprite width and resolution, but
- * the setting of width and resolution is global for all sprites.
- * When no other sprites are in use, Intuition controls the sprite
- * width and sprite resolution for correctness based on pointerclass
- * attributes specified by the creator of the pointer. Intuition
- * controls sprite resolution with the vtagDefSpriteResnSet tag
- * to VideoControl(). Applications can override this on a per-viewport
- * basis with the vtagSpriteResnSet tag to VideoControl().
- *
- * If an application uses a sprite other than the pointer sprite,
- * Intuition will automatically regenerate the pointer sprite's image in
- * a compatible width. This might involve BitMap scaling of the imagery
- * you supply.
- *
- * If any sprites other than the pointer sprite were obtained with the
- * old GetSprite() call, Intuition assumes that the owner of those
- * sprites is unaware of sprite resolution, hence Intuition will set the
- * default sprite resolution (vtagDefSpriteResnSet) to ECS-compatible,
- * instead of as requested by the various pointerclass attributes.
- *
- * No resolution fallback occurs when applications use ExtSprites.
- * Such applications are expected to use vtagSpriteResnSet tag if
- * necessary.
- *
- * NB: Under release V39, only sprite width compatibility is implemented.
- * Sprite resolution compatibility was added for V40.
- *)
-
- (*
- ** $VER: intuitionbase.h 38.0 (12.6.91)
- **
- ** Public part of IntuitionBase structure and supporting structures
- *)
-
-
- CONST
-
- (* these are the display modes for which we have corresponding parameter
- * settings in the config arrays
- *)
- dModeCount * = 0002H; (* how many modes there are *)
- hiresPick * = 0000H;
- lowresPick * = 0001H;
-
- eventMax * = 10; (* size of event array *)
-
- (* these are the system Gadget defines *)
- resCount * = 2;
- hiresGadget * = 0;
- lowresGadget * = 1;
-
- gadgetCount * = 8;
- upFrontGadget * = 0;
- downBackGadget * = 1;
- sizeGadget * = 2;
- closeGadget * = 3;
- dragGadget * = 4;
- sUpFrontGadget * = 5;
- sDownBackGadget * = 6;
- sDragGadget * = 7;
-
- (* ======================================================================== *)
- (* === IntuitionBase ====================================================== *)
- (* ======================================================================== *)
- (*
- * Be sure to protect yourself against someone modifying these data as
- * you look at them. This is done by calling:
- *
- * lock = LockIBase(0), which returns a e.ULONgfx. When done call
- * UnlockIBase(lock) where lock is what LockIBase() returned.
- *)
-
- TYPE
-
- (* This structure is strictly READ ONLY *)
-
- IntuitionBasePtr * = POINTER TO IntuitionBase;
- IntuitionBase * = RECORD (e.LibraryBase)
- libNode - : e.Library;
- viewLord - : gfx.View;
-
- activeWindow - : WindowPtr;
- activeScreen - : ScreenPtr;
-
- (* the FirstScreen variable points to the frontmost Screen. Screens are
- * then maintained in a front to back order using Screen.NextScreen
- *)
- firstScreen - : ScreenPtr; (* for linked list of all screens *)
-
- ibFlags - : s.SET32; (* values are all system private *)
- mouseY -, mouseX - : INTEGER;
- (* note "backwards" order of these *)
-
- time - : t.TimeVal (* timestamp of most current input event *)
-
- (* I told you this was private.
- * The data beyond this point has changed, is changing, and
- * will continue to change.
- *)
- END; (* IntuitionBase *)
-
-
- (*-- Library Base variable --------------------------------------------*)
-
- VAR
-
- int *, base * : IntuitionBasePtr;
-
- CONST
-
- intuitionName * = "intuition.library";
-
- (*-- Library Functions ------------------------------------------------*)
-
- (* Boolean Parameters must be 4 Bytes long: *)
-
- TYPE
- LONGBOOL * = e.LONGBOOL;
-
- CONST
- LTRUE * = e.LTRUE;
- LFALSE * = e.LFALSE;
-
- (*
- ** $VER: intuition_protos.h 38.16 (28.8.92)
- *)
-
- (* Public functions OpenIntuition () and Intuition () are intentionally *)
- (* not documented. *)
-
- PROCEDURE OpenIntuition* [base,-30] ();
- PROCEDURE Intuition* [base,-36]
- ( iEvent [8] : ie.InputEventDummyPtr );
- PROCEDURE AddGadget* [base,-42]
- ( window [8] : WindowPtr;
- VAR gadget [9] : Gadget;
- position [0] : LONGINT )
- : e.UWORD;
- PROCEDURE ClearDMRequest* [base,-48]
- ( window [8] : WindowPtr )
- : BOOLEAN;
- PROCEDURE ClearMenuStrip* [base,-54]
- ( window [8] : WindowPtr );
- PROCEDURE ClearPointer* [base,-60]
- ( window [8] : WindowPtr );
- PROCEDURE CloseScreen* [base,-66]
- ( screen [8] : ScreenPtr )
- : BOOLEAN;
- PROCEDURE OldCloseScreen* [base,-66]
- ( screen [8] : ScreenPtr );
- PROCEDURE CloseWindow* [base,-72]
- ( window [8] : WindowPtr );
- PROCEDURE CloseWorkBench* [base,-78] ()
- : BOOLEAN;
- PROCEDURE CurrentTime* [base,-84]
- ( VAR seconds [8] : e.ULONG;
- VAR micros [9] : e.ULONG );
- PROCEDURE DisplayAlert* [base,-90]
- ( alertNumber [0] : e.ULONG;
- string [8] : ARRAY OF CHAR;
- height [1] : LONGINT )
- : BOOLEAN;
- PROCEDURE DisplayBeep* [base,-96]
- ( screen [8] : ScreenPtr );
- PROCEDURE DoubleClick* [base,-102]
- ( sSeconds [0] : e.ULONG;
- sMicros [1] : e.ULONG;
- cSeconds [2] : e.ULONG;
- cMicros [3] : e.ULONG )
- : BOOLEAN;
- PROCEDURE DrawBorder* [base,-108]
- ( rp [8] : gfx.RastPortPtr;
- border [9] : BorderPtr;
- leftOffset [0] : LONGINT;
- topOffset [1] : LONGINT );
- PROCEDURE DrawImage* [base,-114]
- ( rp [8] : gfx.RastPortPtr;
- VAR image [9] : Image;
- leftOffset [0] : LONGINT;
- topOffset [1] : LONGINT );
- PROCEDURE EndRequest* [base,-120]
- ( requester [8] : RequesterPtr;
- window [9] : WindowPtr );
- PROCEDURE GetDefPrefs* [base,-126]
- ( VAR preferences [8] : ARRAY OF SYS.BYTE;
- size [0] : LONGINT );
- PROCEDURE GetPrefs* [base,-132]
- ( VAR preferences [8] : ARRAY OF SYS.BYTE;
- size [0] : LONGINT );
- PROCEDURE InitRequester* [base,-138]
- ( VAR requester [8] : Requester );
- PROCEDURE ItemAddress* [base,-144]
- ( VAR menuStrip [8] : Menu;
- menuNumber [0] : LONGINT )
- : MenuItemPtr;
- PROCEDURE ModifyIDCMP* [base,-150]
- ( window [8] : WindowPtr;
- flags [0] : s.SET32 )
- : BOOLEAN;
- PROCEDURE OldModifyIDCMP* [base,-150]
- ( window [8] : WindowPtr;
- flags [0] : s.SET32 );
- PROCEDURE ModifyProp* [base,-156]
- ( VAR gadget [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr;
- flags [0] : s.SET16;
- horizPot [1] : LONGINT;
- vertPot [2] : LONGINT;
- horizBody [3] : LONGINT;
- vertBody [4] : LONGINT );
- PROCEDURE MoveScreen* [base,-162]
- ( screen [8] : ScreenPtr;
- dx [0] : LONGINT;
- dy [1] : LONGINT );
- PROCEDURE MoveWindow* [base,-168]
- ( window [8] : WindowPtr;
- dx [0] : LONGINT;
- dy [1] : LONGINT );
- PROCEDURE OffGadget* [base,-174]
- ( VAR gadget [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr );
- PROCEDURE OffMenu* [base,-180]
- ( window [8] : WindowPtr;
- menuNumber [0] : e.ULONG );
- PROCEDURE OnGadget* [base,-186]
- ( VAR gadget [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr );
- PROCEDURE OnMenu* [base,-192]
- ( window [8] : WindowPtr;
- menuNumber [0] : e.ULONG );
- PROCEDURE OpenScreen* [base,-198]
- ( VAR newScreen [8] : NewScreenBase )
- : ScreenPtr;
- PROCEDURE OpenWindow* [base,-204]
- ( VAR newWindow [8] : NewWindowBase )
- : WindowPtr;
- PROCEDURE OpenWorkBench* [base,-210] ()
- : ScreenPtr;
- PROCEDURE PrintIText* [base,-216]
- ( rp [8] : gfx.RastPortPtr;
- VAR iText [9] : IntuiText;
- left [0] : LONGINT;
- top [1] : LONGINT );
- PROCEDURE RefreshGadgets* [base,-222]
- ( gadgets [8] : GadgetPtr;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr );
- PROCEDURE RemoveGadget* [base,-228]
- ( window [8] : WindowPtr;
- VAR gadget [9] : Gadget )
- : e.UWORD;
-
- (* The official calling sequence for ReportMouse is given below. *)
- (* Note the register order. For the complete story; read the ReportMouse *)
- (* autodoc. *)
-
- PROCEDURE ReportMouse* [base,-234]
- ( window [8] : WindowPtr;
- flag [0] : e.LBOOL );
- PROCEDURE Request* [base,-240]
- ( requester [8] : RequesterPtr;
- window [9] : WindowPtr )
- : BOOLEAN;
- PROCEDURE ScreenToBack* [base,-246]
- ( screen [8] : ScreenPtr );
- PROCEDURE ScreenToFront* [base,-252]
- ( screen [8] : ScreenPtr );
- PROCEDURE SetDMRequest* [base,-258]
- ( window [8] : WindowPtr;
- requester [9] : RequesterPtr )
- : BOOLEAN;
- PROCEDURE SetMenuStrip* [base,-264]
- ( window [8] : WindowPtr;
- VAR menu [9] : Menu )
- : BOOLEAN;
- PROCEDURE SetPointer* [base,-270]
- ( window [8] : WindowPtr;
- pointer [9] : ARRAY OF SYS.BYTE;
- height [0] : LONGINT;
- width [1] : LONGINT;
- xOffset [2] : LONGINT;
- yOffset [3] : LONGINT );
- PROCEDURE SetWindowTitles* [base,-276]
- ( window [8] : WindowPtr;
- windowTitle [9] : e.LSTRPTR;
- screenTitle [10] : e.LSTRPTR );
- PROCEDURE SetWindowTitlesStr* [base,-276]
- ( window [8] : WindowPtr;
- windowTitle [9] : ARRAY OF CHAR;
- screenTitle [10] : ARRAY OF CHAR );
- PROCEDURE ShowTitle* [base,-282]
- ( screen [8] : ScreenPtr;
- showIt [0] : e.LBOOL );
- PROCEDURE SizeWindow* [base,-288]
- ( window [8] : WindowPtr;
- dx [0] : LONGINT;
- dy [1] : LONGINT );
- PROCEDURE ViewAddress* [base,-294] ()
- : gfx.ViewPtr;
- PROCEDURE ViewPortAddress* [base,-300]
- ( window [8] : WindowPtr )
- : gfx.ViewPortPtr;
- PROCEDURE WindowToBack* [base,-306]
- ( window [8] : WindowPtr );
- PROCEDURE WindowToFront* [base,-312]
- ( window [8] : WindowPtr );
- PROCEDURE WindowLimits* [base,-318]
- ( window [8] : WindowPtr;
- widthMin [0] : LONGINT;
- heightMin [1] : LONGINT;
- widthMax [2] : LONGINT;
- heightMax [3] : LONGINT )
- : BOOLEAN;
-
- (* --- start of next generation of names -------------------------------------*)
-
- PROCEDURE SetPrefs* [base,-324]
- ( preferences [8] : ARRAY OF SYS.BYTE;
- size [0] : LONGINT;
- inform [1] : e.LBOOL );
-
- (* --- start of next next generation of names --------------------------------*)
-
- PROCEDURE IntuiTextLength* [base,-330]
- ( VAR iText [8] : IntuiText )
- : INTEGER;
- PROCEDURE WBenchToBack* [base,-336] ()
- : BOOLEAN;
- PROCEDURE WBenchToFront* [base,-342] ()
- : BOOLEAN;
-
- (* --- start of next next next generation of names ---------------------------*)
-
- PROCEDURE AutoRequest* [base,-348]
- ( window [8] : WindowPtr;
- body [9] : IntuiTextPtr;
- posText [10] : IntuiTextPtr;
- negText [11] : IntuiTextPtr;
- pFlag [0] : s.SET32;
- nFlag [1] : s.SET32;
- width [2] : LONGINT;
- height [3] : LONGINT )
- : BOOLEAN;
- PROCEDURE BeginRefresh* [base,-354]
- ( window [8] : WindowPtr );
- PROCEDURE BuildSysRequest* [base,-360]
- ( window [8] : WindowPtr;
- body [9] : IntuiTextPtr;
- posText [10] : IntuiTextPtr;
- negText [11] : IntuiTextPtr;
- flags [0] : s.SET32;
- width [1] : LONGINT;
- height [2] : LONGINT )
- : WindowPtr;
- PROCEDURE EndRefresh* [base,-366]
- ( window [8] : WindowPtr;
- complete [0] : e.LBOOL );
- PROCEDURE FreeSysRequest* [base,-372]
- ( window [8] : WindowPtr );
- PROCEDURE MakeScreen* [base,-378]
- ( screen [8] : ScreenPtr );
- PROCEDURE RemakeDisplay* [base,-384] ();
- PROCEDURE RethinkDisplay* [base,-390] ();
-
- (* --- start of next next next next generation of names ----------------------*)
-
- PROCEDURE AllocRemember* [base,-396]
- ( VAR rememberKey [8] : RememberPtr;
- size [0] : e.ULONG;
- flags [1] : s.SET32 )
- : e.APTR;
-
- (* Public function AlohaWorkbench () is intentionally not documented *)
-
- PROCEDURE AlohaWorkbench* [base,-402]
- ( wbport [8] : e.MsgPortPtr );
- PROCEDURE FreeRemember* [base,-408]
- ( VAR rememberPtr [8] : RememberPtr;
- reallyForget [0] : e.LBOOL );
-
- (* --- start of 15 Nov 85 names ------------------------*)
-
- PROCEDURE LockIBase* [base,-414]
- ( dontknow [0] : e.ULONG )
- : e.ULONG;
- PROCEDURE UnlockIBase* [base,-420]
- ( ibLock [8] : e.ULONG );
-
- (* --- functions in V33 or higher (distributed as Release 1.2) ---*)
-
- PROCEDURE GetScreenData* [base,-426]
- ( VAR buffer [8] : Screen;
- size [0] : e.ULONG;
- type [1] : s.SET16;
- screen [9] : ScreenPtr )
- : BOOLEAN;
- PROCEDURE RefreshGList* [base,-432]
- ( gadgets [8] : GadgetPtr;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr;
- numGad [0] : LONGINT );
- PROCEDURE AddGList* [base,-438]
- ( window [8] : WindowPtr;
- gadget [9] : GadgetPtr;
- position [0] : LONGINT;
- numGad [1] : LONGINT;
- requester [10] : RequesterPtr )
- : e.UWORD;
- PROCEDURE RemoveGList* [base,-444]
- ( remPtr [8] : WindowPtr;
- gadget [9] : GadgetPtr;
- numGad [0] : LONGINT )
- : e.UWORD;
- PROCEDURE ActivateWindow* [base,-450]
- ( window [8] : WindowPtr );
- PROCEDURE RefreshWindowFrame* [base,-456]
- ( window [8] : WindowPtr );
- PROCEDURE ActivateGadget* [base,-462]
- ( VAR gadgets [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr )
- : BOOLEAN;
- PROCEDURE NewModifyProp* [base,-468]
- ( VAR gadget [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr;
- flags [0] : s.SET16;
- horizPot [1] : LONGINT;
- vertPot [2] : LONGINT;
- horizBody [3] : LONGINT;
- vertBody [4] : LONGINT;
- numGad [5] : LONGINT );
-
- (* --- functions in V36 or higher (distributed as Release 2.0) ---*)
-
- PROCEDURE QueryOverscan* [base,-474]
- ( displayID [8] : e.ULONG;
- VAR rect [9] : gfx.Rectangle;
- oScanType [0] : LONGINT )
- : LONGINT;
- PROCEDURE MoveWindowInFrontOf* [base,-480]
- ( window [8] : WindowPtr;
- behindWindow [9] : WindowPtr );
- PROCEDURE ChangeWindowBox* [base,-486]
- ( window [8] : WindowPtr;
- left [0] : LONGINT;
- top [1] : LONGINT;
- width [2] : LONGINT;
- height [3] : LONGINT );
- PROCEDURE SetEditHook* [base,-492]
- ( hook [8] : u.HookPtr )
- : u.HookPtr;
- PROCEDURE SetMouseQueue* [base,-498]
- ( window [8] : WindowPtr;
- queueLength [0] : LONGINT )
- : LONGINT;
- PROCEDURE ZipWindow* [base,-504]
- ( window [8] : WindowPtr );
-
- (* --- public screens ---*)
-
- PROCEDURE LockPubScreen* [base,-510]
- ( name [8] : ARRAY OF CHAR )
- : ScreenPtr;
- PROCEDURE UnlockPubScreen* [base,-516]
- ( name [8] : ARRAY OF CHAR;
- screen [9] : ScreenPtr );
- PROCEDURE LockPubScreenList* [base,-522] ()
- : e.ListPtr;
- PROCEDURE UnlockPubScreenList* [base,-528] ();
- PROCEDURE NextPubScreen* [base,-534]
- ( screen [8] : ScreenPtr;
- VAR nameBuf [9] : ARRAY OF CHAR )
- : e.LSTRPTR;
- PROCEDURE SetDefaultPubScreen* [base,-540]
- ( name [8] : ARRAY OF CHAR );
- PROCEDURE SetPubScreenModes* [base,-546]
- ( modes [0] : s.SET16 )
- : s.SET16;
- PROCEDURE PubScreenStatus* [base,-552]
- ( screen [8] : ScreenPtr;
- statusFlags [0] : s.SET16 )
- : s.SET16;
-
- PROCEDURE ObtainGIRPort* [base,-558]
- ( gInfo [8] : GadgetInfoPtr )
- : gfx.RastPortPtr;
- PROCEDURE ReleaseGIRPort* [base,-564]
- ( rp [8] : gfx.RastPortPtr );
- PROCEDURE GadgetMouse* [base,-570]
- ( VAR gadget [8] : Gadget;
- gInfo [9] : GadgetInfoPtr;
- VAR mousePoint [10] : gfx.Point );
- PROCEDURE GetDefaultPubScreen* [base,-582]
- ( VAR nameBuffer [8] : ARRAY OF CHAR );
- PROCEDURE EasyRequestArgs* [base,-588]
- ( window [8] : WindowPtr;
- easyStruct [9] : EasyStructPtr;
- idcmpPtr [10] : e.APTR;
- args [11] : e.APTR )
- : LONGINT;
- PROCEDURE EasyRequest* [base,-588]
- ( window [8] : WindowPtr;
- easyStruct [9] : EasyStructPtr;
- idcmpPtr [10] : e.APTR;
- args [11].. : SYS.LONGWORD )
- : LONGINT;
- PROCEDURE BuildEasyRequestArgs* [base,-594]
- ( window [8] : WindowPtr;
- easyStruct [9] : EasyStructPtr;
- idcmp [0] : s.SET32;
- args [10] : e.APTR )
- : WindowPtr;
- PROCEDURE BuildEasyRequest* [base,-594]
- ( window [8] : WindowPtr;
- easyStruct [9] : EasyStructPtr;
- idcmp [0] : s.SET32;
- args [10].. : SYS.LONGWORD )
- : WindowPtr;
- PROCEDURE SysReqHandler* [base,-600]
- ( window [8] : WindowPtr;
- idcmpPtr [9] : e.APTR;
- waitInput [0] : e.LBOOL )
- : LONGINT;
- PROCEDURE OpenWindowTagList* [base,-606]
- ( VAR newWindow [8] : NewWindowBase;
- tagList [9] : ARRAY OF u.TagItem )
- : WindowPtr;
- PROCEDURE OpenWindowTags* [base,-606]
- ( VAR newWindow [8] : NewWindowBase;
- tagList [9].. : u.Tag )
- : WindowPtr;
- PROCEDURE OpenWindowTagListA* [base,-606]
- ( newWindow [8] : NewWindowBasePtr;
- tagList [9] : ARRAY OF u.TagItem )
- : WindowPtr;
- PROCEDURE OpenWindowTagsA* [base,-606]
- ( newWindow [8] : NewWindowBasePtr;
- tagList [9].. : u.Tag )
- : WindowPtr;
- PROCEDURE OpenScreenTagList* [base,-612]
- ( VAR newScreen [8] : NewScreenBase;
- tagList [9] : ARRAY OF u.TagItem )
- : ScreenPtr;
- PROCEDURE OpenScreenTags* [base,-612]
- ( VAR newScreen [8] : NewScreenBase;
- tagList [9].. : u.Tag )
- : ScreenPtr;
- PROCEDURE OpenScreenTagListA* [base,-612]
- ( newScreen [8] : NewScreenBasePtr;
- tagList [9] : ARRAY OF u.TagItem )
- : ScreenPtr;
- PROCEDURE OpenScreenTagsA* [base,-612]
- ( newScreen [8] : NewScreenBasePtr;
- tagList [9].. : u.Tag )
- : ScreenPtr;
-
- (* new Image functions *)
-
- PROCEDURE DrawImageState* [base,-618]
- ( rp [8] : gfx.RastPortPtr;
- VAR image [9] : Image;
- leftOffset [0] : LONGINT;
- topOffset [1] : LONGINT;
- state [2] : e.ULONG;
- drawInfo [10] : DrawInfoPtr );
- PROCEDURE PointInImageL* [base,-624]
- ( point [0] : e.ULONG;
- VAR image [8] : Image )
- : BOOLEAN;
- PROCEDURE EraseImage* [base,-630]
- ( rp [8] : gfx.RastPortPtr;
- VAR image [9] : Image;
- leftOffset [0] : LONGINT;
- topOffset [1] : LONGINT );
-
- PROCEDURE NewObjectA* [base,-636]
- ( classPtr [8] : IClassPtr;
- classID [9] : ARRAY OF CHAR;
- tagList [10] : ARRAY OF u.TagItem )
- : e.APTR;
- PROCEDURE NewObject* [base,-636]
- ( classPtr [8] : IClassPtr;
- classID [9] : ARRAY OF CHAR;
- tagList [10].. : u.Tag )
- : e.APTR;
-
- PROCEDURE DisposeObject* [base,-642]
- ( object [8] : e.APTR );
- PROCEDURE SetAttrsA* [base,-648]
- ( object [8] : e.APTR;
- tagList [9] : ARRAY OF u.TagItem )
- : e.ULONG;
- PROCEDURE SetAttrs* [base,-648]
- ( object [8] : e.APTR;
- tagList [9].. : u.Tag )
- : e.ULONG;
-
- PROCEDURE GetAttr* [base,-654]
- ( attrID [0] : e.ULONG;
- object [8] : e.APTR;
- VAR storage [9] : ARRAY OF SYS.BYTE )
- : e.ULONG;
-
- (* special set attribute call for gadgets *)
-
- PROCEDURE SetGadgetAttrsA* [base,-660]
- ( VAR gadget [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr;
- tagList [11] : ARRAY OF u.TagItem )
- : e.ULONG;
- PROCEDURE SetGadgetAttrs* [base,-660]
- ( VAR gadget [8] : Gadget;
- window [9] : WindowPtr;
- requester [10] : RequesterPtr;
- tagList [11].. : u.Tag )
- : e.ULONG;
-
- (* for class implementors only *)
-
- PROCEDURE NextObject* [base,-666]
- ( VAR objectPtr [8] : ObjectPtr )
- : e.APTR;
- PROCEDURE FindClass* [base,-672]
- ( classID [8] : ARRAY OF CHAR)
- : IClassPtr;
- PROCEDURE MakeClass* [base,-678]
- ( classID [8] : ARRAY OF CHAR;
- superClassID [9] : ARRAY OF CHAR;
- superClassPtr [10] : IClassPtr;
- instanceSize [0] : LONGINT;
- flags [1] : s.SET32 )
- : IClassPtr;
- PROCEDURE AddClass* [base,-684]
- ( classPtr [8] : IClassPtr );
-
-
- PROCEDURE GetScreenDrawInfo* [base,-690]
- ( screen [8] : ScreenPtr ) : DrawInfoPtr;
- PROCEDURE FreeScreenDrawInfo* [base,-696]
- ( screen [8] : ScreenPtr;
- drawInfo [9] : DrawInfoPtr );
-
- PROCEDURE ResetMenuStrip* [base,-702]
- ( window [8] : WindowPtr;
- VAR menu [9] : Menu )
- : BOOLEAN;
- PROCEDURE RemoveClass* [base,-708]
- ( classPtr [8] : IClassPtr );
- PROCEDURE FreeClass* [base,-714]
- ( classPtr [8] : IClassPtr )
- : BOOLEAN;
-
- (*--- functions in V39 or higher (Release 3) ---*)
-
- PROCEDURE AllocScreenBuffer* [base,-768]
- ( sc [8] : ScreenPtr;
- bm [9] : gfx.BitMapPtr;
- flags [0] : s.SET32 )
- : ScreenBufferPtr;
- PROCEDURE FreeScreenBuffer* [base,-774]
- ( sc [8] : ScreenPtr;
- sb [9] : ScreenBufferPtr );
- PROCEDURE ChangeScreenBuffer* [base,-780]
- ( sc [8] : ScreenPtr;
- sb [9] : ScreenBufferPtr )
- : BOOLEAN;
- PROCEDURE ScreenDepth* [base,-786]
- ( screen [8] : ScreenPtr;
- flags [0] : s.SET32;
- reserved [9] : e.APTR );
- PROCEDURE ScreenPosition* [base,-792]
- ( screen [8] : ScreenPtr;
- flags [0] : s.SET32;
- x1 [1] : LONGINT;
- y1 [2] : LONGINT;
- x2 [3] : LONGINT;
- y2 [4] : LONGINT );
- PROCEDURE ScrollWindowRaster* [base,-798]
- ( win [9] : WindowPtr;
- dx [0] : LONGINT;
- dy [1] : LONGINT;
- xMin [2] : LONGINT;
- yMin [3] : LONGINT;
- xMax [4] : LONGINT;
- yMax [5] : LONGINT );
- PROCEDURE LendMenus* [base,-804]
- ( fromwindow [8] : WindowPtr;
- towindow [9] : WindowPtr );
- PROCEDURE DoGadgetMethodA* [base,-810]
- ( gad [8] : GadgetPtr;
- win [9] : WindowPtr;
- req [10] : RequesterPtr;
- VAR message [11] : MsgBase )
- : e.ULONG;
- PROCEDURE DoGadgetMethod* [base,-810]
- ( gad [8] : GadgetPtr;
- win [9] : WindowPtr;
- req [10] : RequesterPtr;
- message [11]..: SYS.LONGWORD )
- : e.ULONG;
- PROCEDURE SetWindowPointerA* [base,-816]
- ( win [8] : WindowPtr;
- taglist [9] : ARRAY OF u.TagItem );
- PROCEDURE SetWindowPointer* [base,-816]
- ( win [8] : WindowPtr;
- taglist [9]..: u.Tag );
- PROCEDURE TimedDisplayAlert* [base,-822]
- ( alertNumber [0] : e.ULONG;
- string [8] : ARRAY OF CHAR;
- height [1] : e.ULONG;
- time [9] : e.ULONG )
- : BOOLEAN;
- PROCEDURE HelpControl* [base,-828]
- ( win [8] : WindowPtr;
- flags [0] : s.SET32 );
-
- (*---------------------------------------------------------------------*)
-
- <*$LongVars+*>
-
- PROCEDURE [0] PointInImage * (point: gfx.Point; VAR image: Image): BOOLEAN;
- BEGIN
- RETURN PointInImageL(SYS.VAL(LONGINT,point),image);
- END PointInImage;
-
- (*-- C Macros defined as procedures -----------------------------------*)
-
- (*-----------------------------------*)
- PROCEDURE [0] MenuNum * (n : INTEGER) : INTEGER;
-
- BEGIN (* MenuNum *)
- RETURN SYS.AND (n, 01FH)
- END MenuNum;
-
- (*-----------------------------------*)
- PROCEDURE [0] ItemNum * (n : INTEGER) : INTEGER;
-
- BEGIN (* ItemNum *)
- RETURN SYS.AND (SYS.LSH (n, -5), 03FH)
- END ItemNum;
-
- (*-----------------------------------*)
- PROCEDURE [0] SubNum * (n : INTEGER) : INTEGER;
-
- BEGIN (* SubNum *)
- RETURN SYS.AND (SYS.LSH (n, -11), 01FH)
- END SubNum;
-
- (*-----------------------------------*)
- PROCEDURE [0] ShiftMenu * (n : INTEGER) : INTEGER;
-
- BEGIN (* ShiftMenu *)
- RETURN SYS.AND (n, 01FH)
- END ShiftMenu;
-
- (*-----------------------------------*)
- PROCEDURE [0] ShiftItem * (n : INTEGER) : INTEGER;
-
- BEGIN (* ShiftItem *)
- RETURN SYS.LSH (SYS.AND (n, 03FH), 5)
- END ShiftItem;
-
- (*-----------------------------------*)
- PROCEDURE [0] ShiftSub * (n : INTEGER) : INTEGER;
-
- BEGIN (* ShiftSub *)
- RETURN SYS.LSH (SYS.AND (n, 01FH), 11)
- END ShiftSub;
-
- (*-----------------------------------*)
- PROCEDURE [0] FullMenuNum * (menu, item, sub : INTEGER) : INTEGER;
-
- BEGIN (* FullMenuNum *)
- RETURN ShiftMenu (menu) + ShiftItem (item) + ShiftSub (sub)
- END FullMenuNum;
-
- (*------------------------------------*)
- PROCEDURE [0] SRBNum * ( n : e.UBYTE ) : SHORTINT;
- (* SerRWBits -> read bits per char *)
- BEGIN (* SRBNum *)
- RETURN (8 - SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
- END SRBNum;
-
- (*------------------------------------*)
- PROCEDURE [0] SWBNum * ( n : e.UBYTE ) : SHORTINT;
- (* SerRWBits -> write bits per chr *)
- BEGIN (* SWBNum *)
- RETURN (8 - SYS.VAL (SHORTINT, SYS.AND (n, 0FH)))
- END SWBNum;
-
-
- (*------------------------------------*)
- PROCEDURE [0] SSBNum * ( n : e.UBYTE ) : SHORTINT;
- (* SerStopBuf -> stop bits per chr *)
- BEGIN (* SSBNum *)
- RETURN (1 + SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
- END SSBNum;
-
-
- (*------------------------------------*)
- PROCEDURE [0] SPARNum * ( n : e.UBYTE ) : SHORTINT;
- (* SerParShk -> parity setting *)
- BEGIN (* SPARNum *)
- RETURN SYS.LSH (n, -4)
- END SPARNum;
-
-
- (*------------------------------------*)
- PROCEDURE [0] SHAKNum * ( n : e.UBYTE ) : SHORTINT;
- (* SerParShk -> handshake mode *)
- BEGIN (* SHAKNum *)
- RETURN SYS.AND (n, 0FH)
- END SHAKNum;
-
- (* some convenient macros and casts *)
-
- (*-----------------------------------*)
- PROCEDURE [0] GadgetBox * (VAR g : Gadget) : IBoxPtr;
-
- BEGIN (* GadgetBox *)
- RETURN SYS.ADR (g.leftEdge)
- END GadgetBox;
-
- (*-----------------------------------*)
- PROCEDURE [0] IMBox * (VAR im : Image) : IBoxPtr;
-
- BEGIN (* IMBox *)
- RETURN SYS.ADR (im.leftEdge)
- END IMBox;
-
- (*-----------------------------------*)
- PROCEDURE [0] FGPen * (VAR im : Image) : SHORTINT;
-
- BEGIN (* FGPen *)
- RETURN SYS.VAL (SHORTINT, im.planePick)
- END FGPen;
-
- (*-----------------------------------*)
- PROCEDURE [0] BGPen * (VAR im : Image) : SHORTINT;
-
- BEGIN (* BGPen *)
- RETURN SYS.VAL (SHORTINT, im.planeOnOff)
- END BGPen;
-
- (*-----------------------------------*)
- PROCEDURE [0] CustomHook * (VAR gadget : Gadget) : u.HookPtr;
- (* this casts MutualExclude for easy assignment of a hook
- * pointer to the unused MutualExclude field of a custom gadget
- *)
-
- BEGIN (* CustomHook *)
- RETURN SYS.VAL (u.HookPtr, gadget.mutualExclude)
- END CustomHook;
-
- (* convert BOOLEANs to LONGBOOLs *)
-
- PROCEDURE [0] BoolToLong*(b: BOOLEAN): LONGBOOL;
- BEGIN
- IF b THEN RETURN LTRUE ELSE RETURN LFALSE END
- END BoolToLong;
-
- (* Convert pseudo unsigned integers (like those within PropInfo) to
- * LONGINTs and vice versa:
- *)
-
- PROCEDURE [0] UIntToLong*(i : INTEGER): LONGINT;
- BEGIN
- IF i<0 THEN RETURN i+10000H
- ELSE RETURN i
- END;
- END UIntToLong;
-
-
- PROCEDURE [0] LongToUInt*(l : LONGINT): INTEGER;
- BEGIN
- <*$ < RangeChk- *> (* just return lower Word *)
- RETURN SHORT(l)
- <*$ > *>
- END LongToUInt;
-
-
- (*-----------------------------------------------------------------------*)
- (*
- * The following procedures are implemented for to avoid using SYSTEM within
- * Oberon programs.
- *)
-
- PROCEDURE [0] ScreenToRastPort*(s : ScreenPtr): gfx.RastPortPtr;
- BEGIN
- RETURN SYS.ADR(s.rastPort);
- END ScreenToRastPort;
-
- PROCEDURE [0] ScreenToViewPort*(s : ScreenPtr): gfx.ViewPortPtr;
- BEGIN RETURN SYS.ADR(s.viewPort);
- END ScreenToViewPort;
-
- (*-- Library Base variable --------------------------------------------*)
-
- <*$LongVars-*>
-
- PROCEDURE* [0] Close (VAR rc : LONGINT);
-
- BEGIN (* Close *)
- IF base # NIL THEN e.CloseLibrary (base) END
- END Close;
-
- BEGIN (* Library *)
- base := SYS.VAL (IntuitionBasePtr,
- e.OpenLibrary (intuitionName, e.libraryMinimum));
- IF base = NIL THEN HALT (100) END;
- int := base; Kernel.SetCleanup (Close)
- END Intuition.
-
-