r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / graphics / deinitrastport.c
blob7a0fc8219ad197e0dd6a684323eedfc7808d2d42
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: AROS Graphics function DeinitRastPort()
6 Lang: english
7 */
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
10 #include <graphics/rastport.h>
11 #include "gfxfuncsupport.h"
13 void obsolete_DeinitDriverData(struct RastPort *, struct GfxBase *);
15 /*****************************************************************************
17 NAME */
18 #include <proto/graphics.h>
20 AROS_LH1(void, DeinitRastPort,
22 /* SYNOPSIS */
23 AROS_LHA(struct RastPort *, rp, A1),
25 /* LOCATION */
26 struct GfxBase *, GfxBase, 179, Graphics)
28 /* FUNCTION
29 Frees the contents of a RastPort structure. The structure itself
30 is not freed.
32 INPUTS
33 rp - The RastPort which contents are to be freed.
35 RESULT
36 None.
38 NOTES
39 You can initialize the RastPort again via InitRastPort() but
40 you must not use any other graphics function with it before
41 that.
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 InitRastPort()
50 INTERNALS
52 HISTORY
53 29-10-95 digulla automatically created from
54 graphics_lib.fd and clib/graphics_protos.h
56 *****************************************************************************/
58 AROS_LIBFUNC_INIT
59 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
61 D(bug("DeInitRP()\n"));
63 #if NEW_DRIVERDATA_CODE
64 KILL_DRIVERDATA(rp, GfxBase);
65 #else
66 if ( rp->Flags & RPF_DRIVER_INITED )
68 D(bug("RP inited, rp=%p, %flags=%d=\n", rp, rp->Flags));
70 if (GetDriverData(rp)->dd_RastPort == rp)
72 D(bug("Calling DeInitDriverData\n"));
73 obsolete_DeinitDriverData (rp, GfxBase);
76 #endif
78 AROS_LIBFUNC_EXIT
80 } /* DeinitRastPort */