GGUserInput.mesa
Author: Eric Bier on June 6, 1985 0:56:45 am PDT
Last edited by Bier on November 8, 1987 11:17:46 pm PST
Contents: Procedures which handle user actions (menu buttons and mouse actions).
Pier, June 13, 1991 3:57 pm PDT
Bier, August 30, 1989 1:13:13 pm PDT
DIRECTORY
BiScrollers, GGBasicTypes, GGInterfaceTypes, Menus, ViewerClasses;
GGUserInput: CEDAR DEFINITIONS =
BEGIN
GGData: TYPE = GGInterfaceTypes.GGData;
Point: TYPE = GGBasicTypes.Point;
UserInputProc: TYPE = PROC [ggData: GGData, event: LIST OF REF ANY];
Viewer: TYPE = ViewerClasses.Viewer;
External: TYPE = REF ExternalRec;
ExternalRec: TYPE = RECORD [
valid: BOOLFALSE,
results: REF
];
WaitExternal: PROC [External];
BroadcastExternal: PROC [External];
NotifyExternal: PROC [External];
ExternalRec is used by applications external to Gargoyle to return results to those applications. Clients should call EventNotify with a registered external proc name and a REF to an ExternalRec on a two-element event list. Client should then call WaitExternal, which will return when Gargoyle completes the desired action, puts results in "results", and sets "valid" to TRUE. Gargoyle will use BroadcastExternal when actions complete.
HandleMenuAction: Menus.ClickProc;
InputNotify: PROC [self: ViewerClasses.Viewer, input: LIST OF REF ANY];
An action has been received from the Gargoyle TIP table.
BiScrollerInputNotify: BiScrollers.BSUserActionProc;
An action has been received from BiScroller (e.g. from the ScrollBar).
EventNotify: PROC [clientData: REF ANY, event: LIST OF REF ANY];
UnQueuedEventNotify: PROC [clientData: REF ANY, event: LIST OF REF ANY];
PlayAction: PROC [clientData: REF ANY, event: LIST OF REF ANY];
An action has been received from some other source. The clientData argument is passed to the EventProc that was registered for by RegisterAction for the ATOM event.first. event.first must be an ATOM.
An action has been received from a Gargoyle playback script.
ArgumentType: TYPE = {none, rope, rope2, refInt, refReal, refCard, refExt};
RegisterAction: PROC [atom: ATOM, eventProc: UserInputProc, argType: ArgumentType, causeMouseEventsToComplete: BOOLTRUE, ensureUnique: BOOLTRUE];
For clients who wish to extend Gargoyle's input language. Once atom is registered, then clients may add such an action to the queue by calling EventNotify above. argType is the type of value that Gargoyle should expect in event.rest.first when EventNotify is called. If such a value is not present, Gargoyle will parse the current Tioga selection to make one (except for refExt). If causeMouseEventsToComplete is TRUE, Gargoyle will finish any mouse actions in progress before trying this action. causeMouseEventsToComplete should almost always be TRUE. If ensureUnique is TRUE Gargoyle will raise a SIGNAL if an action is register more than once.
SetUserTraceOn: PROC [on: BOOL];
GetUserTraceOn: PROC RETURNS [on: BOOL];
RegisterRawInputHandler: PROC [rawInputHandler: RawInputHandlerProc];
RawInputHandlerProc: TYPE = PROC [self: Viewer, ggData: GGData, input: LIST OF REF ANY];
END.