lgewire.h revision 17ca54c3
1/************************************************************
2
3Copyright (c) 2004, Sun Microsystems, Inc.
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in 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
54typedef struct {
55    CARD8       reqType;
56    CARD8       lgeReqType;
57    CARD16	length B16;
58} xLgeQueryVersionReq;
59
60#define sz_xLgeQueryVersionReq	sizeof(xLgeQueryVersionReq)
61
62typedef struct {
63    /* Always X_Reply */
64    BYTE        type;
65    CARD8       unused;
66    CARD16	sequenceNumber B16;
67    CARD32	length B32;
68    CARD32	majorVersion B32;
69    CARD32	minorVersion B32;
70    CARD32      implementation B32;
71    CARD32	pad3 B32;
72    CARD32	pad4 B32;
73    CARD32	pad5 B32;
74} xLgeQueryVersionReply;
75
76#define sz_xLgeQueryVersionReply sizeof(xLgeQueryVersionReply)
77
78typedef struct {
79    CARD8  reqType;
80    CARD8  lgeReqType;
81    CARD16 length B16;
82    CARD8  clientType;
83    BOOL   sendEventDirect;
84    CARD16 pad2 B16;
85} xLgeRegisterClientReq;
86
87#define sz_xLgeRegisterClientReq sizeof(xLgeRegisterClientReq)
88
89typedef struct {
90    CARD8  reqType;
91    CARD8  lgeReqType;
92    CARD16 length B16;
93    /* The pseudo-root window of the screen */
94    Window prw;
95} xLgeRegisterScreenReq;
96
97#define sz_xLgeRegisterScreenReq sizeof(xLgeRegisterScreenReq)
98
99typedef struct {
100    CARD8     reqType;
101    CARD8     lgeReqType;
102    CARD16    length B16;
103    BOOL      enable;
104    CARD8     pad1;
105    CARD16    pad2 B16;
106} xLgeControlLgModeReq;
107
108#define sz_xLgeControlLgModeReq sizeof(xLgeControlLgModeReq)
109
110typedef struct {
111    CARD8     reqType;
112    CARD8     lgeReqType;
113    CARD16    length B16;
114    xEvent    event;
115} xLgeSendEventReq;
116
117#define sz_xLgeSendEventReq sizeof(xLgeSendEventReq)
118
119#endif /* LGEWIRE_H */
120
121