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