1/*
2 * Copyright © 2003 Philip Blundell
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Philip Blundell not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission.  Philip Blundell makes no
11 * representations about the suitability of this software for any purpose.  It
12 * is provided "as is" without express or implied warranty.
13 *
14 * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 */
22
23#ifndef XCALIBRATEPROTO_H
24#define XCALIBRATEPROTO_H
25
26/*
27 * requests and replies
28 */
29typedef struct {
30    CARD8   reqType;
31    CARD8   xCalibrateReqType;
32    CARD16  length;
33    CARD32  majorVersion;
34    CARD32  minorVersion;
35} xXCalibrateQueryVersionReq;
36
37#define sz_xXCalibrateQueryVersionReq   12
38
39typedef struct {
40    BYTE    type;   /* X_Reply */
41    BYTE    pad1;
42    CARD16  sequenceNumber;
43    CARD32  length;
44    CARD32  majorVersion;
45    CARD32  minorVersion;
46    CARD32  pad2;
47    CARD32  pad3;
48    CARD32  pad4;
49    CARD32  pad5;
50} xXCalibrateQueryVersionReply;
51
52#define sz_xXCalibrateQueryVersionReply	32
53
54typedef struct {
55    CARD8   reqType;
56    CARD8   xCalibrateReqType;
57    CARD16  length;
58    CARD16  on;
59    CARD16  pad;
60} xXCalibrateRawModeReq;
61
62#define sz_xXCalibrateRawModeReq	8
63
64typedef struct {
65    BYTE    type;   /* X_Reply */
66    BYTE    pad1;
67    CARD16  sequenceNumber;
68    CARD32  status;
69    CARD32  pad2;
70    CARD32  pad3;
71    CARD32  pad4;
72    CARD32  pad5;
73    CARD32  pad6;
74    CARD32  pad7;
75} xXCalibrateRawModeReply;
76
77#define sz_xXCalibrateRawModeReply	32
78
79typedef struct {
80    CARD8   reqType;
81    CARD8   xCalibrateReqType;
82    CARD16  length;
83    CARD32  x;
84    CARD32  y;
85} xXCalibrateScreenToCoordReq;
86
87#define sz_xXCalibrateScreenToCoordReq	12
88
89typedef struct {
90    BYTE    type;   /* X_Reply */
91    BYTE    pad1;
92    CARD16  sequenceNumber;
93    CARD32  x;
94    CARD32  y;
95    CARD32  pad2;
96    CARD32  pad3;
97    CARD32  pad4;
98    CARD32  pad5;
99    CARD32  pad6;
100} xXCalibrateScreenToCoordReply;
101
102#define sz_xXCalibrateScreenToCoordReply	32
103
104/* Events */
105
106typedef struct {
107    CARD8	type;
108    CARD8	pad1;
109    CARD16	sequenceNumber;
110    CARD16	x;
111    CARD16	y;
112    CARD16	pressure;
113    CARD16      pad2;
114} xXCalibrateRawTouchscreenEvent;
115
116#define sz_xXCalibrateRawTouchscreenEvent 12
117
118#endif
119