@database "amigaguide"

@Node Main "amigaguide.doc"
@toc "Includes_&_Autodocs/Main"
    @{" --background-- " Link "--background--"}
    @{" --rexxhost-- " Link "--rexxhost--"}
    @{" AddAmigaGuideHostA() " Link "AddAmigaGuideHostA()"}
    @{" AmigaGuideSignal() " Link "AmigaGuideSignal()"}
    @{" CloseAmigaGuide() " Link "CloseAmigaGuide()"}
    @{" GetAmigaGuideAttr() " Link "GetAmigaGuideAttr()"}
    @{" GetAmigaGuideMsg() " Link "GetAmigaGuideMsg()"}
    @{" GetAmigaGuideString() " Link "GetAmigaGuideString()"}
    @{" LockAmigaGuideBase() " Link "LockAmigaGuideBase()"}
    @{" OpenAmigaGuideA() " Link "OpenAmigaGuideA()"}
    @{" OpenAmigaGuideAsyncA() " Link "OpenAmigaGuideAsyncA()"}
    @{" RemoveAmigaGuideHostA() " Link "RemoveAmigaGuideHostA()"}
    @{" ReplyAmigaGuideMsg() " Link "ReplyAmigaGuideMsg()"}
    @{" SendAmigaGuideCmdA() " Link "SendAmigaGuideCmdA()"}
    @{" SendAmigaGuideContextA() " Link "SendAmigaGuideContextA()"}
    @{" SetAmigaGuideAttrsA() " Link "SetAmigaGuideAttrsA()"}
    @{" SetAmigaGuideContextA() " Link "SetAmigaGuideContextA()"}
    @{" UnlockAmigaGuideBase() " Link "UnlockAmigaGuideBase()"}
@EndNode

@Node "--background--" "amigaguide.library/--background--"
 
@{b}    PURPOSE@{ub}
        The amigaguide.library provides a means whereby developers
        can easily add on-line help abilities to their applications.
 
@EndNode

@Node "--rexxhost--" "amigaguide.library/--rexxhost--"
 
@{b}    HOST INTERFACE@{ub}
        amigaguide.library provides an ARexx function host interface that
        enables ARexx programs to take advantage of the features of
        AmigaGuide.  The functions provided by the interface are directly
        related to the functions described herein, with the differences
        mostly being in the way they are called.
 
        The function host library vector is located at offset -30 from
        the library. This is the value you provide to ARexx in the
        AddLib() function call.
 
@{b}    FUNCTIONS@{ub}
        ShowNode (PUBSCREEN,DATABASE,NODE,LINE,XREF)
 
        LoadXRef (NAME)
 
        GetXRef (NODE)
 
@EndNode

@Node "AddAmigaGuideHostA()" "amigaguide.library/AddAmigaGuideHostA"
 
@{b}     NAME@{ub}
        AddAmigaGuideHostA - Add a dynamic node host.           (V34)
 
