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