1 /************************************************************
2 
3 Copyright (c) 2004, Sun Microsystems, Inc.
4 
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
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 THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24 
25 ********************************************************/
26 
27 /*
28  * lge.h - Looking Glass Extension Definitions
29  */
30 
31 #ifndef _LGEWIRE_H
32 #define _LGEWIRE_H
33 
34 #include "X11/Xfuncproto.h"
35 
36 #define LGE_NAME "LGE"
37 
38 /* Current interface version numbers */
39 #define LGE_MAJOR_VERSION   5
40 #define LGE_MINOR_VERSION   0
41 
42 /* Display Server is alive */
43 #define  X_LgeQueryVersion	     0
44 #define  X_LgeRegisterClient         1
45 #define  X_LgeRegisterScreen         2
46 #define  X_LgeControlLgMode          3
47 #define  X_LgeSendEvent              4
48 
49 /* Arguments to XLgeRegisterClient */
50 #define LGE_CLIENT_GENERIC	     0
51 #define LGE_CLIENT_PICKER            1
52 #define LGE_CLIENT_EVENT_DELIVERER   2
53 
54 typedef struct {
55     CARD8       reqType;
56     CARD8       lgeReqType;
57     CARD16	length;
58 } xLgeQueryVersionReq;
59 
60 #define sz_xLgeQueryVersionReq	sizeof(xLgeQueryVersionReq)
61 
62 typedef struct {
63     /* Always X_Reply */
64     BYTE        type;
65     CARD8       unused;
66     CARD16	sequenceNumber;
67     CARD32	length;
68     CARD32	majorVersion;
69     CARD32	minorVersion;
70     CARD32	implementation;
71     CARD32	pad3;
72     CARD32	pad4;
73     CARD32	pad5;
74 } xLgeQueryVersionReply;
75 
76 #define sz_xLgeQueryVersionReply sizeof(xLgeQueryVersionReply)
77 
78 typedef struct {
79     CARD8  reqType;
80     CARD8  lgeReqType;
81     CARD16 length;
82     CARD8  clientType;
83     BOOL   sendEventDirect;
84     CARD16 pad2;
85 } xLgeRegisterClientReq;
86 
87 #define sz_xLgeRegisterClientReq sizeof(xLgeRegisterClientReq)
88 
89 typedef struct {
90     CARD8  reqType;
91     CARD8  lgeReqType;
92     CARD16 length;
93     /* The pseudo-root window of the screen */
94     Window prw;
95 } xLgeRegisterScreenReq;
96 
97 #define sz_xLgeRegisterScreenReq sizeof(xLgeRegisterScreenReq)
98 
99 typedef struct {
100     CARD8     reqType;
101     CARD8     lgeReqType;
102     CARD16    length;
103     BOOL      enable;
104     CARD8     pad1;
105     CARD16    pad2;
106 } xLgeControlLgModeReq;
107 
108 #define sz_xLgeControlLgModeReq sizeof(xLgeControlLgModeReq)
109 
110 typedef struct {
111     CARD8     reqType;
112     CARD8     lgeReqType;
113     CARD16    length;
114     xEvent    event;
115 } xLgeSendEventReq;
116 
117 #define sz_xLgeSendEventReq sizeof(xLgeSendEventReq)
118 
119 #endif /* LGEWIRE_H */
120 
121