@{b}     SYNOPSIS@{ub}
        handle = AddAmigaGuideHostA (hook, name, attrs);
        d0                           a0    d0    a1
 
        AMIGAGUIDEHOST AddAmigaGuideHostA (struct @{"Hook" Link "includes/utility/hooks.h/Main" 27} *, @{"STRPTR" Link "includes/exec/types.h/Main" 53},
                                           struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
@{b}     FUNCTION@{ub}
        This function adds a callback hook to the dynamic node list.
 
        A dynamic node allows an application to incorporate context-
        sensitive or live project data within their help system.
 
@{b}     INPUTS@{ub}
        hook - The callback hook.
        name - Name of the @{"AmigaGuideHost" Link "includes/libraries/amigaguide.h/Main" 142} database that you are adding.
            The name must be unique.
        attrs - Additional attributes.  None are defined at this time.
 
@{b}     RETURNS@{ub}
        Returns NULL if unable to add the dynamic node host, otherwise
        returns a pointer to a handle that will eventually be passed
        to RemoveAmigaGuideHost() to remove the dynamic node host from
        the list.
 
@{b}     NOTES@{ub}
        When AmigaGuide attempts to resolve a LINK command, it performs
        the following sequence of events.
 
           Splits the name into a path, a database and a node (only
             the node is required).
           Opens the database.
           Performs the following searches until the node is found:
             Search the local database.
             Search the local cross reference list.
             Search the local dynamic node host.
             Search the global help file (system help).
             Search the global cross reference list.
             Search the global dynamic node hosts.
 
@{b}     SEE ALSO@{ub}
        @{"RemoveAmigaGuideHostA()" Link "RemoveAmigaGuideHostA()"}
 
@{b}     EXAMPLE@{ub}
 
        /* @{"Hook" Link "includes/utility/hooks.h/Main" 27} dispatcher */
        ULONG __asm hookEntry(
                register __a0 struct @{"Hook" Link "includes/utility/hooks.h/Main" 27} *h,
                register __a2 VOID *obj,
                register __a1 VOID *msg)
        {
            /* Pass the parameters on the stack */
            return ((h->h_SubEntry)(h, obj, msg));
        }
 
        ULONG __saveds
        dispatchAmigaGuideHost (struct @{"Hook" Link "includes/utility/hooks.h/Main" 27} *h, @{"STRPTR" Link "includes/exec/types.h/Main" 53} db, @{"Msg" Link "includes/intuition/classusr.h/Main" 28} msg)
        {
            struct @{"opNodeIO" Link "includes/libraries/amigaguide.h/Main" 198} *onm = (struct @{"opNodeIO" Link "includes/libraries/amigaguide.h/Main" 198} *) msg;
            ULONG retval = 0;
 
            switch (msg->MethodID)
            {
                /* Does this node belong to you? */
                case HM_FINDNODE:
                    {
                        struct @{"opFindHost" Link "includes/libraries/amigaguide.h/Main" 186} *ofh = (struct @{"opFindHost" Link "includes/libraries/amigaguide.h/Main" 186} *) msg;
 
                        kprintf("Find [%s] in %sn", ofh->ofh_Node, db);
 
                        /* Return TRUE to indicate that it's your node,
                         * otherwise return FALSE. */
                        retval = TRUE;
                    }
                    break;
 
                /* Open a node. */
                case HM_OPENNODE:
                    kprintf("Open [%s] in %sn", onm->onm_Node, db);
 
                    /* Provide the contents of the node */
                    onm->onm_DocBuffer = TEMP_NODE;
                    onm->onm_BuffLen   = strlen(TEMP_NODE);
 
                    /* Indicate that we were able to open the node */
                    retval = TRUE;
                    break;
 
                /* Close a node, that has no users. */
                case HM_CLOSENODE:
                    kprintf("Close [%s] in %sn", onm->onm_Node, db);
 
                    /* Indicate that we were able to close the node */
                    retval = TRUE;
                    break;
 
                /* Free any extra memory */
                case HM_EXPUNGE:
                    kprintf("Expunge [%s]n", db);
                    break;
 
                default:
                    kprintf("Unknown method %ldn", msg->MethodID);
                    break;
            }
 
            return (retval);
        }
 
        main(int argc, char **argv)
        {
            struct @{"Hook" Link "includes/utility/hooks.h/Main" 27} hook;
            AMIGAGUIDEHOST hh;
 
            /* Open the library */
            if (AmigaGuideBase = OpenLibrary("amigaguide.library", 33))
            {
                /* Initialize the hook */
                hook.h_Entry    = hookEntry;
                hook.h_SubEntry = dispatchAmigaGuideHost;
 
                /* Add the @{"AmigaGuideHost" Link "includes/libraries/amigaguide.h/Main" 142} to the system */
                if (hh = AddAmigaGuideHost(&hook, "ExampleHost", NULL))
                {
                    /* Wait until we're told to quit */
                    Wait(SIGBREAKF_CTRL_C);
 
                    /* Try removing the host */
                    while (RemoveAmigaGuideHost(hh, NULL) > 0)
                    {
                        /* Wait a while */
                        Delay(5);
                    }
                }
 
                /* close the library */
                CloseLibrary(AmigaGuideBase);
            }
        }
 
@{b}     BUGS@{ub}
        When a dynamic node host is first added it will receive a
        HM_FINDNODE message with an onm_Node of "Main".  The
        AGA_HelpGroup attribute will always be zero for this
        particular message.
 
@EndNode

@Node "AmigaGuideSignal()" "amigaguide.library/AmigaGuideSignal"
 
@{b}    NAME@{ub}
        AmigaGuideSignal - Obtain aysnc AmigaGuide signal.      (V34)
 
@{b}    SYNOPSIS@{ub}
        signal = AmigaGuideSignal ( handle );
        d0                          a0
 
        ULONG AmigaGuideSignal (AMIGAGUIDECONTEXT);
 
@{b}    FUNCTION@{ub}
        This function returns the signal bit to Wait on for AmigaGuideMsg's
        for a particular AmigaGuide database.
 
@{b}    INPUTS@{ub}
        handle  - Handle to a AmigaGuide system.
 
@{b}    EXAMPLE@{ub}
        ULONG sigw, sigh;
        @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} handle;
 
        /* get the signal bit to wait on for a AmigaGuide message */
        sigh = AmigaGuideSignal(handle);
 
        /* add the signal bit into the total signals to wait on */
        sigw |= sigh;
 
