2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
7 Test for FRF_INTUIFUNC. Activating of the window "ASL hook" triggers
8 the callback function. Note that the function used for ASL_HookFunc isn't
9 a Hook function. It's a function whose arguments are given on the stack.
12 #include <exec/types.h>
13 #include <intuition/intuition.h>
14 #include <dos/dosasl.h>
15 #include <libraries/asl.h>
17 #include <proto/exec.h>
18 #include <proto/dos.h>
19 #include <proto/asl.h>
20 #include <proto/intuition.h>
21 #include <proto/intuition.h>
25 static struct Window
*window
;
27 static IPTR
func(ULONG mask
, APTR object
, struct FileRequester
*fr
)
29 struct IntuiMessage
*msg
;
30 printf("hookfunc mask %u object %p filerequester %p\n", (unsigned int)mask
, object
, fr
);
34 msg
= (struct IntuiMessage
*)object
;
35 printf("intuimsg msg %p, class %u code %d\n", msg
, (unsigned int)msg
->Class
, msg
->Code
);
39 printf("filterfunc: %s\n", ((struct AnchorPath
*)object
)->ap_Info
.fib_FileName
);
48 struct FileRequester
*fr
;
50 if (window
= OpenWindowTags(NULL
,
54 WA_IDCMP
, IDCMP_ACTIVEWINDOW
,
55 WA_Flags
, WFLG_DEPTHGADGET
,
58 if (fr
= AllocFileRequest())
60 if (AslRequestTags(fr
,
65 ASLFR_Flags1
, FRF_FILTERFUNC
| FRF_INTUIFUNC
,
68 printf("path %s file %s\n", fr
->rf_Dir
, fr
->rf_File
);