Build contrib binary archive again because it isn't included in FreeBSD
[AROS.git] / rom / hyperlayers / installclipregion.c
blob627fc30c08f176b7cfb62e20538543a2928ccd60
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <graphics/clip.h>
10 #include <exec/types.h>
11 #include <proto/exec.h>
12 #include <graphics/layers.h>
13 #include <proto/layers.h>
14 #include "layers_intern.h"
15 #include "basicfuncs.h"
17 /*****************************************************************************
19 NAME */
21 AROS_LH2(struct Region *, InstallClipRegion,
23 /* SYNOPSIS */
24 AROS_LHA(struct Layer *, l , A0),
25 AROS_LHA(struct Region *, region, A1),
27 /* LOCATION */
28 struct LayersBase *, LayersBase, 29, Layers)
30 /* FUNCTION
31 Install a transparent Clip region in the layer. All subsequent
32 graphics call to the rastport of the layer will be clipped to
33 that region.
34 None of the system functions will free the ClipRegion for you,
35 so you will have to call InstallClipRegion(l, NULL) before
36 closing a window or deleting a layer.
38 INPUTS
39 l - pointer to layer
40 region - pointer to region to be clipped against.
42 RESULT
44 NOTES
46 EXAMPLE
48 BUGS
50 SEE ALSO
52 INTERNALS
54 HISTORY
55 27-11-96 digulla automatically created from
56 layers_lib.fd and clib/layers_protos.h
58 *****************************************************************************/
60 AROS_LIBFUNC_INIT
61 AROS_LIBBASE_EXT_DECL(struct LayersBase *,LayersBase)
63 struct Region * OldRegion;
65 LockLayer(0, l);
67 OldRegion = _InternalInstallClipRegion(l, region, 0, 0, LayersBase);
69 UnlockLayer(l);
71 return OldRegion;
73 AROS_LIBFUNC_EXIT
74 } /* InstallClipRegion */