Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / AHI / Drivers / Common / DriverBase.h
blob95059318584ecfd503f0652cebc9592fee8a4cc6
1 #ifndef AHI_Drivers_Common_DriverBase_h
2 #define AHI_Drivers_Common_DriverBase_h
4 #include <dos/dos.h>
5 #include <exec/execbase.h>
6 #include <intuition/intuitionbase.h>
7 #include <utility/utility.h>
8 #include <proto/exec.h>
9 #include <proto/intuition.h>
10 #include <proto/utility.h>
12 struct DriverBase
14 struct Library library;
15 UWORD pad;
16 BPTR seglist;
17 #ifndef DRIVER_NEEDS_GLOBAL_EXECBASE
18 struct ExecBase* execbase;
19 #endif
20 struct IntuitionBase* intuitionbase;
21 struct UtilityBase* utilitybase;
23 #ifdef __AMIGAOS4__
24 # ifndef DRIVER_NEEDS_GLOBAL_EXECBASE
25 struct ExecIFace* iexec;
26 # endif
27 struct AHIsubIFace* iahisub;
28 struct IntuitionIFace* iintuition;
29 struct UtilityIFace* iutility;
30 #endif
33 #ifndef DRIVER_NEEDS_GLOBAL_EXECBASE
34 # define SysBase (AHIsubBase->execbase)
35 #endif
37 #if !defined(DRIVER_LIBSTUB)
38 #define IntuitionBase ((struct IntuitionBase*) AHIsubBase->intuitionbase)
39 #define UtilityBase ((struct UtilityBase*) AHIsubBase->utilitybase)
40 #endif
42 #ifdef __AMIGAOS4__
43 # ifndef DRIVER_NEEDS_GLOBAL_EXECBASE
44 # define IExec (AHIsubBase->iexec)
45 # endif
46 # define IAHIsub (AHIsubBase->iahisub)
47 # define IIntuition (AHIsubBase->iintuition)
48 # define IUtility (AHIsubBase->iutility)
49 #endif
52 struct DriverData
57 BOOL
58 DriverInit( struct DriverBase* AHIsubBase );
60 VOID
61 DriverCleanup( struct DriverBase* AHIsubBase );
63 #endif /* AHI_Drivers_Common_DriverBase_h */