home *** CD-ROM | disk | FTP | other *** search
- ''
- '' $Id: BusyPointer.bas,v 1.2 1994/03/07 17:22:19 alex Rel $
- ''
- '' Common window busy pointer code
- ''
- '' (c) Copyright 1994 HiSoft
- ''
-
- 'DIM SHARED tl&(40)
- '
- 'REM $INCLUDE Exec.bh
- 'REM $INCLUDE Intuition.bh
- 'REM $INCLUDE Utility.bc
-
- CONST busyPointer_sizeof% = 72% '(16 + 2) * 4
-
- SUB allocBusyPointer
- SHARED busyPointer&
-
- IF PEEKW(LIBRARY("intuition.library") + lib_Version%) < 39% AND _
- busyPointer& = NULL& THEN
- busyPointer& = AllocMem&(busyPointer_sizeof%, MEMF_CHIP& OR MEMF_PUBLIC&)
- IF busyPointer& <> NULL& THEN
- 'use the TAGLIST statement to initialise the imagery
- TAGLIST busyPointer&, _
- &h00000000, _ 'reserved, must be NULL
- &h040007C0, _
- &h000007C0, _
- &h01000380, _
- &h000007E0, _
- &h07C01FF8, _
- &h1FF03FEC, _
- &h3FF87FDE, _
- &h3FF87FBE, _
- &h7FFCFF7F, _
- &h7EFCFFFF, _
- &h7FFCFFFF, _
- &h3FF87FFE, _
- &h3FF87FFE, _
- &h1FF03FFC, _
- &h07C01FF8, _
- &h000007E0, _
- &h00000000 'reserved, must be NULL
- END IF
- END IF
- END SUB
-
- SUB freeBusyPointer
- SHARED busyPointer&
-
- IF busyPointer& THEN
- FreeMem busyPointer&, busyPointer_sizeof%
- busyPointer& = NULL&
- END IF
- END SUB
-
- SUB busyPointer(BYVAL win&)
- SHARED busyPointer&
-
- IF PEEKW(LIBRARY("intuition.library") + lib_Version%) >= 39% THEN
- TAGLIST VARPTR(tl&(0)), _
- WA_BusyPointer&, TRUE&, _
- WA_PointerDelay&, TRUE&, _
- TAG_END&
- SetWindowPointerA win&, VARPTR(tl&(0))
- ELSEIF busyPointer& <> NULL& THEN
- SetPointer win&, busyPointer&, 16, 16, -6, 0
- END IF
- END SUB
-
- SUB normalPointer(BYVAL win&)
- SHARED busyPointer&
-
- IF PEEKW(LIBRARY("intuition.library") + lib_Version%) >= 39% THEN
- TAGLIST VARPTR(tl&(0)), _
- WA_Pointer&, NULL&, _
- TAG_END&
- SetWindowPointerA win&, VARPTR(tl&(0))
- ELSE
- ClearPointer win&
- END IF
- END SUB
-