Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / desktop / operationclass.c
blobc2671ce2d37be7d5cb25dd2cade1be57b8c49886
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 <intuition/classes.h>
13 #include <intuition/classusr.h>
14 #include <libraries/mui.h>
16 #include "support.h"
17 #include "desktop_intern.h"
19 #include <proto/dos.h>
20 #include <proto/intuition.h>
21 #include <proto/utility.h>
23 #include "operationclass.h"
25 #include "desktop_intern_protos.h"
27 IPTR operationNew(Class * cl, Object * obj, struct opSet * msg)
29 IPTR retval = 0;
30 struct OperationClassData *data;
31 //struct TagItem *tag;
33 retval = DoSuperMethodA(cl, obj, (Msg) msg);
34 if (retval)
36 obj = (Object *) retval;
37 data = INST_DATA(cl, obj);
40 return retval;
43 IPTR operationSet(Class * cl, Object * obj, struct opSet * msg)
45 struct OperationClassData *data;
46 IPTR retval = 1;
47 struct TagItem *tag,
48 *tstate = msg->ops_AttrList;
50 data = (struct OperationClassData *) INST_DATA(cl, obj);
52 while ((tag = NextTagItem(&tstate)))
54 switch (tag->ti_Tag)
56 default:
57 break;
61 retval = DoSuperMethodA(cl, obj, (Msg) msg);
63 return retval;
66 IPTR operationGet(Class * cl, Object * obj, struct opGet * msg)
68 IPTR retval = 1;
69 struct OperationClassData *data;
71 data = (struct OperationClassData *) INST_DATA(cl, obj);
73 switch (msg->opg_AttrID)
75 default:
76 retval = DoSuperMethodA(cl, obj, (Msg) msg);
77 break;
80 return retval;
83 IPTR operationDispose(Class * cl, Object * obj, Msg msg)
85 IPTR retval;
87 retval = DoSuperMethodA(cl, obj, msg);
89 return retval;
92 BOOPSI_DISPATCHER(IPTR, operationDispatcher, cl, obj, msg)
94 ULONG retval = 0;
96 switch (msg->MethodID)
98 case OM_NEW:
99 retval = operationNew(cl, obj, (struct opSet *) msg);
100 break;
101 case OM_SET:
102 retval = operationSet(cl, obj, (struct opSet *) msg);
103 break;
104 case OM_GET:
105 retval = operationGet(cl, obj, (struct opGet *) msg);
106 break;
107 case OM_DISPOSE:
108 retval = operationDispose(cl, obj, msg);
109 break;
110 default:
111 retval = DoSuperMethodA(cl, obj, msg);
112 break;
115 return retval;
117 BOOPSI_DISPATCHER_END