grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / muimaster / mui_beginrefresh.c
blob757e089e830b40d100912bb6072915d5cf0d8399
1 /*
2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/graphics.h>
7 #include <proto/layers.h>
8 #include <proto/intuition.h>
9 #include <proto/muimaster.h>
11 #include "mui.h"
12 #include "muimaster_intern.h"
14 /*****************************************************************************
16 NAME */
17 AROS_LH2(BOOL, MUI_BeginRefresh,
19 /* SYNOPSIS */
20 AROS_LHA( struct MUI_RenderInfo *, mri, A0),
21 AROS_LHA(ULONG, flags, D0),
23 /* LOCATION */
24 struct Library *, MUIMasterBase, 32, MUIMaster)
26 /* FUNCTION
28 INPUTS
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
40 INTERNALS
42 *****************************************************************************/
44 AROS_LIBFUNC_INIT
46 struct Window *w = mri->mri_Window;
47 struct Layer *l;
49 if ((w == NULL) || !(w->Flags & WFLG_SIMPLE_REFRESH))
50 return 0;
52 l = w->WLayer;
54 /* doesn't need refreshing */
55 if (!(l->Flags & LAYERREFRESH))
56 return 0;
58 /* already refreshing */
59 if (mri->mri_Flags & MUIMRI_REFRESHMODE)
60 return 0;
62 mri->mri_Flags |= MUIMRI_REFRESHMODE;
63 LockLayerInfo(&w->WScreen->LayerInfo);
64 BeginRefresh(w);
65 return 1;
67 AROS_LIBFUNC_EXIT
69 } /* MUIA_BeginRefresh */