1 /* 2 * This file generated automatically from screensaver.xml by d_client.py. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_ScreenSaver_API XCB ScreenSaver API 8 * @brief ScreenSaver XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 module xcb.screensaver; 13 14 import xcb.xcb; 15 import xcb.xproto; 16 17 extern (C): 18 19 enum int XCB_SCREENSAVER_MAJOR_VERSION = 1; 20 enum int XCB_SCREENSAVER_MINOR_VERSION = 1; 21 22 extern (C) __gshared extern xcb_extension_t xcb_screensaver_id; 23 24 enum xcb_screensaver_kind_t { 25 XCB_SCREENSAVER_KIND_BLANKED = 0, 26 XCB_SCREENSAVER_KIND_INTERNAL = 1, 27 XCB_SCREENSAVER_KIND_EXTERNAL = 2 28 } 29 30 alias XCB_SCREENSAVER_KIND_BLANKED = xcb_screensaver_kind_t.XCB_SCREENSAVER_KIND_BLANKED; 31 alias XCB_SCREENSAVER_KIND_INTERNAL = xcb_screensaver_kind_t.XCB_SCREENSAVER_KIND_INTERNAL; 32 alias XCB_SCREENSAVER_KIND_EXTERNAL = xcb_screensaver_kind_t.XCB_SCREENSAVER_KIND_EXTERNAL; 33 34 enum xcb_screensaver_event_t { 35 XCB_SCREENSAVER_EVENT_NOTIFY_MASK = 1, 36 XCB_SCREENSAVER_EVENT_CYCLE_MASK = 2 37 } 38 39 alias XCB_SCREENSAVER_EVENT_NOTIFY_MASK = xcb_screensaver_event_t.XCB_SCREENSAVER_EVENT_NOTIFY_MASK; 40 alias XCB_SCREENSAVER_EVENT_CYCLE_MASK = xcb_screensaver_event_t.XCB_SCREENSAVER_EVENT_CYCLE_MASK; 41 42 enum xcb_screensaver_state_t { 43 XCB_SCREENSAVER_STATE_OFF = 0, 44 XCB_SCREENSAVER_STATE_ON = 1, 45 XCB_SCREENSAVER_STATE_CYCLE = 2, 46 XCB_SCREENSAVER_STATE_DISABLED = 3 47 } 48 49 alias XCB_SCREENSAVER_STATE_OFF = xcb_screensaver_state_t.XCB_SCREENSAVER_STATE_OFF; 50 alias XCB_SCREENSAVER_STATE_ON = xcb_screensaver_state_t.XCB_SCREENSAVER_STATE_ON; 51 alias XCB_SCREENSAVER_STATE_CYCLE = xcb_screensaver_state_t.XCB_SCREENSAVER_STATE_CYCLE; 52 alias XCB_SCREENSAVER_STATE_DISABLED = xcb_screensaver_state_t.XCB_SCREENSAVER_STATE_DISABLED; 53 54 /** 55 * @brief xcb_screensaver_query_version_cookie_t 56 **/ 57 struct xcb_screensaver_query_version_cookie_t { 58 uint sequence; /**< */ 59 } 60 61 /** Opcode for xcb_screensaver_query_version. */ 62 enum XCB_SCREENSAVER_QUERY_VERSION = 0; 63 64 /** 65 * @brief xcb_screensaver_query_version_request_t 66 **/ 67 struct xcb_screensaver_query_version_request_t { 68 ubyte major_opcode; /**< */ 69 ubyte minor_opcode; /**< */ 70 ushort length; /**< */ 71 ubyte client_major_version; /**< */ 72 ubyte client_minor_version; /**< */ 73 ubyte[2] pad0; /**< */ 74 } 75 76 /** 77 * @brief xcb_screensaver_query_version_reply_t 78 **/ 79 struct xcb_screensaver_query_version_reply_t { 80 ubyte response_type; /**< */ 81 ubyte pad0; /**< */ 82 ushort sequence; /**< */ 83 uint length; /**< */ 84 ushort server_major_version; /**< */ 85 ushort server_minor_version; /**< */ 86 ubyte[20] pad1; /**< */ 87 } 88 89 /** 90 * @brief xcb_screensaver_query_info_cookie_t 91 **/ 92 struct xcb_screensaver_query_info_cookie_t { 93 uint sequence; /**< */ 94 } 95 96 /** Opcode for xcb_screensaver_query_info. */ 97 enum XCB_SCREENSAVER_QUERY_INFO = 1; 98 99 /** 100 * @brief xcb_screensaver_query_info_request_t 101 **/ 102 struct xcb_screensaver_query_info_request_t { 103 ubyte major_opcode; /**< */ 104 ubyte minor_opcode; /**< */ 105 ushort length; /**< */ 106 xcb_drawable_t drawable; /**< */ 107 } 108 109 /** 110 * @brief xcb_screensaver_query_info_reply_t 111 **/ 112 struct xcb_screensaver_query_info_reply_t { 113 ubyte response_type; /**< */ 114 ubyte state; /**< */ 115 ushort sequence; /**< */ 116 uint length; /**< */ 117 xcb_window_t saver_window; /**< */ 118 uint ms_until_server; /**< */ 119 uint ms_since_user_input; /**< */ 120 uint event_mask; /**< */ 121 ubyte kind; /**< */ 122 ubyte[7] pad0; /**< */ 123 } 124 125 /** Opcode for xcb_screensaver_select_input. */ 126 enum XCB_SCREENSAVER_SELECT_INPUT = 2; 127 128 /** 129 * @brief xcb_screensaver_select_input_request_t 130 **/ 131 struct xcb_screensaver_select_input_request_t { 132 ubyte major_opcode; /**< */ 133 ubyte minor_opcode; /**< */ 134 ushort length; /**< */ 135 xcb_drawable_t drawable; /**< */ 136 uint event_mask; /**< */ 137 } 138 139 /** Opcode for xcb_screensaver_set_attributes. */ 140 enum XCB_SCREENSAVER_SET_ATTRIBUTES = 3; 141 142 /** 143 * @brief xcb_screensaver_set_attributes_request_t 144 **/ 145 struct xcb_screensaver_set_attributes_request_t { 146 ubyte major_opcode; /**< */ 147 ubyte minor_opcode; /**< */ 148 ushort length; /**< */ 149 xcb_drawable_t drawable; /**< */ 150 short x; /**< */ 151 short y; /**< */ 152 ushort width; /**< */ 153 ushort height; /**< */ 154 ushort border_width; /**< */ 155 ubyte class_; /**< */ 156 ubyte depth; /**< */ 157 xcb_visualid_t visual; /**< */ 158 uint value_mask; /**< */ 159 } 160 161 /** Opcode for xcb_screensaver_unset_attributes. */ 162 enum XCB_SCREENSAVER_UNSET_ATTRIBUTES = 4; 163 164 /** 165 * @brief xcb_screensaver_unset_attributes_request_t 166 **/ 167 struct xcb_screensaver_unset_attributes_request_t { 168 ubyte major_opcode; /**< */ 169 ubyte minor_opcode; /**< */ 170 ushort length; /**< */ 171 xcb_drawable_t drawable; /**< */ 172 } 173 174 /** Opcode for xcb_screensaver_suspend. */ 175 enum XCB_SCREENSAVER_SUSPEND = 5; 176 177 /** 178 * @brief xcb_screensaver_suspend_request_t 179 **/ 180 struct xcb_screensaver_suspend_request_t { 181 ubyte major_opcode; /**< */ 182 ubyte minor_opcode; /**< */ 183 ushort length; /**< */ 184 ubyte suspend; /**< */ 185 ubyte[3] pad0; /**< */ 186 } 187 188 /** Opcode for xcb_screensaver_notify. */ 189 enum XCB_SCREENSAVER_NOTIFY = 0; 190 191 /** 192 * @brief xcb_screensaver_notify_event_t 193 **/ 194 struct xcb_screensaver_notify_event_t { 195 ubyte response_type; /**< */ 196 ubyte state; /**< */ 197 ushort sequence; /**< */ 198 xcb_timestamp_t time; /**< */ 199 xcb_window_t root; /**< */ 200 xcb_window_t window; /**< */ 201 ubyte kind; /**< */ 202 ubyte forced; /**< */ 203 ubyte[14] pad0; /**< */ 204 } 205 206 /** 207 * 208 * @param c The connection 209 * @return A cookie 210 * 211 * Delivers a request to the X server. 212 * 213 */ 214 xcb_screensaver_query_version_cookie_t xcb_screensaver_query_version(xcb_connection_t* c /**< */ , 215 ubyte client_major_version /**< */ , ubyte client_minor_version /**< */ ); 216 217 /** 218 * 219 * @param c The connection 220 * @return A cookie 221 * 222 * Delivers a request to the X server. 223 * 224 * This form can be used only if the request will cause 225 * a reply to be generated. Any returned error will be 226 * placed in the event queue. 227 */ 228 xcb_screensaver_query_version_cookie_t xcb_screensaver_query_version_unchecked(xcb_connection_t* c /**< */ , 229 ubyte client_major_version /**< */ , ubyte client_minor_version /**< */ ); 230 231 /** 232 * Return the reply 233 * @param c The connection 234 * @param cookie The cookie 235 * @param e The xcb_generic_error_t supplied 236 * 237 * Returns the reply of the request asked by 238 * 239 * The parameter @p e supplied to this function must be NULL if 240 * xcb_screensaver_query_version_unchecked(). is used. 241 * Otherwise, it stores the error if any. 242 * 243 * The returned value must be freed by the caller using free(). 244 */ 245 xcb_screensaver_query_version_reply_t* xcb_screensaver_query_version_reply(xcb_connection_t* c /**< */ , 246 xcb_screensaver_query_version_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 247 248 /** 249 * 250 * @param c The connection 251 * @return A cookie 252 * 253 * Delivers a request to the X server. 254 * 255 */ 256 xcb_screensaver_query_info_cookie_t xcb_screensaver_query_info(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ ); 257 258 /** 259 * 260 * @param c The connection 261 * @return A cookie 262 * 263 * Delivers a request to the X server. 264 * 265 * This form can be used only if the request will cause 266 * a reply to be generated. Any returned error will be 267 * placed in the event queue. 268 */ 269 xcb_screensaver_query_info_cookie_t xcb_screensaver_query_info_unchecked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ ); 270 271 /** 272 * Return the reply 273 * @param c The connection 274 * @param cookie The cookie 275 * @param e The xcb_generic_error_t supplied 276 * 277 * Returns the reply of the request asked by 278 * 279 * The parameter @p e supplied to this function must be NULL if 280 * xcb_screensaver_query_info_unchecked(). is used. 281 * Otherwise, it stores the error if any. 282 * 283 * The returned value must be freed by the caller using free(). 284 */ 285 xcb_screensaver_query_info_reply_t* xcb_screensaver_query_info_reply(xcb_connection_t* c /**< */ , 286 xcb_screensaver_query_info_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 287 288 /** 289 * 290 * @param c The connection 291 * @return A cookie 292 * 293 * Delivers a request to the X server. 294 * 295 * This form can be used only if the request will not cause 296 * a reply to be generated. Any returned error will be 297 * saved for handling by xcb_request_check(). 298 */ 299 xcb_void_cookie_t xcb_screensaver_select_input_checked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint event_mask /**< */ ); 300 301 /** 302 * 303 * @param c The connection 304 * @return A cookie 305 * 306 * Delivers a request to the X server. 307 * 308 */ 309 xcb_void_cookie_t xcb_screensaver_select_input(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint event_mask /**< */ ); 310 311 int xcb_screensaver_set_attributes_sizeof(const void* _buffer /**< */ ); 312 313 /** 314 * 315 * @param c The connection 316 * @return A cookie 317 * 318 * Delivers a request to the X server. 319 * 320 * This form can be used only if the request will not cause 321 * a reply to be generated. Any returned error will be 322 * saved for handling by xcb_request_check(). 323 */ 324 xcb_void_cookie_t xcb_screensaver_set_attributes_checked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , short x /**< */ , short y /**< */ , 325 ushort width /**< */ , ushort height /**< */ , ushort border_width /**< */ , ubyte class_ /**< */ , ubyte depth /**< */ , xcb_visualid_t visual /**< */ , uint value_mask /**< */ , 326 const uint* value_list /**< */ ); 327 328 /** 329 * 330 * @param c The connection 331 * @return A cookie 332 * 333 * Delivers a request to the X server. 334 * 335 */ 336 xcb_void_cookie_t xcb_screensaver_set_attributes(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , short x /**< */ , short y /**< */ , ushort width /**< */ , 337 ushort height /**< */ , ushort border_width /**< */ , ubyte class_ /**< */ , ubyte depth /**< */ , xcb_visualid_t visual /**< */ , 338 uint value_mask /**< */ , const uint* value_list /**< */ ); 339 340 /** 341 * 342 * @param c The connection 343 * @return A cookie 344 * 345 * Delivers a request to the X server. 346 * 347 * This form can be used only if the request will not cause 348 * a reply to be generated. Any returned error will be 349 * saved for handling by xcb_request_check(). 350 */ 351 xcb_void_cookie_t xcb_screensaver_unset_attributes_checked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ ); 352 353 /** 354 * 355 * @param c The connection 356 * @return A cookie 357 * 358 * Delivers a request to the X server. 359 * 360 */ 361 xcb_void_cookie_t xcb_screensaver_unset_attributes(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ ); 362 363 /** 364 * 365 * @param c The connection 366 * @return A cookie 367 * 368 * Delivers a request to the X server. 369 * 370 * This form can be used only if the request will not cause 371 * a reply to be generated. Any returned error will be 372 * saved for handling by xcb_request_check(). 373 */ 374 xcb_void_cookie_t xcb_screensaver_suspend_checked(xcb_connection_t* c /**< */ , ubyte suspend /**< */ ); 375 376 /** 377 * 378 * @param c The connection 379 * @return A cookie 380 * 381 * Delivers a request to the X server. 382 * 383 */ 384 xcb_void_cookie_t xcb_screensaver_suspend(xcb_connection_t* c /**< */ , ubyte suspend /**< */ ); 385 386 /** 387 * @} 388 */