[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


    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).

    RESULTS
        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()