Define USB 2.0 extension descriptor as Usb20ExtDesc
[AROS.git] / rom / intuition / releasegirport.c
blobdb46ac8797d748b5a0741add54dd75d6e41c618d
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 <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 *****************************************************************************/
46 AROS_LIBFUNC_INIT
48 struct LayersBase *LayersBase = GetPrivIBase(IntuitionBase)->LayersBase;
49 DEBUG_RELEASEGIRPORT(dprintf("ReleaseGIRPort: RPort 0x%lx\n", rp));
51 if (rp)
53 if (rp->Layer)
55 if ((--(GetPrivIBase(IntuitionBase)->BackupLayerContext.nestcount)) == 0)
57 InstallClipRegion(rp->Layer,GetPrivIBase(IntuitionBase)->BackupLayerContext.clipregion);
59 rp->Layer->Scroll_X = GetPrivIBase(IntuitionBase)->BackupLayerContext.scroll_x;
60 rp->Layer->Scroll_Y = GetPrivIBase(IntuitionBase)->BackupLayerContext.scroll_y;
63 /* bug("----------- RELEASE: %x\n",rp->Layer);*/
64 UnlockLayer(rp->Layer);
67 UNLOCKGADGET(IntuitionBase)
69 FreeRastPort (rp);
72 AROS_LIBFUNC_EXIT
73 } /* ReleaseGIRPort */