/*
 * DATlib   Copyright (c) 1995-1996 Marcus Meissner &
 *          Friedrich-Alexander Universitaet Erlangen-Nuernberg (FAU), IMMD4
 *          All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    This product includes software developed by Marcus Meissner
 *    at the Friedrich-Alexander Universitaet Erlangen-Nuernberg (FAU), IMMD4
 *
 * 4. The name of the University or the author may not be used
 *    to endorse or promote products derived from this software without
 *    specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE AUTHOR ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR THE AUTHOR BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

/*
 * ply_stubs.c - Notify and event callback function stubs.
 * This file was generated by `gxv' from `ply.G'.
 */

#include <stdio.h>
#include <sys/param.h>
#include <sys/types.h>
#include <xview/xview.h>
#include <xview/panel.h>
#include <xview/textsw.h>
#include <xview/xv_xrect.h>
#include "ply.h"
#include "ply_ui.h"


#ifdef MAIN


#endif

void	do_play(Panel_item, int, Event *);
void	do_eject(Panel_item, int, Event *);
void	do_ff1(Panel_item, int, Event *);
void	do_pause(Panel_item, int, Event *);
void	do_rew1(Panel_item, int, Event *);
void	do_stop(Panel_item, int, Event *);
void	do_ff(Panel_item, int, Event *);
void	do_rew(Panel_item, int, Event *);

/*
 * Global object definitions.
 */
ply_window1_objects	*Ply_window1;
/*
 * Instance XV_KEY_DATA key.  An instance is a set of related
 * user interface objects.  A pointer to an object's instance
 * is stored under this key in every object.  This must be a
 * global variable.
 */
Attr_attribute	INSTANCE;

/*
 * Notify callback function for `mainpanel'.
 */
void
ply_window1_mainpanel_notify_callback(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	/* gxv_start_connections DO NOT EDIT THIS SECTION */

	if (value == 1)
	{
		do_play(item, value, event);
	}
	
	if (value == 5)
	{
		do_eject(item, value, event);
	}
	
	if (value == 2)
	{
		do_ff1(item, value, event);
	}
	
	if (value == 3)
	{
		do_pause(item, value, event);
	}
	
	if (value == 0)
	{
		do_rew1(item, value, event);
	}
	
	if (value == 4)
	{
		do_stop(item, value, event);
	}
	
	if (value == 8)
	{
		do_ff(item, value, event);
	}
	
	if (value == 6)
	{
		do_rew(item, value, event);
	}
	
	/* gxv_end_connections */

}

/*
 * User-defined action for `mainpanel'.
 */
void
do_play(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	play(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_eject(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	eject(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_ff1(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	forward(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_pause(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	xpause(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_rew1(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	backward(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_stop(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	stop(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_ff(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	fastforward(item);
}

/*
 * User-defined action for `mainpanel'.
 */
void
do_rew(Panel_item item, int value, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	fastbackward(item);
}

/*
 * Notify callback function for `quit'.
 */
void
do_quit(Panel_item item, Event *event)
{
	ply_window1_objects *ip = (ply_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	quit(item);
	
	/* gxv_start_connections DO NOT EDIT THIS SECTION */

	/* gxv_end_connections */

}
