; ; nopoll.sh ; ; Handling nonpolling dialogue boxes ; ; © 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: ; ; nopoll_open ; nopoll_close ; nopoll_init ; nopoll_process [ :LNOT::DEF:nopoll__dfn GBLL nopoll__dfn ; --- nopoll_open --- ; ; On entry: R0 == a window handle to take over ; ; On exit: -- ; ; Use: Sets up the window with the given handle to be a nonpolling ; dialogue box. The window must already be open on the screen. ; This call will force it to be painted on the screen, and ; then start faking events for it. IMPORT nopoll_open ; --- nopoll_close --- ; ; On entry: R0 == return value for nopoll_process (can be anything) ; ; On exit: -- ; ; Use: Tells nopoll that the nonpolling window has been killed, ; and hence that polling can return to normal again. You can ; specify a return value to give from nopoll_process (if that ; system is being used). IMPORT nopoll_close ; --- nopoll_init --- ; ; On entry: -- ; ; On exit: -- ; ; Use: Initialises nopoll so it can be used. IMPORT nopoll_init ; --- nopoll_process --- ; ; On entry: -- ; ; On exit: R0 == value passed to nopoll_close ; ; Use: Processes a nonpolling window until it calls nopoll_close. ; It then returns the value passed to nopoll_close in R0, ; which can be defined in any way you want. ; ; Some notes on the use of this routine: ; ; * It calls event_poll, so any functions that get called ; after the normal event_poll don't get called. Since the ; Wimp isn't actually being polled at all, this isn't a ; real problem as long as your handlers are registered at the ; event filter level or higher (e.g. win event handlers or ; even dbox handlers). ; ; * It uses up an extra 256 bytes of stack for a poll block. ; If you think you might miss this stack space, then you'd ; better not use this routine. ; ; * It isn't reentrant, but then again, nor is the rest of the ; nopoll system -- you can only have one nonpolling box open ; at a time. IMPORT nopoll_process ] ;----- That's all, folks ---------------------------------------------------- END