revert between 56095 -> 55830 in arch
[AROS.git] / workbench / tools / SysExplorer / device_page_cl.c
blob7cc88e5da820853450f63086879bb148d3740327
1 /*
2 Copyright (C) 2013-2019, The AROS Development Team.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <exec/memory.h>
9 #include <hidd/hidd.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>
28 #include <ctype.h>
29 #include <stdio.h>
30 #include <stdlib.h>
32 #include "classes.h"
33 #include "locale.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
65 cl, self, NULL,
67 Child, (IPTR)(ColGroup(2),
68 MUIA_FrameTitle, __(MSG_GENERAL),
69 GroupFrame,
70 MUIA_Background, MUII_GroupBack,
71 Child, (IPTR)Label(_(MSG_NAME)),
72 Child, (IPTR)(TextObject,
73 TextFrame,
74 MUIA_Background, MUII_TextBack,
75 MUIA_CycleChain, 1,
76 MUIA_Text_Contents, idName,
77 End),
78 Child, (IPTR)Label(_(MSG_HARDWARE_NAME)),
79 Child, (IPTR)(TextObject,
80 TextFrame,
81 MUIA_Background, MUII_TextBack,
82 MUIA_CycleChain, 1,
83 MUIA_Text_Contents, hwName,
84 End),
85 (vendVal != 0) ? Child : TAG_IGNORE, (IPTR)Label(_(MSG_PRODUCT_ID)),
86 (vendVal != 0) ? Child : TAG_IGNORE, (IPTR)(TextObject,
87 TextFrame,
88 MUIA_Background, MUII_TextBack,
89 MUIA_CycleChain, 1,
90 MUIA_Text_Contents, (IPTR)productId,
91 End),
92 Child, (IPTR)Label(_(MSG_PRODUCER_NAME)),
93 Child, (IPTR)(TextObject,
94 TextFrame,
95 MUIA_Background, MUII_TextBack,
96 MUIA_CycleChain, 1,
97 MUIA_Text_Contents, vendorStr,
98 End),
99 (vendVal != 0) ? Child : TAG_IGNORE, (IPTR)Label(_(MSG_PRODUCER_ID)),
100 (vendVal != 0) ? Child : TAG_IGNORE, (IPTR)(TextObject,
101 TextFrame,
102 MUIA_Background, MUII_TextBack,
103 MUIA_CycleChain, 1,
104 MUIA_Text_Contents, (IPTR)vendorId,
105 End),
106 End),
107 TAG_DONE
112 /*** Setup ******************************************************************/
113 ZUNE_CUSTOMCLASS_1
115 DevicePage, NULL, MUIC_Group, NULL,
116 OM_NEW, struct opSet *