VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/xf86Parser.h

Last change on this file was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 11.9 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Parser.h,v 1.33 2003/10/08 14:58:30 dawes Exp $ */
2/*
3 *
4 * Copyright (c) 1997 Metro Link Incorporated
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
21 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 *
24 * Except as contained in this notice, the name of the Metro Link shall not be
25 * used in advertising or otherwise to promote the sale, use or other dealings
26 * in this Software without prior written authorization from Metro Link.
27 *
28 */
29/*
30 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
31 *
32 * Permission is hereby granted, free of charge, to any person obtaining a
33 * copy of this software and associated documentation files (the "Software"),
34 * to deal in the Software without restriction, including without limitation
35 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
36 * and/or sell copies of the Software, and to permit persons to whom the
37 * Software is furnished to do so, subject to the following conditions:
38 *
39 * The above copyright notice and this permission notice shall be included in
40 * all copies or substantial portions of the Software.
41 *
42 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
45 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
46 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
47 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
48 * OTHER DEALINGS IN THE SOFTWARE.
49 *
50 * Except as contained in this notice, the name of the copyright holder(s)
51 * and author(s) shall not be used in advertising or otherwise to promote
52 * the sale, use or other dealings in this Software without prior written
53 * authorization from the copyright holder(s) and author(s).
54 */
55
56
57/*
58 * This file contains the external interfaces for the XFree86 configuration
59 * file parser.
60 */
61#ifdef HAVE_XORG_CONFIG_H
62#include <xorg-config.h>
63#endif
64
65#ifndef _xf86Parser_h_
66#define _xf86Parser_h_
67
68#include "xf86Optrec.h"
69
70#define HAVE_PARSER_DECLS
71
72typedef struct
73{
74 char *file_logfile;
75 char *file_rgbpath;
76 char *file_modulepath;
77 char *file_inputdevs;
78 char *file_fontpath;
79 char *file_comment;
80}
81XF86ConfFilesRec, *XF86ConfFilesPtr;
82
83/* Values for load_type */
84#define XF86_LOAD_MODULE 0
85#define XF86_LOAD_DRIVER 1
86
87typedef struct
88{
89 GenericListRec list;
90 int load_type;
91 char *load_name;
92 XF86OptionPtr load_opt;
93 char *load_comment;
94}
95XF86LoadRec, *XF86LoadPtr;
96
97typedef struct
98{
99 XF86LoadPtr mod_load_lst;
100 char *mod_comment;
101}
102XF86ConfModuleRec, *XF86ConfModulePtr;
103
104#define CONF_IMPLICIT_KEYBOARD "Implicit Core Keyboard"
105
106#define CONF_IMPLICIT_POINTER "Implicit Core Pointer"
107
108#define XF86CONF_PHSYNC 0x0001
109#define XF86CONF_NHSYNC 0x0002
110#define XF86CONF_PVSYNC 0x0004
111#define XF86CONF_NVSYNC 0x0008
112#define XF86CONF_INTERLACE 0x0010
113#define XF86CONF_DBLSCAN 0x0020
114#define XF86CONF_CSYNC 0x0040
115#define XF86CONF_PCSYNC 0x0080
116#define XF86CONF_NCSYNC 0x0100
117#define XF86CONF_HSKEW 0x0200 /* hskew provided */
118#define XF86CONF_BCAST 0x0400
119#define XF86CONF_CUSTOM 0x0800 /* timing numbers customized by editor */
120#define XF86CONF_VSCAN 0x1000
121
122typedef struct
123{
124 GenericListRec list;
125 char *ml_identifier;
126 int ml_clock;
127 int ml_hdisplay;
128 int ml_hsyncstart;
129 int ml_hsyncend;
130 int ml_htotal;
131 int ml_vdisplay;
132 int ml_vsyncstart;
133 int ml_vsyncend;
134 int ml_vtotal;
135 int ml_vscan;
136 int ml_flags;
137 int ml_hskew;
138 char *ml_comment;
139}
140XF86ConfModeLineRec, *XF86ConfModeLinePtr;
141
142typedef struct
143{
144 GenericListRec list;
145 char *vp_identifier;
146 XF86OptionPtr vp_option_lst;
147 char *vp_comment;
148}
149XF86ConfVideoPortRec, *XF86ConfVideoPortPtr;
150
151typedef struct
152{
153 GenericListRec list;
154 char *va_identifier;
155 char *va_vendor;
156 char *va_board;
157 char *va_busid;
158 char *va_driver;
159 XF86OptionPtr va_option_lst;
160 XF86ConfVideoPortPtr va_port_lst;
161 char *va_fwdref;
162 char *va_comment;
163}
164XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr;
165
166#define CONF_MAX_HSYNC 8
167#define CONF_MAX_VREFRESH 8
168
169typedef struct
170{
171 float hi, lo;
172}
173parser_range;
174
175typedef struct
176{
177 int red, green, blue;
178}
179parser_rgb;
180
181typedef struct
182{
183 GenericListRec list;
184 char *modes_identifier;
185 XF86ConfModeLinePtr mon_modeline_lst;
186 char *modes_comment;
187}
188XF86ConfModesRec, *XF86ConfModesPtr;
189
190typedef struct
191{
192 GenericListRec list;
193 char *ml_modes_str;
194 XF86ConfModesPtr ml_modes;
195}
196XF86ConfModesLinkRec, *XF86ConfModesLinkPtr;
197
198typedef struct
199{
200 GenericListRec list;
201 char *mon_identifier;
202 char *mon_vendor;
203 char *mon_modelname;
204 int mon_width; /* in mm */
205 int mon_height; /* in mm */
206 XF86ConfModeLinePtr mon_modeline_lst;
207 int mon_n_hsync;
208 parser_range mon_hsync[CONF_MAX_HSYNC];
209 int mon_n_vrefresh;
210 parser_range mon_vrefresh[CONF_MAX_VREFRESH];
211 float mon_gamma_red;
212 float mon_gamma_green;
213 float mon_gamma_blue;
214 XF86OptionPtr mon_option_lst;
215 XF86ConfModesLinkPtr mon_modes_sect_lst;
216 char *mon_comment;
217}
218XF86ConfMonitorRec, *XF86ConfMonitorPtr;
219
220#define CONF_MAXDACSPEEDS 4
221#define CONF_MAXCLOCKS 128
222
223typedef struct
224{
225 GenericListRec list;
226 char *dev_identifier;
227 char *dev_vendor;
228 char *dev_board;
229 char *dev_chipset;
230 char *dev_busid;
231 char *dev_card;
232 char *dev_driver;
233 char *dev_ramdac;
234 int dev_dacSpeeds[CONF_MAXDACSPEEDS];
235 int dev_videoram;
236 int dev_textclockfreq;
237 unsigned long dev_bios_base;
238 unsigned long dev_mem_base;
239 unsigned long dev_io_base;
240 char *dev_clockchip;
241 int dev_clocks;
242 int dev_clock[CONF_MAXCLOCKS];
243 int dev_chipid;
244 int dev_chiprev;
245 int dev_irq;
246 int dev_screen;
247 XF86OptionPtr dev_option_lst;
248 char *dev_comment;
249}
250XF86ConfDeviceRec, *XF86ConfDevicePtr;
251
252typedef struct
253{
254 GenericListRec list;
255 char *mode_name;
256}
257XF86ModeRec, *XF86ModePtr;
258
259typedef struct
260{
261 GenericListRec list;
262 int disp_frameX0;
263 int disp_frameY0;
264 int disp_virtualX;
265 int disp_virtualY;
266 int disp_depth;
267 int disp_bpp;
268 char *disp_visual;
269 parser_rgb disp_weight;
270 parser_rgb disp_black;
271 parser_rgb disp_white;
272 XF86ModePtr disp_mode_lst;
273 XF86OptionPtr disp_option_lst;
274 char *disp_comment;
275}
276XF86ConfDisplayRec, *XF86ConfDisplayPtr;
277
278typedef struct
279{
280 XF86OptionPtr flg_option_lst;
281 char *flg_comment;
282}
283XF86ConfFlagsRec, *XF86ConfFlagsPtr;
284
285typedef struct
286{
287 GenericListRec list;
288 char *al_adaptor_str;
289 XF86ConfVideoAdaptorPtr al_adaptor;
290}
291XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr;
292
293typedef struct
294{
295 GenericListRec list;
296 char *scrn_identifier;
297 char *scrn_obso_driver;
298 int scrn_defaultdepth;
299 int scrn_defaultbpp;
300 int scrn_defaultfbbpp;
301 char *scrn_monitor_str;
302 XF86ConfMonitorPtr scrn_monitor;
303 char *scrn_device_str;
304 XF86ConfDevicePtr scrn_device;
305 XF86ConfAdaptorLinkPtr scrn_adaptor_lst;
306 XF86ConfDisplayPtr scrn_display_lst;
307 XF86OptionPtr scrn_option_lst;
308 char *scrn_comment;
309}
310XF86ConfScreenRec, *XF86ConfScreenPtr;
311
312typedef struct
313{
314 GenericListRec list;
315 char *inp_identifier;
316 char *inp_driver;
317 XF86OptionPtr inp_option_lst;
318 char *inp_comment;
319}
320XF86ConfInputRec, *XF86ConfInputPtr;
321
322typedef struct
323{
324 GenericListRec list;
325 XF86ConfInputPtr iref_inputdev;
326 char *iref_inputdev_str;
327 XF86OptionPtr iref_option_lst;
328}
329XF86ConfInputrefRec, *XF86ConfInputrefPtr;
330
331/* Values for adj_where */
332#define CONF_ADJ_OBSOLETE -1
333#define CONF_ADJ_ABSOLUTE 0
334#define CONF_ADJ_RIGHTOF 1
335#define CONF_ADJ_LEFTOF 2
336#define CONF_ADJ_ABOVE 3
337#define CONF_ADJ_BELOW 4
338#define CONF_ADJ_RELATIVE 5
339
340typedef struct
341{
342 GenericListRec list;
343 int adj_scrnum;
344 XF86ConfScreenPtr adj_screen;
345 char *adj_screen_str;
346 XF86ConfScreenPtr adj_top;
347 char *adj_top_str;
348 XF86ConfScreenPtr adj_bottom;
349 char *adj_bottom_str;
350 XF86ConfScreenPtr adj_left;
351 char *adj_left_str;
352 XF86ConfScreenPtr adj_right;
353 char *adj_right_str;
354 int adj_where;
355 int adj_x;
356 int adj_y;
357 char *adj_refscreen;
358}
359XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr;
360
361typedef struct
362{
363 GenericListRec list;
364 char *inactive_device_str;
365 XF86ConfDevicePtr inactive_device;
366}
367XF86ConfInactiveRec, *XF86ConfInactivePtr;
368
369typedef struct
370{
371 GenericListRec list;
372 char *lay_identifier;
373 XF86ConfAdjacencyPtr lay_adjacency_lst;
374 XF86ConfInactivePtr lay_inactive_lst;
375 XF86ConfInputrefPtr lay_input_lst;
376 XF86OptionPtr lay_option_lst;
377 char *lay_comment;
378}
379XF86ConfLayoutRec, *XF86ConfLayoutPtr;
380
381typedef struct
382{
383 GenericListRec list;
384 char *vs_name;
385 char *vs_identifier;
386 XF86OptionPtr vs_option_lst;
387 char *vs_comment;
388}
389XF86ConfVendSubRec, *XF86ConfVendSubPtr;
390
391typedef struct
392{
393 GenericListRec list;
394 char *vnd_identifier;
395 XF86OptionPtr vnd_option_lst;
396 XF86ConfVendSubPtr vnd_sub_lst;
397 char *vnd_comment;
398}
399XF86ConfVendorRec, *XF86ConfVendorPtr;
400
401typedef struct
402{
403 GenericListRec list;
404 int buf_count;
405 int buf_size;
406 char *buf_flags;
407 char *buf_comment;
408}
409XF86ConfBuffersRec, *XF86ConfBuffersPtr;
410
411typedef struct
412{
413 char *dri_group_name;
414 int dri_group;
415 int dri_mode;
416 XF86ConfBuffersPtr dri_buffers_lst;
417 char *dri_comment;
418}
419XF86ConfDRIRec, *XF86ConfDRIPtr;
420
421typedef struct
422{
423 XF86OptionPtr ext_option_lst;
424 char *extensions_comment;
425}
426XF86ConfExtensionsRec, *XF86ConfExtensionsPtr;
427
428typedef struct
429{
430 XF86ConfFilesPtr conf_files;
431 XF86ConfModulePtr conf_modules;
432 XF86ConfFlagsPtr conf_flags;
433 XF86ConfVideoAdaptorPtr conf_videoadaptor_lst;
434 XF86ConfModesPtr conf_modes_lst;
435 XF86ConfMonitorPtr conf_monitor_lst;
436 XF86ConfDevicePtr conf_device_lst;
437 XF86ConfScreenPtr conf_screen_lst;
438 XF86ConfInputPtr conf_input_lst;
439 XF86ConfLayoutPtr conf_layout_lst;
440 XF86ConfVendorPtr conf_vendor_lst;
441 XF86ConfDRIPtr conf_dri;
442 XF86ConfExtensionsPtr conf_extensions;
443 char *conf_comment;
444}
445XF86ConfigRec, *XF86ConfigPtr;
446
447typedef struct
448{
449 int token; /* id of the token */
450 char *name; /* pointer to the LOWERCASED name */
451}
452xf86ConfigSymTabRec, *xf86ConfigSymTabPtr;
453
454/*
455 * prototypes for public functions
456 */
457extern const char *xf86openConfigFile (const char *, const char *,
458 const char *);
459extern void xf86setBuiltinConfig(const char *config[]);
460extern XF86ConfigPtr xf86readConfigFile (void);
461extern void xf86closeConfigFile (void);
462extern void xf86freeConfig (XF86ConfigPtr p);
463extern int xf86writeConfigFile (const char *, XF86ConfigPtr);
464XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p);
465XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list);
466XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p);
467XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p);
468XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p);
469XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p);
470XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p);
471XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p);
472XF86ConfVendorPtr xf86findVendor(const char *name, XF86ConfVendorPtr list);
473XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident,
474 XF86ConfVideoAdaptorPtr p);
475
476GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new);
477int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2);
478
479int xf86pathIsAbsolute(const char *path);
480int xf86pathIsSafe(const char *path);
481char *xf86addComment(char *cur, char *add);
482
483#endif /* _xf86Parser_h_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette