| 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 <nx-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 B16; |
| 52 |
CARD8 clientMajor; |
| 53 |
CARD8 clientMinor; |
| 54 |
CARD16 unused B16; |
| 55 |
} xScreenSaverQueryVersionReq; |
| 56 |
#define sz_xScreenSaverQueryVersionReq 8 |
| 57 |
|
| 58 |
typedef struct { |
| 59 |
CARD8 type; /* X_Reply */ |
| 60 |
CARD8 unused; /* not used */ |
| 61 |
CARD16 sequenceNumber B16; |
| 62 |
CARD32 length B32; |
| 63 |
CARD16 majorVersion B16; /* major version of protocol */ |
| 64 |
CARD16 minorVersion B16; /* minor version of protocol */ |
| 65 |
CARD32 pad0 B32; |
| 66 |
CARD32 pad1 B32; |
| 67 |
CARD32 pad2 B32; |
| 68 |
CARD32 pad3 B32; |
| 69 |
CARD32 pad4 B32; |
| 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 B16; |
| 79 |
Drawable drawable B32; |
| 80 |
} xScreenSaverQueryInfoReq; |
| 81 |
#define sz_xScreenSaverQueryInfoReq 8 |
| 82 |
|
| 83 |
typedef struct { |
| 84 |
CARD8 type; /* X_Reply */ |
| 85 |
BYTE state; /* Off, On */ |
| 86 |
CARD16 sequenceNumber B16; |
| 87 |
CARD32 length B32; |
| 88 |
Window window B32; |
| 89 |
CARD32 tilOrSince B32; |
| 90 |
CARD32 idle B32; |
| 91 |
CARD32 eventMask B32; |
| 92 |
BYTE kind; /* Blanked, Internal, External */ |
| 93 |
CARD8 pad0; |
| 94 |
CARD16 pad1 B16; |
| 95 |
CARD32 pad2 B32; |
| 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 B16; |
| 105 |
Drawable drawable B32; |
| 106 |
CARD32 eventMask B32; |
| 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 B16; |
| 116 |
Drawable drawable B32; |
| 117 |
INT16 x B16, y B16; |
| 118 |
CARD16 width B16, height B16, borderWidth B16; |
| 119 |
BYTE c_class; |
| 120 |
CARD8 depth; |
| 121 |
VisualID visualID B32; |
| 122 |
CARD32 mask B32; |
| 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 B16; |
| 132 |
Drawable drawable B32; |
| 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 B16; |
| 142 |
Bool suspend B32; |
| 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 B16; |
| 150 |
Time timestamp B32; |
| 151 |
Window root B32; |
| 152 |
Window window B32; /* screen saver window */ |
| 153 |
BYTE kind; /* blanked, internal, external */ |
| 154 |
BYTE forced; |
| 155 |
CARD16 pad0 B16; |
| 156 |
CARD32 pad1 B32; |
| 157 |
CARD32 pad2 B32; |
| 158 |
CARD32 pad3 B32; |
| 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_ */ |