Small modification to diskinfo and info tool layout
[AROS.git] / rom / hyperlayers / endupdate.c
blob7a3d6bd372c704c1180efbf6be551aabc68aa138
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 <graphics/clip.h>
10 #include <exec/types.h>
11 #include <proto/exec.h>
12 #include <graphics/layers.h>
13 #include <proto/graphics.h>
14 #include <proto/layers.h>
15 #include "layers_intern.h"
16 #include "basicfuncs.h"
18 /*****************************************************************************
20 NAME */
22 AROS_LH2(void, EndUpdate,
24 /* SYNOPSIS */
25 AROS_LHA(struct Layer *, l , A0),
26 AROS_LHA(UWORD , flag , D0),
28 /* LOCATION */
29 struct LayersBase *, LayersBase, 14, Layers)
31 /* FUNCTION
32 After the damaged areas are update this routine should be
33 called so the regular cliprects of the layer can be installed.
36 INPUTS
37 l - pointer to layer
38 flag - TRUE if the update was complete. The damage list is disposed.
39 FALSE it the update was partial. The damage list is kept.
41 RESULT
43 NOTES
45 EXAMPLE
47 BUGS
48 not tested
50 SEE ALSO
51 BeginUpdate()
53 INTERNALS
55 HISTORY
56 27-11-96 digulla automatically created from
57 layers_lib.fd and clib/layers_protos.h
59 *****************************************************************************/
61 AROS_LIBFUNC_INIT
64 ** must reset the flag NOW !! Keep this order!!
66 l->Flags &= ~LAYERUPDATING;
68 if (NULL != l->ClipRect)
70 if (IS_SMARTREFRESH(l))
71 _CopyClipRectsToClipRects(l,
72 l->ClipRect,
73 l->cr2,
76 FALSE,
77 TRUE,
78 FALSE,
79 LayersBase);
80 else
81 _FreeClipRectListBM(l,l->ClipRect, LayersBase);
84 l->ClipRect = l->cr2;
85 l->cr2 = NULL;
87 if (FALSE != flag)
89 /* the update was complete so I free the damage list */
90 ClearRegion(l->DamageList);
91 l->Flags &= ~LAYERREFRESH;
94 UnlockLayer(l);
96 AROS_LIBFUNC_EXIT
97 } /* EndUpdate */