home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
games
/
chicken
/
!Chicken
/
Documents
/
AWLibSWIs
next >
Wrap
Text File
|
1994-04-15
|
4KB
|
113 lines
SWI documentation for AW-WimpLib module
Prefix: AWLib_
Chunk : &48340
This file, and the module itself, is Public Domain. Write to the following
address to obtain the source code or submit improvements/ideas:
Andrew Wood
7 Astley Grove
Seaton Sluice
Whitley Bay
Tyne + Wear
NE26 4JL
England
Note that you need no permission to use the module, even in commercial
products, so long as it has not been altered.
AWLib_IconText: Read/write icon text
R0: Window handle
R1: Icon handle
R2: Pointer to data buffer
R3: 0 to read, 1 to write
AWLib_IconValid: Read/write icon validation string - registers as above
AWLib_ScrollReq: Handle a Wimp_Poll Scroll_Request
R1: Pointer to Wimp_Poll block
R2: X step (OS units per arrow click)
R3: Y step
AWLib_MenuHeader: Create a menu header
R0: Pointer to menu title (up to 12 characters)
R1: Width of menu (OS units)
R2: Pointer to buffer to hold menu (returned as next free space in buffer)
AWLib_MenuItem: Add a menu item to a menu (OBSOLETE - use AddMenuItem)
R0: Pointer to menu item leafname (up to 12 characters)
R1: Tick flag (1=ticked, 0=not ticked)
R2: Shade flag (1=greyed out, 0=normal)
R3: Writeable flag
R4: Last item (1=this is the last item in the menu)
R5: Warn flag (1=give Message_MenuWarning when pointer is on submenu arrow)
R6: Submenu pointer (-1=no submenu)
R7: Address to store menu item at (returned as next free space)
AWLib_IconState: Read/write icon state
R0: Window handle
R1: Icon handle
R2: State (1=selected, 0=not selected)
R3: 0 to read, 1 to write
AWLib_IconBType: Read/write icon button type - registers as above, R2=type
AWLib_IconShade: Read/write icon shade flag -registers as above; R2=1:Shaded
AWLib_IconRedraw: Forced icon redraw
R0: Window handle
R1: Icon handle
AWLib_CheckOpen: Check if a window is open
R0: Window handle
R1: Returned as 1 if open, 0 if not
AWLib_CentreOpen: Open a window in the centre of the screen
R0: Window handle
R1: 0 to use Wimp_OpenWindow, 1 to use Wimp_CreateMenu
AWLib_DialogueBox: Open a dialogue box at the pointer
R0: Window handle/menu pointer
AWLib_GetCoords: Convert screen co-ordinates to window relative co-ordinates
R0: Window handle
R1: Screen X (OS units) - returned as OS units from work area's X origin
R2: Screen Y (OS units) - returned as OS units from work area's Y origin
AWLib_Leafname: Return a file's leafname, given the full pathname
R0: Address of name - returned as address of leafname in original string
AWLib_Pathname: Return a file's pathname minus the leafname and the last "."
R0: Address of name; R0 preserved, and &0D put at the last "." in the name
AWLib_SimClick: Simulate a WIMP mouse click
R0: Window handle
R1: Icon handle
R2: Button state
AWLib_IconAdd: Add a value to an icon's numerical string contents (eg "1")
R0: Window handle
R1: Icon handle
R2: Amount to add (can be positive or negative)
R3: Minimum value that icon can hold
R4: Maximum value that icon can hold
-NB This command is used in icons with buffer arrows, for ease of use.
AWLib_AddMenuItem: Add menu item to a menu (use instead of AWLib_MenuItem)
R0: Address to store menu item at (returned as next free space, ie +24)
R1: Pointer to buffer for indirected text (returned as next free byte)
R2: Submenu pointer, or -1 for none
R3: Pointer to menu item leafname
R4: Flags:
bit 0: Tick flag
bit 1: Dotted line flag
bit 2: Writeable flag
bit 3: Warn flag (give Message_MenuWarning when over submenu arrow)
bit 4: Shade flag (1=menu item is greyed out)
bit 5: Indirected flag
bit 6: Use anti-aliased font
bit 7: Last item flag
bit 8: Centre item horizontally
bits 24-31: Font handle (if bit 6 is set)