[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

Use of GadTools gadgets requires some per-window context information.
createcontext() establishes a place for that information to go. this
function must be called before any GadTools gadgets are created.

    struct Gadget *CreateContext( struct Gadget **glistptr );

The glistptr argument is a double-pointer to a gadget structure.  more
specifically, this is a pointer to a NULL-initialized pointer to a Gadget
structure.

The return value of createcontext() is a pointer to this gadget, which
should be fed to the program's first call to creategadget().  this pointer
to the gadget structure returned by createcontext(), may then serve as a
handle to the list of gadgets as they are created.  The code fragment
listed in the next section shows how to use CreateContext() together with
CreateGadget() to make a linked list of GadTools gadgets.