VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.5.3/config.h@ 61522

Last change on this file since 61522 was 17471, checked in by vboxsync, 16 years ago

export to OSE

  • Property svn:eol-style set to native
File size: 5.9 KB
Line 
1/*
2 * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
21 *
22 * Except as contained in this notice, the name of Conectiva Linux shall
23 * not be used in advertising or otherwise to promote the sale, use or other
24 * dealings in this Software without prior written authorization from
25 * Conectiva Linux.
26 *
27 * Author: Paulo César Pereira de Andrade <[email protected]>
28 *
29 */
30
31#ifdef HAVE_CONFIG_H
32# include "xorg-config.h"
33#endif
34
35#include <X11/IntrinsicP.h>
36#include <X11/StringDefs.h>
37#include <X11/Xmu/SysUtil.h>
38#include <X11/Xos.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <dirent.h>
42#include <string.h>
43#ifdef sun
44#undef index
45#undef rindex
46#include <strings.h>
47#endif
48#include <unistd.h>
49
50#include <stdarg.h>
51
52/* Get PATH_MAX */
53#ifndef PATH_MAX
54# if defined(_POSIX_SOURCE)
55# include <limits.h>
56# else
57# define _POSIX_SOURCE
58# include <limits.h>
59# undef _POSIX_SOURCE
60# endif
61# ifndef PATH_MAX
62# ifdef MAXPATHLEN
63# define PATH_MAX MAXPATHLEN
64# else
65# define PATH_MAX 1024
66# endif
67# endif
68#endif
69
70#include <xf86Parser.h>
71#include <X11/XKBlib.h>
72#include <X11/extensions/XKBgeom.h>
73#include <X11/extensions/XKM.h>
74#include <X11/extensions/XKBfile.h>
75#include <X11/extensions/XKBui.h>
76#include <X11/extensions/XKBrules.h>
77
78#ifndef _xf86cfg_config_h
79#define _xf86cfg_config_h
80
81/* Must match the offset in the xf86info structure at config.c,
82 * and is used also by interface.c
83 */
84#define MOUSE 0
85#define KEYBOARD 1
86#define CARD 2
87#define MONITOR 3
88#define SCREEN 4
89#define SERVER 5
90
91#define UNUSED 0
92#define USED 1
93
94#define CONFIG_LAYOUT 0
95#define CONFIG_SCREEN 1
96#define CONFIG_MODELINE 2
97#define CONFIG_ACCESSX 3
98extern int config_mode;
99
100#define CONFPATH "%A," "%R," \
101 "/etc/X11/%R," "%P/etc/X11/%R," \
102 "%E," "%F," \
103 "/etc/X11/%F," "%P/etc/X11/%F," \
104 "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
105 "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
106 "%P/etc/X11/%X," \
107 "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
108 "%P/lib/X11/%X"
109#define USER_CONFPATH "/etc/X11/%S," "%P/etc/X11/%S," \
110 "/etc/X11/%G," "%P/etc/X11/%G," \
111 "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
112 "%P/etc/X11/%X," \
113 "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
114 "%P/lib/X11/%X"
115
116/*
117 * Types
118 */
119typedef struct _XF86SetupInfo XF86SetupInfo;
120typedef void (*XF86SetupFunction)(XF86SetupInfo*);
121
122typedef struct _XF86SetupFunctionList {
123 XF86SetupFunction *functions;
124 int num_functions;
125 int cur_function;
126} XF86SetupFunctionList;
127
128struct _XF86SetupInfo {
129 int num_lists;
130 int cur_list;
131 XF86SetupFunctionList *lists;
132};
133
134typedef Bool (*ConfigCheckFunction)(void);
135
136typedef struct _xf86cfgDevice xf86cfgDevice;
137
138struct _xf86cfgDevice {
139 XtPointer config;
140 Widget widget;
141 int type, state, refcount;
142};
143
144typedef struct {
145 XF86ConfScreenPtr screen;
146 Widget widget;
147 int type, state, refcount;
148 xf86cfgDevice *card;
149 xf86cfgDevice *monitor;
150 short row, column;
151 XRectangle rect;
152 short rotate;
153} xf86cfgScreen;
154
155/* this structure is used just to restore
156 properly the monitors layout in the
157 screen window configuration.
158 */
159typedef struct {
160 XF86ConfLayoutPtr layout;
161 xf86cfgScreen **screen;
162 XPoint *position;
163 int num_layouts;
164} xf86cfgLayout;
165
166/* The vidmode extension usage is controlled by this structure.
167 * The information is read at startup, and added monitors cannot
168 * be configured, since they are not attached to a particular screen.
169 */
170typedef struct _xf86cfgVidMode xf86cfgVidmode;
171
172typedef struct {
173 XF86ConfLayoutPtr layout; /* current layout */
174 Widget cpu;
175 xf86cfgLayout **layouts;
176 Cardinal num_layouts;
177 xf86cfgScreen **screens;
178 Cardinal num_screens;
179 xf86cfgDevice **devices;
180 Cardinal num_devices;
181 xf86cfgVidmode **vidmodes;
182 Cardinal num_vidmodes;
183} xf86cfgComputer;
184
185/*
186 * Prototypes
187 */
188void StartConfig(void);
189Bool ConfigLoop(ConfigCheckFunction);
190void ConfigError(void);
191void ChangeScreen(XF86ConfMonitorPtr, XF86ConfMonitorPtr,
192 XF86ConfDevicePtr, XF86ConfDevicePtr);
193void SetTip(xf86cfgDevice*);
194Bool startx(void);
195void endx(void);
196void startaccessx(void);
197void ConfigCancelAction(Widget, XEvent*, String*, Cardinal*);
198void ExpertConfigureStart(void);
199void ExpertConfigureEnd(void);
200void ExpertCloseAction(Widget, XEvent*, String*, Cardinal*);
201void ExpertCallback(Widget, XtPointer, XtPointer);
202
203/*
204 * Initialization
205 */
206extern Widget toplevel, configp, current, back, next;
207extern XtAppContext appcon;
208extern XF86SetupInfo xf86info;
209extern Widget ident_widget;
210extern char *ident_string;
211extern XF86ConfigPtr XF86Config;
212extern char *XF86Config_path;
213extern char *XF86Module_path;
214extern char *XFree86_path;
215extern char *XF86Font_path;
216extern char *XF86RGB_path;
217extern char *XFree86Dir;
218extern xf86cfgComputer computer;
219extern Atom wm_delete_window;
220extern Display *DPY;
221extern Pixmap menuPixmap;
222#ifdef USE_MODULES
223extern int nomodules;
224#endif
225
226#endif /* _xf86cfg_config_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