2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: AROS Graphics function CreateRastPort()
8 #include "graphics_intern.h"
9 #include <exec/memory.h>
10 #include <graphics/rastport.h>
11 #include <proto/exec.h>
12 #include "gfxfuncsupport.h"
14 /*****************************************************************************
17 #include <graphics/rastport.h>
18 #include <proto/graphics.h>
20 AROS_LH0(struct RastPort
*, CreateRastPort
,
25 struct GfxBase
*, GfxBase
, 177, Graphics
)
28 This function creates a new RastPort.
34 A pointer to a new RastPort or NULL if there was not enough memory
35 to perform the operation.
38 This function is AROS specific. For compatibility, there is a
39 function in aros.lib which does the same on Amiga.
50 29-10-95 digulla automatically created from
51 graphics_lib.fd and clib/graphics_protos.h
53 *****************************************************************************/
57 struct RastPort
* newRP
;
60 newRP
= AllocMem (sizeof (struct RastPort
), MEMF_ANY
);
64 if (InitRastPort(newRP
))
66 /* Mark the rastport as being cleaned up by the
67 user itself later on (through FreeRastPort()).
68 No need for garbage collection */
69 newRP
->Flags
|= RPF_SELF_CLEANUP
;
75 FreeMem (newRP
, sizeof (struct RastPort
));
82 } /* CreateRastPort */