2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include <aros/libcall.h>
9 #include <graphics/clip.h>
10 #include <graphics/layers.h>
11 #include <utility/tagitem.h>
12 #include "basicfuncs.h"
14 /*****************************************************************************
17 #include <proto/layers.h>
18 AROS_LH9(struct Layer
*, CreateBehindHookLayer
,
21 AROS_LHA(struct Layer_Info
*, li
, A0
),
22 AROS_LHA(struct BitMap
*, bm
, A1
),
23 AROS_LHA(LONG
, x0
, D0
),
24 AROS_LHA(LONG
, y0
, D1
),
25 AROS_LHA(LONG
, x1
, D2
),
26 AROS_LHA(LONG
, y1
, D3
),
27 AROS_LHA(LONG
, flags
, D4
),
28 AROS_LHA(struct Hook
*, hook
, A3
),
29 AROS_LHA(struct BitMap
*, bm2
, A2
),
32 struct LayersBase
*, LayersBase
, 32, Layers
)
35 Create a new layer at the given position and with the
36 given size. The new layer will be in front of all other
37 layers. If it is a backdrop layer it will be created
38 in front of all other backdrop layers and behind all
40 Install the given hook as a backfill hook. This hook will
41 be called whenever a part of the layer is supposed to be
42 filled with a certain pattern. The backfill hook has to
44 If a super bitmap layer is wanted the flags LAYERSUPER and
45 the flag LAYERSMART have to be set and a pointer to a
46 bitmap must also be passed to this function.
49 li - pointer to LayerInfo structure
50 bm - pointer to common bitmap
51 x0, y0- upper left corner of the layer
52 x1, y1- lower right corner of the layer
53 flags - choose the type of layer by setting some flags
54 hook - pointer to the backfill hook of this layer
55 The backfill hook will be called with
56 object = (struct RastPort *) result->RastPort
57 and message = [ (struct Layer *) layer,
58 (struct Rectangle) bounds,
61 bm2 - pointer to optional super bitmap.
64 Pointer to the newly created layer. NULL if layer could not be
65 created (Probably out of memory).
68 Does not allow to create layers that are partially outside
69 the given bitmap (, yet).
80 27-11-96 digulla automatically created from
81 layers_lib.fd and clib/layers_protos.h
83 *****************************************************************************/
87 struct TagItem tagList
[5] = {{LA_Priority
, 0},
89 {LA_SuperBitMap
, NULL
},
92 tagList
[0].ti_Data
= (LAYERBACKDROP
== (flags
& LAYERBACKDROP
)) ?
95 tagList
[1].ti_Data
= (IPTR
)hook
;
96 tagList
[2].ti_Data
= (IPTR
)bm2
;
98 return CreateLayerTagList(li
,
105 } /* CreateBehindHookLayer */