; ; win.sh ; ; Window event dispatching ; ; © 1994-1998 Straylight ; ;----- Licensing note ------------------------------------------------------- ; ; This file is part of Straylight's Sapphire library. ; ; Sapphire is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2, or (at your option) ; any later version. ; ; Sapphire is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with Sapphire. If not, write to the Free Software Foundation, ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; win_eventHandler ; win_removeEventHandler ; win_swapWindow ; win_windowDeleted ; win_unknownHandler ; win_removeUnknownHandler ; win_init [ :LNOT::DEF:win__dfn GBLL win__dfn ; --- win_eventHandler --- ; ; On entry: R0 == window handle ; R1 == pointer to routine to call ; R2 == R10 value to call routine with ; R3 == R12 value to call routine with ; ; On exit: May return an error ; ; Use: Adds a routine to the event handler list. Later added ; routines are called first. The event handing routine ; must preserve all the registers, but may alter the carry ; flag. If it returns with carry set, then no more event ; handlers, OR post-filters, will be called. IMPORT win_eventHandler ; --- win_removeEventHandler --- ; ; On entry: R0 == window handle ; R1 == pointer to routine called ; R2 == R10 value routine is called with ; R3 == R12 value routine is called with ; ; On exit: -- ; ; Use: Removes a routine to the event handler list. IMPORT win_removeEventHandler ; --- win_swapWindow --- ; ; On entry: R0 == old window handle ; R1 == new window handle ; ; On exit: -- ; ; Use: Searches for all the event handlers for window R0, and ; changes the window handle for R1. This is designed for ; situations in wihich a window has been deleted and ; recreated. IMPORT win_swapWindow ; --- win_windowDeleted --- ; ; On entry: R0 == window handle ; ; On exit: -- ; ; Use: Removes all the event handlers associated with the given ; window handle. It is intended to be used when a window ; has been deleted. IMPORT win_windowDeleted ; --- win_unknownHandler --- ; ; On entry: R0 == pointer to routine to call ; R1 == R4 value to call routine with ; R2 == R10 value to call routine with ; R3 == R12 value to call routine with ; ; On exit: May return an error ; ; Use: Adds a rountine to the event handler list. Later added ; routines are called first. The event handing routine ; must preserve all the registers, but may alter the carry ; flag. If it returns with carry set, then no more event ; handlers, OR post-filters, will be called. IMPORT win_unknownHandler ; --- win_removeUnknownHandler --- ; ; On entry: R0 == pointer to routine called ; R1 == R4 value routine is called with ; R2 == R10 value routine is called with ; R3 == R12 value routine is called with ; ; On exit: -- ; ; Use: Removes a routine to the unknown handler list. IMPORT win_removeUnknownHandler ; --- win_init --- ; ; On entry: -- ; ; On exit: -- ; ; Use: Initialises the win system. IMPORT win_init ] ;----- That's all, folks ---------------------------------------------------- END