some fixes to accented characters
[tangerine.git] / rom / hyperlayers / installlayerinfohook.c
blobb054ebd8b5713bfc86b7f3740b8d20aee09b384c
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>
10 #define DEBUG 0
11 #include <aros/debug.h>
12 #undef kprintf
14 /*****************************************************************************
16 NAME */
17 #include <proto/layers.h>
18 #include "layers_intern.h"
19 #include "basicfuncs.h"
21 AROS_LH2(struct Hook *, InstallLayerInfoHook,
23 /* SYNOPSIS */
24 AROS_LHA(struct Layer_Info *, li, A0),
25 AROS_LHA(struct Hook *, hook, A1),
27 /* LOCATION */
28 struct LayersBase *, LayersBase, 34, Layers)
30 /* FUNCTION
31 Install a backfill hook into the LayerInfo structure. This
32 backfill hook will be called to clear the areas where there
33 is no layer. It will be used for every layer.
35 INPUTS
36 li - pointer to layer info
38 RESULT
39 If there was a backfill hook installed before it will be
40 returned. LAYERS_BACKFILL will be returned if the default
41 backfill hook was installed, LAYERS_NOBACKFILL if there
42 was nothing to be called for clearing an area.
44 NOTES
45 The hook is not called immediately. It will be called for
46 those areas that have to be cleared when layers move away
47 from those areas.
49 EXAMPLE
51 BUGS
53 SEE ALSO
55 INTERNALS
57 HISTORY
58 27-11-96 digulla automatically created from
59 layers_lib.fd and clib/layers_protos.h
61 *****************************************************************************/
63 AROS_LIBFUNC_INIT
65 struct Hook *OldHook;
67 D(bug("InstallLayerInfoHook(li @ $%lx, hook @ $%lx)\n", li, hook));
69 LockLayerInfo(li);
71 OldHook = li->BlankHook;
73 li->BlankHook = hook;
75 if (li->check_lp)
77 LockLayer(0, li->check_lp);
78 li->check_lp->BackFill = hook;
79 UnlockLayer(li->check_lp);
82 UnlockLayerInfo(li);
84 return OldHook;
86 AROS_LIBFUNC_EXIT
87 } /* InstallLayerInfoHook */