New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / desktop / tooliconobserver.c
blob9851e84040c78e318ec03dd06f48c4a4613ffbd3
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 "tooliconobserver.h"
22 #include "desktop_intern_protos.h"
24 IPTR toolIconObserverNew(Class * cl, Object * obj, struct opSet * msg)
26 IPTR retval = 0;
27 struct ToolIconObserverClassData *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 toolIconObserverSet(Class * cl, Object * obj, struct opSet * msg)
42 struct ToolIconObserverClassData *data;
43 IPTR retval = 1;
44 struct TagItem *tag,
45 *tstate = msg->ops_AttrList;
47 data = (struct ToolIconObserverClassData *) 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 toolIconObserverGet(Class * cl, Object * obj, struct opGet * msg)
65 IPTR retval = 1;
66 struct ToolIconObserverClassData *data;
68 data = (struct ToolIconObserverClassData *) 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 toolIconObserverDispose(Class * cl, Object * obj, Msg msg)
82 IPTR retval;
84 retval = DoSuperMethodA(cl, obj, msg);
86 return retval;
89 BOOPSI_DISPATCHER(IPTR, toolIconObserverDispatcher, cl, obj, msg)
91 ULONG retval = 0;
93 switch (msg->MethodID)
95 case OM_NEW:
96 retval = toolIconObserverNew(cl, obj, (struct opSet *) msg);
97 break;
98 case OM_SET:
99 retval = toolIconObserverSet(cl, obj, (struct opSet *) msg);
100 break;
101 case OM_GET:
102 retval = toolIconObserverGet(cl, obj, (struct opGet *) msg);
103 break;
104 case OM_DISPOSE:
105 retval = toolIconObserverDispose(cl, obj, msg);
106 break;
107 default:
108 retval = DoSuperMethodA(cl, obj, msg);
109 break;
112 return retval;
114 BOOPSI_DISPATCHER_END