mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-21 16:55:01 -05:00
Initial hooks code
This commit is contained in:
parent
0f25bc7d06
commit
7d565b9b8c
@ -22,6 +22,28 @@ type
|
||||
|
||||
end;
|
||||
|
||||
|
||||
{ Each hook has a HookName which the extension uses to identify the hook.
|
||||
Additionally, variables are exported. Currently we will use an Array of Variant.
|
||||
Therefore, we will have to specify what amount Arguments we will pass.
|
||||
( So it is not type safe... Not like Variants are type safe... )
|
||||
}
|
||||
type TEventHook = record
|
||||
HookName: String;
|
||||
ArgumentCount: Integer;
|
||||
end;
|
||||
|
||||
var
|
||||
EventHooks: Array [0..7] of TEventHook =
|
||||
( (HookName : 'onScriptCompile' ; ArgumentCount : 1),
|
||||
(HookName : 'onScriptStart' ; ArgumentCount : 1),
|
||||
(HookName : 'onScriptPause' ; ArgumentCount : 1),
|
||||
(HookName : 'onScriptStop' ; ArgumentCount : 1),
|
||||
(HookName : 'onColourPick' ; ArgumentCount : 3),
|
||||
(HookName : 'onOpenFile' ; ArgumentCount : 1),
|
||||
(HookName : 'onOpenSocket' ; ArgumentCount : 1),
|
||||
(HookName : 'onWriteFile' ; ArgumentCount : 1));
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user