home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.1 / includes / intuition / screens.i < prev    next >
Encoding:
Text File  |  1992-09-11  |  11.3 KB  |  347 lines

  1.     IFND  INTUITION_SCREENS_I
  2. INTUITION_SCREENS_I    SET  1
  3. **
  4. **    $VER: screens.i 36.18 (07.10.91)
  5. **    Includes Release 38.56
  6. **
  7. **    The Screen and NewScreen structures and attributes
  8. **
  9. **    (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.     IFND EXEC_TYPES_I
  13.     INCLUDE "exec/types.i"
  14.     ENDC
  15.  
  16.     IFND GRAPHICS_GFX_I
  17.     INCLUDE "graphics/gfx.i"
  18.     ENDC
  19.  
  20.     IFND GRAPHICS_CLIP_I
  21.     INCLUDE "graphics/clip.i"
  22.     ENDC
  23.  
  24.     IFND GRAPHICS_VIEW_I
  25.     INCLUDE "graphics/view.i"
  26.     ENDC
  27.  
  28.     IFND GRAPHICS_RASTPORT_I
  29.     INCLUDE "graphics/rastport.i"
  30.     ENDC
  31.  
  32.     IFND GRAPHICS_LAYERS_I
  33.     INCLUDE "graphics/layers.i"
  34.     ENDC
  35.  
  36.     IFND UTILITY_TAGITEM_I
  37.     INCLUDE "utility/tagitem.i"
  38.     ENDC
  39.  
  40. *
  41. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  42. *
  43.  
  44. ; ========================================================================
  45. ; === DrawInfo =========================================================
  46. ; ========================================================================
  47.  
  48. * This is a packet of information for graphics rendering.  It originates
  49. * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  50.  
  51. * If you find dri_Version >= DRI_VERSION, you know this structure
  52. * has at least the fields defined in this version of the include file
  53.  
  54. DRI_VERSION    EQU    1
  55.  
  56.  STRUCTURE DrawInfo,0
  57.     UWORD    dri_Version     ; will be  DRI_VERSION
  58.     UWORD    dri_NumPens     ; guaranteed to be >= NUMDRIPENS
  59.     APTR    dri_Pens     ; pointer to pen array
  60.     APTR    dri_Font     ; screen default font
  61.     UWORD    dri_Depth     ; (initial) depth of screen bitmap
  62.     ; from DisplayInfo database for initial display mode
  63.     UWORD    dri_ResolutionX
  64.     UWORD    dri_ResolutionY
  65.     ULONG    dri_Flags
  66.    STRUCT    dri_longreserved,28
  67.  
  68. DRIF_NEWLOOK    EQU    $00000001 ; specified SA_Pens, full treatment
  69. DRIB_NEWLOOK    EQU    0
  70.  
  71.     ; rendering pen number indexes into DrawInfo.dri_Pens[]
  72.     ENUM
  73.     EITEM    DETAILPEN    ; compatible Intuition rendering pens
  74.     EITEM    BLOCKPEN,
  75.     EITEM    TEXTPEN        ; text on background (pen = 0)
  76.     EITEM    SHINEPEN    ; bright edge on bas-relief
  77.     EITEM    SHADOWPEN    ; dark edge
  78.     EITEM    FILLPEN        ; active window fill
  79.     EITEM    FILLTEXTPEN    ; text over FILLPEN
  80.     EITEM    BACKGROUNDPEN    ; always color 0
  81.     EITEM    HIGHLIGHTTEXTPEN  ; highlighted text, against BACKGROUNDPEN
  82.     EITEM    NUMDRIPENS
  83.  
  84.  
  85. ; ========================================================================
  86. ; === Screen =============================================================
  87. ; ========================================================================
  88.  STRUCTURE Screen,0
  89.  
  90.     APTR sc_NextScreen        ; linked list of screens
  91.     APTR sc_FirstWindow        ; linked list Screen's Windows
  92.  
  93.     WORD sc_LeftEdge        ; parameters of the screen
  94.     WORD sc_TopEdge        ; parameters of the screen
  95.  
  96.     WORD sc_Width        ; null-terminated Title text
  97.     WORD sc_Height        ; for Windows without ScreenTitle
  98.  
  99.     WORD sc_MouseY        ; position relative to upper-left
  100.     WORD sc_MouseX        ; position relative to upper-left
  101.  
  102.     WORD sc_Flags        ; see definitions below
  103.  
  104.     APTR sc_Title
  105.     APTR sc_DefaultTitle
  106.  
  107.     ; Bar sizes for this Screen and all Window's in this Screen
  108.     BYTE sc_BarHeight
  109.     BYTE sc_BarVBorder
  110.     BYTE sc_BarHBorder
  111.     BYTE sc_MenuVBorder
  112.     BYTE sc_MenuHBorder
  113.     BYTE sc_WBorTop
  114.     BYTE sc_WBorLeft
  115.     BYTE sc_WBorRight
  116.     BYTE sc_WBorBottom
  117.  
  118.     BYTE sc_KludgeFill00    ; This is strictly for word-alignment
  119.  
  120.     ; the display data structures for this Screen
  121.     APTR sc_Font            ; this screen's default font
  122.     STRUCT sc_ViewPort,vp_SIZEOF    ; describing the Screen's display
  123.     STRUCT sc_RastPort,rp_SIZEOF    ; describing Screen rendering
  124.     STRUCT sc_BitMap,bm_SIZEOF        ; auxiliary graphexcess baggage
  125.     STRUCT sc_LayerInfo,li_SIZEOF    ; each screen gets a LayerInfo
  126.  
  127.     APTR sc_FirstGadget
  128.  
  129.     BYTE sc_DetailPen        ; for bar/border/gadget rendering
  130.     BYTE sc_BlockPen        ; for bar/border/gadget rendering
  131.  
  132.     ; the following variable(s) are maintained by Intuition to support the
  133.     ; DisplayBeep() color flashing technique
  134.     WORD sc_SaveColor0
  135.  
  136.     ; This layer is for the Screen and Menu bars
  137.     APTR sc_BarLayer        ; was "BarLayer"
  138.  
  139.     APTR sc_ExtData
  140.  
  141.     APTR sc_UserData        ; general-purpose pointer to User data
  142.  
  143.     LABEL sc_SIZEOF    ; actually, you have no business talking about
  144.             ; or relying on the size of a screen structure
  145.  
  146.  
  147. ; --- FLAGS SET BY INTUITION -------------------------------------------------
  148. ; The SCREENTYPE bits are reserved for describing various Screen types
  149. ; available under Intuition.
  150. SCREENTYPE    EQU    $000F    ; all the screens types available
  151. ; --- the definitions for the Screen Type ------------------------------------
  152. WBENCHSCREEN    EQU    $0001    ; identifies the Workbench screen
  153. PUBLICSCREEN    EQU    $0002    ; public shared (custom) screen
  154. CUSTOMSCREEN    EQU    $000F    ; for that special look
  155.  
  156. SHOWTITLE    EQU    $0010    ; this gets set by a call to ShowTitle()
  157.  
  158. BEEPING    EQU    $0020    ; set when Screen is beeping
  159.  
  160. CUSTOMBITMAP    EQU    $0040    ; if you are supplying your own BitMap
  161.  
  162. SCREENBEHIND    EQU    $0080    ; if you want your screen to open behind
  163.                 ; already open screens
  164.  
  165. SCREENQUIET    EQU    $0100    ; if you do not want Intuition to render
  166.                 ; into your screen (gadgets, title)
  167.  
  168. SCREENHIRES    EQU    $0200    ; do not use lowres gadgets (set by intuition)
  169.  
  170. STDSCREENHEIGHT    EQU    -1    ; supply in NewScreen.Height
  171. STDSCREENWIDTH    EQU    -1    ; supply in NewScreen.Width
  172.  
  173. NS_EXTENDED    EQU    $1000    ; means ns_Extenion is valid
  174. AUTOSCROLL    EQU    $4000    ; automatic scrolling of large raster
  175.  
  176. * Screen attribute tag ID's.  These are used in the ti_Tag field of
  177. * TagItem arrays passed to OpenScreenTagList() (or in the
  178. * ExtNewScreen.Extension field).
  179.  
  180. * Screen attribute tags.  Please use these versions, not those in
  181. * iobsolete.h.
  182.  
  183.  ENUM TAG_USER+33
  184. *   these items specify items equivalent to fields in NewScreen
  185.     EITEM SA_Left    ; traditional screen positions    and dimensions
  186.     EITEM SA_Top
  187.     EITEM SA_Width
  188.     EITEM SA_Height
  189.     EITEM SA_Depth    ; screen bitmap depth
  190.     EITEM SA_DetailPen    ; serves as default for windows, too
  191.     EITEM SA_BlockPen
  192.     EITEM SA_Title    ; default screen title
  193.  
  194.     EITEM SA_Colors    ; ti_Data is an array of struct ColorSpec, 
  195.             ; terminated by ColorIndex = -1.  Specifies 
  196.             ; initial screen palette colors.
  197.  
  198.     EITEM SA_ErrorCode    ; ti_Data points to LONG error code (values below)
  199.     EITEM SA_Font    ; equiv. to NewScreen.Font
  200.     EITEM SA_SysFont    ; Selects one of the preferences system fonts:
  201.             ;    0 - old DefaultFont, fixed-width
  202.             ;    1 - WB Screen preferred font
  203.  
  204.  
  205.     EITEM SA_Type    ; equiv. to NewScreen.Type
  206.     EITEM SA_BitMap    ; ti_Data is pointer to custom BitMap.  This
  207.             ; implies type of CUSTOMBITMAP    
  208.  
  209.     EITEM SA_PubName    ; presence of this tag means that the screen
  210.             ; is to be a public screen.  Please specify
  211.             ; BEFORE the two tags below
  212.  
  213.     EITEM SA_PubSig
  214.     EITEM SA_PubTask    ; Task ID and signal for being notified that
  215.             ; the last window has closed on a public screen.
  216.  
  217.  
  218.     EITEM SA_DisplayID    ; ti_Data is new extended display ID from 
  219.             ; <graphics/displayinfo.h>.
  220.  
  221.     EITEM SA_DClip    ; ti_Data points to a rectangle which defines
  222.             ; screen display clip region
  223.  
  224.     EITEM SA_Overscan    ; was S_STDDCLIP.  Set to one of the OSCAN_
  225.             ; specifiers below to get a system standard
  226.             ; overscan region for your display clip,
  227.             ; screen dimensions (unless otherwise specified),
  228.             ; and automatically centered position (partial
  229.             ; support only so far).
  230.  
  231.     EITEM SA_Obsolete1    ; obsolete S_MONITORNAME
  232.  
  233. *   booleans *
  234.     EITEM SA_ShowTitle    ; boolean equivalent to flag SHOWTITLE
  235.     EITEM SA_Behind    ; boolean equivalent to flag SCREENBEHIND
  236.     EITEM SA_Quiet    ; boolean equivalent to flag SCREENQUIET
  237.     EITEM SA_AutoScroll    ; boolean equivalent to flag AUTOSCROLL
  238.     EITEM SA_Pens    ; array as in DrawInfo, terminated by -1
  239.     EITEM SA_FullPalette ; boolean: initialize color table to entire
  240.                 ;  preferences palette (32 for V36), rather
  241.              ; than compatible pens 0-3, 17-19, with
  242.              ; remaining palette as returned by GetColorMap()
  243.  
  244.  
  245. * OpenScreen error codes, which are returned in the (optional) LONG
  246. * pointed to by ti_Data for the SA_ErrorCode tag item
  247.  
  248. OSERR_NOMONITOR    EQU    (1)    ; named monitor spec not available
  249. OSERR_NOCHIPS    EQU    (2)    ; you need newer custom chips    
  250. OSERR_NOMEM    EQU    (3)    ; couldn't get normal memory
  251. OSERR_NOCHIPMEM    EQU    (4)    ; couldn't get chipmem
  252. OSERR_PUBNOTUNIQUE    EQU (5)    ; public screen name already used
  253. OSERR_UNKNOWNMODE    EQU (6)    ; don't recognize mode asked for
  254.  
  255. ; ========================================================================
  256. ; === NewScreen ==========================================================
  257. ; ========================================================================
  258. ; NOTE: to use Extension field, you need to use ExtNewScreen, below
  259.  STRUCTURE NewScreen,0
  260.  
  261.     WORD ns_LeftEdge        ; initial Screen dimensions
  262.     WORD ns_TopEdge        ; initial Screen dimensions
  263.     WORD ns_Width        ; initial Screen dimensions
  264.     WORD ns_Height        ; initial Screen dimensions
  265.     WORD ns_Depth        ; initial Screen dimensions
  266.  
  267.     BYTE ns_DetailPen        ; default rendering pens (for Windows too)
  268.     BYTE ns_BlockPen        ; default rendering pens (for Windows too)
  269.  
  270.     WORD ns_ViewModes        ; display "modes" for this Screen
  271.  
  272.     WORD ns_Type        ; Intuition Screen Type specifier
  273.  
  274.     APTR ns_Font        ; default font for Screen and Windows
  275.  
  276.     APTR ns_DefaultTitle    ; Title when Window doesn't care
  277.  
  278.     APTR ns_Gadgets        ; UNUSED:  Leave this NULL
  279.  
  280.     ; if you are opening a CUSTOMSCREEN and already have a BitMap 
  281.     ; that you want used for your Screen, you set the flags CUSTOMBITMAP in
  282.     ; the Types variable and you set this variable to point to your BitMap
  283.     ; structure.  The structure will be copied into your Screen structure,
  284.     ; after which you may discard your own BitMap if you want
  285.     APTR ns_CustomBitMap
  286.  LABEL    ns_SIZEOF
  287.  
  288. ; For compatibility reasons, we need a new structure for extending
  289. ; NewScreen.  Use this structure is you need to use the new Extension
  290. ; field.
  291. ; NOTE WELL: this structure may be extended again in the future.
  292. ;Writing code which depends on its size is not allowed.
  293.  
  294.  STRUCTURE ExtNewScreen,ns_SIZEOF
  295.  
  296.     APTR ens_Extension        ; struct TagItem *
  297.                 ; more specification data, scanned if
  298.                 ; NS_EXTENDED is set in ns_Type
  299.  
  300.  LABEL    ens_SIZEOF
  301.  
  302. * === Overscan Types ===
  303. OSCAN_TEXT    EQU    1    ; entirely visible
  304. OSCAN_STANDARD    EQU    2    ; just past edges
  305. OSCAN_MAX    EQU    3    ; as much as possible
  306. OSCAN_VIDEO    EQU    4    ; even more than is possible
  307.  
  308.  
  309. * === Public Shared Screen Node ===
  310.  
  311. * This is the representative of a public shared screen.
  312. * This is an internal data structure, but some functions may
  313. * present a copy of it to the calling application.  In that case,
  314. * be aware that the screen pointer of the structure can NOT be
  315. * used safely, since there is no guarantee that the referenced
  316. * screen will remain open and a valid data structure.
  317.  
  318.  STRUCTURE PubScreenNode,LN_SIZE
  319.     APTR    psn_Screen    ; pointer to screen itself
  320.     UWORD    psn_Flags    ; below
  321.     WORD    psn_Size    ; includes name buffer size
  322.     WORD    psn_VisitorCount ; how many visitor windows
  323.     APTR    psn_SigTask    ; who to signal when visitors gone
  324.     UBYTE    psn_SigBit    ; which signal
  325.     UBYTE    psn_Pad1    ; word align
  326.  LABEL        psn_SIZEOF
  327.  
  328. * psn_Flags values
  329. PSNF_PRIVATE    EQU    $0001
  330.  
  331. * NOTE: Due to a bug in NextPubScreen(), make sure your buffer
  332. * actually has MAXPUBSCREENNAME+1 characters in it!
  333.  
  334. MAXPUBSCREENNAME EQU    139    ; names no longer, please
  335.  
  336. ; pub screen modes
  337. SHANGHAI    EQU    $0001    ; put workbench windows on pub screen
  338. POPPUBSCREEN    EQU    $0002    ; pop pub screen to front when visitor opens
  339.  
  340. * Include obsolete identifiers:
  341.     IFND    INTUITION_IOBSOLETE_I
  342.     INCLUDE "intuition/iobsolete.i"
  343.     ENDC
  344.  
  345.     ENDC
  346.