- Now puts cursor position in window title properly instead of overwriting
[tangerine.git] / workbench / libs / desktop / trashcaniconclass.c
blob8592eeebfa010907dc78cc894ee54421cd04fd12
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 "trashcaniconclass.h"
22 #include "desktop_intern_protos.h"
24 IPTR trashcanIconNew(Class * cl, Object * obj, struct opSet * msg)
26 IPTR retval = 0;
27 struct TrashcanIconClassData *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 trashcanIconSet(Class * cl, Object * obj, struct opSet * msg)
42 struct TrashcanIconClassData *data;
43 IPTR retval = 1;
44 struct TagItem *tag,
45 *tstate = msg->ops_AttrList;
47 data = (struct TrashcanIconClassData *) 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 trashcanIconGet(Class * cl, Object * obj, struct opGet * msg)
65 IPTR retval = 1;
66 struct TrashcanIconClassData *data;
68 data = (struct TrashcanIconClassData *) 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 trashcanIconDispose(Class * cl, Object * obj, Msg msg)
82 IPTR retval;
84 retval = DoSuperMethodA(cl, obj, msg);
86 return retval;
89 BOOPSI_DISPATCHER(IPTR, trashcanIconDispatcher, cl, obj, msg)
91 ULONG retval = 0;
93 switch (msg->MethodID)
95 case OM_NEW:
96 retval = trashcanIconNew(cl, obj, (struct opSet *) msg);
97 break;
98 case OM_SET:
99 retval = trashcanIconSet(cl, obj, (struct opSet *) msg);
100 break;
101 case OM_GET:
102 retval = trashcanIconGet(cl, obj, (struct opGet *) msg);
103 break;
104 case OM_DISPOSE:
105 retval = trashcanIconDispose(cl, obj, msg);
106 break;
107 default:
108 retval = DoSuperMethodA(cl, obj, msg);
109 break;
112 return retval;
114 BOOPSI_DISPATCHER_END