2 Copyright © 2002-2012, 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
, 30, MUIMaster
)
44 *****************************************************************************/
48 struct Window
*w
= mri
->mri_Window
;
55 l
= mri
->mri_RastPort
->Layer
;
57 // if (mri->mri_rCount == MRI_RARRAY_SIZE)
58 // kprintf(" --------- mui_addclipregion clip overflow ---------------------\n");
60 if ((l
== NULL
) || (r
== NULL
) || (mri
->mri_rCount
== MRI_RARRAY_SIZE
))
67 if (mri
->mri_rCount
!= 0)
68 /* NOTE: ignoring the result here... */
69 AndRegionRegion(mri
->mri_rArray
[mri
->mri_rCount
-1], r
);
71 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
73 LockLayerInfo(&w
->WScreen
->LayerInfo
);
77 #if 1 /* stegerg: what's this good for? */
78 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
79 LockLayerInfo(&w
->WScreen
->LayerInfo
);
82 result
= InstallClipRegion(l
, r
);
84 #if 1 /* stegerg: what's this good for? */
85 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
86 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
89 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
92 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
95 mri
->mri_rArray
[mri
->mri_rCount
++] = r
;
101 } /* MUIA_AddClipRegion */