ActivateGadget

SYNOPSIS

    ActivateGadget(gadget, window, requester)
    BOOL ActivateGadget(struct Gadget *, struct Window *, struct Requester *);

DESCRIPTION

    Activates the specified gadget

INPUTS

    gadget - The gadget to activate
    window - The window which contains the gadget
    requester - The requester which contains the gadget or
        NULL if it is not a requester gadget

ActivateWindow

SYNOPSIS

    ActivateWindow(window)
    void ActivateWindow(struct Window *);

DESCRIPTION

    Activates the specified window. The window gets the focus
    and all further input it sent to that window. If the window
    requested it, it will get a IDCMP_ACTIVEWINDOW message

INPUTS

    window - The window to activate

RESULT

    None

NOTES

    If the user has an autopointer tool (sunmouse), the call will
    succeed, but the tool will deactivate the window right after
    this function has activated it. It is no good idea to try to
    prevent this by waiting for IDCMP_INACTIVEWINDOW and activating
    the window again since that will produce an anoying flicker and
    it will slow down the computer a lot.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

AddClass

SYNOPSIS

    AddClass(classPtr)
    void AddClass(struct IClass *);

DESCRIPTION

    Makes a class publically usable. This function must not be called
    before MakeClass

INPUTS

    class - The result of MakeClass

RESULT

    None

NOTES

    Do not use this function for private classes.

BUGS

    There is no protection against creating multiple classes with
    the same name yet. The operation of the system is undefined
    in this case.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

AddGList

SYNOPSIS

    AddGList(window, gadget, position, numGad, requester)
    UWORD AddGList(struct Window*, struct Gadget*, ULONG, LONG, struct Requester *);

DESCRIPTION

    Add some gadgets to a window

INPUTS

    window - Add gadgets to this window
    gadget - This is the list of gadgets to add
    position - Where to insert the gadgets in the list of gadgets
        already in the window. Use 0 to insert the gadgets
        before all others in the window or ~0 to append them.
    numGad - How many gadgets of the list should be added.
        Use -1 to add all gadgets in the list.
    requester - Pointer to the requester structure if the window is
        a requester

RESULT

    The actual position where the gadgets were inserted

NOTES

    The gadgets will just be added. To make them visible, you must
    refresh the window or the gadgets.

SEE ALSO

AddGadget

SYNOPSIS

    AddGadget(window, gadget, position)
    UWORD AddGadget(struct Window *, struct Gadget *, ULONG);

DESCRIPTION

    Adds a single gadget to a window

INPUTS

    window - Add gadget to this window
    gadget - Add this gadget
    position - The position to add the gadget in the list of
        gadgets already in the window. Use 0 to insert the
        gadget before all others or ~0 to append it to the
        list

RESULT

    The position where the gadget was really inserted

NOTES

    This just adds the gadget to the list. It will not be visible
    until you refresh the window.

AllocRemember

SYNOPSIS

    AllocRemember(rememberKey, size, flags)
    APTR AllocRemember(struct Remember **, ULONG, ULONG);

DESCRIPTION

    Allocate some memory and remeber it in the Remeber-List

