1 /* 2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 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 * Copyright © 2002 Keith Packard 25 * 26 * Permission to use, copy, modify, distribute, and sell this software and its 27 * documentation for any purpose is hereby granted without fee, provided that 28 * the above copyright notice appear in all copies and that both that 29 * copyright notice and this permission notice appear in supporting 30 * documentation, and that the name of Keith Packard not be used in 31 * advertising or publicity pertaining to distribution of the software without 32 * specific, written prior permission. Keith Packard makes no 33 * representations about the suitability of this software for any purpose. It 34 * 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 NO 38 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 39 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 40 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 41 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 42 * PERFORMANCE OF THIS SOFTWARE. 43 */ 44 45 #ifdef HAVE_DIX_CONFIG_H 46 #include <dix-config.h> 47 #endif 48 49 #ifndef _XFIXESINT_H_ 50 #define _XFIXESINT_H_ 51 52 #include <X11/X.h> 53 #include <X11/Xproto.h> 54 #include "misc.h" 55 #include "os.h" 56 #include "dixstruct.h" 57 #include "extnsionst.h" 58 #include <X11/extensions/xfixesproto.h> 59 #include "windowstr.h" 60 #include "selection.h" 61 #include "xfixes.h" 62 63 extern int XFixesEventBase; 64 65 typedef struct _XFixesClient { 66 CARD32 major_version; 67 CARD32 minor_version; 68 } XFixesClientRec, *XFixesClientPtr; 69 70 #define GetXFixesClient(pClient) ((XFixesClientPtr)dixLookupPrivate(&(pClient)->devPrivates, XFixesClientPrivateKey)) 71 72 extern int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr); 73 74 /* Save set */ 75 int 76 ProcXFixesChangeSaveSet(ClientPtr client); 77 78 int 79 SProcXFixesChangeSaveSet(ClientPtr client); 80 81 /* Selection events */ 82 int 83 ProcXFixesSelectSelectionInput(ClientPtr client); 84 85 int 86 SProcXFixesSelectSelectionInput(ClientPtr client); 87 88 void 89 90 SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from, 91 xXFixesSelectionNotifyEvent * to); 92 Bool 93 XFixesSelectionInit(void); 94 95 /* Cursor notification */ 96 Bool 97 XFixesCursorInit(void); 98 99 int 100 ProcXFixesSelectCursorInput(ClientPtr client); 101 102 int 103 SProcXFixesSelectCursorInput(ClientPtr client); 104 105 void 106 107 SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from, 108 xXFixesCursorNotifyEvent * to); 109 110 int 111 ProcXFixesGetCursorImage(ClientPtr client); 112 113 int 114 SProcXFixesGetCursorImage(ClientPtr client); 115 116 /* Cursor names (Version 2) */ 117 118 int 119 ProcXFixesSetCursorName(ClientPtr client); 120 121 int 122 SProcXFixesSetCursorName(ClientPtr client); 123 124 int 125 ProcXFixesGetCursorName(ClientPtr client); 126 127 int 128 SProcXFixesGetCursorName(ClientPtr client); 129 130 int 131 ProcXFixesGetCursorImageAndName(ClientPtr client); 132 133 int 134 SProcXFixesGetCursorImageAndName(ClientPtr client); 135 136 /* Cursor replacement (Version 2) */ 137 138 int 139 ProcXFixesChangeCursor(ClientPtr client); 140 141 int 142 SProcXFixesChangeCursor(ClientPtr client); 143 144 int 145 ProcXFixesChangeCursorByName(ClientPtr client); 146 147 int 148 SProcXFixesChangeCursorByName(ClientPtr client); 149 150 /* Region objects (Version 2* */ 151 Bool 152 XFixesRegionInit(void); 153 154 int 155 ProcXFixesCreateRegion(ClientPtr client); 156 157 int 158 SProcXFixesCreateRegion(ClientPtr client); 159 160 int 161 ProcXFixesCreateRegionFromBitmap(ClientPtr client); 162 163 int 164 SProcXFixesCreateRegionFromBitmap(ClientPtr client); 165 166 int 167 ProcXFixesCreateRegionFromWindow(ClientPtr client); 168 169 int 170 SProcXFixesCreateRegionFromWindow(ClientPtr client); 171 172 int 173 ProcXFixesCreateRegionFromGC(ClientPtr client); 174 175 int 176 SProcXFixesCreateRegionFromGC(ClientPtr client); 177 178 int 179 ProcXFixesCreateRegionFromPicture(ClientPtr client); 180 181 int 182 SProcXFixesCreateRegionFromPicture(ClientPtr client); 183 184 int 185 ProcXFixesDestroyRegion(ClientPtr client); 186 187 int 188 SProcXFixesDestroyRegion(ClientPtr client); 189 190 int 191 ProcXFixesSetRegion(ClientPtr client); 192 193 int 194 SProcXFixesSetRegion(ClientPtr client); 195 196 int 197 ProcXFixesCopyRegion(ClientPtr client); 198 199 int 200 SProcXFixesCopyRegion(ClientPtr client); 201 202 int 203 ProcXFixesCombineRegion(ClientPtr client); 204 205 int 206 SProcXFixesCombineRegion(ClientPtr client); 207 208 int 209 ProcXFixesInvertRegion(ClientPtr client); 210 211 int 212 SProcXFixesInvertRegion(ClientPtr client); 213 214 int 215 ProcXFixesTranslateRegion(ClientPtr client); 216 217 int 218 SProcXFixesTranslateRegion(ClientPtr client); 219 220 int 221 ProcXFixesRegionExtents(ClientPtr client); 222 223 int 224 SProcXFixesRegionExtents(ClientPtr client); 225 226 int 227 ProcXFixesFetchRegion(ClientPtr client); 228 229 int 230 SProcXFixesFetchRegion(ClientPtr client); 231 232 int 233 ProcXFixesSetGCClipRegion(ClientPtr client); 234 235 int 236 SProcXFixesSetGCClipRegion(ClientPtr client); 237 238 int 239 ProcXFixesSetWindowShapeRegion(ClientPtr client); 240 241 int 242 SProcXFixesSetWindowShapeRegion(ClientPtr client); 243 244 int 245 ProcXFixesSetPictureClipRegion(ClientPtr client); 246 247 int 248 SProcXFixesSetPictureClipRegion(ClientPtr client); 249 250 int 251 ProcXFixesExpandRegion(ClientPtr client); 252 253 int 254 SProcXFixesExpandRegion(ClientPtr client); 255 256 int 257 PanoramiXFixesSetGCClipRegion(ClientPtr client); 258 259 int 260 PanoramiXFixesSetWindowShapeRegion(ClientPtr client); 261 262 int 263 PanoramiXFixesSetPictureClipRegion(ClientPtr client); 264 265 /* Cursor Visibility (Version 4) */ 266 267 int 268 ProcXFixesHideCursor(ClientPtr client); 269 270 int 271 SProcXFixesHideCursor(ClientPtr client); 272 273 int 274 ProcXFixesShowCursor(ClientPtr client); 275 276 int 277 SProcXFixesShowCursor(ClientPtr client); 278 279 /* Version 5 */ 280 281 int 282 ProcXFixesCreatePointerBarrier(ClientPtr client); 283 284 int 285 SProcXFixesCreatePointerBarrier(ClientPtr client); 286 287 int 288 ProcXFixesDestroyPointerBarrier(ClientPtr client); 289 290 int 291 SProcXFixesDestroyPointerBarrier(ClientPtr client); 292 293 /* Xinerama */ 294 #ifdef PANORAMIX 295 extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr); 296 void PanoramiXFixesInit(void); 297 void PanoramiXFixesReset(void); 298 #endif 299 300 #endif /* _XFIXESINT_H_ */ 301