(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/layers.h>

struct Layer * CreateUpfrontHookLayer (li , bm , x0 , y0 , x1 , y1 , flags , hook , bm2)

LOCATION
In LayersBase at offset 31

SYNOPSIS
struct Layer_Info * li
struct BitMap * bm
LONG x0
LONG y0
LONG x1
LONG y1
LONG flags
struct Hook * hook
struct BitMap * bm2

FUNCTION
Create a new layer at the given position and with the given size. The new layer will be in front of all other layers. If it is a backdrop layer it will be created in front of all other backdrop layers and behind all non backdrop layers. Install the given hook as a backfill hook. This hook will be called whenever a part of the layer is supposed to be filled with a certain pattern. The backfill hook has to do that. If a super bitmap layer is wanted the flags LAYERSUPER and the flag LAYERSMART have to be set and a pointer to a bitmap must also be passed to this function.

INPUTS
li
pointer to LayerInfo structure
bm
pointer to common bitmap x0, y0- upper left corner of the layer x1, y1- lower right corner of the layer
flags
choose the type of layer by setting some flags
hook
pointer to the backfill hook of this layer The backfill hook will be called with
result
>RastPort and message = [ (struct Layer *) layer, (struct Rectangle) bounds, (WORD) offsetx, (WORD) offsety ] bm2 - pointer to optional super bitmap.

RESULT
pointer to layer if successful, NULL otherwise

EXAMPLE

SEE ALSO

NOTES
Does not allow to create layers that are partially outside the given bitmap (, yet).

BUGS

INTERNALS

HISTORY
18.03.1999 bergers
Uses CreateRastPort() and FreeRastPort() for RastPorts and fixes memory leak in layers library.
16.03.1999 bergers
ClipRects are not cached in the LayerInfo structure anymore as this might suggest that there is a memory leak while there is not one. Instead there are cached with every layer individually.
14.03.1999 bergers
These functions do not create layers that are partially outside the screen anymore.
28.02.1999 bergers
All functions use the backfill or blank hook to fill cleared or new areas.
25.02.1999 bergers
Alloc ClipRects are fetched from a pool of cliprects in the LayerInfo and when freed put into that pool.
10.02.1999 bergers
Bugfixes for superbitmapped layers.
26.01.1999 bergers
Added support for superbitmapped layers.
21.01.1999 bergers
Added support for superbitmaps.
11.01.1999 bergers
Lots of new functionalities. Support for backdrop layers.
02.12.1998 bergers
Added more comments, removed obviouse bugs etc.
19.10.1998 ldp
Amiga Research OS
13.10.1998 bergers
Fixed typos, added friend-bitmaps etc.
12.10.1998 bergers
New functions, bugfixes in "old" functions.
23.09.1998 bergers
Made layers compileable.
17.11.1997 ldp
Implemented
18.08.1997 ldp
Empty functions