github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xcb/include/X11/extensions/saverproto.h (about) 1 /* 2 Copyright (c) 1992 X Consortium 3 4 Permission is hereby granted, free of charge, to any person obtaining a copy 5 of this software and associated documentation files (the "Software"), to deal 6 in the Software without restriction, including without limitation the rights 7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 copies of the Software, and to permit persons to whom the Software is 9 furnished to do so, subject to the following conditions: 10 11 The above copyright notice and this permission notice shall be included in 12 all copies or substantial portions of the Software. 13 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 21 Except as contained in this notice, the name of the X Consortium shall not be 22 used in advertising or otherwise to promote the sale, use or other dealings 23 in this Software without prior written authorization from the X Consortium. 24 * 25 * Author: Keith Packard, MIT X Consortium 26 */ 27 28 #ifndef _SAVERPROTO_H_ 29 #define _SAVERPROTO_H_ 30 31 #include <X11/extensions/saver.h> 32 33 #define Window CARD32 34 #define Drawable CARD32 35 #define Font CARD32 36 #define Pixmap CARD32 37 #define Cursor CARD32 38 #define Colormap CARD32 39 #define GContext CARD32 40 #define Atom CARD32 41 #define VisualID CARD32 42 #define Time CARD32 43 #define KeyCode CARD8 44 #define KeySym CARD32 45 46 #define X_ScreenSaverQueryVersion 0 47 48 typedef struct _ScreenSaverQueryVersion { 49 CARD8 reqType; /* always ScreenSaverReqCode */ 50 CARD8 saverReqType; /* always X_ScreenSaverQueryVersion */ 51 CARD16 length; 52 CARD8 clientMajor; 53 CARD8 clientMinor; 54 CARD16 unused; 55 } xScreenSaverQueryVersionReq; 56 #define sz_xScreenSaverQueryVersionReq 8 57 58 typedef struct { 59 CARD8 type; /* X_Reply */ 60 CARD8 unused; /* not used */ 61 CARD16 sequenceNumber; 62 CARD32 length; 63 CARD16 majorVersion; /* major version of protocol */ 64 CARD16 minorVersion; /* minor version of protocol */ 65 CARD32 pad0; 66 CARD32 pad1; 67 CARD32 pad2; 68 CARD32 pad3; 69 CARD32 pad4; 70 } xScreenSaverQueryVersionReply; 71 #define sz_xScreenSaverQueryVersionReply 32 72 73 #define X_ScreenSaverQueryInfo 1 74 75 typedef struct _ScreenSaverQueryInfo { 76 CARD8 reqType; /* always ScreenSaverReqCode */ 77 CARD8 saverReqType; /* always X_ScreenSaverQueryInfo */ 78 CARD16 length; 79 Drawable drawable; 80 } xScreenSaverQueryInfoReq; 81 #define sz_xScreenSaverQueryInfoReq 8 82 83 typedef struct { 84 CARD8 type; /* X_Reply */ 85 BYTE state; /* Off, On */ 86 CARD16 sequenceNumber; 87 CARD32 length; 88 Window window; 89 CARD32 tilOrSince; 90 CARD32 idle; 91 CARD32 eventMask; 92 BYTE kind; /* Blanked, Internal, External */ 93 CARD8 pad0; 94 CARD16 pad1; 95 CARD32 pad2; 96 } xScreenSaverQueryInfoReply; 97 #define sz_xScreenSaverQueryInfoReply 32 98 99 #define X_ScreenSaverSelectInput 2 100 101 typedef struct _ScreenSaverSelectInput { 102 CARD8 reqType; /* always ScreenSaverReqCode */ 103 CARD8 saverReqType; /* always X_ScreenSaverSelectInput */ 104 CARD16 length; 105 Drawable drawable; 106 CARD32 eventMask; 107 } xScreenSaverSelectInputReq; 108 #define sz_xScreenSaverSelectInputReq 12 109 110 #define X_ScreenSaverSetAttributes 3 111 112 typedef struct _ScreenSaverSetAttributes { 113 CARD8 reqType; /* always ScreenSaverReqCode */ 114 CARD8 saverReqType; /* always X_ScreenSaverSetAttributes */ 115 CARD16 length; 116 Drawable drawable; 117 INT16 x, y; 118 CARD16 width, height, borderWidth; 119 BYTE c_class; 120 CARD8 depth; 121 VisualID visualID; 122 CARD32 mask; 123 } xScreenSaverSetAttributesReq; 124 #define sz_xScreenSaverSetAttributesReq 28 125 126 #define X_ScreenSaverUnsetAttributes 4 127 128 typedef struct _ScreenSaverUnsetAttributes { 129 CARD8 reqType; /* always ScreenSaverReqCode */ 130 CARD8 saverReqType; /* always X_ScreenSaverUnsetAttributes */ 131 CARD16 length; 132 Drawable drawable; 133 } xScreenSaverUnsetAttributesReq; 134 #define sz_xScreenSaverUnsetAttributesReq 8 135 136 #define X_ScreenSaverSuspend 5 137 138 typedef struct _ScreenSaverSuspend { 139 CARD8 reqType; 140 CARD8 saverReqType; 141 CARD16 length; 142 CARD32 suspend; /* a boolean, but using the wrong encoding */ 143 } xScreenSaverSuspendReq; 144 #define sz_xScreenSaverSuspendReq 8 145 146 typedef struct _ScreenSaverNotify { 147 CARD8 type; /* always eventBase + ScreenSaverNotify */ 148 BYTE state; /* off, on, cycle */ 149 CARD16 sequenceNumber; 150 Time timestamp; 151 Window root; 152 Window window; /* screen saver window */ 153 BYTE kind; /* blanked, internal, external */ 154 BYTE forced; 155 CARD16 pad0; 156 CARD32 pad1; 157 CARD32 pad2; 158 CARD32 pad3; 159 } xScreenSaverNotifyEvent; 160 #define sz_xScreenSaverNotifyEvent 32 161 162 #undef Window 163 #undef Drawable 164 #undef Font 165 #undef Pixmap 166 #undef Cursor 167 #undef Colormap 168 #undef GContext 169 #undef Atom 170 #undef VisualID 171 #undef Time 172 #undef KeyCode 173 #undef KeySym 174 175 #endif /* _SAVERPROTO_H_ */