windowswmstr.h revision ea1d6981
1/*
2 * WindowsWM extension is based on AppleWM extension
3 * Authors:	Kensuke Matsuzaki
4 */
5/**************************************************************************
6
7Copyright (c) 2002 Apple Computer, Inc.
8All Rights Reserved.
9
10Permission is hereby granted, free of charge, to any person obtaining a
11copy of this software and associated documentation files (the
12"Software"), to deal in the Software without restriction, including
13without limitation the rights to use, copy, modify, merge, publish,
14distribute, sub license, and/or sell copies of the Software, and to
15permit persons to whom the Software is furnished to do so, subject to
16the following conditions:
17
18The above copyright notice and this permission notice (including the
19next paragraph) shall be included in all copies or substantial portions
20of the Software.
21
22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
25IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
26ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30**************************************************************************/
31
32#ifndef _WINDOWSWMSTR_H_
33#define _WINDOWSWMSTR_H_
34
35#include <X11/extensions/windowswm.h>
36#include <X11/X.h>
37#include <X11/Xmd.h>
38
39#define WINDOWSWMNAME "Windows-WM"
40
41#define WINDOWS_WM_MAJOR_VERSION	1	/* current version numbers */
42#define WINDOWS_WM_MINOR_VERSION	0
43#define WINDOWS_WM_PATCH_VERSION	0
44
45typedef struct _WindowsWMQueryVersion {
46    CARD8	reqType;		/* always WMReqCode */
47    CARD8	wmReqType;		/* always X_WMQueryVersion */
48    CARD16	length;
49} xWindowsWMQueryVersionReq;
50#define sz_xWindowsWMQueryVersionReq	4
51
52typedef struct {
53    BYTE	type;			/* X_Reply */
54    BOOL	pad1;
55    CARD16	sequenceNumber;
56    CARD32	length;
57    CARD16	majorVersion;		/* major version of WM protocol */
58    CARD16	minorVersion;		/* minor version of WM protocol */
59    CARD32	patchVersion;		/* patch version of WM protocol */
60    CARD32	pad3;
61    CARD32	pad4;
62    CARD32	pad5;
63    CARD32	pad6;
64} xWindowsWMQueryVersionReply;
65#define sz_xWindowsWMQueryVersionReply	32
66
67typedef struct _WindowsWMDisableUpdate {
68    CARD8	reqType;		/* always WMReqCode */
69    CARD8	wmReqType;		/* always X_WMDisableUpdate */
70    CARD16	length;
71    CARD32	screen;
72} xWindowsWMDisableUpdateReq;
73#define sz_xWindowsWMDisableUpdateReq	8
74
75typedef struct _WindowsWMReenableUpdate {
76    CARD8	reqType;		/* always WMReqCode */
77    CARD8	wmReqType;		/* always X_WMReenableUpdate */
78    CARD16	length;
79    CARD32	screen;
80} xWindowsWMReenableUpdateReq;
81#define sz_xWindowsWMReenableUpdateReq	8
82
83typedef struct _WindowsWMSelectInput {
84    CARD8	reqType;		/* always WMReqCode */
85    CARD8	wmReqType;		/* always X_WMSelectInput */
86    CARD16	length;
87    CARD32	mask;
88} xWindowsWMSelectInputReq;
89#define sz_xWindowsWMSelectInputReq	8
90
91typedef struct _WindowsWMNotify {
92	BYTE	type;		/* always eventBase + event type */
93	BYTE	kind;
94	CARD16	sequenceNumber;
95	Window	window;
96	Time	time;		/* time of change */
97	CARD16	pad1;
98	CARD32	arg;
99	INT16	x;
100	INT16	y;
101	CARD16	w;
102	CARD16	h;
103} xWindowsWMNotifyEvent;
104#define sz_xWindowsWMNotifyEvent	28
105
106typedef struct _WindowsWMSetFrontProcess {
107    CARD8	reqType;		/* always WMReqCode */
108    CARD8	wmReqType;		/* always X_WMSetFrontProcess */
109    CARD16	length;
110} xWindowsWMSetFrontProcessReq;
111#define sz_xWindowsWMSetFrontProcessReq 4
112
113typedef struct _WindowsWMFrameGetRect {
114    CARD8	reqType;		/* always WMReqCode */
115    CARD8	wmReqType;		/* always X_WMFrameGetRect */
116    CARD16	length;
117    CARD32	frame_style;
118    CARD32	frame_style_ex;
119    CARD16	frame_rect;
120    INT16	ix;
121    INT16	iy;
122    CARD16	iw;
123    CARD16	ih;
124    CARD16	pad1;
125} xWindowsWMFrameGetRectReq;
126#define sz_xWindowsWMFrameGetRectReq	24
127
128typedef struct {
129    BYTE	type;			/* X_Reply */
130    BOOL	pad1;
131    CARD16	sequenceNumber;
132    CARD32	length;
133    INT16	x;
134    INT16	y;
135    CARD16	w;
136    CARD16	h;
137    CARD32	pad3;
138    CARD32	pad4;
139    CARD32	pad5;
140    CARD32	pad6;
141} xWindowsWMFrameGetRectReply;
142#define sz_xWindowsWMFrameGetRectReply	32
143
144typedef struct _WindowsWMFrameDraw {
145    CARD8	reqType;		/* always WMReqCode */
146    CARD8	wmReqType;		/* always X_WMFrameDraw */
147    CARD16	length;
148    CARD32	screen;
149    CARD32	window;
150    CARD32	frame_style;
151    CARD32	frame_style_ex;
152    INT16	ix;
153    INT16	iy;
154    CARD16	iw;
155    CARD16	ih;
156} xWindowsWMFrameDrawReq;
157#define sz_xWindowsWMFrameDrawReq	28
158
159typedef struct _WindowsWMFrameSetTitle {
160    CARD8	reqType;		/* always WMReqCode */
161    CARD8	wmReqType;		/* always X_WMFrameSetTitle */
162    CARD16	length;
163    CARD32	screen;
164    CARD32	window;
165    CARD32	title_length;
166} xWindowsWMFrameSetTitleReq;
167#define sz_xWindowsWMFrameSetTitleReq	16
168
169#endif /* _WINDOWSWMSTR_H_ */
170