1f7df2e56Smrg/* 2f7df2e56Smrg * 305b261ecSmrg * Copyright (c) 1997 Metro Link Incorporated 4f7df2e56Smrg * 505b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining a 6f7df2e56Smrg * copy of this software and associated documentation files (the "Software"), 705b261ecSmrg * to deal in the Software without restriction, including without limitation 805b261ecSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 905b261ecSmrg * and/or sell copies of the Software, and to permit persons to whom the 1005b261ecSmrg * Software is furnished to do so, subject to the following conditions: 11f7df2e56Smrg * 1205b261ecSmrg * The above copyright notice and this permission notice shall be included in 1305b261ecSmrg * all copies or substantial portions of the Software. 14f7df2e56Smrg * 1505b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1605b261ecSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1705b261ecSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1805b261ecSmrg * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 1905b261ecSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 2005b261ecSmrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 2105b261ecSmrg * SOFTWARE. 22f7df2e56Smrg * 2305b261ecSmrg * Except as contained in this notice, the name of the Metro Link shall not be 2405b261ecSmrg * used in advertising or otherwise to promote the sale, use or other dealings 2505b261ecSmrg * in this Software without prior written authorization from Metro Link. 26f7df2e56Smrg * 2705b261ecSmrg */ 2805b261ecSmrg/* 2905b261ecSmrg * Copyright (c) 1997-2003 by The XFree86 Project, Inc. 3005b261ecSmrg * 3105b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining a 3205b261ecSmrg * copy of this software and associated documentation files (the "Software"), 3305b261ecSmrg * to deal in the Software without restriction, including without limitation 3405b261ecSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 3505b261ecSmrg * and/or sell copies of the Software, and to permit persons to whom the 3605b261ecSmrg * Software is furnished to do so, subject to the following conditions: 3705b261ecSmrg * 3805b261ecSmrg * The above copyright notice and this permission notice shall be included in 3905b261ecSmrg * all copies or substantial portions of the Software. 4005b261ecSmrg * 4105b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 4205b261ecSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 4305b261ecSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 4405b261ecSmrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 4505b261ecSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 4605b261ecSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4705b261ecSmrg * OTHER DEALINGS IN THE SOFTWARE. 4805b261ecSmrg * 4905b261ecSmrg * Except as contained in this notice, the name of the copyright holder(s) 5005b261ecSmrg * and author(s) shall not be used in advertising or otherwise to promote 5105b261ecSmrg * the sale, use or other dealings in this Software without prior written 5205b261ecSmrg * authorization from the copyright holder(s) and author(s). 5305b261ecSmrg */ 5405b261ecSmrg 55f7df2e56Smrg/* 5605b261ecSmrg * This file contains the external interfaces for the XFree86 configuration 5705b261ecSmrg * file parser. 5805b261ecSmrg */ 5905b261ecSmrg#ifdef HAVE_XORG_CONFIG_H 6005b261ecSmrg#include <xorg-config.h> 6105b261ecSmrg#endif 6205b261ecSmrg 6305b261ecSmrg#ifndef _xf86Parser_h_ 6405b261ecSmrg#define _xf86Parser_h_ 6505b261ecSmrg 666747b715Smrg#include <X11/Xdefs.h> 6705b261ecSmrg#include "xf86Optrec.h" 686747b715Smrg#include "list.h" 6905b261ecSmrg 7005b261ecSmrg#define HAVE_PARSER_DECLS 7105b261ecSmrg 72f7df2e56Smrgtypedef struct { 73f7df2e56Smrg char *file_logfile; 74f7df2e56Smrg char *file_modulepath; 75f7df2e56Smrg char *file_fontpath; 76f7df2e56Smrg char *file_comment; 77f7df2e56Smrg char *file_xkbdir; 78f7df2e56Smrg} XF86ConfFilesRec, *XF86ConfFilesPtr; 7905b261ecSmrg 8005b261ecSmrg/* Values for load_type */ 8105b261ecSmrg#define XF86_LOAD_MODULE 0 8205b261ecSmrg#define XF86_LOAD_DRIVER 1 8305b261ecSmrg#define XF86_DISABLE_MODULE 2 8405b261ecSmrg 85f7df2e56Smrgtypedef struct { 86f7df2e56Smrg GenericListRec list; 87f7df2e56Smrg int load_type; 88f7df2e56Smrg const char *load_name; 89f7df2e56Smrg XF86OptionPtr load_opt; 90f7df2e56Smrg char *load_comment; 91f7df2e56Smrg int ignore; 92f7df2e56Smrg} XF86LoadRec, *XF86LoadPtr; 93f7df2e56Smrg 94f7df2e56Smrgtypedef struct { 95f7df2e56Smrg XF86LoadPtr mod_load_lst; 9605b261ecSmrg XF86LoadPtr mod_disable_lst; 97f7df2e56Smrg char *mod_comment; 98f7df2e56Smrg} XF86ConfModuleRec, *XF86ConfModulePtr; 9905b261ecSmrg 10005b261ecSmrg#define CONF_IMPLICIT_KEYBOARD "Implicit Core Keyboard" 10105b261ecSmrg 10205b261ecSmrg#define CONF_IMPLICIT_POINTER "Implicit Core Pointer" 10305b261ecSmrg 10405b261ecSmrg#define XF86CONF_PHSYNC 0x0001 10505b261ecSmrg#define XF86CONF_NHSYNC 0x0002 10605b261ecSmrg#define XF86CONF_PVSYNC 0x0004 10705b261ecSmrg#define XF86CONF_NVSYNC 0x0008 10805b261ecSmrg#define XF86CONF_INTERLACE 0x0010 10905b261ecSmrg#define XF86CONF_DBLSCAN 0x0020 11005b261ecSmrg#define XF86CONF_CSYNC 0x0040 11105b261ecSmrg#define XF86CONF_PCSYNC 0x0080 11205b261ecSmrg#define XF86CONF_NCSYNC 0x0100 113f7df2e56Smrg#define XF86CONF_HSKEW 0x0200 /* hskew provided */ 11405b261ecSmrg#define XF86CONF_BCAST 0x0400 11505b261ecSmrg#define XF86CONF_VSCAN 0x1000 11605b261ecSmrg 117f7df2e56Smrgtypedef struct { 118f7df2e56Smrg GenericListRec list; 119f7df2e56Smrg const char *ml_identifier; 120f7df2e56Smrg int ml_clock; 121f7df2e56Smrg int ml_hdisplay; 122f7df2e56Smrg int ml_hsyncstart; 123f7df2e56Smrg int ml_hsyncend; 124f7df2e56Smrg int ml_htotal; 125f7df2e56Smrg int ml_vdisplay; 126f7df2e56Smrg int ml_vsyncstart; 127f7df2e56Smrg int ml_vsyncend; 128f7df2e56Smrg int ml_vtotal; 129f7df2e56Smrg int ml_vscan; 130f7df2e56Smrg int ml_flags; 131f7df2e56Smrg int ml_hskew; 132f7df2e56Smrg char *ml_comment; 133f7df2e56Smrg} XF86ConfModeLineRec, *XF86ConfModeLinePtr; 134f7df2e56Smrg 135f7df2e56Smrgtypedef struct { 136f7df2e56Smrg GenericListRec list; 137f7df2e56Smrg const char *vp_identifier; 138f7df2e56Smrg XF86OptionPtr vp_option_lst; 139f7df2e56Smrg char *vp_comment; 140f7df2e56Smrg} XF86ConfVideoPortRec, *XF86ConfVideoPortPtr; 141f7df2e56Smrg 142f7df2e56Smrgtypedef struct { 143f7df2e56Smrg GenericListRec list; 144f7df2e56Smrg const char *va_identifier; 145f7df2e56Smrg const char *va_vendor; 146f7df2e56Smrg const char *va_board; 147f7df2e56Smrg const char *va_busid; 148f7df2e56Smrg const char *va_driver; 149f7df2e56Smrg XF86OptionPtr va_option_lst; 150f7df2e56Smrg XF86ConfVideoPortPtr va_port_lst; 151f7df2e56Smrg const char *va_fwdref; 152f7df2e56Smrg char *va_comment; 153f7df2e56Smrg} XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr; 15405b261ecSmrg 15505b261ecSmrg#define CONF_MAX_HSYNC 8 15605b261ecSmrg#define CONF_MAX_VREFRESH 8 15705b261ecSmrg 158f7df2e56Smrgtypedef struct { 159f7df2e56Smrg float hi, lo; 160f7df2e56Smrg} parser_range; 161f7df2e56Smrg 162f7df2e56Smrgtypedef struct { 163f7df2e56Smrg int red, green, blue; 164f7df2e56Smrg} parser_rgb; 165f7df2e56Smrg 166f7df2e56Smrgtypedef struct { 167f7df2e56Smrg GenericListRec list; 168f7df2e56Smrg const char *modes_identifier; 169f7df2e56Smrg XF86ConfModeLinePtr mon_modeline_lst; 170f7df2e56Smrg char *modes_comment; 171f7df2e56Smrg} XF86ConfModesRec, *XF86ConfModesPtr; 172f7df2e56Smrg 173f7df2e56Smrgtypedef struct { 174f7df2e56Smrg GenericListRec list; 175f7df2e56Smrg const char *ml_modes_str; 176f7df2e56Smrg XF86ConfModesPtr ml_modes; 177f7df2e56Smrg} XF86ConfModesLinkRec, *XF86ConfModesLinkPtr; 178f7df2e56Smrg 179f7df2e56Smrgtypedef struct { 180f7df2e56Smrg GenericListRec list; 181f7df2e56Smrg const char *mon_identifier; 182f7df2e56Smrg const char *mon_vendor; 183f7df2e56Smrg char *mon_modelname; 184f7df2e56Smrg int mon_width; /* in mm */ 185f7df2e56Smrg int mon_height; /* in mm */ 186f7df2e56Smrg XF86ConfModeLinePtr mon_modeline_lst; 187f7df2e56Smrg int mon_n_hsync; 188f7df2e56Smrg parser_range mon_hsync[CONF_MAX_HSYNC]; 189f7df2e56Smrg int mon_n_vrefresh; 190f7df2e56Smrg parser_range mon_vrefresh[CONF_MAX_VREFRESH]; 191f7df2e56Smrg float mon_gamma_red; 192f7df2e56Smrg float mon_gamma_green; 193f7df2e56Smrg float mon_gamma_blue; 194f7df2e56Smrg XF86OptionPtr mon_option_lst; 195f7df2e56Smrg XF86ConfModesLinkPtr mon_modes_sect_lst; 196f7df2e56Smrg char *mon_comment; 197f7df2e56Smrg} XF86ConfMonitorRec, *XF86ConfMonitorPtr; 19805b261ecSmrg 19905b261ecSmrg#define CONF_MAXDACSPEEDS 4 20005b261ecSmrg#define CONF_MAXCLOCKS 128 20105b261ecSmrg 202f7df2e56Smrgtypedef struct { 203f7df2e56Smrg GenericListRec list; 204f7df2e56Smrg const char *dev_identifier; 205f7df2e56Smrg const char *dev_vendor; 206f7df2e56Smrg const char *dev_board; 207f7df2e56Smrg const char *dev_chipset; 208f7df2e56Smrg const char *dev_busid; 209f7df2e56Smrg const char *dev_card; 210f7df2e56Smrg const char *dev_driver; 211f7df2e56Smrg const char *dev_ramdac; 212f7df2e56Smrg int dev_dacSpeeds[CONF_MAXDACSPEEDS]; 213f7df2e56Smrg int dev_videoram; 214f7df2e56Smrg unsigned long dev_mem_base; 215f7df2e56Smrg unsigned long dev_io_base; 216f7df2e56Smrg const char *dev_clockchip; 217f7df2e56Smrg int dev_clocks; 218f7df2e56Smrg int dev_clock[CONF_MAXCLOCKS]; 219f7df2e56Smrg int dev_chipid; 220f7df2e56Smrg int dev_chiprev; 221f7df2e56Smrg int dev_irq; 222f7df2e56Smrg int dev_screen; 223f7df2e56Smrg XF86OptionPtr dev_option_lst; 224f7df2e56Smrg char *dev_comment; 225f7df2e56Smrg char *match_seat; 226f7df2e56Smrg} XF86ConfDeviceRec, *XF86ConfDevicePtr; 227f7df2e56Smrg 228f7df2e56Smrgtypedef struct { 229f7df2e56Smrg GenericListRec list; 230f7df2e56Smrg const char *mode_name; 231f7df2e56Smrg} XF86ModeRec, *XF86ModePtr; 232f7df2e56Smrg 233f7df2e56Smrgtypedef struct { 234f7df2e56Smrg GenericListRec list; 235f7df2e56Smrg int disp_frameX0; 236f7df2e56Smrg int disp_frameY0; 237f7df2e56Smrg int disp_virtualX; 238f7df2e56Smrg int disp_virtualY; 239f7df2e56Smrg int disp_depth; 240f7df2e56Smrg int disp_bpp; 241f7df2e56Smrg const char *disp_visual; 242f7df2e56Smrg parser_rgb disp_weight; 243f7df2e56Smrg parser_rgb disp_black; 244f7df2e56Smrg parser_rgb disp_white; 245f7df2e56Smrg XF86ModePtr disp_mode_lst; 246f7df2e56Smrg XF86OptionPtr disp_option_lst; 247f7df2e56Smrg char *disp_comment; 248f7df2e56Smrg} XF86ConfDisplayRec, *XF86ConfDisplayPtr; 249f7df2e56Smrg 250f7df2e56Smrgtypedef struct { 251f7df2e56Smrg XF86OptionPtr flg_option_lst; 252f7df2e56Smrg char *flg_comment; 253f7df2e56Smrg} XF86ConfFlagsRec, *XF86ConfFlagsPtr; 254f7df2e56Smrg 255f7df2e56Smrgtypedef struct { 256f7df2e56Smrg GenericListRec list; 257f7df2e56Smrg const char *al_adaptor_str; 258f7df2e56Smrg XF86ConfVideoAdaptorPtr al_adaptor; 259f7df2e56Smrg} XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr; 260f7df2e56Smrg 261f7df2e56Smrg#define CONF_MAXGPUDEVICES 4 262f7df2e56Smrgtypedef struct { 263f7df2e56Smrg GenericListRec list; 264f7df2e56Smrg const char *scrn_identifier; 265f7df2e56Smrg const char *scrn_obso_driver; 266f7df2e56Smrg int scrn_defaultdepth; 267f7df2e56Smrg int scrn_defaultbpp; 268f7df2e56Smrg int scrn_defaultfbbpp; 269f7df2e56Smrg const char *scrn_monitor_str; 270f7df2e56Smrg XF86ConfMonitorPtr scrn_monitor; 271f7df2e56Smrg const char *scrn_device_str; 272f7df2e56Smrg XF86ConfDevicePtr scrn_device; 273f7df2e56Smrg XF86ConfAdaptorLinkPtr scrn_adaptor_lst; 274f7df2e56Smrg XF86ConfDisplayPtr scrn_display_lst; 275f7df2e56Smrg XF86OptionPtr scrn_option_lst; 276f7df2e56Smrg char *scrn_comment; 277f7df2e56Smrg int scrn_virtualX, scrn_virtualY; 278f7df2e56Smrg char *match_seat; 279f7df2e56Smrg 280f7df2e56Smrg int num_gpu_devices; 281f7df2e56Smrg const char *scrn_gpu_device_str[CONF_MAXGPUDEVICES]; 282f7df2e56Smrg XF86ConfDevicePtr scrn_gpu_devices[CONF_MAXGPUDEVICES]; 283f7df2e56Smrg} XF86ConfScreenRec, *XF86ConfScreenPtr; 284f7df2e56Smrg 285f7df2e56Smrgtypedef struct { 286f7df2e56Smrg GenericListRec list; 287f7df2e56Smrg char *inp_identifier; 288f7df2e56Smrg char *inp_driver; 289f7df2e56Smrg XF86OptionPtr inp_option_lst; 290f7df2e56Smrg char *inp_comment; 291f7df2e56Smrg} XF86ConfInputRec, *XF86ConfInputPtr; 292f7df2e56Smrg 293f7df2e56Smrgtypedef struct { 294f7df2e56Smrg GenericListRec list; 295f7df2e56Smrg XF86ConfInputPtr iref_inputdev; 296f7df2e56Smrg char *iref_inputdev_str; 297f7df2e56Smrg XF86OptionPtr iref_option_lst; 298f7df2e56Smrg} XF86ConfInputrefRec, *XF86ConfInputrefPtr; 299f7df2e56Smrg 300f7df2e56Smrgtypedef struct { 301f7df2e56Smrg Bool set; 302f7df2e56Smrg Bool val; 303f7df2e56Smrg} xf86TriState; 304f7df2e56Smrg 305f7df2e56Smrgtypedef struct { 306f7df2e56Smrg struct xorg_list entry; 307f7df2e56Smrg char **values; 3087e31ba66Smrg Bool is_negated; 309f7df2e56Smrg} xf86MatchGroup; 310f7df2e56Smrg 311f7df2e56Smrgtypedef struct { 312f7df2e56Smrg GenericListRec list; 313f7df2e56Smrg char *identifier; 314f7df2e56Smrg char *driver; 315f7df2e56Smrg struct xorg_list match_product; 316f7df2e56Smrg struct xorg_list match_vendor; 317f7df2e56Smrg struct xorg_list match_device; 318f7df2e56Smrg struct xorg_list match_os; 319f7df2e56Smrg struct xorg_list match_pnpid; 320f7df2e56Smrg struct xorg_list match_usbid; 321f7df2e56Smrg struct xorg_list match_driver; 322f7df2e56Smrg struct xorg_list match_tag; 323f7df2e56Smrg struct xorg_list match_layout; 324f7df2e56Smrg xf86TriState is_keyboard; 325f7df2e56Smrg xf86TriState is_pointer; 326f7df2e56Smrg xf86TriState is_joystick; 327f7df2e56Smrg xf86TriState is_tablet; 3287e31ba66Smrg xf86TriState is_tablet_pad; 329f7df2e56Smrg xf86TriState is_touchpad; 330f7df2e56Smrg xf86TriState is_touchscreen; 331f7df2e56Smrg XF86OptionPtr option_lst; 332f7df2e56Smrg char *comment; 333f7df2e56Smrg} XF86ConfInputClassRec, *XF86ConfInputClassPtr; 334f7df2e56Smrg 335f7df2e56Smrgtypedef struct { 336f7df2e56Smrg GenericListRec list; 337f7df2e56Smrg char *identifier; 338f7df2e56Smrg char *driver; 3397e31ba66Smrg char *modulepath; 340f7df2e56Smrg struct xorg_list match_driver; 3417e31ba66Smrg XF86OptionPtr option_lst; 342f7df2e56Smrg char *comment; 343f7df2e56Smrg} XF86ConfOutputClassRec, *XF86ConfOutputClassPtr; 3446747b715Smrg 34505b261ecSmrg/* Values for adj_where */ 34605b261ecSmrg#define CONF_ADJ_OBSOLETE -1 34705b261ecSmrg#define CONF_ADJ_ABSOLUTE 0 34805b261ecSmrg#define CONF_ADJ_RIGHTOF 1 34905b261ecSmrg#define CONF_ADJ_LEFTOF 2 35005b261ecSmrg#define CONF_ADJ_ABOVE 3 35105b261ecSmrg#define CONF_ADJ_BELOW 4 35205b261ecSmrg#define CONF_ADJ_RELATIVE 5 35305b261ecSmrg 354f7df2e56Smrgtypedef struct { 355f7df2e56Smrg GenericListRec list; 356f7df2e56Smrg int adj_scrnum; 357f7df2e56Smrg XF86ConfScreenPtr adj_screen; 358f7df2e56Smrg const char *adj_screen_str; 359f7df2e56Smrg XF86ConfScreenPtr adj_top; 360f7df2e56Smrg const char *adj_top_str; 361f7df2e56Smrg XF86ConfScreenPtr adj_bottom; 362f7df2e56Smrg const char *adj_bottom_str; 363f7df2e56Smrg XF86ConfScreenPtr adj_left; 364f7df2e56Smrg const char *adj_left_str; 365f7df2e56Smrg XF86ConfScreenPtr adj_right; 366f7df2e56Smrg const char *adj_right_str; 367f7df2e56Smrg int adj_where; 368f7df2e56Smrg int adj_x; 369f7df2e56Smrg int adj_y; 370f7df2e56Smrg const char *adj_refscreen; 371f7df2e56Smrg} XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr; 372f7df2e56Smrg 373f7df2e56Smrgtypedef struct { 374f7df2e56Smrg GenericListRec list; 375f7df2e56Smrg const char *inactive_device_str; 376f7df2e56Smrg XF86ConfDevicePtr inactive_device; 377f7df2e56Smrg} XF86ConfInactiveRec, *XF86ConfInactivePtr; 378f7df2e56Smrg 379f7df2e56Smrgtypedef struct { 380f7df2e56Smrg GenericListRec list; 381f7df2e56Smrg const char *lay_identifier; 382f7df2e56Smrg XF86ConfAdjacencyPtr lay_adjacency_lst; 383f7df2e56Smrg XF86ConfInactivePtr lay_inactive_lst; 384f7df2e56Smrg XF86ConfInputrefPtr lay_input_lst; 385f7df2e56Smrg XF86OptionPtr lay_option_lst; 386f7df2e56Smrg char *match_seat; 387f7df2e56Smrg char *lay_comment; 388f7df2e56Smrg} XF86ConfLayoutRec, *XF86ConfLayoutPtr; 389f7df2e56Smrg 390f7df2e56Smrgtypedef struct { 391f7df2e56Smrg GenericListRec list; 392f7df2e56Smrg const char *vs_name; 393f7df2e56Smrg const char *vs_identifier; 394f7df2e56Smrg XF86OptionPtr vs_option_lst; 395f7df2e56Smrg char *vs_comment; 396f7df2e56Smrg} XF86ConfVendSubRec, *XF86ConfVendSubPtr; 397f7df2e56Smrg 398f7df2e56Smrgtypedef struct { 399f7df2e56Smrg GenericListRec list; 400f7df2e56Smrg const char *vnd_identifier; 401f7df2e56Smrg XF86OptionPtr vnd_option_lst; 402f7df2e56Smrg XF86ConfVendSubPtr vnd_sub_lst; 403f7df2e56Smrg char *vnd_comment; 404f7df2e56Smrg} XF86ConfVendorRec, *XF86ConfVendorPtr; 405f7df2e56Smrg 406f7df2e56Smrgtypedef struct { 407f7df2e56Smrg const char *dri_group_name; 408f7df2e56Smrg int dri_group; 409f7df2e56Smrg int dri_mode; 410f7df2e56Smrg char *dri_comment; 411f7df2e56Smrg} XF86ConfDRIRec, *XF86ConfDRIPtr; 412f7df2e56Smrg 413f7df2e56Smrgtypedef struct { 414f7df2e56Smrg XF86OptionPtr ext_option_lst; 415f7df2e56Smrg char *extensions_comment; 416f7df2e56Smrg} XF86ConfExtensionsRec, *XF86ConfExtensionsPtr; 417f7df2e56Smrg 418f7df2e56Smrgtypedef struct { 419f7df2e56Smrg XF86ConfFilesPtr conf_files; 420f7df2e56Smrg XF86ConfModulePtr conf_modules; 421f7df2e56Smrg XF86ConfFlagsPtr conf_flags; 422f7df2e56Smrg XF86ConfVideoAdaptorPtr conf_videoadaptor_lst; 423f7df2e56Smrg XF86ConfModesPtr conf_modes_lst; 424f7df2e56Smrg XF86ConfMonitorPtr conf_monitor_lst; 425f7df2e56Smrg XF86ConfDevicePtr conf_device_lst; 426f7df2e56Smrg XF86ConfScreenPtr conf_screen_lst; 427f7df2e56Smrg XF86ConfInputPtr conf_input_lst; 428f7df2e56Smrg XF86ConfInputClassPtr conf_inputclass_lst; 429f7df2e56Smrg XF86ConfOutputClassPtr conf_outputclass_lst; 430f7df2e56Smrg XF86ConfLayoutPtr conf_layout_lst; 431f7df2e56Smrg XF86ConfVendorPtr conf_vendor_lst; 432f7df2e56Smrg XF86ConfDRIPtr conf_dri; 433f7df2e56Smrg XF86ConfExtensionsPtr conf_extensions; 434f7df2e56Smrg char *conf_comment; 435f7df2e56Smrg} XF86ConfigRec, *XF86ConfigPtr; 436f7df2e56Smrg 437f7df2e56Smrgtypedef struct { 438f7df2e56Smrg int token; /* id of the token */ 439f7df2e56Smrg const char *name; /* pointer to the LOWERCASED name */ 440f7df2e56Smrg} xf86ConfigSymTabRec, *xf86ConfigSymTabPtr; 44105b261ecSmrg 44205b261ecSmrg/* 44305b261ecSmrg * prototypes for public functions 44405b261ecSmrg */ 4456747b715Smrgextern void xf86initConfigFiles(void); 446f7df2e56Smrgextern char *xf86openConfigFile(const char *path, const char *cmdline, 447f7df2e56Smrg const char *projroot); 448f7df2e56Smrgextern char *xf86openConfigDirFiles(const char *path, const char *cmdline, 449f7df2e56Smrg const char *projroot); 45005b261ecSmrgextern void xf86setBuiltinConfig(const char *config[]); 4516747b715Smrgextern XF86ConfigPtr xf86readConfigFile(void); 4526747b715Smrgextern void xf86closeConfigFile(void); 4537e31ba66Smrgextern XF86ConfigPtr xf86allocateConfig(void); 4546747b715Smrgextern void xf86freeConfig(XF86ConfigPtr p); 4556747b715Smrgextern int xf86writeConfigFile(const char *, XF86ConfigPtr); 456f7df2e56Smrgextern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident, 457f7df2e56Smrg XF86ConfDevicePtr p); 458f7df2e56Smrgextern _X_EXPORT XF86ConfDevicePtr xf86findDeviceByDriver(const char *driver, 459f7df2e56Smrg XF86ConfDevicePtr p); 460f7df2e56Smrgextern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name, 461f7df2e56Smrg XF86ConfLayoutPtr list); 462f7df2e56Smrgextern _X_EXPORT XF86ConfMonitorPtr xf86findMonitor(const char *ident, 463f7df2e56Smrg XF86ConfMonitorPtr p); 464f7df2e56Smrgextern _X_EXPORT XF86ConfModesPtr xf86findModes(const char *ident, 465f7df2e56Smrg XF86ConfModesPtr p); 466f7df2e56Smrgextern _X_EXPORT XF86ConfModeLinePtr xf86findModeLine(const char *ident, 467f7df2e56Smrg XF86ConfModeLinePtr p); 468f7df2e56Smrgextern _X_EXPORT XF86ConfScreenPtr xf86findScreen(const char *ident, 469f7df2e56Smrg XF86ConfScreenPtr p); 470f7df2e56Smrgextern _X_EXPORT XF86ConfInputPtr xf86findInput(const char *ident, 471f7df2e56Smrg XF86ConfInputPtr p); 472f7df2e56Smrgextern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver, 473f7df2e56Smrg XF86ConfInputPtr p); 4746747b715Smrgextern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, 475f7df2e56Smrg XF86ConfVideoAdaptorPtr 476f7df2e56Smrg p); 477f7df2e56Smrgextern int xf86layoutAddInputDevices(XF86ConfigPtr config, 478f7df2e56Smrg XF86ConfLayoutPtr layout); 47905b261ecSmrg 480f7df2e56Smrgextern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head, 481f7df2e56Smrg GenericListPtr c_new); 482f7df2e56Smrgextern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, 483f7df2e56Smrg GenericListPtr list_2); 48405b261ecSmrg 4856747b715Smrgextern _X_EXPORT int xf86pathIsAbsolute(const char *path); 4866747b715Smrgextern _X_EXPORT int xf86pathIsSafe(const char *path); 487f7df2e56Smrgextern _X_EXPORT char *xf86addComment(char *cur, const char *add); 4886747b715Smrgextern _X_EXPORT Bool xf86getBoolValue(Bool *val, const char *str); 48905b261ecSmrg 490f7df2e56Smrg#endif /* _xf86Parser_h_ */ 491