Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 09:29:39

0001 /*
0002  * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
0003  * Copyright 2011 Red Hat, Inc.
0004  *
0005  * Permission is hereby granted, free of charge, to any person obtaining a
0006  * copy of this software and associated documentation files (the "Software"),
0007  * to deal in the Software without restriction, including without limitation
0008  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0009  * and/or sell copies of the Software, and to permit persons to whom the
0010  * Software is furnished to do so, subject to the following conditions:
0011  *
0012  * The above copyright notice and this permission notice (including the next
0013  * paragraph) shall be included in all copies or substantial portions of the
0014  * Software.
0015  *
0016  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0017  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0018  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0019  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0020  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0021  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0022  * DEALINGS IN THE SOFTWARE.
0023  */
0024 /*
0025  * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
0026  *
0027  * Permission to use, copy, modify, distribute, and sell this software and its
0028  * documentation for any purpose is hereby granted without fee, provided that
0029  * the above copyright notice appear in all copies and that both that
0030  * copyright notice and this permission notice appear in supporting
0031  * documentation, and that the name of Keith Packard not be used in
0032  * advertising or publicity pertaining to distribution of the software without
0033  * specific, written prior permission.  Keith Packard makes no
0034  * representations about the suitability of this software for any purpose.  It
0035  * is provided "as is" without express or implied warranty.
0036  *
0037  * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
0038  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
0039  * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
0040  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
0041  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
0042  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
0043  * PERFORMANCE OF THIS SOFTWARE.
0044  */
0045 
0046 #ifndef _XFIXES_H_
0047 #define _XFIXES_H_
0048 
0049 #include <X11/extensions/xfixeswire.h>
0050 
0051 #include <X11/Xfuncproto.h>
0052 #include <X11/Xlib.h>
0053 
0054 /*
0055  * This revision number also appears in configure.ac, they have
0056  * to be manually synchronized
0057  */
0058 #define XFIXES_REVISION 1
0059 #define XFIXES_VERSION  ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION))
0060 
0061 typedef struct {
0062     int type;           /* event base */
0063     unsigned long serial;
0064     Bool send_event;
0065     Display *display;
0066     Window window;
0067     int subtype;
0068     Window owner;
0069     Atom selection;
0070     Time timestamp;
0071     Time selection_timestamp;
0072 } XFixesSelectionNotifyEvent;
0073 
0074 typedef struct {
0075     int type;           /* event base */
0076     unsigned long serial;
0077     Bool send_event;
0078     Display *display;
0079     Window window;
0080     int subtype;
0081     unsigned long cursor_serial;
0082     Time timestamp;
0083     Atom cursor_name;
0084 } XFixesCursorNotifyEvent;
0085 
0086 typedef struct {
0087     short       x, y;
0088     unsigned short  width, height;
0089     unsigned short  xhot, yhot;
0090     unsigned long   cursor_serial;
0091     unsigned long   *pixels;
0092 #if XFIXES_MAJOR >= 2
0093     Atom        atom;           /* Version >= 2 only */
0094     const char      *name;          /* Version >= 2 only */
0095 #endif
0096 } XFixesCursorImage;
0097 
0098 #if XFIXES_MAJOR >= 2
0099 /* Version 2 types */
0100 
0101 typedef XID XserverRegion;
0102 
0103 typedef struct {
0104     short       x, y;
0105     unsigned short  width, height;
0106     unsigned short  xhot, yhot;
0107     unsigned long   cursor_serial;
0108     unsigned long   *pixels;
0109     Atom        atom;
0110     const char      *name;
0111 } XFixesCursorImageAndName;
0112 
0113 #endif
0114 
0115 _XFUNCPROTOBEGIN
0116 
0117 Bool XFixesQueryExtension (Display *dpy,
0118                 int *event_base_return,
0119                 int *error_base_return);
0120 Status XFixesQueryVersion (Display *dpy,
0121                 int     *major_version_return,
0122                 int     *minor_version_return);
0123 
0124 int XFixesVersion (void);
0125 
0126 void
0127 XFixesChangeSaveSet (Display    *dpy,
0128              Window win,
0129              int    mode,
0130              int    target,
0131              int    map);
0132 
0133 void
0134 XFixesSelectSelectionInput (Display     *dpy,
0135                 Window      win,
0136                 Atom        selection,
0137                 unsigned long   eventMask);
0138 
0139 void
0140 XFixesSelectCursorInput (Display    *dpy,
0141              Window     win,
0142              unsigned long  eventMask);
0143 
0144 XFixesCursorImage *
0145 XFixesGetCursorImage (Display *dpy);
0146 
0147 #if XFIXES_MAJOR >= 2
0148 /* Version 2 functions */
0149 
0150 XserverRegion
0151 XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles);
0152 
0153 XserverRegion
0154 XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap);
0155 
0156 XserverRegion
0157 XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind);
0158 
0159 XserverRegion
0160 XFixesCreateRegionFromGC (Display *dpy, GC gc);
0161 
0162 XserverRegion
0163 XFixesCreateRegionFromPicture (Display *dpy, XID picture);
0164 
0165 void
0166 XFixesDestroyRegion (Display *dpy, XserverRegion region);
0167 
0168 void
0169 XFixesSetRegion (Display *dpy, XserverRegion region,
0170          XRectangle *rectangles, int nrectangles);
0171 
0172 void
0173 XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src);
0174 
0175 void
0176 XFixesUnionRegion (Display *dpy, XserverRegion dst,
0177            XserverRegion src1, XserverRegion src2);
0178 
0179 void
0180 XFixesIntersectRegion (Display *dpy, XserverRegion dst,
0181                XserverRegion src1, XserverRegion src2);
0182 
0183 void
0184 XFixesSubtractRegion (Display *dpy, XserverRegion dst,
0185               XserverRegion src1, XserverRegion src2);
0186 
0187 void
0188 XFixesInvertRegion (Display *dpy, XserverRegion dst,
0189             XRectangle *rect, XserverRegion src);
0190 
0191 void
0192 XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy);
0193 
0194 void
0195 XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src);
0196 
0197 XRectangle *
0198 XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet);
0199 
0200 XRectangle *
0201 XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region,
0202                 int *nrectanglesRet,
0203                 XRectangle *bounds);
0204 
0205 void
0206 XFixesSetGCClipRegion (Display *dpy, GC gc,
0207                int clip_x_origin, int clip_y_origin,
0208                XserverRegion region);
0209 
0210 void
0211 XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind,
0212                 int x_off, int y_off, XserverRegion region);
0213 
0214 void
0215 XFixesSetPictureClipRegion (Display *dpy, XID picture,
0216                 int clip_x_origin, int clip_y_origin,
0217                 XserverRegion region);
0218 
0219 void
0220 XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name);
0221 
0222 const char *
0223 XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom);
0224 
0225 void
0226 XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination);
0227 
0228 void
0229 XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name);
0230 
0231 #endif  /* XFIXES_MAJOR >= 2 */
0232 
0233 #if XFIXES_MAJOR >= 3
0234 
0235 void
0236 XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src,
0237             unsigned left, unsigned right,
0238             unsigned top, unsigned bottom);
0239 
0240 #endif  /* XFIXES_MAJOR >= 3 */
0241 
0242 #if XFIXES_MAJOR >= 4
0243 /* Version 4.0 externs */
0244 
0245 void
0246 XFixesHideCursor (Display *dpy, Window win);
0247 
0248 void
0249 XFixesShowCursor (Display *dpy, Window win);
0250 
0251 #endif /* XFIXES_MAJOR >= 4 */
0252 
0253 #if XFIXES_MAJOR >= 5
0254 
0255 typedef XID PointerBarrier;
0256 
0257 PointerBarrier
0258 XFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1,
0259                int x2, int y2, int directions,
0260                int num_devices, int *devices);
0261 
0262 void
0263 XFixesDestroyPointerBarrier(Display *dpy, PointerBarrier b);
0264 
0265 #endif /* XFIXES_MAJOR >= 5 */
0266 
0267 _XFUNCPROTOEND
0268 
0269 #endif /* _XFIXES_H_ */