2 Copyright © 2002-2012, 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
, 31, 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.
47 *****************************************************************************/
51 struct Window
*w
= mri
->mri_Window
;
54 if (handle
== (APTR
)-1)
60 l
= mri
->mri_RastPort
->Layer
;
67 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
69 LockLayerInfo(&w
->WScreen
->LayerInfo
);
73 #if 1 /* stegerg: what's this good for */
74 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
75 LockLayerInfo(&w
->WScreen
->LayerInfo
);
78 InstallClipRegion(l
, (mri
->mri_rCount
> 0)
79 ? mri
->mri_rArray
[mri
->mri_rCount
-1] : NULL
);
81 #if 1 /* stegerg: what's this good for */
82 if ((w
!= NULL
) && !(w
->Flags
& WFLG_SIMPLE_REFRESH
))
83 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
86 if ((w
!= NULL
) && (mri
->mri_Flags
& MUIMRI_REFRESHMODE
))
89 UnlockLayerInfo(&w
->WScreen
->LayerInfo
);
92 DisposeRegion(mri
->mri_rArray
[mri
->mri_rCount
]);
93 mri
->mri_rArray
[mri
->mri_rCount
] = NULL
;
97 } /* MUIA_RemoveClipRegion */