2 /*****************************************************************************
3 ** This is the IconList custom class, a sub class of List.mui.
4 ******************************************************************************/
8 #define USE_INLINE_STDARG
10 #include <proto/muimaster.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
13 #include <proto/poseidon.h>
14 #include <proto/intuition.h>
15 #include <proto/graphics.h>
16 #include <proto/usbclass.h>
17 #include <proto/icon.h>
18 #include <proto/utility.h>
21 #include "ActionClass.h"
22 #include "IconListClass.h"
23 #include "DevWinClass.h"
24 #include "CfgListClass.h"
26 extern struct ExecBase
*SysBase
;
27 extern struct Library
*ps
;
28 /*extern struct Library *UtilityBase; */
30 #define NewList(list) NEWLIST(list)
32 /* /// "Icon data stuff" */
33 const ULONG Mason_colors
[96] =
35 0x96969696,0x96969696,0x96969696,
36 0x2d2d2d2d,0x28282828,0x9e9e9e9e,
37 0x00000000,0x65656565,0x9a9a9a9a,
38 0x35353535,0x75757575,0xaaaaaaaa,
39 0x65656565,0x8a8a8a8a,0xbabababa,
40 0x0c0c0c0c,0x61616161,0xffffffff,
41 0x24242424,0x5d5d5d5d,0x24242424,
42 0x35353535,0x8a8a8a8a,0x35353535,
43 0x86868686,0xb2b2b2b2,0x3d3d3d3d,
44 0x0c0c0c0c,0xe3e3e3e3,0x00000000,
45 0x4d4d4d4d,0x9e9e9e9e,0x8e8e8e8e,
46 0x82828282,0x00000000,0x00000000,
47 0xdfdfdfdf,0x35353535,0x35353535,
48 0xdbdbdbdb,0x65656565,0x39393939,
49 0xdbdbdbdb,0x8e8e8e8e,0x41414141,
50 0xdfdfdfdf,0xbabababa,0x45454545,
51 0xefefefef,0xe7e7e7e7,0x14141414,
52 0x82828282,0x61616161,0x4d4d4d4d,
53 0xa6a6a6a6,0x7e7e7e7e,0x61616161,
54 0xcacacaca,0x9a9a9a9a,0x75757575,
55 0x9a9a9a9a,0x55555555,0xaaaaaaaa,
56 0xffffffff,0x00000000,0xffffffff,
57 0xffffffff,0xffffffff,0xffffffff,
58 0xdfdfdfdf,0xdfdfdfdf,0xdfdfdfdf,
59 0xcacacaca,0xcacacaca,0xcacacaca,
60 0xbabababa,0xbabababa,0xbabababa,
61 0xaaaaaaaa,0xaaaaaaaa,0xaaaaaaaa,
62 0x8a8a8a8a,0x8a8a8a8a,0x8a8a8a8a,
63 0x65656565,0x65656565,0x65656565,
64 0x4d4d4d4d,0x4d4d4d4d,0x4d4d4d4d,
65 0x3c3c3c3c,0x3c3c3c3c,0x3b3b3b3b,
66 0x00000000,0x00000000,0x00000000,
69 #define USE_CLASSES_BODY
70 #define USE_DEVICES_BODY
71 #define USE_GENERAL_BODY
72 #define USE_HARDWARE_BODY
73 #define USE_SETTINGS_BODY
74 #define USE_CLASS_NONE_BODY
75 #define USE_CLASS_AUDIO_BODY
76 #define USE_CLASS_CDCCONTROL_BODY
77 #define USE_CLASS_CDCDATA_BODY
78 #define USE_CLASS_CHIPSMARTCARD_BODY
79 #define USE_CLASS_COMMDEVICE_BODY
80 #define USE_CLASS_HID_BODY
81 #define USE_CLASS_HUB_BODY
82 #define USE_CLASS_MASSSTORAGE_BODY
83 #define USE_CLASS_PHYSICAL_BODY
84 #define USE_CLASS_PRINTER_BODY
85 #define USE_CLASS_SECURITY_BODY
86 #define USE_CLASS_VENDOR_BODY
87 #define USE_GREENLED_BODY
88 #define USE_ORANGELED_BODY
89 #define USE_ORANGELEDQ_BODY
90 #define USE_CLASS_BLUETOOTH_BODY
91 #define USE_CLASS_STILLIMAGE_BODY
92 #define USE_ONLINE_BODY
93 #define USE_POPUP_BODY
95 #include "MasonIcons/MI_Classes.c"
96 #include "MasonIcons/MI_Devices.c"
97 #include "MasonIcons/MI_General.c"
98 #include "MasonIcons/MI_Hardware.c"
99 #include "MasonIcons/MI_Settings.c"
100 #include "MasonIcons/MI_Class_None.c"
101 #include "MasonIcons/MI_Class_Audio.c"
102 #include "MasonIcons/MI_Class_CDCControl.c"
103 #include "MasonIcons/MI_Class_CDCData.c"
104 #include "MasonIcons/MI_Class_ChipSmartCard.c"
105 #include "MasonIcons/MI_Class_CommDevice.c"
106 #include "MasonIcons/MI_Class_HID.c"
107 #include "MasonIcons/MI_Class_Hub.c"
108 #include "MasonIcons/MI_Class_MassStorage.c"
109 #include "MasonIcons/MI_Class_Physical.c"
110 #include "MasonIcons/MI_Class_Printer.c"
111 #include "MasonIcons/MI_Class_Security.c"
112 #include "MasonIcons/MI_Class_Vendor.c"
113 #include "MasonIcons/MI_GreenLED.c"
114 #include "MasonIcons/MI_OrangeLED.c"
115 #include "MasonIcons/MI_OrangeLEDQ.c"
116 #include "MasonIcons/MI_Class_Bluetooth.c"
117 #include "MasonIcons/MI_Class_StillImage.c"
118 #include "MasonIcons/MI_Online.c"
119 #include "MasonIcons/MI_Popup.c"
121 static const UBYTE
*mibodies
[MAXMASONICONS
] =
130 Class_CommDevice_body
,
131 Class_CDCControl_body
,
135 Class_MassStorage_body
,
138 Class_ChipSmartCard_body
,
144 Class_Bluetooth_body
,
145 Class_StillImage_body
,
151 /* /// "IconListDispatcher()" */
152 AROS_UFH3(IPTR
, IconListDispatcher
,
153 AROS_UFHA(struct IClass
*, cl
, A0
),
154 AROS_UFHA(Object
*, obj
, A2
),
155 AROS_UFHA(Msg
, msg
, A1
))
158 // There should never be an uninitialized pointer, but just in case, try to get an mungwall hit if so.
159 struct IconListData
*data
= (struct IconListData
*) 0xABADCAFE;
161 // on OM_NEW the obj pointer will be void, so don't try to get the data base in this case.
162 if(msg
->MethodID
!= OM_NEW
) data
= INST_DATA(cl
,obj
);
164 switch(msg
->MethodID
)
167 if(!(obj
= (Object
*) DoSuperMethodA(cl
,obj
,msg
)))
174 for(cnt
= 0; cnt
< MAXMASONICONS
; cnt
++)
176 data
->mimainbody
[cnt
] = BodychunkObject
,
177 MUIA_Bitmap_SourceColors
, Mason_colors
,
180 MUIA_Bitmap_Width
, 16,
181 MUIA_Bitmap_Height
, 16,
182 MUIA_Bodychunk_Depth
, 5,
183 MUIA_Bodychunk_Body
, mibodies
[cnt
],
184 MUIA_Bodychunk_Compression
, 1,
185 MUIA_Bodychunk_Masking
, 2,
186 MUIA_Bitmap_Transparent
, 0,
187 MUIA_Bitmap_UseFriend
, TRUE
,
188 MUIA_Bitmap_Precision
, PRECISION_ICON
,
190 data
->mimainlist
[cnt
] = (Object
*) DoMethod(obj
, MUIM_List_CreateImage
, data
->mimainbody
[cnt
], 0);
198 for(cnt
= 0; cnt
< MAXMASONICONS
; cnt
++)
200 DoMethod(obj
, MUIM_List_DeleteImage
, data
->mimainlist
[cnt
]);
201 DoMethod(data
->mimainbody
[cnt
], OM_DISPOSE
);
202 data
->mimainlist
[cnt
] = NULL
;
203 data
->mimainbody
[cnt
] = NULL
;
209 return(DoSuperMethodA(cl
,obj
,msg
));