grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / hyperlayers / createupfronthooklayer.c
blob862efd257885ec171f901d5897553d0e7d68fecb
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
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 /*****************************************************************************
20 NAME */
21 #include <proto/layers.h>
23 AROS_LH9(struct Layer *, CreateUpfrontHookLayer,
25 /* SYNOPSIS */
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),
36 /* LOCATION */
37 struct LayersBase *, LayersBase, 31, Layers)
39 /* FUNCTION
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
44 non backdrop layers.
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
48 do that.
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.
53 INPUTS
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,
64 (WORD) offsetx,
65 (WORD) offsety ]
66 bm2 - pointer to optional super bitmap.
68 RESULT
69 pointer to layer if successful, NULL otherwise
71 NOTES
72 Does not allow to create layers that are partially outside
73 the given bitmap (, yet).
75 EXAMPLE
77 BUGS
79 SEE ALSO
81 INTERNALS
83 HISTORY
84 27-11-96 digulla automatically created from
85 layers_lib.fd and clib/layers_protos.h
87 *****************************************************************************/
89 AROS_LIBFUNC_INIT
91 return CreateUpfrontLayerTags(li, bm, x0, y0, x1, y1, flags,
92 LA_BackfillHook, hook,
93 LA_SuperBitMap, bm2,
94 TAG_DONE);
96 AROS_LIBFUNC_EXIT
97 } /* CreateUpfrontHookLayer */