home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / gnu / os-include / intuition / screens.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  23KB  |  662 lines

  1. #ifndef INTUITION_SCREENS_H
  2. #define INTUITION_SCREENS_H TRUE
  3. /*
  4. **  $VER: screens.h 38.25 (15.2.93)
  5. **  Includes Release 40.15
  6. **
  7. **  The Screen and NewScreen structures and attributes
  8. **
  9. **  (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifndef GRAPHICS_GFX_H
  18. #include <graphics/gfx.h>
  19. #endif
  20.  
  21. #ifndef GRAPHICS_CLIP_H
  22. #include <graphics/clip.h>
  23. #endif
  24.  
  25. #ifndef GRAPHICS_VIEW_H
  26. #include <graphics/view.h>
  27. #endif
  28.  
  29. #ifndef GRAPHICS_RASTPORT_H
  30. #include <graphics/rastport.h>
  31. #endif
  32.  
  33. #ifndef GRAPHICS_LAYERS_H
  34. #include <graphics/layers.h>
  35. #endif
  36.  
  37. #ifndef UTILITY_TAGITEM_H
  38. #include <utility/tagitem.h>
  39. #endif
  40.  
  41. /*
  42.  * NOTE:  intuition/iobsolete.h is included at the END of this file!
  43.  */
  44.  
  45. /* ======================================================================== */
  46. /* === DrawInfo ========================================================= */
  47. /* ======================================================================== */
  48.  
  49. /* This is a packet of information for graphics rendering.  It originates
  50.  * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  51.  */
  52.  
  53. /* You can use the Intuition version number to tell which fields are
  54.  * present in this structure.
  55.  *
  56.  * DRI_VERSION of 1 corresponds to V37 release.
  57.  * DRI_VERSION of 2 corresponds to V39, and includes three new pens
  58.  *    and the dri_CheckMark and dri_AmigaKey fields.
  59.  *
  60.  * Note that sometimes applications need to create their own DrawInfo
  61.  * structures, in which case the DRI_VERSION won't correspond exactly
  62.  * to the OS version!!!
  63.  */
  64. #define DRI_VERSION    (2)
  65.  
  66. struct DrawInfo
  67. {
  68.     UWORD    dri_Version;    /* will be  DRI_VERSION            */
  69.     UWORD    dri_NumPens;    /* guaranteed to be >= 9        */
  70.     UWORD    *dri_Pens;    /* pointer to pen array            */
  71.  
  72.     struct TextFont    *dri_Font;    /* screen default font        */
  73.     UWORD    dri_Depth;    /* (initial) depth of screen bitmap    */
  74.  
  75.     struct {      /* from DisplayInfo database for initial display mode    */
  76.     UWORD    X;
  77.     UWORD    Y;
  78.     }        dri_Resolution;
  79.  
  80.     ULONG    dri_Flags;        /* defined below        */
  81. /* New for V39: dri_CheckMark, dri_AmigaKey. */
  82.     struct Image    *dri_CheckMark;    /* pointer to scaled checkmark image
  83.                      * Will be NULL if DRI_VERSION < 2
  84.                      */
  85.     struct Image    *dri_AmigaKey;    /* pointer to scaled Amiga-key image
  86.                      * Will be NULL if DRI_VERSION < 2
  87.                      */
  88.     ULONG    dri_Reserved[5];    /* avoid recompilation ;^)    */
  89. };
  90.  
  91. #define DRIF_NEWLOOK    0x00000001    /* specified SA_Pens, full treatment */
  92.  
  93. /* rendering pen number indexes into DrawInfo.dri_Pens[]    */
  94. #define DETAILPEN     (0x0000)    /* compatible Intuition rendering pens    */
  95. #define BLOCKPEN     (0x0001)    /* compatible Intuition rendering pens    */
  96. #define TEXTPEN         (0x0002)    /* text on background            */
  97. #define SHINEPEN     (0x0003)    /* bright edge on 3D objects        */
  98. #define SHADOWPEN     (0x0004)    /* dark edge on 3D objects        */
  99. #define FILLPEN         (0x0005)    /* active-window/selected-gadget fill    */
  100. #define FILLTEXTPEN     (0x0006)    /* text over FILLPEN            */
  101. #define BACKGROUNDPEN     (0x0007)    /* always color 0            */
  102. #define HIGHLIGHTTEXTPEN (0x0008)    /* special color text, on background    */
  103. /* New for V39, only present if DRI_VERSION >= 2: */
  104. #define BARDETAILPEN     (0x0009)    /* text/detail in screen-bar/menus */
  105. #define BARBLOCKPEN     (0x000A)    /* screen-bar/menus fill */
  106. #define BARTRIMPEN     (0x000B)    /* trim under screen-bar */
  107.  
  108. #define NUMDRIPENS     (0x000C)
  109.  
  110.  
  111. /* New for V39:  It is sometimes useful to specify that a pen value
  112.  * is to be the complement of color zero to three.  The "magic" numbers
  113.  * serve that purpose:
  114.  */
  115. #define PEN_C3        0xFEFC        /* Complement of color 3 */
  116. #define PEN_C2        0xFEFD        /* Complement of color 2 */
  117. #define PEN_C1        0xFEFE        /* Complement of color 1 */
  118. #define PEN_C0        0xFEFF        /* Complement of color 0 */
  119.  
  120. /* ======================================================================== */
  121. /* === Screen ============================================================= */
  122. /* ======================================================================== */
  123.  
  124. /* VERY IMPORTANT NOTE ABOUT Screen->BitMap.  In the future, bitmaps
  125.  * will need to grow.  The embedded instance of a bitmap in the screen
  126.  * will no longer be large enough to hold the whole description of
  127.  * the bitmap.
  128.  *
  129.  * YOU ARE STRONGLY URGED to use Screen->RastPort.BitMap in place of
  130.  * &Screen->BitMap whenever and whereever possible.
  131.  */
  132.  
  133. struct Screen
  134. {
  135.     struct Screen *NextScreen;        /* linked list of screens */
  136.     struct Window *FirstWindow;        /* linked list Screen's Windows */
  137.  
  138.     WORD LeftEdge, TopEdge;        /* parameters of the screen */
  139.     WORD Width, Height;            /* parameters of the screen */
  140.  
  141.     WORD MouseY, MouseX;        /* position relative to upper-left */
  142.  
  143.     UWORD Flags;            /* see definitions below */
  144.  
  145.     UBYTE *Title;            /* null-terminated Title text */
  146.     UBYTE *DefaultTitle;        /* for Windows without ScreenTitle */
  147.  
  148.     /* Bar sizes for this Screen and all Window's in this Screen */
  149.     /* Note that BarHeight is one less than the actual menu bar
  150.      * height.    We're going to keep this in V36 for compatibility,
  151.      * although V36 artwork might use that extra pixel
  152.      *
  153.      * Also, the title bar height of a window is calculated from the
  154.      * screen's WBorTop field, plus the font height, plus one.
  155.      */
  156.     BYTE BarHeight, BarVBorder, BarHBorder, MenuVBorder, MenuHBorder;
  157.     BYTE WBorTop, WBorLeft, WBorRight, WBorBottom;
  158.  
  159.     struct TextAttr *Font;        /* this screen's default font       */
  160.  
  161.     /* the display data structures for this Screen */
  162.     struct ViewPort ViewPort;        /* describing the Screen's display */
  163.     struct RastPort RastPort;        /* describing Screen rendering       */
  164.     struct BitMap BitMap;        /* SEE WARNING ABOVE!           */
  165.     struct Layer_Info LayerInfo;    /* each screen gets a LayerInfo    */
  166.  
  167.     /* Only system gadgets may be attached to a screen.
  168.      *    You get the standard system Screen Gadgets automatically
  169.      */
  170.     struct Gadget *FirstGadget;
  171.  
  172.     UBYTE DetailPen, BlockPen;        /* for bar/border/gadget rendering */
  173.  
  174.     /* the following variable(s) are maintained by Intuition to support the
  175.      * DisplayBeep() color flashing technique
  176.      */
  177.     UWORD SaveColor0;
  178.  
  179.     /* This layer is for the Screen and Menu bars */
  180.     struct Layer *BarLayer;
  181.  
  182.     UBYTE *ExtData;
  183.  
  184.     UBYTE *UserData;    /* general-purpose pointer to User data extension */
  185.  
  186.     /**** Data below this point are SYSTEM PRIVATE ****/
  187. };
  188.  
  189.  
  190. /* --- FLAGS SET BY INTUITION --------------------------------------------- */
  191. /* The SCREENTYPE bits are reserved for describing various Screen types
  192.  * available under Intuition.
  193.  */
  194. #define SCREENTYPE    0x000F    /* all the screens types available    */
  195. /* --- the definitions for the Screen Type ------------------------------- */
  196. #define WBENCHSCREEN    0x0001    /* identifies the Workbench screen    */
  197. #define PUBLICSCREEN    0x0002    /* public shared (custom) screen    */
  198. #define CUSTOMSCREEN    0x000F    /* original custom screens        */
  199.  
  200. #define SHOWTITLE    0x0010    /* this gets set by a call to ShowTitle() */
  201.  
  202. #define BEEPING        0x0020    /* set when Screen is beeping (private)    */
  203.  
  204. #define CUSTOMBITMAP    0x0040    /* if you are supplying your own BitMap */
  205.  
  206. #define SCREENBEHIND    0x0080    /* if you want your screen to open behind
  207.                  * already open screens
  208.                  */
  209. #define SCREENQUIET    0x0100    /* if you do not want Intuition to render
  210.                  * into your screen (gadgets, title)
  211.                  */
  212. #define SCREENHIRES    0x0200    /* do not use lowres gadgets  (private)    */
  213.  
  214. #define NS_EXTENDED    0x1000        /* ExtNewScreen.Extension is valid    */
  215. /* V36 applications can use OpenScreenTagList() instead of NS_EXTENDED    */
  216.  
  217. #define AUTOSCROLL    0x4000    /* screen is to autoscoll        */
  218.  
  219. /* New for V39: */
  220. #define PENSHARED    0x0400    /* Screen opener set {SA_SharePens,TRUE} */
  221.  
  222.  
  223.  
  224.  
  225. #define STDSCREENHEIGHT -1    /* supply in NewScreen.Height        */
  226. #define STDSCREENWIDTH -1    /* supply in NewScreen.Width        */
  227.  
  228. /*
  229.  * Screen attribute tag ID's.  These are used in the ti_Tag field of
  230.  * TagItem arrays passed to OpenScreenTagList() (or in the
  231.  * ExtNewScreen.Extension field).
  232.  */
  233.  
  234. /* Screen attribute tags.  Please use these versions, not those in
  235.  * iobsolete.h.
  236.  */
  237.  
  238. #define SA_Dummy    (TAG_USER + 32)
  239. /*
  240.  * these items specify items equivalent to fields in NewScreen
  241.  */
  242. #define SA_Left        (SA_Dummy + 0x0001)
  243. #define SA_Top        (SA_Dummy + 0x0002)
  244. #define SA_Width    (SA_Dummy + 0x0003)
  245. #define SA_Height    (SA_Dummy + 0x0004)
  246.             /* traditional screen positions    and dimensions    */
  247. #define SA_Depth    (SA_Dummy + 0x0005)
  248.             /* screen bitmap depth                */
  249. #define SA_DetailPen    (SA_Dummy + 0x0006)
  250.             /* serves as default for windows, too        */
  251. #define SA_BlockPen    (SA_Dummy + 0x0007)
  252. #define SA_Title    (SA_Dummy + 0x0008)
  253.             /* default screen title                */
  254. #define SA_Colors    (SA_Dummy + 0x0009)
  255.             /* ti_Data is an array of struct ColorSpec,
  256.              * terminated by ColorIndex = -1.  Specifies
  257.              * initial screen palette colors.
  258.              * Also see SA_Colors32 for use under V39.
  259.              */
  260. #define SA_ErrorCode    (SA_Dummy + 0x000A)
  261.             /* ti_Data points to LONG error code (values below)*/
  262. #define SA_Font        (SA_Dummy + 0x000B)
  263.             /* equiv. to NewScreen.Font            */
  264. #define SA_SysFont    (SA_Dummy + 0x000C)
  265.             /* Selects one of the preferences system fonts:
  266.              *    0 - old DefaultFont, fixed-width
  267.              *    1 - WB Screen preferred font
  268.              */
  269. #define SA_Type        (SA_Dummy + 0x000D)
  270.             /* ti_Data is PUBLICSCREEN or CUSTOMSCREEN.  For other
  271.              * fields of NewScreen.Type, see individual tags,
  272.              * eg. SA_Behind, SA_Quiet.
  273.              */
  274. #define SA_BitMap    (SA_Dummy + 0x000E)
  275.             /* ti_Data is pointer to custom BitMap.  This
  276.              * implies type of CUSTOMBITMAP
  277.              */
  278. #define SA_PubName    (SA_Dummy + 0x000F)
  279.             /* presence of this tag means that the screen
  280.              * is to be a public screen.  Please specify
  281.              * BEFORE the two tags below
  282.              */
  283. #define SA_PubSig    (SA_Dummy + 0x0010)
  284. #define SA_PubTask    (SA_Dummy + 0x0011)
  285.             /* Task ID and signal for being notified that
  286.              * the last window has closed on a public screen.
  287.              */
  288. #define SA_DisplayID    (SA_Dummy + 0x0012)
  289.             /* ti_Data is new extended display ID from
  290.              * <graphics/displayinfo.h> (V37) or from
  291.              * <graphics/modeid.h> (V39 and up)
  292.              */
  293. #define SA_DClip    (SA_Dummy + 0x0013)
  294.             /* ti_Data points to a rectangle which defines
  295.              * screen display clip region
  296.              */
  297. #define SA_Overscan    (SA_Dummy + 0x0014)
  298.             /* Set to one of the OSCAN_
  299.              * specifiers below to get a system standard
  300.              * overscan region for your display clip,
  301.              * screen dimensions (unless otherwise specified),
  302.              * and automatically centered position (partial
  303.              * support only so far).
  304.              * If you use this, you shouldn't specify
  305.              * SA_DClip.  SA_Overscan is for "standard"
  306.              * overscan dimensions, SA_DClip is for
  307.              * your custom numeric specifications.
  308.              */
  309. #define SA_Obsolete1    (SA_Dummy + 0x0015)
  310.             /* obsolete S_MONITORNAME            */
  311.  
  312. /** booleans **/
  313. #define SA_ShowTitle    (SA_Dummy + 0x0016)
  314.             /* boolean equivalent to flag SHOWTITLE        */
  315. #define SA_Behind    (SA_Dummy + 0x0017)
  316.             /* boolean equivalent to flag SCREENBEHIND    */
  317. #define SA_Quiet    (SA_Dummy + 0x0018)
  318.             /* boolean equivalent to flag SCREENQUIET    */
  319. #define SA_AutoScroll    (SA_Dummy + 0x0019)
  320.             /* boolean equivalent to flag AUTOSCROLL    */
  321. #define SA_Pens        (SA_Dummy + 0x001A)
  322.             /* pointer to ~0 terminated UWORD array, as
  323.              * found in struct DrawInfo
  324.              */
  325. #define SA_FullPalette    (SA_Dummy + 0x001B)
  326.             /* boolean: initialize color table to entire
  327.              *  preferences palette (32 for V36), rather
  328.              * than compatible pens 0-3, 17-19, with
  329.              * remaining palette as returned by GetColorMap()
  330.              */
  331.  
  332. #define SA_ColorMapEntries (SA_Dummy + 0x001C)
  333.             /* New for V39:
  334.              * Allows you to override the number of entries
  335.              * in the ColorMap for your screen.  Intuition
  336.              * normally allocates (1<<depth) or 32, whichever
  337.              * is more, but you may require even more if you
  338.              * use certain V39 graphics.library features
  339.              * (eg. palette-banking).
  340.              */
  341.  
  342. #define SA_Parent    (SA_Dummy + 0x001D)
  343.             /* New for V39:
  344.              * ti_Data is a pointer to a "parent" screen to
  345.              * attach this one to.    Attached screens slide
  346.              * and depth-arrange together.
  347.              */
  348.  
  349. #define SA_Draggable    (SA_Dummy + 0x001E)
  350.             /* New for V39:
  351.              * Boolean tag allowing non-draggable screens.
  352.              * Do not use without good reason!
  353.              * (Defaults to TRUE).
  354.              */
  355.  
  356. #define SA_Exclusive    (SA_Dummy + 0x001F)
  357.             /* New for V39:
  358.              * Boolean tag allowing screens that won't share
  359.              * the display.  Use sparingly!  Starting with 3.01,
  360.              * attached screens may be SA_Exclusive.  Setting
  361.              * SA_Exclusive for each screen will produce an
  362.              * exclusive family.   (Defaults to FALSE).
  363.              */
  364.  
  365. #define SA_SharePens    (SA_Dummy + 0x0020)
  366.             /* New for V39:
  367.              * For those pens in the screen's DrawInfo->dri_Pens,
  368.              * Intuition obtains them in shared mode (see
  369.              * graphics.library/ObtainPen()).  For compatibility,
  370.              * Intuition obtains the other pens of a public
  371.              * screen as PEN_EXCLUSIVE.  Screens that wish to
  372.              * manage the pens themselves should generally set
  373.              * this tag to TRUE.  This instructs Intuition to
  374.              * leave the other pens unallocated.
  375.              */
  376.  
  377. #define SA_BackFill    (SA_Dummy + 0x0021)
  378.             /* New for V39:
  379.              * provides a "backfill hook" for your screen's
  380.              * Layer_Info.
  381.              * See layers.library/InstallLayerInfoHook()
  382.              */
  383.  
  384. #define SA_Interleaved    (SA_Dummy + 0x0022)
  385.             /* New for V39:
  386.              * Boolean tag requesting that the bitmap
  387.              * allocated for you be interleaved.
  388.              * (Defaults to FALSE).
  389.              */
  390.  
  391. #define SA_Colors32    (SA_Dummy + 0x0023)
  392.             /* New for V39:
  393.              * Tag to set the screen's initial palette colors
  394.              * at 32 bits-per-gun.    ti_Data is a pointer
  395.              * to a table to be passed to the
  396.              * graphics.library/LoadRGB32() function.
  397.              * This format supports both runs of color
  398.              * registers and sparse registers.  See the
  399.              * autodoc for that function for full details.
  400.              * Any color set here has precedence over
  401.              * the same register set by SA_Colors.
  402.              */
  403.  
  404. #define SA_VideoControl    (SA_Dummy + 0x0024)
  405.             /* New for V39:
  406.              * ti_Data is a pointer to a taglist that Intuition
  407.              * will pass to graphics.library/VideoControl(),
  408.              * upon opening the screen.
  409.              */
  410.  
  411. #define SA_FrontChild    (SA_Dummy + 0x0025)
  412.             /* New for V39:
  413.              * ti_Data is a pointer to an already open screen
  414.              * that is to be the child of the screen being
  415.              * opened.  The child screen will be moved to the
  416.              * front of its family.
  417.              */
  418.  
  419. #define SA_BackChild    (SA_Dummy + 0x0026)
  420.             /* New for V39:
  421.              * ti_Data is a pointer to an already open screen
  422.              * that is to be the child of the screen being
  423.              * opened.  The child screen will be moved to the
  424.              * back of its family.
  425.              */
  426.  
  427. #define SA_LikeWorkbench    (SA_Dummy + 0x0027)
  428.             /* New for V39:
  429.              * Set ti_Data to 1 to request a screen which
  430.              * is just like the Workbench.    This gives
  431.              * you the same screen mode, depth, size,
  432.              * colors, etc., as the Workbench screen.
  433.              */
  434.  
  435. #define SA_Reserved        (SA_Dummy + 0x0028)
  436.             /* Reserved for private Intuition use */
  437.  
  438. #define SA_MinimizeISG        (SA_Dummy + 0x0029)
  439.             /* New for V40:
  440.              * For compatibility, Intuition always ensures
  441.              * that the inter-screen gap is at least three
  442.              * non-interlaced lines.  If your application
  443.              * would look best with the smallest possible
  444.              * inter-screen gap, set ti_Data to TRUE.
  445.              * If you use the new graphics VideoControl()
  446.              * VC_NoColorPaletteLoad tag for your screen's
  447.              * ViewPort, you should also set this tag.
  448.              */
  449.  
  450. /* this is an obsolete tag included only for compatibility with V35
  451.  * interim release for the A2024 and Viking monitors
  452.  */
  453. #ifndef NSTAG_EXT_VPMODE
  454. #define NSTAG_EXT_VPMODE (TAG_USER | 1)
  455. #endif
  456.  
  457.  
  458. /* OpenScreen error codes, which are returned in the (optional) LONG
  459.  * pointed to by ti_Data for the SA_ErrorCode tag item
  460.  */
  461. #define OSERR_NOMONITOR       (1)    /* named monitor spec not available    */
  462. #define OSERR_NOCHIPS       (2)    /* you need newer custom chips        */
  463. #define OSERR_NOMEM       (3)    /* couldn't get normal memory        */
  464. #define OSERR_NOCHIPMEM       (4)    /* couldn't get chipmem            */
  465. #define OSERR_PUBNOTUNIQUE (5)    /* public screen name already used    */
  466. #define OSERR_UNKNOWNMODE  (6)    /* don't recognize mode asked for    */
  467. #define OSERR_TOODEEP       (7)    /* Screen deeper than HW supports    */
  468. #define OSERR_ATTACHFAIL   (8)    /* Failed to attach screens        */
  469. #define OSERR_NOTAVAILABLE (9)    /* Mode not available for other reason    */
  470.  
  471. /* ======================================================================== */
  472. /* === NewScreen ========================================================== */
  473. /* ======================================================================== */
  474. /* note: to use the Extended field, you must use the
  475.  * new ExtNewScreen structure, below
  476.  */
  477. struct NewScreen
  478. {
  479.     WORD LeftEdge, TopEdge, Width, Height, Depth;  /* screen dimensions */
  480.  
  481.     UBYTE DetailPen, BlockPen;    /* for bar/border/gadget rendering    */
  482.  
  483.     UWORD ViewModes;        /* the Modes for the ViewPort (and View) */
  484.  
  485.     UWORD Type;            /* the Screen type (see defines above)    */
  486.  
  487.     struct TextAttr *Font;    /* this Screen's default text attributes */
  488.  
  489.     UBYTE *DefaultTitle;    /* the default title for this Screen    */
  490.  
  491.     struct Gadget *Gadgets;    /* UNUSED:  Leave this NULL        */
  492.  
  493.     /* if you are opening a CUSTOMSCREEN and already have a BitMap
  494.      * that you want used for your Screen, you set the flags CUSTOMBITMAP in
  495.      * the Type field and you set this variable to point to your BitMap
  496.      * structure.  The structure will be copied into your Screen structure,
  497.      * after which you may discard your own BitMap if you want
  498.      */
  499.     struct BitMap *CustomBitMap;
  500. };
  501.  
  502. /*
  503.  * For compatibility reasons, we need a new structure for extending
  504.  * NewScreen.  Use this structure is you need to use the new Extension
  505.  * field.
  506.  *
  507.  * NOTE: V36-specific applications should use the
  508.  * OpenScreenTagList( newscreen, tags ) version of OpenScreen().
  509.  * Applications that want to be V34-compatible as well may safely use the
  510.  * ExtNewScreen structure.  Its tags will be ignored by V34 Intuition.
  511.  *
  512.  */
  513. struct ExtNewScreen
  514. {
  515.     WORD LeftEdge, TopEdge, Width, Height, Depth;
  516.     UBYTE DetailPen, BlockPen;
  517.     UWORD ViewModes;
  518.     UWORD Type;
  519.     struct TextAttr *Font;
  520.     UBYTE *DefaultTitle;
  521.     struct Gadget *Gadgets;
  522.     struct BitMap *CustomBitMap;
  523.  
  524.     struct TagItem    *Extension;
  525.                 /* more specification data, scanned if
  526.                  * NS_EXTENDED is set in NewScreen.Type
  527.                  */
  528. };
  529.  
  530. /* === Overscan Types ===    */
  531. #define OSCAN_TEXT    (1)    /* entirely visible    */
  532. #define OSCAN_STANDARD    (2)    /* just past edges    */
  533. #define OSCAN_MAX    (3)    /* as much as possible    */
  534. #define OSCAN_VIDEO    (4)    /* even more than is possible    */
  535.  
  536.  
  537. /* === Public Shared Screen Node ===    */
  538.  
  539. /* This is the representative of a public shared screen.
  540.  * This is an internal data structure, but some functions may
  541.  * present a copy of it to the calling application.  In that case,
  542.  * be aware that the screen pointer of the structure can NOT be
  543.  * used safely, since there is no guarantee that the referenced
  544.  * screen will remain open and a valid data structure.
  545.  *
  546.  * Never change one of these.
  547.  */
  548.  
  549. struct PubScreenNode    {
  550.     struct Node        psn_Node;    /* ln_Name is screen name */
  551.     struct Screen    *psn_Screen;
  552.     UWORD        psn_Flags;    /* below        */
  553.     WORD        psn_Size;    /* includes name buffer    */
  554.     WORD        psn_VisitorCount; /* how many visitor windows */
  555.     struct Task        *psn_SigTask;    /* who to signal when visitors gone */
  556.     UBYTE        psn_SigBit;    /* which signal    */
  557. };
  558.  
  559. #define PSNF_PRIVATE    (0x0001)
  560.  
  561. /* NOTE: Due to a bug in NextPubScreen(), make sure your buffer
  562.  * actually has MAXPUBSCREENNAME+1 characters in it!
  563.  */
  564. #define MAXPUBSCREENNAME    (139)    /* names no longer, please    */
  565.  
  566. /* pub screen modes    */
  567. #define SHANGHAI    0x0001    /* put workbench windows on pub screen */
  568. #define POPPUBSCREEN    0x0002    /* pop pub screen to front when visitor opens */
  569.  
  570. /* New for V39:  Intuition has new screen depth-arrangement and movement
  571.  * functions called ScreenDepth() and ScreenPosition() respectively.
  572.  * These functions permit the old behavior of ScreenToFront(),
  573.  * ScreenToBack(), and MoveScreen().  ScreenDepth() also allows
  574.  * independent depth control of attached screens.  ScreenPosition()
  575.  * optionally allows positioning screens even though they were opened
  576.  * {SA_Draggable,FALSE}.
  577.  */
  578.  
  579. /* For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK,
  580.  * and optionally also SDEPTH_INFAMILY.
  581.  *
  582.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  583.  * SDEPTH_INFAMILY.  Commodities, "input helper" programs,
  584.  * or any other program that did not open a screen should never
  585.  * use that flag.  (Note that this is a style-behavior
  586.  * requirement;  there is no technical requirement that the
  587.  * task calling this function need be the task which opened
  588.  * the screen).
  589.  */
  590.  
  591. #define    SDEPTH_TOFRONT            (0)    /* Bring screen to front */
  592. #define SDEPTH_TOBACK        (1)    /* Send screen to back */
  593. #define SDEPTH_INFAMILY        (2)    /* Move an attached screen with
  594.                      * respect to other screens of
  595.                      * its family
  596.                      */
  597.  
  598. /* Here's an obsolete name equivalent to SDEPTH_INFAMILY: */
  599. #define SDEPTH_CHILDONLY    SDEPTH_INFAMILY
  600.  
  601.  
  602. /* For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE,
  603.  * or SPOS_MAKEVISIBLE to describe the kind of screen positioning you
  604.  * wish to perform:
  605.  *
  606.  * SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe
  607.  *    the offset in coordinates you wish to move the screen by.
  608.  * SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe
  609.  *    the absolute coordinates you wish to move the screen to.
  610.  * SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the
  611.  *    screen which you would like autoscrolled into view.
  612.  *
  613.  * You may additionally set SPOS_FORCEDRAG along with any of the
  614.  * above.  Set this if you wish to reposition an {SA_Draggable,FALSE}
  615.  * screen that you opened.
  616.  *
  617.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  618.  * SPOS_FORCEDRAG.  Commodities, "input helper" programs,
  619.  * or any other program that did not open a screen should never
  620.  * use that flag.
  621.  */
  622.  
  623. #define SPOS_RELATIVE        (0)    /* Coordinates are relative */
  624.  
  625. #define SPOS_ABSOLUTE        (1)    /* Coordinates are expressed as
  626.                      * absolutes, not relatives.
  627.                      */
  628.  
  629. #define SPOS_MAKEVISIBLE    (2)    /* Coordinates describe a box on
  630.                      * the screen you wish to be
  631.                      * made visible by autoscrolling
  632.                      */
  633.  
  634. #define SPOS_FORCEDRAG        (4)    /* Move non-draggable screen */
  635.  
  636. /* New for V39: Intuition supports double-buffering in screens,
  637.  * with friendly interaction with menus and certain gadgets.
  638.  * For each buffer, you need to get one of these structures
  639.  * from the AllocScreenBuffer() call.  Never allocate your
  640.  * own ScreenBuffer structures!
  641.  *
  642.  * The sb_DBufInfo field is for your use.  See the graphics.library
  643.  * AllocDBufInfo() autodoc for details.
  644.  */
  645. struct ScreenBuffer
  646. {
  647.     struct BitMap *sb_BitMap;        /* BitMap of this buffer */
  648.     struct DBufInfo *sb_DBufInfo;    /* DBufInfo for this buffer */
  649. };
  650.  
  651. /* These are the flags that may be passed to AllocScreenBuffer().
  652.  */
  653. #define SB_SCREEN_BITMAP    1
  654. #define SB_COPY_BITMAP        2
  655.  
  656. /* Include obsolete identifiers: */
  657. #ifndef INTUITION_IOBSOLETE_H
  658. #include <intuition/iobsolete.h>
  659. #endif
  660.  
  661. #endif
  662.