2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
6 #include "intuition_intern.h"
7 #include "inputhandler.h"
9 AROS_LH4(ULONG
, SetPointerBounds
,
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
),
16 struct IntuitionBase
*, IntuitionBase
, 160, Intuition
)
20 AROS_LIBBASE_EXT_DECL(struct IntuitionBase
*,IntuitionBase
)
22 struct IIHData
*iihd
= (struct IIHData
*)GetPrivIBase(IntuitionBase
)->InputHandler
->is_Data
;
27 ObtainSemaphore(&GetPrivIBase(IntuitionBase
)->InputHandlerLock
);
28 if (!iihd
->MouseBoundsActiveFlag
)
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
)
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
;
53 iihd
->MouseBoundsKillTimer
= 0;
54 iihd
->MouseBoundsActiveFlag
= FALSE
;
58 ReleaseSemaphore(&GetPrivIBase(IntuitionBase
)->InputHandlerLock
);