| 1 | // This file contains generated code. Do not edit directly. |
| 2 | // To regenerate this, run 'make'. |
| 3 | |
| 4 | //! Bindings to the `RandR` X11 extension. |
| 5 | |
| 6 | #![allow (clippy::too_many_arguments)] |
| 7 | |
| 8 | #[allow (unused_imports)] |
| 9 | use std::borrow::Cow; |
| 10 | #[allow (unused_imports)] |
| 11 | use std::convert::TryInto; |
| 12 | #[allow (unused_imports)] |
| 13 | use crate::utils::RawFdContainer; |
| 14 | #[allow (unused_imports)] |
| 15 | use crate::x11_utils::{Request, RequestHeader, Serialize, TryParse, TryParseFd}; |
| 16 | use std::io::IoSlice; |
| 17 | use crate::connection::RequestConnection; |
| 18 | #[allow (unused_imports)] |
| 19 | use crate::connection::Connection as X11Connection; |
| 20 | #[allow (unused_imports)] |
| 21 | use crate::cookie::{Cookie, CookieWithFds, VoidCookie}; |
| 22 | use crate::errors::ConnectionError; |
| 23 | #[allow (unused_imports)] |
| 24 | use crate::errors::ReplyOrIdError; |
| 25 | #[allow (unused_imports)] |
| 26 | use super::render; |
| 27 | #[allow (unused_imports)] |
| 28 | use super::xproto; |
| 29 | |
| 30 | pub use x11rb_protocol::protocol::randr::*; |
| 31 | |
| 32 | /// Get the major opcode of this extension |
| 33 | fn major_opcode<Conn: RequestConnection + ?Sized>(conn: &Conn) -> Result<u8, ConnectionError> { |
| 34 | let info: Option = conn.extension_information(X11_EXTENSION_NAME)?; |
| 35 | let info: ExtensionInformation = info.ok_or(err:ConnectionError::UnsupportedExtension)?; |
| 36 | Ok(info.major_opcode) |
| 37 | } |
| 38 | |
| 39 | pub fn query_version<Conn>(conn: &Conn, major_version: u32, minor_version: u32) -> Result<Cookie<'_, Conn, QueryVersionReply>, ConnectionError> |
| 40 | where |
| 41 | Conn: RequestConnection + ?Sized, |
| 42 | { |
| 43 | let request0: QueryVersionRequest = QueryVersionRequest { |
| 44 | major_version, |
| 45 | minor_version, |
| 46 | }; |
| 47 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 48 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 49 | assert_eq!(slices.len(), bytes.len()); |
| 50 | conn.send_request_with_reply(&slices, fds) |
| 51 | } |
| 52 | |
| 53 | pub fn set_screen_config<Conn>(conn: &Conn, window: xproto::Window, timestamp: xproto::Timestamp, config_timestamp: xproto::Timestamp, size_id: u16, rotation: Rotation, rate: u16) -> Result<Cookie<'_, Conn, SetScreenConfigReply>, ConnectionError> |
| 54 | where |
| 55 | Conn: RequestConnection + ?Sized, |
| 56 | { |
| 57 | let request0: SetScreenConfigRequest = SetScreenConfigRequest { |
| 58 | window, |
| 59 | timestamp, |
| 60 | config_timestamp, |
| 61 | size_id, |
| 62 | rotation, |
| 63 | rate, |
| 64 | }; |
| 65 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 66 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 67 | assert_eq!(slices.len(), bytes.len()); |
| 68 | conn.send_request_with_reply(&slices, fds) |
| 69 | } |
| 70 | |
| 71 | pub fn select_input<Conn>(conn: &Conn, window: xproto::Window, enable: NotifyMask) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 72 | where |
| 73 | Conn: RequestConnection + ?Sized, |
| 74 | { |
| 75 | let request0: SelectInputRequest = SelectInputRequest { |
| 76 | window, |
| 77 | enable, |
| 78 | }; |
| 79 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 80 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 81 | assert_eq!(slices.len(), bytes.len()); |
| 82 | conn.send_request_without_reply(&slices, fds) |
| 83 | } |
| 84 | |
| 85 | pub fn get_screen_info<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetScreenInfoReply>, ConnectionError> |
| 86 | where |
| 87 | Conn: RequestConnection + ?Sized, |
| 88 | { |
| 89 | let request0: GetScreenInfoRequest = GetScreenInfoRequest { |
| 90 | window, |
| 91 | }; |
| 92 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 93 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 94 | assert_eq!(slices.len(), bytes.len()); |
| 95 | conn.send_request_with_reply(&slices, fds) |
| 96 | } |
| 97 | |
| 98 | pub fn get_screen_size_range<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetScreenSizeRangeReply>, ConnectionError> |
| 99 | where |
| 100 | Conn: RequestConnection + ?Sized, |
| 101 | { |
| 102 | let request0: GetScreenSizeRangeRequest = GetScreenSizeRangeRequest { |
| 103 | window, |
| 104 | }; |
| 105 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 106 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 107 | assert_eq!(slices.len(), bytes.len()); |
| 108 | conn.send_request_with_reply(&slices, fds) |
| 109 | } |
| 110 | |
| 111 | pub fn set_screen_size<Conn>(conn: &Conn, window: xproto::Window, width: u16, height: u16, mm_width: u32, mm_height: u32) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 112 | where |
| 113 | Conn: RequestConnection + ?Sized, |
| 114 | { |
| 115 | let request0: SetScreenSizeRequest = SetScreenSizeRequest { |
| 116 | window, |
| 117 | width, |
| 118 | height, |
| 119 | mm_width, |
| 120 | mm_height, |
| 121 | }; |
| 122 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 123 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 124 | assert_eq!(slices.len(), bytes.len()); |
| 125 | conn.send_request_without_reply(&slices, fds) |
| 126 | } |
| 127 | |
| 128 | pub fn get_screen_resources<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetScreenResourcesReply>, ConnectionError> |
| 129 | where |
| 130 | Conn: RequestConnection + ?Sized, |
| 131 | { |
| 132 | let request0: GetScreenResourcesRequest = GetScreenResourcesRequest { |
| 133 | window, |
| 134 | }; |
| 135 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 136 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 137 | assert_eq!(slices.len(), bytes.len()); |
| 138 | conn.send_request_with_reply(&slices, fds) |
| 139 | } |
| 140 | |
| 141 | pub fn get_output_info<Conn>(conn: &Conn, output: Output, config_timestamp: xproto::Timestamp) -> Result<Cookie<'_, Conn, GetOutputInfoReply>, ConnectionError> |
| 142 | where |
| 143 | Conn: RequestConnection + ?Sized, |
| 144 | { |
| 145 | let request0: GetOutputInfoRequest = GetOutputInfoRequest { |
| 146 | output, |
| 147 | config_timestamp, |
| 148 | }; |
| 149 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 150 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 151 | assert_eq!(slices.len(), bytes.len()); |
| 152 | conn.send_request_with_reply(&slices, fds) |
| 153 | } |
| 154 | |
| 155 | pub fn list_output_properties<Conn>(conn: &Conn, output: Output) -> Result<Cookie<'_, Conn, ListOutputPropertiesReply>, ConnectionError> |
| 156 | where |
| 157 | Conn: RequestConnection + ?Sized, |
| 158 | { |
| 159 | let request0: ListOutputPropertiesRequest = ListOutputPropertiesRequest { |
| 160 | output, |
| 161 | }; |
| 162 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 163 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 164 | assert_eq!(slices.len(), bytes.len()); |
| 165 | conn.send_request_with_reply(&slices, fds) |
| 166 | } |
| 167 | |
| 168 | pub fn query_output_property<Conn>(conn: &Conn, output: Output, property: xproto::Atom) -> Result<Cookie<'_, Conn, QueryOutputPropertyReply>, ConnectionError> |
| 169 | where |
| 170 | Conn: RequestConnection + ?Sized, |
| 171 | { |
| 172 | let request0: QueryOutputPropertyRequest = QueryOutputPropertyRequest { |
| 173 | output, |
| 174 | property, |
| 175 | }; |
| 176 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 177 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 178 | assert_eq!(slices.len(), bytes.len()); |
| 179 | conn.send_request_with_reply(&slices, fds) |
| 180 | } |
| 181 | |
| 182 | pub fn configure_output_property<'c, 'input, Conn>(conn: &'c Conn, output: Output, property: xproto::Atom, pending: bool, range: bool, values: &'input [i32]) -> Result<VoidCookie<'c, Conn>, ConnectionError> |
| 183 | where |
| 184 | Conn: RequestConnection + ?Sized, |
| 185 | { |
| 186 | let request0: ConfigureOutputPropertyRequest<'_> = ConfigureOutputPropertyRequest { |
| 187 | output, |
| 188 | property, |
| 189 | pending, |
| 190 | range, |
| 191 | values: Cow::Borrowed(values), |
| 192 | }; |
| 193 | let (bytes: [Cow<'_, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 194 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 195 | assert_eq!(slices.len(), bytes.len()); |
| 196 | conn.send_request_without_reply(&slices, fds) |
| 197 | } |
| 198 | |
| 199 | pub fn change_output_property<'c, 'input, Conn>(conn: &'c Conn, output: Output, property: xproto::Atom, type_: xproto::Atom, format: u8, mode: xproto::PropMode, num_units: u32, data: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError> |
| 200 | where |
| 201 | Conn: RequestConnection + ?Sized, |
| 202 | { |
| 203 | let request0: ChangeOutputPropertyRequest<'_> = ChangeOutputPropertyRequest { |
| 204 | output, |
| 205 | property, |
| 206 | type_, |
| 207 | format, |
| 208 | mode, |
| 209 | num_units, |
| 210 | data: Cow::Borrowed(data), |
| 211 | }; |
| 212 | let (bytes: [Cow<'_, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 213 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 214 | assert_eq!(slices.len(), bytes.len()); |
| 215 | conn.send_request_without_reply(&slices, fds) |
| 216 | } |
| 217 | |
| 218 | pub fn delete_output_property<Conn>(conn: &Conn, output: Output, property: xproto::Atom) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 219 | where |
| 220 | Conn: RequestConnection + ?Sized, |
| 221 | { |
| 222 | let request0: DeleteOutputPropertyRequest = DeleteOutputPropertyRequest { |
| 223 | output, |
| 224 | property, |
| 225 | }; |
| 226 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 227 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 228 | assert_eq!(slices.len(), bytes.len()); |
| 229 | conn.send_request_without_reply(&slices, fds) |
| 230 | } |
| 231 | |
| 232 | pub fn get_output_property<Conn, A>(conn: &Conn, output: Output, property: xproto::Atom, type_: A, long_offset: u32, long_length: u32, delete: bool, pending: bool) -> Result<Cookie<'_, Conn, GetOutputPropertyReply>, ConnectionError> |
| 233 | where |
| 234 | Conn: RequestConnection + ?Sized, |
| 235 | A: Into<xproto::Atom>, |
| 236 | { |
| 237 | let type_: xproto::Atom = type_.into(); |
| 238 | let request0: GetOutputPropertyRequest = GetOutputPropertyRequest { |
| 239 | output, |
| 240 | property, |
| 241 | type_, |
| 242 | long_offset, |
| 243 | long_length, |
| 244 | delete, |
| 245 | pending, |
| 246 | }; |
| 247 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 248 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 249 | assert_eq!(slices.len(), bytes.len()); |
| 250 | conn.send_request_with_reply(&slices, fds) |
| 251 | } |
| 252 | |
| 253 | pub fn create_mode<'c, 'input, Conn>(conn: &'c Conn, window: xproto::Window, mode_info: ModeInfo, name: &'input [u8]) -> Result<Cookie<'c, Conn, CreateModeReply>, ConnectionError> |
| 254 | where |
| 255 | Conn: RequestConnection + ?Sized, |
| 256 | { |
| 257 | let request0: CreateModeRequest<'_> = CreateModeRequest { |
| 258 | window, |
| 259 | mode_info, |
| 260 | name: Cow::Borrowed(name), |
| 261 | }; |
| 262 | let (bytes: [Cow<'_, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 263 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 264 | assert_eq!(slices.len(), bytes.len()); |
| 265 | conn.send_request_with_reply(&slices, fds) |
| 266 | } |
| 267 | |
| 268 | pub fn destroy_mode<Conn>(conn: &Conn, mode: Mode) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 269 | where |
| 270 | Conn: RequestConnection + ?Sized, |
| 271 | { |
| 272 | let request0: DestroyModeRequest = DestroyModeRequest { |
| 273 | mode, |
| 274 | }; |
| 275 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 276 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 277 | assert_eq!(slices.len(), bytes.len()); |
| 278 | conn.send_request_without_reply(&slices, fds) |
| 279 | } |
| 280 | |
| 281 | pub fn add_output_mode<Conn>(conn: &Conn, output: Output, mode: Mode) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 282 | where |
| 283 | Conn: RequestConnection + ?Sized, |
| 284 | { |
| 285 | let request0: AddOutputModeRequest = AddOutputModeRequest { |
| 286 | output, |
| 287 | mode, |
| 288 | }; |
| 289 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 290 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 291 | assert_eq!(slices.len(), bytes.len()); |
| 292 | conn.send_request_without_reply(&slices, fds) |
| 293 | } |
| 294 | |
| 295 | pub fn delete_output_mode<Conn>(conn: &Conn, output: Output, mode: Mode) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 296 | where |
| 297 | Conn: RequestConnection + ?Sized, |
| 298 | { |
| 299 | let request0: DeleteOutputModeRequest = DeleteOutputModeRequest { |
| 300 | output, |
| 301 | mode, |
| 302 | }; |
| 303 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 304 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 305 | assert_eq!(slices.len(), bytes.len()); |
| 306 | conn.send_request_without_reply(&slices, fds) |
| 307 | } |
| 308 | |
| 309 | pub fn get_crtc_info<Conn>(conn: &Conn, crtc: Crtc, config_timestamp: xproto::Timestamp) -> Result<Cookie<'_, Conn, GetCrtcInfoReply>, ConnectionError> |
| 310 | where |
| 311 | Conn: RequestConnection + ?Sized, |
| 312 | { |
| 313 | let request0: GetCrtcInfoRequest = GetCrtcInfoRequest { |
| 314 | crtc, |
| 315 | config_timestamp, |
| 316 | }; |
| 317 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 318 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 319 | assert_eq!(slices.len(), bytes.len()); |
| 320 | conn.send_request_with_reply(&slices, fds) |
| 321 | } |
| 322 | |
| 323 | pub fn set_crtc_config<'c, 'input, Conn>(conn: &'c Conn, crtc: Crtc, timestamp: xproto::Timestamp, config_timestamp: xproto::Timestamp, x: i16, y: i16, mode: Mode, rotation: Rotation, outputs: &'input [Output]) -> Result<Cookie<'c, Conn, SetCrtcConfigReply>, ConnectionError> |
| 324 | where |
| 325 | Conn: RequestConnection + ?Sized, |
| 326 | { |
| 327 | let request0: SetCrtcConfigRequest<'_> = SetCrtcConfigRequest { |
| 328 | crtc, |
| 329 | timestamp, |
| 330 | config_timestamp, |
| 331 | x, |
| 332 | y, |
| 333 | mode, |
| 334 | rotation, |
| 335 | outputs: Cow::Borrowed(outputs), |
| 336 | }; |
| 337 | let (bytes: [Cow<'_, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 338 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 339 | assert_eq!(slices.len(), bytes.len()); |
| 340 | conn.send_request_with_reply(&slices, fds) |
| 341 | } |
| 342 | |
| 343 | pub fn get_crtc_gamma_size<Conn>(conn: &Conn, crtc: Crtc) -> Result<Cookie<'_, Conn, GetCrtcGammaSizeReply>, ConnectionError> |
| 344 | where |
| 345 | Conn: RequestConnection + ?Sized, |
| 346 | { |
| 347 | let request0: GetCrtcGammaSizeRequest = GetCrtcGammaSizeRequest { |
| 348 | crtc, |
| 349 | }; |
| 350 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 351 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 352 | assert_eq!(slices.len(), bytes.len()); |
| 353 | conn.send_request_with_reply(&slices, fds) |
| 354 | } |
| 355 | |
| 356 | pub fn get_crtc_gamma<Conn>(conn: &Conn, crtc: Crtc) -> Result<Cookie<'_, Conn, GetCrtcGammaReply>, ConnectionError> |
| 357 | where |
| 358 | Conn: RequestConnection + ?Sized, |
| 359 | { |
| 360 | let request0: GetCrtcGammaRequest = GetCrtcGammaRequest { |
| 361 | crtc, |
| 362 | }; |
| 363 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 364 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 365 | assert_eq!(slices.len(), bytes.len()); |
| 366 | conn.send_request_with_reply(&slices, fds) |
| 367 | } |
| 368 | |
| 369 | pub fn set_crtc_gamma<'c, 'input, Conn>(conn: &'c Conn, crtc: Crtc, red: &'input [u16], green: &'input [u16], blue: &'input [u16]) -> Result<VoidCookie<'c, Conn>, ConnectionError> |
| 370 | where |
| 371 | Conn: RequestConnection + ?Sized, |
| 372 | { |
| 373 | let request0: SetCrtcGammaRequest<'_> = SetCrtcGammaRequest { |
| 374 | crtc, |
| 375 | red: Cow::Borrowed(red), |
| 376 | green: Cow::Borrowed(green), |
| 377 | blue: Cow::Borrowed(blue), |
| 378 | }; |
| 379 | let (bytes: [Cow<'_, [u8]>; 5], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 380 | let slices: [IoSlice<'_>; 5] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3]), IoSlice::new(&bytes[4])]; |
| 381 | assert_eq!(slices.len(), bytes.len()); |
| 382 | conn.send_request_without_reply(&slices, fds) |
| 383 | } |
| 384 | |
| 385 | pub fn get_screen_resources_current<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetScreenResourcesCurrentReply>, ConnectionError> |
| 386 | where |
| 387 | Conn: RequestConnection + ?Sized, |
| 388 | { |
| 389 | let request0: GetScreenResourcesCurrentRequest = GetScreenResourcesCurrentRequest { |
| 390 | window, |
| 391 | }; |
| 392 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 393 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 394 | assert_eq!(slices.len(), bytes.len()); |
| 395 | conn.send_request_with_reply(&slices, fds) |
| 396 | } |
| 397 | |
| 398 | pub fn set_crtc_transform<'c, 'input, Conn>(conn: &'c Conn, crtc: Crtc, transform: render::Transform, filter_name: &'input [u8], filter_params: &'input [render::Fixed]) -> Result<VoidCookie<'c, Conn>, ConnectionError> |
| 399 | where |
| 400 | Conn: RequestConnection + ?Sized, |
| 401 | { |
| 402 | let request0: SetCrtcTransformRequest<'_> = SetCrtcTransformRequest { |
| 403 | crtc, |
| 404 | transform, |
| 405 | filter_name: Cow::Borrowed(filter_name), |
| 406 | filter_params: Cow::Borrowed(filter_params), |
| 407 | }; |
| 408 | let (bytes: [Cow<'_, [u8]>; 5], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 409 | let slices: [IoSlice<'_>; 5] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3]), IoSlice::new(&bytes[4])]; |
| 410 | assert_eq!(slices.len(), bytes.len()); |
| 411 | conn.send_request_without_reply(&slices, fds) |
| 412 | } |
| 413 | |
| 414 | pub fn get_crtc_transform<Conn>(conn: &Conn, crtc: Crtc) -> Result<Cookie<'_, Conn, GetCrtcTransformReply>, ConnectionError> |
| 415 | where |
| 416 | Conn: RequestConnection + ?Sized, |
| 417 | { |
| 418 | let request0: GetCrtcTransformRequest = GetCrtcTransformRequest { |
| 419 | crtc, |
| 420 | }; |
| 421 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 422 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 423 | assert_eq!(slices.len(), bytes.len()); |
| 424 | conn.send_request_with_reply(&slices, fds) |
| 425 | } |
| 426 | |
| 427 | pub fn get_panning<Conn>(conn: &Conn, crtc: Crtc) -> Result<Cookie<'_, Conn, GetPanningReply>, ConnectionError> |
| 428 | where |
| 429 | Conn: RequestConnection + ?Sized, |
| 430 | { |
| 431 | let request0: GetPanningRequest = GetPanningRequest { |
| 432 | crtc, |
| 433 | }; |
| 434 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 435 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 436 | assert_eq!(slices.len(), bytes.len()); |
| 437 | conn.send_request_with_reply(&slices, fds) |
| 438 | } |
| 439 | |
| 440 | pub fn set_panning<Conn>(conn: &Conn, crtc: Crtc, timestamp: xproto::Timestamp, left: u16, top: u16, width: u16, height: u16, track_left: u16, track_top: u16, track_width: u16, track_height: u16, border_left: i16, border_top: i16, border_right: i16, border_bottom: i16) -> Result<Cookie<'_, Conn, SetPanningReply>, ConnectionError> |
| 441 | where |
| 442 | Conn: RequestConnection + ?Sized, |
| 443 | { |
| 444 | let request0: SetPanningRequest = SetPanningRequest { |
| 445 | crtc, |
| 446 | timestamp, |
| 447 | left, |
| 448 | top, |
| 449 | width, |
| 450 | height, |
| 451 | track_left, |
| 452 | track_top, |
| 453 | track_width, |
| 454 | track_height, |
| 455 | border_left, |
| 456 | border_top, |
| 457 | border_right, |
| 458 | border_bottom, |
| 459 | }; |
| 460 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 461 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 462 | assert_eq!(slices.len(), bytes.len()); |
| 463 | conn.send_request_with_reply(&slices, fds) |
| 464 | } |
| 465 | |
| 466 | pub fn set_output_primary<Conn>(conn: &Conn, window: xproto::Window, output: Output) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 467 | where |
| 468 | Conn: RequestConnection + ?Sized, |
| 469 | { |
| 470 | let request0: SetOutputPrimaryRequest = SetOutputPrimaryRequest { |
| 471 | window, |
| 472 | output, |
| 473 | }; |
| 474 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 475 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 476 | assert_eq!(slices.len(), bytes.len()); |
| 477 | conn.send_request_without_reply(&slices, fds) |
| 478 | } |
| 479 | |
| 480 | pub fn get_output_primary<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetOutputPrimaryReply>, ConnectionError> |
| 481 | where |
| 482 | Conn: RequestConnection + ?Sized, |
| 483 | { |
| 484 | let request0: GetOutputPrimaryRequest = GetOutputPrimaryRequest { |
| 485 | window, |
| 486 | }; |
| 487 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 488 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 489 | assert_eq!(slices.len(), bytes.len()); |
| 490 | conn.send_request_with_reply(&slices, fds) |
| 491 | } |
| 492 | |
| 493 | pub fn get_providers<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetProvidersReply>, ConnectionError> |
| 494 | where |
| 495 | Conn: RequestConnection + ?Sized, |
| 496 | { |
| 497 | let request0: GetProvidersRequest = GetProvidersRequest { |
| 498 | window, |
| 499 | }; |
| 500 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 501 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 502 | assert_eq!(slices.len(), bytes.len()); |
| 503 | conn.send_request_with_reply(&slices, fds) |
| 504 | } |
| 505 | |
| 506 | pub fn get_provider_info<Conn>(conn: &Conn, provider: Provider, config_timestamp: xproto::Timestamp) -> Result<Cookie<'_, Conn, GetProviderInfoReply>, ConnectionError> |
| 507 | where |
| 508 | Conn: RequestConnection + ?Sized, |
| 509 | { |
| 510 | let request0: GetProviderInfoRequest = GetProviderInfoRequest { |
| 511 | provider, |
| 512 | config_timestamp, |
| 513 | }; |
| 514 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 515 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 516 | assert_eq!(slices.len(), bytes.len()); |
| 517 | conn.send_request_with_reply(&slices, fds) |
| 518 | } |
| 519 | |
| 520 | pub fn set_provider_offload_sink<Conn>(conn: &Conn, provider: Provider, sink_provider: Provider, config_timestamp: xproto::Timestamp) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 521 | where |
| 522 | Conn: RequestConnection + ?Sized, |
| 523 | { |
| 524 | let request0: SetProviderOffloadSinkRequest = SetProviderOffloadSinkRequest { |
| 525 | provider, |
| 526 | sink_provider, |
| 527 | config_timestamp, |
| 528 | }; |
| 529 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 530 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 531 | assert_eq!(slices.len(), bytes.len()); |
| 532 | conn.send_request_without_reply(&slices, fds) |
| 533 | } |
| 534 | |
| 535 | pub fn set_provider_output_source<Conn>(conn: &Conn, provider: Provider, source_provider: Provider, config_timestamp: xproto::Timestamp) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 536 | where |
| 537 | Conn: RequestConnection + ?Sized, |
| 538 | { |
| 539 | let request0: SetProviderOutputSourceRequest = SetProviderOutputSourceRequest { |
| 540 | provider, |
| 541 | source_provider, |
| 542 | config_timestamp, |
| 543 | }; |
| 544 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 545 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 546 | assert_eq!(slices.len(), bytes.len()); |
| 547 | conn.send_request_without_reply(&slices, fds) |
| 548 | } |
| 549 | |
| 550 | pub fn list_provider_properties<Conn>(conn: &Conn, provider: Provider) -> Result<Cookie<'_, Conn, ListProviderPropertiesReply>, ConnectionError> |
| 551 | where |
| 552 | Conn: RequestConnection + ?Sized, |
| 553 | { |
| 554 | let request0: ListProviderPropertiesRequest = ListProviderPropertiesRequest { |
| 555 | provider, |
| 556 | }; |
| 557 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 558 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 559 | assert_eq!(slices.len(), bytes.len()); |
| 560 | conn.send_request_with_reply(&slices, fds) |
| 561 | } |
| 562 | |
| 563 | pub fn query_provider_property<Conn>(conn: &Conn, provider: Provider, property: xproto::Atom) -> Result<Cookie<'_, Conn, QueryProviderPropertyReply>, ConnectionError> |
| 564 | where |
| 565 | Conn: RequestConnection + ?Sized, |
| 566 | { |
| 567 | let request0: QueryProviderPropertyRequest = QueryProviderPropertyRequest { |
| 568 | provider, |
| 569 | property, |
| 570 | }; |
| 571 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 572 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 573 | assert_eq!(slices.len(), bytes.len()); |
| 574 | conn.send_request_with_reply(&slices, fds) |
| 575 | } |
| 576 | |
| 577 | pub fn configure_provider_property<'c, 'input, Conn>(conn: &'c Conn, provider: Provider, property: xproto::Atom, pending: bool, range: bool, values: &'input [i32]) -> Result<VoidCookie<'c, Conn>, ConnectionError> |
| 578 | where |
| 579 | Conn: RequestConnection + ?Sized, |
| 580 | { |
| 581 | let request0: ConfigureProviderPropertyRequest<'_> = ConfigureProviderPropertyRequest { |
| 582 | provider, |
| 583 | property, |
| 584 | pending, |
| 585 | range, |
| 586 | values: Cow::Borrowed(values), |
| 587 | }; |
| 588 | let (bytes: [Cow<'_, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 589 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 590 | assert_eq!(slices.len(), bytes.len()); |
| 591 | conn.send_request_without_reply(&slices, fds) |
| 592 | } |
| 593 | |
| 594 | pub fn change_provider_property<'c, 'input, Conn>(conn: &'c Conn, provider: Provider, property: xproto::Atom, type_: xproto::Atom, format: u8, mode: u8, num_items: u32, data: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError> |
| 595 | where |
| 596 | Conn: RequestConnection + ?Sized, |
| 597 | { |
| 598 | let request0: ChangeProviderPropertyRequest<'_> = ChangeProviderPropertyRequest { |
| 599 | provider, |
| 600 | property, |
| 601 | type_, |
| 602 | format, |
| 603 | mode, |
| 604 | num_items, |
| 605 | data: Cow::Borrowed(data), |
| 606 | }; |
| 607 | let (bytes: [Cow<'_, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 608 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 609 | assert_eq!(slices.len(), bytes.len()); |
| 610 | conn.send_request_without_reply(&slices, fds) |
| 611 | } |
| 612 | |
| 613 | pub fn delete_provider_property<Conn>(conn: &Conn, provider: Provider, property: xproto::Atom) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 614 | where |
| 615 | Conn: RequestConnection + ?Sized, |
| 616 | { |
| 617 | let request0: DeleteProviderPropertyRequest = DeleteProviderPropertyRequest { |
| 618 | provider, |
| 619 | property, |
| 620 | }; |
| 621 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 622 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 623 | assert_eq!(slices.len(), bytes.len()); |
| 624 | conn.send_request_without_reply(&slices, fds) |
| 625 | } |
| 626 | |
| 627 | pub fn get_provider_property<Conn>(conn: &Conn, provider: Provider, property: xproto::Atom, type_: xproto::Atom, long_offset: u32, long_length: u32, delete: bool, pending: bool) -> Result<Cookie<'_, Conn, GetProviderPropertyReply>, ConnectionError> |
| 628 | where |
| 629 | Conn: RequestConnection + ?Sized, |
| 630 | { |
| 631 | let request0: GetProviderPropertyRequest = GetProviderPropertyRequest { |
| 632 | provider, |
| 633 | property, |
| 634 | type_, |
| 635 | long_offset, |
| 636 | long_length, |
| 637 | delete, |
| 638 | pending, |
| 639 | }; |
| 640 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 641 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 642 | assert_eq!(slices.len(), bytes.len()); |
| 643 | conn.send_request_with_reply(&slices, fds) |
| 644 | } |
| 645 | |
| 646 | pub fn get_monitors<Conn>(conn: &Conn, window: xproto::Window, get_active: bool) -> Result<Cookie<'_, Conn, GetMonitorsReply>, ConnectionError> |
| 647 | where |
| 648 | Conn: RequestConnection + ?Sized, |
| 649 | { |
| 650 | let request0: GetMonitorsRequest = GetMonitorsRequest { |
| 651 | window, |
| 652 | get_active, |
| 653 | }; |
| 654 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 655 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 656 | assert_eq!(slices.len(), bytes.len()); |
| 657 | conn.send_request_with_reply(&slices, fds) |
| 658 | } |
| 659 | |
| 660 | pub fn set_monitor<Conn>(conn: &Conn, window: xproto::Window, monitorinfo: MonitorInfo) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 661 | where |
| 662 | Conn: RequestConnection + ?Sized, |
| 663 | { |
| 664 | let request0: SetMonitorRequest = SetMonitorRequest { |
| 665 | window, |
| 666 | monitorinfo, |
| 667 | }; |
| 668 | let (bytes: [Cow<'static, [u8]>; 3], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 669 | let slices: [IoSlice<'_>; 3] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])]; |
| 670 | assert_eq!(slices.len(), bytes.len()); |
| 671 | conn.send_request_without_reply(&slices, fds) |
| 672 | } |
| 673 | |
| 674 | pub fn delete_monitor<Conn>(conn: &Conn, window: xproto::Window, name: xproto::Atom) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 675 | where |
| 676 | Conn: RequestConnection + ?Sized, |
| 677 | { |
| 678 | let request0: DeleteMonitorRequest = DeleteMonitorRequest { |
| 679 | window, |
| 680 | name, |
| 681 | }; |
| 682 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 683 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 684 | assert_eq!(slices.len(), bytes.len()); |
| 685 | conn.send_request_without_reply(&slices, fds) |
| 686 | } |
| 687 | |
| 688 | pub fn create_lease<'c, 'input, Conn>(conn: &'c Conn, window: xproto::Window, lid: Lease, crtcs: &'input [Crtc], outputs: &'input [Output]) -> Result<CookieWithFds<'c, Conn, CreateLeaseReply>, ConnectionError> |
| 689 | where |
| 690 | Conn: RequestConnection + ?Sized, |
| 691 | { |
| 692 | let request0: CreateLeaseRequest<'_> = CreateLeaseRequest { |
| 693 | window, |
| 694 | lid, |
| 695 | crtcs: Cow::Borrowed(crtcs), |
| 696 | outputs: Cow::Borrowed(outputs), |
| 697 | }; |
| 698 | let (bytes: [Cow<'_, [u8]>; 4], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 699 | let slices: [IoSlice<'_>; 4] = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3])]; |
| 700 | assert_eq!(slices.len(), bytes.len()); |
| 701 | conn.send_request_with_reply_with_fds(&slices, fds) |
| 702 | } |
| 703 | |
| 704 | pub fn free_lease<Conn>(conn: &Conn, lid: Lease, terminate: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError> |
| 705 | where |
| 706 | Conn: RequestConnection + ?Sized, |
| 707 | { |
| 708 | let request0: FreeLeaseRequest = FreeLeaseRequest { |
| 709 | lid, |
| 710 | terminate, |
| 711 | }; |
| 712 | let (bytes: [Cow<'static, [u8]>; 1], fds: Vec) = request0.serialize(major_opcode(conn)?); |
| 713 | let slices: [IoSlice<'_>; 1] = [IoSlice::new(&bytes[0])]; |
| 714 | assert_eq!(slices.len(), bytes.len()); |
| 715 | conn.send_request_without_reply(&slices, fds) |
| 716 | } |
| 717 | |
| 718 | /// Extension trait defining the requests of this extension. |
| 719 | pub trait ConnectionExt: RequestConnection { |
| 720 | fn randr_query_version(&self, major_version: u32, minor_version: u32) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError> |
| 721 | { |
| 722 | query_version(self, major_version, minor_version) |
| 723 | } |
| 724 | fn randr_set_screen_config(&self, window: xproto::Window, timestamp: xproto::Timestamp, config_timestamp: xproto::Timestamp, size_id: u16, rotation: Rotation, rate: u16) -> Result<Cookie<'_, Self, SetScreenConfigReply>, ConnectionError> |
| 725 | { |
| 726 | set_screen_config(self, window, timestamp, config_timestamp, size_id, rotation, rate) |
| 727 | } |
| 728 | fn randr_select_input(&self, window: xproto::Window, enable: NotifyMask) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 729 | { |
| 730 | select_input(self, window, enable) |
| 731 | } |
| 732 | fn randr_get_screen_info(&self, window: xproto::Window) -> Result<Cookie<'_, Self, GetScreenInfoReply>, ConnectionError> |
| 733 | { |
| 734 | get_screen_info(self, window) |
| 735 | } |
| 736 | fn randr_get_screen_size_range(&self, window: xproto::Window) -> Result<Cookie<'_, Self, GetScreenSizeRangeReply>, ConnectionError> |
| 737 | { |
| 738 | get_screen_size_range(self, window) |
| 739 | } |
| 740 | fn randr_set_screen_size(&self, window: xproto::Window, width: u16, height: u16, mm_width: u32, mm_height: u32) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 741 | { |
| 742 | set_screen_size(self, window, width, height, mm_width, mm_height) |
| 743 | } |
| 744 | fn randr_get_screen_resources(&self, window: xproto::Window) -> Result<Cookie<'_, Self, GetScreenResourcesReply>, ConnectionError> |
| 745 | { |
| 746 | get_screen_resources(self, window) |
| 747 | } |
| 748 | fn randr_get_output_info(&self, output: Output, config_timestamp: xproto::Timestamp) -> Result<Cookie<'_, Self, GetOutputInfoReply>, ConnectionError> |
| 749 | { |
| 750 | get_output_info(self, output, config_timestamp) |
| 751 | } |
| 752 | fn randr_list_output_properties(&self, output: Output) -> Result<Cookie<'_, Self, ListOutputPropertiesReply>, ConnectionError> |
| 753 | { |
| 754 | list_output_properties(self, output) |
| 755 | } |
| 756 | fn randr_query_output_property(&self, output: Output, property: xproto::Atom) -> Result<Cookie<'_, Self, QueryOutputPropertyReply>, ConnectionError> |
| 757 | { |
| 758 | query_output_property(self, output, property) |
| 759 | } |
| 760 | fn randr_configure_output_property<'c, 'input>(&'c self, output: Output, property: xproto::Atom, pending: bool, range: bool, values: &'input [i32]) -> Result<VoidCookie<'c, Self>, ConnectionError> |
| 761 | { |
| 762 | configure_output_property(self, output, property, pending, range, values) |
| 763 | } |
| 764 | fn randr_change_output_property<'c, 'input>(&'c self, output: Output, property: xproto::Atom, type_: xproto::Atom, format: u8, mode: xproto::PropMode, num_units: u32, data: &'input [u8]) -> Result<VoidCookie<'c, Self>, ConnectionError> |
| 765 | { |
| 766 | change_output_property(self, output, property, type_, format, mode, num_units, data) |
| 767 | } |
| 768 | fn randr_delete_output_property(&self, output: Output, property: xproto::Atom) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 769 | { |
| 770 | delete_output_property(self, output, property) |
| 771 | } |
| 772 | fn randr_get_output_property<A>(&self, output: Output, property: xproto::Atom, type_: A, long_offset: u32, long_length: u32, delete: bool, pending: bool) -> Result<Cookie<'_, Self, GetOutputPropertyReply>, ConnectionError> |
| 773 | where |
| 774 | A: Into<xproto::Atom>, |
| 775 | { |
| 776 | get_output_property(self, output, property, type_, long_offset, long_length, delete, pending) |
| 777 | } |
| 778 | fn randr_create_mode<'c, 'input>(&'c self, window: xproto::Window, mode_info: ModeInfo, name: &'input [u8]) -> Result<Cookie<'c, Self, CreateModeReply>, ConnectionError> |
| 779 | { |
| 780 | create_mode(self, window, mode_info, name) |
| 781 | } |
| 782 | fn randr_destroy_mode(&self, mode: Mode) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 783 | { |
| 784 | destroy_mode(self, mode) |
| 785 | } |
| 786 | fn randr_add_output_mode(&self, output: Output, mode: Mode) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 787 | { |
| 788 | add_output_mode(self, output, mode) |
| 789 | } |
| 790 | fn randr_delete_output_mode(&self, output: Output, mode: Mode) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 791 | { |
| 792 | delete_output_mode(self, output, mode) |
| 793 | } |
| 794 | fn randr_get_crtc_info(&self, crtc: Crtc, config_timestamp: xproto::Timestamp) -> Result<Cookie<'_, Self, GetCrtcInfoReply>, ConnectionError> |
| 795 | { |
| 796 | get_crtc_info(self, crtc, config_timestamp) |
| 797 | } |
| 798 | fn randr_set_crtc_config<'c, 'input>(&'c self, crtc: Crtc, timestamp: xproto::Timestamp, config_timestamp: xproto::Timestamp, x: i16, y: i16, mode: Mode, rotation: Rotation, outputs: &'input [Output]) -> Result<Cookie<'c, Self, SetCrtcConfigReply>, ConnectionError> |
| 799 | { |
| 800 | set_crtc_config(self, crtc, timestamp, config_timestamp, x, y, mode, rotation, outputs) |
| 801 | } |
| 802 | fn randr_get_crtc_gamma_size(&self, crtc: Crtc) -> Result<Cookie<'_, Self, GetCrtcGammaSizeReply>, ConnectionError> |
| 803 | { |
| 804 | get_crtc_gamma_size(self, crtc) |
| 805 | } |
| 806 | fn randr_get_crtc_gamma(&self, crtc: Crtc) -> Result<Cookie<'_, Self, GetCrtcGammaReply>, ConnectionError> |
| 807 | { |
| 808 | get_crtc_gamma(self, crtc) |
| 809 | } |
| 810 | fn randr_set_crtc_gamma<'c, 'input>(&'c self, crtc: Crtc, red: &'input [u16], green: &'input [u16], blue: &'input [u16]) -> Result<VoidCookie<'c, Self>, ConnectionError> |
| 811 | { |
| 812 | set_crtc_gamma(self, crtc, red, green, blue) |
| 813 | } |
| 814 | fn randr_get_screen_resources_current(&self, window: xproto::Window) -> Result<Cookie<'_, Self, GetScreenResourcesCurrentReply>, ConnectionError> |
| 815 | { |
| 816 | get_screen_resources_current(self, window) |
| 817 | } |
| 818 | fn randr_set_crtc_transform<'c, 'input>(&'c self, crtc: Crtc, transform: render::Transform, filter_name: &'input [u8], filter_params: &'input [render::Fixed]) -> Result<VoidCookie<'c, Self>, ConnectionError> |
| 819 | { |
| 820 | set_crtc_transform(self, crtc, transform, filter_name, filter_params) |
| 821 | } |
| 822 | fn randr_get_crtc_transform(&self, crtc: Crtc) -> Result<Cookie<'_, Self, GetCrtcTransformReply>, ConnectionError> |
| 823 | { |
| 824 | get_crtc_transform(self, crtc) |
| 825 | } |
| 826 | fn randr_get_panning(&self, crtc: Crtc) -> Result<Cookie<'_, Self, GetPanningReply>, ConnectionError> |
| 827 | { |
| 828 | get_panning(self, crtc) |
| 829 | } |
| 830 | fn randr_set_panning(&self, crtc: Crtc, timestamp: xproto::Timestamp, left: u16, top: u16, width: u16, height: u16, track_left: u16, track_top: u16, track_width: u16, track_height: u16, border_left: i16, border_top: i16, border_right: i16, border_bottom: i16) -> Result<Cookie<'_, Self, SetPanningReply>, ConnectionError> |
| 831 | { |
| 832 | set_panning(self, crtc, timestamp, left, top, width, height, track_left, track_top, track_width, track_height, border_left, border_top, border_right, border_bottom) |
| 833 | } |
| 834 | fn randr_set_output_primary(&self, window: xproto::Window, output: Output) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 835 | { |
| 836 | set_output_primary(self, window, output) |
| 837 | } |
| 838 | fn randr_get_output_primary(&self, window: xproto::Window) -> Result<Cookie<'_, Self, GetOutputPrimaryReply>, ConnectionError> |
| 839 | { |
| 840 | get_output_primary(self, window) |
| 841 | } |
| 842 | fn randr_get_providers(&self, window: xproto::Window) -> Result<Cookie<'_, Self, GetProvidersReply>, ConnectionError> |
| 843 | { |
| 844 | get_providers(self, window) |
| 845 | } |
| 846 | fn randr_get_provider_info(&self, provider: Provider, config_timestamp: xproto::Timestamp) -> Result<Cookie<'_, Self, GetProviderInfoReply>, ConnectionError> |
| 847 | { |
| 848 | get_provider_info(self, provider, config_timestamp) |
| 849 | } |
| 850 | fn randr_set_provider_offload_sink(&self, provider: Provider, sink_provider: Provider, config_timestamp: xproto::Timestamp) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 851 | { |
| 852 | set_provider_offload_sink(self, provider, sink_provider, config_timestamp) |
| 853 | } |
| 854 | fn randr_set_provider_output_source(&self, provider: Provider, source_provider: Provider, config_timestamp: xproto::Timestamp) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 855 | { |
| 856 | set_provider_output_source(self, provider, source_provider, config_timestamp) |
| 857 | } |
| 858 | fn randr_list_provider_properties(&self, provider: Provider) -> Result<Cookie<'_, Self, ListProviderPropertiesReply>, ConnectionError> |
| 859 | { |
| 860 | list_provider_properties(self, provider) |
| 861 | } |
| 862 | fn randr_query_provider_property(&self, provider: Provider, property: xproto::Atom) -> Result<Cookie<'_, Self, QueryProviderPropertyReply>, ConnectionError> |
| 863 | { |
| 864 | query_provider_property(self, provider, property) |
| 865 | } |
| 866 | fn randr_configure_provider_property<'c, 'input>(&'c self, provider: Provider, property: xproto::Atom, pending: bool, range: bool, values: &'input [i32]) -> Result<VoidCookie<'c, Self>, ConnectionError> |
| 867 | { |
| 868 | configure_provider_property(self, provider, property, pending, range, values) |
| 869 | } |
| 870 | fn randr_change_provider_property<'c, 'input>(&'c self, provider: Provider, property: xproto::Atom, type_: xproto::Atom, format: u8, mode: u8, num_items: u32, data: &'input [u8]) -> Result<VoidCookie<'c, Self>, ConnectionError> |
| 871 | { |
| 872 | change_provider_property(self, provider, property, type_, format, mode, num_items, data) |
| 873 | } |
| 874 | fn randr_delete_provider_property(&self, provider: Provider, property: xproto::Atom) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 875 | { |
| 876 | delete_provider_property(self, provider, property) |
| 877 | } |
| 878 | fn randr_get_provider_property(&self, provider: Provider, property: xproto::Atom, type_: xproto::Atom, long_offset: u32, long_length: u32, delete: bool, pending: bool) -> Result<Cookie<'_, Self, GetProviderPropertyReply>, ConnectionError> |
| 879 | { |
| 880 | get_provider_property(self, provider, property, type_, long_offset, long_length, delete, pending) |
| 881 | } |
| 882 | fn randr_get_monitors(&self, window: xproto::Window, get_active: bool) -> Result<Cookie<'_, Self, GetMonitorsReply>, ConnectionError> |
| 883 | { |
| 884 | get_monitors(self, window, get_active) |
| 885 | } |
| 886 | fn randr_set_monitor(&self, window: xproto::Window, monitorinfo: MonitorInfo) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 887 | { |
| 888 | set_monitor(self, window, monitorinfo) |
| 889 | } |
| 890 | fn randr_delete_monitor(&self, window: xproto::Window, name: xproto::Atom) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 891 | { |
| 892 | delete_monitor(self, window, name) |
| 893 | } |
| 894 | fn randr_create_lease<'c, 'input>(&'c self, window: xproto::Window, lid: Lease, crtcs: &'input [Crtc], outputs: &'input [Output]) -> Result<CookieWithFds<'c, Self, CreateLeaseReply>, ConnectionError> |
| 895 | { |
| 896 | create_lease(self, window, lid, crtcs, outputs) |
| 897 | } |
| 898 | fn randr_free_lease(&self, lid: Lease, terminate: u8) -> Result<VoidCookie<'_, Self>, ConnectionError> |
| 899 | { |
| 900 | free_lease(self, lid, terminate) |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | impl<C: RequestConnection + ?Sized> ConnectionExt for C {} |
| 905 | |