Check for SYS/GL during library init. Reason is that
[AROS.git] / rom / intuition / pubscreenstatus.c
blobf735de05c4afae6a0c5b51ad07a7726c9ee52fc5
1 /*
2 Copyright © 1995-2013, 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
24 Change the status flags for a given public screen.
26 INPUTS
27 Scr - The screen the flags of which to change.
28 StatusFlags - The new values for the flags, see <intuition/screens.h>
29 for further information on the flag bits.
31 RESULT
32 Clears bit 0 if the screen wasn't public or if it was impossible
33 to make private (PSNF_PRIVATE) as visitor windows are open on it.
34 The other bits in the return value are reserved for future use.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 OpenScreen()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 ULONG retval;
54 SANITY_CHECKR(Scr,FALSE)
56 LockPubScreenList();
60 (GetPrivScreen(Scr)->pubScrNode == NULL)
63 (StatusFlags & PSNF_PRIVATE)
65 (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 */