INPUTS

    rememberKey - Store information in this list
    size - How many bytes to allocate
    flags - Attributes (see AllocMem

RESULT

    Pointer to the allocated memory or NULL

AllocScreenBuffer

SYNOPSIS

    AllocScreenBuffer(screen, bitmap, flags)
    struct ScreenBuffer * AllocScreenBuffer(struct Screen *, struct BitMap *, ULONG);

DESCRIPTION

    Allocate a ScreenBuffer (and BitMap) for double or multiple
    buffering in Intuition screens. Use this function to obtain a
    ScreenBuffer for the screen's initial BitMap and for all other
    BitMaps you want to swap in.

    This function also allocates a DBufInfo from graphics.library
    The returned ScreenBuffer contains a pointer to that DBufInfo.
    See graphics.library/AllocDBufInfo() for more information on
    how to use this struct to obtain info when it is safe to render
    into an old buffer and when to switch

INPUTS

    screen - Screen to double-buffer
    bitmap - You may pre-allocate a BitMap for CUSTOMBITMAP screens,
        and pass the pointer to get a ScreenBuffer referring to it.
        If you specify NULL, intuition will allocate the BitMap for
        you. For non-CUSTOMBITMAP screens this parameter must be NULL.
    flags - A combination of these flags:
        SB_SCREEN_BITMAP for non-CUSTOMBITMAP screens to get a
        ScreenBuffer referring to the screen's actual BitMap
        (For CUSTOMBITMAP screens just pass the BitMap you used for
        OpenScreen() as the bitmap parameter)
        SB_COPY_BITMAP to copy the screen's BitMap intto the
        ScreenBuffer's BitMap. Use this to get intuition rendered
        stuff into your bitmap (such as menu-bars or gadgets).
        May be omitted if the screen has no intuition rendered stuff,
        as well as for allocating a ScreenBuffer for the screen's
        initial BitMap

RESULT

    Pointer to the allocated ScreenBuffer or NULL if function failed

NOTES

    You may render into the resulting BitMap.
    Use the sb_DBufInfo field to access graphics.library's ViewPort
    buffering features to e.g check if it is safe to reuse the previous
    BitMap. Otherwise you risk to write into the on-screen BitMap and
    damage menu or gadget rendering.

SEE ALSO

AlohaWorkbench

SYNOPSIS

    AlohaWorkbench(wbmsgport)
    void AlohaWorkbench(struct MsgPort *);

DESCRIPTION

        The WorkBench program wants to call this function to signal
        Intuition that it is active or shutting down.
        Intuition then uses the MsgPort to tell the WorkBench to open or
        close its windows if the user called OpenWorkbench() or
        CloseWorkbench().

        When the MsgPort is non-NULL Intuition will send IntuiMessages to
        it with the Class field set to WBENCHMESSAGE and Code field set to
        either WBENCHOPEN or WBENCHCLOSE. Intuition assumes that when the
        WorkBench task replies this messages, it already has opened/closed
        its windows

INPUTS

        wbmsgport - The MsgPort of the (initialized) WorkBench task or
                    NULL if the task is shutting down

RESULT

        None

NOTES

        This function is obsolete and should not be used directly by the
        Workbench Application. Use workbench.library/RegisterWorkbench()
        instead!

SEE ALSO

  • workbench.library/RegisterWorkbench

AutoRequest

SYNOPSIS

    AutoRequest(window, body, posText, negText, pFlag, nFlag, width, height)
    BOOL AutoRequest(struct Window*, struct IntuiText *, struct IntuiText *, struct IntuiText *, ULONG, ULONG, ULONG, ULONG);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

BeginRefresh

SYNOPSIS

    BeginRefresh(window)
    void BeginRefresh(struct Window *);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

BuildEasyRequestArgs

SYNOPSIS

    BuildEasyRequestArgs(RefWindow, easyStruct, IDCMP, Args)
    struct Window * BuildEasyRequestArgs(struct Window *, struct EasyStruct *, ULONG, APTR);

DESCRIPTION

    Opens a requester, which provides one or more choices. The control is
    returned to the application after the requester was opened. It is
    handled by subsequent calls to SysReqHandler() and closed by calling
    FreeSysRequest

INPUTS

    RefWindow - A reference window. If NULL, the requester opens on
            the default public screen.
    easyStruct - The EasyStruct structure (<intuition/intuition.h>),
             which describes the requester.
    IDCMP - IDCMP flags, which should satisfy the requester, too. This is
        useful for requesters, which want to listen to disk changes,
        etc. Note that this is not a pointer to the flags as in
        EasyRequestArgs().
    Args - The arguments for easyStruct->es_TextFormat

RESULT

    Returns a pointer to the requester. Use this pointer only for calls
    to SysReqHandler() and FreeSysRequest

SEE ALSO

BuildSysRequest

SYNOPSIS

    BuildSysRequest(window, bodytext, postext, negtext, IDCMPFlags, width, height)
    struct Window * BuildSysRequest(struct Window *, struct IntuiText *, struct IntuiText *, struct IntuiText *, ULONG, WORD, WORD);

INPUTS

    window - The window in which the requester will appear
    bodytext - The Text to be shown in the body of the requester
    postext - The Text to be shown in the positive choice gadget
    negtext - The Text to be shown in the negative choice gadget
    IDCMPFlags - The IDCMP Flags for this requester
    width, height - The dimensions of the requester

SEE ALSO

ChangeScreenBuffer

SYNOPSIS

    ChangeScreenBuffer(screen, screenbuffer)
    ULONG ChangeScreenBuffer(struct Screen *, struct ScreenBuffer *);

DESCRIPTION

    Do double or multiple buffering on an intuition screen in an
    intuition-cooperative way.
    The ScreenBuffer's BitMap will be installed on the specifies screen,
    if possible.
    After a signal from graphics.library, the previously installed
    BitMap will be available for re-use.
    Consult graphics.library/AllocDBufInfo() and
    graphics.library/ChangeVPBitMap() for further information

INPUTS

    screen - The screen this screenbuffer belongs to
    screenbuffer - The screenbuffer obtained by AllocScreenBuffer

RESULT

    Non-zero if fuction succeeded, or zero if operation could not be
    performed, eg. if user selects menus or gadgets

NOTES

    You need not re-install the original ScreenBuffer before closing
    a screen. Just FreeScreenBuffer() all buffers used for that screen.

SEE ALSO

ChangeWindowBox

SYNOPSIS

    ChangeWindowBox(window, left, top, width, height)
    void ChangeWindowBox(struct Window *, LONG, LONG, LONG, LONG);

DESCRIPTION

    Set the new position and size of a window in one call

INPUTS

    window - Change this window
    left, top - New position
    width, height - New size

NOTES

    This call is deferred. Wait() for IDCMP_CHANGEWINDOW if your
    program depends on the new size.

ClearDMRequest

SYNOPSIS

    ClearDMRequest(window)
    BOOL ClearDMRequest(struct Window *);

INPUTS

    window - The window from which the DMRequest is to be cleared

SEE ALSO

ClearMenuStrip

SYNOPSIS

    ClearMenuStrip(window)
    void ClearMenuStrip(struct Window *);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

ClearPointer

SYNOPSIS

    ClearPointer(window)
    void ClearPointer(struct Window *);

DESCRIPTION

    Reset the mousepointer of this window to the default one.
    If the window is active during this call the pointer will
    immediately change its shape.
    Set custom mousepointers with SetPointer

INPUTS

    window - The window of which the mousepointer will be cleared

SEE ALSO

CloseScreen

SYNOPSIS

    CloseScreen(screen)
    BOOL CloseScreen(struct Screen *);

DESCRIPTION

    Release all resources held by a screen and close it down visually

INPUTS

    screen  --  pointer to the screen to be closed

RESULT

    TRUE if the screen is successfully closed, FALSE if there were still
    windows left on the screen (which means the screen is not closed

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

CloseWindow

SYNOPSIS

    CloseWindow(window)
    void CloseWindow(struct Window *);

DESCRIPTION

    Closes a window. Depending on the display, this might not happen
    at the time when this function returns, but you must not use
    the window pointer after this function has been called

INPUTS

    window - The window to close

RESULT

    None

NOTES

    The window might not have been disappeared when this function returns.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

CloseWorkBench

DESCRIPTION

    Attempt to close the Workbench screen:
    - Check for open application windows. return FALSE if there are any
    - Clean up all special buffers
    - Close the Workbench screen
    - Make the Workbench program mostly inactive
      (disk activity will still be monitored)
    - Return TRUE

SEE ALSO

CurrentTime

SYNOPSIS

    CurrentTime(seconds, micros)
    void CurrentTime(ULONG *, ULONG *);

DESCRIPTION

    Copies the current time into the argument pointers

INPUTS

    seconds - ptr to ULONG varaible which will contain the current
        seconds after function call
    micros - ptr to ULONG varaible which will contain the current
        microseconds after function call

RESULT

    Copies the time values to the memory the arguments point to
    Return value is not set

NOTES

    Makes use of timer.library/timer.device

SEE ALSO

DisplayAlert

SYNOPSIS

    DisplayAlert(alertnumber, string, height)
    BOOL DisplayAlert(ULONG, UBYTE*, UWORD);

DESCRIPTION

    Bring up an alert with the given message.
    A system recoverable alert is a RECOVERY_ALERT which waits until
    the user presses a mouse button. The display is then restored and
    a boolean value will be returned showing if the has pressed the
    left mouse button.
    A DEADEND_ALERT is an alert from which the system cannot recover.
    This alert immediately returns with FALSE after creating the
    alert display.
    If the system can not get enough memory for a RECOVERY_ALERT,
    this function returns FALSE

INPUTS

    alertnumber - The
    string - The
    height - The

RESULT

    Always FALSE if DEADEND_ALERT. RECOVERY_ALERT returns TRUE if
    the user pressed the left mouse button and FALSE for other
    mouse button or if the alert could not be posted

DisplayBeep

SYNOPSIS

    DisplayBeep(screen)
    void DisplayBeep(struct Screen *);

DESCRIPTION

    The Amiga has no internal speaker, so it flashes the background
    color of the specified screen as a signal. If the argument is
    NULL all screens will be flashed

INPUTS

    screen - The Screen that will be flashed.
        If NULL all screens will flash

INTERNALS

    Hardware with a speaker should make an audible beep, too.
    Maybe even leave out the flashing on those architectures.

DisposeObject

SYNOPSIS

    DisposeObject(object)
    void DisposeObject(APTR);

DESCRIPTION

    Deletes a BOOPSI object. All memory associated with the object
    is freed. The object must have been created with NewObject().
    Some object contain other object which might be freed as well
    when this function is used on the "parent" while others might
    also contain children but won't free them. Read the documentation
    of the class carefully to find out how it behaves

INPUTS

    object - The result of a call to NewObject() or a similar function,
         may be NULL

RESULT

    None

NOTES

    This functions sends OM_DISPOSE to the oejct.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

DoGadgetMethodA

SYNOPSIS

    DoGadgetMethodA(gad, win, req, msg)
    IPTR DoGadgetMethodA(struct Gadget*, struct Window*, struct Requester *, Msg);

DESCRIPTION

    Invokes a boopsi method on a object with a GadgetInfo derived from
    the supplied window or requester parameter

INPUTS

    gad - The gadget to work on
    win - The window which contains the gadget or the requester with
        the gadgets.
    req - If the gadget is in a requester, you must specify that one,
        too.
    message - Send this message to the gadget

RESULT

    The result depends on the contents of the message sent to the
    gadget

INTERNALS

    I have derived from a simular function from ClassAct where I have
    to "fake" the function which is not implemented under OS 2.04.
    There are likely a few differences between this routine and the
    real code, but this gets the job done.

    One thing to note, the Amiga Rom routinecauses some form of
    (layer?) locking. I presume the point of the lock is to avoid
    removing the gadget from the window durring a refresh, or to avoid
    resizing the window durring refresh, etc.

    This locking is fairly obvious within Workbench itself. When
    refreshing most any boopsi gadget(s) via RefreshGList() and you try
    to drag a Workbench icon you will get stuck in a layer lock.
    Workbench has a deadlock timer and is smart enough to release the
    lock and abort the drag. With this routine below this locking does
    not occur. Some might call it a good thing, however the issue
    should be revisited once more of Intuition has been implemented -
    if it hasn't been already?!. :)

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h
    25-10-96    calid   submitted the code

DoubleClick

SYNOPSIS

    DoubleClick(sSeconds, sMicros, cSeconds, cMicros)
    BOOL DoubleClick(ULONG, ULONG, ULONG, ULONG);

DESCRIPTION

    Check if two times are within the doubleclick intervall

INPUTS

    sSeconds, sMicros - Seconds and microseconds of the first event.
    cSeconds, cMicros - Seconds and microseconds of the second event

RESULT

    TRUE if the times are within the doubleclick intervall, FALSE
    otherwise

DrawBorder

SYNOPSIS

    DrawBorder(rp, border, leftOffset, topOffset)
    void DrawBorder(struct RastPort *, struct Border *, LONG, LONG);

DESCRIPTION

    Draws one or more borders in the specified RastPort. Rendering
    will start at the position which you get when you add the offsets
    leftOffset and topOffset to the LeftEdge and TopEdge specified
    in the Border structure. All coordinates are relative to that point

INPUTS

    rp - The RastPort to render into
    border - Information what and how to render
    leftOffset, topOffset - Initial starting position

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

EXAMPLE

    // Draw a house with one stroke
    // The drawing starts at the lower left edge
    WORD XY[] =
    {
        10, -10,
        10,   0,
         0, -10,
        10, -10,
         5, -15,
         0, -10,
         0,   0,
        10,   0,
    };
    struct Border demo =
    {
        100, 100,   // Position
        1, 2,   // Pens
        JAM1,   // Drawmode
        8,      // Number of pairs in XY
        XY,     // Vector offsets
        NULL    // No next border
    };

    // Render the house with the bottom left edge at 150, 50
    DrawBorder (rp, &demo, 50, -50

DrawImage

SYNOPSIS

    DrawImage(rp, image, leftOffset, topOffset)
    void DrawImage(struct RastPort *, struct Image*, LONG, LONG);

DESCRIPTION

    Draw an image

INPUTS

    rp - The RastPort to render into
    image - The image to render
    leftOffset, topOffset - Where to place the image

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

DrawImageState

SYNOPSIS

    DrawImageState(rp, image, leftOffset, topOffset, state, drawInfo)
    void DrawImageState(struct RastPort *, struct Image*, LONG, LONG, ULONG, struct DrawInfo *);

DESCRIPTION

    This function renders an image in a certain state

INPUTS

    rp - Render in this RastPort
    image - Render this image
    leftOffset, topOffset - Add this offset to the position stored in the
        image.
    state - Which state (see intuition/imageclass.h for possible
        valued).
    drawInfo - The DrawInfo from the screen

RESULT

    None

NOTES

    DrawImageState(), handles both boopsi and conventional images.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

DumpIntuiState

DESCRIPTION

    Private: dump the internal state of intuition

RESULT

        none

EasyRequestArgs

SYNOPSIS

    EasyRequestArgs(window, easyStruct, IDCMP, argList)
    LONG EasyRequestArgs(struct Window *, struct EasyStruct *, ULONG *, APTR);

DESCRIPTION

    Opens and handles a requester, which provides one or more choices.
    It blocks the application until the user closes the requester.
    Returned is a integer indicating which gadget had been selected

INPUTS

    Window - A reference window. If NULL, the requester opens on
         the default public screen.
    easyStruct - The EasyStruct structure (<intuition/intuition.h>),
             which describes the requester.
    IDCMP_Ptr - Pointer to IDCMP flags, which satisfy the requester,
            too. This is useful for requesters, which want to
            listen to disk changes, etc. The contents of this
            pointer is set to the IDCMP flag, which caused the
            requester to close. This pointer may be NULL.
    ArgList - The arguments for easyStruct->es_TextFormat

RESULT

    -1, if one of the IDCMP flags of idcmpPTR was set.
     0, if the rightmost button was clicked or an error occured.
     n, if the n-th button from the left was clicked

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

EndRefresh

SYNOPSIS

    EndRefresh(window, complete)
    void EndRefresh(struct Window *, BOOL);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

EndRequest

SYNOPSIS

    EndRequest(requester, window)
    void EndRequest(struct Requester *, struct Window *);

DESCRIPTION

    Remove a requester from the specified window.
    Other open requesters of this window stay alive

INPUTS

    requester - The requester to be deleted
    window - The window to which the requester belongs

RESULT

    None

SEE ALSO

EraseImage

SYNOPSIS

    EraseImage(rp, image, leftOffset, topOffset)
    void EraseImage(struct RastPort *, struct Image*, LONG, LONG);

DESCRIPTION

    Erase an image on the screen

INPUTS

    rp - Render in this RastPort
    image - Erase this image
    leftOffset, topOffset - Add this offset the the position in the
        image

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h
    23-10.96    aldi    commited the code

SEE ALSO

FreeClass

SYNOPSIS

    FreeClass(classPtr)
    BOOL FreeClass(struct IClass *);

DESCRIPTION

    Only for class implementatores.

    Tries to free a class which has been created with MakeClass() in the
    first place. This will not succeed in all cases: Classes which
    still have living objects or which are still beeing used by subclasses
    can't simply be freed. In this case this call will fail.

    Public classes will always be removed with RemoveClass() no matter
    if FreeClass() would succeed or not. This gurantees that after the
    call to FreeClass() no new objects can be created.

    If you have a pointer to allocated memory in cl_UserData, you must
    make a copy of that pointer, call FreeClass() and if the call
    succeeded, you may free the memory. If you don't follow these rules,
    you might end up with a class which is partially freed

INPUTS

    classPtr - The pointer you got from MakeClass

RESULT

    FALSE if the class couldn't be freed at this time. This can happen
    either if there are still objects from this class or if the class
    is used a SuperClass of at least another class.

    TRUE if the class could be freed. You must not use classPtr after
    that

NOTES

    *Always* calls RemoveClass().

INTERNALS

    MakeClass(), "Basic Object-Oriented Programming System for Intuition"
    and "boopsi Class Reference" Dokument.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

EXAMPLE

    // Free a public class with dynamic memory in cl_UserD

    int freeMyClass (Class * cl)
    {
        struct MyPerClassData * mpcd;

        mpcd = (struct MyPerClassData *)cl->cl_UserData;

        if (FreeClass (cl)
        {
        FreeMem (mpcd, sizeof (struct MyPerClassData));
        return (TRUE);
        }

        return (FALSE

FreeMonitorList

SYNOPSIS

    FreeMonitorList(list)
    void FreeMonitorList(ULONG *);

DESCRIPTION

    Frees the monitor list allocated with GetMonitorList

INPUTS

    list - monitor list

NOTES

    OM_RETAIN a monitor object before calling FreeMonitorList to extend
    its lifetime

EXAMPLE

    Object *firstmonitor = NULL;
    Object **list = GetMonitorList(NULL);
    if (list)
    {
        // keep ownership of the first monitor object
        firstmonitor = DoMethod(list[0], OM_RETAIN);

        // release the monitor list
        FreeMonitorList();
    }

    GetAttr(MA_MonitorName, firstmonitor, &name);
    ...

    // release ownership of the monitor object
    DoMethod(firstmonitor, OM_RELEASE

SEE ALSO

FreeMonitorModesList

SYNOPSIS

    FreeMonitorModesList(list)
    void FreeMonitorModesList(ULONG *);

DESCRIPTION

    Frees the monitor list modes allocated with GetMonitorModesList

INPUTS

    list - monitor list

RESULT

    Releases the associated list memory and calls OM_RELEASE on all mode
    objects

NOTES

    OM_RETAIN a mode object before calling FreeMonitorModesList to extend
    its lifetime

HISTORY

    Available from intuition v60.34

SEE ALSO

FreeRemember

SYNOPSIS

    FreeRemember(rememberKey, reallyForget)
    void FreeRemember(struct Remember **, LONG);

HISTORY

    27-11-96    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

FreeScreenBuffer

SYNOPSIS

    FreeScreenBuffer(screen, screenbuffer)
    void FreeScreenBuffer(struct Screen *, struct ScreenBuffer *);

DESCRIPTION

    Frees a ScreenBuffer allocated by AllocScreenBuffer() and releases
    associated resources. You have to call this before closing your
    screen

INPUTS

    screen - The screen this screenbuffer belongs to
    screenbuffer - The screenbuffer obtained by AllocScreenBuffer()
        It is safe to pass NULL

RESULT

    None

NOTES

    When used SB_SCREEN_BITMAP on allocating the ScreenBuffer
    (ie. the ScreenBuffer only refers to the screen's BitMap) you must
    FreeScreenBuffer() the ScreenBuffer before closing the screen.
    Intuition will recognize when FreeScreenBuffer() is called for the
    currently installed ScreenBuffer that it must not free the BitMap.
    This is left to the CloseScreen() function.

SEE ALSO

FreeScreenDrawInfo

SYNOPSIS

    FreeScreenDrawInfo(screen, drawInfo)
    void FreeScreenDrawInfo(struct Screen *, struct DrawInfo *);

DESCRIPTION

    Tell intuition that you have finished work with struct DrawInfo
    returned by GetScreenDrawInfo

INPUTS

    screen - The screen you passed to GetScreenDrawInfo()
    drawInfo - The DrawInfo structure returned by GetScreenDrawInfo

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

FreeSysRequest

SYNOPSIS

    FreeSysRequest(window)
    void FreeSysRequest(struct Window *);

DESCRIPTION

    Frees a requester made with BuildSysRequest() or
    BuildEasyRequestArgs

INPUTS

    Window - The requester to be freed. May be NULL or 1

BUGS

    BuildSysRequest() requesters not supported, yet.

SEE ALSO

GadgetMouse

SYNOPSIS

    GadgetMouse(gadget, ginfo, mousepoint)
    void GadgetMouse(struct Gadget *, struct GadgetInfo *, WORD*);

DESCRIPTION

    Determines the current mouse position relative to the upper-left
    corner of a cusrom gadget.
    It is recommended not to call this function

INPUTS

    gadget - The gadget to take as origin
    ginfo - The GadgetInfo structure as passed to the custom gadget hook routine
    mousepoint - Pointer to an array of two WORDs or a structure of type Point

RESULT

    None. Fills in the two WORDs pointed to by mousepoint

NOTES

    This function is useless, because programs which need this information
    can get it in a cleaner way.
    It is recommended not to call this function!

GetAttr

SYNOPSIS

    GetAttr(attrID, object, storagePtr)
    ULONG GetAttr(ULONG, Object *, IPTR *);

DESCRIPTION

    Asks the specified object for the value of an attribute. This is not
    possible for all attributes of an object. Read the documentation for
    the class to find out which can be read and which can't

INPUTS

    attrID - ID of the attribute you want
    object - Ask the attribute from this object
    storagePtr - This is a pointer to memory which is large enough
        to hold a copy of the attribute. Most classes will simply
        put a copy of the value stored in the object here but this
        behaviour is class specific. Therefore read the instructions
        in the class description carefully

RESULT

    Mostly TRUE if the method is supported for the specified attribute
    and FALSE if it isn't or the attribute can't be read at this time.
    See the classes documentation for details

NOTES

    This function sends OM_GET to the object.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

GetDefPrefs

SYNOPSIS

    GetDefPrefs(prefbuffer, size)
    struct Preferences * GetDefPrefs(struct Preferences *, WORD);

DESCRIPTION

    Gets a copy of the Intuition default Preferences structure

INPUTS

    prefbuffer - The buffer which contains your settings for the
        preferences.
    size - The number of bytes of the buffer you want to be copied

RESULT

    Returns your parameter buffer

SEE ALSO

GetDefaultPubScreen

SYNOPSIS

    GetDefaultPubScreen(nameBuffer)
    struct Screen * GetDefaultPubScreen(UBYTE *);

DESCRIPTION

    Returns the name of the current default public screen.
    This will be "Workbench" if there is no default public screen

INPUTS

    nameBuffer - A buffer of length MAXPUBSCREENNAME

RESULT

    None

NOTES

    Only Public Screen Manager utilities want to use this function
    since it is easy to open a window on the default public screen
    without specifying a name.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

GetDrawInfoAttr

SYNOPSIS

    GetDrawInfoAttr(drawinfo, attr, errorPtr)
    ULONG GetDrawInfoAttr(struct DrawInfo *, ULONG, IPTR *);

DESCRIPTION

        Gets a specified DrawInfo attribute. This function should be used to access
        all new fields on DrawInfo as well as old ones

INPUTS

        DInfo = a valid DrawInfo * or NULL to get Intuition defaults.
        Attribute = one od attributes as defined in intuition/diattr.h.
        ErrorPtr = storage for an error indicator, may be NULL. This function is
                   unlikely to fail if you pass a valid Attribute.
        -----------------------------------------------------------------------------
        GDIA_Color - ask for XXRRGGBB color value of a system pen. The pen codes
                     are defined in intuition/diattr.h and are encoded into this
                     command (see examples below). Returns FAIL if the supplied
                     DrawInfo doesn't allow directcolor, works with NULL DrawInfo.

        GDIA_Pen   - ask for pen number of a system pen. The pen codes are defined
                     in intuition/diattr.h and are encoded into this command (see
                     examples below). Works with NULL DrawInfo.

        GDIA_Version - returns DrawInfo version number.

        GDIA_NumPens - returns number of pens/colors defined in DrawInfo.

        GDIA_DirectColor - returns TRUE if current DrawInfo/Screen supports
                      directcolor (more than 8 bit depth).

        GDIA_Font    - returns DrawInfo font.

        GDIA_Depth   - returns DrawInfo/Screen depth.

        GDIA_CheckMark - returns default checkmark object. This DrawInfo attribute
                       is OBSOLETE and should not be used.

        GDIA_MenuKey - returns default menukey object. GDIA_CheckMark notes apply.

        GDIA_ResolutionX
        GDIA_ResolutionY - returns pixel aspect for DrawInfo/Screen

RESULT

        Result - depending on Attribute value

BUGS

        Prior to intuition.library 50.74 GDOA_Depth returned 8 for hi/true screens. Please note
        that struct DrawInfo * read directly will still have this field set to 8 for compatibility
        reasons.

EXAMPLE

        color = GetDrawInfoAttr(dri,GDIA_Color|DRIPEN_DETAIL,0);
        pen = GetDrawInfoAttr(NULL,GDIA_Pen|DRIPEN_DETAIL,&error

SEE ALSO

  • graphics/rpattr.h

GetMonitorList

SYNOPSIS

    GetMonitorList(taglist)
    ULONG * GetMonitorList(struct TagItem *);

DESCRIPTION

    Returns a NULL terminated array of monitor objects installed in system.
    Monitors are normal BOOPSI objects, read the monitor class autodoc for
    details

INPUTS

    taglist - Taglist ptr for possible future extensions
        GMLA_DisplayID - limit the list to monitors matching the given IDs

RESULT

    Pointer to NULL terminated montior list

NOTES

    There is no notification system when new monitors are added to the OS, but
    due to current OS internals no new monitors may be added after IPrefs is called.
    Monitors can NOT be removed from OS once installed - it's safe to use this
    list all the time once you've obtained it.

HISTORY

    51.45, added support for GMLA_DisplayID

EXAMPLE

    See the included sources/monitors.c

SEE ALSO

GetMonitorMode

SYNOPSIS

    GetMonitorMode(, width, height, depth, taglist)
    ULONG * GetMonitorMode(CONST, LONG, LONG, LONG, struct TagItem *);

DESCRIPTION

    Returns a Mode object best matching specified parameters

INPUTS

    monitorName - pointer to a monitor name (or NULL)
    width - requested screen width (or -1 to find best width)
    height - requested screen width (or -1 to find best height)
    depth - requested screen width (or -1 to find best depth)
    taglist - Taglist ptr for possible future extensions

RESULT

    Pointer to a Boopsi mode object. Release the object by calling
    OM_RELEASE

HISTORY

    Available from intuition v60.34

SEE ALSO

  • intuition/monitors.h

GetMonitorModesList

SYNOPSIS

    GetMonitorModesList(monitor, taglist)
    ULONG * GetMonitorModesList(Boopsiobject *, struct TagItem *);

DESCRIPTION

    Returns a NULL terminated array of monitor screen mode objects

INPUTS

    monitor - pointer to a monitor object obtained via GetMonitorList
    taglist - Taglist ptr for possible future extensions

RESULT

    Pointer to NULL terminated montior modes list

HISTORY

    Available from intuition v60.34

EXAMPLE

    See the included sources/monitors.c

SEE ALSO

GetPrefs

SYNOPSIS

    GetPrefs(prefbuffer, size)
    struct Preferences * GetPrefs(struct Preferences *, WORD);

DESCRIPTION

    Gets a copy of the current Preferences structure

INPUTS

    prefbuffer - The buffer which contains your settings for the
        preferences.
    size - The number of bytes of the buffer you want to be copied

RESULT

    Returns your parameter buffer

SEE ALSO

GetScreenData

SYNOPSIS

    GetScreenData(buffer, size, type, screen)
    LONG GetScreenData(APTR, ULONG, ULONG, struct Screen *);

DESCRIPTION

    Copy part or all infos about a screen into a private buffer.

    To copy the Workbench, one would call

        GetScreenData (buffer, sizeof(struct Screen), WBENCHSCREEN, NULL)

    If the screen is not open, this call will open it. You can use
    this function for these purposes:

    1) Get information about the workbench in order to open a window
       on it (eg. size).
    2) Clone a screen

INPUTS

    buffer - The data gets copied here
    size - The size of the buffer in bytes
    type - The type of the screen as in OpenWindow().
    screen - Ignored unless type is CUSTOMSCREEN

RESULT

    TRUE if successful, FALSE if the screen could not be opened

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

GetScreenDrawInfo

SYNOPSIS

    GetScreenDrawInfo(screen)
    struct DrawInfo * GetScreenDrawInfo(struct Screen *);

DESCRIPTION

    Returns a pointer to struct DrawInfo of the passed screen.
    This data is READ ONLY. The version of the struct DrawInfo
    is given in the dri_Version field

INPUTS

    screen - The screen you want to get the DrawInfo from.
        Must be valid and open

RESULT

    Returns pointer to struct DrawInfo defined in intuition/screens.h

NOTES

    Call FreeScreenDrawInfo() after finishing using the pointer.
    This function does not prevent the screen from being closed.

INTERNALS

    Only returns the pointer.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

GetSkinInfoAttr

SYNOPSIS

    GetSkinInfoAttr(dri, attr, taglist)
    ULONG GetSkinInfoAttr(struct DrawInfo *, ULONG, struct TagItem *);

DESCRIPTION

        Get GUI elements sizes to layout window contents properly. If you use this
        function please make sure you open your windows with WA_SkinInfo tag passed.
        It is strongly recommended that you use this function everywhere in your
        code!

        The main purpose of this function is to allow proper gadget/other window
        contents layouting BEFORE opening the window. After the window gets opened
        you can safely read struct Window dimmensions. You MUST always use this
        function to read Screen's titlebar height

INPUTS

        DInfo = valid DrawInfo pointer.
        Attribute = one of attributes as described in intuition/extensions.h
        TagList = taglist for additional attributes. No tags defined at the moment.
        -----------------------------------------------------------------------------
        SI_BorderTop  - returns top border height of windows opened on supplied
                        DrawInfo/Screen.

        SI_BorderTopTitle - same as SI_BorderTop except that it adds window's title
                        height into account.

        SI_BorderLeft - returns left border width.

        SI_BorderRight - returns right border width.

        SI_BorderRightSize - returns the width of right border when you use a size
                        gadget and window is WFLG_SIZEBRIGHT

        SI_BorderBottom - returns bottom border height.

        SI_BorderBottomSize - returns bottom border height when you use a size gadget
                        and window is WFLG_SIZEBBOTTOM

        SI_ScreenTitlebarHeight - returns the actual screen titlebar height (no need
                        to add the additional pixel here!). screen->BarHeight doesn't
                        contain the actual height with disappearing or disabled
                        titlebar for compatibility reasons.

        SI_RightPropWidth - use this width to place a vertical scroller in right
                        window border.

        SI_BottomPropHeight - use this height to place a horizontal scroller in
                        bottom window border.

        SI_RightArrowBox - this is the total height of 2 arrows placed on window
                        border. Useful when calculating prop gadget RelHeight.

        SI_RightArrowBox - this is the total width of 2 arrows placed on window
                        border. Useful when calculating prop gadget RelWidth

RESULT

        Result - depending on Attribute, NULL if DrawInfo is NULL or the Attribute is
                 unknown

SEE ALSO

  • Intuition V50 programming style guide
  • point 2.3 - 2.5 sources/window.c

HIDInput

DESCRIPTION

    Resets the blanker on HID input events (joysticks, etc). For stuff that
    doesn't go through input.device

HelpControl

SYNOPSIS

    HelpControl(window, flags)
    void HelpControl(struct Window *, ULONG);

DESCRIPTION

    Turn on or off Gadget-Help for your window. Gadget-Help will also
    be changed for all members of the same help-group to make
    multiple-windows apps to behave well

INPUTS

    window - The window to affect. All windows of the same help-goup will
        be affected as well.
    flags - HC_GADGETHELP or zero for turning help on or off

RESULT

    None. Toggles gadget-help of one or more windows to on or off

SEE ALSO

HideWindow

SYNOPSIS

    HideWindow(window)
    VOID HideWindow(struct Window *);

DESCRIPTION

        Make a window invisible

INPUTS

    window - The window to affect

IKill

SYNOPSIS

    IKill(window)
    VOID IKill(struct Window *);

DESCRIPTION

        This function is OBSOLETE and should not be called. To preserve
    compatibility with old programs, calling this function is a no-op

INPUTS

    requester - The struct Requester to be initialized

RESULT

    None

NOTES

        This function is obsolete.

SEE ALSO

IntuiTextLength

SYNOPSIS

    IntuiTextLength(iText)
    LONG IntuiTextLength(struct IntuiText *);

DESCRIPTION

    Measure the length of the IntuiText passed to the function. Further
    IntuiTexts in iText->NextText are ignored. The length is measured in
    pixels

INPUTS

    iText - The size of this text. If iText->ITextFont contains NULL,
        the systems font is used (and *not* the font of the currently
        active screen

RESULT

    The width of the text in pixels

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

IsWindowVisible

SYNOPSIS

    IsWindowVisible(window)
    LONG IsWindowVisible(struct Window *);

DESCRIPTION

        Check whether a window is visible or not. This does not
        check whether the window is within the visible area of
        the screen but rather whether it is in visible state

INPUTS

    window - The window to affect

RESULT

        TRUE if window is currently visible, FALSE otherwise

ItemAddress

SYNOPSIS

    ItemAddress(menustrip, menunumber)
    struct MenuItem * ItemAddress(struct Menu *, UWORD);

DESCRIPTION

    Returns the address of the menuitem 'menunumber' of 'menustrip'.
    The number is the one you get from intuition after the user has
    selected a menu.
    The menunumber must be well-defined.
    Valid numbers are MENUNULL, which makes the routine return NULL,
    or valid item number of your menustrip, which contains
    - a valid menu number
    - a valid item number
    - if the menu-item has a sub-item, a valid sub-item number
    Menu number and item number must be specified. Sub-item, if
    available, is optional, therefore this function returns either
    the item or sub-item

INPUTS

    menustrip - Pointer to the first menu of the menustrip.
    menunumber - Packed value describing the menu, item and if
        appropriate sub-item

RESULT

    Returns NULL for menunumber == MENUNULL or the address of the
    menuitem described by menunumber

LendMenus

SYNOPSIS

    LendMenus(fromwindow, towindow)
    void LendMenus(struct Window *, struct Window *);

DESCRIPTION

    This function 'lends' the menus of one window to another.
    This makes the menu events (eg. menu button press) take place
    in another window's menu (ie. the other window's strip and screen).
    This function is used to unify two windows on different attached
    screens. (Eg. a painting program with an attached palette screen
    can open the menu on the main screen if the menu button is
    pressed on the palette screen

INPUTS

    fromwindow - This window's menu events will go to another window.
    towindow - This is the window that will react on the menu actions
        of the other window. If NULL 'lending' will be turned off

RESULT

    None

SEE ALSO

LockIBase

SYNOPSIS

    LockIBase(What)
    ULONG LockIBase(ULONG);

DESCRIPTION

    Locks Intuition. While you hold this lock, no fields of Intuition
    will change. Please release this as soon as possible

INPUTS

    What - Which fields of Intuition should be locked. The only allowed
        value for this is currently 0 which means to lock everything

RESULT

    The result of this function must be passed to UnlockIBase

NOTES

    You *must not* call this function if you have any locks on other
    system resources like layers and LayerInfo locks.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

  • UnLockIBase

LockPubScreen

SYNOPSIS

    LockPubScreen()
    struct Screen * LockPubScreen(CONST);

DESCRIPTION

    Locks a public screen, thus preventing it from closing.
    This is useful if you want to put up a visitor window on a public screen
    and need to check some of the public screen's field first -- not locking
    the screen may lead to the public screen not existing when your visitor
    window is ready.

    If you try to lock the Workbench screen or the default public screen
    and there isn't any, the Workbench screen will be automatically opened
    and locked

INPUTS

    Name   --  Name of the public screen or NULL for the default public
               screen. The name "Workbench" refers to the Workbench screen

RESULT

    A pointer to the screen or NULL if something went wrong. Failure can
    happen for instance when the public screen is in private state or doesn't
    exist

NOTES

    You don't need to hold the lock when your visitor window is opened as
    the pubscreen cannot be closed as long as there are visitor windows
    on it.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

EXAMPLE

    To open a visitor window which needs information from the screen structure
    of the public screen to open on, do this:

    if((pubscreen = LockPubScreen("PubScreentoOpenon")) != NULL)
    {
        ...check pubscreen's internal data...
    OpenWindow(VisitorWindow, pubscreen);
    UnlockPubScreen(NULL, pubscreen);
    ...use your visitor window...
    CloseWindow(VisitorWindow

SEE ALSO

LockPubScreenList

DESCRIPTION

    Arbitrates access to the system public screen list. This is for Public
    Screen Manager programs only! The list should be locked as short a time
    as possible

NOTES

    The list's nodes are PubScreenNodes as defined in <intuition/screens.h>.
    Act very quickly when holding this lock!

HISTORY

        21-06-98    SDuvan  Implemented
    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

MakeClass

SYNOPSIS

    MakeClass(classID, superClassID, superClassPtr, instanceSize, flags)
    struct IClass * MakeClass(UBYTE *, UBYTE *, struct IClass *, ULONG, ULONG);

DESCRIPTION

    Only for class implementators.

    This function creates a new public BOOPSI class. The SuperClass
    should be another BOOPSI class; all BOOPSI classes are subclasses
    of the ROOTCLASS.

    SuperClasses can by private or public. You can specify a name/ID
    for the class if you want it to become a public class. For public
    classes, you must call AddClass() afterwards to make it public
    accessible.

    The return value contains a pointer to the IClass structure of your
    class. You must specify your dispatcher in cl_Dispatcher. You can
    also store shared data in cl_UserData.

    To get rid of the class, you must call FreeClass

INPUTS

    classID - NULL for private classes otherwise the name/ID of the
        public class.
    superClassID - Name/ID of a public SuperClass. NULL is you don't
        want to use a public SuperClass or if you have the pointer
        your SuperClass.
    superClassPtr - Pointer to the SuperClass. If this is non-NULL,
        then superClassID is ignored.
    instanceSize - The amount of memory which your objects need (in
        addition to the memory which is needed by the SuperClass(es))
    flags - For future extensions. To maintain comaptibility, use 0
        for now

RESULT

    Pointer to the new class or NULL if
    - There wasn't enough memory
    - The superclass couldn't be found
    - There already is a class with the same name/ID

NOTES

    No copy is made of classID. So make sure the lifetime of the contents
    of classID is at least the same as the lifetime of the class itself.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

MakeScreen

SYNOPSIS

    MakeScreen(screen)
    LONG MakeScreen(struct Screen *);

INPUTS

    Pointer to your custom screen

RESULT

    Zero for success, non-zero for failure

SEE ALSO

ModifyIDCMP

SYNOPSIS

    ModifyIDCMP(window, flags)
    BOOL ModifyIDCMP(struct Window *, ULONG);

DESCRIPTION

    This routine modifies the state of your window's IDCMP (Intuition
    Direct Communication Message Port).

    Depending on the current state in the IDCMPFlags of the window and
    the specified flags these actions are possible:

    IDCMP   flags   Action
      0   0 Nothing happens
      0  !=0    The flags are copied in the IDCMPFlags of the window
            and a MessagePort is created and stored in the
            UserPort of the window.
     !=0      0 The IDCMPFlags are cleared and the MessagePort in the
            UserPort is deleted.
     !=0     !=0    The flags are copied to the IDCMPFlags of the
            window

INPUTS

    window - The window to change the IDCMPFlags in.
    flags - New flags for the IDCMPFlags of the window. See
        intuition/intuition.h for the available flags

RESULT

    TRUE if the change could be made and FALSE otherwise

NOTES

    You can set up the Window->UserPort to any port of your own
    before you call ModifyIDCMP().  If IDCMPFlags is non-null but
    your UserPort is already initialized, Intuition will assume that
    it's a valid port with task and signal data preset and Intuition
    won't disturb your set-up at all, Intuition will just allocate
    the Intuition message port half of it.  The converse is true
    as well:  if UserPort is NULL when you call here with
    IDCMPFlags == NULL, Intuition will deallocate only the Intuition
    side of the port.

    This allows you to use a port that you already have allocated:

    - OpenWindow() with IDCMPFlags equal to NULL (open no ports)
    - set the UserPort variable of your window to any valid port of your
      own choosing
    - call ModifyIDCMP with IDCMPFlags set to what you want
    - then, to clean up later, set UserPort equal to NULL before calling
      CloseWindow() (leave IDCMPFlags alone)  BUT FIRST: you must make
      sure that no messages sent your window are queued at the port,
      since they will be returned to the memory free pool.

    For an example of how to close a window with a shared IDCMP,
    see the description for CloseWindow().

    Intuition v50 features WA_UserPort tag, which allows to set
    the UserPort at OpenWindow stage. Please note that using this tag
    changes the behaviour of ModifyIDCMP() slightly. Creating/disposing
    message ports is now up to the app. ModifyIDCMP(win,0) still clears
    win->UserPort pointer, but the message port is NOT disposed - you
    need to store it and dispose yourself! Also calling
    ModifyIDCMP(win,someidcmp) on a window with NULL win->UserPort will
    NOT create a new port!

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

ModifyProp

SYNOPSIS

    ModifyProp(gadget, window, requester, flags, horizPot, vertPot, horizBody, vertBody)
    void ModifyProp(struct Gadget*, struct Window*, struct Requester *, ULONG, ULONG, ULONG, ULONG, ULONG);

DESCRIPTION

    Changes the values in the PropInfo-structure of a proportional
    gadget and refreshes the display

INPUTS

    gadget - Must be a PROPGADGET
    window - The window which contains the gadget
    requester - If the gadget has GTYP_REQGADGET set, this must be
        non-NULL.
    flags - New flags
    horizPot - New value for the HorizPot field of the PropInfo
    vertPot - New value for the VertPot field of the PropInfo
    horizBody - New value for the HorizBody field of the PropInfo
    vertBody - New value for the VertBody field of the PropInfo

RESULT

    None

NOTES

    This function causes all gadgets from this gadget to the end of
    the gadget list to be refreshed. If you want a better behaviour,
    use NewModifProp().

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

MoveScreen

SYNOPSIS

    MoveScreen(screen, dx, dy)
    void MoveScreen(struct Screen *, LONG, LONG);

DESCRIPTION

    Move a screen by the specified amount in X/Y direction. The
    resolution is always the screen resolution

INPUTS

    screen - Move this screen
    dx - Move it by this amount along the X axis (> 0 to the right,
        < 0 to the left).
    dy - Move it by this amount along the Y axis (> 0 down, < 0 up

RESULT

    None

NOTES

    Depending on other restrictions, the screen may not move as far
    as specified. It will move as far as possible and you can check
    LeftEdge and TopEdge of the screen to see how far it got.

HISTORY

    27-11-96    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

MoveWindow

SYNOPSIS

    MoveWindow(window, dx, dy)
    void MoveWindow(struct Window *, LONG, LONG);

DESCRIPTION

    Change the position of a window on the screen

INPUTS

    window - Move this window
    dx, dy - Move it that many pixels along the axis (right, down

RESULT

    The window will move when the next input event will be received

SEE ALSO

MoveWindowInFrontOf

SYNOPSIS

    MoveWindowInFrontOf(window, behindwindow)
    void MoveWindowInFrontOf(struct Window *, struct Window *);

DESCRIPTION

    Arrange the relative depth of a window

INPUTS

    window - the window to reposition
    behindwindow - the window the other one will be brought in front of

RESULT

    None

INTERNALS

    Uses layers.library/MoveLayerInFrontOf().

SEE ALSO

NewModifyProp

SYNOPSIS

    NewModifyProp(gadget, window, requester, flags, horizPot, vertPot, horizBody, vertBody, numGad)
    void NewModifyProp(struct Gadget*, struct Window*, struct Requester *, ULONG, ULONG, ULONG, ULONG, ULONG, LONG);

DESCRIPTION

    Changes the values in the PropInfo-structure of a proportional
    gadget and refreshes the specified number of gadgets beginning
    at the proportional gadget. If numGad is 0 (zero), then no
    refreshing is done

INPUTS

    gadget - Must be a PROPGADGET
    window - The window which contains the gadget
    requester - If the gadget has GTYP_REQGADGET set, this must be
        non-NULL.
    flags - New flags
    horizPot - New value for the HorizPot field of the PropInfo
    vertPot - New value for the VertPot field of the PropInfo
    horizBody - New value for the HorizBody field of the PropInfo
    vertBody - New value for the VertBody field of the PropInfo
    numGad - How many gadgets to refresh. 0 means none (not even
        the current gadget) and -1 means all of them

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

NewObjectA

SYNOPSIS

    NewObjectA(classPtr, classID, tagList)
    APTR NewObjectA(struct IClass*, UBYTE*, struct TagItem *);

DESCRIPTION

    Use this function to create BOOPSI objects (BOOPSI stands for
    "Basic Object Oriented Programming System for Intuition).

    You may specify a class either by it's name (if it's a public class)
    or by a pointer to its definition (if it's a private class). If
    classPtr is NULL, classID is used

INPUTS

    classPtr - Pointer to a private class (or a public class if you
        happen to have a pointer to it)
    classID - Name of a public class
    tagList - Initial attributes. Read the documentation of the class
        carefully to find out which attributes must be specified
        here and which can

RESULT

    A BOOPSI object which can be manipulated with general functions and
    which must be disposed with DisposeObject() later

NOTES

    This functions send OM_NEW to the dispatcher of the class.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

NextObject

SYNOPSIS

    NextObject(objectPtrPtr)
    APTR NextObject(APTR);

DESCRIPTION

    Use this function to iterate through a list of BOOPSI objects.
    You may do whatever you want with the object returned, even
    remove it from the list or disposing it and then continue to
    iterate thought the list

INPUTS

    objectPtrPtr - the pointer to a variable. This must be the same
        variable, as long as you iterate though the same list. This
        variable must initially be filled with the lh_Head of a list

RESULT

    A BOOPSI object, which can be manipulated

SEE ALSO

  • NewObject
  • "Basic Object-Oriented Programming System for Intuition" and "boopsi Class Reference" Dokument

NextPubScreen

SYNOPSIS

    NextPubScreen(screen, namebuff)
    UBYTE * NextPubScreen(struct Screen *, UBYTE *);

DESCRIPTION

    Gets the next public screen in the system; this allows visitor windows
    to jump among public screens in a cycle

INPUTS

    screen    --  Pointer to the public screen your window is open in or
                  NULL if you don't have a pointer to a public screen.
    namebuff  --  Pointer to a buffer with (at least) MAXPUBSCREENNAME+1
                  characters to put the name of the next public screen in

RESULT

    Returns 'namebuff' or NULL if there are no public screens

NOTES

    We cannot guarantee that the public screen, the name of which you got
    by using this function, is available when you call for instance
    LockPubScreen(). Therefore you must be prepared to handle failure of
    that kind of functions.
        This function may return the name of a public screen which is in
    private mode.
        The cycle order is undefined, so draw no conclusions based on it!

INTERNALS

    Maybe we should correct the + 1 stupidity right away?

HISTORY

    21-06-98    SDuvan  Implemented

SEE ALSO

ObtainGIRPort

SYNOPSIS

    ObtainGIRPort(gInfo)
    struct RastPort * ObtainGIRPort(struct GadgetInfo *);

DESCRIPTION

    This function sets up a RastPort for exclusive use by custom
    gadget hook routines. Call this function each time a hook
    routine needs to render into the gadget and ReleaseGIRPort()
    immediately afterwards

INPUTS

    gInfo - Pointer to GadgetInfo structure, as passed to each
    custom gadget hook function

RESULT

    Pointer to a RastPort you can render to. NULL if you aren't
    allowed to render into this gadget

NOTES

    If a routine passes a RastPort, eg. GM_RENDER, ObtainGIRPort()
    needn't be called.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

OffGadget

SYNOPSIS

    OffGadget(gadget, window, requester)
    void OffGadget(struct Gadget*, struct Window*, struct Requester *);

DESCRIPTION

    Disable a gadget. It will appear ghosted

INPUTS

    gadget - The gadget to deactivate
    window - The window, the gadget is in
    requester - The requester, the gadget is in or NULL if the
        gadget is in no requester

RESULT

    None

NOTES

    This function will update the gadget (unlike the original function
    which would update all gadgets in the window).

SEE ALSO

OffMenu

SYNOPSIS

    OffMenu(window, menunumber)
    void OffMenu(struct Window*, UWORD);

DESCRIPTION

    Disable a whole menu, an item or a sub-item depending on
    the menunumber

INPUTS

    window - The window, the menu belongs to
    menunumber - The packed information on what piece of menu to disable

RESULT

    None

SEE ALSO

OnGadget

SYNOPSIS

    OnGadget(gadget, window, requester)
    void OnGadget(struct Gadget*, struct Window*, struct Requester *);

DESCRIPTION

    Enable a gadget. It will appear normal

INPUTS

    gadget - The gadget to deactivate
    window - The window, the gadget is in
    requester - The requester, the gadget is in or NULL if the
        gadget is in no requester

RESULT

    None

NOTES

    This function will update the gadget (unlike the original function
    which would update all gadgets in the window).

OnMenu

SYNOPSIS

    OnMenu(window, menunumber)
    void OnMenu(struct Window*, UWORD);

DESCRIPTION

    Enable a whole menu, an item or a sub-item depending on
    the menunumber

INPUTS

    window - The window, the menu belongs to
    menunumber - The packed information on what piece of menu to enable

RESULT

    None

SEE ALSO

OpenScreen

SYNOPSIS

    OpenScreen(newScreen)
    struct Screen * OpenScreen(struct NewScreen *);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

OpenScreenTagList

SYNOPSIS

    OpenScreenTagList(newScreen, tagList)
    struct Screen * OpenScreenTagList(struct NewScreen *, struct TagItem *);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

OpenWindow

SYNOPSIS

    OpenWindow(newWindow)
    struct Window * OpenWindow(struct NewWindow *);

DESCRIPTION

    Opens a new window with the characteristics specified in
    newWindow

INPUTS

    newWindow - How you would like your new window

RESULT

    A pointer to the new window or NULL if it couldn't be
    opened. Reasons for this might be lack of memory or illegal
    attributes

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

OpenWindowTagList

SYNOPSIS

    OpenWindowTagList(newWindow, tagList)
    struct Window * OpenWindowTagList(struct NewWindow *, struct TagItem *);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

OpenWorkBench

DESCRIPTION

    Attempt to open the Workbench screen

INPUTS

    None

RESULT

    Tries to (re)open WorkBench screen. If successful return value
    is a pointer to the screen structure, which shouldn't be used,
    because other programs may close the WorkBench and make the
    pointer invalid.
    If this function fails the return value is NULL

SEE ALSO

PointInImage

SYNOPSIS

    PointInImage(point, image)
    BOOL PointInImage(ULONG, struct Image *);

DESCRIPTION

    Check whether a point is inside an image

INPUTS

    point - This are the packed point coordinates. The X coordinate
        in in the upper 16 bits and the Y coordinate is in the
        lower 16 bits. The coordinates are signed.
    image - Check against this image

RESULT

    TRUE is the point is inside the image, FALSE otherwise

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

PrintIText

SYNOPSIS

    PrintIText(rp, iText, leftOffset, topOffset)
    void PrintIText(struct RastPort*, struct IntuiText *, LONG, LONG);

DESCRIPTION

    Render an IntuiText in the specified RastPort with the
    specified offset

INPUTS

    rp - Draw into this RastPort
    iText - Render this text
    leftOffset, topOffset - Starting-Point. All coordinates in the
        IntuiText structures are relative to this point

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

PubScreenStatus

SYNOPSIS

    PubScreenStatus(Scr, StatusFlags)
    UWORD PubScreenStatus(struct Screen *, UWORD);

DESCRIPTION

    Change the status flags for a given public screen

INPUTS

    Scr          --  The screen the flags of which to change.
    StatusFlags  --  The new values for the flags, see <intuition/screens.h>
                     for further information on the flag bits

RESULT

    Clears bit 0 if the screen wasn't public or if it was impossible
    to make private (PSNF_PRIVATE) as visitor windows are open on it.
    The other bits in the return value are reserved for future use

HISTORY

        21-06-98    SDuvan  Implemented

SEE ALSO

QueryOverscan

SYNOPSIS

    QueryOverscan(displayid, rect, oscantype)
    LONG QueryOverscan(ULONG, struct Rectangle *, WORD);

RefreshGList

SYNOPSIS

    RefreshGList(gadgets, window, requester, numGad)
    void RefreshGList(struct Gadget*, struct Window*, struct Requester *, LONG);

DESCRIPTION

    Refresh (draw anew) the specified number of gadgets starting
    at the specified gadget

INPUTS

    gadgets - This is the first gadget which will be refreshed.
    window - The window which contains the gadget
    requester - If the gadget has GTYP_REQGADGET set, this must be
        a pointer to a Requester; otherwise the value is
        ignored.
    numGad - How many gadgets should be refreshed. The value
        may range from 0 to MAXLONG. If there are less gadgets
        in the list than numGad, only the gadgets in the
        list will be refreshed

RESULT

    None

NOTES

    This function *must not* be called inside a
    BeginRefresh()/EndRefresh() pair.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

EXAMPLE

    // Refresh one gadget
    RefreshGList (&gadget, win, NULL, 1);

    // Refresh all gadgets in the window
    RefreshGList (win->FirstGadget, win, NULL, -1L

RefreshGadgets

SYNOPSIS

    RefreshGadgets(gadgets, window, requester)
    void RefreshGadgets(struct Gadget*, struct Window*, struct Requester *);

DESCRIPTION

    Refreshes all gadgets starting at the specified gadget

INPUTS

    gadgets - The first gadget to be refreshed
    window - The gadget must be in this window
    requester - If any gadget has GTYP_REQGADGET set, this must
        point to a valid Requester. Otherwise the value is
        ignored

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

EXAMPLE

    // Refresh all gadgets of a window
    RefreshGadgets (win->FirstGadget, win, NULL

SEE ALSO

RefreshWindowFrame

SYNOPSIS

    RefreshWindowFrame(window)
    void RefreshWindowFrame(struct Window *);

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

ReleaseGIRPort

SYNOPSIS

    ReleaseGIRPort(rp)
    void ReleaseGIRPort(struct RastPort *);

DESCRIPTION

    Release a RastPort previously obtained by ObtainGIRPort

INPUTS

    rp - The result of ObtainGIRPort

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

RemakeDisplay

INPUTS

    None

RESULT

    Zero for success, non-zero for failure

SEE ALSO

RemoveClass

SYNOPSIS

    RemoveClass(classPtr)
    void RemoveClass(struct IClass *);

DESCRIPTION

    Makes a public class inaccessible. This function may be called
    several times on the same class and even if the class never was
    in the public list

INPUTS

    classPtr - Pointer to the result of MakeClass(). May be NULL

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

RemoveGList

SYNOPSIS

    RemoveGList(remPtr, gadget, numGad)
    UWORD RemoveGList(struct Window *, struct Gadget *, LONG);

RemoveGadget

SYNOPSIS

    RemoveGadget(window, gadget)
    UWORD RemoveGadget(struct Window *, struct Gadget *);

DESCRIPTION

    Remove a gadget from the list of gadgets in a window

INPUTS

    window - Remove the gadget from this list.
    gadget - Remove this gadget

RESULT

    The position of the gadget or 0xFFFF if the gadget doesn't
    exist or the gadget is the 65535th of the list

ReportMouse

SYNOPSIS

    ReportMouse(flag, window)
    void ReportMouse(LONG, struct Window *);

DESCRIPTION

    Enable or disable the window flag REPORTMOUSE. If the flag is
    set, you will receive IDCMP event every time the user moves
    the mouse

INPUTS

    flag - Enable (TRUE) or disable (FALSE) the reports.
    window - Do it in this window

RESULT

    None

NOTES

    As you might have noticed, the arguments are twisted.

Request

SYNOPSIS

    Request(requester, window)
    BOOL Request(struct Requester *, struct Window *);

DESCRIPTION

    Add a requester to specified window and display it

INPUTS

    requester - The requester to be displayed
    window - The window to which the requester belongs

RESULT

    TRUE if requester was opened successfully, FALSE else

SEE ALSO

ResetMenuStrip

SYNOPSIS

    ResetMenuStrip(window, menu)
    BOOL ResetMenuStrip(struct Window *, struct Menu *);

DESCRIPTION

    Works like a "fast" SetMenuStrip() as it doesn't check Menu or
    calculate internal values before attaching the Menu to the Window.
    Use this function only if the Menu has been added before by
    SetMenuStrip() and you changed nothing in the struct except
    CHECKED and ITEMENABLED flags

INPUTS

    window - The window to add the MenuStrip to
    menu   - The menu to be added to the window above

RESULT

    Always TRUE

NOTES

        Yes, I do repeat it again:
    Use this function only if the Menu has been added before by
    SetMenuStrip() and you changed nothing in the struct except
    CHECKED and ITEMENABLED flags.

SEE ALSO

RethinkDisplay

DESCRIPTION

    Check and update, ie. redisplay the whole Intuition display

INPUTS

    None

RESULT

    Zero for success, non-zero for failure

SEE ALSO

ScreenDepth

SYNOPSIS

    ScreenDepth(screen, flags, reserved)
    void ScreenDepth(struct Screen *, ULONG, APTR);

DESCRIPTION

    Move the specified screen to the front or back, based on passed flag.
    If the screen is in a group, the screen will change its position in
    the group only. If the screen is the parent of a group, the whole
    group will be moved

INPUTS

    screen - Move this screen.
    flags - SDEPTH_TOFRONT or SDEPTH_TOBACK for bringing the screen to
        front or back.
        If the screen is a child of another screen you may specify
        SDEPTH_INFAMILY to move the screen within the family. If
        not specified the whole family will move.
    reserved - For future use. MUST be NULL by now

RESULT

    None

NOTES

    Only the owner of the screen should use SDEPTH_INFAMILY.
    Intentionally commodities should not change the internal arrangement
    of screen families.

SEE ALSO

ScreenPosition

SYNOPSIS

    ScreenPosition(screen, flags, x, y, x, y)
    void ScreenPosition(struct Screen *, ULONG, LONG, LONG, LONG, LONG);

DESCRIPTION

    Move a screen to the specified position or by the specified
    increment. Resolution is always the screen resolution.
    If this move would be out of bounds, the move is clipped at
    these boundaries. The real new position can be obtained from
    LeftEdge and TopEdge of the screen's structure

INPUTS

    screen - Move this screen
    flags - One of SPOS_RELATIVE, SPOS_ABSOLUTE or SPOS_MAKEVISIBLE
        Use SPOS_FORCEDRAG to override non-movable screens ie. screens
        opened with {SA_Draggable,FLASE} attribute.

        SPOS_RELATIVE (or NULL) moves the screen by a delta of x1,y1.

        SPOS_ABSOLUTE moves the screen to the specified position x1,y1.

        SPOS_MAKEVISIBLE moves an oversized scrolling screen to make
        the rectangle (x1,y1),(x2,y2) visible
    x1,y1 - Absolute (SPOS_ABSOLUTE) or relative (SPOS_RELATIVE) coordinate
        to move screen, or upper-left corner of rectangle
        (SPOS_MAKEVISIBLE)
    x2,y2 - Ignored with SPOS_ABSOLUTE and SPOS_RELATIVE.
        Lower-right corner of rectangle with SPOS_MAKEVISIBLE

RESULT

    None

NOTES

    SPOS_FORCEDRAG should only be used by the owner of the screen.

SEE ALSO

ScreenToBack

SYNOPSIS

    ScreenToBack(screen)
    void ScreenToBack(struct Screen *);

DESCRIPTION

    Move a screen behind all other screens. If the screen is in a
    group, the screen will be moved behind all other screens in the
    group only. If the screen is the parent of a group, the whole
    group will be moved in the back

INPUTS

    screen - Move this screen

RESULT

    You will see the screen move behind all other screens. If some
    screen before this screen occupies the whole display, then it
    will disappear completely. If all other screens occupy only part
    of the display, the screen will appear behind the screens

SEE ALSO

ScreenToFront

SYNOPSIS

    ScreenToFront(screen)
    void ScreenToFront(struct Screen *);

DESCRIPTION

    Move a screen in front of all other screens. If the screen is in a
    group, the screen will be moved in front of all other screens in the
    group only. If the screen is the parent of a group, the whole
    group will be moved in the front

INPUTS

    screen - Move this screen

RESULT

    You will see the screen move in front of all other screens

HISTORY

    27-11-96    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

ScreenbarControl

SYNOPSIS

    ScreenbarControl(taglist)
    ULONG ScreenbarControl(struct TagItem *);

DESCRIPTION

    Allows applications to install dynamicly created screenbar plugin classes and
    control their behaviour

INPUTS

    taglist - input data, may be processed in tag order depending on the type
    --------------------------------------------------------------------------
    SBCT_InstallPlugin - installs a MUI class implementing the MUIM_Screenbar_#?
                         methods. Please note that mcc_Class->cl_ID must contain
                         a valid name

    SBCT_UninstallPlugin - removes the MUI class previously installed with
                         SBCT_InstallPlugin

RESULT

    TRUE on success, may also return a different value depending on the tags passed

SEE ALSO

  • Example.sbar

ScrollWindowRaster

SYNOPSIS

    ScrollWindowRaster(win, dx, dy, xmin, ymin, xmax, ymax)
    void ScrollWindowRaster(struct Window *, WORD, WORD, WORD, WORD, WORD, WORD);

DESCRIPTION

        Scrolls the content of the rectangle defined by (xmin,ymin)-
        (xmax,ymax) by (dx,dy) towards (0,0). This function calls
        ScrollRasterBF().
        The advantage of this function over calling ScrollRasterBF() is
        that the window will be informed about damages. A damage happens
        if in a simple window parts from concelealed areas are scrolled
        to visible areas. The visible areas will be blank as simple
        windows store no data for concealed areas.
        The blank parts that appear due to the scroll will be filled
        with EraseRect() and are not considered damaged areas

INPUTS

        win       - pointer to window in which to scroll
        dx,dy     - scroll by (dx,dy) towards (0,0)
        xmin,ymin - upper left corner of the rectangle that will be
                    affected by the scroll
        xmax,ymax - lower rigfht corner of the rectangle that will be
                    affected by the scroll

ScrollWindowRasterNoFill

DESCRIPTION

        Calls ScrollRaster(). The "new" area is not filled. This function handles all
        damage done to the simple refresh window properly. If the window was obscured
        an IDCMP_REFRESHWINDOW message will be generated.

        Please always use this function instead of ScrollRaster(). ScrollWindowRaster
        BOOPSI notes apply

INPUT

        Window = a window to perform scrolling in
        Dx, Dy = scroll offsets
        Xmin, YMin, Xmax, Ymax = the area to scroll

SYNOPIS

        ScrollWindowRasterNoFill( Window, Dx, Dy, Xmin, Ymin, Xmax, Ymax)
                                  A1      D0  D1  D2    D3    D4    D5

        void ScrollWindowRasterNoFill( struct Window *, WORD, WORD,
                                       WORD, WORD, WORD, WORD );

SetAttrsA

SYNOPSIS

    SetAttrsA(object, tagList)
    ULONG SetAttrsA(APTR, struct TagItem *);

DESCRIPTION

    Changes several attributes of an object at the same time. How the
    object interprets the new attributes depends on the class

INPUTS

    object - Change the attributes of this object
    tagList - This is a list of attribute/value-pairs

RESULT

    Depends in the class. For gadgets, this value is non-zero if
    they need redrawing after the values have changed. Other classes
    will define other return values

NOTES

    This function sends OM_SET to the object.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

SetDMRequest

SYNOPSIS

    SetDMRequest(window, dmrequest)
    BOOL SetDMRequest(struct Window *, struct Requester *);

DESCRIPTION

    Try to set the DMRequest of a window.
    A DMRequest is a requester that appears if the user double-clicks
    with the menu button.
    The new DMRequest will only be set if the old DMRequest is not in use.
    The official way to change the DMRequest is to call ClearDMRequest()
    until it returns TRUE and then call SetDMRequest

INPUTS

    window - The window from which the DMRequest is to be set
    dmrequest - Pointer to the requester

RESULT

    TRUE if old DMRequest was not in use and therefore changed to
    the new one, or FALSE if the old DMRequest was in use and could
    not be set to the new one

NOTES

    If the DMRequest has the POINTREL flag set, the DMR will show up
    as close to the pointer as possible. The RelLeft/Top fields are
    used to fine-tune the positioning.

SEE ALSO

SetDefaultPubScreen

SYNOPSIS

    SetDefaultPubScreen(name)
    void SetDefaultPubScreen(UBYTE *);

DESCRIPTION

    Specifies the default public screen for visitor windows to open up on.
        The screen is used when a requested public screen is not available
    and the FALLBACK option is enabled or when the visitor window asks for
    the default public screen

INPUTS

    name  --  The name of the public screen that should be used as default,
              or NULL to specify the Workbench screen

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

SetDefaultScreenFont

SYNOPSIS

    SetDefaultScreenFont(textfont)
    void SetDefaultScreenFont(struct TextFont *);

DESCRIPTION

        Set the default Font

INPUTS

    textfont - The Font to be used

NOTES

        PRIVATE(!!!!) Do not use

SetEditHook

SYNOPSIS

    SetEditHook(hook)
    struct Hook * SetEditHook(struct Hook *);

DESCRIPTION

    Sets the global (default) string editing hook of intuition
    string gadgets

INPUTS

        The stringgagdget editing hook to replace the old one

RESULT

        The old edit hook

HISTORY

    27-11-96    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SetGadgetAttrsA

SYNOPSIS

    SetGadgetAttrsA(gadget, window, requester, tagList)
    IPTR SetGadgetAttrsA(struct Gadget *, struct Window *, struct Requester *, struct TagItem *);

DESCRIPTION

    Sets some tags and provides gadget specific data. Prefer this to
    SetAttrsA(), if you are manipulating gadgets

INPUTS

    gadget - Change the attributes of this gadget
    window - The window of the gadget
    requester - The requester of the gadget (or NULL)
    tagList - This is a list of attribute/value-pairs

RESULT

    Depends in the class. For gadgets, this value is non-zero if
    they need redrawing after the values have changed. Other classes
    will define other return values

NOTES

    This function sends OM_SET to the gadget object.

INTERNALS

    SetGadgetAttrsA(gad, win, req, tags) ist just a replacement for
    DoGadgetMethod(gad, win, req, OM_SET, tags, NULL).

SEE ALSO

SetMenuStrip

SYNOPSIS

    SetMenuStrip(window, menu)
    BOOL SetMenuStrip(struct Window *, struct Menu *);

DESCRIPTION

    This function adds a MenuStrip to the Window, which can be invoked
    by the user after this call by pressing the right mouse button.
    Menus with no MenuItems will not be attached

INPUTS

    window - The window to add the MenuStrip to
    menu   - The menu to be added to the window above

RESULT

    TRUE if all menus have at least one menuitem

NOTES

    This function calculates internal values and is therfore the
    official way to add a new MenuStrip to Window.
    Always do a ClearMenuStrip() before closing the Window or adding
    another MenuStrip to the Window.

HISTORY

    11.06.99  SDuvan  implemented function

SEE ALSO

SetMouseQueue

SYNOPSIS

    SetMouseQueue(window, queuelength)
    LONG SetMouseQueue(struct Window *, UWORD);

DESCRIPTION

    Change the number of mouse messages for your window to be allowed
    to be outstanding

INPUTS

    window - the window
    queuelength - the number of mouse messages to be allowed to be
        outstanding

RESULT

    Returns -1 if the window is unknown otherwise the old value of the
    queuelength is returned

NOTES

    There should be a function for changing the repeat key queue limit, too.

SEE ALSO

SetPointer

SYNOPSIS

    SetPointer(window, pointer, height, width, xOffset, yOffset)
    void SetPointer(struct Window *, UWORD *, LONG, LONG, LONG, LONG);

DESCRIPTION

    Changes the shape of the mouse pointer for a given window

INPUTS

    window - Change it for this window
    pointer - The shape of the new pointer as a bitmap with depth 2.
    height - Height of the pointer
    width - Width of the pointer (must be <= 16)
    xOffset, yOffset - The offset of the "hot spot" relative to the
        left, top edge of the bitmap

SEE ALSO

SetPrefs

SYNOPSIS

    SetPrefs(prefbuffer, size, inform)
    struct Preferences * SetPrefs(struct Preferences *, LONG, BOOL);

DESCRIPTION

    Sets the current Preferences structure

INPUTS

    prefbuffer - The buffer which contains your settings for the
        preferences.
    size - The number of bytes of the buffer you want to be copied.
    inform - If TRUE, all windows with IDCMP_NEWPREFS IDCMPFlags set
        get an IDCMP_NEWPREFS message

RESULT

    Returns your parameter buffer

SEE ALSO

SetPubScreenModes

SYNOPSIS

    SetPubScreenModes(modes)
    UWORD SetPubScreenModes(UWORD);

DESCRIPTION

    Specify global intuition public screen handling

INPUTS

    modes  --  The new set of flags to consider. Currently defined flags are:
               SHANGHAI       Workbench windows are opened on the default
                  public screen.
           POPPUBSCREEN   When a visitor window opens on a public screen,
                  the screen is brought to front

RESULT

    The flags set before the change was made

HISTORY

    24-06-98    SDuvan  Implemented

SEE ALSO

SetWindowPointerA

SYNOPSIS

    SetWindowPointerA(window, taglist)
    void SetWindowPointerA(struct Window *, struct TagItem *);

SetWindowTitles

SYNOPSIS

    SetWindowTitles(window, windowTitle, screenTitle)
    void SetWindowTitles(struct Window *, UBYTE *, UBYTE *);

DESCRIPTION

    Changes the current window and/or the screen title

INPUTS

    window - Change the title for this window or the screen which the
        window contains.
    windowTitle - New title for the window or ((UBYTE *)~0L) to keep the
        old title or NULL for no title. If you specify a string,
        this string is *NOT* copied.
    screenTitle - New title for the screen of the window or ((UBYTE *)~0L)
        to keep the old title or NULL for no title. If you specify
        a title for the screen, this title will be shown when the
        window becomes active. If you specify a string, this string
        is *NOT* copied

RESULT

    None

NOTES

    You should be careful with specifying a screen title because that
    may irritate the user.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

ShowTitle

SYNOPSIS

    ShowTitle(screen, ShowIt)
    void ShowTitle(struct Screen *, BOOL);

DESCRIPTION

    Modify SHOWTITLE flag of the screen and refresh the screen and
    its windows.
    If ShowIt is TRUE the screen's title bar will be shown in front of
    WFLG_BACKDROP windows. A value of FALSE will bring the title bar
    behind all windows

RESULT

    None

NOTES

    The default of the SHOWTITLE flag for new screens is TRUE.

ShowWindow

SYNOPSIS

    ShowWindow(window)
    VOID ShowWindow(struct Window *);

DESCRIPTION

        Make a window visible. This function does not bring the
        window back into the visible area of the screen but rather
        switches it into visible state

INPUTS

    window - The window to affect

SizeWindow

SYNOPSIS

    SizeWindow(window, dx, dy)
    void SizeWindow(struct Window *, LONG, LONG);

DESCRIPTION

    Modify the size of a window by the specified offsets

INPUTS

    window - The window to resize.
    dx - Add this to the width.
    dy - Add this to the height

RESULT

    None

NOTES

    The resize of the window may be delayed. If you depend on the
    information that is has changed size, wait for IDCMP_NEWSIZE.

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SysReqHandler

SYNOPSIS

    SysReqHandler(window, IDCMPFlagsPtr, WaitInput)
    LONG SysReqHandler(struct Window*, ULONG *, BOOL);

DESCRIPTION

    Handles a requester, which was opened with BuildSysRequest() or
    BuildEasyRequestArgs(). When this function is called all outstanding
    IDCMP requests are processed. If an IDCMP request that would close
    a normal EasyRequestArgs() is encountered, SysReqHandler() returns
    with a return code equally to the return code EasyRequestArgs()
    would have returned. You may call this function in synchronous or
    asynchronous mode, by setting the WaitInput parameter

INPUTS

    Window - The window pointer returned by either BuildSysRequest() or
         BuildEasyRequestArgs().
    IDCMPFlagsPtr - Pointer to a ULONG to store the IDCMP flag that was
            received by the window. This will be set if you
            provided additional IDCMP flags to BuildSysRequest() or
            BuildEasyRequest(). You may set this to NULL. You must
            initialize the pointed to ULONG every time you call
            SysReqHandler().
    WaitInput - Set this to TRUE, if you want this function to wait for
            the next IDCMP request, if there is none at the moment
            the function is called

RESULT

    -2, if the requester was not satisfied. Normally you want to call
        this function at least until this function returns something
        different than -2.
    -1, if one of the IDCMP flags of idcmpPTR was set.
     0, if the rightmost button was clicked or an error occured.
     n, if the n-th button from the left was clicked

BUGS

    Gadget placing is still untidy.
    Does not support BuildSysRequest() requesters, yet.

SEE ALSO

TimedDisplayAlert

SYNOPSIS

    TimedDisplayAlert(alertnumber, string, height, time)
    BOOL TimedDisplayAlert(ULONG, UBYTE *, UWORD, ULONG);

TransparencyControl

SYNOPSIS

    TransparencyControl(w, method, taglist)
    BOOL TransparencyControl(struct Window *, ULONG, struct TagItem *);

DESCRIPTION

        Allows control over window transparency. It's possible to install/remove/
        change/refresh user transparent regions or transparency hook

INPUTS

        Window = the window we are reffering to.
        Method = one of methods defined in intuition/extensions.h.
        TagList = optional taglist with data for methods.
        -----------------------------------------------------------------------------
        Methods:
        TRANSPCONTROLMETHOD_INSTALLREGION
            Installs or removes a transparent region. This region will be added
            to window's main transparent region using OrRegionRegion. Removing
            a region causes damage to both smart and simple refresh layers!

            Tags defined for this method are:
            TRANSPCONTROL_REGION - ti_Data points to struct Region or NULL if
                you wish to remove current region.

            TRANSPCONTROL_OLDREGION - ti_Data points to an ULONG in which old
                region pointer will be stored (allowing you to dispose previously
                used region). Can also be used to read current region.

        TRANSPCONTROLMETHOD_INSTALLREGIONHOOK
            Installs or removes a transparent region hook. The hook is called
            whenever window's layer needs updating (usualy after user resizes your
            window). The hook is called with struct Window * in A2 and struct
            TransparencyMessage * in A1 register.

            Tags defined for this method are:
            TRANSPCONTROL_REGIONHOOK - ti_Data points to struct Hook or NULL.

            TRANSPCONTROL_OLDREGIONHOOK - similar to TRANSPCONTROL_OLDREGION.

        TRANSPCONTROLMETHOD_UPDATETRANSPARENCY
            Calls your transparent region hook so that you could update transparent
            region without removing the hook

RESULT

        TRUE after a new hook/region was installed poperly, FAIL if something went
        wrong - usualy out of mem. FAIL if you olny tried to read old values

NOTES

        To install transp region/hook on window opening time use:
        WA_TransparentRegion
        WA_TransparentRegionHook

        You must NEVER free, modify or remove the provided transparent region while
        it'sattached to a window. Always remove it to apply changes!

        You can NOT use both a transparent region and a transparency hook in one
        layer. Installing a new transparent region will clear a previously installed
        transparency hook and vice-versa.

        In GZZ windows you can only make the inner window layer transparent.

        Be sure to handle IDCMP_REFRESHWINDOW for both smart and simple refresh
        windows! You will have to refresh SMART refresh layers after removing
        a transparent region!!!

        Reminder: minimum IDCMP_REFRESHWINDOW handling is
            case IDCMP_REFRESHWINDOW:
                BeginRefresh(window);
                EndRefresh(window,TRUE);
                break;

        This call is synchronized with intuition's inputhandler. You must not
        hold any layer/other locks when calling it!

EXAMPLE

        sources/transparency.c

SEE ALSO

  • intuition/extensions.h

UnlockIBase

SYNOPSIS

    UnlockIBase(ibLock)
    void UnlockIBase(ULONG);

DESCRIPTION

    Release parts of Intuition which have been blocked with a prior
    call to LockIBase

INPUTS

    ibLock - The result of LockIBase

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

UnlockPubScreen

SYNOPSIS

    UnlockPubScreen(name, screen)
    void UnlockPubScreen(UBYTE *, struct Screen *);

DESCRIPTION

    Release a lock to a screen locked by LockPubScreen().
    Identify screen by the pointer returned from LockPubScreen()
    and pass NULL name in normal cases.
    Sometimes it might be useful to specify the name string. In
    this case the screen pointer will be ignored

INPUTS

    name - Name of the public screen to unlock
    screen - Pointer to the screen to unlock

NOTES

    The screen parameter will be ignored if name is non-NULL

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

UnlockPubScreenList

DESCRIPTION

    Release lock made by LockPubScreenList

HISTORY

        21-06-98    SDuvan  Implemented
    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

SEE ALSO

ViewAddress

DESCRIPTION

    Returns the address of the Intuition View structure. This view
    is needed if you want to use any of the graphics, text or animation
    functions in your window that need the pointer to the view structure

INPUTS

    None

RESULT

    Address of the Intuition View structure

SEE ALSO

  • graphics.library

ViewPortAddress

SYNOPSIS

    ViewPortAddress(Window)
    struct ViewPort * ViewPortAddress(struct Window *);

DESCRIPTION

    Returns the address of the viewport of a given window. Use this
    call, if you want to use any graphics, text or animation functions
    that require the address of a viewport for your window

INPUTS

    Window - pointer to a Window structure

RESULT

    Address of the Intuition ViewPort structure for the screen that your
    window is displayed on

SEE ALSO

  • graphics.library

WBenchToBack

DESCRIPTION

    Bring the WorkBench behind all other screens

RESULT

    TRUE if the Workbench screen is open, FALSE else

NOTES

    This function does not influence the position of the screen,
    it just changes the depth-arrangement of the screens.

SEE ALSO

WBenchToFront

DESCRIPTION

    Make the WorkBench screen the frontmost

RESULT

    TRUE if the Workbench screen is open, FALSE else

NOTES

    This function does not influence the position of the screen,
    it just changes the depth-arrangement of the screens.

SEE ALSO

WindowAction

SYNOPSIS

    WindowAction(window, action, tags)
    void WindowAction(struct Window *, ULONG, struct TagItem *);

DESCRIPTION

        Performs some action on window that doesn't need to be controlled by caller
        (eg window opened by some other app). Function is safe to call even for
        windows that are destroyed before or when calling this function.

        WindowAction call is an asynchronous operation. It returns before the action
        is actually performed

INPUTS

        Window = the window to perform action on.
        Action = kind of the action to perform.
        TagList = additional tags for specified Actions.
        -----------------------------------------------------------------------------
        Actions:
        WAC_ACTIVATEWINDOW - like ActivateWindow();

        WAC_CHANGEWINDOWBOX - like ChangeWindowBox();

            Tags defined for this method are:
            WAT_WINDOWBOXLEFT - future size in pixels
            WAT_WINDOWBOXTOP
            WAT_WINDOWBOXWIDTH
            WAT_WINDOWBOWHEIGHT

        WAC_HIDEWINDOW - like HideWindow();

        WAC_FAMILYTOBACK - Reoders window and the other windows opened by the same
                           task to back (V51)

        WAC_FAMILYTOFRONT - Reoders window and the other windows opened by the same
                            task to front (V51)

        WAC_MAXIMIZEWINDOW - Maximizes the window (V51)

        WAC_MINIMIZEWINDOW - Minimizes the window (V51)

        WAC_MOVEWINDOW - like MoveWindow();

            Tags defined for this method are:
            WAT_MOVEWINDOWX - offset, like in MoveWindow();
            WAT_MOVEWINDOWY

        WAC_MOVEWINDOWINFRONTOF - like MoveWindowInFrontOf();

            Tags defined for this method are:
            WAT_MOVEBEHINDWINDOW - move Window behind this one

        WAC_OPENMENU - Opens window's menu (V51)

        WAC_RESTOREINITIALSIZEPOS - Restores window's position/size to the one
                        it used at open time (V51)

        WAC_SENDIDCMPCLOSE - send an IDCMP_CLOSEWINDOW message if the window accepts
                         such messages

        WAC_SHOWWINDOW - like ShowWindow();

        WAC_SIZEWINDOW - like SizeWindow();

            Tags defined for this method are:
            WAT_SIZEWINDOWX - offset, like in SizeWindow();
            WAT_SIZEWINDOWY

        WAC_WINDOWTOBACK - like WindowToBack();

        WAC_WINDOWTOFRONT - like WindowToFront();

        WAC_ZIPWINDOW - like ZipWindow

WindowLimits

SYNOPSIS

    WindowLimits(window, MinWidth, MinHeight, MaxWidth, MaxHeight)
    BOOL WindowLimits(struct Window *, WORD, WORD, UWORD, UWORD);

DESCRIPTION

    This functions sets the minimum and maximum sizes of a window

INPUTS

    Window - window to change
    MinWidth, MinHeight - the minimum size, may be 0 for no change
    MaxWidth, MaxHeight - the maximum size, may be 0 for no change,
        may be -1 for no maximum size

RESULT

    A boolean. FALSE is returned if any of the provided sizes is out
    of range. Note that the other sizes take effect, though. TRUE if
    all sizes could be set

SEE ALSO

WindowToBack

SYNOPSIS

    WindowToBack(window)
    void WindowToBack(struct Window *);

DESCRIPTION

    Bring a window to the back (ie. behind any other window

INPUTS

    window - Which window

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

WindowToFront

SYNOPSIS

    WindowToFront(window)
    void WindowToFront(struct Window *);

DESCRIPTION

    Bring a window to the front (ie. before any other window

INPUTS

    window - Which window

RESULT

    None

HISTORY

    29-10-95    digulla automatically created from
                intuition_lib.fd and clib/intuition_protos.h

ZipWindow

SYNOPSIS

    ZipWindow(window)
    void ZipWindow(struct Window *);

DESCRIPTION

    "Zip" (move and resize) a window to the coordinates and dimensions
    the window had at the last call of ZipWindow(), or invoked via the
    zoom-gadget

INPUTS

    window - Which window

RESULT

    None

NOTES

    This call is deferred. Wait() for IDCMP_CHANGEWINDOW if your
    program depends on the new size.

SEE ALSO