Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / muiscreen / closepubscreen.c
blobbe7c2058291c9fd198bb9bda6842689271452cdb
1 /*
2 Copyright © 2009, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <libraries/muiscreen.h>
7 #include <proto/intuition.h>
8 #include <intuition/screens.h>
9 #include <proto/intuition.h>
10 #include <proto/exec.h>
11 #include <exec/lists.h>
12 #include <string.h>
13 #define DEBUG 1
14 #include <aros/debug.h>
16 #include "muiscreen_intern.h"
18 /*****************************************************************************
20 NAME */
21 #include <proto/muiscreen.h>
23 AROS_LH1(BOOL, MUIS_ClosePubScreen,
25 /* SYNOPSIS */
26 AROS_LHA(char *, name, A0),
28 /* LOCATION */
29 struct MUIScreenBase_intern *, MUIScreenBase, 0x48, MUIScreen)
31 /* FUNCTION
33 INPUTS
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 ******************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct List *pubscrlist;
53 struct PubScreenNode *pubscrnode;
54 BOOL found = FALSE;
55 BOOL retval = FALSE;
57 D(bug("MUIS_ClosePubScreen(%s)\n", name));
59 pubscrlist = LockPubScreenList();
60 ForeachNode(pubscrlist, pubscrnode)
62 if(strcmp(pubscrnode->psn_Node.ln_Name, name) == 0)
64 found = TRUE;
65 break;
68 UnlockPubScreenList();
70 if(found)
72 CloseScreen(pubscrnode->psn_Screen);
74 struct Node *node;
75 ForeachNode(&MUIScreenBase->clients, node)
77 struct MUIS_InfoClient *client = (struct MUIS_InfoClient*) node;
78 Signal(client->task, client->sigbit);
81 retval = TRUE;
84 return retval;
86 AROS_LIBFUNC_EXIT