1 /***************************************************************** 2 3 Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. 4 5 Permission is hereby granted, free of charge, to any person obtaining a copy 6 of this software and associated documentation files (the "Software"), to deal 7 in the Software without restriction, including without limitation the rights 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 copies of the Software. 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 17 DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, 18 BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, 19 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 20 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 22 Except as contained in this notice, the name of Digital Equipment Corporation 23 shall not be used in advertising or otherwise to promote the sale, use or other 24 dealings in this Software without prior written authorization from Digital 25 Equipment Corporation. 26 27 ******************************************************************/ 28 29 #ifndef _DPMSPROTO_H_ 30 #define _DPMSPROTO_H_ 31 32 #include <X11/extensions/dpmsconst.h> 33 34 #define X_DPMSGetVersion 0 35 #define X_DPMSCapable 1 36 #define X_DPMSGetTimeouts 2 37 #define X_DPMSSetTimeouts 3 38 #define X_DPMSEnable 4 39 #define X_DPMSDisable 5 40 #define X_DPMSForceLevel 6 41 #define X_DPMSInfo 7 42 43 #define DPMSNumberEvents 0 44 45 #define DPMSNumberErrors 0 46 47 48 typedef struct { 49 CARD8 reqType; /* always DPMSCode */ 50 CARD8 dpmsReqType; /* always X_DPMSGetVersion */ 51 CARD16 length B16; 52 CARD16 majorVersion B16; 53 CARD16 minorVersion B16; 54 } xDPMSGetVersionReq; 55 #define sz_xDPMSGetVersionReq 8 56 57 typedef struct { 58 BYTE type; /* X_Reply */ 59 CARD8 pad0; 60 CARD16 sequenceNumber B16; 61 CARD32 length B32; 62 CARD16 majorVersion B16; 63 CARD16 minorVersion B16; 64 CARD32 pad1 B32; 65 CARD32 pad2 B32; 66 CARD32 pad3 B32; 67 CARD32 pad4 B32; 68 CARD32 pad5 B32; 69 } xDPMSGetVersionReply; 70 #define sz_xDPMSGetVersionReply 32 71 72 typedef struct { 73 CARD8 reqType; /* always DPMSCode */ 74 CARD8 dpmsReqType; /* always X_DPMSCapable */ 75 CARD16 length B16; 76 } xDPMSCapableReq; 77 #define sz_xDPMSCapableReq 4 78 79 typedef struct { 80 BYTE type; /* X_Reply */ 81 CARD8 pad0; 82 CARD16 sequenceNumber B16; 83 CARD32 length B32; 84 BOOL capable; 85 CARD8 pad1; 86 CARD16 pad2 B16; 87 CARD32 pad3 B32; 88 CARD32 pad4 B32; 89 CARD32 pad5 B32; 90 CARD32 pad6 B32; 91 CARD32 pad7 B32; 92 } xDPMSCapableReply; 93 #define sz_xDPMSCapableReply 32 94 95 typedef struct { 96 CARD8 reqType; /* always DPMSCode */ 97 CARD8 dpmsReqType; /* always X_DPMSGetTimeouts */ 98 CARD16 length B16; 99 } xDPMSGetTimeoutsReq; 100 #define sz_xDPMSGetTimeoutsReq 4 101 102 typedef struct { 103 BYTE type; /* X_Reply */ 104 CARD8 pad0; 105 CARD16 sequenceNumber B16; 106 CARD32 length B32; 107 CARD16 standby B16; 108 CARD16 suspend B16; 109 CARD16 off B16; 110 CARD16 pad1 B16; 111 CARD32 pad2 B32; 112 CARD32 pad3 B32; 113 CARD32 pad4 B32; 114 CARD32 pad5 B32; 115 } xDPMSGetTimeoutsReply; 116 #define sz_xDPMSGetTimeoutsReply 32 117 118 typedef struct { 119 CARD8 reqType; /* always DPMSCode */ 120 CARD8 dpmsReqType; /* always X_DPMSSetTimeouts */ 121 CARD16 length B16; 122 CARD16 standby B16; 123 CARD16 suspend B16; 124 CARD16 off B16; 125 CARD16 pad0 B16; 126 } xDPMSSetTimeoutsReq; 127 #define sz_xDPMSSetTimeoutsReq 12 128 129 typedef struct { 130 CARD8 reqType; /* always DPMSCode */ 131 CARD8 dpmsReqType; /* always X_DPMSEnable */ 132 CARD16 length B16; 133 } xDPMSEnableReq; 134 #define sz_xDPMSEnableReq 4 135 136 typedef struct { 137 CARD8 reqType; /* always DPMSCode */ 138 CARD8 dpmsReqType; /* always X_DPMSDisable */ 139 CARD16 length B16; 140 } xDPMSDisableReq; 141 #define sz_xDPMSDisableReq 4 142 143 typedef struct { 144 CARD8 reqType; /* always DPMSCode */ 145 CARD8 dpmsReqType; /* always X_DPMSForceLevel */ 146 CARD16 length B16; 147 CARD16 level B16; /* power level requested */ 148 CARD16 pad0 B16; 149 } xDPMSForceLevelReq; 150 #define sz_xDPMSForceLevelReq 8 151 152 typedef struct { 153 CARD8 reqType; /* always DPMSCode */ 154 CARD8 dpmsReqType; /* always X_DPMSInfo */ 155 CARD16 length B16; 156 } xDPMSInfoReq; 157 #define sz_xDPMSInfoReq 4 158 159 typedef struct { 160 BYTE type; /* X_Reply */ 161 CARD8 pad0; 162 CARD16 sequenceNumber B16; 163 CARD32 length B32; 164 CARD16 power_level B16; 165 BOOL state; 166 CARD8 pad1; 167 CARD32 pad2 B32; 168 CARD32 pad3 B32; 169 CARD32 pad4 B32; 170 CARD32 pad5 B32; 171 CARD32 pad6 B32; 172 } xDPMSInfoReply; 173 #define sz_xDPMSInfoReply 32 174 175 #endif /* _DPMSPROTO_H_ */ 176