Some fix for scrolling with lasso.
[tangerine.git] / rom / workbench / removeappicon.c
blob8bf2c767b37e2171c9a4e1ac8dee76873f9f3e17
1 /*
2 Copyright © 1995-2001, 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 <workbench/workbench.h>
12 /*****************************************************************************
14 NAME */
16 #include <proto/workbench.h>
18 AROS_LH1(BOOL , RemoveAppIcon,
19 /* SYNOPSIS */
20 AROS_LHA(struct AppIcon *, appIcon, A0),
21 /* LOCATION */
23 struct WorkbenchBase *, WorkbenchBase, 11, Workbench)
24 /* FUNCTION
26 Try to remove an AppIcon from workbench.library's list of AppIcons.
28 INPUTS
30 appIcon -- pointer to an AppIcon got from AddAppIconA()
32 RESULT
34 TRUE if the icon could be removed, FALSE otherwise.
36 NOTES
38 You must do a final check for messages on your AppMessage port as messages
39 may have been sent between the last time you checked and the call to
40 this function.
42 EXAMPLE
44 BUGS
46 SEE ALSO
48 AddAppIcon()
50 INTERNALS
52 ******************************************************************************/
54 AROS_LIBFUNC_INIT
55 AROS_LIBBASE_EXT_DECL(struct WorkbenchBase *, WorkbenchBase)
57 if (appIcon == NULL)
59 return FALSE;
62 LockWorkbench();
63 Remove((struct Node *)appIcon);
64 UnlockWorkbench();
66 FreeVec(appIcon);
69 Question is if we should negotiate with the (possible) workbench
70 application. Probably not... we just remove it from the list and
71 send a message to the workbench application that the icon should
72 be removed as soon as possible.
74 NotifyWorkbench(WBNOTIFY_Delete, WBNOTIFY_AppIcon, WorkbenchBase); */
76 return TRUE;
78 AROS_LIBFUNC_EXIT
79 } /* RemoveAppIcon */