]> git.sesse.net Git - rdpsrv/blob - Xserver/include/extensions/xf86vmode.h
Support RDP5 logon packets.
[rdpsrv] / Xserver / include / extensions / xf86vmode.h
1 /* $XFree86: xc/include/extensions/xf86vmode.h,v 3.20.2.1 1997/07/13 14:44:57 dawes Exp $ */
2 /*
3
4 Copyright (c) 1995  Kaleb S. KEITHLEY
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sublicense, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES 
21 OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 OTHER DEALINGS IN THE SOFTWARE.
24
25 Except as contained in this notice, the name of Kaleb S. KEITHLEY 
26 shall not be used in advertising or otherwise to promote the sale, use 
27 or other dealings in this Software without prior written authorization
28 from Kaleb S. KEITHLEY
29
30 */
31 /* $XConsortium: xf86vmode.h /main/9 1996/10/26 21:38:11 kaleb $ */
32
33 /* THIS IS NOT AN X CONSORTIUM STANDARD */
34
35 #ifndef _XF86VIDMODE_H_
36 #define _XF86VIDMODE_H_
37
38 #include <X11/Xfuncproto.h>
39 #include <X11/Xmd.h>
40
41 #define X_XF86VidModeQueryVersion       0
42 #define X_XF86VidModeGetModeLine        1
43 #define X_XF86VidModeModModeLine        2
44 #define X_XF86VidModeSwitchMode         3
45 #define X_XF86VidModeGetMonitor         4
46 #define X_XF86VidModeLockModeSwitch     5
47 #define X_XF86VidModeGetAllModeLines    6
48 #define X_XF86VidModeAddModeLine        7
49 #define X_XF86VidModeDeleteModeLine     8
50 #define X_XF86VidModeValidateModeLine   9
51 #define X_XF86VidModeSwitchToMode       10
52 #define X_XF86VidModeGetViewPort        11
53 #define X_XF86VidModeSetViewPort        12
54
55 #ifdef XF86VIDMODE_EVENTS
56 #define XF86VidModeNotify               0
57 #define XF86VidModeNumberEvents         (XF86VidModeNotify + 1)
58
59 #define XF86VidModeNotifyMask           0x00000001
60
61 #define XF86VidModeNonEvent             0
62 #define XF86VidModeModeChange           1
63 #else
64 #define XF86VidModeNumberEvents         0
65 #endif
66
67 #define XF86VidModeBadClock             0
68 #define XF86VidModeBadHTimings          1
69 #define XF86VidModeBadVTimings          2
70 #define XF86VidModeModeUnsuitable       3
71 #define XF86VidModeExtensionDisabled    4
72 #define XF86VidModeClientNotLocal       5
73 #define XF86VidModeZoomLocked           6
74 #define XF86VidModeNumberErrors         (XF86VidModeZoomLocked + 1)
75
76 #ifndef _XF86VIDMODE_SERVER_
77
78 typedef struct {
79     unsigned short      hdisplay;
80     unsigned short      hsyncstart;
81     unsigned short      hsyncend;
82     unsigned short      htotal;
83     unsigned short      vdisplay;
84     unsigned short      vsyncstart;
85     unsigned short      vsyncend;
86     unsigned short      vtotal;
87     unsigned int        flags;
88     int                 privsize;
89 #if defined(__cplusplus) || defined(c_plusplus)
90     /* private is a C++ reserved word */
91     INT32               *c_private;
92 #else
93     INT32               *private;
94 #endif
95 } XF86VidModeModeLine;
96
97 typedef struct {
98     unsigned int        dotclock;
99     unsigned short      hdisplay;
100     unsigned short      hsyncstart;
101     unsigned short      hsyncend;
102     unsigned short      htotal;
103     unsigned short      vdisplay;
104     unsigned short      vsyncstart;
105     unsigned short      vsyncend;
106     unsigned short      vtotal;
107     unsigned int        flags;
108     int                 privsize;
109 #if defined(__cplusplus) || defined(c_plusplus)
110     /* private is a C++ reserved word */
111     INT32               *c_private;
112 #else
113     INT32               *private;
114 #endif
115 } XF86VidModeModeInfo;
116
117 typedef struct {
118     float               hi;
119     float               lo;
120 } XF86VidModeSyncRange;
121
122 typedef struct {
123     char*                       vendor;
124     char*                       model;
125     float                       EMPTY;
126     unsigned char               nhsync;
127     XF86VidModeSyncRange*       hsync;
128     unsigned char               nvsync;
129     XF86VidModeSyncRange*       vsync;
130 } XF86VidModeMonitor;
131     
132 typedef struct {
133     int type;                   /* of event */
134     unsigned long serial;       /* # of last request processed by server */
135     Bool send_event;            /* true if this came from a SendEvent req */
136     Display *display;           /* Display the event was read from */
137     Window root;                /* root window of event screen */
138     int state;                  /* What happened */
139     int kind;                   /* What happened */
140     Bool forced;                /* extents of new region */
141     Time time;                  /* event timestamp */
142 } XF86VidModeNotifyEvent;
143
144 #define XF86VidModeSelectNextMode(disp, scr) \
145         XF86VidModeSwitchMode(disp, scr, 1)
146 #define XF86VidModeSelectPrevMode(disp, scr) \
147         XF86VidModeSwitchMode(disp, scr, -1)
148
149 _XFUNCPROTOBEGIN
150
151 Bool XF86VidModeQueryVersion(
152 #if NeedFunctionPrototypes
153     Display*            /* dpy */,
154     int*                /* majorVersion */,
155     int*                /* minorVersion */
156 #endif
157 );
158
159 Bool XF86VidModeQueryExtension(
160 #if NeedFunctionPrototypes
161     Display*            /* dpy */,
162     int*                /* event_base */,
163     int*                /* error_base */
164 #endif
165 );
166
167 Bool XF86VidModeGetModeLine(
168 #if NeedFunctionPrototypes
169     Display*                    /* dpy */,
170     int                         /* screen */,
171     int*                        /* dotclock */,
172     XF86VidModeModeLine*        /* modeline */
173 #endif
174 );
175
176 Bool XF86VidModeGetAllModeLines(
177 #if NeedFunctionPrototypes
178     Display*                    /* dpy */,
179     int                         /* screen */,
180     int*                        /* modecount */,
181     XF86VidModeModeInfo***      /* modelinesPtr */
182 #endif
183 );
184
185 Bool XF86VidModeAddModeLine(
186 #if NeedFunctionPrototypes
187     Display*                    /* dpy */,
188     int                         /* screen */,
189     XF86VidModeModeInfo*        /* new modeline */,
190     XF86VidModeModeInfo*        /* after modeline */
191 #endif
192 );
193
194 Bool XF86VidModeDeleteModeLine(
195 #if NeedFunctionPrototypes
196     Display*                    /* dpy */,
197     int                         /* screen */,
198     XF86VidModeModeInfo*        /* modeline */
199 #endif
200 );
201
202 Bool XF86VidModeModModeLine(
203 #if NeedFunctionPrototypes
204     Display*                    /* dpy */,
205     int                         /* screen */,
206     XF86VidModeModeLine*        /* modeline */
207 #endif
208 );
209
210 Status XF86VidModeValidateModeLine(
211 #if NeedFunctionPrototypes
212     Display*                    /* dpy */,
213     int                         /* screen */,
214     XF86VidModeModeInfo*        /* modeline */
215 #endif
216 );
217
218 Bool XF86VidModeSwitchMode(
219 #if NeedFunctionPrototypes
220     Display*            /* dpy */,
221     int                 /* screen */,
222     int                 /* zoom */
223 #endif
224 );
225
226 Bool XF86VidModeSwitchToMode(
227 #if NeedFunctionPrototypes
228     Display*                    /* dpy */,
229     int                         /* screen */,
230     XF86VidModeModeInfo*        /* modeline */
231 #endif
232 );
233
234 Bool XF86VidModeLockModeSwitch(
235 #if NeedFunctionPrototypes
236     Display*            /* dpy */,
237     int                 /* screen */,
238     int                 /* lock */
239 #endif
240 );
241
242 Bool XF86VidModeGetMonitor(
243 #if NeedFunctionPrototypes
244     Display*            /* dpy */,
245     int                 /* screen */,
246     XF86VidModeMonitor* /* monitor */
247 #endif
248 );
249
250 Bool XF86VidModeGetViewPort(
251 #if NeedFunctionPrototypes
252     Display*            /* dpy */,
253     int                 /* screen */,
254     int*                /* x return */,
255     int*                /* y return */
256 #endif
257 );
258
259 Bool XF86VidModeSetViewPort(
260 #if NeedFunctionPrototypes
261     Display*            /* dpy */,
262     int                 /* screen */,
263     int                 /* x */,
264     int                 /* y */
265 #endif
266 );
267
268 _XFUNCPROTOEND
269
270 #endif
271
272 #endif