grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / intuition / setdefaultpubscreen.c
blobd55a7bc5dab4e17619a48ff1e7c5e3b8ad60bab2
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_LH1(void, SetDefaultPubScreen,
16 /* SYNOPSIS */
17 AROS_LHA(UBYTE *, name, A0),
19 /* LOCATION */
20 struct IntuitionBase *, IntuitionBase, 90, Intuition)
22 /* FUNCTION
23 Specifies the default public screen for visitor windows to open up on.
24 The screen is used when a requested public screen is not available
25 and the FALLBACK option is enabled or when the visitor window asks for
26 the default public screen.
28 INPUTS
29 name - The name of the public screen that should be used as default,
30 or NULL to specify the Workbench screen.
32 RESULT
33 None.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 OpenWindow(), OpenScreen()
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 //ignored for defpubscreen patch
51 if (GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_DEFPUBSCREEN) return;
53 if (name)
55 struct PubScreenNode * psn;
57 if ((psn = (struct PubScreenNode *)FindName (LockPubScreenList(), name)))
58 GetPrivIBase(IntuitionBase)->DefaultPubScreen = psn->psn_Screen;
60 UnlockPubScreenList();
62 else
63 GetPrivIBase(IntuitionBase)->DefaultPubScreen = NULL;
65 AROS_LIBFUNC_EXIT
66 } /* SetDefaultPubScreen */