some fixes to accented characters
[tangerine.git] / rom / hyperlayers / createbehindhooklayer.c
blob1a28d8735001e38b6a5df099e56c3a3ecc981590
1 /*
2 Copyright © 1995-2007, 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>
12 #include "basicfuncs.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/layers.h>
18 AROS_LH9(struct Layer *, CreateBehindHookLayer,
20 /* SYNOPSIS */
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),
31 /* LOCATION */
32 struct LayersBase *, LayersBase, 32, Layers)
34 /* FUNCTION
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
39 non backdrop layers.
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
43 do that.
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.
48 INPUTS
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,
59 (WORD) offsetx,
60 (WORD) offsety ]
61 bm2 - pointer to optional super bitmap.
63 RESULT
64 Pointer to the newly created layer. NULL if layer could not be
65 created (Probably out of memory).
67 NOTES
68 Does not allow to create layers that are partially outside
69 the given bitmap (, yet).
71 EXAMPLE
73 BUGS
75 SEE ALSO
77 INTERNALS
79 HISTORY
80 27-11-96 digulla automatically created from
81 layers_lib.fd and clib/layers_protos.h
83 *****************************************************************************/
85 AROS_LIBFUNC_INIT
87 struct TagItem tagList[5] = {{LA_Priority , 0},
88 {LA_Hook , NULL},
89 {LA_SuperBitMap , NULL},
90 {TAG_DONE , 0UL}};
92 tagList[0].ti_Data = (LAYERBACKDROP == (flags & LAYERBACKDROP)) ?
93 BACKDROPPRIORITY:
94 UPFRONTPRIORITY;
95 tagList[1].ti_Data = (IPTR)hook;
96 tagList[2].ti_Data = (IPTR)bm2;
98 return CreateLayerTagList(li,
99 bm,
100 x0, y0, x1, y1,
101 flags,
102 &tagList[0]);
104 AROS_LIBFUNC_EXIT
105 } /* CreateBehindHookLayer */