]> git.sesse.net Git - rdpsrv/blob - Xserver/include/extensions/Xdbe.h
Support RDP5 logon packets.
[rdpsrv] / Xserver / include / extensions / Xdbe.h
1 /* $XConsortium: Xdbe.h /main/3 1995/09/22 10:20:01 dpw $ */
2 /******************************************************************************
3  * 
4  * Copyright (c) 1994, 1995  Hewlett-Packard Company
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 included
15  * in all copies or substantial portions of the Software.
16  * 
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20  * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
21  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
23  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  * 
25  * Except as contained in this notice, the name of the Hewlett-Packard
26  * Company shall not be used in advertising or otherwise to promote the
27  * sale, use or other dealings in this Software without prior written
28  * authorization from the Hewlett-Packard Company.
29  * 
30  *     Header file for Xlib-related DBE
31  *
32  *****************************************************************************/
33
34
35 #ifndef XDBE_H
36 #define XDBE_H
37
38
39 /* INCLUDES */
40
41 #include <X11/Xfuncproto.h>
42 #include "Xdbeproto.h"
43
44
45 /* DEFINES */
46
47 /* Errors */
48 #define XdbeBadBuffer    0
49
50
51 /* TYPEDEFS */
52
53 typedef Drawable XdbeBackBuffer;
54
55 typedef unsigned char XdbeSwapAction;
56
57 typedef struct
58 {
59     Window              swap_window;    /* window for which to swap buffers   */
60     XdbeSwapAction      swap_action;    /* swap action to use for swap_window */
61 }
62 XdbeSwapInfo;
63
64 typedef struct
65 {
66     Window      window;                 /* window that buffer belongs to */
67 }
68 XdbeBackBufferAttributes;
69
70 typedef struct
71 {
72     int                 type;
73     Display             *display;       /* display the event was read from */
74     XdbeBackBuffer      buffer;         /* resource id                     */
75     unsigned long       serial;         /* serial number of failed request */
76     unsigned char       error_code;     /* error base + XdbeBadBuffer      */
77     unsigned char       request_code;   /* major opcode of failed request  */
78     unsigned char       minor_code;     /* minor opcode of failed request  */
79 }
80 XdbeBufferError;
81
82 /* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops
83  * (for non-C++ builds) in X11/Xfuncproto.h.
84  */
85 _XFUNCPROTOBEGIN
86
87 extern Status XdbeQueryExtension(
88 #if NeedFunctionPrototypes
89     Display*            /* dpy                  */,
90     int*                /* major_version_return */,
91     int*                /* minor_version_return */
92 #endif
93 );
94
95 extern XdbeBackBuffer XdbeAllocateBackBufferName(
96 #if NeedFunctionPrototypes
97     Display*            /* dpy         */,
98     Window              /* window      */,
99     XdbeSwapAction      /* swap_action */
100 #endif
101 );
102
103 extern Status XdbeDeallocateBackBufferName(
104 #if NeedFunctionPrototypes
105     Display*            /* dpy    */,
106     XdbeBackBuffer      /* buffer */
107 #endif
108 );
109
110 extern Status XdbeSwapBuffers(
111 #if NeedFunctionPrototypes
112     Display*            /* dpy         */,
113     XdbeSwapInfo*       /* swap_info   */,
114     int                 /* num_windows */
115 #endif
116 );
117
118 extern Status XdbeBeginIdiom(
119 #if NeedFunctionPrototypes
120     Display*            /* dpy */
121 #endif
122 );
123
124 extern Status XdbeEndIdiom(
125 #if NeedFunctionPrototypes
126     Display*            /* dpy */
127 #endif
128 );
129
130 extern XdbeScreenVisualInfo *XdbeGetVisualInfo(
131 #if NeedFunctionPrototypes
132     Display*            /* dpy               */,
133     Drawable*           /* screen_specifiers */,
134     int*                /* num_screens       */
135 #endif
136 );
137
138 extern void XdbeFreeVisualInfo(
139 #if NeedFunctionPrototypes
140     XdbeScreenVisualInfo*       /* visual_info */
141 #endif
142 );
143
144 extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
145 #if NeedFunctionPrototypes
146     Display*            /* dpy    */,
147     XdbeBackBuffer      /* buffer */
148 #endif
149 );
150
151 _XFUNCPROTOEND
152
153 #endif /* XDBE_H */
154