Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / workbench / removeappmenuitem.c
blob79b3dfa0253b34647321c27de7e3e0ead31351f7
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Remove a menuitem from Workbench's list of AppMenuItems.
6 Lang: English
7 */
9 #include "workbench_intern.h"
10 #include <workbench/workbench.h>
12 /*****************************************************************************
14 NAME */
16 #include <proto/workbench.h>
18 AROS_LH1(BOOL, RemoveAppMenuItem,
19 /* SYNOPSIS */
21 AROS_LHA(struct AppMenuItem *, appMenuItem, A0),
23 /* LOCATION */
24 struct WorkbenchBase *, WorkbenchBase, 13, Workbench)
26 /* FUNCTION
28 Try to remove an AppMenuItem from workbench.library's list of AppMenuItems.
30 INPUTS
32 Pointer to an AppMenuItem structure as returned by AddAppMenuItem().
34 RESULT
36 TRUE if the menu item could be removed, FALSE otherwise.
38 NOTES
40 You have to do a final check for messages on your AppMenuItem message
41 port as messages may have arrived between the last time you checked this
42 and the call to this function.
44 EXAMPLE
46 BUGS
48 SEE ALSO
50 AddAppMenuItemA()
52 INTERNALS
54 ******************************************************************************/
56 AROS_LIBFUNC_INIT
58 if (appMenuItem == NULL)
60 return FALSE;
63 LockWorkbench();
64 Remove((struct Node *)appMenuItem);
65 UnlockWorkbench();
67 FreeVec(appMenuItem);
69 /* NotifyWorkbench(WBNOTIFY_Delete, WBNOTIFY_AppMenuItem, WorkbenchBase);
72 return TRUE;
74 AROS_LIBFUNC_EXIT
75 } /* RemoveAppMenuItem */