Path: blob/master/thirdparty/linuxbsd_headers/X11/extensions/Xfixes.h
9905 views
/*1* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.2* Copyright 2011, 2021 Red Hat, Inc.3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Software"),6* to deal in the Software without restriction, including without limitation7* the rights to use, copy, modify, merge, publish, distribute, sublicense,8* and/or sell copies of the Software, and to permit persons to whom the9* Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the next12* paragraph) shall be included in all copies or substantial portions of the13* Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL18* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING20* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER21* DEALINGS IN THE SOFTWARE.22*/23/*24* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.25*26* Permission to use, copy, modify, distribute, and sell this software and its27* documentation for any purpose is hereby granted without fee, provided that28* the above copyright notice appear in all copies and that both that29* copyright notice and this permission notice appear in supporting30* documentation, and that the name of Keith Packard not be used in31* advertising or publicity pertaining to distribution of the software without32* specific, written prior permission. Keith Packard makes no33* representations about the suitability of this software for any purpose. It34* is provided "as is" without express or implied warranty.35*36* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,37* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO38* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR39* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,40* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER41* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR42* PERFORMANCE OF THIS SOFTWARE.43*/4445#ifndef _XFIXES_H_46#define _XFIXES_H_4748#include <X11/extensions/xfixeswire.h>4950#include <X11/Xfuncproto.h>51#include <X11/Xlib.h>5253/*54* This revision number also appears in configure.ac, they have55* to be manually synchronized56*/57#define XFIXES_REVISION 158#define XFIXES_VERSION ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION))5960typedef struct {61int type; /* event base */62unsigned long serial;63Bool send_event;64Display *display;65Window window;66int subtype;67Window owner;68Atom selection;69Time timestamp;70Time selection_timestamp;71} XFixesSelectionNotifyEvent;7273typedef struct {74int type; /* event base */75unsigned long serial;76Bool send_event;77Display *display;78Window window;79int subtype;80unsigned long cursor_serial;81Time timestamp;82Atom cursor_name;83} XFixesCursorNotifyEvent;8485typedef struct {86short x, y;87unsigned short width, height;88unsigned short xhot, yhot;89unsigned long cursor_serial;90unsigned long *pixels;91#if XFIXES_MAJOR >= 292Atom atom; /* Version >= 2 only */93const char *name; /* Version >= 2 only */94#endif95} XFixesCursorImage;9697#if XFIXES_MAJOR >= 298/* Version 2 types */99100typedef XID XserverRegion;101102typedef struct {103short x, y;104unsigned short width, height;105unsigned short xhot, yhot;106unsigned long cursor_serial;107unsigned long *pixels;108Atom atom;109const char *name;110} XFixesCursorImageAndName;111112#endif113114_XFUNCPROTOBEGIN115116Bool XFixesQueryExtension (Display *dpy,117int *event_base_return,118int *error_base_return);119Status XFixesQueryVersion (Display *dpy,120int *major_version_return,121int *minor_version_return);122123int XFixesVersion (void);124125void126XFixesChangeSaveSet (Display *dpy,127Window win,128int mode,129int target,130int map);131132void133XFixesSelectSelectionInput (Display *dpy,134Window win,135Atom selection,136unsigned long eventMask);137138void139XFixesSelectCursorInput (Display *dpy,140Window win,141unsigned long eventMask);142143XFixesCursorImage *144XFixesGetCursorImage (Display *dpy);145146#if XFIXES_MAJOR >= 2147/* Version 2 functions */148149XserverRegion150XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles);151152XserverRegion153XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap);154155XserverRegion156XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind);157158XserverRegion159XFixesCreateRegionFromGC (Display *dpy, GC gc);160161XserverRegion162XFixesCreateRegionFromPicture (Display *dpy, XID picture);163164void165XFixesDestroyRegion (Display *dpy, XserverRegion region);166167void168XFixesSetRegion (Display *dpy, XserverRegion region,169XRectangle *rectangles, int nrectangles);170171void172XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src);173174void175XFixesUnionRegion (Display *dpy, XserverRegion dst,176XserverRegion src1, XserverRegion src2);177178void179XFixesIntersectRegion (Display *dpy, XserverRegion dst,180XserverRegion src1, XserverRegion src2);181182void183XFixesSubtractRegion (Display *dpy, XserverRegion dst,184XserverRegion src1, XserverRegion src2);185186void187XFixesInvertRegion (Display *dpy, XserverRegion dst,188XRectangle *rect, XserverRegion src);189190void191XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy);192193void194XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src);195196XRectangle *197XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet);198199XRectangle *200XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region,201int *nrectanglesRet,202XRectangle *bounds);203204void205XFixesSetGCClipRegion (Display *dpy, GC gc,206int clip_x_origin, int clip_y_origin,207XserverRegion region);208209void210XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind,211int x_off, int y_off, XserverRegion region);212213void214XFixesSetPictureClipRegion (Display *dpy, XID picture,215int clip_x_origin, int clip_y_origin,216XserverRegion region);217218void219XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name);220221const char *222XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom);223224void225XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination);226227void228XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name);229230#endif /* XFIXES_MAJOR >= 2 */231232#if XFIXES_MAJOR >= 3233234void235XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src,236unsigned left, unsigned right,237unsigned top, unsigned bottom);238239#endif /* XFIXES_MAJOR >= 3 */240241#if XFIXES_MAJOR >= 4242/* Version 4.0 externs */243244void245XFixesHideCursor (Display *dpy, Window win);246247void248XFixesShowCursor (Display *dpy, Window win);249250#endif /* XFIXES_MAJOR >= 4 */251252#if XFIXES_MAJOR >= 5253254typedef XID PointerBarrier;255256PointerBarrier257XFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1,258int x2, int y2, int directions,259int num_devices, int *devices);260261void262XFixesDestroyPointerBarrier(Display *dpy, PointerBarrier b);263264#endif /* XFIXES_MAJOR >= 5 */265266#if XFIXES_MAJOR >= 6267268void269XFixesSetClientDisconnectMode(Display *dpy, int disconnect_mode);270271int272XFixesGetClientDisconnectMode(Display *dpy);273274#endif /* XFIXES_MAJOR >= 6 */275276_XFUNCPROTOEND277278#endif /* _XFIXES_H_ */279280281