[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


    struct SGWork" link Includes/intuition/sghooks.h/MAIN 32}
        {
        struct Gadget       *Gadget;
        struct StringInfo   *StringInfo;
        UBYTE               *WorkBuffer;
        UBYTE               *PrevBuffer;
        ULONG               Modes;
        struct InputEvent   *IEvent;
        UWORD               Code;
        WORD                BufferPos;
        WORD                NumChars;
        ULONG               Actions;
        LONG                LongInt;
        struct GadgetInfo   *GadgetInfo;
        UWORD               EditOp;
        };

The local (application) hook may only change the Code, Actions,
WorkBuffer, NumChars, BufferPos and LongInt fields.  None of the other
fields in the SGWork structure may be modified.

Gadget and StringInfo
    The values in the string gadget before any modification are available
    through the Gadget and StringInfo pointers.

PrevBuffer
    The PrevBuffer provides a shortcut to the old, unmodified string
    buffer.

WorkBuffer, BufferPos, NumChars and LongInt
    WorkBuffer, BufferPos, NumChars and LongInt contain the values that
    the string gadget will take if the edits are accepted.  If the edit
    hook updates these values, the gadget will take on the updated values.

IEvent
    IEvent contains the input event that caused this call to the hook.
    This input event is not keymapped.  Only use this event for action
    keys, like the Return key, function keys or the Esc key.

Code
    If the input event maps to a single character, the keymapped value
    will be in the Code field.  The Code field may also be modified, and
    the value placed in it will be passed back to the application in the
    IDCMP_GADGETUP message when SGA_END is specified in the Actions field.

GadgetInfo
    A structure of information defined in <intuition/cghooks.h>.  This
    structure is read only.  See the "BOOPSI" chapter for more
    information.

Modes
    The modes of the gadget such as insert mode, defined below.

Actions
    The action taken by the edit hook, defined below.

EditOp
    The type of edit operation done by the global hook, defined below.