some fixes to accented characters
[tangerine.git] / rom / intuition / freescreenbuffer.c
blob00f4e9fb41bcc401389e79283a22e9c737700ccc
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 <graphics/rastport.h>
8 #include <proto/graphics.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <intuition/screens.h>
15 #include <proto/intuition.h>
17 AROS_LH2(void, FreeScreenBuffer,
19 /* SYNOPSIS */
20 AROS_LHA(struct Screen * , screen, A0),
21 AROS_LHA(struct ScreenBuffer *, screenbuffer, A1),
23 /* LOCATION */
24 struct IntuitionBase *, IntuitionBase, 129, Intuition)
26 /* FUNCTION
27 Frees a ScreenBuffer allocated by AllocScreenBuffer() and releases
28 associated resources. You have to call this before closing your
29 screen.
31 INPUTS
32 screen - The screen this screenbuffer belongs to
33 screenbuffer - The screenbuffer obtained by AllocScreenBuffer()
34 It is safe to pass NULL.
36 RESULT
37 None.
39 NOTES
40 When used SB_SCREEN_BITMAP on allocating the ScreenBuffer
41 (ie. the ScreenBuffer only refers to the screen's BitMap) you must
42 FreeScreenBuffer() the ScreenBuffer before closing the screen.
43 Intuition will recognize when FreeScreenBuffer() is called for the
44 currently installed ScreenBuffer that it must not free the BitMap.
45 This is left to the CloseScreen() function.
47 EXAMPLE
49 BUGS
51 SEE ALSO
52 AllocScreenBuffer(), ChangeScreenBuffer()
54 INTERNALS
56 HISTORY
58 *****************************************************************************/
60 AROS_LIBFUNC_INIT
62 DEBUG_FREESCREENBUFFER(dprintf("FreeScreenBuffer: Screen 0x%lx ScreenBuffer 0x%lx\n",
63 screen, screenbuffer));
65 screen = screen; /* shut up the compiler */
67 if (screenbuffer)
69 FreeDBufInfo(screenbuffer->sb_DBufInfo);
71 if (((struct IntScreenBuffer *)screenbuffer)->free_bitmap)
72 FreeBitMap(screenbuffer->sb_BitMap);
74 FreeMem(screenbuffer, sizeof(struct IntScreenBuffer));
77 AROS_LIBFUNC_EXIT
78 } /* FreeScreenBuffer */