2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <proto/graphics.h>
9 #include <proto/exec.h>
10 #include <exec/memory.h>
11 #include <exec/types.h>
12 #include <aros/libcall.h>
13 #include <utility/tagitem.h>
14 #include <graphics/clip.h>
15 #include "layers_intern.h"
18 /*****************************************************************************
21 #include <proto/layers.h>
23 AROS_LH9(struct Layer
*, CreateUpfrontHookLayer
,
26 AROS_LHA(struct Layer_Info
*, li
, A0
),
27 AROS_LHA(struct BitMap
*, bm
, A1
),
28 AROS_LHA(LONG
, x0
, D0
),
29 AROS_LHA(LONG
, y0
, D1
),
30 AROS_LHA(LONG
, x1
, D2
),
31 AROS_LHA(LONG
, y1
, D3
),
32 AROS_LHA(LONG
, flags
, D4
),
33 AROS_LHA(struct Hook
*, hook
, A3
),
34 AROS_LHA(struct BitMap
*, bm2
, A2
),
37 struct LayersBase
*, LayersBase
, 31, Layers
)
40 Create a new layer at the given position and with the
41 given size. The new layer will be in front of all other
42 layers. If it is a backdrop layer it will be created
43 in front of all other backdrop layers and behind all
45 Install the given hook as a backfill hook. This hook will
46 be called whenever a part of the layer is supposed to be
47 filled with a certain pattern. The backfill hook has to
49 If a super bitmap layer is wanted the flags LAYERSUPER and
50 the flag LAYERSMART have to be set and a pointer to a
51 bitmap must also be passed to this function.
54 li - pointer to LayerInfo structure
55 bm - pointer to common bitmap
56 x0, y0- upper left corner of the layer
57 x1, y1- lower right corner of the layer
58 flags - choose the type of layer by setting some flags
59 hook - pointer to the backfill hook of this layer
60 The backfill hook will be called with
61 object = (struct RastPort *) result->RastPort
62 and message = [ (struct Layer *) layer,
63 (struct Rectangle) bounds,
66 bm2 - pointer to optional super bitmap.
69 pointer to layer if successful, NULL otherwise
72 Does not allow to create layers that are partially outside
73 the given bitmap (, yet).
84 27-11-96 digulla automatically created from
85 layers_lib.fd and clib/layers_protos.h
87 *****************************************************************************/
90 AROS_LIBBASE_EXT_DECL(struct LayersBase
*,LayersBase
)
92 struct TagItem tagList
[5] = {{LA_Priority
, 0},
94 {LA_SuperBitMap
, NULL
},
97 tagList
[0].ti_Data
= (LAYERBACKDROP
== (flags
& LAYERBACKDROP
)) ?
100 tagList
[1].ti_Data
= (IPTR
)hook
;
101 tagList
[2].ti_Data
= (IPTR
)bm2
;
103 return CreateLayerTagList(li
,
112 } /* CreateUpfrontHookLayer */