Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / desktop / drawericonobserver.c
blob9810d4457881382526d9085cd18a2403edadb7fd
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #define DEBUG 1
9 #include <aros/debug.h>
11 #include <exec/types.h>
12 #include <exec/memory.h>
13 #include <intuition/classes.h>
14 #include <intuition/classusr.h>
15 #include <libraries/gadtools.h>
16 #include <libraries/mui.h>
17 #include <libraries/desktop.h>
19 #include "support.h"
20 #include "worker.h"
21 #include "desktop_intern.h"
23 #include <proto/desktop.h>
24 #include <proto/dos.h>
25 #include <proto/intuition.h>
26 #include <proto/utility.h>
28 #include "presentation.h"
29 #include "observer.h"
30 #include "iconobserver.h"
31 #include "drawericonobserver.h"
33 #include "desktop_intern_protos.h"
35 #include <string.h>
37 IPTR drawerIconObserverNew(Class * cl, Object * obj, struct opSet * msg)
39 IPTR retval = 0;
40 struct DrawerIconObserverClassData *data;
41 //struct TagItem *tag;
43 retval = DoSuperMethodA(cl, obj, (Msg) msg);
44 if (retval)
46 obj = (Object *) retval;
47 data = INST_DATA(cl, obj);
50 return retval;
53 IPTR drawerIconObserverSet(Class * cl, Object * obj, struct opSet * msg)
55 struct DrawerIconObserverClassData *data;
56 IPTR retval = 1;
57 struct TagItem *tag,
58 *tstate = msg->ops_AttrList;
60 data = (struct DrawerIconObserverClassData *) INST_DATA(cl, obj);
62 while ((tag = NextTagItem(&tstate)))
64 switch (tag->ti_Tag)
66 default:
67 break;
71 retval = DoSuperMethodA(cl, obj, (Msg) msg);
73 return retval;
76 IPTR drawerIconObserverGet(Class * cl, Object * obj, struct opGet * msg)
78 IPTR retval = 1;
79 struct DrawerIconObserverClassData *data;
81 data = (struct DrawerIconObserverClassData *) INST_DATA(cl, obj);
83 switch (msg->opg_AttrID)
85 default:
86 retval = DoSuperMethodA(cl, obj, (Msg) msg);
87 break;
90 return retval;
93 IPTR drawerIconObserverDispose(Class * cl, Object * obj, Msg msg)
95 IPTR retval;
97 retval = DoSuperMethodA(cl, obj, msg);
99 return retval;
102 BOOPSI_DISPATCHER(IPTR, drawerIconObserverDispatcher, cl, obj, msg)
104 ULONG retval = 0;
106 switch (msg->MethodID)
108 case OM_NEW:
109 retval = drawerIconObserverNew(cl, obj, (struct opSet *) msg);
110 break;
111 case OM_SET:
112 retval = drawerIconObserverSet(cl, obj, (struct opSet *) msg);
113 break;
114 case OM_GET:
115 retval = drawerIconObserverGet(cl, obj, (struct opGet *) msg);
116 break;
117 case OM_DISPOSE:
118 retval = drawerIconObserverDispose(cl, obj, msg);
119 break;
120 default:
121 retval = DoSuperMethodA(cl, obj, msg);
122 break;
125 return retval;
127 BOOPSI_DISPATCHER_END