diff options
Diffstat (limited to 'src/grt/grt-hooks.ads')
-rw-r--r-- | src/grt/grt-hooks.ads | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/grt/grt-hooks.ads b/src/grt/grt-hooks.ads index 20846c7..1243908 100644 --- a/src/grt/grt-hooks.ads +++ b/src/grt/grt-hooks.ads @@ -28,7 +28,15 @@ package Grt.Hooks is type Option_Hook_Type is access function (Opt : String) return Boolean; type Proc_Hook_Type is access procedure; + type Cst_String_Acc is access constant String; + type Hooks_Type is record + -- A one-line description of the hook. The format is: + -- "NAME: description". NAME should be uniq and is tested by the + -- switch --has-feature=NAME. + -- DESC can be null if there is no interesting feature added. + Desc : Cst_String_Acc; + -- Called for every unknown command line argument. -- Return TRUE if handled. Option : Option_Hook_Type; @@ -54,6 +62,12 @@ package Grt.Hooks is -- Register an hook which will call PROC after every non-delta cycles. procedure Register_Cycle_Hook (Proc : Proc_Hook_Type); + -- Display the description of the hooks. + procedure Display_Hooks_Desc; + + -- Return True if NAME is present in the list of modules. + function Has_Feature (Name : String) return Boolean; + -- Call hooks. function Call_Option_Hooks (Opt : String) return Boolean; procedure Call_Help_Hooks; |