2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <exec/types.h>
9 #include <exec/memory.h>
10 #include <intuition/classusr.h>
11 #include <libraries/desktop.h>
12 #include <libraries/mui.h>
13 #include <utility/tagitem.h>
15 #include <proto/exec.h>
16 #include <proto/intuition.h>
17 #include <proto/muimaster.h>
18 #include <proto/utility.h>
20 #include "desktop_intern.h"
23 #include "operationclass.h"
26 #include <aros/debug.h>
28 /*****************************************************************************
32 #include <proto/desktop.h>
34 AROS_LH2(ULONG
, DoDesktopOperationA
,
38 AROS_LHA(ULONG
, operationCode
, D0
),
39 AROS_LHA(struct TagItem
*, tags
, D2
),
43 struct DesktopBase
*, DesktopBase
, 9, Desktop
)
63 *****************************************************************************
67 struct DesktopOperation
*dop
,
74 dop
= (struct DesktopOperation
*) DesktopBase
->db_OperationList
.lh_Head
;
75 while (dop
->do_Node
.ln_Succ
&& !found
)
77 if (operationCode
== dop
->do_Code
)
79 newObject
= NewObjectA(dop
->do_Impl
->mcc_Class
, NULL
, NULL
);
82 target
= (Object
*) GetTagData(DDO_Target
, NULL
, tags
);
86 DoMethod(newObject
, OPM_Execute
, (IPTR
) target
,
89 DisposeObject(newObject
);
95 if (!IsListEmpty(&dop
->do_SubItems
))
97 subdop
= (struct DesktopOperation
*) dop
->do_SubItems
.lh_Head
;
98 while (subdop
->do_Node
.ln_Succ
&& !found
)
100 if (operationCode
== subdop
->do_Code
)
103 NewObjectA(subdop
->do_Impl
->mcc_Class
, NULL
, NULL
);
106 target
= (Object
*) GetTagData(DDO_Target
, NULL
, tags
);
110 DoMethod(newObject
, OPM_Execute
, (IPTR
) target
,
113 DisposeObject(newObject
);
119 subdop
= (struct DesktopOperation
*) subdop
->do_Node
.ln_Succ
;
124 dop
= (struct DesktopOperation
*) dop
->do_Node
.ln_Succ
;
130 } /* DoDesktopOperationA */