1/* 2 * Copyright (c) 2006, Oracle and/or its affiliates. 3 * Copyright 2010 Red Hat, Inc. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice (including the next 13 * paragraph) shall be included in all copies or substantial portions of the 14 * Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 * DEALINGS IN THE SOFTWARE. 23 */ 24/* 25 * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. 26 * 27 * Permission to use, copy, modify, distribute, and sell this software and its 28 * documentation for any purpose is hereby granted without fee, provided that 29 * the above copyright notice appear in all copies and that both that 30 * copyright notice and this permission notice appear in supporting 31 * documentation, and that the name of Keith Packard not be used in 32 * advertising or publicity pertaining to distribution of the software without 33 * specific, written prior permission. Keith Packard makes no 34 * representations about the suitability of this software for any purpose. It 35 * is provided "as is" without express or implied warranty. 36 * 37 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 38 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 39 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 40 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 41 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 42 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 43 * PERFORMANCE OF THIS SOFTWARE. 44 */ 45 46#ifndef _XFIXESPROTO_H_ 47#define _XFIXESPROTO_H_ 48 49#include <X11/Xmd.h> 50#include <X11/extensions/xfixeswire.h> 51#include <X11/extensions/shapeconst.h> 52 53#define Window CARD32 54#define Drawable CARD32 55#define Font CARD32 56#define Pixmap CARD32 57#define Cursor CARD32 58#define Colormap CARD32 59#define GContext CARD32 60#define Atom CARD32 61#define VisualID CARD32 62#define Time CARD32 63#define KeyCode CARD8 64#define KeySym CARD32 65#define Picture CARD32 66 67/*************** Version 1 ******************/ 68 69typedef struct { 70 CARD8 reqType; 71 CARD8 xfixesReqType; 72 CARD16 length; 73} xXFixesReq; 74 75/* 76 * requests and replies 77 */ 78typedef struct { 79 CARD8 reqType; 80 CARD8 xfixesReqType; 81 CARD16 length; 82 CARD32 majorVersion; 83 CARD32 minorVersion; 84} xXFixesQueryVersionReq; 85 86#define sz_xXFixesQueryVersionReq 12 87 88typedef struct { 89 BYTE type; /* X_Reply */ 90 BYTE pad1; 91 CARD16 sequenceNumber; 92 CARD32 length; 93 CARD32 majorVersion; 94 CARD32 minorVersion; 95 CARD32 pad2; 96 CARD32 pad3; 97 CARD32 pad4; 98 CARD32 pad5; 99} xXFixesQueryVersionReply; 100 101#define sz_xXFixesQueryVersionReply 32 102 103typedef struct { 104 CARD8 reqType; 105 CARD8 xfixesReqType; 106 CARD16 length; 107 BYTE mode; /* SetModeInsert/SetModeDelete*/ 108 BYTE target; /* SaveSetNearest/SaveSetRoot*/ 109 BYTE map; /* SaveSetMap/SaveSetUnmap */ 110 BYTE pad1; 111 Window window; 112} xXFixesChangeSaveSetReq; 113 114#define sz_xXFixesChangeSaveSetReq 12 115 116typedef struct { 117 CARD8 reqType; 118 CARD8 xfixesReqType; 119 CARD16 length; 120 Window window; 121 Atom selection; 122 CARD32 eventMask; 123} xXFixesSelectSelectionInputReq; 124 125#define sz_xXFixesSelectSelectionInputReq 16 126 127typedef struct { 128 CARD8 type; 129 CARD8 subtype; 130 CARD16 sequenceNumber; 131 Window window; 132 Window owner; 133 Atom selection; 134 Time timestamp; 135 Time selectionTimestamp; 136 CARD32 pad2; 137 CARD32 pad3; 138} xXFixesSelectionNotifyEvent; 139 140typedef struct { 141 CARD8 reqType; 142 CARD8 xfixesReqType; 143 CARD16 length; 144 Window window; 145 CARD32 eventMask; 146} xXFixesSelectCursorInputReq; 147 148#define sz_xXFixesSelectCursorInputReq 12 149 150typedef struct { 151 CARD8 type; 152 CARD8 subtype; 153 CARD16 sequenceNumber; 154 Window window; 155 CARD32 cursorSerial; 156 Time timestamp; 157 Atom name; /* Version 2 */ 158 CARD32 pad1; 159 CARD32 pad2; 160 CARD32 pad3; 161} xXFixesCursorNotifyEvent; 162 163typedef struct { 164 CARD8 reqType; 165 CARD8 xfixesReqType; 166 CARD16 length; 167} xXFixesGetCursorImageReq; 168 169#define sz_xXFixesGetCursorImageReq 4 170 171typedef struct { 172 BYTE type; /* X_Reply */ 173 BYTE pad1; 174 CARD16 sequenceNumber; 175 CARD32 length; 176 INT16 x; 177 INT16 y; 178 CARD16 width; 179 CARD16 height; 180 CARD16 xhot; 181 CARD16 yhot; 182 CARD32 cursorSerial; 183 CARD32 pad2; 184 CARD32 pad3; 185} xXFixesGetCursorImageReply; 186 187#define sz_xXFixesGetCursorImageReply 32 188 189/*************** Version 2 ******************/ 190 191#define Region CARD32 192 193typedef struct { 194 CARD8 reqType; 195 CARD8 xfixesReqType; 196 CARD16 length; 197 Region region; 198 /* LISTofRECTANGLE */ 199} xXFixesCreateRegionReq; 200 201#define sz_xXFixesCreateRegionReq 8 202 203typedef struct { 204 CARD8 reqType; 205 CARD8 xfixesReqType; 206 CARD16 length; 207 Region region; 208 Pixmap bitmap; 209} xXFixesCreateRegionFromBitmapReq; 210 211#define sz_xXFixesCreateRegionFromBitmapReq 12 212 213typedef struct { 214 CARD8 reqType; 215 CARD8 xfixesReqType; 216 CARD16 length; 217 Region region; 218 Window window; 219 CARD8 kind; 220 CARD8 pad1; 221 CARD16 pad2; 222} xXFixesCreateRegionFromWindowReq; 223 224#define sz_xXFixesCreateRegionFromWindowReq 16 225 226typedef struct { 227 CARD8 reqType; 228 CARD8 xfixesReqType; 229 CARD16 length; 230 Region region; 231 GContext gc; 232} xXFixesCreateRegionFromGCReq; 233 234#define sz_xXFixesCreateRegionFromGCReq 12 235 236typedef struct { 237 CARD8 reqType; 238 CARD8 xfixesReqType; 239 CARD16 length; 240 Region region; 241 Picture picture; 242} xXFixesCreateRegionFromPictureReq; 243 244#define sz_xXFixesCreateRegionFromPictureReq 12 245 246typedef struct { 247 CARD8 reqType; 248 CARD8 xfixesReqType; 249 CARD16 length; 250 Region region; 251} xXFixesDestroyRegionReq; 252 253#define sz_xXFixesDestroyRegionReq 8 254 255typedef struct { 256 CARD8 reqType; 257 CARD8 xfixesReqType; 258 CARD16 length; 259 Region region; 260 /* LISTofRECTANGLE */ 261} xXFixesSetRegionReq; 262 263#define sz_xXFixesSetRegionReq 8 264 265typedef struct { 266 CARD8 reqType; 267 CARD8 xfixesReqType; 268 CARD16 length; 269 Region source; 270 Region destination; 271} xXFixesCopyRegionReq; 272 273#define sz_xXFixesCopyRegionReq 12 274 275typedef struct { 276 CARD8 reqType; 277 CARD8 xfixesReqType; 278 CARD16 length; 279 Region source1; 280 Region source2; 281 Region destination; 282} xXFixesCombineRegionReq, 283 xXFixesUnionRegionReq, 284 xXFixesIntersectRegionReq, 285 xXFixesSubtractRegionReq; 286 287#define sz_xXFixesCombineRegionReq 16 288#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq 289#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq 290#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq 291 292typedef struct { 293 CARD8 reqType; 294 CARD8 xfixesReqType; 295 CARD16 length; 296 Region source; 297 INT16 x, y; 298 CARD16 width, height; 299 Region destination; 300} xXFixesInvertRegionReq; 301 302#define sz_xXFixesInvertRegionReq 20 303 304typedef struct { 305 CARD8 reqType; 306 CARD8 xfixesReqType; 307 CARD16 length; 308 Region region; 309 INT16 dx, dy; 310} xXFixesTranslateRegionReq; 311 312#define sz_xXFixesTranslateRegionReq 12 313 314typedef struct { 315 CARD8 reqType; 316 CARD8 xfixesReqType; 317 CARD16 length; 318 Region source; 319 Region destination; 320} xXFixesRegionExtentsReq; 321 322#define sz_xXFixesRegionExtentsReq 12 323 324typedef struct { 325 CARD8 reqType; 326 CARD8 xfixesReqType; 327 CARD16 length; 328 Region region; 329} xXFixesFetchRegionReq; 330 331#define sz_xXFixesFetchRegionReq 8 332 333typedef struct { 334 BYTE type; /* X_Reply */ 335 BYTE pad1; 336 CARD16 sequenceNumber; 337 CARD32 length; 338 INT16 x, y; 339 CARD16 width, height; 340 CARD32 pad2; 341 CARD32 pad3; 342 CARD32 pad4; 343 CARD32 pad5; 344} xXFixesFetchRegionReply; 345 346#define sz_xXFixesFetchRegionReply 32 347 348typedef struct { 349 CARD8 reqType; 350 CARD8 xfixesReqType; 351 CARD16 length; 352 GContext gc; 353 Region region; 354 INT16 xOrigin, yOrigin; 355} xXFixesSetGCClipRegionReq; 356 357#define sz_xXFixesSetGCClipRegionReq 16 358 359typedef struct { 360 CARD8 reqType; 361 CARD8 xfixesReqType; 362 CARD16 length; 363 Window dest; 364 BYTE destKind; 365 CARD8 pad1; 366 CARD16 pad2; 367 INT16 xOff, yOff; 368 Region region; 369} xXFixesSetWindowShapeRegionReq; 370 371#define sz_xXFixesSetWindowShapeRegionReq 20 372 373typedef struct { 374 CARD8 reqType; 375 CARD8 xfixesReqType; 376 CARD16 length; 377 Picture picture; 378 Region region; 379 INT16 xOrigin, yOrigin; 380} xXFixesSetPictureClipRegionReq; 381 382#define sz_xXFixesSetPictureClipRegionReq 16 383 384typedef struct { 385 CARD8 reqType; 386 CARD8 xfixesReqType; 387 CARD16 length; 388 Cursor cursor; 389 CARD16 nbytes; 390 CARD16 pad; 391} xXFixesSetCursorNameReq; 392 393#define sz_xXFixesSetCursorNameReq 12 394 395typedef struct { 396 CARD8 reqType; 397 CARD8 xfixesReqType; 398 CARD16 length; 399 Cursor cursor; 400} xXFixesGetCursorNameReq; 401 402#define sz_xXFixesGetCursorNameReq 8 403 404typedef struct { 405 BYTE type; /* X_Reply */ 406 BYTE pad1; 407 CARD16 sequenceNumber; 408 CARD32 length; 409 Atom atom; 410 CARD16 nbytes; 411 CARD16 pad2; 412 CARD32 pad3; 413 CARD32 pad4; 414 CARD32 pad5; 415 CARD32 pad6; 416} xXFixesGetCursorNameReply; 417 418#define sz_xXFixesGetCursorNameReply 32 419 420typedef struct { 421 CARD8 reqType; 422 CARD8 xfixesReqType; 423 CARD16 length; 424} xXFixesGetCursorImageAndNameReq; 425 426#define sz_xXFixesGetCursorImageAndNameReq 4 427 428typedef struct { 429 BYTE type; /* X_Reply */ 430 BYTE pad1; 431 CARD16 sequenceNumber; 432 CARD32 length; 433 INT16 x; 434 INT16 y; 435 CARD16 width; 436 CARD16 height; 437 CARD16 xhot; 438 CARD16 yhot; 439 CARD32 cursorSerial; 440 Atom cursorName; 441 CARD16 nbytes; 442 CARD16 pad; 443} xXFixesGetCursorImageAndNameReply; 444 445#define sz_xXFixesGetCursorImageAndNameReply 32 446 447typedef struct { 448 CARD8 reqType; 449 CARD8 xfixesReqType; 450 CARD16 length; 451 Cursor source; 452 Cursor destination; 453} xXFixesChangeCursorReq; 454 455#define sz_xXFixesChangeCursorReq 12 456 457typedef struct { 458 CARD8 reqType; 459 CARD8 xfixesReqType; 460 CARD16 length; 461 Cursor source; 462 CARD16 nbytes; 463 CARD16 pad; 464} xXFixesChangeCursorByNameReq; 465 466#define sz_xXFixesChangeCursorByNameReq 12 467 468/*************** Version 3 ******************/ 469 470typedef struct { 471 CARD8 reqType; 472 CARD8 xfixesReqType; 473 CARD16 length; 474 Region source; 475 Region destination; 476 CARD16 left; 477 CARD16 right; 478 CARD16 top; 479 CARD16 bottom; 480} xXFixesExpandRegionReq; 481 482#define sz_xXFixesExpandRegionReq 20 483 484/*************** Version 4.0 ******************/ 485 486typedef struct { 487 CARD8 reqType; 488 CARD8 xfixesReqType; 489 CARD16 length; 490 Window window; 491} xXFixesHideCursorReq; 492 493#define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq) 494 495typedef struct { 496 CARD8 reqType; 497 CARD8 xfixesReqType; 498 CARD16 length; 499 Window window; 500} xXFixesShowCursorReq; 501 502#define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq) 503 504/*************** Version 5.0 ******************/ 505 506#define Barrier CARD32 507 508typedef struct { 509 CARD8 reqType; 510 CARD8 xfixesReqType; 511 CARD16 length; 512 Barrier barrier; 513 Window window; 514 INT16 x1; 515 INT16 y1; 516 INT16 x2; 517 INT16 y2; 518 CARD32 directions; 519 CARD16 pad; 520 CARD16 num_devices; 521 /* array of CARD16 devices */ 522} xXFixesCreatePointerBarrierReq; 523 524#define sz_xXFixesCreatePointerBarrierReq 28 525 526typedef struct { 527 CARD8 reqType; 528 CARD8 xfixesReqType; 529 CARD16 length; 530 Barrier barrier; 531} xXFixesDestroyPointerBarrierReq; 532 533#define sz_xXFixesDestroyPointerBarrierReq 8 534 535/*************** Version 6.0 ******************/ 536 537typedef struct { 538 CARD8 reqType; 539 CARD8 xfixesReqType; 540 CARD16 length; 541 CARD32 disconnect_mode; 542} xXFixesSetClientDisconnectModeReq; 543 544#define sz_xXFixesSetClientDisconnectModeReq 8 545 546typedef struct { 547 CARD8 reqType; 548 CARD8 xfixesReqType; 549 CARD16 length; 550} xXFixesGetClientDisconnectModeReq; 551 552#define sz_xXFixesGetClientDisconnectModeReq 4 553 554typedef struct { 555 BYTE type; /* X_Reply */ 556 CARD8 pad0; 557 CARD16 sequenceNumber; 558 CARD32 length; 559 CARD32 disconnect_mode; 560 CARD32 pad1; 561 CARD32 pad2; 562 CARD32 pad3; 563 CARD32 pad4; 564 CARD32 pad5; 565} xXFixesGetClientDisconnectModeReply; 566 567#define sz_xXFixesGetClientDisconnectModeReply 32 568 569#undef Barrier 570#undef Region 571#undef Picture 572#undef Window 573#undef Drawable 574#undef Font 575#undef Pixmap 576#undef Cursor 577#undef Colormap 578#undef GContext 579#undef Atom 580#undef VisualID 581#undef Time 582#undef KeyCode 583#undef KeySym 584 585#endif /* _XFIXESPROTO_H_ */ 586