2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
5 Inform the file manager that an object has changed.
9 #include <aros/debug.h>
11 #include <exec/types.h>
12 #include <exec/ports.h>
13 #include <utility/tagitem.h>
14 #include <intuition/intuition.h>
15 #include <workbench/workbench.h>
16 #include <proto/utility.h>
20 #include "workbench_intern.h"
22 #include "support_messages.h"
24 #include "handler_support.h"
26 /*****************************************************************************
30 #include <proto/workbench.h>
32 AROS_LH3(BOOL
, UpdateWorkbenchObjectA
,
35 AROS_LHA(STRPTR
, name
, A0
),
36 AROS_LHA(LONG
, type
, D1
),
37 AROS_LHA(struct TagItem
*, tags
, A1
),
40 struct WorkbenchBase
*, WorkbenchBase
, 25, Workbench
)
43 Informs the workbench application that an object has changed, and that
44 it should update it's visual representation.
47 name - Name of object that has changed.
48 type - Type of object (WBDISK, WBTOOL, ...).
49 tags - Additional options.
52 No tags are defined at this time.
55 This function is TEMPORARY! It will hopefully go away before AROS 1.0,
56 and it might change it's API several times before that!
61 The existance of this function is a bug itself. It should be removed
62 once there is a adequate notification API in dos.library that works.
68 ******************************************************************************/
71 AROS_LIBBASE_EXT_DECL(struct WorkbenchBase
*, WorkbenchBase
)
74 struct WBCommandMessage
*wbcm
= NULL
;
75 struct WBHandlerMessage
*wbhm
= NULL
;
79 (wbcm
= CreateWBCM(WBCM_TYPE_RELAY
)) != NULL
80 && (wbhm
= CreateWBHM(WBHM_TYPE_UPDATE
)) != NULL
83 if ((wbhm
->wbhm_Data
.Update
.Name
= StrDup(name
)) != NULL
)
85 wbhm
->wbhm_Data
.Update
.Type
= type
;
86 wbcm
->wbcm_Data
.Relay
.Message
= wbhm
;
88 PutMsg(&WorkbenchBase
->wb_HandlerPort
, (struct Message
*) wbcm
);
96 if (wbcm
!= NULL
) DestroyWBCM(wbcm
);
97 if (wbhm
!= NULL
) DestroyWBHM(wbhm
);
103 } /* UpdateWorkbenchObjectA() */