/* awindow.c -- get pointer to active window
 * Copyright (c) 1988, I and I Computing and Commodore-Amiga, Inc.
 *
 * Executables based on this information may be used in software
 * for Commodore Amiga computers.  All other rights reserved.
 *
 * This information is provided "as is"; no warranties are made.
 * All use is at your own risk, and no liability or responsibility is assumed.
 */

#include "sysall.h"

struct Window *
AWindow()
{
	struct IntuitionBase	*ibase;
	struct Window 			*awindow;

	ibase = (struct IntuitionBase *) OpenLibrary("intuition.library", 32L);
	if (!ibase) return (NULL);

	/* note that this is a public field of Intuition */
	awindow = ibase->ActiveWindow;

	CloseLibrary(ibase);

	return (awindow);
}
