picture.datatype: gi_RastPort should not be directly accessed
[AROS.git] / rom / intuition / pubscreenstatus.c
blob42ebf0cc076dfb77365b5381bdeb9f4a0c6286ec
1 /*
2 Copyright 1995-2010, 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
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 ULONG retval;
59 SANITY_CHECKR(Scr,FALSE)
61 LockPubScreenList();
65 (GetPrivScreen(Scr)->pubScrNode == NULL)
68 (StatusFlags & PSNF_PRIVATE)
70 (GetPrivScreen(Scr)->pubScrNode->psn_VisitorCount != 0)
74 retval = 0x0;
76 else
78 GetPrivScreen(Scr)->pubScrNode->psn_Flags = StatusFlags;
79 retval = 0x1;
82 UnlockPubScreenList();
84 FireScreenNotifyMessage((IPTR) Scr, SNOTIFY_PUBSCREENSTATE, IntuitionBase);
86 return retval;
88 AROS_LIBFUNC_EXIT
89 } /* PubScreenStatus */