2 Copyright © 2002-2007, 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 *****************************************************************************/
51 struct Window
*w
= mri
->mri_Window
;
58 l
= mri
->mri_RastPort
->Layer
;
60 // if (mri->mri_rCount == MRI_RARRAY_SIZE) kprintf(" --------- mui_addclipregion clip overflow ---------------------\n");
62 if ((l
== NULL
) || (r
== NULL
) || (mri
->mri_rCount
== MRI_RARRAY_SIZE
))
64 if (r
) DisposeRegion(r
);
68 if (mri
->mri_rCount
!= 0)
69 /* NOTE: ignoring the result here... */
70 AndRegionRegion(mri
->mri_rArray
[mri
->mri_rCount
-1], r
);
72 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
74 LockLayerInfo(&w
->WScreen
->LayerInfo
);
78 #if 1 /* stegerg: what's this good for? */
79 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
80 LockLayerInfo(&w
->WScreen
->LayerInfo
);
83 result
= InstallClipRegion(l
, r
);
85 #if 1 /* stegerg: what's this good for? */
86 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
87 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
90 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
93 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
96 mri
->mri_rArray
[mri
->mri_rCount
++] = r
;
102 } /* MUIA_AddClipRegion */