- Now puts cursor position in window title properly instead of overwriting
[tangerine.git] / workbench / libs / desktop / internaldesktopopsclass.c
blob508d30509221571d439e4ed378208732fb14bfb2
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 "internaldesktopopsclass.h"
25 #include "iconclass.h"
27 #include "desktop_intern_protos.h"
29 IPTR internalDesktopOpsNew(Class * cl, Object * obj, struct opSet * msg)
31 IPTR retval = 0;
32 struct InternalDesktopOpsClassData *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 internalDesktopOpsSet(Class * cl, Object * obj, struct opSet * msg)
47 struct InternalDesktopOpsClassData *data;
48 IPTR retval = 1;
49 struct TagItem *tag,
50 *tstate = msg->ops_AttrList;
52 data = (struct InternalDesktopOpsClassData *) 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 internalDesktopOpsGet(Class * cl, Object * obj, struct opGet * msg)
70 IPTR retval = 1;
71 struct InternalDesktopOpsClassData *data;
73 data = (struct InternalDesktopOpsClassData *) 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 internalDesktopOpsDispose(Class * cl, Object * obj, Msg msg)
87 IPTR retval;
89 retval = DoSuperMethodA(cl, obj, msg);
91 return retval;
94 IPTR internalDesktopOpsExecute(Class * cl, Object * obj,
95 struct opExecute * msg)
97 IPTR retval = 0;
98 struct InternalDesktopOpsClassData *data;
100 data = (struct InternalDesktopOpsClassData *) INST_DATA(cl, obj);
102 switch (msg->operationCode)
104 // quit
105 case (DOC_DESKTOPOP | 1):
106 // hmmmmmmmmmm... how will this work???
107 break;
110 return retval;
113 BOOPSI_DISPATCHER(IPTR, internalDesktopOpsDispatcher, cl, obj, msg)
115 ULONG retval = 0;
117 switch (msg->MethodID)
119 case OM_NEW:
120 retval = internalDesktopOpsNew(cl, obj, (struct opSet *) msg);
121 break;
122 case OM_SET:
123 retval = internalDesktopOpsSet(cl, obj, (struct opSet *) msg);
124 break;
125 case OM_GET:
126 retval = internalDesktopOpsGet(cl, obj, (struct opGet *) msg);
127 break;
128 case OM_DISPOSE:
129 retval = internalDesktopOpsDispose(cl, obj, msg);
130 break;
131 case OPM_Execute:
132 retval =
133 internalDesktopOpsExecute(cl, obj, (struct opExecute *) msg);
134 break;
135 default:
136 retval = DoSuperMethodA(cl, obj, msg);
137 break;
140 return retval;
142 BOOPSI_DISPATCHER_END