New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / desktop / internaliconopsclass.c
blob60a9f7e13550f426bd2dd41469a295b828c51918
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>
15 #include <libraries/desktop.h>
17 #include "support.h"
18 #include "desktop_intern.h"
20 #include <proto/dos.h>
21 #include <proto/intuition.h>
22 #include <proto/utility.h>
24 #include "internaliconopsclass.h"
25 #include "iconclass.h"
27 #include "desktop_intern_protos.h"
29 IPTR internalIconOpsNew(Class * cl, Object * obj, struct opSet * msg)
31 IPTR retval = 0;
32 struct InternalIconOpsClassData *data;
33 //struct TagItem *tag;
35 retval = DoSuperMethodA(cl, obj, (Msg) msg);
36 if (retval)
38 obj = (Object *) retval;
39 data = INST_DATA(cl, obj);
42 return retval;
45 IPTR internalIconOpsSet(Class * cl, Object * obj, struct opSet * msg)
47 struct InternalIconOpsClassData *data;
48 IPTR retval = 1;
49 struct TagItem *tag,
50 *tstate = msg->ops_AttrList;
52 data = (struct InternalIconOpsClassData *) INST_DATA(cl, obj);
54 while ((tag = NextTagItem(&tstate)))
56 switch (tag->ti_Tag)
58 default:
59 break;
63 retval = DoSuperMethodA(cl, obj, (Msg) msg);
65 return retval;
68 IPTR internalIconOpsGet(Class * cl, Object * obj, struct opGet * msg)
70 IPTR retval = 1;
71 struct InternalIconOpsClassData *data;
73 data = (struct InternalIconOpsClassData *) INST_DATA(cl, obj);
75 switch (msg->opg_AttrID)
77 default:
78 retval = DoSuperMethodA(cl, obj, (Msg) msg);
79 break;
82 return retval;
85 IPTR internalIconOpsDispose(Class * cl, Object * obj, Msg msg)
87 IPTR retval;
89 retval = DoSuperMethodA(cl, obj, msg);
91 return retval;
94 IPTR internalIconOpsExecute(Class * cl, Object * obj, struct opExecute * msg)
96 IPTR retval = 0;
97 struct InternalIconOpsClassData *data;
99 data = (struct InternalIconOpsClassData *) INST_DATA(cl, obj);
101 switch (msg->operationCode)
103 // open
104 case (DOC_ICONOP | 1):
105 SetAttrs(msg->target, IA_Executed, TRUE, TAG_END);
106 break;
109 return retval;
112 BOOPSI_DISPATCHER(IPTR, internalIconOpsDispatcher, cl, obj, msg)
114 ULONG retval = 0;
116 switch (msg->MethodID)
118 case OM_NEW:
119 retval = internalIconOpsNew(cl, obj, (struct opSet *) msg);
120 break;
121 case OM_SET:
122 retval = internalIconOpsSet(cl, obj, (struct opSet *) msg);
123 break;
124 case OM_GET:
125 retval = internalIconOpsGet(cl, obj, (struct opGet *) msg);
126 break;
127 case OM_DISPOSE:
128 retval = internalIconOpsDispose(cl, obj, msg);
129 break;
130 case OPM_Execute:
131 retval =
132 internalIconOpsExecute(cl, obj, (struct opExecute *) msg);
133 break;
134 default:
135 retval = DoSuperMethodA(cl, obj, msg);
136 break;
139 return retval;
141 BOOPSI_DISPATCHER_END