home *** CD-ROM | disk | FTP | other *** search
- /*
- * misc.c - miscellaneous support functions for Hold
- *
- * Bruno Costa - 16 Sep 89 - 18 Jan 91
- *
- */
-
- #include <exec/types.h>
- #include <devices/timer.h>
- #include <intuition/intuitionbase.h>
- #include <intuition/intuition.h>
- #include <proto/exec.h>
- #include <proto/intuition.h>
- #include <proto/layers.h>
- #include "hold.h"
-
- extern struct Library *LayersBase;
- extern struct IntuitionBase *IntuitionBase;
-
- /*
- * Should be called between a Forbid() + Permit() or
- * LockIBase() + UnlockIBase() pair.
- */
- struct Window *WhichWindow (void)
- {
- struct Layer *layer;
- struct Screen *scr;
-
- for (scr = IntuitionBase->FirstScreen; scr; scr = scr->NextScreen)
- if (layer = WhichLayer (&scr->LayerInfo, scr->MouseX, scr->MouseY))
- return (struct Window *)layer->Window;
-
- return (NULL);
- }
-