| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | #ifndef _APPLEWMPROTO_H_ |
| 29 | #define _APPLEWMPROTO_H_ |
| 30 | |
| 31 | #include <X11/extensions/applewmconst.h> |
| 32 | #include <X11/X.h> |
| 33 | #include <X11/Xmd.h> |
| 34 | |
| 35 | #define APPLEWMNAME "Apple-WM" |
| 36 | |
| 37 | #define APPLE_WM_MAJOR_VERSION 1 |
| 38 | #define APPLE_WM_MINOR_VERSION 3 |
| 39 | #define APPLE_WM_PATCH_VERSION 0 |
| 40 | |
| 41 | #define X_AppleWMQueryVersion 0 |
| 42 | #define X_AppleWMFrameGetRect 1 |
| 43 | #define X_AppleWMFrameHitTest 2 |
| 44 | #define X_AppleWMFrameDraw 3 |
| 45 | #define X_AppleWMDisableUpdate 4 |
| 46 | #define X_AppleWMReenableUpdate 5 |
| 47 | #define X_AppleWMSelectInput 6 |
| 48 | #define X_AppleWMSetWindowMenuCheck 7 |
| 49 | #define X_AppleWMSetFrontProcess 8 |
| 50 | #define X_AppleWMSetWindowLevel 9 |
| 51 | #define X_AppleWMSetCanQuit 10 |
| 52 | #define X_AppleWMSetWindowMenu 11 |
| 53 | #define X_AppleWMSendPSN 12 |
| 54 | #define X_AppleWMAttachTransient 13 |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | #define Window CARD32 |
| 62 | #define Drawable CARD32 |
| 63 | #define Font CARD32 |
| 64 | #define Pixmap CARD32 |
| 65 | #define Cursor CARD32 |
| 66 | #define Colormap CARD32 |
| 67 | #define GContext CARD32 |
| 68 | #define Atom CARD32 |
| 69 | #define VisualID CARD32 |
| 70 | #define Time CARD32 |
| 71 | #define KeyCode CARD8 |
| 72 | #define KeySym CARD32 |
| 73 | |
| 74 | typedef struct _AppleWMQueryVersion { |
| 75 | CARD8 reqType; |
| 76 | CARD8 wmReqType; |
| 77 | CARD16 length; |
| 78 | } xAppleWMQueryVersionReq; |
| 79 | #define sz_xAppleWMQueryVersionReq 4 |
| 80 | |
| 81 | typedef struct { |
| 82 | BYTE type; |
| 83 | BOOL pad1; |
| 84 | CARD16 sequenceNumber; |
| 85 | CARD32 length; |
| 86 | CARD16 majorVersion; |
| 87 | CARD16 minorVersion; |
| 88 | CARD32 patchVersion; |
| 89 | CARD32 pad3; |
| 90 | CARD32 pad4; |
| 91 | CARD32 pad5; |
| 92 | CARD32 pad6; |
| 93 | } xAppleWMQueryVersionReply; |
| 94 | #define sz_xAppleWMQueryVersionReply 32 |
| 95 | |
| 96 | typedef struct _AppleWMDisableUpdate { |
| 97 | CARD8 reqType; |
| 98 | CARD8 wmReqType; |
| 99 | CARD16 length; |
| 100 | CARD32 screen; |
| 101 | } xAppleWMDisableUpdateReq; |
| 102 | #define sz_xAppleWMDisableUpdateReq 8 |
| 103 | |
| 104 | typedef struct _AppleWMReenableUpdate { |
| 105 | CARD8 reqType; |
| 106 | CARD8 wmReqType; |
| 107 | CARD16 length; |
| 108 | CARD32 screen; |
| 109 | } xAppleWMReenableUpdateReq; |
| 110 | #define sz_xAppleWMReenableUpdateReq 8 |
| 111 | |
| 112 | typedef struct _AppleWMSelectInput { |
| 113 | CARD8 reqType; |
| 114 | CARD8 wmReqType; |
| 115 | CARD16 length; |
| 116 | CARD32 mask; |
| 117 | } xAppleWMSelectInputReq; |
| 118 | #define sz_xAppleWMSelectInputReq 8 |
| 119 | |
| 120 | typedef struct _AppleWMNotify { |
| 121 | BYTE type; |
| 122 | BYTE kind; |
| 123 | CARD16 sequenceNumber; |
| 124 | Time time; |
| 125 | CARD16 pad1; |
| 126 | CARD32 arg; |
| 127 | CARD32 pad3; |
| 128 | CARD32 pad4; |
| 129 | CARD32 pad5; |
| 130 | CARD32 pad6; |
| 131 | } xAppleWMNotifyEvent; |
| 132 | #define sz_xAppleWMNotifyEvent 32 |
| 133 | |
| 134 | typedef struct _AppleWMSetWindowMenu { |
| 135 | CARD8 reqType; |
| 136 | CARD8 wmReqType; |
| 137 | CARD16 length; |
| 138 | CARD16 nitems; |
| 139 | CARD16 pad1; |
| 140 | } xAppleWMSetWindowMenuReq; |
| 141 | #define sz_xAppleWMSetWindowMenuReq 8 |
| 142 | |
| 143 | typedef struct _AppleWMSetWindowMenuCheck { |
| 144 | CARD8 reqType; |
| 145 | CARD8 wmReqType; |
| 146 | CARD16 length; |
| 147 | CARD32 index; |
| 148 | } xAppleWMSetWindowMenuCheckReq; |
| 149 | #define sz_xAppleWMSetWindowMenuCheckReq 8 |
| 150 | |
| 151 | typedef struct _AppleWMSetFrontProcess { |
| 152 | CARD8 reqType; |
| 153 | CARD8 wmReqType; |
| 154 | CARD16 length; |
| 155 | } xAppleWMSetFrontProcessReq; |
| 156 | #define sz_xAppleWMSetFrontProcessReq 4 |
| 157 | |
| 158 | typedef struct _AppleWMSetWindowLevel { |
| 159 | CARD8 reqType; |
| 160 | CARD8 wmReqType; |
| 161 | CARD16 length; |
| 162 | CARD32 window; |
| 163 | CARD32 level; |
| 164 | } xAppleWMSetWindowLevelReq; |
| 165 | #define sz_xAppleWMSetWindowLevelReq 12 |
| 166 | |
| 167 | typedef struct _AppleWMSendPSN { |
| 168 | CARD8 reqType; |
| 169 | CARD8 wmReqType; |
| 170 | CARD16 length; |
| 171 | CARD32 psn_hi; |
| 172 | CARD32 psn_lo; |
| 173 | } xAppleWMSendPSNReq; |
| 174 | #define sz_xAppleWMSendPSNReq 12 |
| 175 | |
| 176 | typedef struct _AppleWMAttachTransient { |
| 177 | CARD8 reqType; |
| 178 | CARD8 wmReqType; |
| 179 | CARD16 length; |
| 180 | CARD32 child; |
| 181 | CARD32 parent; |
| 182 | } xAppleWMAttachTransientReq; |
| 183 | #define sz_xAppleWMAttachTransientReq 12 |
| 184 | |
| 185 | typedef struct _AppleWMSetCanQuit { |
| 186 | CARD8 reqType; |
| 187 | CARD8 wmReqType; |
| 188 | CARD16 length; |
| 189 | CARD32 state; |
| 190 | } xAppleWMSetCanQuitReq; |
| 191 | #define sz_xAppleWMSetCanQuitReq 8 |
| 192 | |
| 193 | typedef struct _AppleWMFrameGetRect { |
| 194 | CARD8 reqType; |
| 195 | CARD8 wmReqType; |
| 196 | CARD16 length; |
| 197 | CARD16 frame_class; |
| 198 | CARD16 frame_rect; |
| 199 | CARD16 ix; |
| 200 | CARD16 iy; |
| 201 | CARD16 iw; |
| 202 | CARD16 ih; |
| 203 | CARD16 ox; |
| 204 | CARD16 oy; |
| 205 | CARD16 ow; |
| 206 | CARD16 oh; |
| 207 | } xAppleWMFrameGetRectReq; |
| 208 | #define sz_xAppleWMFrameGetRectReq 24 |
| 209 | |
| 210 | typedef struct { |
| 211 | BYTE type; |
| 212 | BOOL pad1; |
| 213 | CARD16 sequenceNumber; |
| 214 | CARD32 length; |
| 215 | CARD16 x; |
| 216 | CARD16 y; |
| 217 | CARD16 w; |
| 218 | CARD16 h; |
| 219 | CARD32 pad3; |
| 220 | CARD32 pad4; |
| 221 | CARD32 pad5; |
| 222 | CARD32 pad6; |
| 223 | } xAppleWMFrameGetRectReply; |
| 224 | #define sz_xAppleWMFrameGetRectReply 32 |
| 225 | |
| 226 | typedef struct _AppleWMFrameHitTest { |
| 227 | CARD8 reqType; |
| 228 | CARD8 wmReqType; |
| 229 | CARD16 length; |
| 230 | CARD16 frame_class; |
| 231 | CARD16 pad1; |
| 232 | CARD16 px; |
| 233 | CARD16 py; |
| 234 | CARD16 ix; |
| 235 | CARD16 iy; |
| 236 | CARD16 iw; |
| 237 | CARD16 ih; |
| 238 | CARD16 ox; |
| 239 | CARD16 oy; |
| 240 | CARD16 ow; |
| 241 | CARD16 oh; |
| 242 | } xAppleWMFrameHitTestReq; |
| 243 | #define sz_xAppleWMFrameHitTestReq 28 |
| 244 | |
| 245 | typedef struct { |
| 246 | BYTE type; |
| 247 | BOOL pad1; |
| 248 | CARD16 sequenceNumber; |
| 249 | CARD32 length; |
| 250 | CARD32 ret; |
| 251 | CARD32 pad2; |
| 252 | CARD32 pad3; |
| 253 | CARD32 pad4; |
| 254 | CARD32 pad5; |
| 255 | CARD32 pad6; |
| 256 | } xAppleWMFrameHitTestReply; |
| 257 | #define sz_xAppleWMFrameHitTestReply 32 |
| 258 | |
| 259 | typedef struct _AppleWMFrameDraw { |
| 260 | CARD8 reqType; |
| 261 | CARD8 wmReqType; |
| 262 | CARD16 length; |
| 263 | CARD32 screen; |
| 264 | CARD32 window; |
| 265 | CARD16 frame_class; |
| 266 | CARD16 frame_attr; |
| 267 | CARD16 ix; |
| 268 | CARD16 iy; |
| 269 | CARD16 iw; |
| 270 | CARD16 ih; |
| 271 | CARD16 ox; |
| 272 | CARD16 oy; |
| 273 | CARD16 ow; |
| 274 | CARD16 oh; |
| 275 | CARD32 title_length; |
| 276 | } xAppleWMFrameDrawReq; |
| 277 | #define sz_xAppleWMFrameDrawReq 36 |
| 278 | |
| 279 | |
| 280 | #undef Window |
| 281 | #undef Drawable |
| 282 | #undef Font |
| 283 | #undef Pixmap |
| 284 | #undef Cursor |
| 285 | #undef Colormap |
| 286 | #undef GContext |
| 287 | #undef Atom |
| 288 | #undef VisualID |
| 289 | #undef Time |
| 290 | #undef KeyCode |
| 291 | #undef KeySym |
| 292 | |
| 293 | #endif |