home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / text_autodocs / intuition.doc < prev    next >
Text File  |  1992-09-01  |  238KB  |  6,671 lines

  1. TABLE OF CONTENTS
  2.  
  3. intuition.library/ActivateGadget
  4. intuition.library/ActivateWindow
  5. intuition.library/AddClass
  6. intuition.library/AddGadget
  7. intuition.library/AddGList
  8. intuition.library/AllocRemember
  9. intuition.library/AutoRequest
  10. intuition.library/BeginRefresh
  11. intuition.library/BuildEasyRequestArgs
  12. intuition.library/BuildSysRequest
  13. intuition.library/ChangeWindowBox
  14. intuition.library/ClearDMRequest
  15. intuition.library/ClearMenuStrip
  16. intuition.library/ClearPointer
  17. intuition.library/CloseScreen
  18. intuition.library/CloseWindow
  19. intuition.library/CloseWorkBench
  20. intuition.library/CurrentTime
  21. intuition.library/DisplayAlert
  22. intuition.library/DisplayBeep
  23. intuition.library/DisposeObject
  24. intuition.library/DoubleClick
  25. intuition.library/DrawBorder
  26. intuition.library/DrawImage
  27. intuition.library/DrawImageState
  28. intuition.library/EasyRequestArgs
  29. intuition.library/EndRefresh
  30. intuition.library/EndRequest
  31. intuition.library/EraseImage
  32. intuition.library/FreeClass
  33. intuition.library/FreeRemember
  34. intuition.library/FreeScreenDrawInfo
  35. intuition.library/FreeSysRequest
  36. intuition.library/GadgetMouse
  37. intuition.library/GetAttr
  38. intuition.library/GetDefaultPubScreen
  39. intuition.library/GetDefPrefs
  40. intuition.library/GetPrefs
  41. intuition.library/GetScreenData
  42. intuition.library/GetScreenDrawInfo
  43. intuition.library/InitRequester
  44. intuition.library/IntuiTextLength
  45. intuition.library/ItemAddress
  46. intuition.library/LockIBase
  47. intuition.library/LockPubScreen
  48. intuition.library/LockPubScreenList
  49. intuition.library/MakeClass
  50. intuition.library/MakeScreen
  51. intuition.library/ModifyIDCMP
  52. intuition.library/ModifyProp
  53. intuition.library/MoveScreen
  54. intuition.library/MoveWindow
  55. intuition.library/MoveWindowInFrontOf
  56. intuition.library/NewModifyProp
  57. intuition.library/NewObject
  58. intuition.library/NextObject
  59. intuition.library/NextPubScreen
  60. intuition.library/ObtainGIRPort
  61. intuition.library/OffGadget
  62. intuition.library/OffMenu
  63. intuition.library/OnGadget
  64. intuition.library/OnMenu
  65. intuition.library/OpenScreen
  66. intuition.library/OpenScreenTagList
  67. intuition.library/OpenWindow
  68. intuition.library/OpenWindowTagList
  69. intuition.library/OpenWorkBench
  70. intuition.library/PointInImage
  71. intuition.library/PrintIText
  72. intuition.library/PubScreenStatus
  73. intuition.library/QueryOverscan
  74. intuition.library/RefreshGadgets
  75. intuition.library/RefreshGList
  76. intuition.library/RefreshWindowFrame
  77. intuition.library/ReleaseGIRPort
  78. intuition.library/RemakeDisplay
  79. intuition.library/RemoveClass
  80. intuition.library/RemoveGadget
  81. intuition.library/RemoveGList
  82. intuition.library/ReportMouse
  83. intuition.library/Request
  84. intuition.library/ResetMenuStrip
  85. intuition.library/RethinkDisplay
  86. intuition.library/ScreenToBack
  87. intuition.library/ScreenToFront
  88. intuition.library/SetAttrsA
  89. intuition.library/SetDefaultPubScreen
  90. intuition.library/SetDMRequest
  91. intuition.library/SetEditHook
  92. intuition.library/SetGadgetAttrsA
  93. intuition.library/SetMenuStrip
  94. intuition.library/SetMouseQueue
  95. intuition.library/SetPointer
  96. intuition.library/SetPrefs
  97. intuition.library/SetPubScreenModes
  98. intuition.library/SetWindowTitles
  99. intuition.library/ShowTitle
  100. intuition.library/SizeWindow
  101. intuition.library/SysReqHandler
  102. intuition.library/UnlockIBase
  103. intuition.library/UnlockPubScreen
  104. intuition.library/UnlockPubScreenList
  105. intuition.library/ViewAddress
  106. intuition.library/ViewPortAddress
  107. intuition.library/WBenchToBack
  108. intuition.library/WBenchToFront
  109. intuition.library/WindowLimits
  110. intuition.library/WindowToBack
  111. intuition.library/WindowToFront
  112. intuition.library/ZipWindow
  113. intuition.library/ActivateGadget             intuition.library/ActivateGadget
  114.  
  115.     NAME
  116.     ActivateGadget -- Activate a (string or custom) gadget.
  117.  
  118.     SYNOPSIS
  119.     Success = ActivateGadget( Gadget, Window, Request )
  120.     D0              A0      A1      A2
  121.  
  122.     BOOL ActivateGadget( struct Gadget *, struct Window *,
  123.         struct Requester * );
  124.  
  125.     FUNCTION
  126.     Activates a string or custom gadget.  If successful, this means
  127.     that the user does not need to click in the gadget before typing.
  128.  
  129.     The window parameter must point to the window which contains the gadget.
  130.     If the gadget is actually in a requester, the window must contain
  131.     the requester, and a pointer to the requester must also be
  132.     passed.    The requester parameter must only be valid if the gadget
  133.     has the    GTYP_REQGADGET flag set, a requirement for all requester
  134.     gadgets.
  135.  
  136.     The success of this function depends on a rather complex set
  137.     of conditions.  The intent is that the user is never interrupted from
  138.     what interactions he may have underway.
  139.  
  140.     The current set of conditions includes:
  141.     -   The window must be active.  If you are opening a new window
  142.         and want an active gadget in it, it is not sufficient to
  143.         assume that the WFLG_ACTIVATE flag has taken effect by the time
  144.         OpenWindow() returns, even if you insert a delay of some
  145.         finite amount of time.  Use the IDCMP_ACTIVEWINDOW IntuiMessage
  146.         to tell when your window really becomes active.  Many
  147.         programs use an event loop that calls ActivateGadget()
  148.         whenever they receive the IDCMP_ACTIVEWINDOW message, and also
  149.         the IDCMP_MOUSEBUTTONS messages, and so on, to keep the
  150.         gadget active until it is used (or the user selects some
  151.         other "Cancel" gadget).
  152.  
  153.     -   No other gadgets may be in use.  This includes system gadgets,
  154.         such as those for window sizing, dragging, etc.
  155.     -   If the gadget is in a requester, that requester must
  156.         be active. (Use IDCMP_REQSET and IDCMP_REQCLEAR).
  157.     -   The right mouse button cannot be held down (e.g. menus)
  158.  
  159.     NOTE: Don't try to activate a gadget which is disabled or
  160.     not attached to a window or requester.
  161.  
  162.     INPUTS
  163.     Gadget = pointer to the gadget that you want activated.
  164.     Window = pointer to a window structure containing the gadget.
  165.     Requester = pointer to a requester (may by NULL if this isn't 
  166.            a requester gadget (i.e. GTYP_REQGADGET is not set)).
  167.  
  168.     RESULT
  169.     If the conditions above are met, and the gadget is in fact a string
  170.     gadget, then this function will return TRUE, else FALSE.
  171.  
  172.     BUGS
  173.     At present, this function will not return FALSE if a custom
  174.     gadget declines to be activated.
  175.  
  176.     SEE ALSO
  177.     
  178. intuition.library/ActivateWindow             intuition.library/ActivateWindow
  179.  
  180.     NAME
  181.     ActivateWindow -- Activate an Intuition window.
  182.  
  183.     SYNOPSIS
  184.     [success =] ActivateWindow( Window )
  185.     [D0]                        A0
  186.  
  187.     [LONG] ActivateWindow( struct Window * );
  188.     /* returns LONG in V36 and higher */
  189.  
  190.     FUNCTION
  191.     Activates an Intuition window. 
  192.  
  193.     Note that this call may have its action deferred: you cannot assume
  194.     that when this call is made the selected window has become active. 
  195.     This action will be postponed while the user plays with gadgets and
  196.     menus, or sizes and drags windows.  You may detect when the window
  197.     actually has become active by the IDCMP_ACTIVEWINDOW IDCMP message.
  198.  
  199.     This call is intended to provide flexibility but not to confuse the
  200.     user.  Please call this function synchronously with some action
  201.     by the user.
  202.  
  203.     INPUTS
  204.     Window = a pointer to a Window structure
  205.  
  206.     RESULT
  207.     V35 and before: None.
  208.     V36 and later: returns zero if no problem queuing up
  209.         the request for deferred action
  210.  
  211.     BUGS
  212.     Calling this function in a tight loop can blow out Intuition's deferred
  213.     action queue.
  214.  
  215.     SEE ALSO
  216.     OpenWindow(), and the WFLG_ACTIVATE window flag
  217. intuition.library/AddClass                         intuition.library/AddClass
  218.  
  219.     NAME
  220.     AddClass -- Make a public class available (V36)
  221.  
  222.     SYNOPSIS
  223.     AddClass( Class )
  224.               A0
  225.  
  226.     VOID AddClass( struct IClass * );
  227.  
  228.     FUNCTION
  229.     Adds a public boopsi class to the internal list of classes available
  230.     for public consumption.
  231.     
  232.     You must call this function after you call MakeClass().
  233.  
  234.     INPUTS
  235.     Class = pointer returned by MakeClass()
  236.  
  237.     RESULT
  238.     Nothing returned.
  239.     
  240.     NOTES
  241.  
  242.     BUGS
  243.     Although there is some protection against creating classes
  244.     with the same name as an existing class, this function
  245.     does not do any checking or other dealings with like-named
  246.     classes.  Until this is rectified, only officially registered
  247.     names can be used for public classes, and there is no
  248.     "class replacement" policy in effect.
  249.  
  250.     SEE ALSO
  251.     MakeClass(), FreeClass(), RemoveClass()
  252.     Document "Basic Object-Oriented Programming System for Intuition"
  253.     and the "boopsi Class Reference" document.
  254. intuition.library/AddGadget                       intuition.library/AddGadget
  255.  
  256.     NAME
  257.     AddGadget -- Add a gadget to the gadget list of a window.
  258.  
  259.     SYNOPSIS
  260.     RealPosition = AddGadget( Window, Gadget, Position )
  261.     D0              A0      A1      D0
  262.  
  263.     UWORD  AddGadget( struct Window *, struct Gadget *, UWORD );
  264.  
  265.     FUNCTION
  266.     Adds the specified gadget to the gadget list of the given window,
  267.     linked in at the position in the list specified by the position 
  268.     argument (that is, if Position == 0, the gadget will be inserted
  269.     at the head of the list, and if Position == 1 then the gadget will
  270.     be inserted after the first gadget and before the second).  If the
  271.     position you specify is greater than the number of gadgets in the
  272.     list, your gadget will be added to the end of the list.
  273.     
  274.     Calling AddGadget() does not cause your gadget to be redisplayed.
  275.     The benefit of this is that you may add several gadgets without
  276.     having the gadget list redrawn every time.
  277.  
  278.     This procedure returns the position at which your gadget was added.
  279.    
  280.     NOTE:  A relatively safe way to add the gadget to the end of the 
  281.     list is to specify a position of -1 (i.e., (UWORD) ~0).  That way,
  282.     only the 65536th (and multiples of it) will be inserted at the wrong
  283.     position.  The return value of the procedure will tell you where it was 
  284.     actually inserted.
  285.  
  286.     NOTE:  The system window gadgets are initially added to the
  287.     front of the gadget list.  The reason for this is:  If you position
  288.     your own gadgets in some way that interferes with the graphical
  289.     representation of the system gadgets, the system's ones will be "hit"
  290.     first by user.  If you then start adding gadgets to the front of the
  291.     list, you will disturb this plan, so beware.  On the other hand, if
  292.     you don't violate the design rule of never overlapping your gadgets,
  293.     there's no problem.  
  294.  
  295.     NOTE:  You may not add your own gadgets to a screen.  Gadgets may
  296.     be added to backdrop windows, however, which can be visually similar,
  297.     but also provide an IDCMP channel for gadget input messages.
  298.  
  299.     INPUTS
  300.     Window = pointer to the window to get your gadget
  301.     Gadget = pointer to the new gadget
  302.     Position = integer position in the list for the new gadget (starting
  303.         from zero as the first position in the list)
  304.  
  305.     RESULT
  306.     Returns the position of where the gadget was actually added.
  307.  
  308.     BUGS
  309.  
  310.     SEE ALSO
  311.     AddGList(), RemoveGadget(), RemoveGList()
  312. intuition.library/AddGList                         intuition.library/AddGList
  313.  
  314.     NAME
  315.     AddGList -- Add a linked list of gadgets to a window or requester.
  316.  
  317.     SYNOPSIS
  318.     RealPosition = AddGList( Window, Gadget, Position, Numgad, Requester )
  319.     D0                       A0      A1      D0        D1      A2
  320.  
  321.     UWORD AddGList( struct Window *, struct Gadget *, UWORD, WORD,
  322.         struct Requester * );
  323.     
  324.     FUNCTION
  325.     Adds the list of gadgets to the gadget list of the given window
  326.     or requester linked in at the position in the list specified by
  327.     the position argument. 
  328.  
  329.     See AddGadget() for more information about gadget list position,
  330.     and more information about gadgets in general.
  331.  
  332.     The requester parameter will be ignored unless the GTYP_REQGADGET
  333.     bit is set in the GadgetType field of the first gadget in the list.
  334.     In that case, the gadget list is added to the requester gadgets.
  335.     NOTE: be sure that GTYP_REQGADGET is either set or cleared consistently
  336.     for all gadgets in the list.  NOTE ALSO: The window parameter
  337.     should point to the window that the requester (will) appear in.
  338.  
  339.     Will add 'Numgad' gadgets from gadget list linked by the field
  340.     NextGadget, or until some NextGadget field is found to be NULL.  Does
  341.     not assume that the Numgad'th gadget has NextGadget equal to NULL.
  342.  
  343.     NOTE WELL: In order to link your gadget list in, the NextGadget
  344.     field of the Numgad'th (or last) gadget will be modified.  Thus, if 
  345.     you are adding the first 3 gadgets from a linked list of five gadgets,
  346.     this call will sever the connection between your third and fourth
  347.     gadgets.
  348.  
  349.     INPUTS
  350.     Window = pointer to the window to get your gadget
  351.     Gadget = pointer to the first gadget to be added
  352.     Position = integer position in the list for the new gadget
  353.         (starting from zero as the first position in the list)
  354.     Numgad = the number of gadgets from the linked list to be added
  355.         if Numgad equals -1, the entire null-terminated list of
  356.         gadgets will be added.
  357.     Requester = the requester the gadgets will be added to if the
  358.         GTYP_REQGADGET GadgetType flag is set for the first gadget
  359.         in the list
  360.  
  361.     RESULT
  362.     Returns the position of where the first gadget in the list was actually
  363.     added.
  364.  
  365.     BUGS
  366.  
  367.     SEE ALSO
  368.     AddGadget(), RemoveGadget(), RemoveGList()
  369. intuition.library/AllocRemember               intuition.library/AllocRemember
  370.  
  371.     NAME
  372.     AllocRemember -- AllocMem() with tracking to make freeing easy.
  373.  
  374.     SYNOPSIS
  375.     MemBlock = AllocRemember( RememberKey, Size, Flags )
  376.     D0              A0           D0    D1
  377.     
  378.     APTR AllocRemember( struct Remember **, ULONG, ULONG );
  379.  
  380.     FUNCTION
  381.     This routine calls the Exec AllocMem() function for you, but also links
  382.     the parameters of the allocation into a master list, so that
  383.     you can simply call the Intuition routine FreeRemember() at a later 
  384.     time to deallocate all allocated memory without being required to
  385.     remember the details of the memory you've allocated.
  386.  
  387.     This routine will have two primary uses:
  388.        -   Let's say that you're doing a long series of allocations in a 
  389.            procedure.  If any one of the allocations fails, your program
  390.         may need to abort the procedure.  Abandoning ship correctly
  391.         involves freeing up what memory you've already allocated.  This
  392.         procedure allows you to free up that memory easily, without being
  393.         required to keep track of how many allocations you've already done,
  394.         what the sizes of the allocations were, or where the memory was
  395.         allocated.
  396.  
  397.        -   Also, in the more general case, you may do all of the allocations 
  398.            in your entire program using this routine.  Then, when your 
  399.            program is exiting, you can free it all up at once with a 
  400.            simple call to FreeRemember().
  401.  
  402.     You create the "anchor" for the allocation master list by creating 
  403.     a variable that's a pointer to struct Remember, and initializing 
  404.     that pointer to NULL.  This is called the RememberKey.  Whenever 
  405.     you call AllocRemember(), the routine actually does two memory 
  406.     allocations, one for the memory you want and the other for a copy 
  407.     of a Remember structure.  The Remember structure is filled in 
  408.     with data describing your memory allocation, and it's linked 
  409.     into the master list pointed to by your RememberKey.  Then, to 
  410.     free up any memory that's been allocated, all you have to do is 
  411.     call FreeRemember() with your RememberKey.
  412.  
  413.     Please read the FreeRemember() function description, too.  As you will
  414.     see, you can select either to free just the link nodes and keep all the 
  415.     allocated memory for yourself, or to free both the nodes and your memory
  416.     buffers.
  417.  
  418.  
  419.     INPUTS
  420.     RememberKey = the address of a pointer to struct Remember.  Before the
  421.     very first call to AllocRemember, initialize this pointer to NULL. 
  422.  
  423.     Size = the size in bytes of the memory allocation.  Please refer to the
  424.         exec.library/AllocMem() function for details.
  425.     Flags = the specifications for the memory allocation.  Please refer to 
  426.         the exec.library/AllocMem() function for details.
  427.  
  428.     EXAMPLE
  429.     struct Remember *RememberKey;
  430.     RememberKey = NULL;
  431.     buffer = AllocRemember(&RememberKey, BUFSIZE, MEMF_CHIP);
  432.     if (buffer)
  433.     {
  434.         /* Use the buffer */
  435.         ...
  436.     }
  437.     FreeRemember(&RememberKey, TRUE);
  438.  
  439.     RESULT
  440.     If the memory allocation is successful, this routine returns the byte 
  441.     address of your requested memory block.  Also, the node to your block 
  442.     will be linked into the list pointed to by your RememberKey variable.
  443.     If the allocation fails, this routine returns NULL and the list pointed
  444.     to by RememberKey, if any, will be unchanged.
  445.  
  446.     BUGS
  447.     This function makes two allocations for each memory buffer
  448.     you request.  This is neither fast nor good for memory
  449.     fragmentation.
  450.  
  451.     This function should use the exec AllocPool() function internally,
  452.     at least for the Remember headers.
  453.  
  454.     SEE ALSO
  455.     FreeRemember(), exec.library/AllocMem()
  456. intuition.library/AutoRequest                   intuition.library/AutoRequest
  457.  
  458.     NAME
  459.     AutoRequest -- Automatically build and get response from a requester.
  460.  
  461.     SYNOPSIS
  462.     Response = AutoRequest( Window, BodyText, PosText, NegText, 
  463.     D0                      A0      A1        A2       A3
  464.             PosFlags, NegFlags, Width, Height )
  465.             D0        D1        D2     D3
  466.  
  467.     BOOL AutoRequest( struct Window *, struct IntuiText *,
  468.         struct IntuiText *, struct IntuiText *, 
  469.         ULONG, ULONG, WORD, WORD );
  470.  
  471.     FUNCTION
  472.     This procedure automatically builds a requester for you and then 
  473.     waits for a response from the user, or for the system to satisfy your 
  474.     request.  If the response is positive, this procedure returns TRUE.  
  475.     If the response is negative, this procedure returns FALSE.  
  476.  
  477.     An IDCMPFlag specification is created by bitwise "or'ing" your
  478.     PosFlags, NegFlags, and the IDCMP classes IDCMP_GADGETUP and
  479.     IDCMP_RAWKEY.  You may specify zero flags for either the PosFlags
  480.     or NegFlags arguments.  
  481.  
  482.     The IntuiText arguments, and the width and height values, are 
  483.     passed directly to the BuildSysRequest() procedure along with 
  484.     your window pointer and the IDCMP flags.  Please refer to 
  485.     BuildSysRequest() for a description of the IntuiText that you are 
  486.     expected to supply when calling this routine.  It's an important
  487.     but long-winded description that need not be duplicated here.  
  488.  
  489.     If the BuildSysRequest() procedure does not return a pointer 
  490.     to a window, it will return TRUE or FALSE (not valid structure 
  491.     pointers) instead, and these BOOL values will be returned to 
  492.     you immediately.  
  493.  
  494.     On the other hand, if a valid window pointer is returned, that 
  495.     window will have had its IDCMP ports and flags initialized according 
  496.     to your specifications.  AutoRequest() then waits for IDCMP messages 
  497.     on the UserPort, which satisfies one of four requirements:
  498.     -   either the message is of a class that matches 
  499.         one of your PosFlags arguments (if you've supplied 
  500.         any), in which case this routine returns TRUE.  Or
  501.     -   the message class matches one of your NegFlags 
  502.         arguments (if you've supplied any), in which case 
  503.         this routine returns FALSE.  Or
  504.     -   the IDCMP message is of class IDCMP_GADGETUP, which means that
  505.         one of the two gadgets, as provided with the PosText and NegText 
  506.         arguments, was selected by the user.  If the TRUE gadget 
  507.         was selected, TRUE is returned.  If the FALSE gadget was 
  508.         selected, FALSE is returned.  
  509.     -   Lastly, two IDCMP_RAWKEY messages may satisfy the request: those
  510.         for the V and B keys with the left Amiga key depressed.
  511.         These keys, satisfy the gadgets on the left or right side of
  512.         the requester--TRUE or FALSE--, respectively.
  513.  
  514.         NOTE: For V36, these two keys left-Amiga-B and V are processed
  515.         through the default keymap.
  516.  
  517.     When the dust has settled, this routine calls FreeSysRequest() if
  518.     necessary to clean up the requester and any other allocated memory.
  519.  
  520.     NOTE: For V36, this function now switches the processor stack
  521.     to ensure sufficient stack space for the function to succeed.
  522.  
  523.     INPUTS
  524.     Window = pointer to a Window structure.  See BuildSysRequest()
  525.         for a full discussion.
  526.     BodyText = pointer to an IntuiText structure
  527.     PosText = pointer to an IntuiText structure, may by NULL.
  528.     NegText = pointer to an IntuiText structure, MUST be valid!
  529.     PosFlags = flags for the IDCMP
  530.     NegFlags = flags for the IDCMP
  531.     Width, Height = the sizes to be used for the rendering of the requester 
  532.  
  533.     NOTE for V36: The width and height parameters are ignored, as
  534.     are several other specifications in the IntuiText, to make
  535.     AutoRequest() requesters retroactively conform to the new look
  536.     designed for EasyRequest().
  537.  
  538.     RESULT
  539.     The return value is either TRUE or FALSE.  See the text above for a 
  540.     complete description of the chain of events that might lead to either
  541.     of these values being returned.
  542.  
  543.     NOTES
  544.     When DOS brings up AutoRequests() on your process (eg.
  545.     "Please insert volume XXX in any drive", they normally come
  546.     up on the Workbench screen.  If you set your Process pr_WindowPtr
  547.     field to point to one of your windows, then DOS will bring its
  548.     requesters up on the same screen as that window.  A pr_WindowPtr
  549.     of -1 prevents requesters from coming up at all.
  550.     (Some FileSystem requesters cannot be redirected or supressed).
  551.  
  552.     BUGS
  553.     The requester no longer devolves into a call to DisplayAlert()
  554.     if there is not enough memory for the requester.
  555.  
  556.     SEE ALSO
  557.     EasyRequest(), BuildSysRequest(), SysReqHandler()
  558. intuition.library/BeginRefresh                 intuition.library/BeginRefresh
  559.  
  560.     NAME
  561.     BeginRefresh -- Sets up a window for optimized refreshing.
  562.  
  563.     SYNOPSIS
  564.     BeginRefresh( Window )
  565.               A0
  566.  
  567.     VOID BeginRefresh( struct Window * );
  568.  
  569.     FUNCTION
  570.     This routine sets up your window for optimized refreshing.  
  571.  
  572.     Its role is to provide Intuition integrated access to the Layers
  573.     library function BeginUpdate().  Its additional contribution is
  574.     to be sure that locking protocols for layers are followed, by
  575.     locking both layers of a WFLG_GIMMEZEROZERO window only after the
  576.     parent Layer_Info has been locked.  Also, the WFLG_WINDOWREFRESH
  577.     flag is set in your window, for your information.
  578.  
  579.     The purpose of BeginUpdate(), and hence BeginRefresh(), is to 
  580.     restrict rendering in a window (layer) to the region that needs
  581.     refreshing after an operation such as window sizing or uncovering. 
  582.     This restriction to the "damage region" persists until you call
  583.     EndRefresh().
  584.     
  585.     For instance, if you have a WFLG_SIMPLE_REFRESH window which is
  586.     partially concealed and the user brings it to the front, you can
  587.     receive an IDCMP_REFRESHWINDOW message asking you to refresh your
  588.     display.  If you call BeginRefresh() before doing any of the
  589.     rendering, then the layer that underlies your window will be arranged
  590.     so that the only rendering that will actually take place will be that
  591.     which goes to the newly-revealed areas.  This is very performance-
  592.     efficient, and visually attractive.
  593.  
  594.     After you have performed your refresh of the display, you should call
  595.     EndRefresh() to reset the state of the layer and the window.  Then you
  596.     may proceed with rendering to the entire window as usual.
  597.  
  598.     You learn that your window needs refreshing by receiving either a
  599.     message of class IDCMP_REFRESHWINDOW through the IDCMP, or an input
  600.     event of class IECLASS_REFRESHWINDOW through the Console device.
  601.     Whenever you are told that your window needs refreshing, you should
  602.     call BeginRefresh() and EndRefresh() to clear the refresh-needed
  603.     state, even if you don't plan on doing any rendering.  You may relieve
  604.     yourself of even this burden by setting the WFLG_NOCAREREFRESH flag
  605.     when opening your window.
  606.  
  607.     WARNING: You should only perform graphics refreshing operations
  608.     during the period between calling BeginRefresh() and EndRefresh().
  609.     In particular, do not call RefreshGadgets() or RefreshGList(), since
  610.     the locking protocol internal to Intuition runs the risk of creating
  611.     a deadlock.  Note that Intuition refreshes the gadgets (through
  612.     the damage region) before it sends the IDCMP_REFRESHWINDOW message.
  613.  
  614.     ANOTHER WARNING: The concept of multiple refresh passes using
  615.     EndRefresh( w, FALSE ) is not completely sound without further
  616.     protection.  The reason is that between two sessions, more
  617.     damage can occur to your window.  Your final EndRefresh( w, TRUE )
  618.     will dispose of all damage, including the new, and your
  619.     initial refreshing pass will never get the chance to refresh
  620.     the new damage.
  621.  
  622.     To avoid this, you must protect your session using LockLayerInfo()
  623.     which will prevent Intuition from performing window operations
  624.     or anything else which might cause further damage from occurring.
  625.     Again, while holding the LayerInfo lock make no Intuition
  626.     function calls dealing with gadgets; just render.
  627.  
  628.     You can, however, call InstallClipRegion() for the different
  629.     refresh passes, if you have two clip regions.
  630.  
  631.     SIMILAR WARNING: Your program and Intuition "share" your window
  632.     layer's DamageList.  BeginRefresh() helps arbitrate this
  633.     sharing, but the lower-level function layers.library/BeginUpdate()
  634.     does not.  It isn't really supported to use BeginUpdate() on
  635.     a window's layer, but if you do--for whatever reason--it is
  636.     critical that you first acquire the LayerInfo lock as in
  637.     the above example: even if you only have one pass of refresh
  638.     rendering to do.  Otherwise, the refreshing of your window's
  639.     borders and gadgets can be incomplete, and the problem might
  640.     occur only under certain conditions of task priority and
  641.     system load.
  642.  
  643.     EXAMPLE
  644.     Code fragment for "two pass" window refreshing, in response
  645.     to an IDCMP_REFRESHWINDOW message:
  646.     switch ( imsg->Class )
  647.     {
  648.     ...
  649.     case IDCMP_REFRESHWINDOW:
  650.         window = imsg->IDCMPWindow;
  651.  
  652.         /* this lock only needed for "two-pass" refreshing */
  653.         LockLayerInfo( &window->WScreen->LayerInfo );
  654.  
  655.         /* refresh pass for region 1 */
  656.         origclip = InstallClipRegion( window->WLayer, region1 );
  657.         BeginRefresh( window );
  658.         myRefreshRegion1( window );
  659.         EndRefresh( window, FALSE );
  660.  
  661.         /* refresh pass for region 2 */
  662.         InstallClipRegion( window->WLayer, region2 );
  663.         BeginRefresh( window );
  664.         myRefreshRegion2( window );
  665.         EndRefresh( window, TRUE );        /* and dispose damage list */
  666.  
  667.         /* restore and unlock */
  668.         InstallClipRegion( window->WLayer, origclip );
  669.         UnlockLayerInfo( &window->WScreen->LayerInfo );
  670.         break;
  671.     ...
  672.     }
  673.     
  674.  
  675.     INPUTS
  676.     Window = pointer to the window structure which needs refreshing
  677.  
  678.     RESULT
  679.     None
  680.  
  681.     BUGS
  682.     This function should check the return code of
  683.     layers.library/BeginUpdate(), and abort if that function fails.
  684.  
  685.     SEE ALSO
  686.        EndRefresh(), layers.library/BeginUpdate(), OpenWindow()
  687.     layer.library/InstallClipRegion(), graphics.library/LockLayerInfo()
  688.     The "Windows" chapter of the Intuition Reference Manual
  689. intuition.library/BuildEasyRequestArgs intuition.library/BuildEasyRequestArgs
  690.  
  691.     NAME
  692.     BuildEasyRequestArgs -- Simple creation of system request. (V36)
  693.     BuildEasyRequest -- Varargs stub for BuildEasyRequestArgs(). (V36)
  694.  
  695.     SYNOPSIS
  696.     ReqWindow = BuildEasyRequestArgs( RefWindow, easyStruct, IDCMP, Args )
  697.     D0                                A0         A1          D0     A3
  698.  
  699.     struct Window *BuildEasyRequestArgs( struct Window *,
  700.         struct EasyStruct *, ULONG, APTR );
  701.  
  702.     ReqWindow = BuildEasyRequest( RefWindow, easyStruct, IDCMP, Arg1, ... )
  703.  
  704.     struct Window *BuildEasyRequest( struct Window *,
  705.         struct EasyStruct *, ULONG, APTR, ... );
  706.  
  707.     FUNCTION
  708.     This function is to EasyRequest() as BuildSysRequest() is to
  709.     AutoRequest(): it returns a pointer to the system requester
  710.     window.  The input from that window can then be processed
  711.     under application control.
  712.  
  713.     It is recommended that this processing be done with
  714.     SysReqHandler(), so that future enhancement to the
  715.     processing will be enjoyed.
  716.  
  717.     After you have determined that the requester is satisfied or
  718.     cancelled, you must free this requester using FreeSysRequest().
  719.  
  720.     Please see the autodoc for EasyRequest().
  721.  
  722.     NOTE: This function switches the processor stack to ensure
  723.     sufficient stack space for the function to complete.
  724.  
  725.     INPUTS
  726.     Window = reference window for requester: determines the
  727.         requester window title and screen.
  728.     easyStruct = pointer to EasyStruct structure, as described
  729.         in the EasyRequest() autodocs.
  730.     IDCMP = (NOT A POINTER) provided application specific IDCMP
  731.         flags for the system requester window.
  732.     Args = see EasyRequest()
  733.  
  734.     RESULT
  735.     A pointer to the system request window opened.  In the event
  736.     of problems, you may also be returned the value '0' which
  737.     is to be interpreted as the "FALSE, Cancel" choice, or
  738.     (if you have a second gadget defined) the value '1', which
  739.     is to be taken to mean the equivalent of your corresponding
  740.     left-most gadget.
  741.  
  742.     If there is a problem creating the window, a recoverable alert may
  743.     be substituted for the requester, and the result, either 0 or 1,
  744.     returned.
  745.  
  746.     BUGS
  747.     Does not put up alternative alert.
  748.     See also BUGS listed for EasyRequestArgs().
  749.  
  750.     SEE ALSO
  751.     EasyRequestArgs(), FreeSysRequest(), SysReqHandler(), 
  752.     BuildSysRequest(), AutoRequest()
  753. intuition.library/BuildSysRequest           intuition.library/BuildSysRequest
  754.  
  755.     NAME
  756.     BuildSysRequest -- Build and display a system requester.
  757.  
  758.     SYNOPSIS
  759.     ReqWindow = BuildSysRequest( Window, BodyText, PosText, NegText, 
  760.     D0                           A0      A1        A2       A3
  761.                    IDCMPFlags, Width, Height )
  762.                D0          D1     D2
  763.  
  764.     struct Window *BuildSysRequest( struct Window *, struct IntuiText *,
  765.         struct IntuiText *, struct IntuiText *, ULONG, WORD, WORD );
  766.  
  767.     FUNCTION
  768.     This procedure builds a system requester based on the supplied
  769.     information.  If all goes well and the requester is constructed,
  770.     this procedure returns a pointer to the window in which the requester
  771.     appears.  That window will have its IDCMP initialized to reflect the
  772.     flags found in the IDCMPFlags argument.  You may then wait on those
  773.     ports to detect the user's response to your requester, which response
  774.     may include either selecting one of the gadgets or causing some other
  775.     event to be noticed by Intuition (like IDCMP_DISKINSERTED, for
  776.     instance).  After the requester is satisfied, you should call the
  777.     FreeSysRequest() procedure to remove the requester and free up
  778.     any allocated memory.
  779.  
  780.     See the autodoc for SysReqHandler() for more information on the
  781.     how to handle the IntuiMessages this window will receive.
  782.  
  783.     The requester used by this function has the NOISYREQ flag bit set,
  784.     which means that the set of IDCMPFlags that may be used here
  785.     include IDCMP_RAWKEY, IDCMP_MOUSEBUTTONS, and others.
  786.    
  787.     In release previous to V36, if the requester could not be built,
  788.     this function would try to call DisplayAlert() with the same
  789.     information, with more or less favorable results.  In V36,
  790.     the requesters themselves require less memory (SIMPLEREQ), but
  791.     there is no alert attempt.
  792.  
  793.     The function may return TRUE (1) or FALSE if it cannot post
  794.     the requester.  (V36 will always return FALSE, but be sure to
  795.     test for TRUE in case somebody reinstates the fallback alert.)
  796.  
  797.     If the window argument you supply is equal to NULL, a new window will
  798.     be created for you in the Workbench screen, or the default
  799.     public screen, for V36.  If you want the requester
  800.     created by this routine to be bound to a particular window (i.e.,
  801.     to appear in the same screen as the window), you should
  802.     not supply a window argument of NULL.
  803.  
  804.     New for V36: if you pass a NULL window pointer, the system requester
  805.     will appear on the default public screen, which is not always
  806.     the Workbench.
  807.  
  808.     The text arguments are used to construct the display.  Each is a
  809.     pointer to an instance of the structure IntuiText.
  810.  
  811.     The BodyText argument should be used to describe the nature of 
  812.     the requester.  As usual with IntuiText data, you may link several
  813.     lines of text together, and the text may be placed in various 
  814.     locations in the requester.  This IntuiText pointer will be stored
  815.     in the ReqText variable of the new requester.
  816.  
  817.     The PosText argument describes the text that you want associated 
  818.     with the user choice of "Yes,  TRUE,  Retry,  Good."  If the requester 
  819.     is successfully opened, this text will be rendered in a gadget in 
  820.     the lower-left of the requester, which gadget will have the 
  821.     GadgetID field set to TRUE.  If the requester cannot be opened and 
  822.     the DisplayAlert() mechanism is used, this text will be rendered in 
  823.     the lower-left corner of the alert display with additional text 
  824.     specifying that the left mouse button will select this choice.  This 
  825.     pointer can be set to NULL, which specifies that there is no TRUE 
  826.     choice that can be made.
  827.  
  828.     The NegText argument describes the text that you want associated 
  829.     with the user choice of "No,  FALSE,  Cancel,  Bad."  If the requester 
  830.     is successfully opened, this text will be rendered in a gadget in 
  831.     the lower-right of the requester, which gadget will have the 
  832.     GadgetID field set to FALSE.  If the requester cannot be opened and 
  833.     the DisplayAlert() mechanism is used, this text will be rendered in 
  834.     the lower-right corner of the alert display with additional text 
  835.     specifying that the right mouse button will select this choice.  This 
  836.     pointer cannot be set to NULL.  There must always be a way for the
  837.     user to cancel this requester.
  838.  
  839.     The Positive and Negative Gadgets created by this routine have
  840.     the following features:
  841.           - GTYP_BOOLGADGET
  842.           - GACT_RELVERIFY
  843.           - GTYP_REQGADGET
  844.           - GACT_TOGGLESELECT
  845.  
  846.     When defining the text for your gadgets, you may find it convenient
  847.     to use the special constants used by Intuition for the construction
  848.     of the gadgets.  These include defines like AUTODRAWMODE, AUTOLEFTEDGE,
  849.     AUTOTOPEDGE and AUTOFRONTPEN.  You can find these in your local
  850.     intuition.h (or intuition.i) file.
  851.  
  852.     These hard-coded constants are not very resolution or font
  853.     sensitive, but V36 will override them to provide more modern
  854.     layout.
  855.  
  856.     New for V36, linked lists of IntuiText are not correctly supported
  857.     for gadget labels.
  858.  
  859.     The width and height values describe the size of the requester.  All
  860.     of your BodyText must fit within the width and height of your
  861.     requester.  The gadgets will be created to conform to your sizes.
  862.  
  863.     VERY IMPORTANT NOTE:  for this release of this procedure, a new window
  864.     is opened in the same screen as the one containing your window. 
  865.     Future alternatives may be provided as a function distinct from this
  866.     one.
  867.  
  868.     NOTE: This function will pop the screen the requester and its
  869.     window appears in to the front of all screens.  New for V36,
  870.     if the user doesn't perform any other screen arrangement before
  871.     finishing with the requester, a popped screen will be pushed
  872.     back behind.
  873.  
  874.     INPUTS
  875.     Window = pointer to a Window structure
  876.     BodyText = pointer to an IntuiText structure
  877.     PosText = pointer to an IntuiText structure
  878.     NegText = pointer to an IntuiText structure
  879.     IDCMPFlags = the IDCMP flags you want used for the initialization of the
  880.            IDCMP of the window containing this requester
  881.     Width, Height = the size required to render your requester
  882.  
  883.     NOTE for V36: the width and height you pass are ignored, as
  884.     are some of the parameters of your IntuiText, so that Intuition
  885.     can make the Requesters real nice for the new look.
  886.  
  887.     RESULT
  888.     If the requester was successfully created, the value 
  889.     returned by this procedure is a pointer to the window in which the 
  890.     requester is rendered.  If the requester could not be created,
  891.     this routine might have called DisplayAlert() before returning 
  892.     (it depends on the version) and will pass back TRUE if the user
  893.     pressed the left mouse button and FALSE if the user pressed the
  894.     right mouse button.   If the version of Intuition doesn't 
  895.     call DisplayAlert(), or if it does, and there's not enough
  896.     memory for the alert, the value of FALSE is returned.
  897.  
  898.     BUGS
  899.     This procedure currently opens a window in the Screen which 
  900.     contains the window which is passed as a parameter, or the
  901.     default public screen, if that parameter is NULL.  Although
  902.     not as originally envisioned, this will probably always be the
  903.     behavior of this function.
  904.  
  905.     DisplayAlert() is not called in version V36.
  906.  
  907.     It's almost impossible to make complete, correct account
  908.     of different system fonts, window border dimensions, and
  909.     screen resolution to get the layout of a System Requester
  910.     just right using this routine.  For V36, we recommend the
  911.     automatic layout implemented in BuildEasyRequest and EasyRequest.
  912.  
  913.     SEE ALSO
  914.     FreeSysRequest(), DisplayAlert(), ModifyIDCMP(), exec.library/Wait(),
  915.     Request(), AutoRequest(), EasyRequest(), BuildEasyRequestArgs()
  916. intuition.library/ChangeWindowBox           intuition.library/ChangeWindowBox
  917.  
  918.     NAME
  919.     ChangeWindowBox -- Change window position and dimensions. (V36)
  920.  
  921.     SYNOPSIS
  922.     ChangeWindowBox( Window, Left, Top, Width, Height )
  923.              A0     D0    D1   D2     D3
  924.  
  925.     VOID ChangeWindowBox( struct Window *, WORD, WORD, WORD, WORD );
  926.  
  927.     FUNCTION
  928.     Makes simultaneous changes in window position and dimensions,
  929.     in absolute (not relative) coordinates.
  930.  
  931.     Like MoveWindow() and SizeWindow(), the effect of this function
  932.     is deferred until the next input comes along.  Unlike these 
  933.     functions, ChangeWindowBox() specifies absolute window position
  934.     and dimensions, not relative.  This makes for more reliable
  935.     results considering that the action is deferred, so this
  936.     function is typically preferable to MoveWindow() and SizeWindow()
  937.     paired.
  938.  
  939.     You can detect that this operation has completed by receiving
  940.     the IDCMP_CHANGEWINDOW IDCMP message
  941.  
  942.     The dimensions are limited to legal range, but you should still
  943.     take care to specify sensible inputs based on the window's dimension
  944.     limits and the size of its screen.
  945.  
  946.     This function limits the position and dimensions to legal
  947.     values.
  948.  
  949.     INPUTS
  950.     Window = the window to change position/dimension
  951.     Left, Top, Width, Height = new position and dimensions
  952.  
  953.     RESULT
  954.     Position and dimension are changed to your specification,
  955.     or as close as possible.
  956.     Returns nothing.
  957.  
  958.     BUGS
  959.  
  960.     SEE ALSO
  961.     MoveWindow(), SizeWindow(), ZipWindow(),
  962.     layers.library/MoveSizeLayer()
  963. intuition.library/ClearDMRequest             intuition.library/ClearDMRequest
  964.  
  965.     NAME
  966.     ClearDMRequest -- Clear (detaches) the DMRequest of the window.
  967.  
  968.     SYNOPSIS
  969.     Response = ClearDMRequest( Window )
  970.     D0               A0
  971.  
  972.     BOOL ClearDMRequest( struct Window * );
  973.  
  974.     FUNCTION
  975.     Attempts to clear the DMRequest from the specified window,
  976.     that is detaches the special requester that you attach to 
  977.     the double-click of the menu button which the user can then 
  978.     bring up on demand.  This routine WILL NOT clear the DMRequest
  979.     if it's active (in use by the user). The IDCMP message class
  980.     IDCMP_REQCLEAR can be used to detect that the requester is not in use,
  981.     but that message is sent only when the last of perhaps several
  982.     requesters in use in a window is terminated.
  983.  
  984.     INPUTS
  985.     Window = pointer to the window from which the DMRequest is to be cleared.
  986.  
  987.     RESULT
  988.     If the DMRequest was not currently in use, detaches the DMRequest
  989.     from the window and returns TRUE.
  990.  
  991.     If the DMRequest was currently in use, doesn't change anything
  992.     and returns FALSE.
  993.  
  994.     BUGS
  995.  
  996.     SEE ALSO
  997.     SetDMRequest(), Request()
  998. intuition.library/ClearMenuStrip             intuition.library/ClearMenuStrip
  999.  
  1000.     NAME
  1001.     ClearMenuStrip -- Clear (detach) the menu strip from the window.
  1002.  
  1003.     SYNOPSIS
  1004.     ClearMenuStrip( Window )
  1005.                 A0
  1006.  
  1007.     VOID ClearMenuStrip( struct Window * );
  1008.  
  1009.     FUNCTION
  1010.     Detaches the current menu strip from the window; menu strips
  1011.     are attached to windows using the SetMenuStrip() function
  1012.     (or, for V36, ResetMenuStrip() ).
  1013.  
  1014.     If the menu is in use (for that matter if any menu is in use)
  1015.     this function will block (Wait()) until the user has finished.
  1016.  
  1017.     Call this function before you make any changes to the data
  1018.     in a Menu or MenuItem structure which is part of a menu
  1019.     strip linked into a window.
  1020.  
  1021.     INPUTS
  1022.     Window = pointer to a window structure
  1023.  
  1024.     RESULT
  1025.     None
  1026.  
  1027.     BUGS
  1028.  
  1029.     SEE ALSO
  1030.     SetMenuStrip(), ResetMenuStrip()
  1031. intuition.library/ClearPointer                 intuition.library/ClearPointer
  1032.  
  1033.     NAME
  1034.     ClearPointer -- Clear the mouse pointer definition from a window.
  1035.  
  1036.     SYNOPSIS
  1037.     ClearPointer( Window )
  1038.               A0
  1039.  
  1040.     VOID ClearPointer( struct Window * );
  1041.  
  1042.     FUNCTION
  1043.     Clears the window of its own definition of the Intuition mouse pointer.  
  1044.     After calling ClearPointer(), every time this window is the active 
  1045.     one the default Intuition pointer will be the pointer displayed 
  1046.     to the user.  If your window is the active one when this routine 
  1047.     is called, the change will take place immediately.
  1048.  
  1049.     Custom definitions of the mouse pointer which this function clears
  1050.     are installed by a call to SetPointer().
  1051.  
  1052.     INPUTS
  1053.     Window = pointer to the window to be cleared of its pointer definition
  1054.  
  1055.     RESULT
  1056.     None
  1057.  
  1058.     BUGS
  1059.  
  1060.     SEE ALSO
  1061.     SetPointer()
  1062. intuition.library/CloseScreen                   intuition.library/CloseScreen
  1063.  
  1064.     NAME
  1065.     CloseScreen -- Close an Intuition screen.
  1066.  
  1067.     SYNOPSIS
  1068.     [Success =] CloseScreen( Screen )
  1069.     [D0]                 A0
  1070.  
  1071.     [BOOL] CloseScreen( struct Screen * );
  1072.     /* returns BOOL in V36 and greater */
  1073.  
  1074.     FUNCTION
  1075.     Unlinks the screen, unlinks the viewport, deallocates everything that
  1076.     Intuition allocated when the screen was opened (using OpenScreen()).
  1077.     Doesn't care whether or not there are still any windows attached to the
  1078.     screen.  Doesn't try to close any attached windows; in fact, ignores
  1079.     them altogether (but see below for changes in V36).
  1080.  
  1081.     If this is the last screen to go, attempts to reopen Workbench.
  1082.  
  1083.     New for V36: this function will refuse to close the screen
  1084.     if there are windows open on the screen when CloseScreen() is
  1085.     called.  This avoids the almost certain crash when a screen
  1086.     is closed out from under a window.
  1087.  
  1088.     INPUTS
  1089.     Screen = pointer to the screen to be closed.
  1090.  
  1091.     RESULT
  1092.     New for V36: returns TRUE (1) if screen is closed,
  1093.     returns FALSE (0) if screen had open windows when
  1094.     called.
  1095.  
  1096.     BUGS
  1097.  
  1098.     SEE ALSO
  1099.     OpenScreen()
  1100. intuition.library/CloseWindow                   intuition.library/CloseWindow
  1101.  
  1102.     NAME
  1103.     CloseWindow -- Close an Intuition window.
  1104.  
  1105.     SYNOPSIS
  1106.     CloseWindow( Window )
  1107.              A0
  1108.  
  1109.     VOID CloseWindow( struct Window * );
  1110.  
  1111.     FUNCTION
  1112.     Closes an Intuition window.  Unlinks it from the system, deallocates
  1113.     its memory, and makes it disappear.
  1114.  
  1115.     When this function is called, all IDCMP messages which have been sent
  1116.     to your window are deallocated.  If the window had shared a message
  1117.     Port with other windows, you must be sure that there are no unreplied
  1118.     messages for this window in the message queue.  Otherwise, your program
  1119.     will try to make use of a linked list (the queue) which contains free
  1120.     memory (the old messages).  This will give you big problems.
  1121.     See the code fragment CloseWindowSafely(), below.
  1122.  
  1123.     NOTE:  If you have added a Menu strip to this Window (via
  1124.     a call to SetMenuStrip()) you must be sure to remove that Menu strip
  1125.     (via a call to ClearMenuStrip()) before closing your Window.
  1126.     
  1127.     NOTE: This function may block until it is safe to de-link and free
  1128.     your window.  Your program may thus be suspended while the user
  1129.     plays with gadgets, menus, or window sizes and position.
  1130.     
  1131.     New for V36: If your window is a "Visitor Window" (see OpenWindow)
  1132.     CloseWindow will decrement the "visitor count" in the public screen
  1133.     on which the window was open.  When the last visitor window is
  1134.     closed, a signal will be sent to the public screen task, if this
  1135.     was pre-arranged (see OpenScreen).
  1136.  
  1137.     INPUTS
  1138.     Window = a pointer to a Window structure
  1139.  
  1140.     RESULT
  1141.     None
  1142.  
  1143.     BUGS
  1144.  
  1145.     SEE ALSO
  1146.     OpenWindow(), OpenScreen(), CloseScreen()
  1147.  
  1148.     EXAMPLE
  1149.     /*    CloseWindowSafely */
  1150.  
  1151.     /* these functions close an Intuition window
  1152.      * that shares a port with other Intuition
  1153.      * windows or IPC customers.
  1154.      *
  1155.      * We are careful to set the UserPort to
  1156.      * null before closing, and to free
  1157.      * any messages that it might have been
  1158.      * sent.
  1159.      */
  1160.     #include "exec/types.h"
  1161.     #include "exec/nodes.h"
  1162.     #include "exec/lists.h"
  1163.     #include "exec/ports.h"
  1164.     #include "intuition/intuition.h"
  1165.  
  1166.     CloseWindowSafely( win )
  1167.     struct Window *win;
  1168.     {
  1169.         /* we forbid here to keep out of race conditions with Intuition */
  1170.         Forbid();
  1171.  
  1172.         /* send back any messages for this window 
  1173.          * that have not yet been processed
  1174.          */
  1175.         StripIntuiMessages( win->UserPort, win );
  1176.  
  1177.         /* clear UserPort so Intuition will not free it */
  1178.         win->UserPort = NULL;
  1179.  
  1180.         /* tell Intuition to stop sending more messages */
  1181.         ModifyIDCMP( win, 0L );
  1182.  
  1183.         /* turn multitasking back on */
  1184.         Permit();
  1185.  
  1186.         /* and really close the window */
  1187.         CloseWindow( win );
  1188.     }
  1189.  
  1190.     /* remove and reply all IntuiMessages on a port that
  1191.      * have been sent to a particular window
  1192.      * (note that we don't rely on the ln_Succ pointer
  1193.      *  of a message after we have replied it)
  1194.      */
  1195.     StripIntuiMessages( mp, win )
  1196.     struct MsgPort *mp;
  1197.     struct Window *win;
  1198.     {
  1199.         struct IntuiMessage *msg;
  1200.         struct Node *succ;
  1201.  
  1202.         msg = (struct IntuiMessage *) mp->mp_MsgList.lh_Head;
  1203.  
  1204.         while( succ =  msg->ExecMessage.mn_Node.ln_Succ ) {
  1205.  
  1206.         if( msg->IDCMPWindow ==  win ) {
  1207.  
  1208.             /* Intuition is about to free this message.
  1209.              * Make sure that we have politely sent it back.
  1210.              */
  1211.             Remove( msg );
  1212.  
  1213.             ReplyMsg( msg );
  1214.         }
  1215.             
  1216.         msg = (struct IntuiMessage *) succ;
  1217.         }
  1218.     }
  1219. intuition.library/CloseWorkBench             intuition.library/CloseWorkBench
  1220.  
  1221.     NAME 
  1222.     CloseWorkBench -- Closes the Workbench screen.
  1223.  
  1224.     SYNOPSIS 
  1225.     Success = CloseWorkBench() 
  1226.     D0
  1227.  
  1228.     LONG CloseWorkBench( VOID );
  1229.  
  1230.     FUNCTION 
  1231.     This routine attempts to close the Workbench screen:
  1232.        -   Test whether or not any applications have opened windows on the 
  1233.            Workbench, and return FALSE if so.  Otherwise ... 
  1234.        -   Clean up all special buffers 
  1235.        -   Close the Workbench screen 
  1236.        -   Make the Workbench program mostly inactive (it will still  
  1237.            monitor disk activity) 
  1238.        -   Return TRUE 
  1239.  
  1240.     INPUTS 
  1241.     None 
  1242.  
  1243.     RESULT 
  1244.     TRUE if the Workbench screen closed successfully 
  1245.     FALSE if the Workbench was not open, or if it has windows
  1246.         open which are not Workbench drawers.
  1247.  
  1248.    NOTES
  1249.     This routine has been drastically rewritten for V36.
  1250.     It is much more solid, although we haven't eliminated
  1251.     all the problem cases yet.
  1252.  
  1253.     BUGS 
  1254.     The name of this function is improperly spelled.  It ought
  1255.     to have been CloseWorkbench().
  1256.  
  1257.     It might be more convenient to have it return TRUE if the
  1258.     Workbench wasn't opened when called.  The idea as it is now
  1259.     is probably this: if you want to free up the memory of the 
  1260.     Workbench screen when your program begins, you can call
  1261.     CloseWorkBench().  The return value of that call indicates
  1262.     whether you should call OpenWorkBench() when your program 
  1263.     exits: if FALSE, that means either the the Workbench existed
  1264.     but you could not close it, or that it wasn't around to
  1265.     begin with, and you should not try to re-open it.
  1266.  
  1267.     We would prefer that you provide a user selection to attempt
  1268.     to open or close the Workbench screen from within your application,
  1269.     rather than your making assumptions like these.
  1270.  
  1271.     SEE ALSO 
  1272.     OpenWorkBench()
  1273. intuition.library/CurrentTime                   intuition.library/CurrentTime
  1274.  
  1275.     NAME
  1276.     CurrentTime -- Get the current time values.
  1277.  
  1278.     SYNOPSIS
  1279.     CurrentTime( Seconds, Micros )
  1280.              A0       A1
  1281.  
  1282.     VOID CurrentTime( ULONG *, ULONG * );
  1283.  
  1284.     FUNCTION
  1285.     Puts copies of the current time into the supplied argument pointers.
  1286.  
  1287.     This time value is not extremely accurate, nor is it of a very fine 
  1288.     resolution.  This time will be updated no more than sixty times a
  1289.     a second, and will typically be updated far fewer times a second.
  1290.  
  1291.     INPUTS
  1292.     Seconds = pointer to a LONG variable to receive the current seconds
  1293.         value
  1294.     Micros = pointer to a LONG variable for the current microseconds value
  1295.  
  1296.     RESULT
  1297.     Puts the time values into the memory locations specified by the
  1298.         arguments
  1299.     Return value is not defined.
  1300.  
  1301.     BUGS
  1302.  
  1303.     SEE ALSO
  1304.     timer.device/TR_GETSYSTIME
  1305. intuition.library/DisplayAlert                 intuition.library/DisplayAlert
  1306.  
  1307.     NAME
  1308.     DisplayAlert -- Create the display of an alert message.
  1309.  
  1310.     SYNOPSIS
  1311.     Response = DisplayAlert( AlertNumber, String, Height )
  1312.     D0             D0           A0      D1
  1313.  
  1314.     BOOL DisplayAlert( ULONG, UBYTE *, WORD );
  1315.  
  1316.     FUNCTION
  1317.     Creates an alert display with the specified message.
  1318.  
  1319.     If the system can recover from this alert, it's a RECOVERY_ALERT and 
  1320.     this routine waits until the user presses one of the mouse buttons, 
  1321.     after which the display is restored to its original state and a 
  1322.     BOOL value is returned by this routine to specify whether or not 
  1323.     the user pressed the LEFT mouse button.
  1324.    
  1325.     If the system cannot recover from this alert, it's a DEADEND_ALERT
  1326.     and this routine returns immediately upon creating the alert display.
  1327.     The return value is FALSE.
  1328.  
  1329.     NOTE: Starting with V33, if Intuition can't get enough
  1330.     memory for a RECOVERY_ALERT, the value FALSE will be returned.
  1331.  
  1332.     AlertNumber is a LONG value, historically related to the value
  1333.     sent to the Alert() routine.  But the only bits that are pertinent to
  1334.     this routine are the ALERT_TYPE bit(s).  These bits must be set to
  1335.     either RECOVERY_ALERT for alerts from which the system may safely
  1336.     recover, or DEADEND_ALERT for those fatal alerts.  These states are
  1337.     described in the paragraph above.   There is a third type of
  1338.     alert, the DAISY_ALERT, which is used only by the Exec.
  1339.    
  1340.     The string argument points to an AlertMessage string.  The AlertMessage
  1341.     string is comprised of one or more substrings, each of which is 
  1342.     composed of the following components:
  1343.            - first, a 16-bit x-coordinate and an 8-bit y-coordinate, 
  1344.              describing where on the alert display you want this string
  1345.              to appear.  The y-coordinate describes the offset to the
  1346.              baseline of the text.
  1347.            - then, the bytes of the string itself, which must be
  1348.              null-terminated (end with a byte of zero)
  1349.            - lastly, the continuation byte, which specifies whether or
  1350.              not there's another substring following this one.  If the
  1351.              continuation byte is non-zero, there IS another substring
  1352.              to be processed in this alert message.  If the continuation
  1353.              byte is zero, this is the last substring in the message.
  1354.  
  1355.     The last argument, Height, describes how many video lines tall you 
  1356.     want the alert display to be.
  1357.  
  1358.     New for V36: Alerts are always rendered in Topaz 8 (80 column font),
  1359.     regardless of the system default font.  Also, RECOVERY_ALERTs are
  1360.     displayed in amber, while DEADEND_ALERTs are still red.  Alerts
  1361.     no longer push down the application screens to be displayed.  Rather,
  1362.     they appear alone in a black display.
  1363.  
  1364.     Also new for V36: Alerts block each other out, and input
  1365.     during an alert is deprived of the rest of the system.  Internal
  1366.     input buffers still cause alert clicks to be processed by
  1367.     applications sometimes.
  1368.  
  1369.     INPUTS
  1370.     AlertNumber = the number of this alert message.  The only pertinent
  1371.         bits of this number are the ALERT_TYPE bit(s).  The rest of the
  1372.            number is ignored by this routine.
  1373.     String = pointer to the alert message string, as described above
  1374.     Height = minimum display lines required for your message
  1375.  
  1376.     RESULT
  1377.     A BOOL value of TRUE or FALSE.  If this is a DEADEND_ALERT, FALSE
  1378.     is always the return value.  If this is a RECOVERY_ALERT. The return
  1379.     value will be TRUE if the user presses the left mouse button in 
  1380.     response to your message, and FALSE if the user presses the right hand 
  1381.     button is response to your text, or if the alert could not
  1382.     be posted.
  1383.  
  1384.     BUGS
  1385.     If the system is worse off than you think, the level of your alert
  1386.     may become DEADEND_ALERT without you ever knowing about it.  This
  1387.     will NOT happen due simply to low memory.  Rather, the alert 
  1388.     display will be skipped, and FALSE will be returned.
  1389.  
  1390.     The left and right button clicks satisfying the alerts are
  1391.     unfortunately passed to    the normal applications, because of
  1392.     some internal system input buffering.
  1393.  
  1394.     SEE ALSO
  1395.     
  1396. intuition.library/DisplayBeep                   intuition.library/DisplayBeep
  1397.  
  1398.     NAME
  1399.     DisplayBeep -- Flash the video display.
  1400.  
  1401.     SYNOPSIS
  1402.     DisplayBeep( Screen )
  1403.              A0
  1404.  
  1405.     VOID DisplayBeep( struct Screen * );
  1406.  
  1407.     FUNCTION
  1408.     "Beeps" the video display by flashing the background color of the
  1409.     specified screen.  If the screen argument is NULL, every screen
  1410.     in the display will be beeped.  Flashing everyone's screen is not
  1411.     a polite thing to do, so this should be reserved for dire
  1412.     circumstances.
  1413.  
  1414.     The reason such a routine is supported is because the Amiga has
  1415.     no internal bell or speaker.  When the user needs to know of
  1416.     an event that is not serious enough to require the use of a requester,
  1417.     the DisplayBeep() function may be called.
  1418.  
  1419.     New for V36:  Intuition now calls DisplayBeep through the 
  1420.     external library vector.  This means that if you call SetFunction()
  1421.     to replace DisplayBeep with an audible beep, for example, then
  1422.     your change will affect even Intuition's calls to DisplayBeep.
  1423.  
  1424.     INPUTS
  1425.     Screen = pointer to a screen.  If NULL, every screen in the display
  1426.            will be flashed
  1427.  
  1428.     RESULT
  1429.     None
  1430.  
  1431.     BUGS
  1432.  
  1433.     SEE ALSO
  1434.     
  1435. intuition.library/DisposeObject               intuition.library/DisposeObject
  1436.  
  1437.     NAME
  1438.     DisposeObject -- Deletes a 'boopsi' object. (V36)
  1439.  
  1440.     SYNOPSIS
  1441.     DisposeObject( Object )
  1442.                    A0
  1443.  
  1444.     VOID DisposeObject( APTR );
  1445.  
  1446.     FUNCTION
  1447.     Deletes a boopsi object and all of it auxiliary data.
  1448.     These objects are all created by NewObject().  Objects
  1449.     of certain classes "own" other objects, which will also
  1450.     be deleted when the object is passed to DisposeObject().
  1451.     Read the per-class documentation carefully to be aware
  1452.     of these instances.
  1453.  
  1454.     INPUTS
  1455.     Object = abstract pointer to a boopsi object returned by NewObject()
  1456.  
  1457.     NOTES
  1458.     This function invokes the OM_DISPOSE method.
  1459.  
  1460.     RESULT
  1461.     None.
  1462.  
  1463.     BUGS
  1464.  
  1465.     SEE ALSO
  1466.     NewObject(), SetAttrs(), GetAttr(), MakeClass(),
  1467.     Document "Basic Object-Oriented Programming System for Intuition"
  1468.     and the "boopsi Class Reference" document.
  1469. intuition.library/DoubleClick                   intuition.library/DoubleClick
  1470.  
  1471.     NAME
  1472.     DoubleClick -- Test two time values for double-click timing.
  1473.  
  1474.     SYNOPSIS
  1475.     IsDouble = DoubleClick( StartSecs, StartMicros,
  1476.     D0                      D0         D1
  1477.         CurrentSecs, CurrentMicros )
  1478.         D2           D3
  1479.  
  1480.     BOOL DoubleClick( ULONG, ULONG, ULONG, ULONG );
  1481.  
  1482.     FUNCTION
  1483.     Compares the difference in the time values with the double-click 
  1484.     timeout range that the user has set (using the "Preferences" tool) or 
  1485.     some other program has configured into the system.  If the 
  1486.     difference between the specified time values is within the current 
  1487.     double-click time range, this function returns TRUE, else it 
  1488.     returns FALSE.  
  1489.  
  1490.        These time values can be found in input events and IDCMP messages.
  1491.        The time values are not perfect; however, they are precise enough for 
  1492.        nearly all applications.
  1493.  
  1494.     INPUTS
  1495.     StartSeconds, StartMicros = the timestamp value describing the start of
  1496.           the double-click time period you are considering
  1497.     CurrentSeconds, CurrentMicros = the timestamp value describing 
  1498.           the end of the double-click time period you are considering
  1499.  
  1500.     RESULT
  1501.     If the difference between the supplied timestamp values is within the
  1502.     double-click time range in the current set of Preferences, this
  1503.     function returns TRUE, else it returns FALSE
  1504.  
  1505.     BUGS
  1506.  
  1507.     SEE ALSO
  1508.     CurrentTime()
  1509. intuition.library/DrawBorder                     intuition.library/DrawBorder
  1510.  
  1511.     NAME
  1512.     DrawBorder -- Draw the specified Border structure into a RastPort.
  1513.  
  1514.     SYNOPSIS
  1515.     DrawBorder( RastPort, Border, LeftOffset, TopOffset )
  1516.             A0        A1      D0          D1
  1517.  
  1518.     VOID DrawBorder( struct RastPort *, struct Border *, WORD, WORD );
  1519.  
  1520.     FUNCTION
  1521.     First, sets up the draw mode and pens in the RastPort according to the
  1522.     arguments of the Border structure.  Then, draws the vectors of
  1523.     the border argument into the RastPort, offset by the left and top
  1524.     offsets.
  1525.  
  1526.     As with all graphics rendering routines, the border will be clipped to
  1527.     to the boundaries of the RastPort's layer, if it exists.  This is
  1528.     the case with window RastPorts.
  1529.  
  1530.     This routine will draw all borders in the NULL-terminated list linked
  1531.     by the NextBorder field of the border argument.
  1532.  
  1533.     INPUTS
  1534.     RastPort = pointer to the RastPort to receive the border rendering
  1535.     Border = pointer to a Border structure
  1536.     LeftOffset = the offset to be added to each vector's x coordinate
  1537.     TopOffset = the offset to be added to each vector's y coordinate
  1538.  
  1539.     RESULT
  1540.     None
  1541.  
  1542.     BUGS
  1543.  
  1544.     SEE ALSO
  1545.     
  1546. intuition.library/DrawImage                       intuition.library/DrawImage
  1547.  
  1548.     NAME
  1549.     DrawImage -- Draw the specified Image structure into a RastPort.
  1550.  
  1551.     SYNOPSIS
  1552.     DrawImage( RastPort, Image, LeftOffset, TopOffset )
  1553.            A0        A1     D0          D1
  1554.  
  1555.     VOID DrawImage( struct RastPort *, struct Image    *, WORD, WORD );
  1556.  
  1557.     FUNCTION
  1558.     First, sets up the draw mode and pens in the RastPort according to the
  1559.     arguments of the Image structure.  Then, moves the image data of
  1560.     the image argument into the RastPort, offset by the left and top
  1561.     offsets.
  1562.     
  1563.     This routine does window layer clipping if you pass your window's
  1564.     (layered) RastPort -- if you draw an image outside of your window,
  1565.     your imagery will be clipped at the window's edge.  If you pass
  1566.     a (non-layered) screen RastPort, you MUST be sure your image is
  1567.     wholly contained within the rastport bounds.
  1568.  
  1569.     If the NextImage field of the image argument is non-NULL, 
  1570.     the next image is rendered as well, and so on until some
  1571.     NextImage field is found to be NULL.
  1572.  
  1573.     INPUTS
  1574.     RastPort = pointer to the RastPort to receive image rendering
  1575.     Image = pointer to an image structure
  1576.     LeftOffset = the offset which will be added to the image's x coordinate
  1577.     TopOffset = the offset which will be added to the image's y coordinate
  1578.  
  1579.     RESULT
  1580.     None
  1581.  
  1582.     NOTES
  1583.     Intuition always has and will continue to assume there are
  1584.     at least as many planes of data pointed to by ImageData as there
  1585.     are '1' bits in the PlanePick field.  Please ensure that
  1586.     this is so.  (See the intuition.h include file for full details
  1587.     on using PlanePick).
  1588.  
  1589.     BUGS
  1590.  
  1591.     SEE ALSO
  1592.     DrawImageState(), EraseImage()
  1593. intuition.library/DrawImageState             intuition.library/DrawImageState
  1594.  
  1595.    NAME    
  1596.     DrawImageState -- Draw an (extended) Intuition Image with
  1597.         special visual state. (V36)
  1598.  
  1599.    SYNOPSIS
  1600.     DrawImageState( RPort, Image, LeftOffset, TopOffset, State, DrawInfo )
  1601.             A0     A1     D0          D1         D2     A2
  1602.     
  1603.     VOID DrawImageState( struct RastPort *, struct Image *,
  1604.         WORD, WORD, ULONG, struct DrawInfo * );
  1605.  
  1606.    FUNCTION
  1607.     This function draws an Intuition Image structure in a variety of
  1608.     "visual states," which are defined by constants in
  1609.     intuition/imageclass.h.  These include:
  1610.     IDS_NORMAL        - like DrawImage()
  1611.     IDS_SELECTED        - represents the "selected state" of a Gadget
  1612.     IDS_DISABLED        - the "ghosted state" of a gadget
  1613.     IDS_BUSY        - for future functionality
  1614.     IDS_INDETERMINATE    - for future functionality
  1615.     IDS_INACTIVENORMAL    - for gadgets in window border
  1616.     IDS_INACTIVESELECTED    - for gadgets in window border
  1617.     IDS_INACTIVEDISABLED    - for gadgets in window border
  1618.  
  1619.     Only IDS_NORMAL will make sense for traditional Image structures,
  1620.     this function is more useful when applied to new custom images
  1621.     or "object-oriented image classes."
  1622.  
  1623.     Each class of custom images is responsible for documenting which
  1624.     visual states it supports, and you typically want to use images
  1625.     which support the appropriate states with your custom gadgets.
  1626.  
  1627.     The DrawInfo parameter provides information invaluable to 
  1628.     "rendered" images, such as pen color and resolution.  Each
  1629.     image class must document whether this parameter is required.
  1630.  
  1631.    INPUTS
  1632.      RPort    - RastPort for rendering
  1633.     Image    - pointer to a (preferably custom) image
  1634.     LeftOffset,RightOffset - positional offsets in pixels
  1635.     State    - visual state selected from above
  1636.     DrawInfo - pointer to packed of pen selections and resolution.
  1637.  
  1638.    RESULT
  1639.      None.
  1640.  
  1641.    EXAMPLE
  1642.     Provided separately in the DevCon '90 disk set.
  1643.  
  1644.    NOTES
  1645.     
  1646.  
  1647.    BUGS
  1648.     
  1649.  
  1650.    SEE ALSO
  1651.     DrawImage(), GetScreenDrawInfo(), intuition/imageclass.h
  1652.  
  1653. intuition.library/EasyRequestArgs           intuition.library/EasyRequestArgs
  1654.  
  1655.     NAME
  1656.     EasyRequestArgs -- Easy alternative to AutoRequest(). (V36)
  1657.     EasyRequest -- Varargs stub for EasyRequestArgs(). (V36)
  1658.  
  1659.     SYNOPSIS
  1660.     num = EasyRequestArgs( Window, easyStruct, IDCMP_ptr, ArgList )
  1661.     D0                     A0      A1          A2         A3
  1662.  
  1663.     LONG EasyRequestArgs( struct Window *, struct EasyStruct *,
  1664.         ULONG *, APTR );
  1665.  
  1666.     num = EasyRequest( Window, easyStruct, IDCMP_ptr, Arg1, Arg2, ... )
  1667.  
  1668.     LONG EasyRequest( struct Window *, struct EasyStruct *,
  1669.         ULONG *, APTR, ... );
  1670.  
  1671.     ( from intuition.h )
  1672.     struct EasyStruct {
  1673.         ULONG    es_StructSize;
  1674.         ULONG    es_Flags;
  1675.         UBYTE    *es_Title;
  1676.         UBYTE    *es_TextFormat;
  1677.         UBYTE    *es_GadgetFormat;
  1678.     };
  1679.  
  1680.     FUNCTION
  1681.     This function provides a simpler method of using a 'System
  1682.     Requester' than provided by AutoRequest().  It performs layout
  1683.     and size calculations sensitive to the current font and screen
  1684.     resolution.
  1685.  
  1686.     It provides for the descriptive 'body' text and the gadget
  1687.     text to be constructed from 'printf' style format strings.
  1688.  
  1689.     It also provides a general way for the requester to be
  1690.     sensitive to particular IDCMP messages.
  1691.     
  1692.     The first function listed is the actual Intuition library
  1693.     function.  It is passed the arguments for the formatting
  1694.     operations as a pointer to the first argument.
  1695.  
  1696.     The second function uses a C-style variable number of argument
  1697.     (varargs) calling convention.  It should be implemented as
  1698.     a call to the first function, and might be supplied by your
  1699.     compiler vendor, in amiga.lib, or using the first example below,
  1700.     for most C compilers.
  1701.  
  1702.     NOTE: The formatting is done by exec.library/RawDoFmt(), so
  1703.     be aware that to display a 32-bit integer argument, for
  1704.     example, you must say "%ld", not "%d", since RawDoFmt() is
  1705.     "word-oriented."
  1706.  
  1707.     NOTE: This function switches the processor stack to ensure
  1708.     sufficient stack space for the function to complete.
  1709.  
  1710.     EXAMPLES
  1711.     /* varargs interface works for most C compilers */
  1712.     EasyRequest( w, es, ip, arg1 )
  1713.     struct Window    *w;
  1714.     struct EasyStruct *es;
  1715.     ULONG          *ip;
  1716.     int          arg1;
  1717.     {
  1718.         return ( EasyRequestArgs( w, es, ip, &arg1 ) );
  1719.     }
  1720.  
  1721.     /*********************************************/
  1722.  
  1723.     /* typical use */
  1724.     struct EasyStruct volumeES = {
  1725.         sizeof (struct EasyStruct),
  1726.         0,
  1727.         "Volume Request",
  1728.         "Please insert volume %s in any drive.",
  1729.         "Retry|Cancel",
  1730.     };
  1731.     #define CANCEL    (0)
  1732.  
  1733.     Volume    *
  1734.     getVolume( volname )
  1735.     UBYTE    *volname;
  1736.     {
  1737.         Volume    *vptr;
  1738.         Volume    *findVolume();
  1739.         UWORD    reply;
  1740.         ULONG    iflags;
  1741.  
  1742.         iflags = IDCMP_DISKINSERTED;
  1743.  
  1744.     while ( ((vptr = findVolume( volname )) == NULL) &&
  1745.      (EasyRequest( w, &volumeES, &iflags, volname ) != CANCEL) )
  1746.         /* loop */ ;
  1747.  
  1748.         /* note that in some circumstances, you will have to
  1749.            re-initialize the value of 'iflags'.  Here, it
  1750.            is either unchanged, or returned as the single
  1751.            IDCMPFlag value IDCMP_DISKINSERTED.  If you combine
  1752.            multiple  IDCMPFlag values in 'iflags,' only
  1753.            one will be returned, so you must reinitialize
  1754.            'iflags' to be the combination.
  1755.           */
  1756.         return ( vptr );
  1757.     }
  1758.  
  1759.     INPUTS
  1760.     Window = Reference window pointer, determines the screen and
  1761.         title of the requester window.  This can be NULL, which
  1762.         means the requester is to appear on the Workbench screen,
  1763.         or default public screen, if defined.
  1764.     IDCMP_ptr = Pointer to IDCMP flags that you want to terminate
  1765.         the requester.  This pointer may be NULL.
  1766.     easyStruct = Pointer to EasyStruct structure with fields
  1767.         interpreted as follows:
  1768.  
  1769.     es_StructSize = sizeof (struct EasyStruct), for future extension.
  1770.     es_Flags = 0 for now, in the future may specify other options.
  1771.     es_Title = Title of system requester window.  If this is NULL,
  1772.         the title will be taken to be the same as the title of 'Window',
  1773.         if provided, or else "System Request."
  1774.     es_TextFormat = Format string, a la RawDoFmt(), for message in
  1775.         requester body.  Lines are separated by '\n'.  Formatting
  1776.         '%' functions are supported exactly as in RawDoFmt().
  1777.     es_GadgetFormat = Format string for gadgets.  Text for separate 
  1778.         gadgets is separated by '|'.  Format functions are supported.
  1779.         You MUST specify at least one gadget.
  1780.  
  1781.     Args = Arguments for format commands.   Arguments for
  1782.         GadFmt follow arguments for TextFmt.
  1783.  
  1784.     RESULT
  1785.     0, 1, ..., N = Successive GadgetID values, for the gadgets
  1786.         you specify for the requester.  NOTE: The numbering
  1787.         from left to right is actually: 1, 2, ..., N, 0.
  1788.         This is for compatibility with AutoRequests which has
  1789.         FALSE for the rightmost gadget.
  1790.         
  1791.     -1 = Means that one of the caller-supplied IDCMPFlags occurred.
  1792.         The IDCMPFlag value is in the longword pointed to by IDCMP_ptr.
  1793.  
  1794.     NOTES
  1795.     When DOS brings up EasyRequests() on your process (eg.
  1796.     "Please insert volume XXX in any drive", they normally come
  1797.     up on the default public screen, which is usually the Workbench
  1798.     screen.  If you set your Process pr_WindowPtr field to point to
  1799.     one of your windows, then DOS will bring its requesters up on the
  1800.     same screen as that window.  A pr_WindowPtr of -1 prevents
  1801.     requesters from coming up at all.
  1802.     (Some FileSystem requesters cannot be redirected or supressed).
  1803.  
  1804.     BUGS
  1805.     Does not fall back to a recoverable alert if the requester
  1806.      cannot be created.
  1807.  
  1808.     Does not handle case when gadgets don't fit or window title
  1809.     is too long, although it does trim trailing spaces from the
  1810.     title for calculating dimensions.
  1811.  
  1812.     PLANS
  1813.     Possible enhancements include: centering of text, size-sensitive
  1814.     layout,  window-relative requester, vertical gadget layout,
  1815.     window placement, more keyboard shortcuts.
  1816.  
  1817.     We also reserve the use of the newline character '\n' in
  1818.     gadget format strings for future use as a line separator.
  1819.  
  1820.     SEE ALSO
  1821.     exec.library/RawDoFmt(), BuildEasyRequestArgs(), SysReqHandler(), 
  1822.     AutoRequest(), BuildSysRequest()
  1823. intuition.library/EndRefresh                     intuition.library/EndRefresh
  1824.  
  1825.     NAME
  1826.     EndRefresh -- End the optimized refresh state of the window.
  1827.  
  1828.     SYNOPSIS
  1829.     EndRefresh( Window, Complete )
  1830.             A0      D0
  1831.  
  1832.     VOID EndRefresh( struct Window *, BOOL );
  1833.  
  1834.     FUNCTION
  1835.     This function gets you out of the special refresh state of your 
  1836.     window.  It is called following a call to BeginRefresh(), which 
  1837.     routine puts you into the special refresh state.  While your window
  1838.     is in the refresh state, the only rendering that will be wrought in
  1839.     your window will be to those areas which were recently revealed and
  1840.     need to be refreshed.
  1841.  
  1842.     After you've done all the refreshing you want to do for this window, 
  1843.     you should call this routine to restore the window to its
  1844.     non-refreshing state.  Then all rendering will go to the entire
  1845.     window, as usual.
  1846.    
  1847.     The 'Complete' argument is a boolean TRUE or FALSE value used to 
  1848.     describe whether or not the refreshing you've done was all the
  1849.     refreshing that needs to be done at this time.  Most often, this
  1850.     argument will be TRUE.  But if, for instance, you have multiple
  1851.     tasks or multiple procedure calls which must run to completely
  1852.     refresh the window, then each can call its own Begin/EndRefresh() 
  1853.     pair with a Complete argument of FALSE, and only the last calls
  1854.     with a Complete argument of TRUE.
  1855.  
  1856.     WARNING:  Passing this function the value of FALSE has its
  1857.     pitfalls.  Please see the several caveats in the autodoc for
  1858.     BeginRefresh().
  1859.  
  1860.     For your information, this routine calls the Layers library function
  1861.     EndUpdate(), unlocks your layers (calls UnlockLayerRom()), clears
  1862.     the LAYERREFRESH bit in your Layer Flags, and clears the
  1863.     WFLG_WINDOWREFRESH bit in your window Flags.
  1864.  
  1865.     INPUTS
  1866.     Window = pointer to the window currently in optimized-refresh mode
  1867.     Complete = Boolean TRUE or FALSE describing whether or not this
  1868.            window is completely refreshed
  1869.  
  1870.     RESULT
  1871.     None
  1872.  
  1873.     BUGS
  1874.  
  1875.     SEE ALSO
  1876.     BeginRefresh(), layers.library/EndUpdate(),
  1877.     graphics.library/UnlockLayerRom()
  1878. intuition.library/EndRequest                     intuition.library/EndRequest
  1879.  
  1880.     NAME
  1881.     EndRequest -- Remove a currently active requester.
  1882.  
  1883.    SYNOPSIS
  1884.     EndRequest( Requester, Window )
  1885.             A0         A1
  1886.  
  1887.     VOID EndRequest( struct Requester *, struct Window * );
  1888.  
  1889.     FUNCTION
  1890.     Ends the request by erasing the requester and decoupling it from
  1891.     the window.
  1892.  
  1893.     Note that this doesn't necessarily clear all requesters from the window,
  1894.     only the specified one.  If the window labors under other requesters,
  1895.     they will remain in the window.
  1896.  
  1897.     INPUTS
  1898.     Requester = pointer to the requester to be removed
  1899.     Window = pointer to the Window structure with which this requester 
  1900.            is associated
  1901.  
  1902.     RESULT
  1903.     None
  1904.  
  1905.     BUGS
  1906.  
  1907.     SEE ALSO
  1908.     Request()
  1909. intuition.library/EraseImage                     intuition.library/EraseImage
  1910.  
  1911.    NAME    
  1912.     EraseImage -- Erases an Image. (V36)
  1913.  
  1914.    SYNOPSIS
  1915.     EraseImage( RPort, Image, LeftOffset, TopOffset )
  1916.                 A0     A1     D0          D1
  1917.  
  1918.     VOID EraseImage( struct RastPort *, struct Image *, WORD, WORD );
  1919.  
  1920.    FUNCTION
  1921.     Erases an Image.  For a normal Image structure, this will
  1922.     call the graphics function EraseRect() (clear using layer
  1923.     backfill, if any) for the Image box (LeftEdge/TopEdge/Width/Height).
  1924.  
  1925.     For custom image, the exact behavior is determined by the
  1926.     custom image class.
  1927.  
  1928.    INPUTS
  1929.      RPort    - RastPort to erase a part of
  1930.     Image    - custom or standard image
  1931.     LeftOffset,RightOffset - pixel offsets of Image position
  1932.  
  1933.    RESULT
  1934.      None.
  1935.  
  1936.    EXAMPLE
  1937.     
  1938.  
  1939.    NOTES
  1940.     
  1941.  
  1942.    BUGS
  1943.     
  1944.  
  1945.    SEE ALSO
  1946.     graphics.library/EraseRect().
  1947.  
  1948. intuition.library/FreeClass                       intuition.library/FreeClass
  1949.  
  1950.     NAME
  1951.     FreeClass -- Frees a boopsi class created by MakeClass(). (V36)
  1952.  
  1953.     SYNOPSIS
  1954.     success = FreeClass( ClassPtr )
  1955.     D0                   A0
  1956.  
  1957.     BOOL FreeClass( struct IClass * );
  1958.  
  1959.     FUNCTION
  1960.     For class implementors only.
  1961.  
  1962.     Tries to free a boopsi class created by MakeClass().  This
  1963.     won't always succeed: classes with outstanding objects or
  1964.     with subclasses cannot be freed.  You cannot allow the code
  1965.     which implements the class to be unloaded in this case.
  1966.  
  1967.     For public classes, this function will *always* remove
  1968.     the class (see RemoveClass() ) making it unavailable, whether
  1969.     it succeeds or not.
  1970.     
  1971.     If you have a dynamically allocated data for your class (hanging
  1972.     off of cl_UserData), try to free the class before you free the
  1973.     user data, so you don't get stuck with a half-freed class.
  1974.  
  1975.     INPUTS
  1976.     ClassPtr - pointer to a class created by MakeClass().
  1977.  
  1978.     RESULT
  1979.     Returns FALSE if the class could not be freed.  Reasons include,
  1980.     but will not be limited to, having non-zero cl_ObjectCount or
  1981.     cl_SubclassCount.
  1982.  
  1983.     Returns TRUE if the class could be freed.
  1984.  
  1985.     Calls RemoveClass() for the class in either case.
  1986.     
  1987.     EXAMPLE
  1988.     Freeing a private class with dynamically allocated user data:
  1989.  
  1990.     freeMyClass( cl )
  1991.     struct IClass    *cl;
  1992.     {
  1993.         struct MyPerClassData    *mpcd;
  1994.  
  1995.         mpcd = (struct MyPerClassData *) cl->cl_UserData;
  1996.         if ( FreeClass( cl ) )
  1997.         {
  1998.         FreeMem( mpcd, sizeof mpcd );
  1999.         return ( TRUE );
  2000.         }
  2001.         else
  2002.         {
  2003.         return ( FALSE );
  2004.         }
  2005.     }
  2006.  
  2007.     BUGS
  2008.  
  2009.     SEE ALSO
  2010.     MakeClass(),
  2011.     Document "Basic Object-Oriented Programming System for Intuition"
  2012.     and the "boopsi Class Reference" document.
  2013.     
  2014. intuition.library/FreeRemember                 intuition.library/FreeRemember
  2015.  
  2016.     NAME
  2017.     FreeRemember -- Free memory allocated by calls to AllocRemember().
  2018.  
  2019.     SYNOPSIS
  2020.     FreeRemember( RememberKey, ReallyForget )
  2021.               A0           D0
  2022.  
  2023.     VOID FreeRemember( struct Remember **, BOOL );
  2024.  
  2025.     FUNCTION
  2026.     This function frees up memory allocated by the AllocRemember() function.
  2027.     It will either free up just the Remember structures, which supply the
  2028.     link nodes that tie your allocations together, or it will deallocate
  2029.     both the link nodes AND your memory buffers too.
  2030.     
  2031.     If you want to deallocate just the Remember structure link nodes,
  2032.     you should set the ReallyForget argument to FALSE.  However, if you
  2033.     want FreeRemember to really deallocate all the memory, including
  2034.     both the Remember structure link nodes and the buffers you requested
  2035.     via earlier calls to AllocRemember(), then you should set the 
  2036.     ReallyForget argument to TRUE.
  2037.  
  2038.     NOTE WELL: Once you call this function passing it FALSE, the
  2039.     linkages between all the memory chunks are lost, and you
  2040.     cannot subsequently use FreeRemember() to free them.
  2041.  
  2042.     INPUTS
  2043.     RememberKey = the address of a pointer to struct Remember.  This
  2044.            pointer should either be NULL or set to some value (possibly
  2045.            NULL) by a call to AllocRemember().
  2046.     ReallyForget = a BOOL FALSE or TRUE describing, respectively, 
  2047.            whether you want to free up only the Remember nodes or 
  2048.            if you want this procedure to really forget about all of 
  2049.            the memory, including both the nodes and the memory buffers 
  2050.            referenced by the nodes.
  2051.  
  2052.     EXAMPLE
  2053.     struct Remember *RememberKey;
  2054.     RememberKey = NULL;
  2055.     AllocRemember(&RememberKey, BUFSIZE, MEMF_CHIP);
  2056.     FreeRemember(&RememberKey, TRUE);
  2057.  
  2058.     RESULT
  2059.     None
  2060.  
  2061.     BUGS
  2062.  
  2063.     SEE ALSO
  2064.     AllocRemember(), exec.library/FreeMem()
  2065. intuition.library/FreeScreenDrawInfo     intuition.library/FreeScreenDrawInfo
  2066.  
  2067.    NAME    
  2068.      FreeScreenDrawInfo -- Finish using a DrawInfo structure. (V36)
  2069.  
  2070.    SYNOPSIS
  2071.     FreeScreenDrawInfo( Screen, DrInfo )
  2072.                 A0      A1
  2073.     
  2074.     VOID FreeScreenDrawInfo( struct Screen *, struct DrawInfo * );
  2075.  
  2076.    FUNCTION
  2077.     Declares that you are finished with the DrawInfo structure
  2078.     returned by GetScreenDrawInfo().
  2079.  
  2080.    INPUTS
  2081.      Screen          - pointer to screen passed to GetScreenDrawInfo()
  2082.     DrInfo      - pointer to DrawInfo returned by GetScreenDrawInfo()
  2083.  
  2084.    RESULT
  2085.      None
  2086.  
  2087.    NOTES
  2088.     This function, and GetScreenDrawInfo(), don't really do much, but
  2089.     they provide an upward compatibility path.  That means that
  2090.     if you misuse them today, they probably won't cause a problem,
  2091.     although they may someday later.  So, please be very careful
  2092.     only to use the DrawInfo structure between calls to
  2093.     GetScreenDrawInfo() and FreeScreenDrawInfo(), and be sure
  2094.     that you don't forget FreeScreenDrawInfo().
  2095.  
  2096.    BUGS
  2097.  
  2098.    SEE ALSO
  2099.     GetScreenDrawInfo()
  2100.  
  2101. intuition.library/FreeSysRequest             intuition.library/FreeSysRequest
  2102.  
  2103.     NAME
  2104.     FreeSysRequest -- Free resources gotten by a call to BuildSysRequest().
  2105.  
  2106.     SYNOPSIS
  2107.     FreeSysRequest( Window )
  2108.                 A0
  2109.  
  2110.     VOID FreeSysRequest( struct Window * );
  2111.  
  2112.     FUNCTION
  2113.     This routine frees up all memory allocated by a successful call to
  2114.     the BuildSysRequest() procedure.  If BuildSysRequest() returned a
  2115.     pointer to a window, then you are able to wait on the message port
  2116.     of that window to detect an event which satisfies the requester.
  2117.     When you want to remove the requester, you call this procedure.  It
  2118.     ends the requester and deallocates any memory used in the creation
  2119.     of the requester.  It also closes the special window that was opened
  2120.     for your system requester.
  2121.  
  2122.     For V36: It's OK if you pass a NULL or a TRUE (1) value to
  2123.     this function.  Also, this function properly disposes of
  2124.     requesters gotten using BuildEasyRequest().
  2125.  
  2126.     INPUTS
  2127.     Window = value of the window pointer returned by a successful call to
  2128.            the BuildSysRequest() procedure
  2129.  
  2130.     RESULT
  2131.     None
  2132.  
  2133.     BUGS
  2134.  
  2135.     SEE ALSO
  2136.     BuildSysRequest(), AutoRequest(), CloseWindow()
  2137. intuition.library/GadgetMouse                   intuition.library/GadgetMouse
  2138.  
  2139.     NAME
  2140.     GadgetMouse -- Calculate gadget-relative mouse position. (V36)
  2141.  
  2142.     SYNOPSIS
  2143.     GadgetMouse( Gadget, GInfo, MousePoint )
  2144.              A0      A1     A2
  2145.  
  2146.     VOID GadgetMouse( struct GadgetInfo *, WORD * );
  2147.  
  2148.     FUNCTION
  2149.     Determines the current location of the mouse pointer relative
  2150.     to the upper-left corner of a custom gadget.  Typically used
  2151.     only in the GM_HANDLEINPUT and GM_GOACTIVE custom gadget hook
  2152.     routines.
  2153.  
  2154.     NEWS FLASH!!: These two hook routines are now passed the mouse
  2155.     coordinates, so this function has no known usefulness.
  2156.  
  2157.     We recommend that you don't call it.
  2158.  
  2159.     Note that this function calculates the mouse position taking
  2160.     "gadget relativity" (GFLG_RELRIGHT, GFLG_RELBOTTOM) into
  2161.     consideration.  If your custom gadget intends to ignore these
  2162.     properties, then you should either enjoin or inhibit your users
  2163.     from setting those bits, since Intuition won't ask if you respect
  2164.     them.
  2165.  
  2166.     INPUTS
  2167.     GInfo = A pointer to a GadgetInfo structure as passed to the
  2168.         custom gadget hook routine.
  2169.     MousePoint = address of two WORDS, or a pointer to a structure of
  2170.         type Point.
  2171.  
  2172.     RESULT
  2173.     Returns nothing.  Fills in the two words pointed to by
  2174.     MousePoint with the gadget-relative mouse position.
  2175.  
  2176.     BUGS
  2177.     Useless, since equivalent information is now passed to every
  2178.     function that might have a use for this.
  2179.  
  2180.     SEE ALSO
  2181.     
  2182. intuition.library/GetAttr                           intuition.library/GetAttr
  2183.  
  2184.     NAME
  2185.     GetAttr -- Inquire the value of some attribute of an object. (V36)
  2186.  
  2187.     SYNOPSIS
  2188.     attr = GetAttr( AttrID, Object, StoragePtr )
  2189.     D0        D0    A0    A1
  2190.  
  2191.     ULONG GetAttr( ULONG, APTR, ULONG * );
  2192.  
  2193.     FUNCTION
  2194.     Inquires from the specified object the value of the specified attribute.
  2195.  
  2196.     You always pass the address of a long variable, which will
  2197.     receive the same value that would be passed to SetAttrs() in
  2198.     the ti_Data portion of a TagItem element.  See the documentation
  2199.     for the class for exceptions to this general rule.
  2200.     
  2201.     Not all attributes will respond to this function.  Those that
  2202.     will are documented on a class-by-class basis.
  2203.  
  2204.     INPUTS
  2205.     AttrID = the attribute tag ID understood by the object's class
  2206.     Object = abstract pointer to the boopsi object you are interested in
  2207.     StoragePtr = pointer to appropriate storage for the answer
  2208.  
  2209.     RESULT
  2210.     Returns FALSE (0) if the inquiries of attribute are not provided
  2211.     by the object's class.
  2212.     
  2213.     NOTES
  2214.     This function invokes the OM_GET method of the object.
  2215.  
  2216.     BUGS
  2217.  
  2218.     SEE ALSO
  2219.     NewObject(), DisposeObject(), SetAttrs(), MakeClass(),
  2220.     Document "Basic Object-Oriented Programming System for Intuition"
  2221.     and the "boopsi Class Reference" document.
  2222.     
  2223. intuition.library/GetDefaultPubScreen   intuition.library/GetDefaultPubScreen
  2224.  
  2225.     NAME
  2226.     GetDefaultPubScreen -- Get name of default public screen. (V36)
  2227.  
  2228.     SYNOPSIS
  2229.     GetDefaultPubScreen( Namebuff )
  2230.                  A0
  2231.  
  2232.     VOID GetDefaultPubScreen( UBYTE * );
  2233.  
  2234.     FUNCTION
  2235.     Provides the name of the current default public screen.
  2236.     Only anticipated use is for Public Screen Manager utilities,
  2237.     since it is easy to open a visitor window on the default
  2238.     public screen without specifying the name.
  2239.  
  2240.     INPUTS
  2241.     Namebuff = a buffer of MAXPUBSCREENNAME.  This can be NULL.
  2242.  
  2243.     RESULT
  2244.     None.  Will provide the string "Workbench" in Namebuff if there
  2245.     is no current default public screen.
  2246.  
  2247.     NOTE
  2248.     This function actually "returns" in register D0 a pointer
  2249.     to the public screen.  Unfortunately, the lifespan of
  2250.     this pointer is not ensured; the screen could be closed
  2251.     at any time.  The *ONLY* legitimate use we can see for
  2252.     this return value is to compare for identity with the pointer
  2253.     to a public screen you either have a window open in, or
  2254.     a lock on using LockPubScreen(), to determine if that
  2255.     screen is in fact the default screen.
  2256.  
  2257.     BUGS
  2258.     The function prototype does not reflect the return value.
  2259.  
  2260.     SEE ALSO
  2261.     SetDefaultPubScreen(), OpenWindow()
  2262. intuition.library/GetDefPrefs                   intuition.library/GetDefPrefs
  2263.  
  2264.     NAME
  2265.     GetDefPrefs -- Get a copy of the the Intuition default Preferences.
  2266.  
  2267.     SYNOPSIS
  2268.     Prefs = GetDefPrefs( PrefBuffer, Size )
  2269.     D0             A0          D0
  2270.  
  2271.     struct Preferences *GetDefPrefs( struct Preferences *, WORD );
  2272.  
  2273.     FUNCTION
  2274.     Gets a copy of the Intuition default preferences data.  Writes the
  2275.     data into the buffer you specify.  The number of bytes you want
  2276.     copied is specified by the size argument.
  2277.  
  2278.     The default preferences are those that Intuition uses when it
  2279.     is first opened.  If no preferences file is found, these are
  2280.     the preferences that are used.  These would also be the startup
  2281.     preferences in an AmigaDOS-less environment.
  2282.    
  2283.     It is legal to take a partial copy of the Preferences structure.
  2284.     The more pertinent preferences variables have been grouped near
  2285.     the top of the structure to facilitate the memory conservation
  2286.     that can be had by taking a copy of only some of the Preferences
  2287.     structure.
  2288.  
  2289.     INPUTS
  2290.     PrefBuffer = pointer to the memory buffer to receive your copy of the
  2291.                 Intuition Preferences structure
  2292.     Size = the number of bytes in your PrefBuffer, the number of bytes
  2293.           you want copied from the system's internal Preference settings
  2294.  
  2295.     RESULT
  2296.     Returns your parameter PrefBuffer.
  2297.  
  2298.     BUGS
  2299.  
  2300.     SEE ALSO
  2301.     GetPrefs()
  2302. intuition.library/GetPrefs                         intuition.library/GetPrefs
  2303.  
  2304.     NAME
  2305.     GetPrefs -- Get the current Intuition Preferences structure.
  2306.  
  2307.     SYNOPSIS
  2308.     Prefs = GetPrefs( PrefBuffer, Size )
  2309.     D0          A0          D0
  2310.  
  2311.     struct Preferences *GetPrefs( struct Preferences *, WORD );
  2312.  
  2313.     FUNCTION
  2314.     Gets a copy of the current Intuition Preferences structure.
  2315.     Writes the data into the buffer you specify.  The number of bytes you
  2316.     want copied is specified by the size argument.
  2317.    
  2318.     It is legal to take a partial copy of the Preferences structure.
  2319.     The more pertinent preferences variables have been grouped near
  2320.     the top of the structure to facilitate the memory conservation
  2321.     that can be had by taking a copy of only some of the Preferences
  2322.     structure.
  2323.  
  2324.     New for V36:  A new and more extensible method for supplying
  2325.     Preferences has been introduced in V36, and relies on file
  2326.     system notification.  The Intuition preferences items rely
  2327.     also on the IPrefs program.  Certain elements of the
  2328.     Preferences structure have been superceded by this new method.
  2329.     As much as possible, the Preferences structure returned by
  2330.     GetPrefs() reflect the current state of Preferences.  However,
  2331.     it is impossible to represent some of the V36-style preferences
  2332.     items using the existing Preferences structure.
  2333.  
  2334.     INPUTS
  2335.     PrefBuffer = pointer to the memory buffer to receive your copy of the
  2336.            Intuition Preferences
  2337.     Size = the number of bytes in your PrefBuffer, the number of bytes
  2338.            you want copied from the system's internal Preference settings
  2339.  
  2340.     RESULT
  2341.     Returns your parameter PrefBuffer.
  2342.  
  2343.     BUGS
  2344.  
  2345.     SEE ALSO
  2346.     GetDefPrefs(), SetPrefs()
  2347. intuition.library/GetScreenData               intuition.library/GetScreenData
  2348.  
  2349.     NAME 
  2350.     GetScreenData -- Get copy of a screen data structure.
  2351.  
  2352.     SYNOPSIS 
  2353.     Success = GetScreenData( Buffer, Size, Type, Screen ) 
  2354.     D0                       A0      D0    D1    A1
  2355.  
  2356.     BOOL GetScreenData( APTR, UWORD, UWORD, struct Screen * );
  2357.  
  2358.     FUNCTION 
  2359.     This function copies into the caller's buffer data from a Screen
  2360.     structure.  Typically, this call will be used to find the size, title
  2361.     bar height, and other values for a standard screen, such as the
  2362.     Workbench screen.
  2363.  
  2364.     To get the data for the Workbench screen, one would call:
  2365.         GetScreenData(buff, sizeof(struct Screen), WBENCHSCREEN, NULL)
  2366.  
  2367.     NOTE: if the requested standard screen is not open, this function
  2368.     will have the effect of opening it.
  2369.  
  2370.     This function has been useful for two basic types of things:
  2371.     1) Determining information about the Workbench screen, in
  2372.        preparation for opening a window on it.
  2373.     2) Attempts at discerning the user's preferences in a working
  2374.        screen, for "cloning" the Workbench modes and dimensions
  2375.        when opening a similar custom screen.
  2376.  
  2377.     Providing compatibility with both of these goals has proven
  2378.     difficult, as we introduce new display modes and screen scrolling
  2379.     in V36.  Read carefully the somewhat involved exceptions we
  2380.     elected to implement ...
  2381.  
  2382.     Changes as of V36:
  2383.  
  2384.     For V36 and later, the function LockPubScreen() is an improvement
  2385.     over this function, in that it doesn't copy the screen data
  2386.     but returns a pointer and a guarantee that the screen will not
  2387.     be closed.
  2388.  
  2389.     If the global public screen SHANGHAI mode is in effect (see
  2390.     SetPubScreenModes() ), this function will actually report on
  2391.     the default public screen, where "Workbench" windows will
  2392.     actually open.
  2393.  
  2394.     For V36 and later, this function does some "compatibility tricks"
  2395.     when you inquire about the WBENCHSCREEN.  To keep programs from
  2396.     "stumbling" into modes they don't understand, and because an NTSC
  2397.     machine may be running a PAL Workbench or PRODUCTIVITY, for example,
  2398.     the following "false" information is returned.
  2399.  
  2400.     The Screen.ViewPort.Modes field will either be HIRES or HIRES+LACE
  2401.     (with the SPRITES flag also set, as usual).  HIRES+LACE is
  2402.     used if the display mode selected for the Workbench screen
  2403.     is an interlaced screen of any type.
  2404.     
  2405.     The dimensions returned will be the *smaller* of the OSCAN_TEXT
  2406.     dimensions for the returned mode, and the actual dimensions
  2407.     of the Workbench screen.
  2408.  
  2409.     EXCEPTION: For specific compatibility considerations, if the
  2410.     Workbench is in one of the A2024 modes, the mode returned
  2411.     in Screen.ViewPort.Modes will be HIRES+LACE (with perhaps
  2412.     some "special" bits also set for future improvement), but
  2413.     with dimensions equal to the actual A2024-mode Workbench screen.
  2414.     This will favor programs which open windows on the A2024
  2415.     Workbench, but will cause some problems for programs which
  2416.     try to "clone" the Workbench screen using this function.
  2417.  
  2418.     If you want the real information about the modern Workbench
  2419.     screen, call LockPubScreen( "Workbench" ) and acquire its
  2420.     display mode ID by inquiring of the actual ViewPort (using
  2421.     graphics.library/GetVPModeID() ).
  2422.  
  2423.     You may then use the information you get to clone as many of
  2424.     the properties of the Workbench screen that you wish.
  2425.  
  2426.     In the long run, it's probably better to provide your user
  2427.     with a screen mode selection option, and skip all this.
  2428.  
  2429.     INPUTS 
  2430.     Buffer = pointer to a buffer into which data can be copied
  2431.     Size   = the size of the buffer provided, in bytes
  2432.     Type   = the screen type, as specified in OpenWindow() (WBENCHSCREEN,
  2433.         CUSTOMSCREEN, ...)
  2434.     Screen = ignored, unless type is CUSTOMSCREEN, which results only in
  2435.         copying 'size' bytes from 'screen' to 'buffer'
  2436.  
  2437.     RESULT 
  2438.     TRUE if successful
  2439.     FALSE if standard screen of Type 'type' could not be opened.
  2440.  
  2441.     BUGS 
  2442.     You cannot support the new V36 display modes using this function.
  2443.  
  2444.     SEE ALSO 
  2445.     OpenWindow(), LockPubScreen(), graphics.library/GetVPModeID(),
  2446.     SetPubScreenModes(), OpenScreen()
  2447. intuition.library/GetScreenDrawInfo       intuition.library/GetScreenDrawInfo
  2448.  
  2449.    NAME    
  2450.     GetScreenDrawInfo -- Get pointer to rendering information. (V36)
  2451.  
  2452.    SYNOPSIS
  2453.     DrInfo = GetScreenDrawInfo( Screen )
  2454.     D0                  A0
  2455.     
  2456.     struct DrawInfo *GetScreenDrawInfo( struct Screen * );
  2457.  
  2458.    FUNCTION
  2459.     Returns a pointer to a DrawInfo structure derived from the
  2460.     screen passed.  This data structure is READ ONLY.  The field
  2461.     dri_Version identifies which version of struct DrawInfo you
  2462.     are given a pointer to.
  2463.  
  2464.    INPUTS
  2465.      Screen        - pointer to a valid, open screen.
  2466.  
  2467.    RESULT
  2468.      DrInfo - pointer to a system-allocated DrawInfo structure,
  2469.     as defined in intuition/screens.h.
  2470.  
  2471.    NOTES
  2472.     Some information in the DrawInfo structure may in the future
  2473.     be calculated the first time this function is called for a
  2474.     particular screen.
  2475.  
  2476.     You must call FreeScreenDrawInfo() when you are done using the
  2477.     returned pointer.
  2478.  
  2479.     This function does not prevent a screen from closing.  Apply it
  2480.     only to the screens you opened yourself, or apply a protocol
  2481.     such as LockPubScreen().
  2482.  
  2483.     WARNING: Until further notice, the pointer returned does not
  2484.     remain valid after the screen is closed.
  2485.  
  2486.     This function and FreeScreenDrawInfo() don't really do much now,
  2487.     but they provide an upward compatibility path.  That means that
  2488.     if you misuse them today, they probably won't cause a problem,
  2489.     although they may someday later.  So, please be very careful
  2490.     only to use the DrawInfo structure between calls to
  2491.     GetScreenDrawInfo() and FreeScreenDrawInfo(), and be sure
  2492.     that you don't forget FreeScreenDrawInfo().
  2493.  
  2494.    BUGS
  2495.     Does not reflect to changes in screen modes, depth, or pens.
  2496.  
  2497.    SEE ALSO
  2498.     FreeScreenDrawInfo(), LockPubScreen(), intuition/screens.h
  2499.  
  2500. intuition.library/InitRequester               intuition.library/InitRequester
  2501.  
  2502.     NAME
  2503.     InitRequester -- Initialize a Requester structure.
  2504.  
  2505.     SYNOPSIS
  2506.     InitRequester( Requester )
  2507.                A0
  2508.  
  2509.     VOID InitRequester( struct Requester * );
  2510.  
  2511.     FUNCTION
  2512.     Initializes a requester for general use.  After calling InitRequester,
  2513.     you need fill in only those Requester values that fit your needs.
  2514.     The other values are set to NULL--or zero--states.
  2515.  
  2516.     Note that the example in the early versions of the Intuition
  2517.     Reference Manual is flawed because the Requester structure is
  2518.     initialized BEFORE InitRequester is called.  Be sure to
  2519.     perform your initialization AFTER calling InitRequester.
  2520.  
  2521.     INPUTS
  2522.     Requester = a pointer to a Requester structure
  2523.  
  2524.     RESULT
  2525.     None
  2526.  
  2527.     BUGS
  2528.     Since the publication of the first Intuition Manual to this
  2529.     day, most people haven't used this function, and for
  2530.     compatibility reasons, we'll never be able to assume that
  2531.     they do.  Thus, this function is useless.
  2532.  
  2533.     SEE ALSO
  2534.     
  2535. intuition.library/IntuiTextLength           intuition.library/IntuiTextLength
  2536.  
  2537.     NAME
  2538.     IntuiTextLength -- Return the length (pixel-width) of an IntuiText.
  2539.  
  2540.     SYNOPSIS
  2541.     Length = IntuiTextLength( IText )
  2542.     D0                        A0
  2543.  
  2544.     LONG IntuiTextLength( struct IntuiText * );
  2545.  
  2546.     FUNCTION
  2547.     This routine accepts a pointer to an instance of an IntuiText structure,
  2548.     and returns the length (the pixel-width) of the string which that
  2549.     instance of the structure represents.
  2550.  
  2551.     NOTE: if the Font pointer of your IntuiText structure is set to NULL,
  2552.     you'll get the pixel-width of your text in terms of the current system
  2553.     default font.  You may wish to be sure that the field IText->ITextFont
  2554.     for 'default font' text is equal to the Font field of the screen it is
  2555.     being measured for.
  2556.  
  2557.     INPUTS
  2558.     IText = pointer to an instance of an IntuiText structure
  2559.  
  2560.     RESULT
  2561.     Returns the pixel-width of the text specified by the IntuiText data
  2562.  
  2563.     BUGS
  2564.     Would do better to take a RastPort as argument, so that a NULL in
  2565.     the Font pointer would lead automatically to the font for the
  2566.     intended target RastPort, rather than the system default font.
  2567.  
  2568.     SEE ALSO
  2569.     OpenScreen()
  2570. intuition.library/ItemAddress                   intuition.library/ItemAddress
  2571.  
  2572.     NAME
  2573.     ItemAddress -- Returns the address of the specified MenuItem.
  2574.  
  2575.     SYNOPSIS
  2576.     Item = ItemAddress( MenuStrip, MenuNumber )
  2577.     D0            A0         D0
  2578.  
  2579.     struct MenuItem *ItemAddress( struct Menu *, UWORD );
  2580.  
  2581.     FUNCTION
  2582.     This routine feels through the specified menu strip and returns the 
  2583.     address of the item specified by the menu number.  Typically,
  2584.     you will use this routine to get the address of a menu item from
  2585.     a menu number sent to you by Intuition after user has chosen from
  2586.     a window's menus.  
  2587.  
  2588.        This routine requires that the arguments are well-defined.
  2589.     MenuNumber may be equal to MENUNULL, in which case this routine returns
  2590.     NULL.  If MenuNumber doesn't equal MENUNULL, it's presumed to be a 
  2591.     valid item number selector for your menu strip, which includes:
  2592.            - a valid menu number
  2593.            - a valid item number
  2594.            - if the item specified by the above two components has a
  2595.              sub-item, the menu number may have a sub-item component, too.
  2596.  
  2597.     Note that there must be BOTH a menu number and an item number.  
  2598.     Because a sub-item specifier is optional, the address returned by
  2599.     this routine may point to either an item or a sub-item.
  2600.  
  2601.     INPUTS
  2602.     MenuStrip = a pointer to the first menu in your menu strip
  2603.     MenuNumber = the value which contains the packed data that selects
  2604.            the menu and item (and sub-item).  See the Intuition Reference
  2605.         Manual for information on menu numbers.
  2606.  
  2607.     RESULT
  2608.     If MenuNumber == MENUNULL, this routine returns NULL,
  2609.     else this routine returns the address of the menu item specified
  2610.     by MenuNumber.
  2611.  
  2612.     BUGS
  2613.  
  2614.     SEE ALSO
  2615.     The "Menus" chapter of the Intuition Reference Manual,
  2616.     or the Amiga Rom Kernel Manual
  2617. intuition.library/LockIBase                       intuition.library/LockIBase
  2618.  
  2619.     NAME
  2620.     LockIBase -- Invoke semaphore arbitration of IntuitionBase.
  2621.  
  2622.     SYNOPSIS
  2623.     Lock = LockIBase( LockNumber )
  2624.     D0                D0
  2625.  
  2626.     ULONG LockIBase( ULONG );
  2627.  
  2628.     FUNCTION
  2629.     Grabs Intuition internal semaphore so that caller may examine
  2630.     IntuitionBase safely.  This function is not a magic "fix all my
  2631.     race conditions" panacea.
  2632.  
  2633.     The idea here is that you can get the locks Intuition needs before
  2634.     such IntuitionBase fields as ActiveWindow and FirstScreen are
  2635.     changed, or linked lists of windows and screens are changed.
  2636.  
  2637.     Do Not Get Tricky with this entry point, and do not hold these locks
  2638.     for long, as all Intuition input processing will wait for you to
  2639.     surrender the lock by a call to UnlockIBase().
  2640.  
  2641.     NOTE WELL: A call to this function MUST be paired with a subsequent
  2642.     call to UnlockIBase(), and soon, please.
  2643.  
  2644.     NOTE WELL: Do not call any Intuition functions (nor any graphics,
  2645.     layers, dos, or other high-level system function) while
  2646.     holding this lock.
  2647.  
  2648.     INPUTS
  2649.     A long unsigned integer, LockNumber, specifies which of Intuition's
  2650.     internal locks you want to get.  This parameter should be zero for all
  2651.     forseeable uses of this function, which will let you examine active
  2652.     fields and linked lists of screens and windows with safety.
  2653.  
  2654.     RESULT
  2655.     Returns another ULONG which should be passed to UnlockIBase() to
  2656.     surrender the lock gotten by this call.
  2657.  
  2658.     BUGS
  2659.     This function must not be called while holding any other system locks
  2660.     such as layer or LayerInfo locks.
  2661.  
  2662.     SEE ALSO
  2663.     UnlockIBase(), layers.library/LockLayerInfo(),
  2664.     exec.library/ObtainSemaphore()
  2665. intuition.library/LockPubScreen               intuition.library/LockPubScreen
  2666.  
  2667.     NAME
  2668.     LockPubScreen -- Prevent a public screen from closing. (V36)
  2669.  
  2670.     SYNOPSIS
  2671.     screen = LockPubScreen( Name )
  2672.     D0                      A0
  2673.  
  2674.     struct Screen *LockPubScreen( UBYTE * );
  2675.  
  2676.     FUNCTION
  2677.     Prevents a public screen (or the Workbench) from closing
  2678.     while you examine it in preparation of opening a visitor window.
  2679.  
  2680.     The sequence you use to open a visitor window that needs to
  2681.     examine fields in the screen it is about to open on is:
  2682.         LockPubScreen()
  2683.         ... examine fields ...
  2684.         OpenWindow() on public screen
  2685.         UnlockPubScreen()
  2686.         ... use your window ...
  2687.         CloseWindow()
  2688.  
  2689.     NOTE 
  2690.     You needn't hold the "pubscreen lock" for the duration that
  2691.     your window is opened.  LockPubScreen() basically has the
  2692.     same effect as an open visitor window: it prevents the
  2693.     screen from being closed.
  2694.  
  2695.     If you pass the string "Workbench" or you pass NULL and there
  2696.     is no default public screen, the Workbench screen will
  2697.     be automatically opened if it is not already present.
  2698.  
  2699.     INPUTS
  2700.     Name = name string for public screen or NULL for default public
  2701.     screen.  The string "Workbench" indicates the Workbench
  2702.     screen.
  2703.  
  2704.     RESULT
  2705.     Returns pointer to a screen, if successful, else NULL.
  2706.     The call can fail for reasons including that the named
  2707.     public screen doesn't exist or is in private state.
  2708.  
  2709.     BUGS
  2710.  
  2711.     SEE ALSO
  2712.     OpenWindow(), UnlockPubScreen(), GetScreenData()
  2713. intuition.library/LockPubScreenList       intuition.library/LockPubScreenList
  2714.  
  2715.     NAME
  2716.     LockPubScreenList -- Prevent changes to the system list. (V36)
  2717.  
  2718.     SYNOPSIS
  2719.     List = LockPubScreenList()
  2720.     D0
  2721.  
  2722.     struct List *LockPubScreenList( VOID );
  2723.  
  2724.     FUNCTION
  2725.     Arbitrates access to public screen list    while you quickly
  2726.     make a copy of it for display to the user.
  2727.  
  2728.     Note that this is intended only for the Public Screen Manager
  2729.     program.
  2730.  
  2731.     NOTES
  2732.     The nodes on the list are PubScreenNode structures.
  2733.     Act quickly while holding this lock.  The restrictions
  2734.     on LockIBase() apply here as well.
  2735.  
  2736.     INPUTS
  2737.     None.
  2738.  
  2739.     RESULT
  2740.     A pointer to the public screen list.
  2741.  
  2742.     BUGS
  2743.  
  2744.     SEE ALSO
  2745.     OpenScreen(), Intuition V36 update documentation    
  2746. intuition.library/MakeClass                       intuition.library/MakeClass
  2747.  
  2748.     NAME
  2749.     MakeClass -- Create and initialize a boopsi class. (V36)
  2750.  
  2751.     SYNOPSIS
  2752.     iclass = MakeClass( ClassID, SuperClassID, SuperClassPtr,
  2753.     D0                  A0       A1            A2
  2754.         InstanceSize, Flags )
  2755.             D0            D1
  2756.  
  2757.     struct IClass *MakeClass( UBYTE *, UBYTE *, struct IClass *,
  2758.         UWORD, ULONG );
  2759.  
  2760.     FUNCTION
  2761.     For class implementors only.
  2762.     
  2763.     This function creates a new public or private boopsi class.
  2764.     The superclass should be defined to be another boopsi class:
  2765.     all classes are descendants of the class "rootclass".
  2766.  
  2767.     Superclasses can be public or private.  You provide a name/ID
  2768.     for your class if it is to be a public class (but you must
  2769.     have registered your class name and your attribute ID's with
  2770.     Commodore before you do this!).  For a public class, you would
  2771.     also call AddClass() to make it available after you have
  2772.     finished your initialization.
  2773.  
  2774.     Returns pointer to an IClass data structure for your
  2775.     class.  You then initialize the Hook cl_Dispatcher for
  2776.     your class methods code.  You can also set up special data
  2777.     shared by all objects in your class, and point cl_UserData at it. 
  2778.     The last step for public classes is to call AddClass().
  2779.  
  2780.     You dispose of a class created by this function by calling
  2781.     FreeClass().
  2782.  
  2783.     INPUTS
  2784.     ClassID = NULL for private classes, the name/ID string for public
  2785.         classes
  2786.     SuperClassID = name/ID of your new class's superclass.  NULL if
  2787.         superclass is a private class
  2788.     SuperClassPtr = pointer to private superclass.  Only used if
  2789.         SuperClassID is NULL.  You are required never to provide
  2790.         a NULL superclass.
  2791.     InstanceSize = the size of the instance data that your class's
  2792.         objects will require, beyond that data defined for
  2793.         your superclass's objects.
  2794.     Flags = for future enhancement, including possible additional
  2795.         parameters.  Provide zero for now.
  2796.  
  2797.     RESULT
  2798.     Pointer to the resulting class, or NULL if not possible:
  2799.     - no memory for class data structure
  2800.     - public superclass not found
  2801.     - public class of same name/ID as this one already exists
  2802.     
  2803.     NOTES
  2804.  
  2805.     EXAMPLE
  2806.     Creating a private subclass of a public class:
  2807.  
  2808.     /* per-object instance data defined by my class    */
  2809.     struct MyInstanceData {
  2810.     ULONG    mid_SomeData;
  2811.     };
  2812.  
  2813.     /* some useful table I'll share use for all objects */
  2814.     UWORD myTable[] = {
  2815.     5, 4, 3, 2, 1, 0
  2816.     };
  2817.  
  2818.     struct IClass    *
  2819.     initMyClass()
  2820.     {
  2821.     ULONG __saveds    myDispatcher();
  2822.     ULONG    hookEntry();    /* asm-to-C interface glue    */
  2823.     struct IClass    *cl;
  2824.     struct IClass    *MakeClass();
  2825.  
  2826.     if ( cl =  MakeClass( NULL, 
  2827.             SUPERCLASSID, NULL,        /* superclass is public      */
  2828.             sizeof (struct MyInstanceData),
  2829.             0 ))
  2830.     {
  2831.         /* initialize the cl_Dispatcher Hook    */
  2832.         cl->cl_Dispatcher.h_Entry = hookEntry;
  2833.         cl->cl_Dispatcher.h_SubEntry = myDispatcher;
  2834.         cl->cl_Dispatcher.h_Data = (VOID *) 0xFACE;    /* unused */
  2835.  
  2836.         cl-cl_UserData = (ULONG) myTable;
  2837.     }
  2838.     return ( cl );
  2839.     }
  2840.  
  2841.     BUGS
  2842.     The typedef 'Class' isn't consistently used.  Class pointers
  2843.     used blindly should be APTR, or struct IClass for class implementors.
  2844.  
  2845.     SEE ALSO
  2846.     FreeClass(), AddClass(), RemoveClass(), NewObject(),
  2847.     Document "Basic Object-Oriented Programming System for Intuition"
  2848.     and the "boopsi Class Reference" document.
  2849. intuition.library/MakeScreen                     intuition.library/MakeScreen
  2850.  
  2851.     NAME
  2852.     MakeScreen -- Do an Intuition-integrated MakeVPort() of a screen.
  2853.  
  2854.     SYNOPSIS
  2855.     MakeScreen( Screen )
  2856.             A0
  2857.  
  2858.     VOID MakeScreen( struct Screen * );
  2859.  
  2860.     FUNCTION
  2861.     This procedure allows you to do a MakeVPort() for the viewport of your
  2862.     custom screen in an Intuition-integrated way.  This way you can
  2863.     do your own screen manipulations without worrying about interference
  2864.     with Intuition's usage of the same viewport.
  2865.  
  2866.     The operation of this function is as follows:
  2867.         - Block until the Intuition View structure is not in being changed.
  2868.         - Set the view modes correctly to reflect if there is a (visible)
  2869.           interlaced screen.
  2870.         - call MakeVPort(), passing the Intuition View and your screen's
  2871.           ViewPort.
  2872.         - Unlocks the Intuition View.
  2873.  
  2874.     After calling this routine, you should call RethinkDisplay() to 
  2875.     incorporate the new viewport of your custom screen into the 
  2876.     Intuition display.
  2877.  
  2878.     NOTE: Intuition may determine that because of a change in global
  2879.     interlace needs that all viewports need to be remade, so
  2880.     it may effectively call RemakeDisplay().
  2881.  
  2882.     INPUTS
  2883.     Screen = address of the custom screen structure
  2884.  
  2885.     RESULT
  2886.     None
  2887.  
  2888.     BUGS
  2889.  
  2890.     SEE ALSO
  2891.     RethinkDisplay(), RemakeDisplay(), graphics.library/MakeVPort()
  2892. intuition.library/ModifyIDCMP                   intuition.library/ModifyIDCMP
  2893.  
  2894.     NAME
  2895.     ModifyIDCMP -- Modify the state of a window's IDCMPFlags.
  2896.  
  2897.     SYNOPSIS
  2898.     [Success =] ModifyIDCMP( Window, IDCMPFlags )
  2899.     [D0]                     A0      D0
  2900.  
  2901.     [BOOL] ModifyIDCMP( struct Window *, ULONG );
  2902.     /* returns BOOL in V37 and greater */
  2903.  
  2904.     FUNCTION
  2905.     This routine modifies the state of your window's IDCMP (Intuition
  2906.     Direct Communication Message Port).  The state is modified to reflect
  2907.     your desires as described by the flag bits in the value IDCMPFlags.
  2908.  
  2909.     The four actions that might be taken are:
  2910.  
  2911.        - if there is currently no IDCMP in the given window, and IDCMPFlags
  2912.          is zero, nothing happens
  2913.        - if there is currently no IDCMP in the given window, and any of the
  2914.          IDCMPFlags is selected (set), then the IDCMP of the window is
  2915.          created, including allocating and initializing the message ports
  2916.          and allocating a signal bit for your port.  See the "Input and
  2917.          Output Methods" chapter of the Intuition Reference Manual for full
  2918.       details
  2919.        - if the IDCMP for the given window exists, and the 
  2920.          IDCMPFlags argument is zero, this says that you want 
  2921.          Intuition to close the ports, free the buffers and free 
  2922.          your signal bit.  You MUST be the same task that was active 
  2923.          when this signal bit was allocated (either by ModifyIDCMP()
  2924.       or OpenWindow() ).
  2925.        - if the IDCMP for the given window is opened, and the IDCMPFlags
  2926.          argument is not zero, this means that you want to change the 
  2927.          state of which events will be broadcast to you through the IDCMP
  2928.  
  2929.     NOTE:  You can set up the Window->UserPort to any port of your own
  2930.     before you call ModifyIDCMP().  If IDCMPFlags is non-null but 
  2931.     your UserPort is already initialized, Intuition will assume that 
  2932.     it's a valid port with task and signal data preset and Intuition 
  2933.     won't disturb your set-up at all, Intuition will just allocate 
  2934.     the Intuition message port half of it.  The converse is true 
  2935.     as well:  if UserPort is NULL when you call here with 
  2936.     IDCMPFlags == NULL, Intuition will deallocate only the Intuition
  2937.     side of the port.  
  2938.  
  2939.     This allows you to use a port that you already have allocated:  
  2940.        - OpenWindow() with IDCMPFlags equal to NULL (open no ports)
  2941.        - set the UserPort variable of your window to any valid port of your
  2942.          own choosing
  2943.        - call ModifyIDCMP with IDCMPFlags set to what you want
  2944.        - then, to clean up later, set UserPort equal to NULL before calling
  2945.          CloseWindow() (leave IDCMPFlags alone)  BUT FIRST: you must make
  2946.       sure that no messages sent your window are queued at the port,
  2947.       since they will be returned to the memory free pool.
  2948.  
  2949.     For an example of how to close a window with a shared IDCMP,
  2950.     see the description for CloseWindow().
  2951.  
  2952.  
  2953.     INPUTS
  2954.     Window = pointer to the Window structure containing the IDCMP ports
  2955.     IDCMPFlags = the flag bits describing the new desired state of the IDCMP
  2956.  
  2957.     RESULT
  2958.     Starting in V37, this function returns NULL if it was unable
  2959.     to create the necessary message ports.  (The possibility of
  2960.     failure exists in earlier releases, but no return code was offered).
  2961.     Do not check the return code under V36 or earlier.
  2962.  
  2963.     BUGS
  2964.  
  2965.     SEE ALSO
  2966.     OpenWindow(), CloseWindow()
  2967. intuition.library/ModifyProp                     intuition.library/ModifyProp
  2968.  
  2969.     NAME
  2970.     ModifyProp -- Modify the current parameters of a proportional gadget.
  2971.  
  2972.     SYNOPSIS
  2973.     ModifyProp( Gadget, Window, Requester, 
  2974.             A0        A1        A2
  2975.                    Flags, HorizPot, VertPot, HorizBody, VertBody )
  2976.             D0       D1         D2          D3     D4
  2977.  
  2978.     VOID ModifyProp( struct Gadget *, struct Window *,
  2979.         struct Requester *, UWORD, UWORD, UWORD, UWORD, UWORD );
  2980.  
  2981.     FUNCTION
  2982.     Modifies the parameters of the specified proportional gadget.  The 
  2983.     gadget's internal state is then recalculated and the imagery 
  2984.     is redisplayed in the window or requester that contains the gadget.
  2985.  
  2986.     The requester variable can point to a requester structure.  If the 
  2987.     gadget has the GTYP_REQGADGET flag set, the gadget is in a requester 
  2988.     and the window pointer must point to the window of the requester.
  2989.     If this is not the gadget of a requester, the requester argument may
  2990.     be NULL.
  2991.  
  2992.     NOTE: this function causes all gadgets from the proportional
  2993.     gadget to the end of the gadget list to be refreshed, for
  2994.     reasons of compatibility.
  2995.     For more refined display updating, use NewModifyProp().
  2996.  
  2997.     New for V36: ModifyProp() refreshing consists of redrawing gadgets
  2998.     completely.  NewModifyProp() has changed this behavior (see 
  2999.     NewModifyProp()).
  3000.    
  3001.     INPUTS
  3002.     PropGadget = pointer to a proportional gadget
  3003.     Window = pointer to the window containing the gadget or the window
  3004.         containing the requester containing the gadget.
  3005.     Requester = pointer to a requester (may be NULL if this isn't 
  3006.         a requester gadget)
  3007.     Flags = value to be stored in the Flags field of the PropInfo
  3008.     HorizPot = value to be stored in the HorizPot field of the PropInfo
  3009.     VertPot = value to be stored in the VertPot field of the PropInfo
  3010.     HorizBody = value to be stored in the HorizBody field of the PropInfo
  3011.     VertBody = value to be stored in the VertBody field of the PropInfo
  3012.  
  3013.     RESULT
  3014.     None
  3015.  
  3016.     BUGS
  3017.  
  3018.     SEE ALSO
  3019.     NewModifyProp()
  3020.     The Intuition Reference Manual and Amiga Rom Kernel Manual contain
  3021.     more information on Proportional Gadgets.
  3022. intuition.library/MoveScreen                     intuition.library/MoveScreen
  3023.  
  3024.     NAME
  3025.     MoveScreen -- Attempt to move the screen by the increments provided.
  3026.  
  3027.     SYNOPSIS
  3028.     MoveScreen( Screen, DeltaX, DeltaY )
  3029.             A0      D0      D1
  3030.  
  3031.     VOID MoveScreen( struct Screen *, WORD, WORD );
  3032.  
  3033.     FUNCTION
  3034.     Moves the screen the specified increment, specified in screen
  3035.     pixel resolution coordinates.
  3036.  
  3037.     New for V36: Screen movement limits have been greatly relaxed,
  3038.     to support screen scrolling.  In particular, negative values
  3039.     for screen LeftEdge and TopEdge may now be valid.
  3040.  
  3041.        If the DeltaX and DeltaY variables you specify would move the screen
  3042.        in a way that violates any restrictions, the screen will be moved
  3043.        as far as possible.  You may examine the LeftEdge and TopEdge fields
  3044.     of the Screen structure after this function returns to see where
  3045.     the screen really ended up.
  3046.  
  3047.     In operation, this function determines what the resulting position
  3048.     values that are actually to be used, sets these up, and calls 
  3049.     MakeScreen() and RethinkDisplay().
  3050.  
  3051.     INPUTS
  3052.     Screen = pointer to a Screen structure
  3053.     DeltaX = amount to move the screen on the x-axis
  3054.         Note that DeltaX no longer (V36) need be set to zero
  3055.     DeltaY = amount to move the screen on the y-axis
  3056.         Note that these coordinates are in the same resolution
  3057.         as the screen (such as HIRES or INTERLACE)
  3058.  
  3059.     RESULT
  3060.     None
  3061.  
  3062.     BUGS
  3063.  
  3064.     SEE ALSO
  3065.     RethinkDisplay()
  3066. intuition.library/MoveWindow                     intuition.library/MoveWindow
  3067.  
  3068.     NAME
  3069.     MoveWindow -- Ask Intuition to move a window.
  3070.  
  3071.     SYNOPSIS
  3072.     MoveWindow( Window, DeltaX, DeltaY )
  3073.             A0      D0      D1
  3074.  
  3075.     VOID MoveWindow( struct Window *, WORD, WORD );
  3076.  
  3077.     FUNCTION
  3078.     This routine sends a request to Intuition asking to move the window 
  3079.     the specified distance.  The delta arguments describe how far to 
  3080.     move the window along the respective axes.  
  3081.  
  3082.     Note that the window will not be moved immediately, but rather 
  3083.     will be moved the next time Intuition receives an input event, 
  3084.     which happens currently at a minimum rate of ten times per second,
  3085.     and a maximum of sixty times a second.  
  3086.  
  3087.     Interactions with other arbitration of Intuition data structures
  3088.     may defer this operation longer.  For V36, you can use the new
  3089.     IDCMP class IDCMP_CHANGEWINDOW to detect when this operation has
  3090.     completed.
  3091.  
  3092.     New for V36: Intuition now will do validity checking on the final
  3093.     position.  To send absolute movements, or to move and size a
  3094.     window in one step, use ChangeWindowBox().
  3095.  
  3096.     INPUTS
  3097.     Window = pointer to the structure of the Window to be moved
  3098.     DeltaX = how far to move the Window on the x-axis
  3099.     DeltaY = how far to move the Window on the y-axis
  3100.  
  3101.     RESULT
  3102.     None
  3103.  
  3104.     BUGS
  3105.  
  3106.     SEE ALSO
  3107.     ChangeWindowBox(), SizeWindow(), WindowToFront(), WindowToBack()
  3108. intuition.library/MoveWindowInFrontOf   intuition.library/MoveWindowInFrontOf
  3109.  
  3110.     NAME
  3111.     MoveWindowInFrontOf -- Arrange the relative depth of a window. (V36)
  3112.  
  3113.     SYNOPSIS
  3114.     MoveWindowInFrontOf( Window, BehindWindow )
  3115.                  A0      A1
  3116.  
  3117.     VOID MoveWindowInFrontOf( struct Window *, struct Window * );
  3118.  
  3119.     FUNCTION
  3120.     Depth-arranges a window in front of an another window.
  3121.     Brings out the layers.library MoveLayerInFrontOf() to the
  3122.     Intuition user.
  3123.  
  3124.     INPUTS
  3125.     Window =  window to re-position in front of another window
  3126.     BehindWindow =  window to re-position in front of
  3127.  
  3128.     RESULT
  3129.     Repositions window.
  3130.  
  3131.     BUGS
  3132.     Doesn't respect backdrop windows.
  3133.     
  3134.     SEE ALSO
  3135.     WindowToFront(), WindowToBack(), layers.library/MoveLayerInFrontOf()
  3136. intuition.library/NewModifyProp               intuition.library/NewModifyProp
  3137.  
  3138.     NAME
  3139.     NewModifyProp -- ModifyProp(), but with selective refresh.
  3140.  
  3141.     SYNOPSIS
  3142.     NewModifyProp( Gadget, Window, Requester, Flags,
  3143.                A0      A1      A2         D0
  3144.         HorizPot, VertPot, HorizBody, VertBody, NumGad )
  3145.         D1        D2       D3         D4        D5
  3146.  
  3147.     VOID NewModifyProp( struct Gadget *, struct Window *,
  3148.         struct Requester *, UWORD, UWORD, UWORD, UWORD, UWORD, WORD );
  3149.  
  3150.     FUNCTION
  3151.     Performs the function of ModifyProp(), but refreshes
  3152.     gadgets in the list as specified by the NumGad parameter. 
  3153.     With NumGad = -1, this function is identical to ModifyProp().
  3154.  
  3155.     New for V36: When NumGad = 1, this function will now perform
  3156.     an incremental update of the proportional gadget knob image,
  3157.     rather than refreshing the entire gadget.  This means much
  3158.     less flashing when programmatically scrolling a proportional
  3159.     gadget.
  3160.    
  3161.     INPUTS
  3162.     PropGadget = pointer to a proportional gadget
  3163.     Window = pointer to the window containing the gadget or the window
  3164.         containing the requester containing the gadget.
  3165.     Requester = pointer to a requester (may be NULL if this isn't 
  3166.         a requester gadget)
  3167.     Flags = value to be stored in the Flags field of the PropInfo
  3168.     HorizPot = value to be stored in the HorizPot field of the PropInfo
  3169.     VertPot = value to be stored in the VertPot field of the PropInfo
  3170.     HorizBody = value to be stored in the HorizBody field of the PropInfo
  3171.     VertBody = value to be stored in the VertBody field of the PropInfo
  3172.     NumGad = number of gadgets to be refreshed after propgadget internals
  3173.         have been adjusted.  -1 means "to end of list."
  3174.          
  3175.     RESULT
  3176.     None
  3177.  
  3178.     BUGS
  3179.  
  3180.     SEE ALSO 
  3181.     ModifyProp()
  3182.     The Intuition Reference Manual contains more information on
  3183.     Proportional Gadgets.
  3184. intuition.library/NewObject                       intuition.library/NewObject
  3185.  
  3186.     NAME
  3187.     NewObjectA -- Create an object from a class. (V36)
  3188.     NewObject -- Varargs stub for NewObjectA(). (V36)
  3189.  
  3190.     SYNOPSIS
  3191.     object = NewObjectA( class, classID, tagList )
  3192.     D0                   A0     A1       A2
  3193.  
  3194.     APTR NewObjectA( struct IClass *, UBYTE *, struct TagItem * );
  3195.  
  3196.     object = NewObject( class, classID, Tag1, ... )
  3197.  
  3198.     APTR NewObject( struct IClass *, UBYTE *, ULONG, ... );
  3199.  
  3200.     FUNCTION
  3201.     This is the general method of creating objects from 'boopsi' classes.
  3202.     ('Boopsi' stands for "basic object-oriented programming system for
  3203.     Intuition".)
  3204.  
  3205.     You specify a class either as a pointer (for a private class) or
  3206.     by its ID string (for public classes).  If the class pointer
  3207.     is NULL, then the classID is used.
  3208.  
  3209.     You further specify initial "create-time" attributes for the
  3210.     object via a TagItem list, and they are applied to the resulting
  3211.     generic data object that is returned.  The attributes, their meanings,
  3212.     attributes applied only at create-time, and required attributes
  3213.     are all defined and documented on a class-by-class basis.
  3214.     
  3215.     INPUTS
  3216.     class = abstract pointer to a boopsi class gotten via MakeClass().
  3217.     classID = the name/ID string of a public class.  This parameter is
  3218.         only used if 'class' is NULL.
  3219.     tagList = pointer to array of TagItems containing attribute/value
  3220.         pairs to be applied to the object being created
  3221.  
  3222.     RESULT
  3223.     A boopsi object, which may be used in different contexts such
  3224.     as a gadget or image, and may be manipulated by generic functions.
  3225.     You eventually free the object using DisposeObject().
  3226.     
  3227.     NOTES
  3228.     This function invokes the OM_NEW "method" for the class specified.
  3229.  
  3230.     BUGS
  3231.     Typedef's for 'Object' and 'Class' are defined in the include
  3232.     files but not used consistently.  The generic type APTR is
  3233.     probably best used for object and class "handles", with the
  3234.     type (UBYTE *) used for classID strings.
  3235.  
  3236.     SEE ALSO
  3237.     DisposeObject(), SetAttrs(), GetAttr(), MakeClass(),
  3238.     Document "Basic Object-Oriented Programming System for Intuition"
  3239.     and the "boopsi Class Reference" document.
  3240.     
  3241. intuition.library/NextObject                     intuition.library/NextObject
  3242.  
  3243.     NAME
  3244.     NextObject -- iterate through the object on an Exec list. (V36)
  3245.  
  3246.     SYNOPSIS
  3247.     object = NextObject( objectPtrPtr )
  3248.     D0                   A0
  3249.  
  3250.     APTR NextObject( APTR );
  3251.  
  3252.     FUNCTION
  3253.     This function is for boopsi class implementors only.
  3254.  
  3255.     When you collect a set of boopsi objects on an Exec List
  3256.     structure by invoking their OM_ADDMEMBER method, you
  3257.     can (only) retrieve them by iterations of this function.
  3258.  
  3259.     Works even if you remove and dispose the returned list
  3260.     members in turn.
  3261.  
  3262.     INPUTS
  3263.     Initially, you set a pointer variable to equal the
  3264.     lh_Head field of the list (or mlh_Head field of a MinList).
  3265.     You pass the *address* of that pointer repeatedly
  3266.     to NextObject() until it returns NULL.
  3267.     
  3268.     EXAMPLE
  3269.  
  3270.     /* here is the OM_DISPOSE case of some class's dispatcher */
  3271.     case OM_DISPOSE:
  3272.         /* dispose members    */
  3273.         object_state = mydata->md_CollectionList.lh_Head;
  3274.         while ( member_object = NextObject( &object_state ) )
  3275.         {
  3276.         DoMethod( member_object, OM_REMOVE ); /* remove from list */
  3277.         DM( member, msg );    /* and pass along dispose    */
  3278.         }
  3279.  
  3280.     RESULT
  3281.     Returns pointers to each object in the list in turn, and NULL
  3282.     when there are no more.
  3283.     
  3284.     NOTES
  3285.  
  3286.     BUGS
  3287.  
  3288.     SEE ALSO
  3289.     DisposeObject(), SetAttrs(), GetAttr(), MakeClass(),
  3290.     Document "Basic Object-Oriented Programming System for Intuition"
  3291.     and the "boopsi Class Reference" document.
  3292. intuition.library/NextPubScreen               intuition.library/NextPubScreen
  3293.  
  3294.     NAME
  3295.     NextPubScreen -- Identify next public screen in the cycle. (V36)
  3296.  
  3297.     SYNOPSIS
  3298.     Buff = NextPubScreen( Screen, NameBuff )
  3299.     D0                    A0      A1
  3300.  
  3301.     UBYTE *NextPubScreen( struct Screen *, UBYTE * );
  3302.  
  3303.     FUNCTION
  3304.     Returns name of next public screen in system rotation, to
  3305.     allow visitor windows to provide function to "jump" among
  3306.     public-screens in a cycle.
  3307.  
  3308.     INPUTS
  3309.     Screen = pointer to the screen your window is currently open in,
  3310.       or NULL, if you don't have a pointer to a public screen.
  3311.     NameBuff = pointer to a buffer of MAXPUBSCREENNAME+1 characters,
  3312.       for Intuition to fill in with the name of the next public
  3313.       screen in rotation.
  3314.  
  3315.     RESULT
  3316.     Returns NULL if there are no public screens, otherwise a
  3317.     pointer to your NameBuff.
  3318.  
  3319.     NOTES
  3320.     There is no guarantee that the public screen whose name
  3321.     was returned by this function will exist or be in "public" state
  3322.     by the time you call LockPubScreen(), etc.  You must handle
  3323.     cases where LockPubScreen(), etc. will fail.
  3324.  
  3325.     BUGS
  3326.     Due to a bug, your buffer needs to be (MAXPUBSCREENNAME + 1)
  3327.     characters big, which is one more than originally documented.
  3328.  
  3329.     The starting screen and cycle order of the public screens isn't
  3330.     defined, so do not draw conclusions about the order you
  3331.     see in the current version of Intuition.  We reserve the
  3332.     right to add meaning to the ordering at a future time.
  3333.  
  3334.     SEE ALSO
  3335.     OpenScreen(), Intuition V36 update documentation    
  3336. intuition.library/ObtainGIRPort               intuition.library/ObtainGIRPort
  3337.  
  3338.     NAME
  3339.     ObtainGIRPort -- Set up a RastPort for a custom gadget. (V36)
  3340.  
  3341.     SYNOPSIS
  3342.     RPort = ObtainGIRPort( GInfo )
  3343.     D0               A0
  3344.  
  3345.     struct RastPort *ObtainGIRPort( struct GadgetInfo * );
  3346.  
  3347.     FUNCTION
  3348.     Sets up a RastPort for use (only) by custom gadget hook routines.
  3349.     This function must be called EACH time a hook routine needing
  3350.     to perform gadget rendering is called, and must be accompanied
  3351.     by a corresponding call to ReleaseGIRPort().
  3352.  
  3353.     Note that if a hook function passes you a RastPort pointer,
  3354.     e.g., GM_RENDER, you needn't call ObtainGIRPort() in that case.
  3355.  
  3356.     INPUTS
  3357.     A pointer to a GadgetInfo structure, as passed to each custom
  3358.     gadget hook function.
  3359.  
  3360.     RESULT
  3361.     A pointer to a RastPort that may be used for gadget rendering.
  3362.     This pointer may be NULL, in which case you should do no rendering.
  3363.     You may (optionally) pass a null return value to ReleaseGIRPort().
  3364.  
  3365.     BUGS
  3366.  
  3367.     SEE ALSO
  3368.     ReleaseGIRPort(), Custom Gadget documentation
  3369.     
  3370. intuition.library/OffGadget                       intuition.library/OffGadget
  3371.  
  3372.     NAME
  3373.     OffGadget -- Disable the specified gadget.
  3374.  
  3375.     SYNOPSIS
  3376.     OffGadget( Gadget, Window, Requester )
  3377.            A0      A1      A2
  3378.  
  3379.     VOID OffGadget( struct Gadget *, struct Window *,
  3380.         struct Requester * );
  3381.  
  3382.     FUNCTION
  3383.     This command disables the specified gadget.  When a gadget is
  3384.     disabled, these things happen:
  3385.          - its imagery is displayed ghosted
  3386.          - the GFLG_DISABLED flag is set
  3387.          - the gadget cannot be selected by User
  3388.  
  3389.     The window parameter must point to the window which contains the
  3390.     gadget, or which contains the requester that contains the gadget.
  3391.     The requester parameter must only be valid if the gadget has the
  3392.     GTYP_REQGADGET flag set, a requirement for all requester gadgets.
  3393.  
  3394.        NOTE:  it's never safe to tinker with the gadget list yourself.  Don't
  3395.        supply some gadget that Intuition hasn't already processed in
  3396.        the usual way.
  3397.  
  3398.         NOTE: for compatibility reasons, this function will refresh all
  3399.     gadgets in a requester, and all gadgets from gadget to the 
  3400.     end of the gadget list if gadget is in a window.
  3401.  
  3402.     If you want to improve on this behavior, you may perform the
  3403.     equivalent operation yourself: remove a gadget or gadgets,
  3404.     change the state of their GFLG_DISABLED flag, replace the
  3405.     gadgets using AddGList(), and selectively call RefreshGList().
  3406.  
  3407.     INPUTS
  3408.     Gadget = pointer to the gadget that you want disabled
  3409.     Window = pointer to a window structure containing the gadget or
  3410.         containing the requester which contains the gadget
  3411.     Requester = pointer to a requester (may by NULL if this isn't 
  3412.            a requester gadget (i.e. GTYP_REQGADGET is not set)).
  3413.  
  3414.     RESULT
  3415.     None
  3416.  
  3417.     BUGS
  3418.  
  3419.     SEE ALSO
  3420.     AddGadget(), RefreshGadgets()
  3421. intuition.library/OffMenu                           intuition.library/OffMenu
  3422.  
  3423.     NAME
  3424.     OffMenu -- Disable the given menu or menu item.
  3425.  
  3426.     SYNOPSIS
  3427.     OffMenu( Window, MenuNumber )
  3428.          A0      D0
  3429.  
  3430.     VOID OffMenu( struct Window *, UWORD );
  3431.  
  3432.     FUNCTION
  3433.     This command disables a sub-item, an item, or a whole menu.
  3434.     This depends on the contents of the data packed into MenuNumber,
  3435.     which is described in the Intuition Reference Manual.
  3436.  
  3437.     INPUTS
  3438.     Window = pointer to the window
  3439.     MenuNumber = the menu piece to be disabled
  3440.  
  3441.     RESULT
  3442.     None
  3443.  
  3444.     BUGS
  3445.  
  3446.     SEE ALSO
  3447.     OnMenu(), ResetMenuStrip()
  3448. intuition.library/OnGadget                         intuition.library/OnGadget
  3449.  
  3450.     NAME
  3451.     OnGadget -- Enable the specified gadget.
  3452.  
  3453.     SYNOPSIS
  3454.     OnGadget( Gadget, Window, Requester )
  3455.           A0      A1      A2
  3456.  
  3457.     VOID OnGadget( struct Gadget *, struct Window *,
  3458.         struct Requester * );
  3459.  
  3460.     FUNCTION
  3461.     This command enables the specified gadget.  When a gadget is
  3462.     enabled, these things happen:
  3463.         - its imagery is displayed normally (not ghosted)
  3464.         - the GFLG_DISABLED flag is cleared
  3465.         - the gadget can thereafter be selected by the user
  3466.  
  3467.     The window parameter must point to the window which contains the
  3468.     gadget, or which contains the requester that contains the gadget
  3469.     The requester parameter must only be valid if the gadget has the
  3470.     GTYP_REQGADGET flag set, a requirement for all requester gadgets.
  3471.  
  3472.        NOTE:  it's never safe to tinker with the gadget list yourself.  Don't
  3473.        supply some gadget that Intuition hasn't already processed in
  3474.        the usual way.
  3475.  
  3476.         NOTE: for compatibility reasons, this function will refresh all
  3477.     gadgets in a requester, and all gadgets from gadget to the 
  3478.     end of the gadget list if gadget is in a window.
  3479.  
  3480.     If you want to improve on this behavior, you may perform the
  3481.     equivalent operation yourself: remove a gadget or gadgets,
  3482.     change the state of their GFLG_DISABLED flag, replace the
  3483.     gadgets using AddGList(), and selectively call RefreshGList().
  3484.  
  3485.     INPUTS
  3486.     Gadget = pointer to the gadget that you want disabled
  3487.     Window = pointer to a window structure containing the gadget or
  3488.         containing the requester which contains the gadget
  3489.     Requester = pointer to a requester (may by NULL if this isn't 
  3490.            a requester gadget (i.e. GTYP_REQGADGET is not set)).
  3491.  
  3492.     RESULT
  3493.     None
  3494.  
  3495.     BUGS
  3496.  
  3497.     SEE ALSO
  3498.     
  3499. intuition.library/OnMenu                             intuition.library/OnMenu
  3500.  
  3501.     NAME
  3502.     OnMenu -- Enable the given menu or menu item.
  3503.  
  3504.     SYNOPSIS
  3505.     OnMenu( Window, MenuNumber )
  3506.             A0      D0
  3507.  
  3508.     VOID OnMenu( struct Window *, UWORD );
  3509.  
  3510.     FUNCTION
  3511.     This command enables a sub-item, an item, or a whole menu.
  3512.     This depends on the contents of the data packed into MenuNumber,
  3513.     which is described in the Intuition Reference Manual.
  3514.  
  3515.     INPUTS
  3516.     Window = pointer to the window
  3517.     MenuNumber = the menu piece to be enables
  3518.  
  3519.     RESULT
  3520.     None
  3521.  
  3522.     BUGS
  3523.  
  3524.     SEE ALSO
  3525.     OffMenu(), ResetMenuStrip()
  3526. intuition.library/OpenScreen                     intuition.library/OpenScreen
  3527.  
  3528.     NAME
  3529.     OpenScreen -- Open an Intuition screen.
  3530.  
  3531.     SYNOPSIS
  3532.     Screen = OpenScreen( NewScreen )
  3533.     D0             A0
  3534.  
  3535.     struct Screen *OpenScreen( struct NewScreen * );
  3536.  
  3537.     or
  3538.  
  3539.     struct Screen *OpenScreen( struct ExtNewScreen * );
  3540.  
  3541.     FUNCTION
  3542.     Opens an Intuition screen according to the specified parameters
  3543.     found in the NewScreen structure.
  3544.  
  3545.     Does all the allocations, sets up the screen structure and all
  3546.     substructures completely, and links this screen's viewport into 
  3547.     Intuition's View structure.
  3548.  
  3549.     Before you call OpenScreen(), you must initialize an instance of
  3550.     a NewScreen structure.  NewScreen is a structure that contains
  3551.     all of the arguments needed to open a screen.  The NewScreen
  3552.     structure may be discarded immediately after OpenScreen() returns.
  3553.  
  3554.     The SHOWTITLE flag is set to TRUE by default when a screen is opened.
  3555.     To change this, you must call the routine ShowTitle().
  3556.  
  3557.     INPUTS
  3558.     NewScreen = pointer to an instance of a NewScreen structure.
  3559.  
  3560.     New for V36: 
  3561.     In addition to the information contained in the NewScreen structure,
  3562.     Intuition now recognizes extended data passed in the form
  3563.     of an array of TagItem structures (from <utility/tagitem.h>),
  3564.     commonly called a "tag list."
  3565.  
  3566.     There are two ways to provide this array.  The first is to 
  3567.     use the new Intuition entry point OpenScreenTagList() and 
  3568.     pass the tag list as a parameter.  This is the recommended
  3569.     method, and has a convenient format variation for C programs
  3570.     using a variable number of arguments.
  3571.  
  3572.     An older way used for some V36 development uses the OpenScreen()
  3573.     entry point, and an extension of the NewScreen structure named
  3574.     ExtNewScreen.  See the documentation of the flag NS_EXTENDED,
  3575.     below.
  3576.  
  3577.     While we recommend that you use OpenScreenTagList() rather than
  3578.     OpenScreen() when using the extension tag list, we document
  3579.     the tag ID values here, so that all parameters for opening
  3580.     a screen can be found in one place.
  3581.  
  3582.     NewScreen is initialized with the following information:
  3583.     -------------------------------------------------------------
  3584.     Left = initial x-position of your screen (should be zero for
  3585.     releases prior to V36)
  3586.  
  3587.     Top = initial y-position of the opening screen
  3588.     (Note: Left and Top are specified relative to the Intuition's view,
  3589.     in same resolution as the screen pixels.)
  3590.  
  3591.     Width = the width for this screen's RastPort
  3592.  
  3593.     Height = the height for his screen's RastPort, or the constant
  3594.         STDSCREENHEIGHT to get the current default height (at
  3595.         this time guaranteed to be at least 200 rows).  The normal
  3596.         width and height for a particular system is stored by
  3597.         the graphics.library in GfxBase->NormalDisplayRows and
  3598.         GfxBase->NormalDisplayColumns.  These values will be different
  3599.         depending on factors such as PAL video and overscan.
  3600.  
  3601.         For V36, a new constant STDSCREENWIDTH is introduced.  It
  3602.         serves the similar function for screen width.  Both
  3603.         STDSCREENWIDTH and STDSCREENHEIGHT indicate that your
  3604.         screen RastPort is to be the same dimensions as your
  3605.         DisplayClip rectangle.  If you do not specify either a
  3606.         standard or custom DisplayClip, the OSCAN_TEXT region
  3607.         will be used, which corresponds to the standard dimensions
  3608.         of V35 and earlier.
  3609.  
  3610.         Furthermore, if you are using OpenScreenTagList(), and you
  3611.         specify STDSCREENWIDTH, and you DO NOT provide a NewScreen
  3612.         pointer, and you DO NOT provide SA_Left, then Intuition
  3613.         will automatically set the LeftEdge of the screen to
  3614.         be the left edge of the screen's DisplayClip region.
  3615.         Likewise for STDSCREENHEIGHT and the screen's TopEdge.
  3616.  
  3617.     Depth = number of bitplanes
  3618.  
  3619.     DetailPen = pen number for details (like gadgets or text in title bar)
  3620.         The common value for this pen is 0.
  3621.  
  3622.     BlockPen = pen number for block fills (like title bar)
  3623.         The common value for this pen is 1.
  3624.  
  3625.     Type = screen type values
  3626.         Set these flags as desired from the set:
  3627.         CUSTOMSCREEN -- this is your own screen, not a system screen.
  3628.         CUSTOMBITMAP -- this custom screen has bit maps supplied
  3629.         in the bitmap field of the NewScreen structure.  Intuition is
  3630.         not to allocate any raster bitmaps.
  3631.         SCREENBEHIND -- your screen will be created behind all other open
  3632.         screens.  This allows a program to prepare imagery in the
  3633.         screen, change its colors, and so on, bringing it to the
  3634.         front when it is presentable.
  3635.         SCREENQUIET -- Intuition will not render system screen gadgets or
  3636.         screen title.  In concert with the WFLG_RMBTRAP flag on all
  3637.         your screen's windows, this flag will prevent Intuition from
  3638.         rendering into your screen's bitplanes.  Without WFLG_RMBTRAP
  3639.         (or using the IDCMP_MENUVERIFY facility to cancel menu
  3640.         operations), this flag will prevent Intuition from clearing
  3641.         your menu bar, which is probably unacceptable.  The menu bar
  3642.         layer may still overwrite  a portion of your screen bitmap
  3643.         when the screen is opened.  (V36: it won't clobber your bits
  3644.         any more.)
  3645.         NS_EXTENDED for this screen to use extended attributes pointed
  3646.         to by the 'Extended' field, below.
  3647.  
  3648.     ViewModes = the appropriate argument for the data type ViewPort.Modes.
  3649.            These include:
  3650.            HIRES for this screen to be HIRES width.
  3651.            INTERLACE for the display to switch to interlace.
  3652.            SPRITES for this screen to use sprites (the pointer
  3653.         sprite is always displayed)
  3654.            DUALPF for dual-playfield mode (not supported yet)
  3655.         [For V36: The ViewModes field is superceded by a TagItem with
  3656.         tag value SA_DisplayID.]
  3657.  
  3658.     Font = pointer to the default TextAttr structure for text in this 
  3659.         screen and all windows that open in this screen.  Text that uses
  3660.         this TextAttr includes title bars of both screen and windows,
  3661.         string gadgets, and menu titles.  Of course, IntuiText that
  3662.         specifies a NULL TextAttr field will use the screen/window default
  3663.         fonts.  NOTE: Intuition will *NOT* call OpenDiskFont(), so
  3664.         the TextAttr you supply must be in memory.  The ways to ensure
  3665.         that are to either use a ROM font (Topaz 8 or 9) or first
  3666.         call OpenDiskFont() to load the font, and don't close it
  3667.         until after your screen is successfully opened.
  3668.         [For V36: this is superceded by SA_Font and SA_SysFont.]
  3669.  
  3670.     DefaultTitle = pointer to a line of text that will be displayed along
  3671.         the screen's title bar.  Null terminated, or just a NULL pointer
  3672.            to get no text
  3673.         [For V36: superceded by SA_Title.]
  3674.  
  3675.     Gadgets = This field should be set to NULL, since no user gadgets may
  3676.         be attached to a screen with the current versions of Intuition.
  3677.  
  3678.     CustomBitMap = if you're not supplying a custom bitmap, this value is 
  3679.            ignored.  However, if you have your own display memory that you
  3680.            want used for this screen, the CustomBitMap field should point to
  3681.         the BitMap structure that describes your display memory.  See the
  3682.            "Screens" chapter and the "Amiga ROM Kernel Manual" for more 
  3683.            information about bitmaps.
  3684.         [For V36: this is superceded by SA_BitMap.]
  3685.  
  3686.     [ All TagItem extensions below are new for V36.]
  3687.     Extension = if NS_EXTENDED is set in NewScreen.Type, this pointer
  3688.         should point to an array (or chain of arrays) of TagItems,
  3689.         as defined in the include file <utility/tagitem.h>.   This
  3690.         field is only defined in the structure ExtNewScreen.
  3691.         The values to use for TagItem.ti_Tag are defined below.  We
  3692.         recommend that V36-specific applications use the new Intuition
  3693.         entry point OpenScreenTagList(), rather than using this field.
  3694.         The ExtNewScreen structure is a convenient way to give V36
  3695.         Intuition some information that V34 and earlier Intuition will
  3696.         ignore.
  3697.  
  3698.         Each TagItem is an optional tagged data structure which identifies
  3699.         an additional parameter to OpenScreen().  The applicable tag ID
  3700.         values for TagItem.ti_Tag and their corresponding data follow.
  3701.  
  3702.         Several of the tag items are alternative (and overriding) versions
  3703.         to familiar fields in NewScreen.  They are:
  3704.  
  3705.     SA_Left
  3706.     SA_Top
  3707.     SA_Width
  3708.     SA_Height
  3709.     SA_Depth
  3710.     SA_DetailPen
  3711.     SA_BlockPen
  3712.     SA_Title
  3713.     SA_Font
  3714.     SA_Type
  3715.     SA_BitMap (whose existence also implies CUSTOMBITMAP). 
  3716.  
  3717.         Several tags are Booleans, which means that depending on whether
  3718.         their corresponding ti_Data field is zero (FALSE) or non-zero
  3719.         (TRUE), they specify Boolean attributes.  The ones corresponding
  3720.         to Boolean flags in the NewScreen.Type field are:
  3721.  
  3722.     SA_ShowTitle
  3723.     SA_Behind (equiv. to SCREENBEHIND)
  3724.     SA_Quiet (equiv. to SCREENQUIET)
  3725.  
  3726.         The following tags provide extended information to Intuition
  3727.         when creating a screen:
  3728.  
  3729.     SA_DisplayID: ti_Data is a 32-bit extended display mode ID
  3730.         as defined in <graphics/displayinfo.h>
  3731.  
  3732.     SA_Overscan: ti_Data contains a defined constant specifying
  3733.         one of the system standard overscan dimensions appropriate for
  3734.         the display mode of the screen.  Used with the Width and
  3735.         Height dimensions STDSCREENWIDTH and STDSCREEN, this makes
  3736.         it trivial to open an overscanned or standard dimension
  3737.         screen.  You may also hand-pick your various dimensions
  3738.         for overscanned or other screens, by specifying screen position
  3739.         and dimensions explicitly, and by using SA_DClip to explicitly
  3740.         specify an overscanned DisplayClip region.
  3741.  
  3742.         The values for ti_Data of this tag are as follows:
  3743.  
  3744.         OSCAN_TEXT - Text Overscan region.  A region which is completely
  3745.         on screen and readable ("text safe").  A preferences data
  3746.         setting, this is backward equivalent with the old MoreRows,
  3747.         and specifies the DisplayClip and default dimensions of the
  3748.         Workbench screen.  This is the default.
  3749.  
  3750.         OSCAN_STANDARD - Also a preferences setting, this specifies
  3751.         a rectangle whose edges are "just out of view."  This yields
  3752.         the most efficient position and dimensions of on-monitor
  3753.         presentations, such as games and artwork.
  3754.  
  3755.         OSCAN_MAX - This is the largest rectangular region that the
  3756.         graphics library can handle "comfortably" for a given mode.
  3757.         Screens can smoothly scroll (hardware pan) within this region,
  3758.         and any DisplayClip or Screen region within this rectangle
  3759.         is also legal.  It is not a preferences item, but reflects
  3760.         the limits of the graphics hardware and software.
  3761.  
  3762.         OSCAN_VIDEO - This is the largest region that the graphics
  3763.         library can display, comfortable or not.  There is no guarantee
  3764.         that all smaller rectangles are valid.  This region is
  3765.         typically out of sight on any monitor or TV, but provides our
  3766.         best shot at "edge-to-edge" video generation.
  3767.  
  3768.         Remember, using overscan drastically effects memory use and
  3769.         chip memory bandwidth.  Always use the smallest (standard)
  3770.         overscan region that works for your application.
  3771.  
  3772.     SA_DClip: ti_Data is a pointer to a rectangle which explicitly
  3773.         defines a DisplayClip region for this screen.  See QueryOverscan()
  3774.         for the role of the DisplayClip region.
  3775.  
  3776.         Except for overscan display screens, this parameter is
  3777.         unnecessary, and specifying a standard value using SA_Overscan
  3778.         is normally an easier way to get overscan.
  3779.  
  3780.     SA_AutoScroll: this is a Boolean tag item, which specifies that
  3781.         this screens is to scroll automatically when the mouse pointer
  3782.         reaches the edge of the screen.  The operation of this requires
  3783.         that the screen dimensions be larger than its DisplayClip
  3784.         region.
  3785.  
  3786.     SA_PubName: If this field is present (and ti_Data is non-NULL),
  3787.         it means that the screen is a public screen, and that
  3788.         the public screen name string is pointed to by ti_Data.
  3789.         Public screens are opened in "PRIVATE" mode and must
  3790.         be made public using PubScreenStatus().
  3791.  
  3792.     SA_Pens: The ti_Data field (if non-NULL) points to a UWORD
  3793.         array of pen specification, as defined for struct DrawInfo.
  3794.         This array will be used to initialize the screen's
  3795.         DrawInfo.dri_Pens array.
  3796.  
  3797.         SA_Pens is also used to decide that a screen is ready
  3798.         to support the full-blown "new look" graphics.  If you
  3799.         want the 3D embossed look, you must provide this tag,
  3800.         and the ti_Data value cannot be NULL.  If it points
  3801.         to a "minimal" array, containing just the terminator ~0,
  3802.         you can specify "new look" without providing any values
  3803.         for the pen array.
  3804.  
  3805.     The following two tag items specify the task and signal to be issued
  3806.     to notify when the last "visitor" window closes on a public screen. 
  3807.     This support is to assist envisioned public screen manager programs.
  3808.  
  3809.     SA_PubTask:  Task to be signalled.  If absent (and SA_PubSig is
  3810.         valid), use the task which called OpenScreen() or
  3811.         OpenScreenTagList()).
  3812.  
  3813.     SA_PubSig:  Data is a UBYTE signal number (not flag) used to notify
  3814.         a task when the last visitor window closes on a public screen.
  3815.  
  3816.     SA_Colors: ti_Data points to an array of ColorSpec structures
  3817.         (terminated with ColorIndex = -1) which specify initial
  3818.         values of the screen's color palette.
  3819.  
  3820.     SA_FullPalette: this is a Boolean attribute.  Prior to V36, there
  3821.         were just 7 RGB color values that Intuition maintained
  3822.         in its user preferences (playfield colors 0-3, and colors
  3823.         17-19 for the sprite).  When opening a screen, the color
  3824.         map for the screens viewport is first initialized by
  3825.         graphics (graphics.library/GetColorMap()) then these
  3826.         seven values are overridden to take the preferences values.
  3827.  
  3828.         In V36, Intuition maintains a full set of 32 preferences colors.
  3829.         If you specify TRUE for SA_FullPalette, Intuition will
  3830.         override ALL color map entries with its full suite of
  3831.         preferred colors.
  3832.  
  3833.     SA_ErrorCode: ti_Data points to a ULONG in which Intuition will
  3834.         stick an extended error code if OpenScreen[TagList]() fails.
  3835.         Values are of this include 0, for success, and:
  3836.         OSERR_NOMONITOR    - monitor for display mode not available.
  3837.         OSERR_NOCHIPS    - you need newer custom chips for display mode.
  3838.         OSERR_NOMEM        - couldn't get normal memory
  3839.         OSERR_NOCHIPMEM    - couldn't get chip memory
  3840.         OSERR_PUBNOTUNIQUE    - public screen name already used
  3841.         OSERR_UNKNOWNMODE    - don't recognize display mode requested
  3842.         
  3843.         NOTE: These values are not the same as some similar return
  3844.         values defined in graphics.library/ModeNotAvailable().
  3845.  
  3846.     SA_SysFont: ti_Data selects one of the system standard fonts
  3847.         specified in preferences.  This tag item overrides the
  3848.         NewScreen.Font field and the SA_Font tag item.
  3849.  
  3850.         Values recognized in ti_Data at present are:
  3851.         0 - old DefaultFont, fixed-width, the default.
  3852.         1 - Workbench screen preferred font.  You have to
  3853.             be very font sensitive to handle a proportional or
  3854.             larger than traditional screen font.
  3855.  
  3856.         NOTE WELL: if you select sysfont 1, windows opened on
  3857.         your screen will not inherit the screen font, but rather
  3858.         the window RastPort will be initialized to the old-style
  3859.         DefaultFont (sysfont 0).
  3860.  
  3861.     RESULT
  3862.     If all is well, returns the pointer to your new screen
  3863.     If anything goes wrong, returns NULL, with further error
  3864.     specification in the variable pointed to by the SA_ErrorCode
  3865.     data field (V36 and later).
  3866.  
  3867.     NOTE
  3868.     By default, AmigaDOS requesters related to your process are put on
  3869.     the Workbench screen (these are messages like "Disk Full").  If
  3870.     you wish them to show up on custom screens, DOS must be told.
  3871.     This fragment shows the procedure.  More information is available
  3872.     in the AmigaDOS manuals.  Sample code fragment:
  3873.  
  3874.     #include "libraries/dosextens.h"
  3875.         ...
  3876.     struct Process    *process;
  3877.     struct Window    *window;
  3878.     APTR        temp;
  3879.         ...
  3880.         process = (struct Process *) FindTask(NULL);
  3881.         temp = process->pr_WindowPtr;    (save old value)
  3882.         process->pr_WindowPtr = (APTR) window;
  3883.         ( use a pointer to any open window on your screen )
  3884.             ...
  3885.         your code goes here
  3886.             ...
  3887.         process->pr_WindowPtr = temp;
  3888.         ( restore value BEFORE CloseWindow() )
  3889.         CloseWindow(window);
  3890.  
  3891.     BUGS
  3892.  
  3893.     SEE ALSO
  3894.     OpenScreenTagList(), OpenWindow(), PrintIText(), CloseScreen(),
  3895.     QueryOverscan() PubScreenStatus(), The Intuition Reference Manual,
  3896.     utility/tagitem.h, graphics.library/ModeNotAvailable(),
  3897.     diskfont.library/OpenDiskFont(), graphics.library/GetColorMap()
  3898. intuition.library/OpenScreenTagList       intuition.library/OpenScreenTagList
  3899.  
  3900.    NAME    
  3901.     OpenScreenTagList -- OpenScreen() with TagItem extension array. (V36)
  3902.     OpenScreenTags -- Varargs stub for OpenScreenTagList. (V36)
  3903.  
  3904.    SYNOPSIS
  3905.     Screen = OpenScreenTagList( NewScreen, TagItems )
  3906.     D0                  A0         A1
  3907.  
  3908.     struct Screen *OpenScreenTagList( struct NewScreen *,
  3909.         struct TagItem * );
  3910.  
  3911.     Screen = OpenScreenTags( NewScreen, Tag1, ... )
  3912.  
  3913.     struct Screen *OpenScreenTags( struct NewScreen *,
  3914.         ULONG, ... );
  3915.  
  3916.    FUNCTION
  3917.     Provides an extension to the parameters passed to OpenScreen().
  3918.     This extensions is in the form of (a pointer to) an array of
  3919.     TagItem structures, which have to fields: ti_Tag, an ID identifying
  3920.     the meaning of the other field, ti_Data.  See <utility/tagitem.h>.
  3921.  
  3922.     The tag items can supplement or override the values in NewScreen.
  3923.     In fact, you can pass a NULL value of the NewScreen pointer.
  3924.     For that matter, if you pass NULL in both arguments, you'll get
  3925.     a screen with defaults in all fields, including display mode,
  3926.     depth, colors, dimension, title, and so on.  We ask that
  3927.     you at least supply a title when you open a screen.
  3928.  
  3929.     See OpenScreen() documentation for parameter specifications.
  3930.  
  3931.    INPUTS
  3932.      NewScreen     - (optional) pointer to a NewScreen structure.
  3933.      TagItems      - (optional) pointer to (an array of) TagItem
  3934.             structures, terminated by the value TAG_END.
  3935.  
  3936.    RESULT
  3937.      Screen    - an open Intuition screen.  See OpenScreen() for
  3938.         extended error codes when Screen is returned NULL.
  3939.  
  3940.    EXAMPLE
  3941.     The version using a variable number of arguments must be
  3942.     created for each particular compiler, and may not have
  3943.     an analogue in all versions.  For vanilla, 32-bit C
  3944.     parameter passing conventions, this works (and will
  3945.     appear in amiga.lib):
  3946.     
  3947.     struct Screen    *
  3948.     OpenScreenTags( ns, tag1 )
  3949.     struct NewScreen    *ns;
  3950.     ULONG            tag1;
  3951.     {
  3952.         struct Screen    *OpenScreenTagList();
  3953.  
  3954.         return ( OpenScreenTagList( ns, (struct TagItem *) &tag1 ) );
  3955.     }
  3956.  
  3957.    NOTES
  3958.     We recommend this extension to OpenScreen() over using the
  3959.     field ExtNewScreen.Extension.  However, the ExtNewScreen.Extension
  3960.     is a convenient way to supply a few tags to V36 Intuition which
  3961.     will be ignored by V34 Intuition.  See OpenScreen() documentation
  3962.     for lots of details.
  3963.  
  3964.    BUGS
  3965.     
  3966.  
  3967.    SEE ALSO
  3968.     OpenScreen()
  3969.  
  3970. intuition.library/OpenWindow                     intuition.library/OpenWindow
  3971.  
  3972.     NAME
  3973.     OpenWindow -- Open an Intuition window.
  3974.  
  3975.     SYNOPSIS
  3976.        Window = OpenWindow( NewWindow )
  3977.     D0                   A0
  3978.  
  3979.     struct Window *OpenWindow( struct NewWindow * );
  3980.  
  3981.     FUNCTION
  3982.     Opens an Intuition window of the given dimensions and position,
  3983.     with the properties specified in the NewWindow structure.
  3984.     Allocates everything you need to get going.
  3985.  
  3986.     New for V36: there is an extensive discussion of public Screens
  3987.     and visitor windows at the end of this section.  Also,
  3988.     you can provide extensions to the NewWindow parameters using
  3989.     and array of TagItem structures.  See the discussion below,
  3990.     and the documentation for the function OpenScreenTagList().
  3991.  
  3992.     Before you call OpenWindow(), you must initialize an instance of
  3993.     a NewWindow structure.  NewWindow is a structure that contains
  3994.     all of the arguments needed to open a window.  The NewWindow
  3995.     structure may be discarded immediately after it is used to open 
  3996.     the window.
  3997.     
  3998.     If Type == CUSTOMSCREEN, you must have opened your own screen
  3999.     already via a call to OpenScreen().  Then Intuition uses your screen
  4000.     argument for the pertinent information needed to get your window
  4001.     going.  On the other hand, if type == one of the Intuition's standard
  4002.     screens, your screen argument is ignored.  Instead, 
  4003.     Intuition will check to see whether or not that screen
  4004.     already exists:  if it doesn't, it will be opened first before
  4005.     Intuition opens your window in the standard screen.
  4006.  
  4007.     New for V36: If you specify Type == WBENCHSCREEN, then your
  4008.     window will appear on the Workbench screen, unless the global
  4009.     public screen mode SHANGHAI is set, in which case your window
  4010.     will be "hijacked" to the default public screen.  See also
  4011.     SetPubScreenModes().
  4012.     
  4013.     New for V36: If the WFLG_NW_EXTENDED flag is set, it means that the
  4014.     field 'ExtNewWindow->Extension' points to an array of TagItems, as
  4015.     defined in intuition/tagitem.h.  This provides an extensible means
  4016.     of providing extra parameters to OpenWindow.  For compatibility
  4017.     reasons, we could not add the 'Extension' field to the NewWindow
  4018.     structure, so we have define a new structure ExtNewWindow, which
  4019.     is identical to NewWindow with the addition of the Extension field.
  4020.  
  4021.     We recommend that rather than using ExtNewWindow.Extension, you
  4022.     use the new Intuition function OpenWindowTagList() and its
  4023.     varargs equivalent OpenWindowTags().  We document the window
  4024.     attribute tag ID's (ti_Tag values) here, rather than in 
  4025.     OpenWindowTagList(), so that you can find all the parameters
  4026.     for a new window defined in one place.
  4027.     
  4028.     If the WFLG_SUPER_BITMAP flag is set, the bitmap variable must point
  4029.     to your own bitmap.
  4030.     
  4031.     The DetailPen and the BlockPen are used for system rendering; for
  4032.     instance, the title bar is first filled using the BlockPen, and then
  4033.     the gadgets and text are rendered using DetailPen.  You can either
  4034.     choose to supply special pens for your window, or, by setting either
  4035.     of these arguments to -1, the screen's pens will be used instead.
  4036.  
  4037.     Note for V36: The DetailPen and BlockPen no longer determine
  4038.     what colors will be used for window borders, if your window
  4039.     opens on a "full-blown new look screen."
  4040.  
  4041.     INPUTS
  4042.     NewWindow = pointer to an instance of a NewWindow structure.  That
  4043.                structure is initialized with the following data:
  4044.    -------------------------------------------------------------------------
  4045.     Left = the initial x-position for your window
  4046.     Top = the initial y-position for your window
  4047.     Width = the initial width of this window
  4048.     Height = the initial height of this window
  4049.  
  4050.     DetailPen = pen number (or -1) for the rendering of window details
  4051.          (like gadgets or text in title bar)
  4052.     BlockPen = pen number (or -1) for window block fills (like title bar)
  4053.     [For V36: Title bar colors are determined otherwise.]
  4054.  
  4055.     Flags = specifiers for your requirements of this window, including:
  4056.          which system gadgets you want attached to your window:
  4057.  
  4058.         - WFLG_DRAGBAR allows this window to be dragged
  4059.         - WFLG_DEPTHGADGET lets the user depth-arrange this window
  4060.         - WFLG_CLOSEGADGET attaches the standard close gadget
  4061.         - WFLG_SIZEGADGET allows this window to be sized. 
  4062.         
  4063.         If you ask for the WFLG_SIZEGADGET gadget, you must specify one or
  4064.         both of the flags WFLG_SIZEBRIGHT and WFLG_SIZEBBOTTOM below; if
  4065.         you don't, the default is WFLG_SIZEBRIGHT.  See the following items
  4066.         WFLG_SIZEBRIGHT and WFLG_SIZEBBOTTOM for more details.
  4067.  
  4068.         - WFLG_SIZEBRIGHT is a special system gadget flag that
  4069.           you set to specify whether or not you want the
  4070.           RIGHT border adjusted to account for the physical size 
  4071.           of the sizing gadget.  The sizing gadget must, after
  4072.           all, take up room in either the right or bottom border
  4073.           (or both, if you like) of the window.  Setting either
  4074.           this or the WFLG_SIZEBBOTTOM flag selects which edge 
  4075.           will take up the slack.  This will be particularly
  4076.           useful to applications that want to use the extra space
  4077.           for other gadgets (like a proportional gadget and two
  4078.           Booleans done up to look like scroll bars) or, for
  4079.           for instance, applications that want every possible
  4080.           horizontal bit and are willing to lose lines vertically.
  4081.           NOTE:  if you select WFLG_SIZEGADGET, you must select 
  4082.           either WFLG_SIZEBRIGHT or WFLG_SIZEBBOTTOM or both.  If
  4083.           you select neither, the default is WFLG_SIZEBRIGHT.
  4084.         - WFLG_SIZEBBOTTOM is a special system gadget flag that
  4085.           you set to specify whether or not you want the
  4086.           BOTTOM border adjusted to account for the physical size 
  4087.           of the sizing gadget.  For details, refer to
  4088.           WFLG_SIZEBRIGHT above.
  4089.  
  4090.         - WFLG_GIMMEZEROZERO for easy but expensive output
  4091.  
  4092.         what type of window layer you want, either:
  4093.         - WFLG_SIMPLE_REFRESH
  4094.         - WFLG_SMART_REFRESH
  4095.         - WFLG_SUPER_BITMAP
  4096.  
  4097.         - WFLG_BACKDROP for whether or not you want this window to be one
  4098.           of Intuition's special backdrop windows.  See WFLG_BORDERLESS
  4099.           as well.
  4100.  
  4101.         - WFLG_REPORTMOUSE for whether or not you want to "listen" to
  4102.           mouse movement events whenever your window is the active
  4103.           one.  After you've opened your window, if you want to change
  4104.           you can later change the status of this via a call to
  4105.           ReportMouse().  Whether or not your window is listening to
  4106.           mouse is affected by gadgets too, since they can cause you
  4107.           to start getting reports too if you like.  The mouse move
  4108.           reports (either InputEvents or messages on the IDCMP) that
  4109.           you get will have the x/y coordinates of the current mouse
  4110.           position, relative to the upper-left corner of your window
  4111.           (WFLG_GIMMEZEROZERO notwithstanding).  This flag can work in
  4112.           conjunction with the IDCMP Flag called IDCMP_MOUSEMOVE, which
  4113.           allows you to listen via the IDCMP.
  4114.  
  4115.         - WFLG_BORDERLESS should be set if you want a window with no
  4116.           border padding.  Your window may have the border variables
  4117.           set anyway, depending on what gadgetry you've requested for
  4118.           the window, but you won't get the standard border lines and
  4119.           spacing that comes with typical windows.  
  4120.  
  4121.           This is a good way to take over the entire screen, since you
  4122.           can have a window cover the entire width of the screen using
  4123.           this flag.  This will work particularly well in conjunction
  4124.           with the WFLG_BACKDROP flag (see above), since it allows you
  4125.           to open a window that fills the ENTIRE screen.  NOTE:  this is
  4126.           not a flag that you want to set casually, since it may cause
  4127.           visual confusion on the screen.  The window borders are the
  4128.           only dependable visual division between various windows and
  4129.           the background screen.  Taking away that border takes away
  4130.           that visual cue, so make sure that your design doesn't need
  4131.           it at all before you proceed.
  4132.  
  4133.         - WFLG_ACTIVATE is the flag you set if you want this window to
  4134.           automatically become the active window.  The active
  4135.           window is the one that receives input from the keyboard and
  4136.           mouse.  It's usually a good idea to to have the window you
  4137.           open when your application first starts up be an ACTIVATED
  4138.           one, but all others opened later not be ACTIVATED (if the
  4139.           user is off doing something with another screen, for
  4140.           instance, your new window will change where the input is
  4141.           going, which would have the effect of yanking the input rug
  4142.           from under the user).  Please use this flag thoughtfully and
  4143.           carefully.
  4144.  
  4145.           Some notes: First, your window may or may not be active
  4146.           by the time this function returns.  Use the IDCMP_ACTIVEWINDOW
  4147.           IDCMP message to know when your window has become active.
  4148.           Also, be very careful not to mistakenly specify the
  4149.           obsolete flag names WINDOWACTIVE or ACTIVEWINDOW.  These are
  4150.           used in other contexts, and their values unintentionally added
  4151.           to your flags can cause most unfortunate results.  To avoid
  4152.           confusion, they are now know as WFLG_WINDOWACTIVE and
  4153.           IDCMP_ACTIVEWINDOW.
  4154.  
  4155.         - WFLG_RMBTRAP, when set, causes the right mouse button events 
  4156.           to be trapped and broadcast as events.  You can receive 
  4157.           these events through either the IDCMP or the console.
  4158.  
  4159.         - WFLG_NOCAREREFRESH indicates that you do not wish to
  4160.           be responsible for calling BeginRefresh() and EndRefresh()
  4161.           when your window has exposed regions (i.e., when the
  4162.           IDCMP_REFRESHWINDOW message would be generated).  See also
  4163.           the descriptions of these two functions.
  4164.  
  4165.         - WFLG_NW_EXTENDED (V36) indicates that NewWindow in fact points
  4166.           to an ExtNewWindow structure, and that the 'Extension'
  4167.           field points to an array of TagItem structures, with
  4168.           meaning described below.
  4169.  
  4170.     IDCMPFlags = IDCMP is the acronym for Intuition Direct Communications
  4171.         Message Port.  (It's Intuition's sole acronym.) If any of the
  4172.         IDCMP Flags is selected, Intuition will create a pair of
  4173.         message ports and use them for direct communications with the
  4174.         task opening this window (as compared with broadcasting
  4175.         information via the Console device).  See the "Input and
  4176.         Output Methods" chapter of the Intuition Reference Manual for
  4177.         complete details.
  4178.  
  4179.         You request an IDCMP by setting any of these flags.  Except
  4180.         for the special VERIFY flags, every other flag you set tells
  4181.         Intuition that if a given event occurs which your program
  4182.         wants to know about, it is to broadcast the details of that
  4183.         event through the IDCMP rather than via the Console device.
  4184.         This allows a program to interface with Intuition directly,
  4185.         rather than going through the Console device.
  4186.  
  4187.         Many programs have elected to use IDCMP communication
  4188.         exclusively, and not to associate a console with their
  4189.         windows at all.  Some operations, such as IDCMP_MENUVERIFY,
  4190.         can ONLY be achieved using IDCMP.
  4191.  
  4192.             The IDCMP flags you can set are:
  4193.  
  4194.         - IDCMP_REQVERIFY is the flag which, like IDCMP_SIZEVERIFY and ...
  4195.  
  4196.         - IDCMP_MENUVERIFY (see immediately below), specifies that you
  4197.           want to make sure that your graphical state is quiescent
  4198.           before something extraordinary happens.  In this case, the
  4199.           extraordinary event is that a rectangle of graphical data is
  4200.           about to be blasted into your Window.  If you're drawing
  4201.           directly into its screen, you probably will wish to make sure
  4202.           that you've ceased drawing before the user is allowed to bring
  4203.           up the DMRequest you've set up, and the same for when system
  4204.           has a request for the user.  Set this flag to ask for that
  4205.           verification step.
  4206.  
  4207.         - IDCMP_REQCLEAR is the flag you set to hear a message whenever
  4208.           a requester is cleared from your window.  If you are using
  4209.           IDCMP_REQVERIFY to arbitrate access to your screen's bitmap, it
  4210.           is safe to start your output once you have heard an
  4211.           IDCMP_REQCLEAR for each IDCMP_REQSET.
  4212.  
  4213.         - IDCMP_REQSET is a flag that you set to receive a broadcast
  4214.           for each requester that is opened in your window.  Compare
  4215.           this with IDCMP_REQCLEAR above.  This function is distinct
  4216.           from IDCMP_REQVERIFY.  This functions merely tells you that a
  4217.           requester has opened, whereas IDCMP_REQVERIFY requires you to
  4218.           respond before the requester is opened.
  4219.  
  4220.         - IDCMP_MENUVERIFY is the flag you set to have Intuition stop
  4221.           and wait for you to finish all graphical output to your
  4222.           window before rendering the menus.  Menus are currently
  4223.           rendered in the most memory-efficient way, which involves
  4224.           interrupting output to all windows in the screen before the
  4225.           menus are drawn.  If you need to finish your graphical
  4226.           output before this happens, you can set this flag to make
  4227.           sure that you do.
  4228.  
  4229.         - IDCMP_SIZEVERIFY means that you will be doing output to your
  4230.           window which depends on a knowledge of the current size of the
  4231.           window.  If the user wants to resize the window,  you may want
  4232.           to make sure that any queued output completes before the sizing
  4233.           takes place (critical text, for instance).  If this is the
  4234.           case, set this flag.   Then, when the user wants to size,
  4235.           Intuition will send you the IDCMP_SIZEVERIFY message and Wait()
  4236.           until you reply that it's OK to proceed with the sizing. NOTE:
  4237.           when we say that Intuition will Wait() until you reply, what
  4238.           we're really saying is that user will WAIT until you reply, which
  4239.           suffers the great negative potential of User-Unfriendliness.
  4240.           So remember:  use this flag sparingly, and, as always with any
  4241.           IDCMP Message you receive, reply to it promptly!  Then, after
  4242.           user has sized the window, you can find out about it using
  4243.           IDCMP_NEWSIZE.
  4244.  
  4245.         With all the "VERIFY" functions, it is not save to leave them
  4246.         enabled at any time when your task may not be able to respond
  4247.         for a long period.
  4248.  
  4249.         It is NEVER safe to call AmigaDOS, directly or indirectly, when
  4250.         a "VERIFY" function is active.  If AmigaDOS needs to put up a
  4251.         disk requester for you, your task might end up waiting for the
  4252.         requester to be satisfied, at the same time as Intuition is
  4253.         waiting for your response.  The result is a complete machine
  4254.         lockup.  USE ModifyIDCMP() TO TURN OFF ANY VERIFY MESSAGES
  4255.         BEFORE CALLING dos.library!!
  4256.  
  4257.         For V36: If you do not respond to the verification IntuiMessages
  4258.         within the user specified timeout duration, Intuition will abort
  4259.         the operation.  This eliminates the threat of these easy
  4260.         deadlocks, but can result in a confused user.  Please try
  4261.         hard to continue to avoid "logical deadlocks".
  4262.  
  4263.         - IDCMP_NEWSIZE is the flag that tells Intuition to send an IDCMP
  4264.           message to you after the user has resized your window.  At
  4265.           this point, you could examine the size variables in your
  4266.           window structure to discover the new size of the window.
  4267.           See also the IDCMP_CHANGEWINDOW IDCMP flag.
  4268.  
  4269.         - IDCMP_REFRESHWINDOW when set will cause a message to be sent
  4270.           whenever your window needs refreshing.  This flag makes
  4271.           sense only with WFLG_SIMPLE_REFRESH and WFLG_SMART_REFRESH
  4272.           windows.
  4273.  
  4274.         - IDCMP_MOUSEBUTTONS will get reports about mouse-button up/down
  4275.           events broadcast to you (Note:  only the ones that
  4276.           don't mean something to Intuition.  If the user clicks the
  4277.           select button over a gadget, Intuition deals with it and you
  4278.           don't find out about it through here).
  4279.  
  4280.         - IDCMP_MOUSEMOVE will work only if you've set the 
  4281.           WFLG_REPORTMOUSE flag above, or if one of your gadgets has the
  4282.           GACT_FOLLOWMOUSE flag set.  Then all mouse movements will be
  4283.           reported here, providing your window is active.
  4284.  
  4285.         - IDCMP_GADGETDOWN means that when the User "selects" a gadget
  4286.           you've created with the GACT_IMMEDIATE flag set, the fact
  4287.           will be broadcast through the IDCMP.
  4288.  
  4289.         - IDCMP_GADGETUP means that when the user "releases" a gadget that
  4290.           you've created with the GACT_RELVERIFY flag set, the fact
  4291.           will be broadcast through the IDCMP.  This message is
  4292.           only generated if the release is "good", such as releasing
  4293.           the select button over a Boolean gadget, or typing ENTER
  4294.           in a string gadget.
  4295.  
  4296.         - IDCMP_MENUPICK selects that menu number data will be sent via
  4297.           the IDCMP.
  4298.  
  4299.         - IDCMP_CLOSEWINDOW means broadcast the IDCMP_CLOSEWINDOW event
  4300.           through the IDCMP rather than the console.
  4301.  
  4302.         - IDCMP_RAWKEY selects that all IDCMP_RAWKEY events are
  4303.           transmitted via the IDCMP.  Note that these are absolutely RAW
  4304.           keycodes, which you will have to translate before using.
  4305.           Setting this and the MOUSE flags effectively eliminates the need
  4306.           to open a Console device to get input from the keyboard and
  4307.           mouse.  Of course, in exchange you lose all of the console
  4308.           features, most notably the "cooking" of input data and
  4309.           the systematic output of text to your window.
  4310.  
  4311.         - IDCMP_VANILLAKEY is for developers who don't want the hassle
  4312.           of IDCMP_RAWKEYS.  This flag will return all the keycodes after
  4313.           translation via the current country-dependent keymap.  When
  4314.           you set this flag, you will get IntuiMessages where the Code
  4315.           field has a decoded ANSI character code representing the key
  4316.           struck on the keyboard.  Only codes that map to a single
  4317.           character are returned: you can't read such keys as HELP or
  4318.           the function keys with IDCMP_VANILLAKEY.
  4319.  
  4320.           NOTE FOR V36: If you have both IDCMP_RAWKEY and IDCMP_VANILLAKEY
  4321.           set, Intuition will send an IDCMP_RAWKEY event for those
  4322.           *downstrokes* which do not map to single-byte characters
  4323.           ("non-vanilla" keys).  In this way you can easily detect cursor
  4324.           keys, function keys, and the Help key without sacrificing the
  4325.           convenience of IDCMP_VANILLAKEY.
  4326.  
  4327.         - IDCMP_INTUITICKS gives you simple timer events from Intuition
  4328.           when your window is the active one; it may help you avoid
  4329.           opening and managing the timer device.  With this flag set,
  4330.           you will get only one queued-up INTUITICKS message at a
  4331.           time.  If Intuition notices that you've been sent an
  4332.           IDCMP_INTUITICKS message and haven't replied to it, another
  4333.           message will not be sent.  Intuition receives timer events and
  4334.           considers sending you an IDCMP_INTUITICKS message approximately
  4335.           ten times a second.
  4336.  
  4337.         - IDCMP_DELTAMOVE gives raw (unscaled) input event delta X/Y
  4338.           values.  This is so you can detect mouse motion regardless of
  4339.           screen/window/display boundaries.  This works a little
  4340.           strangely: if you set both IDCMP_MOUSEMOVE and IDCMP_DELTAMOVE.
  4341.           IDCMPFlags, you will get IDCMP_MOUSEMOVE messages with delta
  4342.           x/y values in the MouseX and MouseY fields of the
  4343.           IDCMPMessage.
  4344.  
  4345.         - IDCMP_NEWPREFS indicates you wish to be notified when the
  4346.           system-wide Preferences changes.  For V36, there is a new
  4347.           environment mechanism to replace Preferences, which we
  4348.           recommend you consider using instead.
  4349.  
  4350.         - Set IDCMP_ACTIVEWINDOW and IDCMP_INACTIVEWINDOW to get messages
  4351.           when those events happen to your window.  Take care not to
  4352.           confuse this "ACTIVEWINDOW" with the familiar sounding, but
  4353.           totally different "WINDOWACTIVE" flag.  These two flags have
  4354.           been supplanted by "IDCMP_ACTIVEWINDOW" and "WFLG_WINDOWACTIVE".
  4355.           Use the new equivalent terms to avoid confusion.
  4356.  
  4357.         - Set IDCMP_DISKINSERTED or IDCMP_DISKREMOVED to learn when
  4358.           removable disks are inserted or removed, respectively.
  4359.  
  4360.         - IDCMP_IDCMPUPDATE is a new class for V36 which is used as
  4361.           a channel of communication from custom and boopsi gadgets
  4362.           to your application.
  4363.  
  4364.         - IDCMP_CHANGEWINDOW is a new class for V36 that will be sent
  4365.           to your window whenever its dimensions or position are changed
  4366.           by the user or the functions SizeWindow(), MoveWindow(),
  4367.           ChangeWindowBox(), or ZipWindow().
  4368.  
  4369.         - IDCMP_MENUHELP is new for V37.  If you specify the WA_MenuHelp
  4370.           tag when you open your window, then when the user presses the
  4371.           HELP key on the keyboard during a menu session, Intuition will
  4372.           terminate the menu session and issue this even in place of an
  4373.           IDCMP_MENUPICK message.
  4374.         - NEVER follow the NextSelect link for MENUHELP messages.
  4375.         - You will be able to hear MENUHELP for ghosted menus.
  4376.           (This lets you tell the user why the option is ghosted.)
  4377.         - Be aware that you can receive a MENUHELP message whose code
  4378.           corresponds to a menu header or an item that has sub-items
  4379.           (which does not happen for MENUPICK).  The code may also be
  4380.           MENUNULL.
  4381.         - LIMITATION:  if the user extend-selects some checkmarked
  4382.           items with the mouse, then presses MENUHELP, your
  4383.           application will only hear the MENUHELP report.  You
  4384.           must re-examine the state of your checkmarks when you
  4385.           get a MENUHELP.
  4386.         - Availability of MENUHELP in V36 is not directly
  4387.           controllable.  We apologize...
  4388.  
  4389.     Gadgets = the pointer to the first of a linked list of the your own 
  4390.           Gadgets which you want attached to this Window.  Can be NULL
  4391.           if you have no Gadgets of your own
  4392.  
  4393.        CheckMark = a pointer to an instance of the struct Image where can
  4394.           be found the imagery you want used when any of your
  4395.           menu items is to be checkmarked.  If you don't want to
  4396.           supply your own imagery and you want to just use 
  4397.           Intuition's own checkmark, set this argument to NULL
  4398.  
  4399.        Text = a null-terminated line of text to appear on the title bar of
  4400.           your window (may be null if you want no text)
  4401.  
  4402.        Type = the screen type for this window.  If this equal CUSTOMSCREEN,
  4403.           you must have already opened a CUSTOMSCREEN (see text above).
  4404.           Types available include:
  4405.           - WBENCHSCREEN
  4406.           - CUSTOMSCREEN
  4407.           - PUBLICSCREEN (new for V36, see text below)
  4408.  
  4409.        Screen = if your type is one of Intuition's standard screens, then
  4410.           this argument is ignored.  However, if Type == CUSTOMSCREEN,
  4411.           this must point to the structure of your own screen
  4412.  
  4413.        BitMap = if you have specified WFLG_SUPER_BITMAP as the type of
  4414.            refreshing you want for this window, then this value points to a
  4415.            instance of the struct bitmap.  However, if the refresh type
  4416.            is NOT WFLG_SUPER_BITMAP, this pointer is ignored.
  4417.  
  4418.        MinWidth, MinHeight, MaxWidth, MaxHeight = the size limits for this 
  4419.           window.  These must be reasonable values, which is to say that
  4420.           the minimums cannot be greater than the current size, nor can
  4421.           the maximums be smaller than the current size.  If they are,
  4422.           they're ignored.  Any one of these can be initialized to zero,
  4423.           which means that that limit will be set to the current
  4424.           dimension of that axis.  The limits can be changed after the
  4425.           Window is opened by calling the WindowLimits() routine.
  4426.  
  4427.           NOTE: ORIGINALLY, we stated that:
  4428.  
  4429.           "If you haven't requested the WFLG_SIZEGADGET option, these
  4430.           variables are ignored so you don't have to initialize them."
  4431.  
  4432.           It is now clear that a variety of programs take it upon
  4433.           themselves to call SizeWindow() (or ChangeWindowBox()) without
  4434.           your program's consent or consulting your WFLG_SIZEGADGE
  4435.           option.  To protect yourself against the results, we strongly
  4436.           urge that if you supply suitable values for these fields even
  4437.           if you do not specify WFLG_SIZEGADGET.
  4438.  
  4439.           The maximums may be LARGER than the current size, or even
  4440.           larger than the current screen.  The maximums should be set to
  4441.           the highest value your application can handle.  This allows
  4442.           users with larger display devices to take full advantage of
  4443.           your software.  If there is no good reason to limit the size,
  4444.           then don't.  -1 or ~0 indicates that the maximum size is only
  4445.           limited by the size of the window's screen.
  4446.  
  4447.           See also the docs on the function WindowLimits() for more
  4448.           information.
  4449.  
  4450.        Extension (New for V36) = a pointer to an array (or chain of arrays)
  4451.         of TagItems to specify additional parameters to OpenWindow().
  4452.         TagItems in general are described in utility/tagitem.h,
  4453.         and the OpenWindow tags are defined in intuition/intuition.h
  4454.         and described here.  For items pertaining to Public Screens
  4455.         and visitor windows, please see below.
  4456.  
  4457.     Here are the TagItem.ti_Tag values that are defined for OpenWindow
  4458.     (and OpenWindowTagList()).
  4459.  
  4460.     Certain tags simply override equivalent values in NewWindow,
  4461.     and allow you to open a window using OpenWindowTagList() without
  4462.     having a NewWindow structure at all.  In each case, cast
  4463.     the corresponding data to ULONG and put it in ti_Data.
  4464.  
  4465.     The compatible tag items include:
  4466.  
  4467.     WA_Left
  4468.     WA_Top
  4469.     WA_Width
  4470.     WA_Height
  4471.     WA_DetailPen
  4472.     WA_BlockPen
  4473.     WA_IDCMP
  4474.     WA_Flags    - initial values for Flags before looking at other
  4475.             Boolean component Tag values
  4476.     WA_Gadgets
  4477.     WA_Checkmark
  4478.     WA_Title
  4479.     WA_CustomScreen - also implies CUSTOMSCREEN property
  4480.     WA_SuperBitMap - also implies WFLG_SUPER_BITMAP refresh mode.
  4481.     WA_MinWidth
  4482.     WA_MinHeight
  4483.     WA_MaxWidth
  4484.     WA_MaxHeight
  4485.  
  4486.     These Boolean tag items are alternatives to the NewWindow.Flags
  4487.     Boolean attributes with similar names.
  4488.  
  4489.     WA_SizeGadget        - equivalent to WFLG_SIZEGADGET
  4490.     WA_DragBar        - equivalent to WFLG_DRAGBAR
  4491.     WA_DepthGadget        - equivalent to WFLG_DEPTHGADGET
  4492.     WA_CloseGadget        - equivalent to WFLG_CLOSEGADGET
  4493.     WA_Backdrop        - equivalent to WFLG_BACKDROP
  4494.     WA_ReportMouse        - equivalent to WFLG_REPORTMOUSE
  4495.     WA_NoCareRefresh     - equivalent to WFLG_NOCAREREFRESH
  4496.     WA_Borderless        - equivalent to WFLG_BORDERLESS
  4497.     WA_Activate        - equivalent to WFLG_ACTIVATE
  4498.     WA_RMBTrap        - equivalent to WFLG_RMBTRAP
  4499.     WA_WBenchWindow        - equivalent to WFLG_WBENCHWINDOW
  4500.                   (system PRIVATE)
  4501.     WA_SimpleRefresh     - only specify if TRUE
  4502.     WA_SmartRefresh     - only specify if TRUE
  4503.     WA_SizeBRight        - equivalent to WFLG_SIZEBRIGHT
  4504.     WA_SizeBBottom        - equivalent to WFLG_SIZEBBOTTOM
  4505.     WA_GimmeZeroZero     - equivalent to WFLG_GIMMEZEROZERO
  4506.  
  4507.     The following tag items specify new attributes of a window.
  4508.  
  4509.     WA_ScreenTitle - You can specify the screen title associated
  4510.         with your window this way, and avoid a call to SetWindowTitles()
  4511.         when your window opens.
  4512.  
  4513.     WA_AutoAdjust - a Boolean attribute which says that it's OK
  4514.         to move or even shrink the dimensions of this window
  4515.         to fit it on the screen, within the dimension
  4516.         limits specified by MinWidth and MinHeight.
  4517.         Someday, this processing might be sensitive to the
  4518.         currently visible portion of the screen the window
  4519.         will be opening on, so don't draw too many conclusions
  4520.         about the auto-adjust algorithms.
  4521.         (Normally, this attribute defaults to FALSE.  However,
  4522.         if you call OpenWindowTags() or OpenWindowTagList()
  4523.         with a NULL NewWindow pointer, this attribute defaults
  4524.         to TRUE).
  4525.  
  4526.     WA_InnerWidth
  4527.     WA_InnerHeight - You can specify the dimensions of the interior
  4528.         region of your window, independent of what the border
  4529.         thicknesses will be.  You probably want to specify
  4530.         WA_AutoAdjust to allow Intuition to move your window
  4531.         or even shrink it so that it is completely on screen.
  4532.  
  4533.         Note: using these tags puts some reasonable restrictions
  4534.         on the gadgets you can specify as "border" gadgets when
  4535.         you open your window.  Since border gadgets determine
  4536.         the border dimensions and hence the overall dimensions of
  4537.         your window, those dimensions cannot be used calculating
  4538.         the position or dimensions of border gadgets.
  4539.  
  4540.         Here's the complete list of restrictions:
  4541.         - GACT_LEFTBORDER gadgets cannot be GFLG_RELWIDTH if
  4542.           WA_InnerWidth is used.
  4543.         - GACT_RIGHTBORDER gadgets MUST be GFLG_RELRIGHT if
  4544.           WA_InnerWidth is used.
  4545.         - GACT_TOPBORDER gadgets cannot be GFLG_RELHEIGHT if
  4546.           WA_InnerHeight is used.
  4547.         - GACT_BOTTOMBORDER gadgets MUST be GFLG_RELBOTTOM if
  4548.           WA_InnerHeight is used.
  4549.  
  4550.     WA_PubScreenName - This tag item declares that you want your window
  4551.         to open as a visitor window on the public screen whose name
  4552.         is pointed to by (UBYTE *) ti_Data.
  4553.  
  4554.     WA_PubScreen - Open as a visitor window on the public screen
  4555.         whose address if provided as (struct Screen *) ti_Data.
  4556.         To ensure that this screen remains open long enough, you
  4557.         must either:
  4558.         1) Be the screen's owner
  4559.         2) have another window already open on the screen
  4560.         3) use LockPubScreen()
  4561.         Using exec.library/Forbid() is not sufficient.
  4562.  
  4563.         You can provide ti_Data to be NULL (zero), without any
  4564.         of the above precautions, to specify the default public screen.
  4565.  
  4566.     WA_PubScreenFallBack - This Boolean attribute specifies that a
  4567.         visitor window should "fall back" to opening on the default
  4568.         public screen if the explicitly specify public screen is not
  4569.         available.
  4570.  
  4571.     WA_WindowName - this visionary specification of a window
  4572.         rendezvous name string is not yet implemented.
  4573.  
  4574.     WA_Colors - this equally great idea about associating a palette
  4575.         specification with the active window may not ever be implemented.
  4576.  
  4577.     WA_Zoom - ti_Data points to an array of four WORD's to be used
  4578.         as the initial Left/Top/Width/Height of the "alternate
  4579.         Zoom position and dimensions."  The presence of this tag
  4580.         item implies that you want a Zoom gadget, even though you
  4581.         might not have a sizing gadget.
  4582.  
  4583.     WA_MouseQueue - This tag specifies a limit for the number
  4584.         of outstanding IDCMP_MOUSEMOVE IntuiMessages that Intuition
  4585.         will send to your window.  You can change the value of this
  4586.         limit after the window is open using SetMouseQueue().
  4587.  
  4588.     WA_RptQueue - This tag specifies a limit for the number of
  4589.         outstanding repeated-IDCMP_RAWKEY, repeated-IDCMP_VANILLAKEY,
  4590.         and repeated-IDCMP_IDCMPUPDATE IntuiMessages that Intuition will
  4591.         send to your window.  Currently, there is no function to adjust
  4592.         the repeat-key queue.
  4593.  
  4594.     WA_BackFill - ti_Data is a pointer to a Hook structure that
  4595.         the Layers library will call when your window needs
  4596.         "backfilling."  See layers.library/InstallLayerHook().
  4597.  
  4598.      WA_MenuHelp - ti_Data is a boolean.  If true, enables the MenuHelp
  4599.         feature for this window.  See IDCMP_MENUHELP above.  (Ignored
  4600.         in V36 and earlier).
  4601.  
  4602.    NOTES
  4603.     Regarding Public Screens, you can specify a window to be a 
  4604.     "visitor window" on a public screen in one of several ways.
  4605.     In each case, you must be sure not to specify a NewWindow
  4606.     type of CUSTOMSCREEN.  You should use the value PUBLICSCREEN.
  4607.  
  4608.     There are actually several ways you can specify which screen
  4609.     you want a visitor window to be opened on:
  4610.  
  4611.         1) Specify the name of the public screen WA_PubScreenName,
  4612.         or a NULL pointer, in ti_Data.  The name might have been
  4613.         provided by the user.  A NULL pointer means to use the
  4614.         default public screen.
  4615.  
  4616.         If the named screen cannot be found, the default public screen
  4617.         will be used if the Boolean attribute WA_PubScreenFallBack
  4618.         is TRUE.
  4619.  
  4620.         2) Specify a pointer to a public screen using the
  4621.         WA_PubScreen tag item.  The WA_PubScreenFallBack
  4622.         attribute has no effect.  You can specify the default
  4623.         public screen by providing a NULL pointer.
  4624.  
  4625.         You can also specify the pointer by setting NewWindow.Type
  4626.         to PUBLICSCREEN, and specifying the public screen pointer
  4627.         in NewWindow.Screen.  The WA_PubScreen tag item has precedent
  4628.         over this technique.
  4629.  
  4630.         Unless NULL, the screen pointer provided MUST be a valid
  4631.         public screen.  You may ensure this several ways:
  4632.  
  4633.         - Be the owner of the screen.
  4634.         - Have a window already open on the screen.
  4635.         - Use LockPubScreen() to prevent the screen from closing.
  4636.         - specifying the WFLG_VISITOR bit in NewWindow.Flags is not
  4637.           supported.
  4638.  
  4639.         It is anticipated that the last will be the most common method
  4640.         of opening public screens because you often want to examine
  4641.         properties of the screen your window will be using in order
  4642.         to compensate for differences in dimension, depth, and font.
  4643.  
  4644.         The standard sequence for this method is as follows:
  4645.         LockPubScreen()    - obtain a pointer and a promise
  4646.         layout window    - adapt your window to the screen you will use
  4647.         OpenWindow()    - using the pointer you specify
  4648.         UnlockPubScreen()    - once your window is open, you can let go
  4649.                   of the lock on the public screen
  4650.         ... normal window even processing ...
  4651.         CloseWindow().
  4652.  
  4653.     Regarding "service" windows, such as those opened for a system
  4654.     requester or file requester associated with a given "client"window.
  4655.     These windows should NOT be "visitor" windows.  Open them
  4656.     using NewWindow.Type = CUSTOMSCREEN and NewWindow.Screen
  4657.     equal to the screen of the client window (window->WScreen).
  4658.     You can also use WA_CustomScreen, which has precedence.
  4659.  
  4660.     This ensures that the requester service window will be allowed to
  4661.     open on the same screen as the client window, even if that
  4662.     screen is not a public screen, or has private status.
  4663.  
  4664.     This has an implication for service/client protocol: when you
  4665.     pass a window pointer to any system requester routine or
  4666.     to a routine which creates some other other service window,
  4667.     you MUST keep your window open until the client window
  4668.     is closed.
  4669.  
  4670.     If a requester service will allow a NULL client window, this
  4671.     should indicate to open the service window on the default public
  4672.     screen (probably Workbench).  The correct way to get a pointer 
  4673.     to this screen is to call LockPubScreen( NULL ).  In this
  4674.     case, you want to open as a visitor window, which means you
  4675.     should use either PUBLICSCREEN or WA_PubScreen, described above.
  4676.     You should call UnlockPubScreen() after your visitor window is open.
  4677.  
  4678.     As of V36, gadgets in the right and bottom border
  4679.     (specified with GACT_RIGHTBORDER and GACT_BOTTOMBORDER) only
  4680.     contribute to the dimensions of the borders if they are also
  4681.     GFLG_RELRIGHT and GFLG_RELBOTTOM, respectively.
  4682.  
  4683.     RESULT
  4684.     If all is well, returns the pointer to your new Window
  4685.     If anything goes wrong, returns NULL
  4686.  
  4687.     BUGS
  4688.     When you open a window, Intuition will set the font of
  4689.     the window's RastPort to the font of the window's screen.
  4690.     This does not work right for GimmeZeroZero windows: the
  4691.     BorderRPort RastPort has the font set correctly, but
  4692.     Window.RPort is set up with the system default font.
  4693.     For compatibility reasons, we won't be fixing this problem.
  4694.  
  4695.     Also, there is a compatibility trick going on with the
  4696.     default font of your window's RastPort if the screen's
  4697.     font is "fancy."  See the SA_SysFont attribute described
  4698.     under OpenScreen().
  4699.  
  4700.     Unless you arrange otherwise, each window you open will allocate
  4701.     a signal for your task from the 16 "user signals."
  4702.     If no signal is available, your window will not be able
  4703.     to be opened.  In early V36 versions and before, Intuition didn't
  4704.     check this condition, but just left you with an unusable port.
  4705.  
  4706.     SEE ALSO
  4707.        OpenWindowTagList(), OpenScreen(), ModifyIDCMP(), SetWindowTitles(),
  4708.     LockPubScreen(), SetDefaultPubScreen(), ZipWindow(),
  4709.     layers.library/InstallLayerHook(), SetPubScreenModes()
  4710. intuition.library/OpenWindowTagList       intuition.library/OpenWindowTagList
  4711.  
  4712.    NAME    
  4713.     OpenWindowTagList -- OpenWindow() with TagItem extension. (V36)
  4714.     OpenWindowTags -- Varargs stub for OpenWindowTagList (V36)
  4715.  
  4716.    SYNOPSIS
  4717.     Window = OpenWindowTagList( NewWindow, TagItems )
  4718.     D0                  A0         A1
  4719.  
  4720.     struct Window *OpenWindowTagList( struct NewWindow *,
  4721.         struct TagItem * );
  4722.  
  4723.     Window = OpenWindowTags( NewWindow, Tag1, ... )
  4724.  
  4725.     struct Window *OpenWindowTags( struct NewWindow *, ULONG, ... );
  4726.  
  4727.    FUNCTION
  4728.     A variation of OpenWindow() that allow direct specification of
  4729.     a TagItem array of extension data.  Recommended over using the
  4730.     ExtNewWindow.Extension field.
  4731.  
  4732.     If you omit the NewWindow (pass NULL), a set of defaults
  4733.     are used, and overridden by the tag items.  Even without
  4734.     any tag items at all, a reasonable window opens on the Workbench
  4735.     or default public screen.
  4736.  
  4737.     See OpenWindow() for all the details.
  4738.  
  4739.    INPUTS
  4740.      NewWindow - (optional) pointer to a NewWindow structure.
  4741.     TagItems - (optional) pointer to TagItem array, with tag
  4742.         values as described under the description for
  4743.         OpenWindow().
  4744.  
  4745.    RESULT
  4746.      Window - newly created window, per your specifications.
  4747.  
  4748.    EXAMPLE
  4749.     See OpenScreenTagList() for an example of how to create
  4750.     a "varargs" version of this function for convenient C
  4751.     language programming.
  4752.  
  4753.    NOTES
  4754.     
  4755.  
  4756.    BUGS
  4757.     
  4758.  
  4759.    SEE ALSO
  4760.     OpenWindow()
  4761.  
  4762. intuition.library/OpenWorkBench               intuition.library/OpenWorkBench
  4763.  
  4764.     NAME 
  4765.     OpenWorkBench -- Open the Workbench screen.
  4766.  
  4767.     SYNOPSIS 
  4768.     WBScreen = OpenWorkBench()
  4769.     D0
  4770.  
  4771.     ULONG OpenWorkBench( VOID );
  4772.  
  4773.     FUNCTION 
  4774.     This routine attempts to reopen the Workbench.  The actions taken are: 
  4775.         - general good stuff and nice things, and then return a non-null
  4776.           pointer to the Workbench screen.
  4777.         - find that something has gone wrong, and return NULL
  4778.  
  4779.     The return value, if not NULL, is indeed the address of the Workbench
  4780.     screen, although you should not use it as such.  This is because the
  4781.     Workbench may be closed by other programs, which can invalidate
  4782.     the address at any time.  We suggest that you regard the return
  4783.     value as a ULONG indication that the routine has succeeded, if
  4784.     you pay any attention to it at all.
  4785.  
  4786.     INPUTS 
  4787.     None 
  4788.  
  4789.     RESULT 
  4790.     non-zero if Workbench screen opened successfully, or was already
  4791.         opened 
  4792.     zero if anything went wrong and the Workbench screen isn't out there 
  4793.  
  4794.     BUGS 
  4795.     The name of this routine is spelled wrong: it ought to have been
  4796.     OpenWorkbench().
  4797.  
  4798.     SEE ALSO 
  4799.     
  4800. intuition.library/PointInImage                 intuition.library/PointInImage
  4801.  
  4802.    NAME    
  4803.     PointInImage -- Tests whether an image "contains" a point. (V36)
  4804.  
  4805.    SYNOPSIS
  4806.     DoesContain = PointInImage( Point, Image )
  4807.     D0                  D0     A0
  4808.     
  4809.     BOOL PointInImage( struct Point, struct Image * );
  4810.  
  4811.    FUNCTION
  4812.     Tests whether a point is properly contained in an image.
  4813.     The intention of this is to provide custom gadgets a means
  4814.     to delegate "image mask" processing to the Image, where
  4815.     it belongs (superceding things like BOOLMASK).  After all,
  4816.     a rounded rect image with a drop shadow knows more about
  4817.     what points are inside it than anybody else should.
  4818.  
  4819.     For traditional Intuition Images, this routine checks if
  4820.     the point is in the Image box (LeftEdge/RightEdge/Width/Height).
  4821.  
  4822.    INPUTS
  4823.      Point    - Two words, X/Y packed into a LONG, with high word
  4824.         containing 'X'.  This is what you get if you pass
  4825.         a Point structure (not a pointer!) using common
  4826.         C language parameter conventions.
  4827.     Image - a pointer to a standard or custom Image data object.
  4828.         NOTE: If 'Image' is NULL, this function returns TRUE.
  4829.  
  4830.    RESULT
  4831.      DoesContain - Boolean result of the test.
  4832.  
  4833.    EXAMPLE
  4834.     
  4835.  
  4836.    NOTES
  4837.     
  4838.  
  4839.    BUGS
  4840.     Only applies to the first image, does not follow NextImage
  4841.     linked list.  This might be preferred.
  4842.  
  4843.    SEE ALSO
  4844.     
  4845.  
  4846. intuition.library/PrintIText                     intuition.library/PrintIText
  4847.  
  4848.     NAME
  4849.     PrintIText -- Print text described by the IntuiText argument.
  4850.  
  4851.     SYNOPSIS
  4852.     PrintIText( RastPort, IText, LeftOffset, TopOffset )
  4853.             A0        A1     D0          D1
  4854.  
  4855.     VOID PrintIText( struct RastPort *, struct IntuiText *, WORD, WORD );
  4856.  
  4857.     FUNCTION
  4858.     Prints the IntuiText into the specified RastPort.  Sets up the RastPort
  4859.     as specified by the IntuiText values, then prints the text into the
  4860.     RastPort at the IntuiText x/y coordinates offset by the left/top 
  4861.     arguments.  Note, though, that the IntuiText structure itself
  4862.     may contain further text position coordinates: those coordinates
  4863.     and the Left/TopOffsets are added to obtain the true position of
  4864.     the text to be rendered.
  4865.  
  4866.     This routine does window layer clipping as appropriate -- if you 
  4867.     print text outside of your window, your characters will be 
  4868.     clipped at the window's edge, providing you pass your window's
  4869.     (layered) RastPort.
  4870.  
  4871.     If the NextText field of the IntuiText argument is non-NULL, 
  4872.     the next IntuiText is rendered as well, and so on until some
  4873.     NextText field is NULL.
  4874.     
  4875.     IntuiText with the ITextFont field NULL are displayed in the
  4876.     font of the RastPort.  If the RastPort font is also NULL, the
  4877.     system default font, as set via the Preferences tool, will be used.
  4878.  
  4879.     INPUTS
  4880.     RastPort = the RastPort destination of the text
  4881.     IText = pointer to an instance of the structure IntuiText
  4882.     LeftOffset = left offset of the IntuiText into the RastPort
  4883.     TopOffset = top offset of the IntuiText into the RastPort
  4884.  
  4885.     RESULT
  4886.     None
  4887.  
  4888.     BUGS
  4889.  
  4890.     SEE ALSO
  4891.     
  4892. intuition.library/PubScreenStatus           intuition.library/PubScreenStatus
  4893.  
  4894.     NAME
  4895.     PubScreenStatus -- Change status flags for a public screen. (V36)
  4896.  
  4897.     SYNOPSIS
  4898.     ResultFlags = PubScreenStatus( Screen, StatusFlags )
  4899.     D0                      A0      D0
  4900.  
  4901.     UWORD PubScreenStatus( struct Screen *, UWORD );
  4902.  
  4903.     FUNCTION
  4904.     Changes status flags for a given public screen.
  4905.  
  4906.     Do not apply this function to a screen if your program
  4907.     isn't the screen's "owner", in particular, don't call
  4908.     this function for the Workbench screen.
  4909.  
  4910.     INPUTS
  4911.     Screen = pointer to public screen
  4912.     StatusFlags = values currently:
  4913.       PSNF_PRIVATE: make this screen unavailable to visitor windows
  4914.  
  4915.     RESULT
  4916.     Returns 0 in the lowest order bit of the return value
  4917.     if the screen wasn't public, or because it can not be taken
  4918.     private because visitors are open in it.
  4919.  
  4920.     All other bits in the return code are reserved for future
  4921.     enhancement.
  4922.  
  4923.     BUGS
  4924.  
  4925.     SEE ALSO
  4926.     OpenScreen(), Intuition V36 update documentation    
  4927. intuition.library/QueryOverscan               intuition.library/QueryOverscan
  4928.  
  4929.     NAME
  4930.     QueryOverscan -- Inquire about a standard overscan region. (V36)
  4931.  
  4932.     SYNOPSIS
  4933.     success = QueryOverscan( DisplayID, Rect, OScanType )
  4934.     D0                       A0         A1    D0
  4935.  
  4936.     LONG QueryOverscan( ULONG, struct Rectangle *, WORD );
  4937.  
  4938.     FUNCTION
  4939.     This function fills in a rectangle with one of the system
  4940.     overscan dimensions, scaled appropriately for the mode of
  4941.     the DisplayID it is passed.
  4942.  
  4943.     There are three types of system overscan values:
  4944.     OSCAN_TEXT: completely visible, by user preference.  Used
  4945.       for Workbench screen and screen dimensions STDSCREENWIDTH
  4946.       and STDSCREENHEIGHT.  Left/Top is always 0,0.
  4947.     OSCAN_STANDARD: just beyond visible bounds of monitor, by
  4948.       user preference.  Left/Top may be negative.
  4949.     OSCAN_MAX: The largest region we can display, AND display
  4950.       any smaller region (see note below).
  4951.     OSCAN_VIDEO: The absolute largest region that the graphics.library
  4952.       can display.  This region must be used as-is.
  4953.     
  4954.  
  4955.     INPUTS
  4956.     DisplayID -- A 32-bit identifier for a display mode, as
  4957.       defined in graphics/displayinfo.h.
  4958.  
  4959.       NOTE: If you only intend to use one of the four standard
  4960.       overscan dimensions as is, and open your screen to exactly
  4961.       the DisplayClip dimensions, you can specify one of
  4962.       the OSCAN_ values in the ExtNewScreen tag SA_StdDClip,
  4963.       and specify STDSCREENWIDTH and STDSCREENHEIGHT as the
  4964.       dimensions to more easily open up an overscanned screen
  4965.       (or use no NewScreen in OpenScreenTagList() and accept
  4966.       the default standard screen dimensions).
  4967.     
  4968.     Rect -- pointer to a Rectangle structure which this function
  4969.       will fill out with its return values.  Note that to convert
  4970.       a rectangle to a screen "Height" you do (MaxY - MinY + 1), and
  4971.       similarly for "Width."  The rectangle may be passed directly
  4972.       to OpenScreen() as a DisplayClip region (SA_DClip).
  4973.  
  4974.     RESULT
  4975.     0 (FALSE) if the MonitorSpec your NewScreen requests
  4976.     does not exist.  Non-zero (TRUE) if it does.
  4977.     
  4978.     BUGS
  4979.     Change in parameter V36.A17 might cause problems for some.
  4980.  
  4981.     SEE ALSO
  4982.     OpenScreen(), Intuition V36 update documentation
  4983. intuition.library/RefreshGadgets             intuition.library/RefreshGadgets
  4984.  
  4985.     NAME
  4986.     RefreshGadgets -- Refresh (redraw) the gadget display.
  4987.  
  4988.     SYNOPSIS
  4989.     RefreshGadgets( Gadgets, Window, Requester )
  4990.                 A0       A1      A2
  4991.  
  4992.     VOID RefreshGadgets( struct Gadget *, struct Window *,
  4993.         struct Requester * );
  4994.  
  4995.     FUNCTION
  4996.     Refreshes (redraws) all of the gadgets in the gadget list starting
  4997.     from the specified gadget.  
  4998.  
  4999.     The window parameter must point to the window which contains the
  5000.     gadget, or which contains the requester that contains the gadget
  5001.     The requester parameter must only be valid if the gadget has the
  5002.     GTYP_REQGADGET flag set, a requirement for all requester gadgets.
  5003.  
  5004.     The Pointer argument points to a Window structure.
  5005.  
  5006.     The two main reasons why you might want to use this routine are:  
  5007.     first, that you've modified the imagery of the gadgets in your 
  5008.     display and you want the new imagery to be displayed; secondly, 
  5009.     if you think that some graphic operation you just performed 
  5010.     trashed the gadgetry of your display, this routine will refresh 
  5011.     the imagery for you.  
  5012.  
  5013.     Note that to modify the imagery of a gadget, you must first remove
  5014.     that gadget from the window's gadget list, using RemoveGadget() (or
  5015.     RemoveGList()).  After changing the image, border, text (including
  5016.     text for a string gadget), the gadget is replaced in the gadget list
  5017.     (using AddGadget() or AddGList()).  Adding gadgets does not cause
  5018.     them to be displayed (refreshed), so this function, or RefreshGList()
  5019.     is typically called.
  5020.  
  5021.     A common technique is to set or reset the GFLG_SELECTED flag of a 
  5022.     Boolean gadget and then call RefreshGadgets() to see it displayed
  5023.     highlighted if and only if GFLG_SELECTED is set.  If you wish to do
  5024.     this and be completely proper, you must RemoveGadget(), change the
  5025.     GFLG_SELECTED flag, AddGadget(), and RefreshGadgets(), or the
  5026.     equivalent.
  5027.  
  5028.     The gadgets argument can be a copy of the FirstGadget variable in 
  5029.     the Window structure that you want refreshed:  
  5030.     the effect of this will be that all gadgets will be redrawn.  
  5031.     However, you can selectively refresh just some of the gadgets 
  5032.     by starting the refresh part-way into the list:  for instance, 
  5033.     redrawing your window non-GTYP_GZZGADGET gadgets only, which you've 
  5034.     conveniently grouped at the end of your gadget list.  
  5035.  
  5036.     Even more control is available using the RefreshGList() routine which
  5037.     enables you to refresh a single gadget, or number of your choice.
  5038.  
  5039.     NOTE:  It's never safe to tinker with the gadget list yourself.  Don't
  5040.     supply some gadget list that Intuition hasn't already processed in
  5041.     the usual way.
  5042.  
  5043.     INPUTS
  5044.     Gadgets = pointer to the first in the list of gadgets wanting
  5045.         refreshment
  5046.     Window = pointer to the window containing the gadget or its requester
  5047.     Requester = pointer to a requester (ignored if gadget is not attached
  5048.         to a requester).
  5049.  
  5050.     RESULT
  5051.     None
  5052.  
  5053.     BUGS
  5054.  
  5055.     SEE ALSO
  5056.     RefreshGList(), RemoveGadget(), RemoveGList(), AddGadget(), AddGList()
  5057. intuition.library/RefreshGList                 intuition.library/RefreshGList
  5058.  
  5059.     NAME
  5060.     RefreshGList -- Refresh (redraw) a chosen number of gadgets.
  5061.  
  5062.     SYNOPSIS
  5063.     RefreshGList( Gadgets, Window, Requester, NumGad )
  5064.               A0       A1      A2         D0
  5065.  
  5066.     VOID RefreshGList( struct Gadget *, struct Window *,
  5067.         struct Requester *, WORD );
  5068.  
  5069.     FUNCTION
  5070.     Refreshes (redraws) gadgets in the gadget list starting
  5071.     from the specified gadget.  At most NumGad gadgets are redrawn.
  5072.     If NumGad is -1, all gadgets until a terminating NULL value
  5073.     in the NextGadget field is found will be refreshed, making this
  5074.     routine a superset of RefreshGadgets().
  5075.  
  5076.     The Requester parameter can point to a Requester structure.  If 
  5077.     the first gadget in the list has the GTYP_REQGADGET flag set, the 
  5078.     gadget list refers to gadgets in a requester and the pointer 
  5079.     must necessarily point to a window.  If these are not the gadgets 
  5080.     of a requester, the requester argument may be NULL.  
  5081.  
  5082.     Be sure to see the RefreshGadgets() function description, as this
  5083.     function is simply an extension of that.
  5084.    
  5085.     INPUTS
  5086.     Gadgets = pointer to the first in the list of gadgets wanting
  5087.         refreshment
  5088.     Window = pointer to the window containing the gadget or its requester
  5089.     Requester = pointer to a requester (ignored if Gadget is not attached
  5090.         to a Requester).
  5091.     NumGad  = maximum number of gadgets to be refreshed.  A value of -1
  5092.       will cause all gadgets to be refreshed from gadget to the
  5093.       end of the list.  A value of -2 will also do this, but if 'Gadgets'
  5094.       points to a Requester Gadget (GTYP_REQGADGET) ALL gadgets in the
  5095.       requester will be refreshed (this is a mode compatible with v1.1
  5096.       RefreshGadgets().)
  5097.  
  5098.     RESULT
  5099.     None
  5100.  
  5101.     BUGS
  5102.  
  5103.     SEE ALSO
  5104.     RefreshGadgets()
  5105. intuition.library/RefreshWindowFrame     intuition.library/RefreshWindowFrame
  5106.  
  5107.     NAME
  5108.     RefreshWindowFrame -- Ask Intuition to redraw your window border.
  5109.  
  5110.     SYNOPSIS
  5111.     RefreshWindowFrame( Window )
  5112.                 A0
  5113.  
  5114.     VOID RefreshWindowFrame( struct Window * );
  5115.  
  5116.     FUNCTION
  5117.     Refreshes the border of a window, including title region and all
  5118.     of the window's gadgets.
  5119.  
  5120.     You may use this call if you wish to update the display of your borders.
  5121.     The expected use of this is to correct unavoidable corruption.
  5122.  
  5123.     INPUTS
  5124.     Window = a pointer to a Window structure
  5125.  
  5126.     RESULT
  5127.     None
  5128.  
  5129.     BUGS
  5130.  
  5131.     SEE ALSO
  5132.    
  5133. intuition.library/ReleaseGIRPort             intuition.library/ReleaseGIRPort
  5134.  
  5135.     NAME
  5136.     ReleaseGIRPort -- Release a custom gadget RastPort. (V36)
  5137.  
  5138.     SYNOPSIS
  5139.     ReleaseGIRPort( RPort )
  5140.             A0
  5141.  
  5142.     VOID ReleaseGIRPort( struct RastPort * );
  5143.  
  5144.     FUNCTION
  5145.     The corresponding function to ObtainGIRPort(), it releases
  5146.     arbitration used by Intuition for gadget RastPorts.
  5147.  
  5148.     INPUTS
  5149.     Pointer to the RastPort returned by ObtainGIRPort().
  5150.     This pointer can be NULL, in which case nothing happens.
  5151.  
  5152.     RESULT
  5153.     None
  5154.  
  5155.     BUGS
  5156.  
  5157.     SEE ALSO
  5158.     ObtainGIRPort(), Custom Gadget documentation
  5159. intuition.library/RemakeDisplay               intuition.library/RemakeDisplay
  5160.  
  5161.     NAME
  5162.     RemakeDisplay -- Remake the entire Intuition display.
  5163.  
  5164.     SYNOPSIS
  5165.     RemakeDisplay()
  5166.  
  5167.     VOID RemakeDisplay( VOID );
  5168.  
  5169.     FUNCTION
  5170.     This is the big one.
  5171.  
  5172.     This procedure remakes the entire View structure for the 
  5173.     Intuition display.  It does the equivalent of MakeScreen() for
  5174.     every screen in the system, and then it calls the internal
  5175.     equivalent of RethinkDisplay().
  5176.    
  5177.     WARNING:  This routine can take many milliseconds to run, so
  5178.     do not use it lightly. 
  5179.  
  5180.     Calling MakeScreen() followed by RethinkDisplay() is typically
  5181.     a more efficient method for affecting changes to a single
  5182.     screen's ViewPort.
  5183.  
  5184.     INPUTS
  5185.     None
  5186.  
  5187.     RESULT
  5188.     None
  5189.  
  5190.     BUGS
  5191.  
  5192.     SEE ALSO
  5193.     MakeScreen(), RethinkDisplay(), graphics.library/MakeVPort()
  5194.     graphics.library/MrgCop(), graphics.library/LoadView()
  5195. intuition.library/RemoveClass                   intuition.library/RemoveClass
  5196.  
  5197.     NAME
  5198.     RemoveClass -- Make a public boopsi class unavailable. (V36)
  5199.  
  5200.     SYNOPSIS
  5201.     RemoveClass( classPtr )
  5202.              A0
  5203.  
  5204.     VOID RemoveClass( struct IClass * );
  5205.  
  5206.     FUNCTION
  5207.     Makes a public class unavailable for public consumption.
  5208.     It's OK to call this function for a class which is not
  5209.     yet in the internal public class list, or has been
  5210.     already removed.
  5211.     
  5212.     INPUTS
  5213.     ClassPtr = pointer to *public* class created by MakeClass(),
  5214.         may be NULL.
  5215.  
  5216.     RESULT
  5217.     None.
  5218.     
  5219.     NOTES
  5220.  
  5221.     BUGS
  5222.  
  5223.     SEE ALSO
  5224.     MakeClass(), FreeClass(), AddClass()
  5225.     Document "Basic Object-Oriented Programming System for Intuition"
  5226.     and the "boopsi Class Reference" document.
  5227.     
  5228. intuition.library/RemoveGadget                 intuition.library/RemoveGadget
  5229.  
  5230.     NAME
  5231.     RemoveGadget -- Remove a gadget from a window.
  5232.  
  5233.     SYNOPSIS
  5234.     Position = RemoveGadget( Window, Gadget )
  5235.     D0             A0      A1
  5236.  
  5237.     UWORD RemoveGadget( struct Window *, struct Gadget * );
  5238.  
  5239.     FUNCTION
  5240.     Removes the given gadget from the gadget list of the specified 
  5241.     window.  Returns the ordinal position of the removed gadget.
  5242.  
  5243.     If the gadget is in a requester attached the the window, this
  5244.     routine will look for it and remove it if it is found.
  5245.  
  5246.     If the gadget pointer points to a gadget that isn't in the
  5247.     appropriate list, -1 is returned.  If there aren't any gadgets in the 
  5248.     list, -1 is returned.  If you remove the 65535th gadget from the list
  5249.     -1 is returned.
  5250.  
  5251.     NOTES
  5252.     New with V37: If one of the gadgets you wish to remove
  5253.     is the active gadget, this routine will wait for the user
  5254.     to release the mouse button before deactivating and removing
  5255.     the gadget.
  5256.  
  5257.     INPUTS
  5258.     Window = pointer to the window containing the gadget or the requester
  5259.         containing the gadget to be removed.
  5260.     Gadget = pointer to the gadget to be removed.  The gadget itself
  5261.         describes whether this is a gadget that should be removed from the
  5262.         window or some requester.
  5263.  
  5264.     RESULT
  5265.     Returns the ordinal position of the removed gadget.  If the gadget
  5266.     wasn't found in the appropriate list, or if there are no gadgets in
  5267.     the list, returns -1.
  5268.  
  5269.     BUGS
  5270.  
  5271.     SEE ALSO
  5272.     AddGadget(), AddGList(), RemoveGList()
  5273. intuition.library/RemoveGList                   intuition.library/RemoveGList
  5274.  
  5275.     NAME
  5276.     RemoveGList -- Remove a sublist of gadgets from a window.
  5277.  
  5278.     SYNOPSIS
  5279.     Position = RemoveGList( Window, Gadget, Numgad )
  5280.     D0            A0    A1    D0
  5281.  
  5282.     UWORD RemoveGList( struct Window *, struct Gadget *, WORD );
  5283.  
  5284.     FUNCTION
  5285.     Removes 'Numgad' gadgets from the gadget list of the specified 
  5286.     window.  Will remove gadgets from a requester if the first
  5287.     gadget's GadgetType flag GTYP_REQGADGET is set.
  5288.  
  5289.     Otherwise identical to RemoveGadget().
  5290.  
  5291.     NOTE
  5292.     The last gadget in the list does NOT have its link zeroed.
  5293.     New with V36: OK, last gadget's NextGadget field is set to NULL.
  5294.     
  5295.     New with V37: If one of the gadgets you wish to remove
  5296.     is the active gadget, this routine will wait for the user
  5297.     to release the mouse button before deactivating and removing
  5298.     the gadget.
  5299.  
  5300.     INPUTS
  5301.     Window = pointer to the window containing the gadget or the requester
  5302.         containing the gadget to be removed.
  5303.     Gadget = pointer to the gadget to be removed.  The gadget itself
  5304.            describes whether this is a gadget that should be removed 
  5305.            from the window or some requester.
  5306.     Numgad = number of gadgets to be removed.  If -1, remove all gadgets
  5307.         to end of window gadget list
  5308.  
  5309.     RESULT
  5310.     Returns the ordinal position of the removed gadget.  If the gadget
  5311.     wasn't found in the appropriate list, or if there are no gadgets in
  5312.     the list, returns -1.
  5313.  
  5314.     BUGS
  5315.  
  5316.     SEE ALSO
  5317.     RemoveGadget(), AddGadget(), AddGList()
  5318. intuition.library/ReportMouse                   intuition.library/ReportMouse
  5319.     NAME
  5320.     ReportMouse -- Tell Intuition whether to report mouse movement.
  5321.  
  5322.     SYNOPSIS
  5323.     ReportMouse( Boolean, Window )
  5324.              D0       A0    <-note
  5325.  
  5326.     VOID ReportMouse( BOOL, struct Window * );
  5327.  
  5328.     SPECIAL NOTE
  5329.     Some compilers and link files switch the arguments to this function
  5330.     about in unpredictable ways.  We apologize for this confusion
  5331.     wrapped around an error enclosing a mistake.
  5332.     The call will take one of two forms:
  5333.  
  5334.         ReportMouse(Boolean, Window);
  5335.             -or-
  5336.         ReportMouse(Window, (ULONG)Boolean);
  5337.  
  5338.     The first form is the one that corresponds to the amiga.lib supplied
  5339.     by Commodore.  The linker libraries and "pragmas" of some compilers
  5340.     supply the alternate form.
  5341.  
  5342.     A key point to remember is that the form of the function in ROM
  5343.     has always been the same, so there has always been object code
  5344.     compatibility.  However some care should be taken when switching
  5345.     compilers or switching between stubs and pragmas.
  5346.  
  5347.     From assembler the interface has always been:
  5348.         Boolean in D0, Window in A0
  5349.  
  5350.     Also, it is still endorsed to simply set the WFLG_REPORTMOUSE flag bit
  5351.     in Window->Flags, or reset it, on your own.  Make the operation
  5352.     an atomic assembly instruction (OR.W #WFLG_REPORTMOUSE,wd_Flags+2(A0)
  5353.     where A0 contains your window pointer).  Most compilers will produce
  5354.     an atomic operation when faced with:
  5355.             Window->Flags |= WFLG_REPORTMOUSE;
  5356.             Window->Flags &=~WFLG_REPORTMOUSE;
  5357.     or else bracket the operation between Forbid()/Permit().
  5358.  
  5359.     FUNCTION
  5360.     Tells Intuition whether or not to broadcast mouse-movement events to
  5361.     your window when it's the active one.  The Boolean value specifies
  5362.     whether to start or stop broadcasting position information of
  5363.     mouse-movement.  If the window is the active one, mouse-movement reports
  5364.     start coming immediately afterwards.  This same routine will change
  5365.     the current state of the GACT_FOLLOWMOUSE function of a
  5366.     currently-selected gadget too.  
  5367.  
  5368.     Note that calling ReportMouse() when a gadget is selected will only
  5369.     temporarily change whether or not mouse    movements are reported while
  5370.     that gadget remains selected; the next time the gadget is selected, its
  5371.     GACT_FOLLOWMOUSE flag is examined anew.
  5372.  
  5373.     Note also that calling ReportMouse() when no gadget is currently
  5374.     selected will change the state of the window's WFLG_REPORTMOUSE flag,
  5375.     but will have no effect on any gadget that may be subsequently
  5376.     selected. (This is all fixed in V36.)
  5377.  
  5378.     The ReportMouse() function is first performed when OpenWindow() 
  5379.     is first called; if the flag WFLG_REPORTMOUSE is included among
  5380.     the options, then all mouse-movement events are reported 
  5381.     to the opening task and will continue to be reported
  5382.     until ReportMouse() is called with a Boolean value of FALSE.
  5383.     If WFLG_REPORTMOUSE is not set, then no mouse-movement reports will
  5384.     be broadcast until ReportMouse() is called with a Boolean of TRUE.
  5385.  
  5386.     Note that the WFLG_REPORTMOUSE flag, as managed by this routine,
  5387.     determines IF mouse messages are to be broadcast.  Determining HOW
  5388.     they are to be broadcast is determined by the IDCMP_MOUSEMOVE
  5389.     IDCMPFlag.
  5390.  
  5391.     INPUTS
  5392.     Window = pointer to a Window structure associated with this request
  5393.     Boolean = TRUE or FALSE value specifying whether to turn this
  5394.              function on or off
  5395.  
  5396.     RESULT
  5397.     None
  5398.  
  5399.     BUGS
  5400.     See above
  5401.  
  5402.     SEE ALSO
  5403.     The Input and Output section of the Intuition Reference Manual
  5404. intuition.library/Request                           intuition.library/Request
  5405.  
  5406.     NAME
  5407.     Request -- Activate a requester.
  5408.  
  5409.     SYNOPSIS
  5410.     Success = Request( Requester, Window )
  5411.     D0           A0         A1
  5412.  
  5413.     BOOL Request( struct Requester *, struct Window * );
  5414.  
  5415.     FUNCTION
  5416.     Links in and displays a requester into the specified window.  
  5417.  
  5418.     This routine ignores the window's IDCMP_REQVERIFY flag.
  5419.  
  5420.     INPUTS
  5421.     Requester = pointer to the requester to be displayed
  5422.     Window = pointer to the window into which this requester goes
  5423.  
  5424.     New for V36: the POINTREL flag now has meaning if the requester
  5425.     is not a DMR (Double-Menu Requester):
  5426.     If POINTREL is set this requester should be placed in the center
  5427.     of the window, offset by Requester.RelLeft and Requester.RelTop.
  5428.     If the requester doesn't fit in the window, its position will be
  5429.     adjusted to show the upper-left corner.
  5430.  
  5431.     RESULT
  5432.     If the requester is successfully opened, TRUE is returned.  Otherwise,
  5433.     if the requester could not be opened, FALSE is returned.
  5434.  
  5435.     BUGS
  5436.     There is a maximum of 8 requesters that are supported in
  5437.     a window that can be changed in size, position, or depth.
  5438.  
  5439.     SEE ALSO
  5440.     The Requesters section of the Intuition Reference Manual
  5441. intuition.library/ResetMenuStrip             intuition.library/ResetMenuStrip
  5442.  
  5443.     NAME
  5444.     ResetMenuStrip -- Re-attach a menu strip to a window. (V36)
  5445.  
  5446.     SYNOPSIS
  5447.     Success = ResetMenuStrip( Window, Menu )
  5448.     D0                  A0      A1
  5449.  
  5450.     BOOL ResetMenuStrip( struct Window *, struct Menu * );
  5451.  
  5452.     FUNCTION
  5453.     This function is simply a "fast" version of SetMenuStrip() that
  5454.     doesn't perform the precalculations of menu page sizes that
  5455.     SetMenuStrip() does.
  5456.  
  5457.     You may call this function ONLY IF the menu strip and all items
  5458.     and sub-items have not changed since the menu strip was passed to
  5459.     SetMenuStrip(), with the following exceptions:
  5460.  
  5461.     - You may change the CHECKED flag to turn a checkmark on or off.
  5462.     - You may change the ITEMENABLED flag to enable/disable some
  5463.       MenuItem or Menu structures.
  5464.  
  5465.     In all other ways, this function performs like SetMenuStrip().
  5466.  
  5467.     The new sequence of events you can use is:
  5468.     - OpenWindow()
  5469.     - SetMenuStrip()
  5470.     zero or more iterations of:
  5471.         - ClearMenuStrip()
  5472.         - change CHECKED or ITEMENABLED flags
  5473.         - ResetMenuStrip()
  5474.     - ClearMenuStrip()
  5475.     - CloseWindow()
  5476.  
  5477.     INPUTS
  5478.     Window = pointer to a Window structure
  5479.     Menu = pointer to the first menu in the menu strip
  5480.  
  5481.     RESULT
  5482.     TRUE always.
  5483.  
  5484.     BUGS
  5485.  
  5486.     SEE ALSO
  5487.     SetMenuStrip(), ClearMenuStrip()
  5488. intuition.library/RethinkDisplay             intuition.library/RethinkDisplay
  5489.  
  5490.     NAME
  5491.     RethinkDisplay -- Grand manipulation of the entire Intuition display.
  5492.  
  5493.     SYNOPSIS
  5494.     RethinkDisplay()
  5495.  
  5496.     VOID RethinkDisplay( VOID );
  5497.  
  5498.     FUNCTION
  5499.     This function performs the Intuition global display reconstruction.
  5500.     This includes rethinking about all of the  ViewPorts and their
  5501.     relationship to one another and reconstructing the entire display
  5502.     based on the results of this rethinking.
  5503.  
  5504.     Specifically, and omitting many internal details, the operation
  5505.     consists of this:
  5506.  
  5507.         Determine which ViewPorts are invisible and set their VP_HIDE
  5508.         ViewPort Mode flag. VP_HIDE flags are also set for screens that
  5509.         may not be simultaneously displayed with the frontmost (V36).
  5510.  
  5511.         If a change to a viewport height, or changing interlace or
  5512.         monitor scan rates require, MakeVPort() is called for specific
  5513.         screen viewports.  After this phase, the intermediate Copper lists
  5514.         for each screen's viewport are correctly set up. 
  5515.  
  5516.         MrgCop() and LoadView() are then called to get these Copper lists
  5517.         in action, thus establishing the new state of the Intuition
  5518.         display.
  5519.    
  5520.     You may perform a MakeScreen() on your Custom Screen before calling
  5521.     this routine.  The results will be incorporated in the new display, but
  5522.     changing the INTERLACE ViewPort mode for one screens must be reflected
  5523.     in the Intuition View, which is left to Intuition.
  5524.  
  5525.     WARNING:  This routine can take several milliseconds to run, so
  5526.     do not use it lightly. 
  5527.  
  5528.     New for V36: This routine is substantially changed to support
  5529.     new screen modes.  In particular, if screen rearrangement has
  5530.     caused a change in interlace mode or scan rate, this routine
  5531.     will remake the copper lists for each screen's viewport.
  5532.  
  5533.     INPUTS
  5534.     None
  5535.  
  5536.     RESULT
  5537.     None
  5538.  
  5539.     BUGS
  5540.     In V35 and earlier, an interlaced screen coming to the front
  5541.     may not trigger a complete remake as required when the global
  5542.     interlace state is changed.  In some cases, this can be compensated
  5543.     for by setting the viewport DHeight field to 0 for hidden screens.
  5544.  
  5545.     SEE ALSO
  5546.     RemakeDisplay(), graphics.library/MakeVPort(), graphics.library/MrgCop(),
  5547.     graphics.library/LoadView(), MakeScreen()
  5548. intuition.library/ScreenToBack                 intuition.library/ScreenToBack
  5549.  
  5550.     NAME
  5551.     ScreenToBack -- Send the specified screen to the back of the display.
  5552.  
  5553.     SYNOPSIS
  5554.     ScreenToBack( Screen )
  5555.               A0
  5556.  
  5557.     VOID ScreenToBack( struct Screen * );
  5558.  
  5559.     FUNCTION
  5560.     Sends the specified screen to the back of the display.
  5561.  
  5562.     INPUTS
  5563.     Screen = pointer to a Screen structure
  5564.  
  5565.     RESULT
  5566.     None
  5567.  
  5568.     BUGS
  5569.  
  5570.     SEE ALSO
  5571.     ScreenToFront()
  5572. intuition.library/ScreenToFront               intuition.library/ScreenToFront
  5573.  
  5574.     NAME
  5575.     ScreenToFront -- Make the specified screen the frontmost.
  5576.  
  5577.     SYNOPSIS
  5578.     ScreenToFront( Screen )
  5579.                A0
  5580.  
  5581.     VOID ScreenToFront( struct Screen * );
  5582.  
  5583.     FUNCTION
  5584.     Brings the specified Screen to the front of the display.
  5585.  
  5586.     INPUTS
  5587.     Screen = a pointer to a Screen structure
  5588.  
  5589.     RESULT
  5590.     None
  5591.  
  5592.     BUGS
  5593.  
  5594.     SEE ALSO
  5595.     ScreenToBack()
  5596. intuition.library/SetAttrsA                       intuition.library/SetAttrsA
  5597.  
  5598.     NAME
  5599.     SetAttrsA -- Specify attribute values for an object. (V36)
  5600.     SetAttrs -- Varargs stub for SetAttrsA(). (V36)
  5601.  
  5602.     SYNOPSIS
  5603.     result = SetAttrsA( Object, TagList )
  5604.     D0                  A0      A1
  5605.  
  5606.     ULONG SetAttrsA( APTR, struct TagItem * );
  5607.  
  5608.     result = SetAttrs( Object, Tag1, ... )
  5609.  
  5610.     ULONG SetAttrs( APTR, ULONG, ... );
  5611.  
  5612.     FUNCTION
  5613.     Specifies a set of attribute/value pairs with meaning as
  5614.     defined by a 'boopsi' object's class.
  5615.  
  5616.     This function does not provide enough context information or
  5617.     arbitration for boopsi gadgets which are attached to windows
  5618.     or requesters.  For those objects, use SetGadgetAttrs().
  5619.  
  5620.     INPUTS
  5621.     Object = abstract pointer to a boopsi object.
  5622.     TagList = array of TagItem structures with attribute/value pairs.
  5623.  
  5624.     RESULT
  5625.     The object does whatever it wants with the attributes you provide.
  5626.     The return value tends to be non-zero if the changes would require
  5627.     refreshing gadget imagery, if the object is a gadget.
  5628.     
  5629.     NOTES
  5630.     This function invokes the OM_SET method with a NULL GadgetInfo
  5631.     parameter.
  5632.  
  5633.     BUGS
  5634.  
  5635.     SEE ALSO
  5636.     NewObject(), DisposeObject(), GetAttr(), MakeClass(),
  5637.     Document "Basic Object-Oriented Programming System for Intuition"
  5638.     and the "boopsi Class Reference" document.
  5639. intuition.library/SetDefaultPubScreen   intuition.library/SetDefaultPubScreen
  5640.  
  5641.     NAME
  5642.     SetDefaultPubScreen -- Choose a new default public screen. (V36)
  5643.  
  5644.     SYNOPSIS
  5645.     SetDefaultPubScreen( Name )
  5646.                  A0
  5647.  
  5648.     VOID SetDefaultPubScreen( UBYTE * );
  5649.  
  5650.     FUNCTION
  5651.     Establishes a new default public screen for visitor windows.
  5652.  
  5653.     This screen is used by windows asking for a named public screen
  5654.     that doesn't exist and the FALLBACK option is selected, and for
  5655.     windows asking for the default public screen directly.
  5656.  
  5657.     INPUTS
  5658.     Name = name of chosen public screen to be the new default.
  5659.     A value of NULL means that the Workbench screen is to
  5660.     be the default public screen.
  5661.  
  5662.     RESULT
  5663.     None
  5664.  
  5665.     BUGS
  5666.  
  5667.     SEE ALSO
  5668.     OpenWindow(), OpenScreen(), Intuition V36 update documentation    
  5669. intuition.library/SetDMRequest                 intuition.library/SetDMRequest
  5670.  
  5671.     NAME
  5672.     SetDMRequest -- Set the DMRequest of a window.
  5673.  
  5674.     SYNOPSIS
  5675.     success = SetDMRequest( Window, DMRequest )
  5676.     D0                      A0      A1
  5677.  
  5678.     BOOL SetDMRequest( struct Window *, struct Requester * );
  5679.  
  5680.     FUNCTION
  5681.     Attempts to set the DMRequest into the specified window.  
  5682.     The DMRequest is the special requester that you attach to 
  5683.     the double-click of the menu button which the user can then 
  5684.     bring up on demand.  This routine WILL NOT change the DMRequest
  5685.     if it's already set and is currently active (in use by the user).  
  5686.     After having called SetDMRequest(), if you want to change the 
  5687.     DMRequest, the correct way to start is by calling ClearDMRequest() 
  5688.     until it returns a value of TRUE; then you can call SetDMRequest() 
  5689.     with the new DMRequest.  
  5690.  
  5691.     If the POINTREL flag is set in the DMRequest, the DMR will open as
  5692.     close to the pointer as possible.  The RelLeft/Top fields are
  5693.     for fine-tuning the position.
  5694.  
  5695.     INPUTS
  5696.     Window = pointer to the window from which the DMRequest is to be set
  5697.     DMRequest = a pointer to a requester
  5698.  
  5699.     RESULT
  5700.     If the current DMRequest was not in use, sets the DMRequest
  5701.         pointer into the window and returns TRUE.
  5702.     If the DMRequest was currently in use, doesn't change the pointer
  5703.         and returns FALSE
  5704.  
  5705.     BUGS
  5706.  
  5707.     SEE ALSO
  5708.     ClearDMRequest(), Request()
  5709. intuition.library/SetEditHook                   intuition.library/SetEditHook
  5710.  
  5711.     NAME
  5712.     SetEditHook -- Set global processing for string gadgets. (V36)
  5713.  
  5714.     SYNOPSIS
  5715.     OldHook = SetEditHook( Hook )
  5716.     D0                     A0
  5717.  
  5718.     struct Hook *SetEditHook( struct Hook * );
  5719.  
  5720.     FUNCTION
  5721.     Sets new global editing hook for string gadgets.
  5722.  
  5723.     WARNING: This function is wholly untested.  Do *NOT* use
  5724.     this in a commercial product until further notice.
  5725.  
  5726.     INPUTS
  5727.     Hook -- A pointer to a struct Hook which determines a function
  5728.       in your code to be called every time the user types a key.
  5729.       This is done before control is passed to the gadget custom
  5730.       editing hook, so effects ALL string gadgets.
  5731.  
  5732.     RESULT
  5733.     Returns previous global edit hook structure.
  5734.  
  5735.     BUGS
  5736.     Unknown, risky.
  5737.  
  5738.     SEE ALSO
  5739.     
  5740. intuition.library/SetGadgetAttrsA           intuition.library/SetGadgetAttrsA
  5741.  
  5742.     NAME
  5743.     SetGadgetAttrsA -- Specify attribute values for a boopsi gadget. (V36)
  5744.     SetGadgetAttrs -- Varargs stub for SetGadgetAttrsA(). (V36)
  5745.  
  5746.     SYNOPSIS
  5747.     result = SetGadgetAttrsA( Gadget, Window, Requester, TagList )
  5748.     D0                  A0      A1      A2         A3
  5749.  
  5750.     ULONG SetGadgetAttrsA( struct Gadget *, struct Window *,
  5751.         struct Requester *, struct TagItem * );
  5752.  
  5753.     result = SetGadgetAttrs( Gadget, Window, Requester, Tag1, ...)
  5754.  
  5755.     ULONG SetGadgetAttrs( struct Gadget *, struct Window *,
  5756.         struct Requester *, ULONG, ... );
  5757.  
  5758.     FUNCTION
  5759.     Same as SetAttrs(), but provides context information and
  5760.     arbitration for classes which implement custom Intuition gadgets.
  5761.  
  5762.     You should use this function for boopsi gadget objects which have
  5763.     already been added to a requester or a window, or for "models" which
  5764.     propagate information to gadget already added.
  5765.  
  5766.     Typically, the gadgets will refresh their visuals to reflect
  5767.     changes to visible attributes, such as the value of a slider,
  5768.     the text in a string-type gadget, the selected state of a button.
  5769.  
  5770.     You can use this as a replacement for SetAttrs(), too, if you
  5771.     specify NULL for the 'Window' and 'Requester' parameters.
  5772.  
  5773.     INPUTS
  5774.     Gadget = abstract pointer to a boopsi gadget
  5775.     Window = window gadget has been added to using AddGList() or AddGadget()
  5776.     Requester = for REQGADGETs, requester containing the gadget
  5777.     TagList = array of TagItem structures with attribute/value pairs.
  5778.  
  5779.     RESULT
  5780.     The object does whatever it wants with the attributes you provide,
  5781.     which might include updating its gadget visuals.
  5782.  
  5783.     The return value tends to be non-zero if the changes would require
  5784.     refreshing gadget imagery, if the object is a gadget.
  5785.     
  5786.     NOTES
  5787.     This function invokes the OM_SET method with a GadgetInfo
  5788.     derived from the 'Window' and 'Requester' pointers.
  5789.  
  5790.     BUGS
  5791.     There should be more arbitration between this function and
  5792.     the calls that Intuition's input task will make to the
  5793.     gadgets.  In the meantime, this function, input processing,
  5794.     and refreshing must be mutually re-entrant.
  5795.  
  5796.     SEE ALSO
  5797.     NewObject(), DisposeObject(), GetAttr(), MakeClass(),
  5798.     Document "Basic Object-Oriented Programming System for Intuition"
  5799.     and the "boopsi Class Reference" document.
  5800. intuition.library/SetMenuStrip                 intuition.library/SetMenuStrip
  5801.  
  5802.     NAME
  5803.     SetMenuStrip -- Attach a menu strip to a window.
  5804.  
  5805.     SYNOPSIS
  5806.     Success = SetMenuStrip( Window, Menu )
  5807.     D0                A0      A1
  5808.  
  5809.     BOOL SetMenuStrip( struct Window *, struct Menu * );
  5810.  
  5811.     FUNCTION
  5812.     Attaches the menu strip to the window.  After calling this routine,
  5813.     if the user presses the menu button, this specified menu strip
  5814.     will be displayed and accessible by the user.
  5815.  
  5816.     Menus with zero menu items are not allowed.
  5817.  
  5818.     NOTE:  You should always design your menu strip changes to be a 
  5819.     two-way operation, where for every menu strip you add to your 
  5820.     window you should always plan to clear that strip sometime.  Even 
  5821.     in the simplest case, where you will have just one menu strip for 
  5822.     the lifetime of your window, you should always clear the menu strip 
  5823.     before closing the window.  If you already have a menu strip attached 
  5824.     to this window, the correct procedure for changing to a new menu 
  5825.     strip involves calling ClearMenuStrip() to clear the old first.  
  5826.  
  5827.     The sequence of events should be:
  5828.     - OpenWindow()
  5829.     - zero or more iterations of:
  5830.           - SetMenuStrip()
  5831.           - ClearMenuStrip()
  5832.     - CloseWindow()
  5833.  
  5834.     INPUTS
  5835.     Window = pointer to a Window structure
  5836.     Menu = pointer to the first menu in the menu strip
  5837.  
  5838.     RESULT
  5839.     TRUE if there were no problems.  TRUE always, since this routine
  5840.     will wait until it is OK to proceed.
  5841.  
  5842.     BUGS
  5843.  
  5844.     SEE ALSO
  5845.     ClearMenuStrip(), ResetMenuStrip()
  5846. intuition.library/SetMouseQueue               intuition.library/SetMouseQueue
  5847.  
  5848.     NAME
  5849.     SetMouseQueue -- Change limit on pending mouse messages. (V36)
  5850.  
  5851.     SYNOPSIS
  5852.     oldQueueLength = SetMouseQueue( Window, QueueLength )
  5853.     D0                              A0      D0
  5854.  
  5855.     LONG SetMouseQueue( struct Window *, UWORD );
  5856.  
  5857.     FUNCTION
  5858.     Changes the number of mouse messages that Intuition will allow
  5859.     to be outstanding for your window.
  5860.  
  5861.     INPUTS
  5862.     Window = your window
  5863.     QueueLength = the new value of outstanding mouse movement messages
  5864.       you wish to allow.
  5865.  
  5866.     RESULT
  5867.     -1 if 'Window' is not known
  5868.     Otherwise the previous value of the queue limit.
  5869.     The corresponding function for changing the repeat key
  5870.     queue limit is not yet implemented.
  5871.  
  5872.     BUGS
  5873.  
  5874.     SEE ALSO
  5875.     OpenWindow()
  5876. intuition.library/SetPointer                     intuition.library/SetPointer
  5877.  
  5878.     NAME
  5879.     SetPointer -- Specify a pointer sprite image for a window.
  5880.  
  5881.     SYNOPSIS
  5882.     SetPointer( Window, Pointer, Height, Width, XOffset, YOffset )
  5883.             A0      A1       D0      D1     D2       D3
  5884.  
  5885.     VOID SetPointer( struct Window *, UWORD *, WORD, WORD, WORD, WORD );
  5886.  
  5887.     FUNCTION
  5888.     Sets up the window with the sprite definition for the pointer.  
  5889.     Then, whenever the window is the active one, the pointer 
  5890.     image will change to the window's version.  If the window is
  5891.     the active one when this routine is called, the change takes
  5892.     place immediately.
  5893.  
  5894.     The XOffset and YOffset parameters are used to offset the
  5895.     upper-left corner of the hardware sprite image from what Intuition
  5896.     regards as the current position of the pointer.  Another way of
  5897.     describing it is as the offset from the "hot spot" of the pointer
  5898.     to the top-left corner of the sprite.  For instance, if you specify 
  5899.     offsets of zero, zero, then the top-left corner of your sprite 
  5900.     image will be placed at the mouse position.  On the other hand, 
  5901.     if you specify an XOffset of -7 (remember, sprites are 16 pixels 
  5902.     wide) then your sprite will be centered over the mouse position.  
  5903.     If you specify an XOffset of -15, the right-edge of the sprite 
  5904.     will be over the mouse position.
  5905.  
  5906.     INPUTS
  5907.     Window = pointer to the window to receive this pointer definition
  5908.     Pointer = pointer to the data definition of a sprite
  5909.     Height = the height of the pointer
  5910.     Width = the width of the sprite (must be less than or equal to sixteen)
  5911.     XOffset = the offset for your sprite from the mouse position
  5912.     YOffset = the offset for your sprite from the mouse position
  5913.  
  5914.     RESULT
  5915.     None
  5916.  
  5917.     BUGS
  5918.  
  5919.     SEE ALSO
  5920.     ClearPointer(), Intuition Reference Manual or Amiga Rom
  5921.     Kernel Manual
  5922. intuition.library/SetPrefs                         intuition.library/SetPrefs
  5923.  
  5924.     NAME
  5925.     SetPrefs -- Set Intuition preferences data.
  5926.  
  5927.     SYNOPSIS
  5928.     Prefs = SetPrefs( PrefBuffer, Size, Inform )
  5929.     D0          A0          D0    D1
  5930.  
  5931.     struct Preferences *SetPrefs( struct Preferences *, LONG, BOOL );
  5932.  
  5933.     FUNCTION
  5934.     Sets new preferences values.  Copies the first 'Size' bytes
  5935.     from your preferences buffer to the system preferences table,
  5936.     and puts them into effect.
  5937.  
  5938.     The 'Inform' parameter, if TRUE, indicates that an IDCMP_NEWPREFS
  5939.     message is to be sent to all windows that have the IDCMP_NEWPREFS
  5940.     IDCMPFlag set.
  5941.    
  5942.     It is legal to set a partial copy of the Preferences structure.
  5943.     The most frequently changed values are grouped at the beginning
  5944.     of the Preferences structure.
  5945.  
  5946.     New for V36:  A new and more extensible method for supplying
  5947.     Preferences has been introduced in V36, and relies on file
  5948.     system notification.  The Intuition preferences items rely
  5949.     also on the IPrefs program.  Certain elements of the
  5950.     Preferences structure have been superceded by this new method.
  5951.     Pointer changes submitted through SetPrefs() are only heeded
  5952.     until the first time IPrefs informs Intuition of a V36-style
  5953.     pointer.ilbm preferences file.  The Preferences FontHeight and
  5954.     LaceWB fields are respected only from the system-configuration
  5955.     file, and never thereafter.  As well, the view centering and
  5956.     size apply only to the default monitor, and not to such modes
  5957.     as Productivity.  Other fields may be superceded in the future.
  5958.  
  5959.     INPUTS
  5960.     PrefBuffer = pointer to the memory buffer which contains your
  5961.         desired settings for Intuition preferences
  5962.     Size = the number of bytes in your PrefBuffer, the number of bytes
  5963.            you want copied to the system's internal preference settings
  5964.     Inform = whether you want the information of a new preferences
  5965.         setting propagated to all windows.
  5966.  
  5967.     NOTES
  5968.     Unless you are responding to a user's explicit request to
  5969.     change Preferences (for example, you are writing a Preferences
  5970.     editor), you should probably avoid using this function.
  5971.     The user's Preferences should be respected, not overridden.
  5972.  
  5973.     RESULT
  5974.     Returns your parameter PrefBuffer.
  5975.  
  5976.     BUGS
  5977.  
  5978.     SEE ALSO
  5979.     GetDefPrefs(), GetPrefs()
  5980. intuition.library/SetPubScreenModes       intuition.library/SetPubScreenModes
  5981.  
  5982.     NAME
  5983.     SetPubScreenModes -- Establish global public screen behavior. (V36)
  5984.  
  5985.     SYNOPSIS
  5986.     OldModes = SetPubScreenModes( Modes )
  5987.     D0                            D0
  5988.  
  5989.     UWORD SetPubScreenModes( UWORD );
  5990.     
  5991.     FUNCTION
  5992.         Sets GLOBAL Intuition public screen modes.    
  5993.  
  5994.     INPUTS
  5995.     Modes = new global modes flags.  Values for flag bits are:
  5996.       SHANGHAI: workbench windows are to be opened on the
  5997.         default public screen
  5998.       POPPUBSCREEN: when a visitor window is opened, the public
  5999.         screen it opens on is to be brought to the front.
  6000.  
  6001.     RESULT
  6002.     OldModes = previous global mode settings
  6003.  
  6004.     BUGS
  6005.  
  6006.     SEE ALSO
  6007.     OpenScreen(), Intuition V36 update documentation    
  6008. intuition.library/SetWindowTitles           intuition.library/SetWindowTitles
  6009.  
  6010.     NAME
  6011.     SetWindowTitles -- Set the window's titles for both window and screen.
  6012.  
  6013.     SYNOPSIS
  6014.     SetWindowTitles( Window, WindowTitle, ScreenTitle )
  6015.              A0      A1           A2
  6016.  
  6017.     VOID SetWindowTitles( struct Window *, UBYTE *, UBYTE * );
  6018.  
  6019.     FUNCTION
  6020.     Allows you to set the text which appears in the Window and/or Screen
  6021.     title bars.
  6022.  
  6023.     The window title appears at all times along the window title bar.
  6024.     The window's screen title appears at the screen title bar whenever
  6025.     this window is the active one.
  6026.    
  6027.     When this routine is called, your window title will be changed 
  6028.     immediately.  If your window is the active one when this routine is 
  6029.     called, the screen title will be changed immediately.
  6030.    
  6031.     You can specify a value of -1 (i.e. (UBYTE *) ~0) for either of
  6032.     the title pointers.  This designates that you want Intuition to leave
  6033.     the current setting of that particular title alone, and modify
  6034.     only the other one.  Of course, you could set both to -1.
  6035.  
  6036.     Furthermore, you can set a value of 0 (zero) for either of the
  6037.     title pointers.  Doing so specifies that you want no title to
  6038.     appear (the title bar will be blank).
  6039.  
  6040.     Both of the titles are rendered in the default font of the window's
  6041.     screen, as set using OpenScreen().
  6042.  
  6043.     In setting the window's title, Intuition may do some other rendering
  6044.     in the top border of your window.  If your own rendering sometimes
  6045.     appears in your window border areas, you may want to restore the entire
  6046.     window border frame.  The function SetWindowTitles() does not do this
  6047.     in the newer versions.  The function RefreshWindowFrame() is provided
  6048.     to do this kind of thing for you.
  6049.  
  6050.     INPUTS
  6051.     Window = pointer to your window structure
  6052.     WindowTitle = pointer to a null-terminated text string, or set to
  6053.            either the value of -1 (negative one) or 0 (zero)
  6054.     ScreenTitle = pointer to a null-terminated text string, or set to
  6055.            either the value of -1 (negative one) or 0 (zero)
  6056.  
  6057.     RESULT
  6058.     None
  6059.  
  6060.     BUGS
  6061.  
  6062.     SEE ALSO
  6063.     OpenWindow(), RefreshWindowFrame(), OpenScreen()
  6064. intuition.library/ShowTitle                       intuition.library/ShowTitle
  6065.  
  6066.     NAME
  6067.     ShowTitle -- Set the screen title bar display mode.
  6068.  
  6069.     SYNOPSIS
  6070.     ShowTitle( Screen, ShowIt )
  6071.            A0      D0
  6072.  
  6073.     VOID ShowTitle( struct Screen *, BOOL );
  6074.  
  6075.     FUNCTION
  6076.     This routine sets the SHOWTITLE flag of the specified screen, and
  6077.     then coordinates the redisplay of the screen and its windows.
  6078.     
  6079.     The screen title bar can appear either in front of or behind
  6080.     WFLG_BACKDROP windows.  This is contrasted with the fact that
  6081.     non-WFLG_BACKDROP windows always appear in front of the screen title
  6082.     bar.  You specify whether you want the screen title bar to be in front
  6083.     of or behind the screen's WFLG_BACKDROP windows by calling this
  6084.     routine.
  6085.  
  6086.     The ShowIt argument should be set to either TRUE or FALSE.  If TRUE,
  6087.        the screen's title bar will be shown in front of WFLG_BACKDROP windows
  6088. .
  6089.        If FALSE, the title bar will be rendered behind all windows.
  6090.  
  6091.        When a screen is first opened, the default setting of the SHOWTITLE
  6092.        flag is TRUE.
  6093.  
  6094.     INPUTS
  6095.        Screen = pointer to a Screen structure
  6096.        ShowIt = Boolean TRUE or FALSE describing whether to show or hide the
  6097.            screen title bar
  6098.  
  6099.     RESULT
  6100.        None
  6101.  
  6102.     BUGS
  6103.  
  6104.     SEE ALSO
  6105.  
  6106. intuition.library/SizeWindow                     intuition.library/SizeWindow
  6107.  
  6108.     NAME
  6109.     SizeWindow -- Ask Intuition to size a window.
  6110.  
  6111.     SYNOPSIS
  6112.     SizeWindow( Window, DeltaX, DeltaY )
  6113.             A0      D0      D1
  6114.  
  6115.     VOID SizeWindow( struct Window *, WORD, WORD );
  6116.  
  6117.     FUNCTION
  6118.     This routine sends a request to Intuition asking to size the window 
  6119.     the specified amounts.  The delta arguments describe how much to 
  6120.     size the window along the respective axes.  
  6121.  
  6122.     Note that the window will not be sized immediately, but rather 
  6123.     will be sized the next time Intuition receives an input event, 
  6124.     which happens currently at a minimum rate of ten times per second,
  6125.     and a maximum of sixty times a second.  You can discover when 
  6126.     you window has finally been sized by setting the IDCMP_NEWSIZE flag
  6127.     of the IDCMP of your window.  See the "Input and Output Methods"
  6128.     chapter of The Intuition Reference Manual for description of the IDCMP.
  6129.  
  6130.     New for V36: Intuition now will do validity checking on the final
  6131.     dimensions.  To change to new absolute dimensions, or to move and
  6132.     size a window in one step, use ChangeWindowBox().
  6133.  
  6134.     However, limit checking against window MinWidth, MinHeight,
  6135.     MaxWidth, and MaxHeight was not done prior to V36, and
  6136.     these fields are still ignored (as documented) if you have
  6137.     no sizing gadget (WFLG_SIZEGADGET is not set).  The *are*
  6138.     respected now (V36) if WFLG_SIZEGADGET is set.
  6139.  
  6140.     New for V36: you can determine when the change in size has
  6141.     taken effect by receiving the IDCMP_CHANGEWINDOW IDCMP message.
  6142.  
  6143.     INPUTS
  6144.     Window = pointer to the structure of the window to be sized
  6145.     DeltaX = signed value describing how much to size the window
  6146.      on the x-axis
  6147.     DeltaY = signed value describing how much to size the window
  6148.      on the y-axis
  6149.  
  6150.     RESULT
  6151.     None
  6152.  
  6153.     BUGS
  6154.  
  6155.     SEE ALSO
  6156.     ChangeWindowBox(), MoveWindow(), WindowToFront(), WindowToBack()
  6157. intuition.library/SysReqHandler               intuition.library/SysReqHandler
  6158.  
  6159.     NAME
  6160.     SysReqHandler -- Handle system requester input. (V36)
  6161.  
  6162.     SYNOPSIS
  6163.     num = SysReqHandler( Window, IDCMPFlagsPtr, WaitInput )
  6164.     D0                   A0      A1             D0
  6165.  
  6166.     LONG SysReqHandler( struct Window *, ULONG *, BOOL );
  6167.  
  6168.     FUNCTION
  6169.     Handles input for a window returned by either BuildSysRequest()
  6170.     or BuildEasyRequest().  These functions with SysReqHandler()
  6171.     you can perform an "asynchronous" EasyRequest() or AutoRequest().
  6172.     That is to say, you can perform other processing while you
  6173.     wait for the requester to be satisfied.
  6174.  
  6175.     Each time this function is called, it will process all
  6176.     IDCMPMessages that the window has received.  If the parameter
  6177.     'WaitInput' is non-zero, SysReqHandler() will wait for input
  6178.     (by calling WaitPort()) if there are no IDCMP messages.
  6179.  
  6180.     SysReqHandler() returns the same values as EasyRequest(): A gadget
  6181.     ID greater than equal to 0, and  -1 if one of the other IDCMP
  6182.     events were received.
  6183.  
  6184.     An additional value of -2 is returned if the input processed
  6185.     does not satisfy the requester.  In this case, you might
  6186.     perform some processing and call SysReqHandler() again.
  6187.  
  6188.     Note: this function does NOT terminate the system request.
  6189.     Not only must you call FreeSysRequest() to eliminate the request,
  6190.     but you may also continue processing after an event which would
  6191.     normally terminate a normal call to EasyRequest().
  6192.  
  6193.     EXAMPLE
  6194.     Implementation of EasyRequest() input loop:
  6195.  
  6196.     window = BuildEasyRequest( ZZZZ )
  6197.     while ( (retval = SysReqHandler( window, idcmp_ptr, TRUE )) == -2 )
  6198.     {
  6199.         /* loop    */;
  6200.     }
  6201.     FreeSysRequest( window );
  6202.  
  6203.     EXAMPLE
  6204.     Request a volume, but don't remove the requester when the
  6205.     user inserts the wrong disk:
  6206.  
  6207.     struct EasyStruct volumeES = {
  6208.         sizeof (struct EasyStruct),
  6209.         0,
  6210.         "Volume Request",
  6211.         "Please insert volume %s in any drive.",
  6212.         "Cancel"
  6213.     };
  6214.  
  6215.     Volume *
  6216.     getVolume( volname )
  6217.     UBYTE    *volname;
  6218.     {
  6219.         struct Window    *window;
  6220.         Volume        *volume = NULL;
  6221.         Volume        *findVolume();
  6222.         int            retval;
  6223.  
  6224.         window = BuildEasyRequest( NULL, &volumeES, IDCMP_DISKINSERTED,
  6225.                   volname );
  6226.  
  6227.         while ( (retval = SysReqHandler( window, NULL, TRUE )) != 0 )
  6228.         {
  6229.             /* not cancelled yet    */
  6230.  
  6231.             /* when IDCMP_DISKINSERTED, check for volume */
  6232.             if (( retval == -1 ) && (volume = findVolume( volname )))
  6233.             break;
  6234.         }
  6235.         FreeSysRequest( window );
  6236.         return ( volume );
  6237.     }
  6238.  
  6239.     INPUTS
  6240.     Window = Window pointer returned from BuildSysRequest() or
  6241.         BuildEasyRequest().  Those functions can also return
  6242.         values '0' or '1', and these values may also be
  6243.         passed to SysReqHandler(), which will immediately
  6244.         return the same value.
  6245.  
  6246.     IDCMPFlagsPtr = If you passed application specific IDCMP
  6247.         flags to BuildSysRequest() or BuildEasyRequest(),
  6248.         SysReqHandler() will return -1 if that IDCMP message
  6249.         is received.  If IDCMPFlagsPtr is non-null, it
  6250.         points to a ULONG where the IDCMP class received
  6251.         will be copied for your examination.
  6252.  
  6253.         This pointer can be NULL if you have provided no
  6254.         application specific IDCMP flags or if you do
  6255.         not need to know which application specific IDCMP 
  6256.         event occurred.
  6257.  
  6258.         If you provide more than on flag in the flags variable
  6259.         this pointer points to, you will have to refresh
  6260.         the variable whenever -1 is returned, since the
  6261.         variable will have been changed to show just the
  6262.         single IDCMP Class bit that caused the return.
  6263.  
  6264.     WaitInput = Specifies that you want SysReqHandler() to
  6265.             to wait for IDCMP input if there is none pending.
  6266.  
  6267.     RESULT
  6268.     0, 1, ..., N = Successive GadgetID values, for the gadgets
  6269.         you specify for the requester.  NOTE: The numbering
  6270.         from left to right is actually: 1, 2, ..., N, 0.
  6271.         This is for compatibility with AutoRequests which has
  6272.         FALSE for the rightmost gadget.
  6273.         
  6274.     -1 = Means that one of the caller-supplied IDCMPFlags occurred.
  6275.         The IDCMPFlag value is in the longword pointed to by UDCMP_ptr.
  6276.  
  6277.     -2 = input processed did not satisfy the requester. One example
  6278.         is a keystroke that does not satisfy the requester.  Another
  6279.         example is if there is no input pending and you specified
  6280.         FALSE for WaitInput.
  6281.  
  6282.     BUGS
  6283.  
  6284.     SEE ALSO
  6285.     exec.library/WaitPort()
  6286. intuition.library/UnlockIBase                   intuition.library/UnlockIBase
  6287.  
  6288.     NAME
  6289.     UnlockIBase -- Surrender an Intuition lock gotten by LockIBase().
  6290.  
  6291.     SYNOPSIS
  6292.     UnlockIBase( Lock )
  6293.              A0
  6294.  
  6295.     VOID UnlockIBase( ULONG );
  6296.  
  6297.     FUNCTION
  6298.     
  6299.     Surrenders lock gotten by LockIBase().
  6300.  
  6301.     Calling this function when you do not own the specified lock will
  6302.     immediately crash the system.
  6303.  
  6304.     INPUTS
  6305.     The value returned by LockIBase() should be passed to this function,
  6306.     to specify which internal lock is to be freed.
  6307.  
  6308.     Note that the parameter is passed in A0, not D0, for historical reasons.
  6309.  
  6310.     RESULT
  6311.     None
  6312.  
  6313.     BUGS
  6314.  
  6315.     SEE ALSO
  6316.     LockIBase()
  6317. intuition.library/UnlockPubScreen           intuition.library/UnlockPubScreen
  6318.  
  6319.     NAME
  6320.     UnlockPubScreen -- Release lock on a public screen. (V36)
  6321.  
  6322.     SYNOPSIS
  6323.     UnlockPubScreen( Name, [Screen] )
  6324.              A0    A1
  6325.  
  6326.     VOID UnlockPubScreen( UBYTE *, struct Screen * );
  6327.  
  6328.     FUNCTION
  6329.     Releases lock gotten by LockPubScreen().
  6330.     It is best to identify the locked public screen by
  6331.     the pointer returned from LockPubScreen().  To do this,
  6332.     supply a NULL 'Name' pointer and the screen pointer.
  6333.  
  6334.     In rare circumstances where it would be more convenient to pass
  6335.     a non-NULL pointer to the public screen name string, the
  6336.     'Screen' parameter is ignored.
  6337.  
  6338.     INPUTS
  6339.     Name = pointer to name of public screen.  If Name is NULL,
  6340.         then argument 'Screen' is used as a direct pointer to
  6341.         a public screen.
  6342.     Screen = pointer to a public screen.  Used only if Name
  6343.         is NULL.  This pointer MUST have been returned
  6344.         by LockPubScreen().
  6345.         It is safe to call UnlockPubScreen() with NULL Name
  6346.         and Screen (the function will have no effect).
  6347.  
  6348.     RESULT
  6349.  
  6350.     BUGS
  6351.  
  6352.     SEE ALSO
  6353.     LockPubScreen()
  6354. intuition.library/UnlockPubScreenList   intuition.library/UnlockPubScreenList
  6355.  
  6356.     NAME
  6357.     UnlockPubScreenList -- Release public screen list semaphore. (V36)
  6358.  
  6359.     SYNOPSIS
  6360.     UnlockPubScreenList()
  6361.  
  6362.     VOID UnlockPubScreenList( VOID );
  6363.  
  6364.     FUNCTION
  6365.     Releases lock gotten by LockPubScreenList().
  6366.  
  6367.     INPUTS
  6368.     None.
  6369.  
  6370.     RESULT
  6371.     None.
  6372.  
  6373.     BUGS
  6374.  
  6375.     SEE ALSO
  6376.     LockPubScreenList()
  6377. intuition.library/ViewAddress                   intuition.library/ViewAddress
  6378.  
  6379.     NAME
  6380.     ViewAddress -- Return the address of the Intuition View structure.
  6381.  
  6382.     SYNOPSIS
  6383.     view = ViewAddress()
  6384.     D0
  6385.  
  6386.     struct View *ViewAddress( VOID );
  6387.  
  6388.     FUNCTION
  6389.     Returns the address of the Intuition View structure.  If you 
  6390.     want to use any of the graphics, text, or animation primitives 
  6391.     in your window and that primitive requires a pointer to a view,
  6392.     this routine will return the address of the view for you.
  6393.  
  6394.     INPUTS
  6395.     None
  6396.  
  6397.     RESULT
  6398.     Returns the address of the Intuition View structure
  6399.    
  6400.     BUGS
  6401.  
  6402.     SEE ALSO
  6403.     graphics.library
  6404. intuition.library/ViewPortAddress           intuition.library/ViewPortAddress
  6405.  
  6406.     NAME
  6407.     ViewPortAddress -- Return the address of a window's viewport.
  6408.  
  6409.     SYNOPSIS
  6410.     ViewPort = ViewPortAddress( Window )
  6411.     D0                          A0
  6412.  
  6413.     struct ViewPort *ViewPortAddress( struct Window * );
  6414.  
  6415.     FUNCTION
  6416.     Returns the address of the viewport associated with the specified
  6417.     window.  The viewport is actually the viewport of the screen within
  6418.     which the window is displayed.  If you want to use any of the graphics,
  6419.     text, or animation primitives in your window and that primitive
  6420.     requires a pointer to a viewport, you can use this call.
  6421.  
  6422.     This pointer is only valid as long as your window's screen remains
  6423.     open, which is ensured by keeping your window open.
  6424.  
  6425.     INPUTS
  6426.     Window = pointer to the window for which you want the viewport address
  6427.  
  6428.     RESULT
  6429.     Returns the address of the Intuition ViewPort structure for
  6430.     your window's screen .
  6431.    
  6432.     BUGS
  6433.     This routine is unnecessary: you can just use the expression
  6434.     &Window->WScreen->ViewPort.
  6435.  
  6436.     SEE ALSO
  6437.     graphics.library
  6438. intuition.library/WBenchToBack                 intuition.library/WBenchToBack
  6439.  
  6440.     NAME 
  6441.     WBenchToBack -- Send the Workbench screen in back of all screens.
  6442.  
  6443.     SYNOPSIS 
  6444.     Success = WBenchToBack()
  6445.     D0
  6446.     
  6447.     BOOL WBenchToBack( VOID );
  6448.  
  6449.     FUNCTION 
  6450.     Causes the Workbench screen, if it's currently opened, to go behind
  6451.     all other screens.  This does not 'move' the screen up or down,
  6452.     instead only affects the depth-arrangement of the screens. 
  6453.  
  6454.     INPUTS 
  6455.     None 
  6456.  
  6457.     RESULT 
  6458.     If the Workbench screen was opened, this function returns TRUE,
  6459.     otherwise it returns FALSE. 
  6460.  
  6461.     BUGS 
  6462.  
  6463.     SEE ALSO 
  6464.     WBenchToFront(), ScreenToFront()
  6465. intuition.library/WBenchToFront               intuition.library/WBenchToFront
  6466.  
  6467.     NAME 
  6468.     WBenchToFront -- Bring the Workbench screen in front of all screens.
  6469.  
  6470.     SYNOPSIS 
  6471.     Success = WBenchToFront() 
  6472.     D0
  6473.  
  6474.     BOOL WBenchToFront( VOID );
  6475.  
  6476.     FUNCTION 
  6477.     Causes the Workbench Screen, if it's currently opened, to come to 
  6478.     the foreground.  This does not 'move' the screen up or down, instead 
  6479.     only affects the depth-arrangement of the screen. 
  6480.  
  6481.     INPUTS 
  6482.     None 
  6483.  
  6484.     RESULT 
  6485.     If the Workbench screen was opened, this function returns TRUE,
  6486.     otherwise it returns FALSE. 
  6487.  
  6488.     BUGS 
  6489.  
  6490.     SEE ALSO 
  6491.     WBenchToBack(), ScreenToBack()
  6492. intuition.library/WindowLimits                 intuition.library/WindowLimits
  6493.  
  6494.     NAME
  6495.     WindowLimits -- Set the minimum and maximum limits of a window.
  6496.  
  6497.     SYNOPSIS
  6498.     Success = WindowLimits( Window, MinWidth, MinHeight, MaxWidth,
  6499.     D0                A0      D0        D1         D2
  6500.                             MaxHeight )
  6501.                             D3
  6502.  
  6503.     BOOL WindowLimits( struct Window *, WORD, WORD, UWORD, UWORD );
  6504.  
  6505.     FUNCTION
  6506.     Sets the minimum and maximum limits of the window's size.  Until this
  6507.     routine is called, the window's size limits are equal to the initial
  6508.     values established in the OpenWindow() function.
  6509.  
  6510.     After a call to this routine, the Window will be able to be sized
  6511.     to any dimensions within the specified limits.
  6512.     
  6513.     If you don't want to change any one of the dimensions, set the limit
  6514.     argument for that dimension to zero.  If any of the limit arguments 
  6515.     is equal to zero, that argument is ignored and the initial setting
  6516.     of that parameter remains undisturbed.
  6517.    
  6518.     If any of the arguments is out of range (minimums greater than the
  6519.     current size, maximums less than the current size), that limit
  6520.     will be ignored, though the others will still take effect if they
  6521.     are in range.  If any are out of range, the return value from this
  6522.     procedure will be FALSE.  If all arguments are valid, the return
  6523.     value will be TRUE.
  6524.  
  6525.     If you want your window to be able to become "as large as possible"
  6526.     you may put -1 (i.e. ~0) in either or both Max arguments.  But
  6527.     please note: screen sizes may vary for several reasons, and you
  6528.     must be able to handle any possible size of window you might end
  6529.     up with if you use this method.  Note that you can use the function
  6530.     GetScreenData() to find out how big the screen your window appears in
  6531.     is.  That function is particularly useful if your window is in
  6532.     the Workbench screen.  You may also refer to the WScreen field
  6533.     in your window structure, providing that your window remains open,
  6534.     which will ensure that the screen remains open, and thus the
  6535.     pointer remains valid.
  6536.  
  6537.     If the user is currently sizing this window, the new limits will
  6538.     not take effect until after the sizing is completed.
  6539.  
  6540.     INPUTS
  6541.     Window = pointer to a Window structure
  6542.     MinWidth, MinHeight, MaxWidth, MaxHeight = the new limits for the size
  6543.             of this window.  If any of these is set to zero, it will
  6544.             be ignored and that setting will be unchanged.
  6545.  
  6546.     RESULT
  6547.     Returns TRUE if everything was in order.  If any of the parameters was
  6548.     out of range (minimums greater than current size, maximums less than
  6549.     current size), FALSE is returned and the errant limit request is
  6550.     not fulfilled (though the valid ones will be).
  6551.  
  6552.     BUGS
  6553.  
  6554.     SEE ALSO
  6555.     GetScreenData()
  6556. intuition.library/WindowToBack                 intuition.library/WindowToBack
  6557.  
  6558.     NAME
  6559.     WindowToBack -- Ask Intuition to send a window behind others.
  6560.  
  6561.     SYNOPSIS
  6562.     WindowToBack( Window )
  6563.               A0
  6564.  
  6565.     VOID WindowToBack( struct Window * );
  6566.  
  6567.     FUNCTION
  6568.     This routine sends a request to Intuition asking to send the window 
  6569.     in back of all other windows in the screen.
  6570.  
  6571.     Note that the window will not be depth-arranged immediately, but rather 
  6572.     will be arranged the next time Intuition receives an input event, 
  6573.     which happens currently at a minimum rate of ten times per second,
  6574.     and a maximum of sixty times a second.  
  6575.  
  6576.     Remember that WFLG_BACKDROP windows cannot be depth-arranged.
  6577.  
  6578.     INPUTS
  6579.     Window = pointer to the structure of the window to be sent to the back
  6580.  
  6581.     RESULT
  6582.     None
  6583.  
  6584.     BUGS
  6585.  
  6586.     SEE ALSO
  6587.     MoveWindow(), SizeWindow(), WindowToFront(), MoveWindowInFrontOf()
  6588. intuition.library/WindowToFront               intuition.library/WindowToFront
  6589.  
  6590.     NAME
  6591.     WindowToFront -- Ask Intuition to bring a window to the front.
  6592.  
  6593.     SYNOPSIS
  6594.     WindowToFront( Window )
  6595.                    A0
  6596.  
  6597.     VOID WindowToFront( struct Window * );
  6598.  
  6599.     FUNCTION
  6600.     This routine sends a request to Intuition asking to bring the window 
  6601.     in front of all other windows in the screen.
  6602.  
  6603.     Note that the window will not be depth-arranged immediately, but rather 
  6604.     will be arranged the next time Intuition receives an input event, 
  6605.     which happens currently at a minimum rate of ten times per second,
  6606.     and a maximum of sixty times a second.  
  6607.  
  6608.     Remember that WFLG_BACKDROP windows cannot be depth-arranged.
  6609.  
  6610.     INPUTS
  6611.     Window = pointer to the structure of the window to be brought to front
  6612.  
  6613.     RESULT
  6614.     None
  6615.  
  6616.     BUGS
  6617.  
  6618.     SEE ALSO
  6619.     MoveWindow(), SizeWindow(), WindowToBack(), MoveWindowInFrontOf()
  6620. intuition.library/ZipWindow                       intuition.library/ZipWindow
  6621.  
  6622.     NAME
  6623.     ZipWindow -- Change window to "alternate" position and
  6624.                  dimensions. (V36)
  6625.  
  6626.     SYNOPSIS
  6627.     ZipWindow( Window )
  6628.            A0
  6629.  
  6630.     VOID ZipWindow( struct Window * );
  6631.  
  6632.     FUNCTION
  6633.     Changes the position and dimension of a window to the values
  6634.     at the last occasion of ZipWindow being called (or invoked
  6635.     via the "zoom" gadget).
  6636.  
  6637.     Typically this is used to snap between a normal, large, working
  6638.     dimension of the window to a smaller, more innocuous position
  6639.     and dimension.
  6640.  
  6641.     Like MoveWindow(), SizeWindow(), and ChangeWindowBox(), the action of
  6642.     this function is deferred to the Intuition input handler.
  6643.  
  6644.     More tuning needs to be done to establish initial values for
  6645.     the first invocation of this function for a window.  You can
  6646.     provide initial values using the OpenWindow() tag item
  6647.     WA_Zoom.
  6648.  
  6649.     It could also use a new name, but "ZoomWindow" is misleading,
  6650.     since "Zoom" normally implies "scale."
  6651.  
  6652.     The zoom gadget will appear (in the place of the old "toback"
  6653.     gadget) when you open your window if you either specify a
  6654.     sizing gadget or use WA_Zoom.
  6655.  
  6656.     You can detect that this function has taken effect by receiving
  6657.     an IDCMP_CHANGEWINDOW IDCMP message.
  6658.  
  6659.     INPUTS
  6660.     Window -- window to be changed.
  6661.  
  6662.     RESULT
  6663.     None
  6664.  
  6665.     BUGS
  6666.     OpenWindow() assumes that the proper default "other" dimensions
  6667.     are "full size."
  6668.  
  6669.     SEE ALSO
  6670.     ChangeWindowBox(), MoveWindow(), SizeWindow()
  6671.