/*
 * tearSupt.h
 *
 * Tearoff support code
 *
 *  1994-1998 Straylight
 */

/*----- Licensing note ----------------------------------------------------*
 *
 * This file is part of Straylight's Tearoff Menu System (TMS), but it's
 * distributed with Straylight's core libraries (corelib).
 *
 * TMS 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.
 *
 * TMS 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 Corelib.  If not, write to the Free Software Foundation,
 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __tearSupport_h
#define __tearSupport_h

/* --- tearSupport_init --- *
 *
 * Arguments:	--
 *
 * Returns:	--
 *
 * Use:		Initialises tearSupport
 */

void tearSupport_init(void);

/* --- tearSupport_opened --- *
 *
 * Arguments:	task == task handle of task which opened tearoff menu
 *
 * Returns:	--
 *
 * Use:		Informs TearSupport that a transient tearoff menu has been
 *		opened, and which task owns the menu.
 */

void tearSupport_opened(int task);

/* --- tearSupport_closed --- *
 *
 * Arguments:	--
 *
 * Returns:	--
 *
 * Use:		Informs TearSupport that the transient tearoff menu has been
 *		closed, and that support is no longer required for it.
 */

void tearSupport_closed(void);

/* --- tearSupport_switch ---
 *
 * Arguments:	sw == 1 to disable, 0 to enable trapping
 *
 * Returns:	--
 *
 * Use:		Enables or disables trapping of Wimp_CreateMenu while a
 *		transient tearoff menu is open.  This is intended to allow
 *		use of Wimp_CreateMenu by the transient tearoff owner while
 *		a transient tearoff is open (e.g. to close Wimp menus).
 */

void tearSupport_switch(int sw);

#endif
