r4722@vps: verhaegs | 2007-05-06 13:11:19 -0400
[cake.git] / rom / intuition / pubscreenstatus.c
blobf85e3259a6207e833fb5849ec669a3bd5af22e87
1 /*
2 Copyright 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include "intuition_intern.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/intuition.h>
14 AROS_LH2(UWORD, PubScreenStatus,
16 /* SYNOPSIS */
17 AROS_LHA(struct Screen *, Scr , A0),
18 AROS_LHA(UWORD , StatusFlags, D0),
20 /* LOCATION */
21 struct IntuitionBase *, IntuitionBase, 92, Intuition)
23 /* FUNCTION
25 Change the status flags for a given public screen.
27 INPUTS
29 Scr -- The screen the flags of which to change.
30 StatusFlags -- The new values for the flags, see <intuition/screens.h>
31 for further information on the flag bits.
33 RESULT
35 Clears bit 0 if the screen wasn't public or if it was impossible
36 to make private (PSNF_PRIVATE) as visitor windows are open on it.
37 The other bits in the return value are reserved for future use.
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 OpenScreen()
49 INTERNALS
51 HISTORY
52 21-06-98 SDuvan Implemented
54 *****************************************************************************/
55 #define GPB(x) GetPrivIBase(x)
58 AROS_LIBFUNC_INIT
60 ULONG retval;
62 SANITY_CHECKR(Scr,FALSE)
64 LockPubScreenList();
66 if (GetPrivScreen(Scr)->pubScrNode == NULL ||
67 GetPrivScreen(Scr)->pubScrNode->psn_VisitorCount != 0)
69 retval = 0x0;
71 else
73 GetPrivScreen(Scr)->pubScrNode->psn_Flags = StatusFlags;
74 retval = 0x1;
77 UnlockPubScreenList();
79 FireScreenNotifyMessage((IPTR) Scr, SNOTIFY_PUBSCREENSTATE, IntuitionBase);
81 return retval;
83 AROS_LIBFUNC_EXIT
84 } /* PubScreenStatus */