2 Copyright (C) 2018-2019, The AROS Development Team.
6 #include <aros/debug.h>
8 #define MUIMASTER_YES_INLINE_STDARG
10 #include <proto/sysexp.h>
12 #include <proto/alib.h>
13 #include <proto/exec.h>
14 #include <proto/muimaster.h>
15 #include <proto/utility.h>
16 #include <proto/intuition.h>
18 #include <exec/memory.h>
19 #include <libraries/mui.h>
20 #include <zune/customclasses.h>
21 #include <mui/NFloattext_mcc.h>
22 #include <utility/tagitem.h>
23 #include <utility/hooks.h>
26 #include <hidd/ahci.h>
30 #include "ahci_classes.h"
31 #include "ahci_intern.h"
37 extern OOP_AttrBase HiddAHCIBusAB
;
39 /*** Instance Data **********************************************************/
40 struct AHCIBusWindow_DATA
45 static Object
*AHCIBusWindow__OM_NEW(Class
*cl
, Object
*self
, struct opSet
*msg
)
47 struct SysexpAHCIBase
*AhciBase
= (struct SysexpAHCIBase
*)cl
->cl_UserData
;
49 D(bug("[ahci.sysexp] %s: cl @ %p\n", __func__
, cl
));
54 return (Object
*) DoSuperNewTags
57 Child
, (IPTR
)(ColGroup(3),
58 MUIA_Group_SameSize
, TRUE
,
59 MUIA_FrameTitle
, (IPTR
)"AHCI",
61 MUIA_Background
, MUII_GroupBack
,
62 Child
, (IPTR
)HSpace(0),
63 Child
, (IPTR
)HSpace(0),
64 Child
, (IPTR
)HSpace(0),
66 TAG_MORE
, (IPTR
) msg
->ops_AttrList
,
71 /*** Setup ******************************************************************/
72 BOOPSI_DISPATCHER_PROTO(IPTR
, AHCIBusWindow_Dispatcher
, cl
, self
, msg
);
73 BOOPSI_DISPATCHER(IPTR
, AHCIBusWindow_Dispatcher
, cl
, self
, msg
)
75 switch (msg
->MethodID
)
78 return (IPTR
) AHCIBusWindow__OM_NEW(cl
, self
, (struct opSet
*)msg
);
81 return DoSuperMethodA(cl
, self
, msg
);
88 int AHCIBusWindow_Initialize(struct SysexpBase
*SysexpBase
)
90 struct SysexpAHCIBase
*AhciBase
= GetBase("AHCI.Module");
91 struct MUI_CustomClass
*SBWClass
;
93 D(bug("[ahci.sysexp] %s: AhciBase @ %p\n", __func__
, AhciBase
));
97 SBWClass
= GetBase("StorageBusWindow.Class");
98 D(bug("[ahci.sysexp] %s: StorageBusWindow.Class @ %p\n", __func__
, SBWClass
));
99 AhciBase
->seab_AHCIBusWindowCLASS
= MUI_CreateCustomClass
101 NULL
, NULL
, SBWClass
,
102 sizeof(struct AHCIBusWindow_DATA
), (APTR
) AHCIBusWindow_Dispatcher
104 if (AhciBase
->seab_AHCIBusWindowCLASS
)
106 D(bug("[ahci.sysexp] %s: AHCIBusWindowCLASS @ %p\n", __func__
, AhciBase
->seab_AHCIBusWindowCLASS
));
107 AhciBase
->seab_AHCIBusWindowCLASS
->mcc_Class
->cl_UserData
= (IPTR
)AhciBase
;
110 if (!AhciBase
|| !AhciBase
->seab_AHCIBusWindowCLASS
)
114 "Failed to create `AHCIBusWindow' custom class.", NULL
123 void AHCIBusWindow_Deinitialize(struct SysexpBase
*SysexpBase
)
125 struct SysexpAHCIBase
*AhciBase
= GetBase("AHCI.Module");
126 MUI_DeleteCustomClass(AhciBase
->seab_AHCIBusWindowCLASS
);