@{b}    RETURNS@{ub}
        signal  - @{"Signal" Link "exec/Signal()"} bit to Wait on.
 
@{b}    SEE ALSO@{ub}
        @{"OpenAmigaGuideAsyncA()" Link "OpenAmigaGuideAsyncA()"}, @{"GetAmigaGuideMsg()" Link "GetAmigaGuideMsg()"}, @{"ReplyAmigaGuideMsg()" Link "ReplyAmigaGuideMsg()"}
 
@EndNode

@Node "CloseAmigaGuide()" "amigaguide.library/CloseAmigaGuide"
 
@{b}     NAME@{ub}
        CloseAmigaGuide - Close a AmigaGuide client.            (V34)
 
@{b}     SYNOPSIS@{ub}
        CloseAmigaGuide (handle);
                          a0
 
        VOID CloseAmigaGuide (AMIGAGUIDECONTEXT);
 
@{b}     FUNCTION@{ub}
        Closes a synchronous, or asynchronous, AmigaGuide client.
 
        This function will also close all windows that were opened for
        the client.
 
@{b}     INPUTS@{ub}
        handle - Handle to an AmigaGuide client.
 
@{b}     SEE ALSO@{ub}
        @{"OpenAmigaGuideA()" Link "OpenAmigaGuideA()"}, @{"OpenAmigaGuideAsyncA()" Link "OpenAmigaGuideAsyncA()"}
 
@EndNode

@Node "GetAmigaGuideAttr()" "amigaguide.library/GetAmigaGuideAttr"
 
@{b}     NAME@{ub}
        GetAmigaGuideAttr - Get an AmigaGuide attribute.        (V34)
 
@{b}     SYNOPSIS@{ub}
        retval = GetAmigaGuideAttr (tag, handle, storage);
        d0                          d0   a0      a1
 
        @{"LONG" Link "includes/exec/types.h/Main" 35} GetAmigaGuideAttr (Tag, @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84}, ULONG *);
 
@{b}     FUNCTION@{ub}
        This function is used to obtain attributes from AmigaGuide.
 
@{b}     INPUTS@{ub}
        tag - Attribute to obtain.
        handle - Handle to an AmigaGuide system.
        storage - Pointer to appropriate storage for the answer.
 
@{b}     TAGS@{ub}
        AGA_Path (BPTR) - Pointer to the current path used by
            AmigaGuide.
 
        AGA_XRefList (struct @{"List" Link "includes/exec/lists.h/Main" 19} *) - Pointer to the current
            cross reference list.
 
@{b}     RETURNS@{ub}
 
@{b}     SEE ALSO@{ub}
        @{"SetAmigaGuideAttrsA()" Link "SetAmigaGuideAttrsA()"}
 
@EndNode

@Node "GetAmigaGuideMsg()" "amigaguide.library/GetAmigaGuideMsg"
 
@{b}    NAME@{ub}
        GetAmigaGuideMsg - Receive async AmigaGuide message.    (V34)
 
@{b}    SYNOPSIS@{ub}
        msg = GetAmigaGuideMsg (handle);
        d0                       a0
 
        struct @{"AmigaGuideMsg" Link "includes/libraries/amigaguide.h/Main" 86} *GetAmigaGuideMsg (AMIGAGUIDECONTEXT);
 
@{b}    FUNCTION@{ub}
        This function returns a SIPC message from the AmigaGuide system,
        if there is a message available.
 
@{b}    INPUTS@{ub}
        handle - Handle to a AmigaGuide system.
 
