tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / hyperlayers / createbehindhooklayer.c
blobc2615e2612c6282974431f698668505078db2775
1 /*
2 Copyright © 1995-2011, 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 <graphics/layers.h>
11 #include <utility/tagitem.h>
13 #include "layers_intern.h"
14 #include "basicfuncs.h"
16 /*****************************************************************************
18 NAME */
19 #include <proto/layers.h>
20 AROS_LH9(struct Layer *, CreateBehindHookLayer,
22 /* SYNOPSIS */
23 AROS_LHA(struct Layer_Info *, li, A0),
24 AROS_LHA(struct BitMap *, bm, A1),
25 AROS_LHA(LONG , x0, D0),
26 AROS_LHA(LONG , y0, D1),
27 AROS_LHA(LONG , x1, D2),
28 AROS_LHA(LONG , y1, D3),
29 AROS_LHA(LONG , flags, D4),
30 AROS_LHA(struct Hook *, hook, A3),
31 AROS_LHA(struct BitMap *, bm2, A2),
33 /* LOCATION */
34 struct LayersBase *, LayersBase, 32, Layers)
36 /* FUNCTION
37 Create a new layer at the given position and with the
38 given size. The new layer will be in front of all other
39 layers. If it is a backdrop layer it will be created
40 in front of all other backdrop layers and behind all
41 non backdrop layers.
42 Install the given hook as a backfill hook. This hook will
43 be called whenever a part of the layer is supposed to be
44 filled with a certain pattern. The backfill hook has to
45 do that.
46 If a super bitmap layer is wanted the flags LAYERSUPER and
47 the flag LAYERSMART have to be set and a pointer to a
48 bitmap must also be passed to this function.
50 INPUTS
51 li - pointer to LayerInfo structure
52 bm - pointer to common bitmap
53 x0, y0- upper left corner of the layer
54 x1, y1- lower right corner of the layer
55 flags - choose the type of layer by setting some flags
56 hook - pointer to the backfill hook of this layer
57 The backfill hook will be called with
58 object = (struct RastPort *) result->RastPort
59 and message = [ (struct Layer *) layer,
60 (struct Rectangle) bounds,
61 (WORD) offsetx,
62 (WORD) offsety ]
63 bm2 - pointer to optional super bitmap.
65 RESULT
66 Pointer to the newly created layer. NULL if layer could not be
67 created (Probably out of memory).
69 NOTES
70 Does not allow to create layers that are partially outside
71 the given bitmap (, yet).
73 EXAMPLE
75 BUGS
77 SEE ALSO
79 INTERNALS
81 HISTORY
82 27-11-96 digulla automatically created from
83 layers_lib.fd and clib/layers_protos.h
85 *****************************************************************************/
87 AROS_LIBFUNC_INIT
89 return CreateBehindLayerTags(li, bm, x0, y0, x1, y1, flags,
90 LA_BackfillHook, hook,
91 LA_SuperBitMap, bm2,
92 TAG_DONE);
94 AROS_LIBFUNC_EXIT
95 } /* CreateBehindHookLayer */