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 /*
25  * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
26  *
27  * Permission to use, copy, modify, distribute, and sell this software and its
28  * documentation for any purpose is hereby granted without fee, provided that
29  * the above copyright notice appear in all copies and that both that
30  * copyright notice and this permission notice appear in supporting
31  * documentation, and that the name of Keith Packard not be used in
32  * advertising or publicity pertaining to distribution of the software without
33  * specific, written prior permission.  Keith Packard makes no
34  * representations about the suitability of this software for any purpose.  It
35  * is provided "as is" without express or implied warranty.
36  *
37  * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
38  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
39  * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
40  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
41  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
42  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43  * PERFORMANCE OF THIS SOFTWARE.
44  */
45 
46 
47 #ifndef _XFIXESWIRE_H_
48 #define _XFIXESWIRE_H_
49 
50 #define XFIXES_NAME	"XFIXES"
51 #define XFIXES_MAJOR	6
52 #define XFIXES_MINOR	0
53 
54 /*************** Version 1 ******************/
55 #define X_XFixesQueryVersion		    0
56 #define X_XFixesChangeSaveSet		    1
57 #define X_XFixesSelectSelectionInput	    2
58 #define X_XFixesSelectCursorInput	    3
59 #define X_XFixesGetCursorImage		    4
60 /*************** Version 2 ******************/
61 #define X_XFixesCreateRegion		    5
62 #define X_XFixesCreateRegionFromBitmap	    6
63 #define X_XFixesCreateRegionFromWindow	    7
64 #define X_XFixesCreateRegionFromGC	    8
65 #define X_XFixesCreateRegionFromPicture	    9
66 #define X_XFixesDestroyRegion		    10
67 #define X_XFixesSetRegion		    11
68 #define X_XFixesCopyRegion		    12
69 #define X_XFixesUnionRegion		    13
70 #define X_XFixesIntersectRegion		    14
71 #define X_XFixesSubtractRegion		    15
72 #define X_XFixesInvertRegion		    16
73 #define X_XFixesTranslateRegion		    17
74 #define X_XFixesRegionExtents		    18
75 #define X_XFixesFetchRegion		    19
76 #define X_XFixesSetGCClipRegion		    20
77 #define X_XFixesSetWindowShapeRegion	    21
78 #define X_XFixesSetPictureClipRegion	    22
79 #define X_XFixesSetCursorName		    23
80 #define X_XFixesGetCursorName		    24
81 #define X_XFixesGetCursorImageAndName	    25
82 #define X_XFixesChangeCursor		    26
83 #define X_XFixesChangeCursorByName	    27
84 /*************** Version 3 ******************/
85 #define X_XFixesExpandRegion		    28
86 /*************** Version 4 ******************/
87 #define X_XFixesHideCursor		    29
88 #define X_XFixesShowCursor		    30
89 /*************** Version 5 ******************/
90 #define X_XFixesCreatePointerBarrier	    31
91 #define X_XFixesDestroyPointerBarrier	    32
92 /*************** Version 6 ******************/
93 #define X_XFixesCreatePointerBarrierVelocity 33
94 #define X_XFixesSelectBarrierInput          34
95 #define X_XFixesBarrierReleasePointer       35
96 
97 #define XFixesNumberRequests		    (X_XFixesBarrierReleasePointer+1)
98 
99 /* Selection events share one event number */
100 #define XFixesSelectionNotify		    0
101 
102 /* Within the selection, the 'subtype' field distinguishes */
103 #define XFixesSetSelectionOwnerNotify	    0
104 #define XFixesSelectionWindowDestroyNotify  1
105 #define XFixesSelectionClientCloseNotify    2
106 
107 #define XFixesSetSelectionOwnerNotifyMask	(1L << 0)
108 #define XFixesSelectionWindowDestroyNotifyMask	(1L << 1)
109 #define XFixesSelectionClientCloseNotifyMask	(1L << 2)
110 
111 /* There's only one cursor event so far */
112 #define XFixesCursorNotify		    1
113 
114 #define XFixesDisplayCursorNotify	    0
115 
116 #define XFixesDisplayCursorNotifyMask	    (1L << 0)
117 
118 /* errors */
119 #define BadRegion			    0
120 #define BadBarrier			    1
121 #define XFixesNumberErrors		    (BadBarrier+1)
122 
123 #define SaveSetNearest			    0
124 #define SaveSetRoot			    1
125 
126 #define SaveSetMap			    0
127 #define SaveSetUnmap			    1
128 
129 /*************** Version 2 ******************/
130 
131 #define WindowRegionBounding		    0
132 #define WindowRegionClip		    1
133 
134 /*************** Version 5 ******************/
135 
136 #define BarrierPositiveX		    (1L << 0)
137 #define BarrierPositiveY		    (1L << 1)
138 #define BarrierNegativeX		    (1L << 2)
139 #define BarrierNegativeY		    (1L << 3)
140 
141 /*************** Version 6 ******************/
142 
143 #define XFixesBarrierNotify                 2
144 
145 #define XFixesBarrierHitNotify			0
146 #define XFixesBarrierThresholdExceededNotify	1
147 
148 #define XFixesBarrierHitNotifyMask			(1L << 0)
149 #define XFixesBarrierThresholdExceededNotifyMask	(1L << 1)
150 
151 #define XFixesNumberEvents		    (XFixesBarrierNotify+1)
152 
153 
154 #endif	/* _XFIXESWIRE_H_ */
155