@{b}    EXAMPLE@{ub}
 
        @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} handle;
        struct @{"AmigaGuideMsg" Link "includes/libraries/amigaguide.h/Main" 86} *agm;
 
        /* get a AmigaGuide message */
        while (agm = GetAmigaGuideMsg(handle))
        {
            /* process the event */
            switch (agm->agm_Type)
            {
                case ToolCmdReplyID:    /* a command has completed */
                    if (agm->agm_Pri_Ret)
                    {
                        /* An error occurred, the reason is in agm_Sec_Ret.
                         * The command string is in agm_Data
                         */
                    }
                    break;
 
                case ToolStatusID:      /* status message */
                    if (agm->agm_Pri_Ret)
                    {
                        /* an error occurred, the reason is in agm_Sec_Ret */
                    }
                    break;
 
                default:
                    break;
            }
 
            /* reply to the AmigaGuide message */
            ReplyAmigaGuideMsg(agm);
        }
 
@{b}    RETURNS@{ub}
        msg     - Pointer to a SIPC message or NULL if no message was
                  available.
 
@{b}    SEE ALSO@{ub}
        @{"OpenAmigaGuideAsyncA()" Link "OpenAmigaGuideAsyncA()"}, @{"AmigaGuideSignal()" Link "AmigaGuideSignal()"}, @{"ReplyAmigaGuideMsg()" Link "ReplyAmigaGuideMsg()"}
 
@EndNode

@Node "GetAmigaGuideString()" "amigaguide.library/GetAmigaGuideString"
 
@{b}    NAME@{ub}
        GetAmigaGuideString - Get an AmigaGuide string.
                                                                (V34)
@{b}    SYNOPSIS@{ub}
        txt = GetAmigaGuideString (id);
        d0                         d0
 
        @{"STRPTR" Link "includes/exec/types.h/Main" 53} GetAmigaGuideString (ULONG);
 
@{b}    FUNCTION@{ub}
        This function is used to obtain a localized string given the
        ID.
 
@{b}    INPUTS@{ub}
        ID -- Valid AmigaGuide string id.
 
@{b}    RETURNS@{ub}
        A pointer to the string.   NULL for an invalid string.
 
@{b}    SEE ALSO@{ub}
 
@EndNode

@Node "LockAmigaGuideBase()" "amigaguide.library/LockAmigaGuideBase"
 
@{b}     NAME@{ub}
        LockAmigaGuideBase - Lock an AmigaGuide client.         (V34)
 
@{b}     SYNOPSIS@{ub}
        key = LockAmigaGuideBase (AMIGAGUIDECONTEXT handle);
                                  a0
 
        @{"LONG" Link "includes/exec/types.h/Main" 35} LockAmigaGuideBase (AMIGAGUIDECONTEXT);
 
@{b}     FUNCTION@{ub}
        This function is used to lock the AmigaGuide context handle
        while working with data obtained with the the
        @{"GetAmigaGuideAttr()" Link "GetAmigaGuideAttr()"} function.
 
@{b}     INPUTS@{ub}
        handle - @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} handle obtained with
            OpenAmigaGuideAsync().
 
@{b}     RETURNS@{ub}
        Returns a key to pass to @{"UnlockAmigaGuideBase()" Link "UnlockAmigaGuideBase()"}.
 
@{b}     SEE ALSO@{ub}
        @{"UnlockAmigaGuideBase()" Link "UnlockAmigaGuideBase()"}
 
@EndNode

@Node "OpenAmigaGuideA()" "amigaguide.library/OpenAmigaGuideA"
 
@{b}     NAME@{ub}
        OpenAmigaGuideA - Open a synchronous AmigaGuide database.
 
@{b}     SYNOPSIS@{ub}
        handle = OpenAmigaGuideA (nag, attrs);
        d0                       a0   a1
 
        @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} OpenAmigaGuideA (struct @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} *,
                                           struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
        handle = OpenAmigaGuide (nag, tag1, ...);
 
        @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} OpenAmigaGuide (struct @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} *,
                                          @{"Tag" Link "includes/utility/tagitem.h/Main" 29} tag1, ...);
 
@{b}     FUNCTION@{ub}
        Opens a AmigaGuide database, complete with the first viewing
        window, for synchronous activity.
 
        Before you call OpenAmigaGuide(), you must initialize a @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100}
        structure.  @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} is a structure that contains all the
        information needed to open a database.  The @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} structure
        must be retained until the call returns.
 
        The function will not return until the user closes all the
        windows.
 
