Minor fixes to comments.
[AROS.git] / rom / intuition / setdefaultpubscreen.c
blob51619e76d1161cb3ae62ead60473a065df30edf1
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_LH1(void, SetDefaultPubScreen,
16 /* SYNOPSIS */
17 AROS_LHA(UBYTE *, name, A0),
19 /* LOCATION */
20 struct IntuitionBase *, IntuitionBase, 90, Intuition)
22 /* FUNCTION
24 Specifies the default public screen for visitor windows to open up on.
25 The screen is used when a requested public screen is not available
26 and the FALLBACK option is enabled or when the visitor window asks for
27 the default public screen.
29 INPUTS
31 name -- The name of the public screen that should be used as default,
32 or NULL to specify the Workbench screen.
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 OpenWindow(), OpenScreen()
46 INTERNALS
48 HISTORY
49 29-10-95 digulla automatically created from
50 intuition_lib.fd and clib/intuition_protos.h
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 //ignored for defpubscreen patch
57 if (GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_DEFPUBSCREEN) return;
59 if (name)
61 struct PubScreenNode * psn;
63 if ((psn = (struct PubScreenNode *)FindName (LockPubScreenList(), name)))
64 GetPrivIBase(IntuitionBase)->DefaultPubScreen = psn->psn_Screen;
66 UnlockPubScreenList();
68 else
69 GetPrivIBase(IntuitionBase)->DefaultPubScreen = NULL;
71 AROS_LIBFUNC_EXIT
72 } /* SetDefaultPubScreen */