/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Parser.h,v 1.33 2003/10/08 14:58:30 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
*
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of the copyright holder(s)
* and author(s) shall not be used in advertising or otherwise to promote
* the sale, use or other dealings in this Software without prior written
* authorization from the copyright holder(s) and author(s).
*/
/*
* This file contains the external interfaces for the XFree86 configuration
* file parser.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _xf86Parser_h_
#define _xf86Parser_h_
#include "xf86Optrec.h"
#define HAVE_PARSER_DECLS
typedef struct
{
char *file_logfile;
char *file_rgbpath;
char *file_modulepath;
char *file_inputdevs;
char *file_fontpath;
char *file_comment;
}
/* Values for load_type */
#define XF86_LOAD_MODULE 0
typedef struct
{
int load_type;
char *load_name;
char *load_comment;
}
typedef struct
{
char *mod_comment;
}
typedef struct
{
char *ml_identifier;
int ml_clock;
int ml_hdisplay;
int ml_hsyncstart;
int ml_hsyncend;
int ml_htotal;
int ml_vdisplay;
int ml_vsyncstart;
int ml_vsyncend;
int ml_vtotal;
int ml_vscan;
int ml_flags;
int ml_hskew;
char *ml_comment;
}
typedef struct
{
char *vp_identifier;
char *vp_comment;
}
typedef struct
{
char *va_identifier;
char *va_vendor;
char *va_board;
char *va_busid;
char *va_driver;
char *va_fwdref;
char *va_comment;
}
typedef struct
{
}
typedef struct
{
}
typedef struct
{
char *modes_identifier;
char *modes_comment;
}
typedef struct
{
char *ml_modes_str;
}
typedef struct
{
char *mon_identifier;
char *mon_vendor;
char *mon_modelname;
int mon_n_hsync;
int mon_n_vrefresh;
float mon_gamma_red;
float mon_gamma_green;
float mon_gamma_blue;
char *mon_comment;
}
typedef struct
{
char *dev_identifier;
char *dev_vendor;
char *dev_board;
char *dev_chipset;
char *dev_busid;
char *dev_card;
char *dev_driver;
char *dev_ramdac;
int dev_videoram;
int dev_textclockfreq;
unsigned long dev_bios_base;
unsigned long dev_mem_base;
unsigned long dev_io_base;
char *dev_clockchip;
int dev_clocks;
int dev_chipid;
int dev_chiprev;
int dev_irq;
int dev_screen;
char *dev_comment;
}
typedef struct
{
char *mode_name;
}
typedef struct
{
int disp_frameX0;
int disp_frameY0;
int disp_virtualX;
int disp_virtualY;
int disp_depth;
int disp_bpp;
char *disp_visual;
char *disp_comment;
}
typedef struct
{
char *flg_comment;
}
typedef struct
{
char *al_adaptor_str;
}
typedef struct
{
char *scrn_identifier;
char *scrn_obso_driver;
int scrn_defaultdepth;
int scrn_defaultbpp;
int scrn_defaultfbbpp;
char *scrn_monitor_str;
char *scrn_device_str;
char *scrn_comment;
}
typedef struct
{
char *inp_identifier;
char *inp_driver;
char *inp_comment;
}
typedef struct
{
char *iref_inputdev_str;
}
/* Values for adj_where */
#define CONF_ADJ_ABSOLUTE 0
typedef struct
{
int adj_scrnum;
char *adj_screen_str;
char *adj_top_str;
char *adj_bottom_str;
char *adj_left_str;
char *adj_right_str;
int adj_where;
int adj_x;
int adj_y;
char *adj_refscreen;
}
typedef struct
{
char *inactive_device_str;
}
typedef struct
{
char *lay_identifier;
char *lay_comment;
}
typedef struct
{
char *vs_name;
char *vs_identifier;
char *vs_comment;
}
typedef struct
{
char *vnd_identifier;
char *vnd_comment;
}
typedef struct
{
int buf_count;
int buf_size;
char *buf_flags;
char *buf_comment;
}
typedef struct
{
char *dri_group_name;
int dri_group;
int dri_mode;
char *dri_comment;
}
typedef struct
{
char *extensions_comment;
}
typedef struct
{
char *conf_comment;
}
typedef struct
{
}
/*
* prototypes for public functions
*/
extern const char *xf86openConfigFile (const char *, const char *,
const char *);
extern void xf86setBuiltinConfig(const char *config[]);
extern XF86ConfigPtr xf86readConfigFile (void);
extern void xf86closeConfigFile (void);
extern void xf86freeConfig (XF86ConfigPtr p);
extern int xf86writeConfigFile (const char *, XF86ConfigPtr);
XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident,
int xf86pathIsAbsolute(const char *path);
int xf86pathIsSafe(const char *path);
#endif /* _xf86Parser_h_ */