2 Copyright © 2002-2007, The AROS Development Team.
8 #include <proto/layers.h>
9 #include <proto/intuition.h>
10 #include <proto/graphics.h>
11 #include <proto/muimaster.h>
14 #include "muimaster_intern.h"
16 /*****************************************************************************
19 AROS_LH2(VOID
, MUI_RemoveClipRegion
,
22 AROS_LHA(struct MUI_RenderInfo
*, mri
, A0
),
23 AROS_LHA(APTR
, handle
, A1
),
26 struct Library
*, MUIMasterBase
, 27, MUIMaster
)
36 sba: This function frees the region given in MUI_AddClipRegion, but this seems wrong to me.
37 MUI_AddClipRegion should better duplicate the region.
49 *****************************************************************************/
53 struct Window
*w
= mri
->mri_Window
;
56 if (handle
== (APTR
)-1)
62 l
= mri
->mri_RastPort
->Layer
;
69 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
71 LockLayerInfo(&w
->WScreen
->LayerInfo
);
75 #if 1 /* stegerg: what's this good for */
76 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
77 LockLayerInfo(&w
->WScreen
->LayerInfo
);
80 InstallClipRegion(l
, (mri
->mri_rCount
> 0)
81 ? mri
->mri_rArray
[mri
->mri_rCount
-1] : NULL
);
83 #if 1 /* stegerg: what's this good for */
84 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
85 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
88 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
91 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
94 DisposeRegion(mri
->mri_rArray
[mri
->mri_rCount
]);
95 mri
->mri_rArray
[mri
->mri_rCount
] = NULL
;
99 } /* MUIA_RemoveClipRegion */