2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
8 #include <intuition/pointerclass.h>
10 /*****************************************************************************
13 #include <proto/intuition.h>
15 AROS_LH6(void, SetPointer
,
18 AROS_LHA(struct Window
*, window
, A0
),
19 AROS_LHA(const UWORD
*, pointer
, A1
),
20 AROS_LHA(LONG
, height
, D0
),
21 AROS_LHA(LONG
, width
, D1
),
22 AROS_LHA(LONG
, xOffset
, D2
),
23 AROS_LHA(LONG
, yOffset
, D3
),
26 struct IntuitionBase
*, IntuitionBase
, 45, Intuition
)
29 Changes the shape of the mouse pointer for a given window.
32 window - Change it for this window
33 pointer - The shape of the new pointer as a bitmap with depth 2.
34 height - Height of the pointer
35 width - Width of the pointer (must be <= 16)
36 xOffset, yOffset - The offset of the "hot spot" relative to the
37 left, top edge of the bitmap.
52 *****************************************************************************/
61 DEBUG_SETPOINTER(dprintf("SetPointer: window 0x%lx pointer data 0x%lx\n",
64 if (window
&& pointer
)
66 Object
*ptrobj
= MakePointerFromData(IntuitionBase
, pointer
, xOffset
, yOffset
, width
, height
);
70 struct TagItem pointertags
[] =
72 {WA_Pointer
, (IPTR
)ptrobj
},
76 window
->Pointer
= (UWORD
*)pointer
;
77 window
->PtrWidth
= width
;
78 window
->PtrHeight
= height
;
80 SetWindowPointerA(window
, pointertags
);
82 IW(window
)->free_pointer
= TRUE
;