some fixes to accented characters
[tangerine.git] / rom / intuition / changescreenbuffer.c
blobc83484d3c12ae3c2b95d7def9b65fdb9e492d9ef
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 "intuition_intern.h"
9 #include "inputhandler.h"
10 #include "menus.h"
12 /*****************************************************************************
14 NAME */
15 #include <intuition/screens.h>
16 #include <proto/intuition.h>
18 AROS_LH2(ULONG, ChangeScreenBuffer,
20 /* SYNOPSIS */
21 AROS_LHA(struct Screen * , screen, A0),
22 AROS_LHA(struct ScreenBuffer *, screenbuffer, A1),
24 /* LOCATION */
25 struct IntuitionBase *, IntuitionBase, 130, Intuition)
27 /* FUNCTION
28 Do double or multiple buffering on an intuition screen in an
29 intuition-cooperative way.
30 The ScreenBuffer's BitMap will be installed on the specifies screen,
31 if possible.
32 After a signal from graphics.library, the previously installed
33 BitMap will be available for re-use.
34 Consult graphics.library/AllocDBufInfo() and
35 graphics.library/ChangeVPBitMap() for further information.
37 INPUTS
38 screen - The screen this screenbuffer belongs to
39 screenbuffer - The screenbuffer obtained by AllocScreenBuffer()
41 RESULT
42 Non-zero if fuction succeeded, or zero if operation could not be
43 performed, eg. if user selects menus or gadgets.
45 NOTES
46 You need not re-install the original ScreenBuffer before closing
47 a screen. Just FreeScreenBuffer() all buffers used for that screen.
49 EXAMPLE
51 BUGS
53 SEE ALSO
54 AllocScreenBuffer(), FreeScreenBuffer(),
55 graphics.library/ChangeVPBitMap()
57 INTERNALS
59 HISTORY
61 *****************************************************************************/
63 AROS_LIBFUNC_INIT
65 struct IIHData *iihdata;
66 ULONG lock;
68 if (!screen) return NULL;
69 if (!screenbuffer) return NULL;
71 if (MENUS_ACTIVE) return NULL;
72 iihdata = (struct IIHData *)((struct IntIntuitionBase *)(IntuitionBase))->InputHandler->is_Data;
73 if (iihdata->ActiveGadget) return NULL;
75 ChangeVPBitMap(&screen->ViewPort,screenbuffer->sb_BitMap,screenbuffer->sb_DBufInfo);
77 lock = LockIBase(NULL);
79 screen->BitMap = *screenbuffer->sb_BitMap;
80 screen->RastPort.BitMap = screenbuffer->sb_BitMap;
82 UnlockIBase(lock);
84 return TRUE;
86 AROS_LIBFUNC_EXIT
87 } /* ChangeScreenBuffer */