1/*
2 * Copyright 2006 by VMware, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
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
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Except as contained in this notice, the name of the copyright holder(s)
23 * and author(s) shall not be used in advertising or otherwise to promote
24 * the sale, use or other dealings in this Software without prior written
25 * authorization from the copyright holder(s) and author(s).
26 */
27
28/*
29 * vmwarectrlproto.h --
30 *
31 *      The description of the VMWARE_CTRL protocol extension that
32 *      allows X clients to communicate with the driver.
33 */
34
35#ifndef _VMWARE_CTRL_PROTO_H_
36#define _VMWARE_CTRL_PROTO_H_
37
38
39#include <X11/X.h>
40#include "vmwarectrl.h"
41
42
43/*
44 * Requests and Replies
45 */
46
47/* Version 0.1 definitions. */
48
49typedef struct {
50   CARD8  reqType;           /* always X_VMwareCtrlReqCode */
51   CARD8  VMwareCtrlReqType; /* always X_VMwareCtrlQueryVersion */
52   CARD16 length;
53   CARD32 majorVersion;
54   CARD32 minorVersion;
55} xVMwareCtrlQueryVersionReq;
56#define sz_xVMwareCtrlQueryVersionReq 12
57
58typedef struct {
59   BYTE    type; /* X_Reply */
60   BYTE    pad1;
61   CARD16  sequenceNumber;
62   CARD32  length;
63   CARD32  majorVersion;
64   CARD32  minorVersion;
65   CARD32  pad2;
66   CARD32  pad3;
67   CARD32  pad4;
68   CARD32  pad5;
69} xVMwareCtrlQueryVersionReply;
70#define sz_xVMwareCtrlQueryVersionReply 32
71
72typedef struct {
73   CARD8  reqType;           /* always X_VMwareCtrlReqCode */
74   CARD8  VMwareCtrlReqType; /* always X_VMwareCtrlSetRes */
75   CARD16 length;
76   CARD32 screen;
77   CARD32 x;
78   CARD32 y;
79} xVMwareCtrlSetResReq;
80#define sz_xVMwareCtrlSetResReq 16
81
82typedef struct {
83   BYTE   type; /* X_Reply */
84   BYTE   pad1;
85   CARD16 sequenceNumber;
86   CARD32 length;
87   CARD32 screen;
88   CARD32 x;
89   CARD32 y;
90   CARD32 pad2;
91   CARD32 pad3;
92   CARD32 pad4;
93} xVMwareCtrlSetResReply;
94#define sz_xVMwareCtrlSetResReply 32
95
96/* Version 0.2 definitions. */
97
98typedef struct {
99   CARD8  reqType;           /* always X_VMwareCtrlReqCode */
100   CARD8  VMwareCtrlReqType; /* always X_VMwareCtrlSetTopology */
101   CARD16 length;
102   CARD32 screen;
103   CARD32 number;
104   CARD32 pad1;
105} xVMwareCtrlSetTopologyReq;
106#define sz_xVMwareCtrlSetTopologyReq 16
107
108typedef struct {
109   BYTE   type; /* X_Reply */
110   BYTE   pad1;
111   CARD16 sequenceNumber;
112   CARD32 length;
113   CARD32 screen;
114   CARD32 pad2;
115   CARD32 pad3;
116   CARD32 pad4;
117   CARD32 pad5;
118   CARD32 pad6;
119} xVMwareCtrlSetTopologyReply;
120#define sz_xVMwareCtrlSetTopologyReply 32
121
122#endif /* _VMWARE_CTRL_PROTO_H_ */
123