New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / desktop / tooliconclass.c
blobc629b4366504b72fe624f75b9d970742f62fcf73
1 #define MUIMASTER_YES_INLINE_STDARG
3 #define DEBUG 1
4 #include <aros/debug.h>
6 #include <exec/types.h>
7 #include <intuition/classes.h>
8 #include <intuition/classusr.h>
9 #include <libraries/mui.h>
11 #include "support.h"
12 #include "worker.h"
13 #include "desktop_intern.h"
15 #include <proto/dos.h>
16 #include <proto/intuition.h>
17 #include <proto/utility.h>
19 #include "presentation.h"
20 #include "tooliconclass.h"
22 #include "desktop_intern_protos.h"
24 IPTR toolIconNew(Class * cl, Object * obj, struct opSet *msg)
26 IPTR retval = 0;
27 struct ToolIconClassData *data;
28 //struct TagItem *tag;
30 retval = DoSuperMethodA(cl, obj, (Msg) msg);
31 if (retval)
33 obj = (Object *) retval;
34 data = INST_DATA(cl, obj);
37 return retval;
40 IPTR toolIconSet(Class * cl, Object * obj, struct opSet * msg)
42 struct ToolIconClassData *data;
43 IPTR retval = 1;
44 struct TagItem *tag,
45 *tstate = msg->ops_AttrList;
47 data = (struct ToolIconClassData *) INST_DATA(cl, obj);
49 while ((tag = NextTagItem(&tstate)))
51 switch (tag->ti_Tag)
53 default:
54 break;
58 retval = DoSuperMethodA(cl, obj, (Msg) msg);
60 return retval;
63 IPTR toolIconGet(Class * cl, Object * obj, struct opGet * msg)
65 IPTR retval = 1;
66 struct ToolIconClassData *data;
68 data = (struct ToolIconClassData *) INST_DATA(cl, obj);
70 switch (msg->opg_AttrID)
72 default:
73 retval = DoSuperMethodA(cl, obj, (Msg) msg);
74 break;
77 return retval;
80 IPTR toolIconDispose(Class * cl, Object * obj, Msg msg)
82 IPTR retval;
84 retval = DoSuperMethodA(cl, obj, msg);
86 return retval;
89 BOOPSI_DISPATCHER(IPTR, toolIconDispatcher, cl, obj, msg)
91 ULONG retval = 0;
93 switch (msg->MethodID)
95 case OM_NEW:
96 retval = toolIconNew(cl, obj, (struct opSet *) msg);
97 break;
98 case OM_SET:
99 retval = toolIconSet(cl, obj, (struct opSet *) msg);
100 break;
101 case OM_GET:
102 retval = toolIconGet(cl, obj, (struct opGet *) msg);
103 break;
104 case OM_DISPOSE:
105 retval = toolIconDispose(cl, obj, msg);
106 break;
107 default:
108 retval = DoSuperMethodA(cl, obj, msg);
109 break;
112 return retval;
114 BOOPSI_DISPATCHER_END