/*****************************************************************************/

/*
 *      remote.h -- REALmagic remote control client os independent headers
 *
 *      Copyright (C) 1999-2000 Sigma Designs
 *                   written by Julien Veyssiere
 *
 *      This program 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 of the License, or
 *      (at your option) any later version.
 *
 *      This program 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 this program; if not, write to the Free Software
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*****************************************************************************/

#ifndef _remote_h
#define _remote_h

#include "osremote.h"
#include "fmp.h"

#define CLOSED		       -1
#define STOPPED			0
#define STOP_FOR_RESUME	        1
#define PAUSED			2
#define PLAYING			3
#define TRICK_MODE		4

// information message
typedef struct tagINFO{
	int			symbol;
	BOOL		test;
	int			playing;
	BYTE		bDiscType;
	PORTHANDLE	hPort;
	WORD		wFSpeed;
	WORD		wBSpeed;
	BYTE		bAudioStream;
	BYTE		bMaxAudioStream;
	BYTE		bAngleNumber;
	BYTE		bMaxAngleNumber;
	BYTE		bSPStream;	
	BYTE		bMaxSPStream;
	BYTE		bFullScreen;
	// Position
	DWORD		dwX;
	DWORD		dwY;
	DWORD		dwcX;
	DWORD		dwcY;
	BYTE		bStep;
	BYTE		bPosAction;		// PosAction
	BYTE 		bVideoOut;
} INFO;

#define POS_NO_ACTION	        0
#define POS_RESIZE		1
#define POS_MOVE		2
#define POS_MAX			3

// Function defined in remote.c
void	GetDigitEntry(int digit, PORTHANDLE hPort);
int		ReadDigit(int entry);
INFO	ReadLibrary(INFO Info);
int		GetSymbol(PORTHANDLE hPort);
void	StartPlaying(INFO* Info);
void	OSMain(BYTE bDrive);

// OS dependent functions
PORTHANDLE	OSOpenPort(const char *name);
BOOL		OSClosePort(PORTHANDLE hPort);     
int			OSReadPort(PORTHANDLE hPort);
void		OSPurge(PORTHANDLE hPort);

#ifdef _PLAYWARE_
void		OSrunning();
void		OSSendRectWindow();
void		OSHideOverlay();
void		OSSendWindowHandle();
void		OSCloseWindow();
void		OSSetPortHandle(PORTHANDLE p);
void		OSEndProgramm();

#endif

#endif // _remote_h
