14456fccdSmrg/* 2a7e741d5Smrg * Copyright (c) 2006, Oracle and/or its affiliates. 3b0a0317aSmrg * Copyright 2011, 2021 Red Hat, Inc. 44456fccdSmrg * 5521070a0Smrg * Permission is hereby granted, free of charge, to any person obtaining a 6521070a0Smrg * copy of this software and associated documentation files (the "Software"), 7521070a0Smrg * to deal in the Software without restriction, including without limitation 8521070a0Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9521070a0Smrg * and/or sell copies of the Software, and to permit persons to whom the 10521070a0Smrg * Software is furnished to do so, subject to the following conditions: 114456fccdSmrg * 12521070a0Smrg * The above copyright notice and this permission notice (including the next 13521070a0Smrg * paragraph) shall be included in all copies or substantial portions of the 14521070a0Smrg * Software. 154456fccdSmrg * 16521070a0Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17521070a0Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18521070a0Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19521070a0Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20521070a0Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21521070a0Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22521070a0Smrg * DEALINGS IN THE SOFTWARE. 23521070a0Smrg */ 24521070a0Smrg/* 254456fccdSmrg * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. 264456fccdSmrg * 274456fccdSmrg * Permission to use, copy, modify, distribute, and sell this software and its 284456fccdSmrg * documentation for any purpose is hereby granted without fee, provided that 294456fccdSmrg * the above copyright notice appear in all copies and that both that 304456fccdSmrg * copyright notice and this permission notice appear in supporting 314456fccdSmrg * documentation, and that the name of Keith Packard not be used in 324456fccdSmrg * advertising or publicity pertaining to distribution of the software without 334456fccdSmrg * specific, written prior permission. Keith Packard makes no 344456fccdSmrg * representations about the suitability of this software for any purpose. It 354456fccdSmrg * is provided "as is" without express or implied warranty. 364456fccdSmrg * 374456fccdSmrg * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 384456fccdSmrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 394456fccdSmrg * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 404456fccdSmrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 414456fccdSmrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 424456fccdSmrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 434456fccdSmrg * PERFORMANCE OF THIS SOFTWARE. 444456fccdSmrg */ 454456fccdSmrg 464456fccdSmrg#ifndef _XFIXES_H_ 474456fccdSmrg#define _XFIXES_H_ 484456fccdSmrg 494456fccdSmrg#include <X11/extensions/xfixeswire.h> 504456fccdSmrg 514456fccdSmrg#include <X11/Xfuncproto.h> 524456fccdSmrg#include <X11/Xlib.h> 534456fccdSmrg 544456fccdSmrg/* 554456fccdSmrg * This revision number also appears in configure.ac, they have 564456fccdSmrg * to be manually synchronized 574456fccdSmrg */ 584456fccdSmrg#define XFIXES_REVISION 1 594456fccdSmrg#define XFIXES_VERSION ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION)) 604456fccdSmrg 614456fccdSmrgtypedef struct { 624456fccdSmrg int type; /* event base */ 634456fccdSmrg unsigned long serial; 644456fccdSmrg Bool send_event; 654456fccdSmrg Display *display; 664456fccdSmrg Window window; 674456fccdSmrg int subtype; 684456fccdSmrg Window owner; 694456fccdSmrg Atom selection; 704456fccdSmrg Time timestamp; 714456fccdSmrg Time selection_timestamp; 724456fccdSmrg} XFixesSelectionNotifyEvent; 734456fccdSmrg 744456fccdSmrgtypedef struct { 754456fccdSmrg int type; /* event base */ 764456fccdSmrg unsigned long serial; 774456fccdSmrg Bool send_event; 784456fccdSmrg Display *display; 794456fccdSmrg Window window; 804456fccdSmrg int subtype; 814456fccdSmrg unsigned long cursor_serial; 824456fccdSmrg Time timestamp; 834456fccdSmrg Atom cursor_name; 844456fccdSmrg} XFixesCursorNotifyEvent; 854456fccdSmrg 864456fccdSmrgtypedef struct { 874456fccdSmrg short x, y; 884456fccdSmrg unsigned short width, height; 894456fccdSmrg unsigned short xhot, yhot; 904456fccdSmrg unsigned long cursor_serial; 914456fccdSmrg unsigned long *pixels; 924456fccdSmrg#if XFIXES_MAJOR >= 2 934456fccdSmrg Atom atom; /* Version >= 2 only */ 944456fccdSmrg const char *name; /* Version >= 2 only */ 954456fccdSmrg#endif 964456fccdSmrg} XFixesCursorImage; 974456fccdSmrg 984456fccdSmrg#if XFIXES_MAJOR >= 2 994456fccdSmrg/* Version 2 types */ 1004456fccdSmrg 1014456fccdSmrgtypedef XID XserverRegion; 1024456fccdSmrg 1034456fccdSmrgtypedef struct { 1044456fccdSmrg short x, y; 1054456fccdSmrg unsigned short width, height; 1064456fccdSmrg unsigned short xhot, yhot; 1074456fccdSmrg unsigned long cursor_serial; 1084456fccdSmrg unsigned long *pixels; 1094456fccdSmrg Atom atom; 1104456fccdSmrg const char *name; 1114456fccdSmrg} XFixesCursorImageAndName; 1124456fccdSmrg 1134456fccdSmrg#endif 1144456fccdSmrg 1154456fccdSmrg_XFUNCPROTOBEGIN 1164456fccdSmrg 11742d69509SmrgBool XFixesQueryExtension (Display *dpy, 11842d69509Smrg int *event_base_return, 11942d69509Smrg int *error_base_return); 1204456fccdSmrgStatus XFixesQueryVersion (Display *dpy, 12142d69509Smrg int *major_version_return, 12242d69509Smrg int *minor_version_return); 1234456fccdSmrg 1244456fccdSmrgint XFixesVersion (void); 1254456fccdSmrg 1264456fccdSmrgvoid 1274456fccdSmrgXFixesChangeSaveSet (Display *dpy, 1284456fccdSmrg Window win, 1294456fccdSmrg int mode, 1304456fccdSmrg int target, 1314456fccdSmrg int map); 1324456fccdSmrg 1334456fccdSmrgvoid 1344456fccdSmrgXFixesSelectSelectionInput (Display *dpy, 1354456fccdSmrg Window win, 1363e6c936aSmrg Atom selection, 1374456fccdSmrg unsigned long eventMask); 1384456fccdSmrg 1394456fccdSmrgvoid 1404456fccdSmrgXFixesSelectCursorInput (Display *dpy, 1414456fccdSmrg Window win, 1424456fccdSmrg unsigned long eventMask); 1434456fccdSmrg 1444456fccdSmrgXFixesCursorImage * 1454456fccdSmrgXFixesGetCursorImage (Display *dpy); 1464456fccdSmrg 1474456fccdSmrg#if XFIXES_MAJOR >= 2 1484456fccdSmrg/* Version 2 functions */ 1494456fccdSmrg 1504456fccdSmrgXserverRegion 1514456fccdSmrgXFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles); 1524456fccdSmrg 1534456fccdSmrgXserverRegion 1544456fccdSmrgXFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap); 1554456fccdSmrg 1564456fccdSmrgXserverRegion 1574456fccdSmrgXFixesCreateRegionFromWindow (Display *dpy, Window window, int kind); 1584456fccdSmrg 1594456fccdSmrgXserverRegion 1604456fccdSmrgXFixesCreateRegionFromGC (Display *dpy, GC gc); 1614456fccdSmrg 1624456fccdSmrgXserverRegion 1634456fccdSmrgXFixesCreateRegionFromPicture (Display *dpy, XID picture); 1644456fccdSmrg 1654456fccdSmrgvoid 1664456fccdSmrgXFixesDestroyRegion (Display *dpy, XserverRegion region); 1674456fccdSmrg 1684456fccdSmrgvoid 1694456fccdSmrgXFixesSetRegion (Display *dpy, XserverRegion region, 1704456fccdSmrg XRectangle *rectangles, int nrectangles); 1714456fccdSmrg 1724456fccdSmrgvoid 1734456fccdSmrgXFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src); 1744456fccdSmrg 1754456fccdSmrgvoid 1764456fccdSmrgXFixesUnionRegion (Display *dpy, XserverRegion dst, 1774456fccdSmrg XserverRegion src1, XserverRegion src2); 1784456fccdSmrg 1794456fccdSmrgvoid 1804456fccdSmrgXFixesIntersectRegion (Display *dpy, XserverRegion dst, 1814456fccdSmrg XserverRegion src1, XserverRegion src2); 1824456fccdSmrg 1834456fccdSmrgvoid 1844456fccdSmrgXFixesSubtractRegion (Display *dpy, XserverRegion dst, 1854456fccdSmrg XserverRegion src1, XserverRegion src2); 1864456fccdSmrg 1874456fccdSmrgvoid 1884456fccdSmrgXFixesInvertRegion (Display *dpy, XserverRegion dst, 1894456fccdSmrg XRectangle *rect, XserverRegion src); 1904456fccdSmrg 1914456fccdSmrgvoid 1924456fccdSmrgXFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy); 1934456fccdSmrg 1944456fccdSmrgvoid 1954456fccdSmrgXFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src); 1964456fccdSmrg 1974456fccdSmrgXRectangle * 1984456fccdSmrgXFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet); 1994456fccdSmrg 2004456fccdSmrgXRectangle * 2013e6c936aSmrgXFixesFetchRegionAndBounds (Display *dpy, XserverRegion region, 2024456fccdSmrg int *nrectanglesRet, 2034456fccdSmrg XRectangle *bounds); 2044456fccdSmrg 2054456fccdSmrgvoid 2063e6c936aSmrgXFixesSetGCClipRegion (Display *dpy, GC gc, 2074456fccdSmrg int clip_x_origin, int clip_y_origin, 2084456fccdSmrg XserverRegion region); 2094456fccdSmrg 2104456fccdSmrgvoid 2114456fccdSmrgXFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind, 2124456fccdSmrg int x_off, int y_off, XserverRegion region); 2134456fccdSmrg 2144456fccdSmrgvoid 2154456fccdSmrgXFixesSetPictureClipRegion (Display *dpy, XID picture, 2164456fccdSmrg int clip_x_origin, int clip_y_origin, 2174456fccdSmrg XserverRegion region); 2184456fccdSmrg 2194456fccdSmrgvoid 2204456fccdSmrgXFixesSetCursorName (Display *dpy, Cursor cursor, const char *name); 2214456fccdSmrg 2224456fccdSmrgconst char * 2234456fccdSmrgXFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom); 2244456fccdSmrg 2254456fccdSmrgvoid 2264456fccdSmrgXFixesChangeCursor (Display *dpy, Cursor source, Cursor destination); 2274456fccdSmrg 2284456fccdSmrgvoid 2294456fccdSmrgXFixesChangeCursorByName (Display *dpy, Cursor source, const char *name); 2304456fccdSmrg 2314456fccdSmrg#endif /* XFIXES_MAJOR >= 2 */ 2324456fccdSmrg 2334456fccdSmrg#if XFIXES_MAJOR >= 3 2344456fccdSmrg 2354456fccdSmrgvoid 2364456fccdSmrgXFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src, 2374456fccdSmrg unsigned left, unsigned right, 2384456fccdSmrg unsigned top, unsigned bottom); 2394456fccdSmrg 2404456fccdSmrg#endif /* XFIXES_MAJOR >= 3 */ 2414456fccdSmrg 2424456fccdSmrg#if XFIXES_MAJOR >= 4 2434456fccdSmrg/* Version 4.0 externs */ 2444456fccdSmrg 2454456fccdSmrgvoid 2464456fccdSmrgXFixesHideCursor (Display *dpy, Window win); 2474456fccdSmrg 2484456fccdSmrgvoid 2494456fccdSmrgXFixesShowCursor (Display *dpy, Window win); 2504456fccdSmrg 2514456fccdSmrg#endif /* XFIXES_MAJOR >= 4 */ 2524456fccdSmrg 253ff63a143Smrg#if XFIXES_MAJOR >= 5 254ff63a143Smrg 255ff63a143Smrgtypedef XID PointerBarrier; 256ff63a143Smrg 257ff63a143SmrgPointerBarrier 258ff63a143SmrgXFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1, 259ff63a143Smrg int x2, int y2, int directions, 260ff63a143Smrg int num_devices, int *devices); 261ff63a143Smrg 262ff63a143Smrgvoid 263ff63a143SmrgXFixesDestroyPointerBarrier(Display *dpy, PointerBarrier b); 264ff63a143Smrg 265ff63a143Smrg#endif /* XFIXES_MAJOR >= 5 */ 266ff63a143Smrg 267b0a0317aSmrg#if XFIXES_MAJOR >= 6 268b0a0317aSmrg 269b0a0317aSmrgvoid 270b0a0317aSmrgXFixesSetClientDisconnectMode(Display *dpy, int disconnect_mode); 271b0a0317aSmrg 272b0a0317aSmrgint 273b0a0317aSmrgXFixesGetClientDisconnectMode(Display *dpy); 274b0a0317aSmrg 275b0a0317aSmrg#endif /* XFIXES_MAJOR >= 6 */ 276b0a0317aSmrg 2774456fccdSmrg_XFUNCPROTOEND 2784456fccdSmrg 2794456fccdSmrg#endif /* _XFIXES_H_ */ 280