@{b}     INPUTS@{ub}
        nag - Pointer to an instance of a @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} structure.  That
            structure is initialized with the following data.
 
                  nag_Lock
                  Lock on the directory that the database is located in.
                  Not needed if nag_Name contains the complete path name.
 
                  nag_Name
                  Name of the AmigaGuide database.
 
                  nag_Screen
                  @{"Screen" Link "includes/intuition/screens.h/Main" 132} to open the viewing windows on, NULL for the
                  Workbench screen.
 
                  nag_PubScreen
                  Pointer to the name of the public screen to open on.
                  Must already be opened.
 
                  nag_HostPort
                  Name of the applications' ARexx port (currently not used).
 
                  nag_ClientPort
                  Base name to use for the databases' ARexx port.
 
                  nag_Flags
                  Used to specify the requirements of this database.  The
                  flags are defined in @{"<libraries/amigaguide.h>" Link "includes/libraries/amigaguide.h/Main" 0}.
 
                  nag_Context
                  NULL terminated array of context nodes, in the form of:
 
                        /* context array */
                        @{"STRPTR" Link "includes/exec/types.h/Main" 53} context[] =
                        {
                            "MAIN",
                            "INTRO",
                            "GADGETS",
                            NULL
                        };
 
                  The context array is not copied, but referenced,
                  therefore must remain static throughout the useage of
                  the AmigaGuide system.  This array is only referenced
                  when using the SetAmigaGuideContext() function.
 
                  nag_Node
                  @{"Node" Link "includes/exec/nodes.h/Main" 21} to start at (does not work with OpenAmigaGuideAsync()).
 
                  nag_Line
                  @{"Line" Link "includes/datatypes/textclass.h/Main" 42} to start at (does not work with OpenAmigaGuideAsync()).
 
                  nag_Extens
                  Used by V37 and beyond to pass additional arguments.
 
                  nag_Client
                  This is a private pointer, MUST be initialized to NULL.
 
        attrs - Additional attributes.
 
@{b}     TAGS@{ub}
        AGA_HelpGroup (ULONG) -- Unique identifier used to identify the
            AmigaGuide help windows.  See @{"OpenWindow()" Link "intuition/OpenWindow()"} and @{"GetUniqueID()" Link "utility/GetUniqueID()"}.
 
            Default for this tag is NULL.  Applicability is (I). (V39)
 
@{b}     EXAMPLE@{ub}
 
        /* Short example showing synchronous AmigaGuide access */
        @{"LONG" Link "includes/exec/types.h/Main" 35} ShowAmigaGuideFile (STRPTR name, @{"STRPTR" Link "includes/exec/types.h/Main" 53} node, @{"LONG" Link "includes/exec/types.h/Main" 35} line)
        {
            struct @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} nag = {NULL};
            @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} handle;
            @{"LONG" Link "includes/exec/types.h/Main" 35} retval = 0L;
 
            /* Fill in the @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} structure */
            nag.nag_Name = name;
            nag.nag_Node = node;
            nag.nag_Line = line;
 
            /* Open the AmigaGuide client */
            if ( handle = OpenAmigaGuide(&nag, NULL))
            {
                /* Close the AmigaGuide client */
                CloseAmigaGuide(handle);
            }
            else
            {
                /* Get the reason for failure */
                retval = IoErr();
            }
 
            return (retval);
        }
 
@{b}     RETURNS@{ub}
        handle - Handle to a AmigaGuide system.
 
@{b}     SEE ALSO@{ub}
        @{"OpenAmigaGuideAsyncA()" Link "OpenAmigaGuideAsyncA()"}, @{"CloseAmigaGuide()" Link "CloseAmigaGuide()"}
 
@EndNode

@Node "OpenAmigaGuideAsyncA()" "amigaguide.library/OpenAmigaGuideAsyncAamigaguide.library/OpenAmigaGuideAsyncA"
 
@{b}    NAME@{ub}
        OpenAmigaGuideAsyncA - Open an AmigaGuide database async (V34)
 
@{b}    SYNOPSIS@{ub}
        handle = OpenAmigaGuideAsyncA (nag, attrs);
        d0                            a0   d0
 
        @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} OpenAmigaGuideAsyncA (struct @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} *,
                                                struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
        handle = OpenAmigaGuideAsync (nag, tag1, ...);
 
        @{"AMIGAGUIDECONTEXT" Link "includes/libraries/amigaguide.h/Main" 84} OpenAmigaGuideAsyncA (struct @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} *,
                                                @{"Tag" Link "includes/utility/tagitem.h/Main" 29} tag1, ...);
 
