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.