64-bit fix. Changed the user-supplied IDs used with
[AROS.git] / workbench / libs / workbench / removeappicon.c
blob46a4eac96cd80427010b0ff4f07636de16078deb
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Remove an icon from Workbench's list of AppIcons.
6 Lang: English
7 */
9 #include "workbench_intern.h"
10 #include "notifyworkbench.h"
11 #include <workbench/workbench.h>
13 /*****************************************************************************
15 NAME */
17 #include <proto/workbench.h>
19 AROS_LH1(BOOL , RemoveAppIcon,
20 /* SYNOPSIS */
21 AROS_LHA(struct AppIcon *, appIcon, A0),
22 /* LOCATION */
24 struct WorkbenchBase *, WorkbenchBase, 11, Workbench)
25 /* FUNCTION
27 Try to remove an AppIcon from workbench.library's list of AppIcons.
29 INPUTS
31 appIcon -- pointer to an AppIcon got from AddAppIconA()
33 RESULT
35 TRUE if the icon could be removed, FALSE otherwise.
37 NOTES
39 You must do a final check for messages on your AppMessage port as messages
40 may have been sent between the last time you checked and the call to
41 this function.
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 AddAppIconA()
51 INTERNALS
53 ******************************************************************************/
55 AROS_LIBFUNC_INIT
57 if (appIcon == NULL)
59 return FALSE;
62 LockWorkbench();
63 Remove((struct Node *)appIcon);
64 UnlockWorkbench();
66 FreeVec(appIcon);
68 NotifyWorkbench(WBNOTIFY_Delete, WBNOTIFY_AppIcon, WorkbenchBase);
70 return TRUE;
72 AROS_LIBFUNC_EXIT
73 } /* RemoveAppIcon */