2 Copyright © 2002-2003, The AROS Development Team. All rights reserved.
6 #include <proto/graphics.h>
7 #include <proto/layers.h>
8 #include <proto/intuition.h>
9 #include <proto/muimaster.h>
12 #include "muimaster_intern.h"
16 /*****************************************************************************
19 AROS_LH2(APTR
, MUI_AddClipRegion
,
22 AROS_LHA(struct MUI_RenderInfo
*, mri
, A0
),
23 AROS_LHA(struct Region
*, r
, A1
),
26 struct Library
*, MUIMasterBase
, 26, MUIMaster
)
39 The function itself is a bug ;-) Remove it!
47 *****************************************************************************/
50 AROS_LIBBASE_EXT_DECL(struct MUIMasterBase
*,MUIMasterBase
)
52 struct Window
*w
= mri
->mri_Window
;
59 l
= mri
->mri_RastPort
->Layer
;
61 // if (mri->mri_rCount == MRI_RARRAY_SIZE) kprintf(" --------- mui_addclipregion clip overflow ---------------------\n");
63 if ((l
== NULL
) || (r
== NULL
) || (mri
->mri_rCount
== MRI_RARRAY_SIZE
))
65 if (r
) DisposeRegion(r
);
69 if (mri
->mri_rCount
!= 0)
70 /* NOTE: ignoring the result here... */
71 AndRegionRegion(mri
->mri_rArray
[mri
->mri_rCount
-1], r
);
73 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
75 LockLayerInfo(&w
->WScreen
->LayerInfo
);
79 #if 1 /* stegerg: what's this good for? */
80 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
81 LockLayerInfo(&w
->WScreen
->LayerInfo
);
84 result
= InstallClipRegion(l
, r
);
86 #if 1 /* stegerg: what's this good for? */
87 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
88 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
91 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
94 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
97 mri
->mri_rArray
[mri
->mri_rCount
++] = r
;
103 } /* MUIA_AddClipRegion */