/************************************ interface segment of Wimp routines Controls low-level access to Interface module. Version 1.00 (29 June 1993) © 1993-1998 Straylight ************************************/ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel 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. * * Steel 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 Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "swiv.h" #include "os.h" #include "wimp.h" #include "swis.h" #include "pointer.h" #include "interface.h" #include "visdelay.h" static sprite_area *interface__area; void interface_spritearea(sprite_area *a) { interface__area=a; } os_error *interface_slabButton(wimp_mousestr *mouse) { os_error *e; visdelay_state s; s=visdelay_suspend(); e=_swix(XInterface_SlabButton,_in(1),mouse); visdelay_resume(s); return (e); } os_error *interface_render3dWindow(wimp_redrawstr *rdr) { os_error *e; e=_swix(XInterface_Render3dWindow,_in(1),rdr); return (e); } os_error *interface_initialise(wimp_t task) { os_error *e; e=_swix(XInterface_Initialise,_in(0),task); return (e); } os_error *interface_closeDown(wimp_t task) { os_error *e; e=_swix(XInterface_CloseDown,_in(0),task); return (e); } os_error *interface_poll(wimp_eventstr *evnt,wimp_t task) { int event=evnt->e; os_error *e; if (interface__area) event|=1<<((unsigned int)31); /* New Interface flag for sprite area */ e=_swix(XInterface_Poll,_inr(0,2),event,interface__area,task); return (e); } os_error *interface_setWorkareaPointer(interface_pointerstr *s) { os_error *e; e=_swix(XInterface_SetWorkareaPointer,_in(1),s); return (e); } os_error *interface_removeWorkareaPointer(interface_pointerstr *s) { os_error *e; e=_swix(XInterface_RemoveWorkareaPointer,_in(1),s); return (e); }