a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 layers.library
  BeginUpdate
  BehindLayer
  CreateBehindHookLayer
  CreateBehindLayer
  CreateUpfrontHookLayer
  CreateUpfrontLayer
  DeleteLayer
  DisposeLayerInfo
  DoHookClipRects
  EndUpdate
  FattenLayerInfo
  InitLayers
  InstallClipRegion
  InstallLayerHook
  InstallLayerInfoHook
  LockLayer
  LockLayerInfo
  LockLayers
  MoveLayer
  MoveLayerInFrontOf
  MoveSizeLayer
  NewLayerInfo
  ScrollLayer
  SizeLayer
  SwapBitsRastPortClipRect
  ThinLayerInfo
  UnlockLayer
  UnlockLayerInfo
  UnlockLayers
  UpfrontLayer
  WhichLayer
Include
GuruMeditation
Docs » Autodocs » layers.library » InstallLayerInfoHook

NAME

	InstallLayerInfoHook - Install a backfill hook for non-layer      (V39)

SYNOPSIS

	oldhook=InstallLayerInfoHook(li,hook)
d0 a0 a1
struct Hook *InstallLayerInfoHook(struct Layer_Info *,struct Hook *);

FUNCTION

	This function will install a backfill hook for the Layer_Info
structure passed. This backfill hook will be used to clear the
background area where no layer exists. The hook function is
passed the RastPort and the bounds just like the layer backfill
hook. Note that this hook could be called for any layer.

INPUTS

	li - pointer to LayerInfo structure
hook - pointer to layer callback Hook which will be called
with object == (struct RastPort *) result->RastPort
and message == [ (ULONG) undefined, (struct Rectangle) bounds ]
This hook should fill the Rectangle in the RastPort
with the BackFill pattern appropriate for rectangle given.
If hook is LAYERS_BACKFILL, the default backfill is
used. (Same as pre-2.0)
If hook is LAYERS_NOBACKFILL, there will be no
backfill. (NO-OP).

RESULT

	oldhook - Returns the backfill hook that was in the Layer_Info.
Returns LAYERS_BACKFILL if the default was installed.
Returns LAYERS_NOBACKFILL if there was a NO-OP hook.
Returns -1 if there was some failure.

EXAMPLE

	See the example in InstallLayerHook.  Note that both the Layer
pointer and the OffsetX/Y values are not available in the
LayerInfo backfill hook.

NOTES

	When the hook is first installed, it is *NOT* called.  It is up
to the application to know if it is safe to fill in the area.
Since the hook will be called when a layer is deleted, the easiest
way to have layers call this hook is to create and delete a backdrop
layer that is the size of the area.
Also, note that currently the first long word of the hook message
contains an undefined value. This value may look like a layer pointer.
It is *not* a layer pointer.
The RastPort you are passed back is the same one passed to the
function. You should *not* use "layered" rendering functions
on this RastPort. Generally, you will wish to do BitMap operations
such as BltBitMap(). The callback is a raw, low-level rendering
call-back. If you need to call a rendering operation with a
RastPort, make sure you use a copy of the RastPort and NULL the
Layer pointer.

SEE ALSO

InstallLayerHook()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

The Black Lotus

CSL
ANA
HZ
TBL

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se