Minor fixes to comments.
[AROS.git] / rom / intuition / remakedisplay.c
blobd3719b2c423ec79251bfcba66337c9d6326e6843
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/graphics.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/intuition.h>
15 AROS_LH0(LONG, RemakeDisplay,
17 /* SYNOPSIS */
19 /* LOCATION */
20 struct IntuitionBase *, IntuitionBase, 64, Intuition)
22 /* FUNCTION
23 Remake the entire Intuition display.
25 INPUTS
26 None.
28 RESULT
29 Zero for success, non-zero for failure.
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
38 RethinkDisplay(), MakeScreen(), graphics.library/MakeVPort(),
39 graphics.library/MrgCop(), graphics.library/LoadView()
41 INTERNALS
43 HISTORY
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 struct GfxBase *GfxBase = GetPrivIBase(IntuitionBase)->GfxBase;
50 struct Screen *screen;
51 ULONG ilock = LockIBase(0);
52 LONG failure = 0;
54 for (screen = IntuitionBase->FirstScreen; screen; screen = screen->NextScreen)
56 LONG error = MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
58 if (error)
59 failure = error;
62 if (!failure)
63 failure = RethinkDisplay();
65 UnlockIBase(ilock);
67 return failure;
69 AROS_LIBFUNC_EXIT
70 } /* RemakeDisplay */