2 * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
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:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
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
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
27 * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
32 # include "xorg-config.h"
35 #include <X11/IntrinsicP.h>
36 #include <X11/StringDefs.h>
37 #include <X11/Xmu/SysUtil.h>
54 # if defined(_POSIX_SOURCE)
57 # define _POSIX_SOURCE
63 # define PATH_MAX MAXPATHLEN
65 # define PATH_MAX 1024
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>
78 #ifndef _xf86cfg_config_h
79 #define _xf86cfg_config_h
81 /* Must match the offset in the xf86info structure at config.c,
82 * and is used also by interface.c
94 #define CONFIG_LAYOUT 0
95 #define CONFIG_SCREEN 1
96 #define CONFIG_MODELINE 2
97 #define CONFIG_ACCESSX 3
98 extern int config_mode
;
100 #define CONFPATH "%A," "%R," \
101 "/etc/X11/%R," "%P/etc/X11/%R," \
103 "/etc/X11/%F," "%P/etc/X11/%F," \
105 "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
106 "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
108 "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
110 #define USER_CONFPATH "/etc/X11/%S," "%P/etc/X11/%S," \
111 "/etc/X11/%G," "%P/etc/X11/%G," \
112 "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
114 "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
120 typedef struct _XF86SetupInfo XF86SetupInfo
;
121 typedef void (*XF86SetupFunction
)(XF86SetupInfo
*);
123 typedef struct _XF86SetupFunctionList
{
124 XF86SetupFunction
*functions
;
127 } XF86SetupFunctionList
;
129 struct _XF86SetupInfo
{
132 XF86SetupFunctionList
*lists
;
135 typedef Bool (*ConfigCheckFunction
)(void);
137 typedef struct _xf86cfgDevice xf86cfgDevice
;
139 struct _xf86cfgDevice
{
142 int type
, state
, refcount
;
146 XF86ConfScreenPtr screen
;
148 int type
, state
, refcount
;
150 xf86cfgDevice
*monitor
;
156 /* this structure is used just to restore
157 properly the monitors layout in the
158 screen window configuration.
161 XF86ConfLayoutPtr layout
;
162 xf86cfgScreen
**screen
;
167 /* The vidmode extension usage is controlled by this structure.
168 * The information is read at startup, and added monitors cannot
169 * be configured, since they are not attached to a particular screen.
171 typedef struct _xf86cfgVidMode xf86cfgVidmode
;
174 XF86ConfLayoutPtr layout
; /* current layout */
176 xf86cfgLayout
**layouts
;
177 Cardinal num_layouts
;
178 xf86cfgScreen
**screens
;
179 Cardinal num_screens
;
180 xf86cfgDevice
**devices
;
181 Cardinal num_devices
;
182 xf86cfgVidmode
**vidmodes
;
183 Cardinal num_vidmodes
;
189 void StartConfig(void);
190 Bool
ConfigLoop(ConfigCheckFunction
);
191 void ConfigError(void);
192 void ChangeScreen(XF86ConfMonitorPtr
, XF86ConfMonitorPtr
,
193 XF86ConfDevicePtr
, XF86ConfDevicePtr
);
194 void SetTip(xf86cfgDevice
*);
197 void startaccessx(void);
198 void ConfigCancelAction(Widget
, XEvent
*, String
*, Cardinal
*);
199 void ExpertConfigureStart(void);
200 void ExpertConfigureEnd(void);
201 void ExpertCloseAction(Widget
, XEvent
*, String
*, Cardinal
*);
202 void ExpertCallback(Widget
, XtPointer
, XtPointer
);
207 extern Widget toplevel
, configp
, current
, back
, next
;
208 extern XtAppContext appcon
;
209 extern XF86SetupInfo xf86info
;
210 extern Widget ident_widget
;
211 extern char *ident_string
;
212 extern XF86ConfigPtr XF86Config
;
213 extern char *XF86Config_path
;
214 extern char *XF86Module_path
;
215 extern char *XFree86_path
;
216 extern char *XF86Font_path
;
217 extern char *XF86RGB_path
;
218 extern char *XFree86Dir
;
219 extern xf86cfgComputer computer
;
220 extern Atom wm_delete_window
;
222 extern Pixmap menuPixmap
;
224 extern int nomodules
;
227 #endif /* _xf86cfg_config_h */