some fixes to accented characters
[tangerine.git] / rom / hyperlayers / installlayerhook.c
blob19809c7b7e92f68f1e1e8973e75270c85037714f
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>
9 #include <utility/hooks.h>
10 #include <proto/graphics.h>
12 #define DEBUG 0
13 #include <aros/debug.h>
14 #undef kprintf
16 /*****************************************************************************
18 NAME */
19 #include <proto/layers.h>
20 #include "layers_intern.h"
22 AROS_LH2(struct Hook *, InstallLayerHook,
24 /* SYNOPSIS */
25 AROS_LHA(struct Layer *, layer, A0),
26 AROS_LHA(struct Hook *, hook, A1),
28 /* LOCATION */
29 struct LayersBase *, LayersBase, 33, Layers)
31 /* FUNCTION
32 Safely install a new backfill hook. Return the old hook.
33 If hook is NULL, then the default backfill hook will be installed.
35 INPUTS
36 layer - layer that will get the new backfill hook
37 hook - pointer to backfill hook to be installed
39 RESULT
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 HISTORY
52 27-11-96 digulla automatically created from
53 layers_lib.fd and clib/layers_protos.h
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 struct Hook *OldHook;
61 D(bug("InstallLayerHook(layer @ $%lx, hook @ $%lx)\n", layer, hook));
63 if(layer == NULL)
64 return NULL;
66 LockLayer(0, layer);
68 OldHook = layer->BackFill;
70 layer->BackFill = hook;
72 UnlockLayer(layer);
74 return OldHook;
76 AROS_LIBFUNC_EXIT
77 } /* InstallLayerHook */