home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
635.lha
/
hold_1.43b
/
misc.c
< prev
Wrap
C/C++ Source or Header
|
1992-01-18
|
785b
|
35 lines
/*
* 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);
}