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

/*
 *      analogstruct.h -- Analog overlay settings
 *
 *      Copyright (C) 2000 Sigma Designs
 *                    written by Nicolas Vignal <nicolas_vignal@sdesigns.com>
 *                    modified by Emmanuel Michon <emmanuel_michon@sdesigns.com>
 *                                Pascal Cannenterre <pascal_cannenterre@sdesigns.com>
 *
 *      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 _ANALOGSTRUCT_H
#define _ANALOGSTRUCT_H

#define _DEFINE_FMP_TYPES_
#include "fmp.h"
#include "novaclient.h"

#include "settingsheader.h"

#define MAX_REG_LINE 256


#define UNUSED_ARG 0

typedef struct {
	const char *text;	
	DWORD attribute;
	DWORD value;
} online;


typedef struct {
	DWORD XRESOLUTION;
	DWORD YRESOLUTION;
	DWORD DEPTH;
	DWORD FREQUENCY;

	online *paramtable;

} analogstruct;

typedef struct _analogstructlist{
	analogstruct  object;
	struct _analogstructlist	*next;
} analogstructlist;

void CloseParamTable(analogstruct *analogparam);
void CloseAllResolutions(analogstructlist *thelist);
DWORD InitParamTable(analogstruct *analogparam);
DWORD LoadAllResolutions(analogstructlist **thelist);
DWORD Reg_ParseEntry( char* sLine, char *sKey, DWORD* pdwVal );
DWORD SaveParam(analogstructlist *thelist);
DWORD SetThisResolution(analogstructlist *thelist, DWORD xresolution, DWORD yresolution, DWORD depth, DWORD freq);
DWORD UpdateResolutions(analogstructlist **thelist, DWORD xresolution, DWORD yresolution, DWORD depth, DWORD freq);
#endif //_ANALOGSTRUCT_H
