xf86Privstr.h revision 35c4bbdf
1
2/*
3 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * Except as contained in this notice, the name of the copyright holder(s)
24 * and author(s) shall not be used in advertising or otherwise to promote
25 * the sale, use or other dealings in this Software without prior written
26 * authorization from the copyright holder(s) and author(s).
27 */
28
29/*
30 * This file contains definitions of the private XFree86 data structures/types.
31 * None of the data structures here should be used by video drivers.
32 */
33
34#ifndef _XF86PRIVSTR_H
35#define _XF86PRIVSTR_H
36
37#include "xf86str.h"
38
39typedef enum {
40    XF86_GlxVisualsMinimal,
41    XF86_GlxVisualsTypical,
42    XF86_GlxVisualsAll,
43} XF86_GlxVisuals;
44
45/*
46 * xf86InfoRec contains global parameters which the video drivers never
47 * need to access.  Global parameters which the video drivers do need
48 * should be individual globals.
49 */
50
51typedef struct {
52    int consoleFd;
53    int vtno;
54
55    /* event handler part */
56    int lastEventTime;
57    Bool vtRequestsPending;
58#ifdef sun
59    int vtPendingNum;
60#endif
61    Bool dontVTSwitch;
62    Bool autoVTSwitch;
63    Bool ShareVTs;
64    Bool dontZap;
65    Bool dontZoom;
66    Bool notrapSignals;         /* don't exit cleanly - die at fault */
67    Bool caughtSignal;
68
69    /* graphics part */
70    ScreenPtr currentScreen;
71#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
72    int consType;               /* Which console driver? */
73#endif
74
75    /* Other things */
76    Bool allowMouseOpenFail;
77    Bool vidModeEnabled;        /* VidMode extension enabled */
78    Bool vidModeAllowNonLocal;  /* allow non-local VidMode
79                                 * connections */
80    Bool miscModInDevEnabled;   /* Allow input devices to be
81                                 * changed */
82    Bool miscModInDevAllowNonLocal;
83    Bool useSIGIO;              /* Use SIGIO for handling
84                                   input device events */
85    Pix24Flags pixmap24;
86    MessageType pix24From;
87    Bool pmFlag;
88    Bool disableRandR;
89    MessageType randRFrom;
90    Bool aiglx;
91    MessageType aiglxFrom;
92    MessageType iglxFrom;
93    XF86_GlxVisuals glxVisuals;
94    MessageType glxVisualsFrom;
95
96    Bool useDefaultFontPath;
97    Bool ignoreABI;
98
99    Bool forceInputDevices;     /* force xorg.conf or built-in input devices */
100    Bool autoAddDevices;        /* Whether to succeed NIDR, or ignore. */
101    Bool autoEnableDevices;     /* Whether to enable, or let the client
102                                 * control. */
103
104    Bool dri2;
105    MessageType dri2From;
106
107    Bool autoAddGPU;
108} xf86InfoRec, *xf86InfoPtr;
109
110#ifdef DPMSExtension
111/* Private info for DPMS */
112typedef struct {
113    CloseScreenProcPtr CloseScreen;
114    Bool Enabled;
115    int Flags;
116} DPMSRec, *DPMSPtr;
117#endif
118
119/* Information for root window properties. */
120typedef struct _RootWinProp {
121    struct _RootWinProp *next;
122    const char *name;
123    Atom type;
124    short format;
125    long size;
126    void *data;
127} RootWinProp, *RootWinPropPtr;
128
129/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
130#define XLED1   ((unsigned long) 0x00000001)
131#define XLED2   ((unsigned long) 0x00000002)
132#define XLED3   ((unsigned long) 0x00000004)
133#define XLED4	((unsigned long) 0x00000008)
134#define XCAPS   ((unsigned long) 0x20000000)
135#define XNUM    ((unsigned long) 0x40000000)
136#define XSCR    ((unsigned long) 0x80000000)
137#define XCOMP	((unsigned long) 0x00008000)
138
139/* BSD console driver types (consType) */
140#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
141#define PCCONS		   0
142#define CODRV011	   1
143#define CODRV01X	   2
144#define SYSCONS		   8
145#define PCVT		  16
146#define WSCONS		  32
147#endif
148
149/* Root window property to tell clients whether our VT is currently active.
150 * Name chosen to match the "XFree86_VT" property. */
151#define HAS_VT_ATOM_NAME "XFree86_has_VT"
152
153#endif                          /* _XF86PRIVSTR_H */
154