home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / asm / tbsource / questions / versions / 0.99d / qv99d.lzh / Questions2.0.i < prev    next >
Encoding:
Text File  |  1991-09-22  |  16.2 KB  |  498 lines

  1. ;
  2. ;Here are the 2.0 stuff needed
  3. ;
  4.  
  5.         INCLUDE    "FH1:Language/Include2.0/GadTools.xref"
  6.         INCLUDE    "FH1:Language/Include2.0/Intuition.xref"
  7.  
  8. UTILITY_TAGITEM_I SET    1    ;No errors thanks
  9.  
  10. ZOOMED        EQU $10000000    ; identifies "zoom state"
  11.  
  12. ;utility/tagitem.i
  13.  
  14.  
  15. ; =======================================================================
  16. ; ====    TagItem    ==========================================================
  17. ; =======================================================================
  18. ; This data type may propagate through the system for more general use.
  19. ; In the meantime, it is used as a general mechanism of extensible data
  20. ; arrays for parameter specification and property inquiry (coming soon
  21. ; to a display controller near you).
  22. ; In practice, an array (or chain of arrays) of TagItems is used.
  23.  
  24.  STRUCTURE    TagItem,0
  25.     ULONG    ti_Tag        ; identifies the type of this item
  26.     ULONG    ti_Data        ; type-specific data, can be a pointer
  27.     LABEL    ti_SIZEOF
  28.  
  29. ; ----    system tag values -----------------------------
  30. TAG_DONE   EQU    0    ; terminates array of TagItems. ti_Data unused
  31. TAG_IGNORE EQU    1    ; ignore this item, not end of array
  32. TAG_MORE   EQU    2    ; ti_Data is pointer to another array of TagItems
  33.             ; note that this tag terminates the current array
  34.  
  35. ; ----    user tag identification -----------------------
  36. TAG_USER  EQU    $80000000    ; differentiates user tags from system tags
  37.  
  38. ; until further notice, tag bits 16-30 are RESERVED and should be zero.
  39. ; Also, the value (TAG_USER | 0) should never be used as a tag value.
  40.  
  41.  
  42. ;exec/types.i
  43.  
  44. **
  45. ** Enumerated variables.  Use ENUM to set a base number, and EITEM to assign
  46. ** incrementing values.  ENUM can be used to set a new base at any time.
  47. **
  48. ENUM        MACRO   ;[new base]
  49.         IFC     '\1',''
  50. EOFFSET        SET        0        ; Default to zero
  51.         ENDC
  52.         IFNC    '\1',''
  53. EOFFSET        SET     \1
  54.         ENDC
  55.         ENDM
  56.  
  57. EITEM        MACRO   ;label
  58. \1        EQU     EOFFSET
  59. EOFFSET     SET     EOFFSET+1
  60.         ENDM
  61.  
  62.  
  63. ;Intuition/intuition.i
  64. ;Window stuff
  65.  
  66.     ENUM TAG_USER+100
  67.  
  68.     ; these tags simply override NewWindow parameters
  69.     EITEM WA_Left
  70.     EITEM WA_Top
  71.     EITEM WA_Width
  72.     EITEM WA_Height
  73.     EITEM WA_DetailPen
  74.     EITEM WA_BlockPen
  75.     EITEM WA_IDCMP
  76.     EITEM WA_Flags    ; not implemented at present
  77.     EITEM WA_Gadgets
  78.     EITEM WA_Checkmark
  79.     EITEM WA_Title
  80.     EITEM WA_ScreenTitle    ; means you don't have to call SetWindowTitles
  81.                  ; after you open your window
  82.  
  83.     EITEM WA_CustomScreen
  84.     EITEM WA_SuperBitMap    ; also implies SUPER_BITMAP property
  85.     EITEM WA_MinWidth
  86.     EITEM WA_MinHeight
  87.     EITEM WA_MaxWidth
  88.     EITEM WA_MaxHeight
  89.  
  90.     ; The following are specifications for new features
  91.  
  92.     EITEM WA_InnerWidth
  93.     EITEM WA_InnerHeight ; You can specify the dimensions of the interior
  94.              ; region of your window, independent of what
  95.              ; the border widths will be.  These are
  96.              ; *supposed* to imply the EITEM WA_AutoAdjust property,
  97.              ; but there is a bug report that says they don't.
  98.  
  99.  
  100.     EITEM WA_PubScreenName    ; declares that you want the window to open as
  101.              ; a visitor on the public screen whose name is
  102.              ; pointed to by (UBYTE *) ti_Data
  103.  
  104.     EITEM WA_PubScreen    ; open as a visitor window on the public screen
  105.             ; whose address is in (struct Screen *) ti_Data.
  106.             ; To insure that this screen remains open, you
  107.             ; should either be the screen's owner, have a
  108.             ; window open on the screen, or use LockPubScreen().
  109.  
  110.     EITEM WA_PubScreenFallBack    ; A Boolean, specifies whether a visitor window
  111.              ; should "fall back" to the default public screen
  112.              ; (or Workbench) if the named public screen isn't
  113.              ; available
  114.  
  115.     EITEM WA_WindowName    ; not implemented
  116.     EITEM WA_Colors    ; a ColorSpec array for colors to be set
  117.             ; when this window is active.  This is not
  118.             ; implemented, and may not be, since the default
  119.             ; values to restore would be hard to track.
  120.             ; We'd like to at least support per-window colors
  121.             ; for the mouse pointer sprite.
  122.  
  123.     EITEM WA_Zoom    ; ti_Data points to an array of four WORD's,
  124.             ; the initial Left/Top/Width/Height values of
  125.             ; the "alternate" zoom position/dimensions.
  126.             ; It also specifies that you want a Zoom gadget
  127.             ; for your window, whether or not you have a
  128.             ; sizing gadget.
  129.  
  130.     EITEM WA_MouseQueue    ; ti_Data contains initial value for the mouse
  131.             ; message backlog limit for this window.
  132.  
  133.     EITEM WA_BackFill    ; unimplemented at present: provides a "backfill
  134.             ; hook" for your window's layer.
  135.  
  136.     EITEM WA_RptQueue    ; initial value of repeat key backlog limit
  137.  
  138.     ; These Boolean tag items are alternatives to the NewWindow.Flags
  139.     ; boolean flags with similar names.
  140.  
  141.     EITEM WA_SizeGadget
  142.     EITEM WA_DragBar
  143.     EITEM WA_DepthGadget
  144.     EITEM WA_CloseGadget
  145.     EITEM WA_Backdrop
  146.     EITEM WA_ReportMouse
  147.     EITEM WA_NoCareRefresh
  148.     EITEM WA_Borderless
  149.     EITEM WA_Activate
  150.     EITEM WA_RMBTrap
  151.     EITEM WA_WBenchWindow    ; PRIVATE!!
  152.     EITEM WA_SimpleRefresh    ; only specify if TRUE
  153.     EITEM WA_SmartRefresh    ; only specify if TRUE
  154.     EITEM WA_SizeBRight
  155.     EITEM WA_SizeBBottom
  156.  
  157.     ; New Boolean properties
  158.     EITEM WA_AutoAdjust    ; shift or squeeze the window's position and
  159.             ; dimensions to fit it on screen.
  160.  
  161.     EITEM WA_GimmeZeroZero    ; equiv. to NewWindow.Flags GIMMEZEROZERO
  162.  
  163.         INCLUDE    "FH1:Language/Include2.0/Intuition/gadgetclass.i"
  164.         INCLUDE    "FH1:Language/Include2.0/libraries/gadtools.i"
  165.  
  166. ;intuition/screens.i
  167.  
  168. ; ========================================================================
  169. ; === DrawInfo =========================================================
  170. ; ========================================================================
  171.  
  172. * This is a packet of information for graphics rendering.  It originates
  173. * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  174.  
  175. * If you find dri_Version >= RT_VERSION, you know this structure
  176. * has at least the fields defined in this version of the include file
  177.  
  178. DRI_VERSION    EQU    1
  179.  
  180.  STRUCTURE DrawInfo,0
  181.     UWORD    dri_Version     ; will be  DRI_VERSION
  182.     UWORD    dri_NumPens     ; guaranteed to be >= numDrIPens
  183.     APTR    dri_Pens     ; pointer to pen array
  184.     APTR    dri_Font     ; screen default font
  185.     UWORD    dri_Depth     ; (initial) depth of screen bitmap
  186.     ; from DisplayInfo database for initial display mode
  187.     UWORD    dri_ResolutionX
  188.     UWORD    dri_ResolutionY
  189.     ULONG    dri_Flags
  190.    STRUCT    dri_longreserved,28
  191.  
  192. DRIF_NEWLOOK    EQU    $00000001 ; specified SA_Pens, full treatment
  193. DRIB_NEWLOOK    EQU    0
  194.  
  195.     ; rendering pen number indexes into DrawInfo.dri_Pens[]
  196.     ENUM
  197.     EITEM    detailPen    ; compatible Intuition rendering pens
  198.     EITEM    blockPen,
  199.     EITEM    textPen        ; text on background (pen = 0)
  200.     EITEM    shinePen    ; bright edge on bas-relief
  201.     EITEM    shadowPen    ; dark edge
  202.     EITEM    hifillPen    ; active window fill
  203.     EITEM    hifilltextPen    ; text over hifillPen
  204.     EITEM    backgroundPen    ; always color 0
  205.     EITEM    hilighttextPen    ; highlighted text, against backgroundPen
  206.     EITEM    numDrIPens
  207.  
  208. NS_EXTENDED    EQU    $1000    ; means ns_Extenion is valid
  209. AUTOSCROLL    EQU    $4000    ; automatic scrolling of large raster
  210.  
  211. * Screen attribute tag ID's.  These are used in the ti_Tag field of
  212. * TagItem arrays passed to OpenScreenTagList() (or in the outmoded
  213. * ExtNewScreen.Extension field).
  214.  
  215. * these are the modernized versions of the screen attribute tags.
  216. * Please use these.
  217.  
  218.  ENUM TAG_USER+33
  219. *   these items specify items equivalent to fields in NewScreen
  220.     EITEM SA_Left    ; traditional screen positions    and dimensions
  221.     EITEM SA_Top
  222.     EITEM SA_Width
  223.     EITEM SA_Height
  224.     EITEM SA_Depth    ; screen bitmap depth
  225.     EITEM SA_DetailPen    ; serves as default for windows, too
  226.     EITEM SA_BlockPen
  227.     EITEM SA_Title    ; default screen title
  228.  
  229.     EITEM SA_Colors    ; ti_Data is an array of struct ColorSpec, 
  230.             ; terminated by ColorIndex = -1.  Specifies 
  231.             ; initial screen palette colors.
  232.  
  233.     EITEM SA_ErrorCode    ; ti_Data points to LONG error code (values below)
  234.     EITEM SA_Font    ; equiv. to NewScreen.Font
  235.     EITEM SA_SysFont    ; Selects one of the preferences system fonts:
  236.             ;    0 - old DefaultFont, fixed-width
  237.             ;    1 - WB Screen preferred font
  238.  
  239.  
  240.     EITEM SA_Type    ; equiv. to NewScreen.Type
  241.     EITEM SA_BitMap    ; ti_Data is pointer to custom BitMap.  This
  242.             ; implies type of CUSTOMBITMAP    
  243.  
  244.     EITEM SA_PubName    ; presence of this tag means that the screen
  245.             ; is to be a public screen.  Please specify
  246.             ; BEFORE the two tags below
  247.  
  248.     EITEM SA_PubSig
  249.     EITEM SA_PubTask    ; Task ID and signal for being notified that
  250.             ; the last window has closed on a public screen.
  251.  
  252.  
  253.     EITEM SA_DisplayID    ; ti_Data is new extended display ID from 
  254.             ; <graphics/displayinfo.h>.
  255.  
  256.     EITEM SA_DClip    ; ti_Data points to a rectangle which defines
  257.             ; screen display clip region
  258.  
  259.     EITEM SA_Overscan    ; was S_STDDCLIP.  Set to one of the OSCAN_
  260.             ; specifiers below to get a system standard
  261.             ; overscan region for your display clip,
  262.             ; screen dimensions (unless otherwise specified),
  263.             ; and automatically centered position (partial
  264.             ; support only so far).
  265.  
  266.     EITEM SA_Obsolete1    ; obsolete S_MONITORNAME
  267.  
  268. *   booleans *
  269.     EITEM SA_ShowTitle    ; boolean equivalent to flag SHOWTITLE
  270.     EITEM SA_Behind    ; boolean equivalent to flag SCREENBEHIND
  271.     EITEM SA_Quiet    ; boolean equivalent to flag SCREENQUIET
  272.     EITEM SA_AutoScroll    ; boolean equivalent to flag AUTOSCROLL
  273.     EITEM SA_Pens    ; array as in DrawInfo, terminated by -1
  274.     EITEM SA_FullPalette ; boolean: initialize color table to entire
  275.                 ;  preferences palette (32 for V36), rather
  276.              ; than compatible pens 0-3, 17-19, with
  277.              ; remaining palette as returned by GetColorMap()
  278.  
  279.  
  280. * OpenScreen error codes, which are returned in the (optional) LONG
  281. * pointed to by ti_Data for the SA_ErrorCode tag item
  282.  
  283. OSERR_NOMONITOR    EQU    (1)    ; named monitor spec not available
  284. OSERR_NOCHIPS    EQU    (2)    ; you need newer custom chips    
  285. OSERR_NOMEM    EQU    (3)    ; couldn't get normal memory
  286. OSERR_NOCHIPMEM    EQU    (4)    ; couldn't get chipmem
  287. OSERR_PUBNOTUNIQUE    EQU (5)    ; public screen name already used
  288. OSERR_UNKNOWNMODE    EQU (6)    ; don't recognize mode asked for
  289.  
  290. ; For compatibility reasons, we need a new structure for extending
  291. ; NewScreen.  Use this structure is you need to use the new Extension
  292. ; field.
  293. ; NOTE WELL: this structure may be extended again in the future.
  294. ;Writing code which depends on its size is not allowed.
  295.  
  296.  STRUCTURE ExtNewScreen,ns_SIZEOF
  297.  
  298.     APTR ens_Extension        ; struct TagItem *
  299.                 ; more specification data, scanned if
  300.                 ; NS_EXTENDED is set in ns_Type
  301.  
  302.  LABEL    ens_SIZEOF
  303.  
  304. * === Overscan Types ===
  305. OSCAN_TEXT    EQU    1    ; entirely visible
  306. OSCAN_STANDARD    EQU    2    ; just past edges
  307. OSCAN_MAX    EQU    3    ; as much as possible
  308. OSCAN_VIDEO    EQU    4    ; even more than is possible
  309.  
  310.  
  311. * === Public Shared Screen Node ===
  312.  
  313. * This is the representative of a public shared screen.
  314. * This is an internal data structure, but some functions may
  315. * present a copy of it to the calling application.  In that case,
  316. * be aware that the screen pointer of the structure can NOT be
  317. * used safely, since there is no guarantee that the referenced
  318. * screen will remain open and a valid data structure.
  319.  
  320.  STRUCTURE PubScreenNode,LN_SIZE
  321.     APTR    psn_Screen    ; pointer to screen itself
  322.     UWORD    psn_Flags    ; below
  323.     WORD    psn_Size    ; includes name buffer size
  324.     WORD    psn_VisitorCount ; how many visitor windows
  325.     APTR    psn_SigTask    ; who to signal when visitors gone
  326.     UBYTE    psn_SigBit    ; which signal
  327.     UBYTE    psn_Pad1    ; word align
  328.  LABEL        psn_SIZEOF
  329.  
  330. * psn_Flags values
  331. PSNF_PRIVATE    EQU    $0001
  332.  
  333. MAXPUBSCREENNAME EQU    139    ; names no longer, please
  334.  
  335. ; pub screen modes
  336. SHANGHAI    EQU    $0001    ; put workbench windows on pub screen
  337. POPPUBSCREEN    EQU    $0002    ; pop pub screen to front when visitor opens
  338.  
  339. **
  340. **  $Filename: intuition/imageclass.i $
  341. **  $Release: 2.0 release 1 $
  342. **  $Revision: 1.1 $
  343. **  $Date: 90/07/12 $
  344. **
  345. **  Definitions for the image classes
  346. **
  347. **  (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  348. **        All Rights Reserved
  349. **
  350.  
  351. CUSTOMIMAGEDEPTH    EQU (-1)
  352. * if image.Depth is this, it's a new Image class object
  353.  
  354. ******************************************************
  355. IMAGE_ATTRIBUTES    EQU (TAG_USER+$20000)
  356.  
  357. IA_LEFT        EQU (IMAGE_ATTRIBUTES+$0001)
  358. IA_TOP        EQU (IMAGE_ATTRIBUTES+$0002)
  359. IA_WIDTH    EQU (IMAGE_ATTRIBUTES+$0003)
  360. IA_HEIGHT    EQU (IMAGE_ATTRIBUTES+$0004)
  361. IA_FGPEN    EQU (IMAGE_ATTRIBUTES+$0005)
  362.             ; IA_FGPEN also means "PlanePick"
  363. IA_BGPEN    EQU (IMAGE_ATTRIBUTES+$0006)
  364.             ; IA_BGPEN also means "PlaneOnOff"
  365. IA_DATA        EQU (IMAGE_ATTRIBUTES+$0007)
  366.             ; bitplanes, for classic image,
  367.             ; other image classes may use it for other things
  368. IA_LINEWIDTH    EQU (IMAGE_ATTRIBUTES+$0008)
  369. IA_PENS        EQU (IMAGE_ATTRIBUTES+$000E)
  370.             ; pointer to UWORD pens[],
  371.             ; ala DrawInfo.Pens, MUST be
  372.             ; terminated by ~0.  Some classes can
  373.             ; choose to have this, or SYSIA_DrawInfo,
  374.             ; or both.
  375. IA_RESOLUTION    EQU (IMAGE_ATTRIBUTES+$000F)
  376.             ; packed uwords for x/y resolution into a longword
  377.             ; ala DrawInfo.Resolution
  378.  
  379. * see class documentation to learn which 
  380. * classes recognize these
  381. IA_APATTERN    EQU (IMAGE_ATTRIBUTES+$0010)
  382. IA_APATSIZE    EQU (IMAGE_ATTRIBUTES+$0011)
  383. IA_MODE        EQU (IMAGE_ATTRIBUTES+$0012)
  384. IA_FONT        EQU (IMAGE_ATTRIBUTES+$0013)
  385. IA_OUTLINE    EQU (IMAGE_ATTRIBUTES+$0014)
  386. IA_RECESSED    EQU (IMAGE_ATTRIBUTES+$0015)
  387. IA_DOUBLEEMBOSS    EQU (IMAGE_ATTRIBUTES+$0016)
  388. IA_EDGESONLY    EQU (IMAGE_ATTRIBUTES+$0017)
  389.  
  390. * "sysiclass" attributes
  391. SYSIA_Size    EQU (IMAGE_ATTRIBUTES+$000B)
  392.             ; EQU's below
  393. SYSIA_Depth    EQU (IMAGE_ATTRIBUTES+$000C)
  394.             ; this is unused by Intuition.  SYSIA_DrawInfo
  395.             ; is used instead for V36
  396. SYSIA_Which    EQU (IMAGE_ATTRIBUTES+$000D)
  397.             ; see EQU's below
  398. SYSIA_DrawInfo    EQU (IMAGE_ATTRIBUTES+$0018)
  399.             ; pass to sysiclass, please
  400.  
  401. *  obsolete: don't use these, use IA_PENS
  402. SYSIA_Pens    EQU IA_PENS
  403. IA_SHADOWPEN    EQU (IMAGE_ATTRIBUTES+$0009)
  404. IA_HIGHLIGHTPEN    EQU (IMAGE_ATTRIBUTES+$000A)
  405.  
  406. * next attribute: (IMAGE_ATTRIBUTES+$0019)
  407. ******************************************************
  408.  
  409. * data values for SYSIA_Size
  410. SYSISIZE_MEDRES    EQU (0)
  411. SYSISIZE_LOWRES    EQU (1)
  412. SYSISIZE_HIRES    EQU (2)
  413.  
  414. *
  415. * SYSIA_Which tag data values:
  416. * Specifies which system gadget you want an image for.
  417. * Some numbers correspond to internal Intuition #defines
  418. DEPTHIMAGE    EQU ($00)
  419. ZOOMIMAGE    EQU ($01)
  420. SIZEIMAGE    EQU ($02)
  421. CLOSEIMAGE    EQU ($03)
  422. SDEPTHIMAGE    EQU ($05)        ; screen depth gadget
  423. LEFTIMAGE    EQU ($0A)
  424. UPIMAGE        EQU ($0B)
  425. RIGHTIMAGE    EQU ($0C)
  426. DOWNIMAGE    EQU ($0D)
  427. CHECKIMAGE    EQU ($0E)
  428. MXIMAGE        EQU ($0F)    ; mutual exclude "button"
  429.  
  430. * image message id's
  431. IM_DRAW        EQU ($0202)    ; draw yourself, with "state"
  432. IM_HITTEST    EQU ($0203)    ; return TRUE if click hits image
  433. IM_ERASE    EQU ($0204)    ; erase yourself
  434. IM_MOVE        EQU ($0205)    ; draw new and erase old, smoothly
  435.  
  436. IM_DRAWFRAME    EQU ($0206)    ; draw with specified dimensions
  437. IM_FRAMEBOX    EQU ($0207)    ; get recommended frame around some box
  438. IM_HITFRAME    EQU ($0208)    ; hittest with dimensions
  439. IM_ERASEFRAME    EQU ($0209)    ; hittest with dimensions
  440.  
  441. * image draw states or styles, for IM_DRAW
  442. IDS_NORMAL        EQU (0)
  443. IDS_SELECTED        EQU (1)    ; for selected gadgets
  444. IDS_DISABLED        EQU (2)    ; for disabled gadgets
  445. IDS_BUSY        EQU (3)    ; for future functionality
  446. IDS_INDETERMINATE    EQU (4)    ; for future functionality
  447. IDS_INACTIVENORMAL    EQU (5)    ; normal, in inactive window border
  448. IDS_INACTIVESELECTED    EQU (6)    ; selected, in inactive border
  449. IDS_INACTIVEDISABLED    EQU (7)    ; disabled, in inactive border
  450.  
  451. * oops, please forgive spelling error by jimm
  452. IDS_INDETERMINANT EQU IDS_INDETERMINATE
  453.  
  454. * IM_FRAMEBOX
  455.  STRUCTURE impFrameBox,4        ; starts with ULONG MethodID
  456.     APTR    impf_ContentsBox    ; input: relative box of contents
  457.     APTR    impf_FrameBox    ; output: rel. box of encl frame
  458.     APTR    impf_DrInfo
  459.     LONG    impf_FrameFlags
  460.  
  461. ; Make do with the dimensions of FrameBox provided.
  462. FRAMEB_SPECIFY    EQU (0)
  463. FRAMEF_SPECIFY    EQU (1)
  464.  
  465.  
  466. * IM_DRAW, IM_DRAWFRAME
  467.  STRUCTURE impDraw,4        ; starts with ULONG MethodID
  468.     APTR    impd_RPort
  469.     WORD    impd_OffsetX
  470.     WORD    impd_OffsetY
  471.     ULONG    impd_State
  472.     APTR    impd_DrInfo
  473.     ; these parameters only valid for IM_DRAWFRAME
  474.     WORD    impd_DimensionsWidth
  475.     WORD    impd_DimensionsHeight
  476.  
  477. * IM_ERASE, IM_ERASEFRAME
  478. * NOTE: This is a subset of impDraw
  479.  STRUCTURE impErase,4        ; starts with ULONG MethodID
  480.     APTR    impe_RPort
  481.     WORD    impe_OffsetX
  482.     WORD    impe_OffsetY
  483.     ; these parameters only valid for IM_ERASEFRAME
  484.     WORD    impe_DimensionsWidth
  485.     WORD    impe_DimensionsHeight
  486.  
  487. * IM_HITTEST, IM_HITFRAME
  488.  STRUCTURE impHitTest,4        ; starts with ULONG MethodID
  489.     ; these parameters only valid for IM_ERASEFRAME
  490.     WORD    imph_PointX
  491.     WORD    imph_PointY
  492.     ; these parameters only valid for IM_HITFRAME
  493.     WORD    imph_DimensionsWidth
  494.     WORD    imph_DimensionsHeight
  495.  
  496.