Reverted removal of 'const' from TagItem arrays/pointers in r50147
[AROS.git] / workbench / tools / SysExplorer / device_page_cl.c
blob77fbf9421f0c25641ab618e616c7c2746c666489
1 /*
2 Copyright (C) 2013, 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>
40 /*** Instance Data **********************************************************/
41 struct DevicePage_DATA
43 /* Nothing to add here */
47 static Object *DevicePage__OM_NEW(Class *cl, Object *self, struct opSet *msg)
49 OOP_Object *device_obj = (OOP_Object *)GetTagData(MUIA_PropertyWin_Object, 0, msg->ops_AttrList);
50 IPTR idName, hwName, vendorStr;
51 IPTR number;
52 TEXT productId[20], vendorId[20];
54 OOP_GetAttr(device_obj, aHidd_Name, &idName);
55 OOP_GetAttr(device_obj, aHidd_HardwareName, &hwName);
56 OOP_GetAttr(device_obj, aHidd_ProducerName, &vendorStr);
57 OOP_GetAttr(device_obj, aHidd_Product, &number);
58 sprintf(productId, "0x%04lX", number);
59 OOP_GetAttr(device_obj, aHidd_Producer, &number);
60 sprintf(vendorId, "0x%04lX", number);
62 return (Object *) DoSuperNewTags
64 cl, self, NULL,
66 Child, (IPTR)(ColGroup(2),
67 MUIA_FrameTitle, __(MSG_GENERAL),
68 GroupFrame,
69 MUIA_Background, MUII_GroupBack,
70 Child, (IPTR)Label(_(MSG_NAME)),
71 Child, (IPTR)(TextObject,
72 TextFrame,
73 MUIA_Background, MUII_TextBack,
74 MUIA_CycleChain, 1,
75 MUIA_Text_Contents, idName,
76 End),
77 Child, (IPTR)Label(_(MSG_HARDWARE_NAME)),
78 Child, (IPTR)(TextObject,
79 TextFrame,
80 MUIA_Background, MUII_TextBack,
81 MUIA_CycleChain, 1,
82 MUIA_Text_Contents, hwName,
83 End),
84 Child, (IPTR)Label(_(MSG_PRODUCT_ID)),
85 Child, (IPTR)(TextObject,
86 TextFrame,
87 MUIA_Background, MUII_TextBack,
88 MUIA_CycleChain, 1,
89 MUIA_Text_Contents, (IPTR)productId,
90 End),
91 Child, (IPTR)Label(_(MSG_PRODUCER_NAME)),
92 Child, (IPTR)(TextObject,
93 TextFrame,
94 MUIA_Background, MUII_TextBack,
95 MUIA_CycleChain, 1,
96 MUIA_Text_Contents, vendorStr,
97 End),
98 Child, (IPTR)Label(_(MSG_PRODUCER_ID)),
99 Child, (IPTR)(TextObject,
100 TextFrame,
101 MUIA_Background, MUII_TextBack,
102 MUIA_CycleChain, 1,
103 MUIA_Text_Contents, (IPTR)vendorId,
104 End),
105 End),
106 TAG_DONE
111 /*** Setup ******************************************************************/
112 ZUNE_CUSTOMCLASS_1
114 DevicePage, NULL, MUIC_Group, NULL,
115 OM_NEW, struct opSet *