New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / setpointerbounds.c
blobd015e1d9860d43e38979ca67f8655eaece8e3155
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
4 */
6 #include "intuition_intern.h"
7 #include "inputhandler.h"
9 AROS_LH4(ULONG, SetPointerBounds,
10 /* SYNOPSIS */
11 AROS_LHA(struct Screen *, screen , A0),
12 AROS_LHA(struct Rectangle *, rect , A1),
13 AROS_LHA(ULONG , reserved, D0),
14 AROS_LHA(struct TagItem *, tags , A2),
15 /* LOCATION */
16 struct IntuitionBase *, IntuitionBase, 160, Intuition)
19 AROS_LIBFUNC_INIT
20 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
22 struct IIHData *iihd = (struct IIHData *)GetPrivIBase(IntuitionBase)->InputHandler->is_Data;
24 (void)screen;
25 (void)reserved;
27 ObtainSemaphore(&GetPrivIBase(IntuitionBase)->InputHandlerLock);
28 if (!iihd->MouseBoundsActiveFlag)
30 if (rect)
32 iihd->MouseBoundsActiveFlag = TRUE;
33 iihd->MouseBoundsKillTimer = 5; /* 1 sec */
34 iihd->MouseBoundsLeft = rect->MinX;
35 iihd->MouseBoundsTop = rect->MinY;
36 iihd->MouseBoundsRight = rect->MaxX;
37 iihd->MouseBoundsBottom = rect->MaxY;
40 else if (iihd->MouseBoundsKillTimer)
42 if (rect)
44 /* Reset timer */
45 iihd->MouseBoundsKillTimer = 5; /* 1 sec */
46 iihd->MouseBoundsLeft = rect->MinX;
47 iihd->MouseBoundsTop = rect->MinY;
48 iihd->MouseBoundsRight = rect->MaxX;
49 iihd->MouseBoundsBottom = rect->MaxY;
51 else
53 iihd->MouseBoundsKillTimer = 0;
54 iihd->MouseBoundsActiveFlag = FALSE;
58 ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->InputHandlerLock);
60 return 0;
62 AROS_LIBFUNC_EXIT