New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / workbench / updateworkbenchobjecta.c
blobb58de5a725231909a5a8b5f867ae30fce1693e4d
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 Inform the file manager that an object has changed.
6 */
8 #define DEBUG 1
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>
18 #include <string.h>
20 #include "workbench_intern.h"
21 #include "support.h"
22 #include "support_messages.h"
23 #include "handler.h"
24 #include "handler_support.h"
26 /*****************************************************************************
28 NAME */
30 #include <proto/workbench.h>
32 AROS_LH3(BOOL, UpdateWorkbenchObjectA,
34 /* SYNOPSIS */
35 AROS_LHA(STRPTR, name, A0),
36 AROS_LHA(LONG, type, D1),
37 AROS_LHA(struct TagItem *, tags, A1),
39 /* LOCATION */
40 struct WorkbenchBase *, WorkbenchBase, 25, Workbench)
42 /* FUNCTION
43 Informs the workbench application that an object has changed, and that
44 it should update it's visual representation.
46 INPUTS
47 name - Name of object that has changed.
48 type - Type of object (WBDISK, WBTOOL, ...).
49 tags - Additional options.
51 TAGS
52 No tags are defined at this time.
54 NOTES
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!
58 EXAMPLE
60 BUGS
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.
64 SEE ALSO
66 INTERNALS
68 ******************************************************************************/
70 AROS_LIBFUNC_INIT
71 AROS_LIBBASE_EXT_DECL(struct WorkbenchBase *, WorkbenchBase)
73 BOOL success = FALSE;
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);
90 success = TRUE;
94 if (!success)
96 if (wbcm != NULL) DestroyWBCM(wbcm);
97 if (wbhm != NULL) DestroyWBHM(wbhm);
100 return success;
102 AROS_LIBFUNC_EXIT
103 } /* UpdateWorkbenchObjectA() */