added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / libs / muimaster / mui_beginrefresh.c
blobdfd8e50ad6049317b815b5a38acb5d90a6b716bc
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, 28, MUIMaster)
26 /* FUNCTION
28 INPUTS
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
37 The function itself is a bug ;-) Remove it!
39 SEE ALSO
41 INTERNALS
43 HISTORY
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 struct Window *w = mri->mri_Window;
50 struct Layer *l;
52 if ((w == NULL) || !(w->Flags & WFLG_SIMPLE_REFRESH))
53 return 0;
55 l = w->WLayer;
57 /* doesn't need refreshing */
58 if (!(l->Flags & LAYERREFRESH))
59 return 0;
61 /* already refreshing */
62 if (mri->mri_Flags & MUIMRI_REFRESHMODE)
63 return 0;
65 mri->mri_Flags |= MUIMRI_REFRESHMODE;
66 LockLayerInfo(&w->WScreen->LayerInfo);
67 BeginRefresh(w);
68 return 1;
70 AROS_LIBFUNC_EXIT
72 } /* MUIA_BeginRefresh */