@{b}    FUNCTION@{ub}
        Opens an AmigaGuide database for ansynchronous use.
 
        The @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} structure, and its pointers, must stay valid until
        an ActiveToolID or ToolStatusID message is received by the calling
        process.
 
        This function actually spawns OpenAmigaGuide() as another process, so,
        for further documentation, refer to the OpenAmigaGuide() function.
 
@{b}    INPUTS@{ub}
        nag     - Pointer to a valid @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} structure.
                  (see OpenAmigaGuide() for documentation on its useage).
 
        attrs   - Additional attributes.  See @{"OpenAmigaGuideA()" Link "OpenAmigaGuideA()"}.
 
@{b}    RETURNS@{ub}
        handle  - Handle to an AmigaGuide system.
 
@{b}    SEE ALSO@{ub}
        @{"OpenAmigaGuideA()" Link "OpenAmigaGuideA()"}, @{"CloseAmigaGuide()" Link "CloseAmigaGuide()"}
 
@EndNode

@Node "RemoveAmigaGuideHostA()" "amigaguide.library/RemoveAmigaGuideHostAamigaguide.library/RemoveAmigaGuideHostA"
 
@{b}     NAME@{ub}
        RemoveAmigaGuideHostA - Remove a dynamic node host.     (V34)
 
@{b}     SYNOPSIS@{ub}
        use = RemoveAmigaGuideHostA (key, attrs)
        d0                           a0   a1
 
        @{"LONG" Link "includes/exec/types.h/Main" 35} RemoveAmigaGuideHostA (AMIGAGUIDEHOST, struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
        use = RemoveAmigaGuideHost (key, tag1, ...);
 
        @{"LONG" Link "includes/exec/types.h/Main" 35} RemoveAmigaGuideHost (AMIGAGUIDEHOST, @{"Tag" Link "includes/utility/tagitem.h/Main" 29}, ...);
 
@{b}     FUNCTION@{ub}
        This function removes a dynamic node host, that was added by
        AddAmigaGuideHost(), from the system.
 
@{b}     INPUTS@{ub}
        key - Key that was returned by AddAmigaGuideHost().
 
        attrs - Additional attributes.  None are defined at this time.
 
@{b}     RETURNS@{ub}
        use - Number of outstanding clients of this database.  You
            can not exit until use==0.
 
@{b}     SEE ALSO@{ub}
        @{"AddAmigaGuideHostA()" Link "AddAmigaGuideHostA()"}
 
@EndNode

@Node "ReplyAmigaGuideMsg()" "amigaguide.library/ReplyAmigaGuideMsg"
 
@{b}    NAME@{ub}
        ReplyAmigaGuideMsg - Reply to an AmigaGuide message.    (V34)
 
@{b}    SYNOPSIS@{ub}
        ReplyAmigaGuideMsg ( msg );
                             a0
 
        VOID ReplyAmigaGuideMsg (struct @{"AmigaGuideMsg" Link "includes/libraries/amigaguide.h/Main" 86} *msg);
 
@{b}    FUNCTION@{ub}
        This function is used to reply to an AmigaGuide SIPC message.
 
@{b}    INPUTS@{ub}
        msg - Pointer to a SIPC message returned by a previous call to
            @{"GetAmigaGuideMsg()" Link "GetAmigaGuideMsg()"}.
 
@{b}    SEE ALSO@{ub}
        @{"OpenAmigaGuideAsyncA()" Link "OpenAmigaGuideAsyncA()"}, @{"AmigaGuideSignal()" Link "AmigaGuideSignal()"}, @{"GetAmigaGuideMsg()" Link "GetAmigaGuideMsg()"}
 
@EndNode

@Node "SendAmigaGuideCmdA()" "amigaguide.library/SendAmigaGuideCmdA"
 
@{b}    NAME@{ub}
        SendAmigaGuideCmdA - Send a command string to AmigaGuide (V34)
 
@{b}    SYNOPSIS@{ub}
        success = SendAmigaGuideCmdA (handle, cmd, attrs );
        d0                              a0    d0   d1
 
        @{"BOOL" Link "includes/exec/types.h/Main" 68} SendAmigaGuideCmdA (AMIGAGUIDECONTEXT, @{"STRPTR" Link "includes/exec/types.h/Main" 53}, struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
        success = SendAmigaGuideCmd (handle, cmd, tag1, ...);
 
        @{"BOOL" Link "includes/exec/types.h/Main" 68} SendAmigaGuideCmd (AMIGAGUIDECONTEXT, @{"STRPTR" Link "includes/exec/types.h/Main" 53}, Tag);
 
@{b}    FUNCTION@{ub}
        This function sends a command string to an AmigaGuide system.  The
        command can consist of any valid AmigaGuide action command.
 
        The following are the currently valid action commands:
 
        ALINK <name> - Load the named node into a new window.
 
        LINK <name> - Load the named node.
 
        RX <macro> - Execute an ARexx macro.
 
        RXS <cmd> - Execute an ARexx string file.  To display a picture,
            use 'ADDRESS COMMAND DISPLAY <picture name>', to
            display a text file 'ADDRESS COMMAND MORE <doc>'.
 
        CLOSE - Close the window (should only be used on windows
            that were started with ALINK).
 
        QUIT - Shutdown the current database.
 
@{b}    INPUTS@{ub}
        handle - Handle to an AmigaGuide system.
 
        cmd - Command string.
 
        attrs - Future expansion, must be set to NULL for now.
 
@{b}    TAGS@{ub}
        AGA_Context (ULONG) - Data is used as an index into nag_Context
            array.  This is used to build and send a LINK command.
 
@{b}    EXAMPLE@{ub}
 
        /* bring up help on a particular subject */
        SendAmigaGuideCmd(handle, "LINK MAIN", NULL);
 
@{b}    RETURNS@{ub}
        Returns TRUE if the message was sent, otherwise returns FALSE.
 
@{b}    BUGS@{ub}
        ALINK does not open a new window when using V39.
 
@{b}    SEE ALSO@{ub}
 
@EndNode

@Node "SendAmigaGuideContextA()" "amigaguide.library/SendAmigaGuideContextAamigaguide.library/SendAmigaGuideContextA"
 
@{b}    NAME@{ub}
        SendAmigaGuideContextA - Align an AmigaGuide system on the context ID.
                                                                (V34)
@{b}    SYNOPSIS@{ub}
        success = SendAmigaGuideContextA (handle, attrs);
        d0                                a0      d0
 
        @{"BOOL" Link "includes/exec/types.h/Main" 68} SendAmigaGuideContextA (AMIGAGUIDECONTEXT, struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
        success = SendAmigaGuideContext (handle, tag1, ...);
 
        @{"BOOL" Link "includes/exec/types.h/Main" 68} SendAmigaGuideContext (AMIGAGUIDECONTEXT, @{"Tag" Link "includes/utility/tagitem.h/Main" 29}, ...);
 
@{b}    FUNCTION@{ub}
        This function is used to send a message to an AmigaGuide system to
        align it on the current context ID.
 
        This function effectively does a:
 
            SendAmigaGuideCmd(handle 'LINK ContextArray[contextID]', NULL);
 
@{b}    INPUTS@{ub}
        handle - Handle to an AmigaGuide system.
        future - Future expansion, must be set to NULL for now.
 
@{b}    EXAMPLE@{ub}
 
        struct @{"IntuiMessage" Link "includes/intuition/intuition.h/Main" 763} *imsg;
 
        ...
 
        case RAWKEY:
            switch (imsg->Code)
            {
                case 95:
                    /* bring up help on a particular subject */
                    SendAmigaGuideContext(handle, NULL);
                    break;
                ...
            }
            break;
 
        ...
 
@{b}    RETURNS@{ub}
        success - Returns TRUE if the message was sent, otherwise returns
            FALSE.
 
@{b}    SEE ALSO@{ub}
        @{"SetAmigaGuideContextA()" Link "SetAmigaGuideContextA()"}, @{"SendAmigaGuideCmdA()" Link "SendAmigaGuideCmdA()"}
 
@EndNode

@Node "SetAmigaGuideAttrsA()" "amigaguide.library/SetAmigaGuideAttrsA"
 
@{b}     NAME@{ub}
        SetAmigaGuideAttrsA - Set an AmigaGuide attribute.      (V34)
 
@{b}     SYNOPSIS@{ub}
        retval = SetAmigaGuideAttrsA (handle, attrs);
        d0                            a0      a1
 
        @{"LONG" Link "includes/exec/types.h/Main" 35} SetAmigaGuideAttrsA (AMIGAGUIDECONTEXT, struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *);
 
        retval = SetAmigaGuideAttrs (handle, tag1, ...);
 
        @{"LONG" Link "includes/exec/types.h/Main" 35} SetAmigaGuideAttrs (AMIGAGUIDECONTEXT, @{"Tag" Link "includes/utility/tagitem.h/Main" 29}, ...);
 
@{b}     FUNCTION@{ub}
        This function is used to set AmigaGuide attributes.
 
@{b}     INPUTS@{ub}
        handle  - Pointer to an AmigaGuide handle.
 
        attrs   - Attribute pairs to set.
 
@{b}     TAGS@{ub}
        AGA_Activate (BOOL) - AmigaGuide activates the window when
            it receives a LINK command.  This tag allows the
            application developer to turn that feature off and on.
 
@{b}     SEE ALSO@{ub}
        @{"GetAmigaGuideAttr()" Link "GetAmigaGuideAttr()"}
 
@EndNode

@Node "SetAmigaGuideContextA()" "amigaguide.library/SetAmigaGuideContextAamigaguide.library/SetAmigaGuideContextA"
 
@{b}    NAME@{ub}
        SetAmigaGuideContextA - Set the context ID for an AmigaGuide system.
                                                                (V34)
@{b}    SYNOPSIS@{ub}
        success = SetAmigaGuideContextA ( handle, context, attrs );
        d0                               a0         d0       d1
 
        @{"BOOL" Link "includes/exec/types.h/Main" 68} SetAmigaGuideContextA (AMIGAGUIDECONTEXT, ULONG, struct @{"TagItem" Link "includes/utility/tagitem.h/Main" 31} *
        );
 
        success = SetAmigaGuideContext (handle, context, tag1, ...);
 
        @{"BOOL" Link "includes/exec/types.h/Main" 68} SetAmigaGuideContext (AMIGAGUIDECONTEXT, ULONG, @{"Tag" Link "includes/utility/tagitem.h/Main" 29}, ...);
 
@{b}    FUNCTION@{ub}
        This function, and the SendAmigaGuideContext() function, are used to
        provide a simple way to display a node based on a numeric value,
        instead of having to build up a slightly more complex command
        string.
 
@{b}    INPUTS@{ub}
        handle  - Handle to an AmigaGuide system.
 
        context - Index value of the desired node to display.
 
        future  - Future expansion, must be set to NULL for now.
 
@{b}    EXAMPLE@{ub}
 
        /* sample context table */
        @{"STRPTR" Link "includes/exec/types.h/Main" 53} ContextArray[] =
        {
            "MAIN",
            "FILEREQ",
            "PRINT",
            "ABOUT",
            NULL
        };
 
        /* quickie defines */
        #define HELP_MAIN       0
        #define HELP_FILEREQ    1
        #define HELP_PRINT      2
        #define HELP_ABOUT      3
 
        ...
 
        struct @{"NewAmigaGuide" Link "includes/libraries/amigaguide.h/Main" 100} nag = {NULL};
 
        /* initialize the context table */
        nag.nag_Context = ContextArray;
 
        ...
 
        /* bring up help on a particular subject */
        SetAmigaGuideContext(handle, HELP_ABOUT, NULL);
 
@{b}    RETURNS@{ub}
        success - Returns TRUE if a valid context ID was passed,
            otherwise returns FALSE.
 
@{b}    SEE ALSO@{ub}
        @{"SendAmigaGuideContextA()" Link "SendAmigaGuideContextA()"}, @{"SendAmigaGuideCmdA()" Link "SendAmigaGuideCmdA()"}
 
@EndNode

@Node "UnlockAmigaGuideBase()" "amigaguide.library/UnlockAmigaGuideBaseamigaguide.library/UnlockAmigaGuideBase"
 
@{b}     NAME@{ub}
        UnlockAmigaGuideBase - Unlock an AmigaGuide client.     (V34)
 
@{b}     SYNOPSIS@{ub}
        UnlockAmigaGuideBase (key);
                              d0
 
        VOID UnlockAmigaGuideBase (LONG);
 
@{b}     FUNCTION@{ub}
        This function is used to release a lock obtained with
        @{"LockAmigaGuideBase()" Link "LockAmigaGuideBase()"}.
 
@{b}     INPUTS@{ub}
        key - Value returned by @{"LockAmigaGuideBase()" Link "LockAmigaGuideBase()"}.
 
@{b}     SEE ALSO@{ub}
        @{"LockAmigaGuideBase()" Link "LockAmigaGuideBase()"}.
 
@EndNode

