home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / a / asm_one / asm-onev1.25c.dms / in.adf / Release3.0 / Include3.0.lha / Include3.0 / intuition / intuition.i < prev    next >
Encoding:
Text File  |  1992-09-24  |  60.3 KB  |  1,607 lines

  1.     IFND    INTUITION_INTUITION_I
  2. INTUITION_INTUITION_I    SET    1
  3. **
  4. **    $VER: intuition.i 38.20 (28.08.92)
  5. **    Includes Release 39.108
  6. **
  7. **    Interface definitions for Intuition applications
  8. **
  9. **    (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND EXEC_TYPES_I
  14.     INCLUDE "exec/types.i"
  15.     ENDC
  16.  
  17.     IFND    GRAPHICS_GFX_I
  18.     INCLUDE    "graphics/gfx.i"
  19.     ENDC
  20.  
  21.     IFND    GRAPHICS_CLIP_I
  22.     INCLUDE    "graphics/clip.i"
  23.     ENDC
  24.  
  25.     IFND    GRAPHICS_VIEW_I
  26.     INCLUDE    "graphics/view.i"
  27.     ENDC
  28.  
  29.     IFND    GRAPHICS_RASTPORT_I
  30.     INCLUDE    "graphics/rastport.i"
  31.     ENDC
  32.  
  33.     IFND    GRAPHICS_LAYERS_I
  34.     INCLUDE    "graphics/layers.i"
  35.     ENDC
  36.  
  37.     IFND    GRAPHICS_TEXT_I
  38.     INCLUDE "graphics/text.i"
  39.     ENDC
  40.  
  41.     IFND EXEC_PORTS_I
  42.     INCLUDE "exec/ports.i"
  43.     ENDC
  44.  
  45.     IFND    DEVICES_TIMER_I
  46.     INCLUDE    "devices/timer.i"
  47.     ENDC
  48.  
  49.     IFND    DEVICES_INPUTEVENT_I
  50.     INCLUDE "devices/inputevent.i"
  51.     ENDC
  52.  
  53.     IFND UTILITY_TAGITEM_I
  54.     INCLUDE "utility/tagitem.i"
  55.     ENDC
  56.  
  57. *
  58. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  59. *
  60.  
  61.  
  62. ; ========================================================================;
  63. ; === Menu ===============================================================;
  64. ; ========================================================================;
  65.  STRUCTURE Menu,0
  66.  
  67.     APTR  mu_NextMenu    ; menu pointer, same level
  68.     WORD mu_LeftEdge    ; position of the select box
  69.     WORD mu_TopEdge    ; position of the select box
  70.     WORD mu_Width    ; dimensions of the select box
  71.     WORD mu_Height    ; dimensions of the select box
  72.     WORD mu_Flags    ; see flag definitions below
  73.     APTR mu_MenuName    ; text for this Menu Header
  74.     APTR  mu_FirstItem    ; pointer to first in chain
  75.  
  76.     ; these mysteriously-named variables are for internal use only
  77.     WORD mu_JazzX
  78.     WORD mu_JazzY
  79.     WORD mu_BeatX
  80.     WORD mu_BeatY
  81.  
  82.     LABEL mu_SIZEOF
  83.  
  84. ;*** FLAGS SET BY BOTH THE APPLIPROG AND INTUITION ***
  85. MENUENABLED EQU $0001    ; whether or not this menu is enabled
  86.  
  87. ;*** FLAGS SET BY INTUITION ***
  88. MIDRAWN EQU $0100    ; this menu's items are currently drawn
  89.  
  90. ; ========================================================================;
  91. ; === MenuItem ===========================================================;
  92. ; ========================================================================;
  93.  STRUCTURE MenuItem,0
  94.  
  95.     APTR mi_NextItem    ; pointer to next in chained list
  96.     WORD mi_LeftEdge    ; position of the select box
  97.     WORD mi_TopEdge    ; position of the select box
  98.     WORD mi_Width    ; dimensions of the select box
  99.     WORD mi_Height    ; dimensions of the select box
  100.     WORD mi_Flags    ; see the defines below
  101.  
  102.     LONG mi_MutualExclude ; set bits mean this item excludes that item
  103.  
  104.     APTR mi_ItemFill    ; points to Image, IntuiText, or NULL
  105.  
  106.     ; when this item is pointed to by the cursor and the items highlight
  107.     ; mode HIGHIMAGE is selected, this alternate image will be displayed
  108.     APTR mi_SelectFill    ; points to Image, IntuiText, or NULL
  109.  
  110.     BYTE mi_Command    ; only if appliprog sets the COMMSEQ flag
  111.  
  112.     BYTE mi_KludgeFill00 ; This is strictly for word-alignment
  113.  
  114.     APTR mi_SubItem    ; if non-zero, points to MenuItem for submenu
  115.  
  116.    ; The NextSelect field represents the menu number of next selected 
  117.    ; item (when user has drag-selected several items)
  118.     WORD mi_NextSelect
  119.  
  120.     LABEL  mi_SIZEOF
  121.  
  122. ; --- FLAGS SET BY THE APPLIPROG --------------------------------------------
  123. CHECKIT        EQU $0001    ; set to indicate checkmarkable item
  124. ITEMTEXT    EQU $0002    ; set if textual, clear if graphical item
  125. COMMSEQ        EQU $0004    ; set if there's an command sequence
  126. MENUTOGGLE    EQU $0008    ; set for toggling checks (else mut. exclude)
  127. ITEMENABLED    EQU $0010    ; set if this item is enabled
  128.  
  129. ; these are the SPECIAL HIGHLIGHT FLAG state meanings
  130. HIGHFLAGS    EQU $00C0    ; see definitions below for these bits
  131. HIGHIMAGE    EQU $0000    ; use the user's "select image"
  132. HIGHCOMP    EQU $0040    ; highlight by complementing the select box
  133. HIGHBOX        EQU $0080    ; highlight by drawing a box around the image
  134. HIGHNONE    EQU $00C0    ; don't highlight
  135.  
  136. ; --- FLAGS SET BY BOTH APPLIPROG AND INTUITION -----------------------------
  137. CHECKED    EQU $0100    ; state of the checkmark
  138.  
  139.  
  140. ; --- FLAGS SET BY INTUITION ------------------------------------------------
  141. ISDRAWN        EQU $1000    ; this item's subs are currently drawn
  142. HIGHITEM    EQU $2000    ; this item is currently highlighted
  143. MENUTOGGLED    EQU $4000    ; this item was already toggled 
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150. ; ========================================================================
  151. ; === Requester ==========================================================
  152. ; ========================================================================
  153.  STRUCTURE Requester,0
  154.  
  155.     APTR  rq_OlderRequest
  156.     WORD rq_LeftEdge        ; dimensions of the entire box
  157.     WORD rq_TopEdge        ; dimensions of the entire box
  158.     WORD rq_Width        ; dimensions of the entire box
  159.     WORD rq_Height        ; dimensions of the entire box
  160.  
  161.     WORD rq_RelLeft        ; get POINTREL Pointer relativity offsets
  162.     WORD rq_RelTop        ; get POINTREL Pointer relativity offsets
  163.  
  164.     APTR  rq_ReqGadget         ; pointer to the first of a list of gadgets
  165.     APTR  rq_ReqBorder        ; the box's border
  166.     APTR  rq_ReqText        ; the box's text
  167.  
  168.     WORD  rq_Flags        ; see definitions below
  169.  
  170.     UBYTE rq_BackFill        ; pen number for back-plane fill before draws
  171.  
  172.     BYTE rq_KludgeFill00    ; This is strictly for word-alignment
  173.  
  174.     APTR rq_ReqLayer        ; layer in which requester rendered
  175.     STRUCT rq_ReqPad1,32    ; for backwards compatibility (reserved)
  176.  
  177.     ; If the BitMap plane pointers are non-zero, this tells the system 
  178.     ; that the image comes pre-drawn (if the appliprog wants to define 
  179.     ; its own box, in any shape or size it wants!); this is OK by 
  180.     ; Intuition as long as there's a good correspondence between the image
  181.     ; and the specified Gadgets
  182.     APTR  rq_ImageBMap        ; points to the BitMap of PREDRAWN imagery
  183.  
  184.     APTR  rq_RWindow        ; points back to requester's window
  185.     APTR  rq_ReqImage        ; new for V36: drawn if USEREQIMAGE set
  186.     STRUCT rq_ReqPad2,32    ; for backwards compatibility (reserved)
  187.  
  188.     LABEL rq_SIZEOF
  189.  
  190. ; FLAGS SET BY THE APPLIPROG
  191. POINTREL    EQU $0001  ; if POINTREL set, TopLeft is relative to pointer
  192.                ; for DMRequester, relative to window center
  193.                ; for Request().
  194. PREDRAWN    EQU $0002  ; if ReqBMap points to predrawn Requester imagery
  195. NOISYREQ     EQU $0004  ; if you don't want requester to filter input
  196.  
  197. ; New for V36
  198. SIMPLEREQ    EQU $0010  ; to use SIMPLEREFRESH layer (recommended)
  199. USEREQIMAGE    EQU $0020  ; render linked list ReqImage after BackFill
  200.                ; but before gadgets and text
  201. NOREQBACKFILL    EQU $0040  ; don't bother filling with Requester.BackFill
  202.  
  203.  
  204. ; FLAGS SET BY INTUITION;
  205. REQOFFWINDOW    EQU $1000    ; part of one of the Gadgets was offwindow
  206. REQACTIVE    EQU $2000    ; this requester is active
  207. SYSREQUEST    EQU $4000    ; (unused) this requester caused by system
  208. DEFERREFRESH    EQU $8000    ; this Requester stops a Refresh broadcast
  209.  
  210.  
  211.  
  212.  
  213.  
  214. ; ========================================================================
  215. ; === Gadget =============================================================
  216. ; ========================================================================
  217.  STRUCTURE Gadget,0
  218.  
  219.     APTR gg_NextGadget        ; next gadget in the list
  220.  
  221.     WORD gg_LeftEdge        ; "hit box" of gadget
  222.     WORD gg_TopEdge        ; "hit box" of gadget
  223.     WORD gg_Width        ; "hit box" of gadget
  224.     WORD gg_Height        ; "hit box" of gadget
  225.  
  226.     WORD gg_Flags         ; see below for list of defines
  227.  
  228.     WORD gg_Activation        ; see below for list of defines
  229.  
  230.     WORD gg_GadgetType        ; see below for defines
  231.  
  232.     ; appliprog can specify that the Gadget be rendered as either as Border
  233.     ; or an Image.  This variable points to which (or equals NULL if there's
  234.     ; nothing to be rendered about this Gadget)
  235.     APTR gg_GadgetRender
  236.  
  237.     ; appliprog can specify "highlighted" imagery rather than algorithmic
  238.     ; this can point to either Border or Image data
  239.     APTR gg_SelectRender
  240.  
  241.     APTR gg_GadgetText        ; text for this gadget;
  242.  
  243.     ; MutualExclude, never implemented, is now declared obsolete.
  244.     ; There are published examples of implementing a more general
  245.     ; and practical exclusion in your applications.
  246.     ;
  247.     ; Starting V36, this field is used to point to a hook
  248.     ; for a custom gadget.
  249.     ;
  250.     ; Programs using this field for their own processing will
  251.     ; continue to work, as long as they don't try the
  252.     ; trick with custom gadgets
  253.     LONG gg_MutualExclude     ; obsolete
  254.  
  255.     ; pointer to a structure of special data required by Proportional, String 
  256.     ; and Integer Gadgets
  257.     APTR gg_SpecialInfo
  258.  
  259.     WORD gg_GadgetID    ; user-definable ID field
  260.     APTR  gg_UserData    ; ptr to general purpose User data (ignored by Intuit)
  261.  
  262.     LABEL gg_SIZEOF
  263.  
  264.  STRUCTURE ExtGadget,0
  265.  
  266.     ; The first fields match struct Gadget exactly
  267.     APTR egg_NextGadget        ; Matches struct Gadget
  268.     WORD egg_LeftEdge        ; Matches struct Gadget
  269.     WORD egg_TopEdge        ; Matches struct Gadget
  270.     WORD egg_Width        ; Matches struct Gadget
  271.     WORD egg_Height        ; Matches struct Gadget
  272.     WORD egg_Flags         ; Matches struct Gadget
  273.     WORD egg_Activation        ; Matches struct Gadget
  274.     WORD egg_GadgetType        ; Matches struct Gadget
  275.     APTR egg_GadgetRender    ; Matches struct Gadget
  276.     APTR egg_SelectRender    ; Matches struct Gadget
  277.     APTR egg_GadgetText        ; Matches struct Gadget
  278.     LONG egg_MutualExclude     ; Matches struct Gadget
  279.     APTR egg_SpecialInfo    ; Matches struct Gadget
  280.     WORD egg_GadgetID        ; Matches struct Gadget
  281.     APTR egg_UserData        ; Matches struct Gadget
  282.  
  283.     ; These fields only exist under V39 and only if GFLG_EXTENDED is set
  284.     ULONG egg_MoreFlags        ; see GMORE_ flags below
  285.     WORD egg_BoundsLeftEdge    ; Bounding extent for gadget, valid
  286.     WORD egg_BoundsTopEdge    ; only if GMORE_BOUNDS is set.  The
  287.     WORD egg_BoundsWidth    ; GFLG_RELxxx flags affect these
  288.     WORD egg_BoundsHeight    ; coordinates as well.
  289.  
  290.     LABEL egg_SIZEOF
  291.  
  292. ; --- Gadget.Flags values ---
  293. ; combinations in these bits describe the highlight technique to be used
  294. GFLG_GADGHIGHBITS    EQU $0003
  295. GFLG_GADGHCOMP        EQU $0000    ; Complement the select box
  296. GFLG_GADGHBOX        EQU $0001    ; Draw a box around the image
  297. GFLG_GADGHIMAGE        EQU $0002    ; Blast in this alternate image
  298. GFLG_GADGHNONE        EQU $0003    ; don't highlight
  299.  
  300. ; set this flag if the GadgetRender and SelectRender point to Image imagery,
  301. ; clear if it's a Border 
  302. GFLG_GADGIMAGE        EQU $0004
  303.  
  304. ; combinations in these next two bits specify to which corner the gadget's
  305. ; Left & Top coordinates are relative.    If relative to Top/Left,
  306. ; these are "normal" coordinates (everything is relative to something in
  307. ; this universe)
  308. GFLG_RELBOTTOM        EQU $0008    ; set if rel to bottom, clear if to top
  309. GFLG_RELRIGHT        EQU $0010    ; set if rel to right, clear if to left
  310. ; set the GFLG_RELWIDTH bit to spec that Width is relative to width of screen
  311. GFLG_RELWIDTH        EQU $0020
  312. ; set the GFLG_RELHEIGHT bit to spec that Height is rel to height of screen
  313. GFLG_RELHEIGHT        EQU $0040
  314.  
  315. ; New for V39: GFLG_RELSPECIAL allows custom gadget implementors to
  316. ; make gadgets whose position and size depend in an arbitrary way
  317. ; on their window's dimensions.  The GM_LAYOUT method will be invoked
  318. ; for such a gadget (or any other GREL_xxx gadget) at suitable times,
  319. ; such as when the window opens or the window's size changes.
  320. GFLG_RELSPECIAL        EQU $4000 ; custom gadget has special relativity.
  321.                   ; Gadget box values are absolutes, but
  322.                   ; can be changed via the GM_LAYOUT method.
  323.  
  324. ; the GFLG_SELECTED flag is initialized by you and set by Intuition.  It
  325. ; specifies whether or not this Gadget is currently selected/highlighted
  326. GFLG_SELECTED        EQU $0080
  327.  
  328.  
  329. ; the GFLG_DISABLED flag is initialized by you and later set by Intuition
  330. ; according to your calls to On/OffGadget().  It specifies whether or not
  331. ; this Gadget is currently disabled from being selected
  332. GFLG_DISABLED        EQU $0100
  333.  
  334. * These flags specify the type of text field that Gadget.GadgetText
  335. * points to.  In all normal (pre-V36) gadgets which you initialize
  336. * this field should always be zero.  Some types of gadget objects
  337. * created from classes will use these fields to keep track of
  338. * types of labels/contents that different from IntuiText, but are
  339. * stashed in GadgetText.
  340.  
  341. GFLG_LABELMASK        EQU    $3000
  342. GFLG_LABELITEXT        EQU    $0000    ; GadgetText points to IntuiText
  343. GFLG_LABELSTRING    EQU    $1000    ; GadgetText points to (UBYTE *)
  344. GFLG_LABELIMAGE        EQU    $2000    ; GadgetText points to Image (object)
  345. ; New for V37: GFLG_TABCYCLE
  346. GFLG_TABCYCLE        EQU    $0200    ; (string or custom) gadget
  347.                 ; participates in cycling activation with
  348.                 ; Tab or Shift-Tab
  349.  
  350. ; New for V37: GFLG_STRINGEXTEND.  We discovered that V34 doesn't properly
  351. ; ignore the value we had chosen for the Gadget->Activation flag
  352. ; GACT_STRINGEXTEND.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  353. ; The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  354. ; safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  355. ; (Note that the two flags are not numerically equal)
  356. GFLG_STRINGEXTEND    EQU    $0400  ; this String Gadget has StringExtend
  357.  
  358. ; New for V39: GFLG_IMAGEDISABLE.  This flag is automatically set if
  359. ; the custom image of this gadget knows how to do disabled rendering
  360. ; (more specifically, if its IA_SupportsDisable attribute is TRUE).
  361. ; Intuition uses this to defer the ghosting to the image-class,
  362. ; instead of doing it itself (the old compatible way).
  363. ; Do not set this flag yourself - Intuition will do it for you.
  364.  
  365. GFLG_IMAGEDISABLE     EQU    $0800  ; Gadget's image knows how to do disabled
  366.                        ; rendering
  367.  
  368. ; New for V39:    If set, this bit means that the Gadget is actually
  369. ; a struct ExtGadget, with new fields and flags.  All V39 boopsi
  370. ; gadgets are ExtGadgets.  Never ever attempt to read the extended
  371. ; fields of a gadget if this flag is not set.
  372.  
  373. GFLG_EXTENDED        EQU    $8000  ; Gadget is extended
  374.  
  375.  
  376.  
  377. ; --- These are the Activation flag bits ----------------------------------
  378. ; GACT_RELVERIFY is set if you want to verify that the pointer was still over
  379. ; the gadget when the select button was released.  Will cause
  380. ; an IDCMP_GADGETUP message to be sent if so.
  381. GACT_RELVERIFY        EQU $0001
  382.  
  383. ; the flag GACT_IMMEDIATE, when set, informs the caller that the gadget
  384. ; was activated when it was activated.    this flag works in conjunction with
  385. ; the GACT_RELVERIFY flag
  386. GACT_IMMEDIATE        EQU $0002
  387.  
  388. ; the flag GACT_ENDGADGET, when set, tells the system that this gadget, when
  389. ; selected, causes the Requester or AbsMessage to be ended.  Requesters or
  390. ; AbsMessages that are ended are erased and unlinked from the system
  391. GACT_ENDGADGET        EQU $0004
  392.  
  393. ; the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  394. ; reports on mouse movements while this gadget is active.
  395. ; You probably want to set the GACT_IMMEDIATE flag when using
  396. ; GACT_FOLLOWMOUSE, since that's the only reasonable way you have of learning
  397. ; why Intuition is suddenly sending you a stream of mouse movement events.
  398. ; If you don't set GACT_RELVERIFY, you'll get at least one Mouse Position
  399. ; event.
  400. ; Note: boolean FOLLOWMOUSE gadgets require GACT_RELVERIFY to get
  401. ; _any_ mouse movement events (this unusual behavior is a compatibility
  402. ; hold-over from the old days).
  403.  
  404. GACT_FOLLOWMOUSE    EQU $0008
  405.  
  406. ; if any of the BORDER flags are set in a Gadget that's included in the
  407. ; Gadget list when a Window is opened, the corresponding Border will
  408. ; be adjusted to make room for the Gadget
  409. GACT_RIGHTBORDER    EQU $0010
  410. GACT_LEFTBORDER        EQU $0020
  411. GACT_TOPBORDER        EQU $0040
  412. GACT_BOTTOMBORDER    EQU $0080
  413. GACT_BORDERSNIFF    EQU $8000    ; neither set nor rely on this bit
  414.  
  415. GACT_TOGGLESELECT    EQU $0100    ; this bit for toggle-select mode
  416. GACT_BOOLEXTEND        EQU $2000    ; This Boolean Gadget has a BoolInfo
  417.  
  418. ; should properly be in StringInfo, but aren't
  419. GACT_STRINGLEFT        EQU $0000    ; NOTE WELL: that this has value zero
  420. GACT_STRINGCENTER    EQU $0200    ; center the String
  421. GACT_STRINGRIGHT    EQU $0400    ; right-justify the String
  422. GACT_LONGINT        EQU $0800    ; This String Gadget is a Long Integer
  423. GACT_ALTKEYMAP        EQU $1000    ; has an alternate keymapping
  424. GACT_STRINGEXTEND    EQU $2000    ; this String Gadget has an extension
  425.                     ; NOTE: NEVER SET GACT_STRINGEXTEND
  426.                     ; IF YOU ARE RUNNING ON LESS THAN V36!
  427.                     ; SEE GFLG_STRINGEXTEND (ABOVE) INSTEAD
  428.  
  429. GACT_ACTIVEGADGET    EQU $4000    ; this gadget is "active".  This flag
  430.                 ; is maintained by Intuition, and you
  431.                 ; cannot count on its value persisting
  432.                 ; while you do something on your program's
  433.                 ; task.  It can only be trusted by
  434.                 ; people implementing custom gadgets
  435.  
  436. * note $8000 is used above (GACT_BORDERSNIFF); all Activation flags defined
  437.  
  438.  
  439.  
  440. ; --- GADGET TYPES -----------------------------------------------------------
  441. ; These are the Gaget Type definitions for the variable GadgetType.
  442. ; Gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  443. ; first comes the mask for Gadget flags reserved for Gadget typing
  444. GTYP_GADGETTYPE        EQU $FC00    ; all Gadget Global Type flags
  445.                     ; (padded)
  446. GTYP_SYSGADGET        EQU $8000    ; 1 = Allocated by the system, 0 = by app.
  447. GTYP_SCRGADGET        EQU $4000    ; 1 = ScreenGadget, 0 = WindowGadget
  448. GTYP_GZZGADGET        EQU $2000    ; 1 = Gadget for WFLG_GIMMEZEROZERO
  449.                     ;     borders
  450. GTYP_REQGADGET        EQU $1000    ; 1 = this is a Requester Gadget
  451. ; system gadgets
  452. GTYP_SIZING        EQU $0010
  453. GTYP_WDRAGGING        EQU $0020
  454. GTYP_SDRAGGING        EQU $0030
  455. GTYP_WUPFRONT        EQU $0040
  456. GTYP_SUPFRONT        EQU $0050
  457. GTYP_WDOWNBACK        EQU $0060
  458. GTYP_SDOWNBACK        EQU $0070
  459. GTYP_CLOSE        EQU $0080
  460. ; application gadgets
  461. GTYP_BOOLGADGET        EQU $0001
  462. GTYP_GADGET0002        EQU $0002
  463. GTYP_PROPGADGET        EQU $0003
  464. GTYP_STRGADGET        EQU $0004
  465. GTYP_CUSTOMGADGET    EQU $0005
  466. GTYP_GTYPEMASK        EQU $0007    ; masks out to gadget class
  467.  
  468. ; New for V39.    Gadgets which have the GFLG_EXTENDED flag set are
  469. ; actually ExtGadgets, which have more flags.  The GMORE_xxx
  470. ; identifiers describe those flags:
  471.  
  472. GMORE_BOUNDS        EQU $00000001 ; ExtGadget has valid Bounds
  473. GMORE_GADGETHELP    EQU $00000002 ; This gadget responds to gadget help
  474. GMORE_SCROLLRASTER    EQU $00000004 ; This (custom) gadget uses ScrollRaster
  475.  
  476.  
  477.  
  478. ; ========================================================================
  479. ; === BoolInfo============================================================
  480. ; ========================================================================
  481. ; This is the special data needed by an Extended Boolean Gadget
  482. ; Typically this structure will be pointed to by the Gadget field SpecialInfo
  483.  
  484.  STRUCTURE BoolInfo,0
  485.  
  486.     WORD    bi_Flags    ; defined below
  487.     APTR    bi_Mask    ; bit mask for highlighting and selecting
  488.             ; mask must follow the same rules as an Image
  489.             ; plane.  Its width and height are determined
  490.             ; by the width and height of the gadget's 
  491.             ; select box. (i.e. Gadget.Width and .Height).
  492.     LONG    bi_Reserved    ; set to 0
  493.  
  494.     LABEL   bi_SIZEOF
  495.  
  496. ; set BoolInfo.Flags to this flag bit.
  497. ; in the future, additional bits might mean more stuff hanging
  498. ; off of BoolInfo.Reserved.
  499.  
  500. BOOLMASK    EQU    $0001    ; extension is for masked gadget
  501.  
  502. ; ========================================================================
  503. ; === PropInfo ===========================================================
  504. ; ========================================================================
  505. ; this is the special data required by the proportional Gadget
  506. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  507.  STRUCTURE PropInfo,0
  508.  
  509.     WORD pi_Flags    ; general purpose flag bits (see defines below)
  510.  
  511.     ; You initialize the Pot variables before the Gadget is added to 
  512.     ; the system.  Then you can look here for the current settings 
  513.     ; any time, even while User is playing with this Gadget.  To 
  514.     ; adjust these after the Gadget is added to the System, use 
  515.     ; ModifyProp(); The Pots are the actual proportional settings, 
  516.     ; where a value of zero means zero and a value of MAXPOT means 
  517.     ; that the Gadget is set to its maximum setting.
  518.     WORD pi_HorizPot    ; 16-bit FixedPoint horizontal quantity percentage;
  519.     WORD pi_VertPot    ; 16-bit FixedPoint vertical quantity percentage;
  520.  
  521.     ; the 16-bit FixedPoint Body variables describe what percentage 
  522.     ; of the entire body of stuff referred to by this Gadget is 
  523.     ; actually shown at one time.  This is used with the AUTOKNOB 
  524.     ; routines, to adjust the size of the AUTOKNOB according to how 
  525.     ; much of the data can be seen.  This is also used to decide how 
  526.     ; far to advance the Pots when User hits the Container of the Gadget.  
  527.     ; For instance, if you were controlling the display of a 5-line 
  528.     ; Window of text with this Gadget, and there was a total of 15 
  529.     ; lines that could be displayed, you would set the VertBody value to 
  530.     ;    (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  531.     ; Therefore, the AUTOKNOB would fill 1/3 of the container, and if 
  532.     ; User hits the Cotainer outside of the knob, the pot would advance 
  533.     ; 1/3 (plus or minus) If there's no body to show, or the total
  534.     ; amount of displayable info is less than the display area, set the
  535.     ; Body variables to the MAX.  To adjust these after the Gadget is
  536.     ; added to the System, use ModifyProp().
  537.     WORD pi_HorizBody    ; horizontal Body
  538.     WORD pi_VertBody    ; vertical Body
  539.  
  540.     ; these are the variables that Intuition sets and maintains
  541.     WORD pi_CWidth    ; Container width (with any relativity absoluted)
  542.     WORD pi_CHeight    ; Container height (with any relativity absoluted)
  543.     WORD pi_HPotRes    ; pot increments
  544.     WORD pi_VPotRes    ; pot increments
  545.     WORD pi_LeftBorder    ; Container borders
  546.     WORD pi_TopBorder    ; Container borders
  547.     LABEL  pi_SIZEOF
  548.  
  549. ; --- FLAG BITS --------------------------------------------------------------
  550. AUTOKNOB    EQU $0001    ; this flag sez:  gimme that old auto-knob
  551. FREEHORIZ    EQU $0002    ; if set, the knob can move horizontally
  552. FREEVERT    EQU $0004    ; if set, the knob can move vertically
  553. PROPBORDERLESS    EQU $0008    ; if set, no border will be rendered
  554. KNOBHIT        EQU $0100    ; set when this Knob is hit
  555. PROPNEWLOOK    EQU $0010    ; set this if you want to get the new
  556.                 ; V36 look
  557.  
  558. KNOBHMIN    EQU 6        ; minimum horizontal size of the knob
  559. KNOBVMIN    EQU 4        ; minimum vertical size of the knob
  560. MAXBODY        EQU $FFFF    ; maximum body value
  561. MAXPOT            EQU $FFFF    ; maximum pot value
  562.  
  563.  
  564. ; ========================================================================
  565. ; === StringInfo =========================================================
  566. ; ========================================================================
  567. ; this is the special data required by the string Gadget
  568. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  569.  STRUCTURE StringInfo,0
  570.  
  571.     ; you initialize these variables, and then Intuition maintains them
  572.     APTR  si_Buffer    ; the buffer containing the start and final string
  573.     APTR  si_UndoBuffer    ; optional buffer for undoing current entry
  574.     WORD si_BufferPos    ; character position in Buffer
  575.     WORD si_MaxChars    ; max number of chars in Buffer (including NULL)
  576.     WORD si_DispPos    ; Buffer position of first displayed character
  577.  
  578.     ; Intuition initializes and maintains these variables for you
  579.     WORD si_UndoPos    ; character position in the undo buffer
  580.     WORD si_NumChars    ; number of characters currently in Buffer
  581.     WORD si_DispCount    ; number of whole characters visible in Container
  582.     WORD si_CLeft    ; topleft offset of the container
  583.     WORD si_CTop    ; topleft offset of the container
  584.  
  585.     ; unused field is changed to allow extended specification
  586.     ; of string gadget parameters.  It is ignored unless the flag
  587.     ; GACT_STRINGEXTEND is set in the Gadget's Activation field
  588.     ; or the GFLG_STRINGEXTEND flag is set in the Gadget Flags field.
  589.     ; (See GFLG_STRINGEXTEND for an important note)
  590.     ;APTR  si_LayerPtr    ; --- obsolete ---
  591.     APTR  si_Extension
  592.  
  593.     ; you can initialize this variable before the gadget is submitted to
  594.     ; Intuition, and then examine it later to discover what integer 
  595.     ; the user has entered (if the user never plays with the gadget, 
  596.     ; the value will be unchanged from your initial setting)
  597.     LONG  si_LongInt    ; the LONG return value of a GACT_LONGINT String Gad.
  598.  
  599.     ; If you want this Gadget to use your own Console keymapping, you
  600.     ; set the GACT_ALTKEYMAP bit in the Activation flags of the Gadget, and
  601.     ; then set this variable to point to your keymap.  If you don't set the
  602.     ; GACT_ALTKEYMAP, you'll get the standard ASCII keymapping.
  603.     APTR si_AltKeyMap
  604.  
  605.     LABEL si_SIZEOF
  606.  
  607.  
  608.  
  609.  
  610. ; ========================================================================
  611. ; === IntuiText ==========================================================
  612. ; ========================================================================
  613. ; IntuiText is a series of strings that start with a location
  614. ; (always relative to the upper-left corner of something) and then the
  615. ; text of the string.  The text is null-terminated.
  616.  STRUCTURE IntuiText,0
  617.  
  618.     BYTE it_FrontPen        ; the pens for rendering the text
  619.     BYTE it_BackPen        ; the pens for rendering the text
  620.  
  621.     BYTE it_DrawMode        ; the mode for rendering the text
  622.  
  623.     BYTE it_KludgeFill00     ; This is strictly for word-alignment 
  624.  
  625.     WORD it_LeftEdge        ; relative start location for the text
  626.     WORD it_TopEdge        ; relative start location for the text
  627.  
  628.     APTR  it_ITextFont        ; if NULL, you accept the defaults
  629.  
  630.     APTR it_IText        ; pointer to null-terminated text
  631.  
  632.     APTR  it_NextText        ; pointer to another IntuiText to render
  633.  
  634.     LABEL it_SIZEOF
  635.  
  636.  
  637.  
  638.  
  639.  
  640. ; ========================================================================
  641. ; === Border =============================================================
  642. ; ========================================================================
  643. ; Data type Border, used for drawing a series of lines which is intended for
  644. ; use as a border drawing, but which may, in fact, be used to render any
  645. ; arbitrary vector shape.
  646. ; The routine DrawBorder sets up the RastPort with the appropriate
  647. ; variables, then does a Move to the first coordinate, then does Draws
  648. ; to the subsequent coordinates.
  649. ; After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  650. ; on NextBorder
  651.  STRUCTURE Border,0
  652.  
  653.     WORD  bd_LeftEdge        ; initial offsets from the origin
  654.     WORD  bd_TopEdge        ; initial offsets from the origin
  655.     BYTE  bd_FrontPen        ; pen number for rendering 
  656.     BYTE  bd_BackPen        ; pen number for rendering 
  657.     BYTE  bd_DrawMode        ; mode for rendering 
  658.     BYTE  bd_Count        ; number of XY pairs
  659.     APTR  bd_XY            ; vector coordinate pairs rel to LeftTop
  660.     APTR  bd_NextBorder        ; pointer to any other Border too
  661.  
  662.     LABEL bd_SIZEOF
  663.  
  664.  
  665. ; ======================================================================== 
  666. ; === Image ============================================================== 
  667. ; ======================================================================== 
  668. ; This is a brief image structure for very simple transfers of 
  669. ; image data to a RastPort
  670.  STRUCTURE Image,0
  671.  
  672.     WORD ig_LeftEdge        ; starting offset relative to something 
  673.     WORD ig_TopEdge        ; starting offset relative to something 
  674.     WORD ig_Width        ; pixel size (though data is word-aligned)
  675.     WORD ig_Height        ; pixel size 
  676.     WORD ig_Depth        ; pixel size 
  677.     APTR ig_ImageData        ; pointer to the actual image bits
  678.  
  679.     ; the PlanePick and PlaneOnOff variables work much the same way as the
  680.     ; equivalent GELS Bob variables.  It's a space-saving
  681.     ; mechanism for image data.  Rather than defining the image data
  682.     ; for every plane of the RastPort, you need define data only for planes
  683.     ; that are not entirely zero or one.  As you define your Imagery, you will
  684.     ; often find that most of the planes ARE just as color selectors.  For
  685.     ; instance, if you're designing a two-color Gadget to use colors two and
  686.     ; three, and the Gadget will reside in a five-plane display, plane zero
  687.     ; of your imagery would be all ones, bit plane one would have data that
  688.     ; describes the imagery, and bit planes two through four would be
  689.     ; all zeroes.  Using these flags allows you to avoid wasting all that 
  690.     ; memory in this way:  
  691.     ; first, you specify which planes you want your data to appear 
  692.     ; in using the PlanePick variable.  For each bit set in the variable, the 
  693.     ; next "plane" of your image data is blitted to the display.  For each bit
  694.     ; clear in this variable, the corresponding bit in PlaneOnOff is examined.
  695.     ; If that bit is clear, a "plane" of zeroes will be used.  If the bit is 
  696.     ; set, ones will go out instead.  So, for our example:
  697.     ;   Gadget.PlanePick = 0x02;
  698.     ;   Gadget.PlaneOnOff = 0x01;
  699.     ; Note that this also allows for generic Gadgets, like the System Gadgets,
  700.     ; which will work in any number of bit planes
  701.     ; Note also that if you want an Image that is only a filled rectangle,
  702.     ; you can get this by setting PlanePick to zero (pick no planes of data)
  703.     ; and set PlaneOnOff to describe the pen color of the rectangle.
  704.     ;
  705.     ; NOTE:  Intuition relies on PlanePick to know how many planes
  706.     ; of data are found in ImageData.  There should be no more
  707.     ; '1'-bits in PlanePick than there are planes in ImageData.
  708.     BYTE ig_PlanePick
  709.     BYTE ig_PlaneOnOff
  710.  
  711.     ; if the NextImage variable is not NULL, Intuition presumes that 
  712.     ; it points to another Image structure with another Image to be 
  713.     ; rendered
  714.     APTR ig_NextImage
  715.  
  716.  
  717.     LABEL ig_SIZEOF
  718.  
  719.  
  720.  
  721.  
  722. ; ======================================================================== 
  723. ; === IntuiMessage ======================================================= 
  724. ; ======================================================================== 
  725.  STRUCTURE IntuiMessage,0
  726.  
  727.     STRUCT im_ExecMessage,MN_SIZE
  728.  
  729.     ; the Class bits correspond directly with the IDCMP Flags, except for the
  730.     ; special bit IDCMP_LONELYMESSAGE (defined below)
  731.     LONG im_Class
  732.  
  733.     ; the Code field is for special values like MENU number 
  734.     WORD im_Code
  735.  
  736.     ; the Qualifier field is a copy of the current InputEvent's Qualifier
  737.     WORD im_Qualifier
  738.  
  739.     ; IAddress contains particular addresses for Intuition functions, like
  740.     ; the pointer to the Gadget or the Screen
  741.     APTR im_IAddress
  742.  
  743.     ; when getting mouse movement reports, any event you get will have the
  744.     ; the mouse coordinates in these variables.  the coordinates are relative
  745.     ; to the upper-left corner of your Window (WFLG_GIMMEZEROZERO
  746.     ; notwithstanding)
  747.     ; If the DELTAMOVE IDCMP flag is set, these values will be deltas from
  748.     ; the last reported position.
  749.     WORD im_MouseX
  750.     WORD im_MouseY
  751.  
  752.     ; the time values are copies of the current system clock time.  Micros
  753.     ; are in units of microseconds, Seconds in seconds.
  754.     LONG im_Seconds
  755.     LONG im_Micros
  756.  
  757.     ; the IDCMPWindow variable will always have the address of the Window of
  758.     ; this IDCMP
  759.     APTR im_IDCMPWindow
  760.  
  761.     ; system-use variable
  762.     APTR im_SpecialLink
  763.  
  764.     LABEL  im_SIZEOF
  765.  
  766. * New for V39:
  767. * All IntuiMessages are now slightly extended.    The ExtIntuiMessage
  768. * structure has an additional field for tablet data, which is usually
  769. * NULL.  If a tablet driver which is sending IESUBCLASS_NEWTABLET
  770. * events is installed in the system, windows with the WA_TabletMessages
  771. * property set will find that eim_TabletData points to the TabletData
  772. * structure.  Applications must first check that this field is non-NULL;
  773. * it will be NULL for certain kinds of message, including mouse activity
  774. * generated from other than the tablet (i.e. the keyboard equivalents
  775. * or the mouse itself).
  776. *
  777. * NEVER EVER examine any extended fields when running under pre-V39!
  778. *
  779. * NOTE: This structure is subject to grow in the future.  Making
  780. * assumptions about its size is A BAD IDEA.
  781.  
  782.  STRUCTURE ExtIntuiMessage,0
  783.  
  784.     STRUCT eim_IntuiMessage,im_SIZEOF
  785.     APTR eim_TabletData
  786.  
  787.  
  788. ; --- IDCMP Classes ------------------------------------------------------
  789. ; Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  790. ; Manual for full details on the IDCMP classes.
  791.  
  792. IDCMP_SIZEVERIFY    EQU    $00000001
  793. IDCMP_NEWSIZE        EQU    $00000002
  794. IDCMP_REFRESHWINDOW    EQU    $00000004
  795. IDCMP_MOUSEBUTTONS    EQU    $00000008
  796. IDCMP_MOUSEMOVE        EQU    $00000010
  797. IDCMP_GADGETDOWN    EQU    $00000020
  798. IDCMP_GADGETUP        EQU    $00000040
  799. IDCMP_REQSET        EQU    $00000080
  800. IDCMP_MENUPICK        EQU    $00000100
  801. IDCMP_CLOSEWINDOW    EQU    $00000200
  802. IDCMP_RAWKEY        EQU    $00000400
  803. IDCMP_REQVERIFY        EQU    $00000800
  804. IDCMP_REQCLEAR        EQU    $00001000
  805. IDCMP_MENUVERIFY    EQU    $00002000
  806. IDCMP_NEWPREFS        EQU    $00004000
  807. IDCMP_DISKINSERTED    EQU    $00008000
  808. IDCMP_DISKREMOVED    EQU    $00010000
  809. IDCMP_WBENCHMESSAGE    EQU    $00020000    ; System use only
  810. IDCMP_ACTIVEWINDOW    EQU    $00040000
  811. IDCMP_INACTIVEWINDOW    EQU    $00080000
  812. IDCMP_DELTAMOVE        EQU    $00100000
  813. IDCMP_VANILLAKEY    EQU    $00200000
  814. IDCMP_INTUITICKS    EQU    $00400000
  815. ;  for notifications from "boopsi" gadgets:
  816. IDCMP_IDCMPUPDATE    EQU    $00800000    ; new for V36
  817. ; for getting help key report during menu session:
  818. IDCMP_MENUHELP        EQU    $01000000    ; new for V36
  819. ; for notification of any move/size/zoom/change window:
  820. IDCMP_CHANGEWINDOW    EQU    $02000000    ; new for V36
  821. IDCMP_GADGETHELP    EQU    $04000000    ; new for V39
  822.  
  823. ; NOTEZ-BIEN:        $80000000 is reserved for internal use by IDCMP
  824.  
  825. ; the IDCMP Flags do not use this special bit, which is cleared when
  826. ; Intuition sends its special message to the Task, and set when Intuition
  827. ; gets its Message back from the Task.    Therefore, I can check here to
  828. ; find out fast whether or not this Message is available for me to send
  829. IDCMP_LONELYMESSAGE    EQU    $80000000
  830.  
  831.  
  832.  
  833. ; --- IDCMP Codes --------------------------------------------------------
  834. ; This group of codes is for the IDCMP_CHANGEWINDOW message
  835. CWCODE_MOVESIZE    EQU    $0000    ; Window was moved and/or sized
  836. CWCODE_DEPTH    EQU    $0001    ; Window was depth-arranged (new for V39)
  837.  
  838. ; This group of codes is for the IDCMP_MENUVERIFY message
  839. MENUHOT        EQU    $0001    ; IntuiWants verification or MENUCANCEL
  840. MENUCANCEL    EQU    $0002    ; HOT Reply of this cancels Menu operation
  841. MENUWAITING    EQU    $0003    ; Intuition simply wants a ReplyMsg() ASAP
  842.  
  843. ; These are internal tokens to represent state of verification attempts
  844. ; shown here as a clue.
  845. OKOK        EQU    MENUHOT        ; guy didn't care
  846. OKABORT        EQU    $0004        ; window rendered question moot
  847. OKCANCEL     EQU    MENUCANCEL     ; window sent cancel reply
  848.  
  849. ; This group of codes is for the IDCMP_WBENCHMESSAGE messages
  850. WBENCHOPEN    EQU $0001
  851. WBENCHCLOSE    EQU $0002
  852.  
  853. ; A data structure common in V36 Intuition processing
  854.  
  855.  STRUCTURE    IBox,0
  856.     WORD    ibox_Left
  857.     WORD    ibox_Top
  858.     WORD    ibox_Width
  859.     WORD    ibox_Height
  860.  LABEL    ibox_SIZEOF
  861.  
  862.  
  863. ; ======================================================================== 
  864. ; === Window ============================================================= 
  865. ; ======================================================================== 
  866.  STRUCTURE Window,0
  867.  
  868.     APTR wd_NextWindow        ; for the linked list of a Screen
  869.  
  870.     WORD wd_LeftEdge        ; screen dimensions
  871.     WORD wd_TopEdge        ; screen dimensions
  872.     WORD wd_Width        ; screen dimensions
  873.     WORD wd_Height        ; screen dimensions
  874.  
  875.     WORD wd_MouseY        ; relative top top-left corner 
  876.     WORD wd_MouseX        ; relative top top-left corner 
  877.  
  878.     WORD wd_MinWidth        ; minimum sizes
  879.     WORD wd_MinHeight        ; minimum sizes
  880.     WORD wd_MaxWidth        ; maximum sizes
  881.     WORD wd_MaxHeight        ; maximum sizes
  882.  
  883.     LONG wd_Flags        ; see below for definitions
  884.  
  885.     APTR wd_MenuStrip        ; first in a list of menu headers
  886.  
  887.     APTR wd_Title        ; title text for the Window
  888.  
  889.     APTR wd_FirstRequest    ; first in linked list of active Requesters 
  890.     APTR wd_DMRequest        ; the double-menu Requester 
  891.     WORD wd_ReqCount        ; number of Requesters blocking this Window
  892.     APTR wd_WScreen        ; this Window's Screen
  893.     APTR wd_RPort        ; this Window's very own RastPort
  894.  
  895.     ; the border variables describe the window border.  If you specify
  896.     ; WFLG_GIMMEZEROZERO when you open the window, then the upper-left of the
  897.     ; ClipRect for this window will be upper-left of the BitMap (with correct
  898.     ; offsets when in SuperBitMap mode; you MUST select WFLG_GIMMEZEROZERO
  899.     ; when using SuperBitMap).  If you don't specify ZeroZero, then you save
  900.     ; memory (no allocation of RastPort, Layer, ClipRect and associated
  901.     ; Bitmaps), but you also must offset all your writes by BorderTop,
  902.     ; BorderLeft and do your own mini-clipping to prevent writing over the
  903.     ; system gadgets
  904.     BYTE wd_BorderLeft
  905.     BYTE wd_BorderTop
  906.     BYTE wd_BorderRight
  907.     BYTE wd_BorderBottom
  908.     APTR wd_BorderRPort
  909.  
  910.     ; You supply a linked-list of gadget that you want for your Window.
  911.     ; This list DOES NOT include system Gadgets.  You get the standard
  912.     ; window system Gadgets by setting flag-bits in the variable Flags (see
  913.     ; the bit definitions below)
  914.     APTR wd_FirstGadget
  915.  
  916.     ; these are for opening/closing the windows
  917.     APTR wd_Parent
  918.     APTR wd_Descendant
  919.  
  920.     ; sprite data information for your own Pointer
  921.     ; set these AFTER you Open the Window by calling SetPointer()
  922.     APTR wd_Pointer
  923.     BYTE wd_PtrHeight
  924.     BYTE wd_PtrWidth
  925.     BYTE wd_XOffset
  926.     BYTE wd_YOffset
  927.  
  928.     ; the IDCMP Flags and User's and Intuition's Message Ports
  929.     ULONG wd_IDCMPFlags
  930.     APTR wd_UserPort
  931.     APTR wd_WindowPort
  932.     APTR wd_MessageKey
  933.  
  934.     BYTE wd_DetailPen
  935.     BYTE wd_BlockPen
  936.  
  937.     ; the CheckMark is a pointer to the imagery that will be used when
  938.     ; rendering MenuItems of this Window that want to be checkmarked
  939.     ; if this is equal to NULL, you'll get the default imagery
  940.     APTR wd_CheckMark
  941.  
  942.     ; if non-null, Screen title when Window is active 
  943.     APTR wd_ScreenTitle
  944.  
  945.     ; These variables have the mouse coordinates relative to the 
  946.     ; inner-Window of WFLG_GIMMEZEROZERO Windows.  This is compared with the
  947.     ; MouseX and MouseY variables, which contain the mouse coordinates
  948.     ; relative to the upper-left corner of the Window, WFLG_GIMMEZEROZERO
  949.     ; notwithstanding
  950.     WORD wd_GZZMouseX
  951.     WORD wd_GZZMouseY
  952.     ; these variables contain the width and height of the inner-Window of
  953.     ; WFLG_GIMMEZEROZERO Windows
  954.     WORD wd_GZZWidth
  955.     WORD wd_GZZHeight
  956.  
  957.     APTR wd_ExtData
  958.  
  959.     ; general-purpose pointer to User data extension 
  960.     APTR wd_UserData
  961.     APTR wd_WLayer    ; stash of Window.RPort->Layer
  962.  
  963.     ; NEW 1.2: need to keep track of the font that OpenWindow opened,
  964.     ; in case user SetFont's into RastPort
  965.     APTR  wd_IFont
  966.  
  967.     ; (V36) another flag word (the Flags field is used up).
  968.     ; At present, all flag values are system private.
  969.     ; Until further notice, you may not change nor use this field.
  970.     ULONG wd_MoreFlags
  971.  
  972.     ; ----- subsequent fields are INTUITION PRIVATE ---
  973.  
  974.     LABEL wd_Size
  975.     LABEL wd_SIZEOF    ; you should never use this: only Intuition allocates
  976.  
  977. ; --- Flags requested at OpenWindow() time by the application -------------
  978. WFLG_SIZEGADGET    EQU $0001    ; include sizing system-gadget?
  979. WFLG_DRAGBAR        EQU $0002    ; include dragging system-gadget?
  980. WFLG_DEPTHGADGET    EQU $0004    ; include depth arrangement gadget?
  981. WFLG_CLOSEGADGET    EQU $0008    ; include close-box system-gadget?
  982.  
  983. WFLG_SIZEBRIGHT        EQU $0010    ; size gadget uses right border
  984. WFLG_SIZEBBOTTOM    EQU $0020    ; size gadget uses bottom border
  985.  
  986. ; --- refresh modes ----------------------------------------------------------
  987. ; combinations of the WFLG_REFRESHBITS select the refresh type
  988. WFLG_REFRESHBITS    EQU $00C0
  989. WFLG_SMART_REFRESH    EQU $0000
  990. WFLG_SIMPLE_REFRESH    EQU $0040
  991. WFLG_SUPER_BITMAP    EQU $0080
  992. WFLG_OTHER_REFRESH    EQU $00C0
  993.  
  994. WFLG_BACKDROP        EQU $0100    ; this is a backdrop window
  995.  
  996. WFLG_REPORTMOUSE    EQU $0200    ; set this to hear every mouse move
  997.  
  998. WFLG_GIMMEZEROZERO    EQU $0400    ; make extra border stuff
  999.  
  1000. WFLG_BORDERLESS        EQU $0800    ; set this to get a Window sans border
  1001.  
  1002. WFLG_ACTIVATE        EQU $1000    ; when Window opens, it's the Active
  1003.                     ; one 
  1004.  
  1005. ; --- Other User Flags -------------------------------------------------------
  1006. WFLG_RMBTRAP        EQU $00010000    ; Catch RMB events for your own 
  1007. WFLG_NOCAREREFRESH    EQU $00020000    ; not to be bothered with REFRESH
  1008.  
  1009. ; - V36 new Flags which the programmer may specify in NewScreen.Flags 
  1010. WFLG_NW_EXTENDED    EQU $00040000    ; extension data provided
  1011.                     ; see ExtNewWindow structure
  1012. ; - V39 new Flags which the programmer may specify in NewScreen.Flags 
  1013. WFLG_NEWLOOKMENUS    EQU $00200000    ; window has NewLook menus
  1014.  
  1015.  
  1016. ; These flags are set only by Intuition.  YOU MAY NOT SET THEM YOURSELF!
  1017. WFLG_WINDOWACTIVE    EQU $2000    ; this window is the active one 
  1018. WFLG_INREQUEST        EQU $4000    ; this window is in request mode 
  1019. WFLG_MENUSTATE        EQU $8000    ; this Window is active with its
  1020.                     ; Menus on 
  1021. WFLG_WINDOWREFRESH    EQU $01000000    ; Window is currently refreshing
  1022. WFLG_WBENCHWINDOW    EQU $02000000    ; WorkBench Window
  1023. WFLG_WINDOWTICKED    EQU $04000000    ; only one timer tick at a time
  1024.  
  1025. ; V36 and higher flags to be set only by Intuition:
  1026. WFLG_VISITOR        EQU $08000000    ; visitor window (see autodoc for OpenWindow)
  1027. WFLG_ZOOMED        EQU $10000000    ; identifies "zoom state"
  1028. WFLG_HASZOOM        EQU $20000000    ; window has a zoom gadget
  1029.  
  1030.  
  1031. SUPER_UNUSED    EQU $FCFC0000    ; OBSOLETE (was bits of Flag unused yet)
  1032.  
  1033.  
  1034. ; --- Other Window Values ---------------------------------------------- 
  1035. DEFAULTMOUSEQUEUE    EQU 5     ; no more mouse messages
  1036.  
  1037.  
  1038. ; --- see struct IntuiMessage for the IDCMP Flag definitions -----------------
  1039.  
  1040.  
  1041. ; ======================================================================== 
  1042. ; === NewWindow ========================================================== 
  1043. ; ======================================================================== 
  1044. ; NOTE: to use the new features of V36, you may need to use the
  1045. ; ExtNewWindow structure, below.
  1046.  STRUCTURE NewWindow,0
  1047.  
  1048.     WORD nw_LeftEdge        ; initial Window dimensions
  1049.     WORD nw_TopEdge        ; initial Window dimensions
  1050.     WORD nw_Width        ; initial Window dimensions
  1051.     WORD nw_Height        ; initial Window dimensions
  1052.  
  1053.     BYTE nw_DetailPen        ; for rendering the detail bits of the Window
  1054.     BYTE nw_BlockPen        ; for rendering the block-fill bits 
  1055.  
  1056.     LONG nw_IDCMPFlags        ; initial IDCMP state
  1057.  
  1058.     LONG nw_Flags        ; see the Flag definition under Window
  1059.  
  1060.     ; You supply a linked-list of Gadgets for your Window.
  1061.     ; This list DOES NOT include system Gadgets.  You get the standard
  1062.     ; system Window Gadgets by setting flag-bits in the variable Flags (see
  1063.     ; the bit definitions under the Window structure definition)
  1064.     APTR    nw_FirstGadget
  1065.  
  1066.     ; the CheckMark is a pointer to the imagery that will be used when 
  1067.     ; rendering MenuItems of this Window that want to be checkmarked
  1068.     ; if this is equal to NULL, you'll get the default imagery
  1069.     APTR nw_CheckMark
  1070.  
  1071.     APTR nw_Title        ; title text for the Window
  1072.  
  1073.     ; the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1074.     ; want this Window to open in it.  If so, you pass the address of the
  1075.     ; Custom Screen structure in this variable.  Otherwise, this variable
  1076.     ; is ignored and doesn't have to be initialized.
  1077.     APTR nw_Screen
  1078.  
  1079.     ; WFLG_SUPER_BITMAP Window?  If so, put the address of your BitMap
  1080.     ; structure in this variable.  If not, this variable is ignored and
  1081.     ; doesn't have to be initialized
  1082.     APTR nw_BitMap
  1083.  
  1084.     ; the values describe the minimum and maximum sizes of your Windows.
  1085.     ; these matter only if you've chosen the WFLG_SIZEGADGET Gadget option,
  1086.     ; which means that you want to let the User to change the size of
  1087.     ; this Window.  You describe the minimum and maximum sizes that the
  1088.     ; Window can grow by setting these variables.  You can initialize
  1089.     ; any one these to zero, which will mean that you want to duplicate
  1090.     ; the setting for that dimension (if MinWidth == 0, MinWidth will be
  1091.     ; set to the opening Width of the Window).
  1092.     ; You can change these settings later using SetWindowLimits().
  1093.     ; If you haven't asked for a GTYP_SIZING Gadget, you don't have to
  1094.     ; initialize any of these variables.
  1095.     WORD nw_MinWidth
  1096.     WORD nw_MinHeight
  1097.     WORD nw_MaxWidth
  1098.     WORD nw_MaxHeight
  1099.  
  1100.     ; the type variable describes the Screen in which you want this Window to
  1101.     ; open.  The type value can either be CUSTOMSCREEN or one of the
  1102.     ; system standard Screen Types such as WBENCHSCREEN.  See the
  1103.     ; type definitions under the Screen structure
  1104.     ; A new possible value for this field is PUBLICSCREEN, which
  1105.     ; defines the window as a 'visitor' window.  See below for
  1106.     ; additional information provided.
  1107.     WORD nw_Type
  1108.  
  1109.     LABEL nw_SIZE
  1110.     LABEL nw_SIZEOF
  1111.  
  1112. ; ExtNewWindow -- NewWindow plus extension fields.
  1113. ; This structure may be extended again, so programs depending on its
  1114. ; size are incorrect.
  1115.  
  1116.  STRUCTURE ExtNewWindow,nw_SIZE
  1117.  
  1118.     ; extensions for V36
  1119.     ; if the NewWindow Flag WFLG_NW_EXTENDED is set, then
  1120.     ; this field is assumed to point to an array (or chain of arrays)
  1121.     ; of TagItem structures.  See also ExtNewScreen for another
  1122.     ; use of TagItems to pass optional data.
  1123.     ;
  1124.     ; see below for tag values and the corresponding data
  1125.  
  1126.     APTR    enw_Extension    ; pointer to TagItem array
  1127.     LABEL enw_SIZEOF
  1128.  
  1129. * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1130. * They are values in a TagItem array passed as extension/replacement
  1131. * values for the data in NewWindow.  OpenWindowTagList() can actually
  1132. * work well with a NULL NewWindow pointer.
  1133.  
  1134.     ENUM TAG_USER+100
  1135.  
  1136.     ; these tags simply override NewWindow parameters
  1137.     EITEM WA_Left
  1138.     EITEM WA_Top
  1139.     EITEM WA_Width
  1140.     EITEM WA_Height
  1141.     EITEM WA_DetailPen
  1142.     EITEM WA_BlockPen
  1143.     EITEM WA_IDCMP
  1144.     EITEM WA_Flags    ; not implemented at present
  1145.     EITEM WA_Gadgets
  1146.     EITEM WA_Checkmark
  1147.     EITEM WA_Title
  1148.     EITEM WA_ScreenTitle    ; means you don't have to call SetWindowTitles
  1149.                 ; after you open your window
  1150.  
  1151.     EITEM WA_CustomScreen
  1152.     EITEM WA_SuperBitMap    ; also implies WFLG_SUPER_BITMAP property
  1153.     EITEM WA_MinWidth
  1154.     EITEM WA_MinHeight
  1155.     EITEM WA_MaxWidth
  1156.     EITEM WA_MaxHeight
  1157.  
  1158.     ; The following are specifications for new features
  1159.  
  1160.     EITEM WA_InnerWidth
  1161.     EITEM WA_InnerHeight ; You can specify the dimensions of the interior
  1162.              ; region of your window, independent of what
  1163.              ; the border widths will be.  You probably want
  1164.              ; to also specify WA_AutoAdjust to allow
  1165.              ; Intuition to move your window or even
  1166.              ; shrink it so that it is completely on screen.
  1167.  
  1168.     EITEM WA_PubScreenName    ; declares that you want the window to open as
  1169.              ; a visitor on the public screen whose name is
  1170.              ; pointed to by (UBYTE *) ti_Data
  1171.  
  1172.     EITEM WA_PubScreen    ; open as a visitor window on the public screen
  1173.             ; whose address is in (struct Screen *) ti_Data.
  1174.             ; To ensure that this screen remains open, you
  1175.             ; should either be the screen's owner, have a
  1176.             ; window open on the screen, or use LockPubScreen().
  1177.  
  1178.     EITEM WA_PubScreenFallBack    ; A Boolean, specifies whether a visitor window
  1179.              ; should "fall back" to the default public screen
  1180.              ; (or Workbench) if the named public screen isn't
  1181.              ; available
  1182.  
  1183.     EITEM WA_WindowName    ; not implemented
  1184.     EITEM WA_Colors    ; a ColorSpec array for colors to be set
  1185.             ; when this window is active.  This is not
  1186.             ; implemented, and may not be, since the default
  1187.             ; values to restore would be hard to track.
  1188.             ; We'd like to at least support per-window colors
  1189.             ; for the mouse pointer sprite.
  1190.  
  1191.     EITEM WA_Zoom    ; ti_Data points to an array of four WORD's,
  1192.             ; the initial Left/Top/Width/Height values of
  1193.             ; the "alternate" zoom position/dimensions.
  1194.             ; It also specifies that you want a Zoom gadget
  1195.             ; for your window, whether or not you have a
  1196.             ; sizing gadget.
  1197.  
  1198.     EITEM WA_MouseQueue    ; ti_Data contains initial value for the mouse
  1199.             ; message backlog limit for this window.
  1200.  
  1201.     EITEM WA_BackFill    ; provides a "backfill hook" for your window's Layer.
  1202.             ; See layers.library/CreateUpfrontHookLayer().
  1203.  
  1204.     EITEM WA_RptQueue    ; initial value of repeat key backlog limit
  1205.  
  1206.     ; These Boolean tag items are alternatives to the NewWindow.Flags
  1207.     ; boolean flags with similar names.
  1208.  
  1209.     EITEM WA_SizeGadget
  1210.     EITEM WA_DragBar
  1211.     EITEM WA_DepthGadget
  1212.     EITEM WA_CloseGadget
  1213.     EITEM WA_Backdrop
  1214.     EITEM WA_ReportMouse
  1215.     EITEM WA_NoCareRefresh
  1216.     EITEM WA_Borderless
  1217.     EITEM WA_Activate
  1218.     EITEM WA_RMBTrap
  1219.     EITEM WA_WBenchWindow    ; PRIVATE!!
  1220.     EITEM WA_SimpleRefresh    ; only specify if TRUE
  1221.     EITEM WA_SmartRefresh    ; only specify if TRUE
  1222.     EITEM WA_SizeBRight
  1223.     EITEM WA_SizeBBottom
  1224.  
  1225.     ; New Boolean properties
  1226.     EITEM WA_AutoAdjust    ; shift or squeeze the window's position and
  1227.             ; dimensions to fit it on screen.
  1228.  
  1229.     EITEM WA_GimmeZeroZero    ; equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO
  1230.  
  1231.     ; New for V37: WA_MenuHelp (ignored by V36)
  1232.     EITEM WA_MenuHelp    ; Enables IDCMP_MENUHELP:  Pressing HELP during menus
  1233.             ; will return IDCMP_MENUHELP IDCMP message.
  1234.  
  1235.     ; New for V39:  (ignored by V37 and earlier)
  1236.     EITEM WA_NewLookMenus
  1237.             ; Set to TRUE if you want NewLook menus
  1238.  
  1239.     EITEM WA_AmigaKey    ; Pointer to image for Amiga-key equiv in menus
  1240.  
  1241.     EITEM WA_NotifyDepth
  1242.             ; Requests IDCMP_CHANGEWINDOW message when
  1243.             ; window is depth arranged
  1244.             ; (imsg->Code = CWCODE_DEPTH)
  1245.  
  1246.     EITEM WA_Obsolete
  1247.  
  1248.     EITEM WA_Pointer
  1249.             ; Allows you to specify a custom pointer
  1250.             ; for your window.  ti_Data points to a
  1251.             ; pointer object you obtained via
  1252.             ; "pointerclass". NULL signifies the
  1253.             ; default pointer.
  1254.             ; This tag may be passed to OpenWindowTags()
  1255.             ; or SetWindowPointer().
  1256.  
  1257.     EITEM WA_BusyPointer
  1258.             ; ti_Data is boolean.  Set to TRUE to
  1259.             ; request the standard busy pointer.
  1260.             ; This tag may be passed to OpenWindowTags()
  1261.             ; or SetWindowPointer().
  1262.  
  1263.     EITEM WA_PointerDelay
  1264.             ; ti_Data is boolean.  Set to TRUE to
  1265.             ; request that the changing of the
  1266.             ; pointer be slightly delayed.    The change
  1267.             ; will be called off if you call NewSetPointer()
  1268.             ; before the delay expires.  This allows
  1269.             ; you to post a busy-pointer even if you think
  1270.             ; the busy-time may be very short, without
  1271.             ; fear of a flashing pointer.
  1272.             ; This tag may be passed to OpenWindowTags()
  1273.             ; or SetWindowPointer().
  1274.  
  1275.     EITEM WA_TabletMessages
  1276.             ; ti_Data is a boolean.  Set to TRUE to
  1277.             ; request that tablet information be included
  1278.             ; in IntuiMessages sent to your window.
  1279.             ; Requires that something (i.e. a tablet driver)
  1280.             ; feed IESUBCLASS_NEWTABLET InputEvents into
  1281.             ; the system.  For a pointer to the TabletData,
  1282.             ; examine the ExtIntuiMessage->eim_TabletData
  1283.             ; field.  It is UNSAFE to check this field
  1284.             ; when running on pre-V39 systems.  It's always
  1285.             ; safe to check this field under V39 and up,
  1286.             ; though it may be NULL.
  1287.  
  1288.     EITEM WA_HelpGroup
  1289.             ; When the active window has gadget help enabled,
  1290.             ; other windows of the same HelpGroup number
  1291.             ; will also get GadgetHelp.  This allows GadgetHelp
  1292.             ; to work for multi-windowed applications.
  1293.             ; Use GetGroupID() to get an ID number.  Pass
  1294.             ; this number as ti_Data to all your windows.
  1295.             ; See also the HelpControl() function.
  1296.  
  1297.     EITEM WA_HelpGroupWindow
  1298.             ; When the active window has gadget help enabled,
  1299.             ; other windows of the same HelpGroup will also get
  1300.             ; GadgetHelp.  This allows GadgetHelp to work
  1301.             ; for multi-windowed applications.  As an alternative
  1302.             ; to WA_HelpGroup, you can pass a pointer to any
  1303.             ; other window of the same group to join its help
  1304.             ; group.  Defaults to NULL, which has no effect.
  1305.             ; See also the HelpControl() function.
  1306.  
  1307.  
  1308. *** End of Window attribute enumeration ***
  1309.  
  1310.  
  1311. * HelpControl() flags:
  1312. *
  1313. * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more
  1314. * windows.
  1315.  
  1316. HC_GADGETHELP    EQU    1
  1317.  
  1318.  
  1319.     IFND INTUITION_SCREENS_I
  1320.     INCLUDE "intuition/screens.i"
  1321.     ENDC
  1322.  
  1323.     IFND INTUITION_PREFERENCES_I
  1324.     INCLUDE "intuition/preferences.i"
  1325.     ENDC
  1326.  
  1327. ; ========================================================================
  1328. ; === Remember ===========================================================
  1329. ; ========================================================================
  1330. ; this structure is used for remembering what memory has been allocated to
  1331. ; date by a given routine, so that a premature abort or systematic exit
  1332. ; can deallocate memory cleanly, easily, and completely
  1333.  STRUCTURE Remember,0
  1334.  
  1335.     APTR rm_NextRemember
  1336.     LONG rm_RememberSize
  1337.     APTR rm_Memory
  1338.  
  1339.  LABEL    rm_SIZEOF
  1340.  
  1341. * How to tell Intuition about RGB values for a color table entry.
  1342. * NOTE:  The way the structure was defined, the color value was
  1343. * right-justified within each UWORD.  This poses problems for
  1344. * extensibility to more bits-per-gun.  The SA_Colors32 tag to
  1345. * OpenScreenTags() provides an alternate way to specify colors
  1346. * with greater precision.
  1347.  
  1348.  STRUCTURE ColorSpec,0
  1349.  
  1350.     WORD cs_ColorIndex    ; -1 terminates an array of ColorSpec
  1351.     UWORD cs_Red    ; only the _bottom_ 4 bits recognized
  1352.     UWORD cs_Green    ; only the _bottom_ 4 bits recognized
  1353.     UWORD cs_Blue    ; only the _bottom_ 4 bits recognized
  1354.  LABEL    cs_SIZEOF
  1355.  
  1356. * === Easy Requester Specification ======================================= *
  1357. * see also autodocs for EasyRequest and BuildEasyRequest
  1358. * NOTE: This structure may grow in size in the future
  1359.  
  1360.  STRUCTURE EasyStruct,0
  1361.  
  1362.     ULONG es_StructSize        ; should be es_SIZEOF
  1363.     ULONG es_Flags        ; should be 0 for now
  1364.     APTR  es_Title        ; title of requester window
  1365.     APTR  es_TextFormat        ; 'printf' style formatting string
  1366.     APTR  es_GadgetFormat    ; 'printf' style formatting string
  1367.  LABEL    es_SIZEOF
  1368.  
  1369.  
  1370.  
  1371. ; ======================================================================== 
  1372. ; === Miscellaneous ====================================================== 
  1373. ; ======================================================================== 
  1374.  
  1375. ; = MACROS ============================================================== 
  1376. ;#define MENUNUM(n) (n & 0x1F)
  1377. ;#define ITEMNUM(n) ((n >> 5) & 0x003F)
  1378. ;#define SUBNUM(n) ((n >> 11) & 0x001F)
  1379. ;
  1380. ;#define SHIFTMENU(n) (n & 0x1F)
  1381. ;#define SHIFTITEM(n) ((n & 0x3F) << 5)
  1382. ;#define SHIFTSUB(n) ((n & 0x1F) << 11)
  1383. ;
  1384. ;#define SRBNUM(n)  (0x08 - (n >> 4))  /* SerRWBits -> read bits per char */
  1385. ;#define SWBNUM(n)  (0x08 - (n & 0x0F))/* SerRWBits -> write bits per chr */
  1386. ;#define SSBNUM(n)  (0x01 + (n >> 4))  /* SerStopBuf -> stop bits per chr */
  1387. ;#define SPARNUM(n) (n >> 4)           /* SerParShk -> parity setting    */
  1388. ;#define SHAKNUM(n) (n & 0x0F)         /* SerParShk -> handshake mode    */
  1389. ;
  1390. ; = MENU STUFF =========================================================== 
  1391. NOMENU EQU    $001F
  1392. NOITEM EQU    $003F
  1393. NOSUB  EQU    $001F
  1394. MENUNULL EQU    $FFFF
  1395.  
  1396.  
  1397. ; = =RJ='s peculiarities =================================================
  1398. ;#define FOREVER for(;;)
  1399. ;#define SIGN(x) ( ((x) > 0) - ((x) < 0) )
  1400.  
  1401.  
  1402. ; these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  1403. ; I'll use a generic Width (for all resolutions) for the CheckMark.
  1404. ; If COMMSEQ, likewise I'll use this generic stuff
  1405. CHECKWIDTH    EQU    19
  1406. COMMWIDTH    EQU    27
  1407. LOWCHECKWIDTH    EQU    13
  1408. LOWCOMMWIDTH    EQU    16
  1409.  
  1410.  
  1411. ; these are the AlertNumber defines.  if you are calling DisplayAlert()
  1412. ; the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1413. ; of these patterns
  1414. ALERT_TYPE    EQU    $80000000
  1415. RECOVERY_ALERT    EQU    $00000000    ; the system can recover from this
  1416. DEADEND_ALERT    EQU    $80000000    ; no recovery possible, this is it
  1417.  
  1418.  
  1419. ; When you're defining IntuiText for the Positive and Negative Gadgets 
  1420. ; created by a call to AutoRequest(), these defines will get you 
  1421. ; reasonable-looking text.  The only field without a define is the IText
  1422. ; field; you decide what text goes with the Gadget
  1423. AUTOFRONTPEN    EQU    0
  1424. AUTOBACKPEN    EQU    1
  1425. AUTODRAWMODE    EQU    RP_JAM2
  1426. AUTOLEFTEDGE    EQU    6
  1427. AUTOTOPEDGE    EQU    3
  1428. AUTOITEXTFONT    EQU    0
  1429. AUTONEXTTEXT    EQU    0
  1430.  
  1431.  
  1432.  
  1433. ;* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) -------------------
  1434. SELECTUP    EQU    (IECODE_LBUTTON+IECODE_UP_PREFIX)
  1435. SELECTDOWN    EQU    (IECODE_LBUTTON)
  1436. MENUUP        EQU    (IECODE_RBUTTON+IECODE_UP_PREFIX)
  1437. MENUDOWN    EQU    (IECODE_RBUTTON)
  1438. MIDDLEUP    EQU    (IECODE_MBUTTON+IECODE_UP_PREFIX)
  1439. MIDDLEDOWN    EQU    (IECODE_MBUTTON)
  1440. ALTLEFT        EQU    (IEQUALIFIER_LALT)
  1441. ALTRIGHT    EQU    (IEQUALIFIER_RALT)
  1442. AMIGALEFT    EQU    (IEQUALIFIER_LCOMMAND)
  1443. AMIGARIGHT    EQU    (IEQUALIFIER_RCOMMAND)
  1444. AMIGAKEYS    EQU    (AMIGALEFT+AMIGARIGHT)
  1445.             
  1446. CURSORUP    EQU    $4C
  1447. CURSORLEFT    EQU    $4F
  1448. CURSORRIGHT    EQU    $4E
  1449. CURSORDOWN    EQU    $4D
  1450. KEYCODE_Q    EQU    $10
  1451. KEYCODE_Z    EQU    $31
  1452. KEYCODE_X    EQU    $32
  1453. KEYCODE_V       EQU    $34
  1454. KEYCODE_B       EQU    $35
  1455. KEYCODE_N    EQU    $36
  1456. KEYCODE_M    EQU    $37
  1457. KEYCODE_LESS    EQU    $38
  1458. KEYCODE_GREATER    EQU    $39
  1459.  
  1460.  
  1461.  
  1462. * New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass
  1463. * of the IECLASS_NEWPOINTERPOS event.  The ie_EventAddress of such
  1464. * an event points to a TabletData structure (see <devices/inputevent.i>
  1465. * for the definition.)
  1466. *
  1467. * The TabletData structure contains certain elements including a taglist.
  1468. * The taglist can be used for special tablet parameters.  A tablet driver
  1469. * should include only those tag-items the tablet supports.  An application
  1470. * can listen for any tag-items that interest it.  Note: an application
  1471. * must set the WA_TabletMessages attribute to TRUE to receive this
  1472. * extended information in its IntuiMessages.
  1473. *
  1474. * The definitions given here MUST be followed.  Pay careful attention
  1475. * to normalization and the interpretation of signs.
  1476. *
  1477. * TABLETA_TabletZ:  the current value of the tablet in the Z direction.
  1478. * This unsigned value should typically be in the natural units of the
  1479. * tablet.  You should also provide TABLETA_RangeZ.
  1480. *
  1481. * TABLETA_RangeZ:  the maximum value of the tablet in the Z direction.
  1482. * Normally specified along with TABLETA_TabletZ, this allows the
  1483. * application to scale the actual Z value across its range.
  1484. *
  1485. * TABLETA_AngleX:  the angle of rotation or tilt about the X-axis.  This
  1486. * number should be normalized to fill a signed long integer.  Positive
  1487. * values imply a clockwise rotation about the X-axis when viewing
  1488. * from +X towards the origin.
  1489. *
  1490. * TABLETA_AngleY:  the angle of rotation or tilt about the Y-axis.  This
  1491. * number should be normalized to fill a signed long integer.  Positive
  1492. * values imply a clockwise rotation about the Y-axis when viewing
  1493. * from +Y towards the origin.
  1494. *
  1495. * TABLETA_AngleZ:  the angle of rotation or tilt about the Z axis.  This
  1496. * number should be normalized to fill a signed long integer.  Positive
  1497. * values imply a clockwise rotation about the Z-axis when viewing
  1498. * from +Z towards the origin.
  1499. *
  1500. *    Note: a stylus that supports tilt should use the TABLETA_AngleX
  1501. *    and TABLETA_AngleY attributes.  Tilting the stylus so the tip
  1502. *    points towards increasing or decreasing X is actually a rotation
  1503. *    around the Y-axis.  Thus, if the stylus tip points towards
  1504. *    positive X, then that tilt is represented as a negative
  1505. *    TABLETA_AngleY.  Likewise, if the stylus tip points towards
  1506. *    positive Y, that tilt is represented by positive TABLETA_AngleX.
  1507. *
  1508. * TABLETA_Pressure:  the pressure reading of the stylus.  The pressure
  1509. * should be normalized to fill a signed long integer.  Typical devices
  1510. * won't generate negative pressure, but the possibility is not precluded.
  1511. * The pressure threshold which is considered to cause a button-click is
  1512. * expected to be set in a Preferences program supplied by the tablet
  1513. * vendor.  The tablet driver would send IECODE_LBUTTON-type events as
  1514. * the pressure crossed that threshold.
  1515. *
  1516. * TABLETA_ButtonBits:  ti_Data is a long integer whose bits are to
  1517. * be interpreted at the state of the first 32 buttons of the tablet.
  1518. *
  1519. * TABLETA_InProximity:    ti_Data is a boolean.  For tablets that support
  1520. * proximity, they should send the {TABLETA_InProximity,FALSE} tag item
  1521. * when the stylus is out of proximity.    One possible use we can forsee
  1522. * is a mouse-blanking commodity which keys off this to blank the
  1523. * mouse.  When this tag is absent, the stylus is assumed to be
  1524. * in proximity.
  1525.  
  1526. TABLETA_Dummy        EQU    TAG_USER+$3A000
  1527. TABLETA_TabletZ        EQU    TABLETA_Dummy+$01
  1528. TABLETA_RangeZ        EQU    TABLETA_Dummy+$02
  1529. TABLETA_AngleX        EQU    TABLETA_Dummy+$03
  1530. TABLETA_AngleY        EQU    TABLETA_Dummy+$04
  1531. TABLETA_AngleZ        EQU    TABLETA_Dummy+$05
  1532. TABLETA_Pressure    EQU    TABLETA_Dummy+$06
  1533. TABLETA_ButtonBits    EQU    TABLETA_Dummy+$07
  1534. TABLETA_InProximity    EQU    TABLETA_Dummy+$08
  1535.  
  1536.  
  1537. * If your window sets WA_TabletMessages to TRUE, then it will receive
  1538. * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData
  1539. * field points at a TabletData structure.  This structure contains
  1540. * additional information about the input event.
  1541.  
  1542.  STRUCTURE TabletData,0
  1543.     ; Sub-pixel position of tablet, in screen coordinates,
  1544.     ; scaled to fill a UWORD fraction:
  1545.     UWORD td_XFraction
  1546.     UWORD td_YFraction
  1547.  
  1548.     ; Current tablet coordinates along each axis:
  1549.     ULONG td_TabletX
  1550.     ULONG td_TabletY
  1551.  
  1552.     ; Tablet range along each axis.  For example, if td_TabletX
  1553.     ; can take values 0-999, td_RangeX should be 1000.
  1554.     ULONG td_RangeX
  1555.     ULONG td_RangeY
  1556.  
  1557.     ; Pointer to tag-list of additional tablet attributes.
  1558.     ; See <intuition/intuition.i> for the tag values.
  1559.     APTR td_TagList
  1560.  
  1561.     LABEL td_SIZEOF
  1562.  
  1563. * If a tablet driver supplies a hook for td_CallBack, it will be
  1564. * invoked in the standard hook manner.    A0 will point to the Hook
  1565. * itself, A2 will point to the InputEvent that was sent, and
  1566. * A1 will point to a TabletHookData structure.    The InputEvent's
  1567. * ie_EventAddress field points at the IENewTablet structure that
  1568. * the driver supplied.
  1569. *
  1570. * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  1571. * should scale the ient_TabletX and ient_TabletY fields and store the
  1572. * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  1573. * ient_ScaledYFraction.
  1574. *
  1575. * The tablet hook must currently return NULL.  This is the only
  1576. * acceptable return-value under V39.
  1577.  
  1578.  STRUCTURE TabletHookData,0
  1579.  
  1580.     ; Pointer to the active screen:
  1581.     ; Note: if there are no open screens, thd_Screen will be NULL.
  1582.     ; thd_Width and thd_Height will then describe an NTSC 640x400
  1583.     ; screen.  Please scale accordingly.
  1584.     APTR thd_Screen
  1585.  
  1586.     ; The width and height (measured in pixels of the active screen)
  1587.     ; that your are to scale to:
  1588.     ULONG thd_Width
  1589.     ULONG thd_Height
  1590.  
  1591.     ; Non-zero if the screen or something about the screen
  1592.     ; changed since the last time you were invoked:
  1593.     LONG thd_ScreenChanged
  1594.  
  1595.     LABEL thd_SIZEOF
  1596.  
  1597.     IFND    INTUITION_INTUITIONBASE_I
  1598.     INCLUDE    "intuition/intuitionbase.i"
  1599.     ENDC
  1600.  
  1601. * Include obsolete identifiers:
  1602.     IFND    INTUITION_IOBSOLETE_I
  1603.     INCLUDE "intuition/iobsolete.i"
  1604.     ENDC
  1605.  
  1606.     ENDC
  1607.