2 Copyright (C) 2013-2019, The AROS Development Team.
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <exec/memory.h>
10 #include <resources/hpet.h>
11 #include <libraries/mui.h>
12 #include <mui/NFloattext_mcc.h>
13 #include <resources/processor.h>
14 #include <utility/tagitem.h>
15 #include <utility/hooks.h>
17 #include <proto/alib.h>
18 #include <proto/aros.h>
19 #include <proto/dos.h>
20 #include <proto/exec.h>
21 #include <proto/hpet.h>
22 #include <proto/kernel.h>
23 #include <proto/muimaster.h>
24 #include <proto/utility.h>
25 #include <proto/intuition.h>
26 #include <proto/processor.h>
35 #include <aros/debug.h>
37 #include <zune/customclasses.h>
39 extern OOP_AttrBase HiddAttrBase
;
41 /*** Instance Data **********************************************************/
42 struct DevicePage_DATA
44 /* Nothing to add here */
48 static Object
*DevicePage__OM_NEW(Class
*cl
, Object
*self
, struct opSet
*msg
)
50 OOP_Object
*device_obj
= (OOP_Object
*)GetTagData(MUIA_PropertyWin_Object
, 0, msg
->ops_AttrList
);
51 IPTR idName
, hwName
, vendorStr
;
52 IPTR prodVal
, vendVal
;
53 TEXT productId
[20], vendorId
[20];
55 OOP_GetAttr(device_obj
, aHidd_Name
, &idName
);
56 OOP_GetAttr(device_obj
, aHidd_HardwareName
, &hwName
);
57 OOP_GetAttr(device_obj
, aHidd_ProducerName
, &vendorStr
);
58 OOP_GetAttr(device_obj
, aHidd_Product
, &prodVal
);
59 sprintf(productId
, "0x%04lX", prodVal
);
60 OOP_GetAttr(device_obj
, aHidd_Producer
, &vendVal
);
61 sprintf(vendorId
, "0x%04lX", vendVal
);
63 return (Object
*) DoSuperNewTags
67 Child
, (IPTR
)(ColGroup(2),
68 MUIA_FrameTitle
, __(MSG_GENERAL
),
70 MUIA_Background
, MUII_GroupBack
,
71 Child
, (IPTR
)Label(_(MSG_NAME
)),
72 Child
, (IPTR
)(TextObject
,
74 MUIA_Background
, MUII_TextBack
,
76 MUIA_Text_Contents
, idName
,
78 Child
, (IPTR
)Label(_(MSG_HARDWARE_NAME
)),
79 Child
, (IPTR
)(TextObject
,
81 MUIA_Background
, MUII_TextBack
,
83 MUIA_Text_Contents
, hwName
,
85 (vendVal
!= 0) ? Child
: TAG_IGNORE
, (IPTR
)Label(_(MSG_PRODUCT_ID
)),
86 (vendVal
!= 0) ? Child
: TAG_IGNORE
, (IPTR
)(TextObject
,
88 MUIA_Background
, MUII_TextBack
,
90 MUIA_Text_Contents
, (IPTR
)productId
,
92 Child
, (IPTR
)Label(_(MSG_PRODUCER_NAME
)),
93 Child
, (IPTR
)(TextObject
,
95 MUIA_Background
, MUII_TextBack
,
97 MUIA_Text_Contents
, vendorStr
,
99 (vendVal
!= 0) ? Child
: TAG_IGNORE
, (IPTR
)Label(_(MSG_PRODUCER_ID
)),
100 (vendVal
!= 0) ? Child
: TAG_IGNORE
, (IPTR
)(TextObject
,
102 MUIA_Background
, MUII_TextBack
,
104 MUIA_Text_Contents
, (IPTR
)vendorId
,
112 /*** Setup ******************************************************************/
115 DevicePage
, NULL
, MUIC_Group
, NULL
,
116 OM_NEW
, struct opSet
*