CopyToAFS: Remove dead FMF_* flags
[AROS.git] / rom / intuition / releasegirport.c
blob61c924ba0ee2ce733131d20c483272622279b212
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 <proto/graphics.h>
8 #include <proto/layers.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <graphics/rastport.h>
15 #include <proto/intuition.h>
17 AROS_LH1(void, ReleaseGIRPort,
19 /* SYNOPSIS */
20 AROS_LHA(struct RastPort *, rp, A0),
22 /* LOCATION */
23 struct IntuitionBase *, IntuitionBase, 94, Intuition)
25 /* FUNCTION
26 Release a RastPort previously obtained by ObtainGIRPort().
28 INPUTS
29 rp - The result of ObtainGIRPort()
31 RESULT
32 None.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
42 INTERNALS
44 HISTORY
45 29-10-95 digulla automatically created from
46 intuition_lib.fd and clib/intuition_protos.h
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 DEBUG_RELEASEGIRPORT(dprintf("ReleaseGIRPort: RPort 0x%lx\n", rp));
54 if (rp)
56 if (rp->Layer)
58 if ((--(GetPrivIBase(IntuitionBase)->BackupLayerContext.nestcount)) == 0)
60 InstallClipRegion(rp->Layer,GetPrivIBase(IntuitionBase)->BackupLayerContext.clipregion);
62 rp->Layer->Scroll_X = GetPrivIBase(IntuitionBase)->BackupLayerContext.scroll_x;
63 rp->Layer->Scroll_Y = GetPrivIBase(IntuitionBase)->BackupLayerContext.scroll_y;
66 /* bug("----------- RELEASE: %x\n",rp->Layer);*/
67 UnlockLayer(rp->Layer);
70 UNLOCKGADGET
72 FreeRastPort (rp);
75 AROS_LIBFUNC_EXIT
76 } /* ReleaseGIRPort */