waynest 0.0.26

Core wayland stuff
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
#![allow(async_fn_in_trait)]
#[doc = ""]
#[doc = "The aim of this color management extension is to get HDR games working quickly,"]
#[doc = "and have an easy way to test implementations in the wild before the upstream"]
#[doc = "protocol is ready to be merged."]
#[doc = "For that purpose it's intentionally limited and cut down and does not serve"]
#[doc = "all uses cases."]
#[doc = ""]
#[allow(clippy::module_inception)]
pub mod frog_color_management_v1 {
    #[doc = ""]
    #[doc = "The color management factory singleton creates color managed surface objects."]
    #[doc = ""]
    #[allow(clippy::too_many_arguments)]
    pub mod frog_color_management_factory_v1 {
        use futures_util::SinkExt;
        #[allow(unused)]
        use std::os::fd::AsRawFd;
        #[doc = "Trait to implement the frog_color_management_factory_v1 interface. See the module level documentation for more info"]
        pub trait FrogColorManagementFactoryV1 {
            const INTERFACE: &'static str = "frog_color_management_factory_v1";
            const VERSION: u32 = 1u32;
            async fn handle_event(
                &self,
                _client: &mut crate::server::Client,
                _sender_id: crate::wire::ObjectId,
                message: &mut crate::wire::Message,
            ) -> crate::client::Result<()> {
                #[allow(clippy::match_single_binding)]
                match message.opcode() {
                    _ => Err(crate::client::Error::UnknownOpcode),
                }
            }
            async fn destroy(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!(
                    "-> frog_color_management_factory_v1#{}.destroy()",
                    sender_id
                );
                let (payload, fds) = crate::wire::PayloadBuilder::new().build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 0u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = ""]
            async fn get_color_managed_surface(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                surface: crate::wire::ObjectId,
                callback: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!(
                    "-> frog_color_management_factory_v1#{}.get_color_managed_surface()",
                    sender_id
                );
                let (payload, fds) = crate::wire::PayloadBuilder::new()
                    .put_object(Some(surface))
                    .put_object(Some(callback))
                    .build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 1u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
        }
    }
    #[doc = ""]
    #[doc = "Interface for changing surface color management and HDR state."]
    #[doc = ""]
    #[doc = "An implementation must: support every part of the version"]
    #[doc = "of the frog_color_managed_surface interface it exposes."]
    #[doc = "Including all known enums associated with a given version."]
    #[doc = ""]
    #[allow(clippy::too_many_arguments)]
    pub mod frog_color_managed_surface {
        use futures_util::SinkExt;
        #[allow(unused)]
        use std::os::fd::AsRawFd;
        #[doc = ""]
        #[doc = "Extended information on the transfer functions described"]
        #[doc = "here can be found in the Khronos Data Format specification:"]
        #[doc = ""]
        #[doc = "https://registry.khronos.org/DataFormat/specs/1.3/dataformat.1.3.html"]
        #[doc = ""]
        #[repr(u32)]
        #[non_exhaustive]
        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
        pub enum TransferFunction {
            #[doc = "specifies undefined, implementation-specific handling of the surface's transfer function."]
            Undefined = 0u32,
            #[doc = "specifies the sRGB non-linear EOTF. An implementation may: display this as Gamma 2.2 for the purposes of being consistent with content rendering across displays, rendering_intent and user expectations."]
            Srgb = 1u32,
            #[doc = "specifies gamma 2.2 power curve as the EOTF"]
            Gamma22 = 2u32,
            #[doc = "specifies the SMPTE ST2084 Perceptual Quantizer (PQ) EOTF"]
            St2084Pq = 3u32,
            #[doc = "specifies the scRGB (extended sRGB) linear EOTF. Note: Primaries outside the gamut triangle specified can be expressed with negative values for this transfer function."]
            ScrgbLinear = 4u32,
        }
        impl TryFrom<u32> for TransferFunction {
            type Error = crate::wire::DecodeError;
            fn try_from(v: u32) -> Result<Self, Self::Error> {
                match v {
                    0u32 => Ok(Self::Undefined),
                    1u32 => Ok(Self::Srgb),
                    2u32 => Ok(Self::Gamma22),
                    3u32 => Ok(Self::St2084Pq),
                    4u32 => Ok(Self::ScrgbLinear),
                    _ => Err(crate::wire::DecodeError::MalformedPayload),
                }
            }
        }
        impl std::fmt::Display for TransferFunction {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                (*self as u32).fmt(f)
            }
        }
        #[repr(u32)]
        #[non_exhaustive]
        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
        pub enum Primaries {
            #[doc = "specifies undefined, implementation-specific handling"]
            Undefined = 0u32,
            #[doc = "specifies Rec.709/sRGB primaries with D65 white point"]
            Rec709 = 1u32,
            #[doc = "specifies Rec.2020/HDR10 primaries with D65 white point"]
            Rec2020 = 2u32,
        }
        impl TryFrom<u32> for Primaries {
            type Error = crate::wire::DecodeError;
            fn try_from(v: u32) -> Result<Self, Self::Error> {
                match v {
                    0u32 => Ok(Self::Undefined),
                    1u32 => Ok(Self::Rec709),
                    2u32 => Ok(Self::Rec2020),
                    _ => Err(crate::wire::DecodeError::MalformedPayload),
                }
            }
        }
        impl std::fmt::Display for Primaries {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                (*self as u32).fmt(f)
            }
        }
        #[doc = ""]
        #[doc = "Extended information on render intents described"]
        #[doc = "here can be found in ICC.1:2022:"]
        #[doc = ""]
        #[doc = "https://www.color.org/specification/ICC.1-2022-05.pdf"]
        #[doc = ""]
        #[repr(u32)]
        #[non_exhaustive]
        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
        pub enum RenderIntent {
            #[doc = "perceptual"]
            Perceptual = 0u32,
        }
        impl TryFrom<u32> for RenderIntent {
            type Error = crate::wire::DecodeError;
            fn try_from(v: u32) -> Result<Self, Self::Error> {
                match v {
                    0u32 => Ok(Self::Perceptual),
                    _ => Err(crate::wire::DecodeError::MalformedPayload),
                }
            }
        }
        impl std::fmt::Display for RenderIntent {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                (*self as u32).fmt(f)
            }
        }
        #[doc = "Trait to implement the frog_color_managed_surface interface. See the module level documentation for more info"]
        pub trait FrogColorManagedSurface {
            const INTERFACE: &'static str = "frog_color_managed_surface";
            const VERSION: u32 = 1u32;
            async fn handle_event(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                message: &mut crate::wire::Message,
            ) -> crate::client::Result<()> {
                #[allow(clippy::match_single_binding)]
                match message.opcode() {
                    0u16 => {
                        let transfer_function = message.uint()?;
                        let output_display_primary_red_x = message.uint()?;
                        let output_display_primary_red_y = message.uint()?;
                        let output_display_primary_green_x = message.uint()?;
                        let output_display_primary_green_y = message.uint()?;
                        let output_display_primary_blue_x = message.uint()?;
                        let output_display_primary_blue_y = message.uint()?;
                        let output_white_point_x = message.uint()?;
                        let output_white_point_y = message.uint()?;
                        let max_luminance = message.uint()?;
                        let min_luminance = message.uint()?;
                        let max_full_frame_luminance = message.uint()?;
                        tracing::debug!(
                            "frog_color_managed_surface#{}.preferred_metadata({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {})",
                            sender_id,
                            transfer_function,
                            output_display_primary_red_x,
                            output_display_primary_red_y,
                            output_display_primary_green_x,
                            output_display_primary_green_y,
                            output_display_primary_blue_x,
                            output_display_primary_blue_y,
                            output_white_point_x,
                            output_white_point_y,
                            max_luminance,
                            min_luminance,
                            max_full_frame_luminance
                        );
                        self.preferred_metadata(
                            client,
                            sender_id,
                            transfer_function.try_into()?,
                            output_display_primary_red_x,
                            output_display_primary_red_y,
                            output_display_primary_green_x,
                            output_display_primary_green_y,
                            output_display_primary_blue_x,
                            output_display_primary_blue_y,
                            output_white_point_x,
                            output_white_point_y,
                            max_luminance,
                            min_luminance,
                            max_full_frame_luminance,
                        )
                        .await
                    }
                    _ => Err(crate::client::Error::UnknownOpcode),
                }
            }
            #[doc = ""]
            #[doc = "Destroying the color managed surface resets all known color"]
            #[doc = "state for the surface back to 'undefined' implementation-specific"]
            #[doc = "values."]
            #[doc = ""]
            async fn destroy(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!("-> frog_color_managed_surface#{}.destroy()", sender_id);
                let (payload, fds) = crate::wire::PayloadBuilder::new().build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 0u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            async fn set_known_transfer_function(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                transfer_function: TransferFunction,
            ) -> crate::client::Result<()> {
                tracing::debug!(
                    "-> frog_color_managed_surface#{}.set_known_transfer_function()",
                    sender_id
                );
                let (payload, fds) = crate::wire::PayloadBuilder::new()
                    .put_uint(transfer_function as u32)
                    .build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 1u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            async fn set_known_container_color_volume(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                primaries: Primaries,
            ) -> crate::client::Result<()> {
                tracing::debug!(
                    "-> frog_color_managed_surface#{}.set_known_container_color_volume()",
                    sender_id
                );
                let (payload, fds) = crate::wire::PayloadBuilder::new()
                    .put_uint(primaries as u32)
                    .build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 2u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = "NOTE: On a surface with \"perceptual\" (default) render intent, handling of the container's color volume"]
            #[doc = "is implementation-specific, and may differ between different transfer functions it is paired with:"]
            #[doc = "ie. sRGB + 709 rendering may have it's primaries widened to more of the available display's gamut"]
            #[doc = "to be be more pleasing for the viewer."]
            #[doc = "Compared to scRGB Linear + 709 being treated faithfully as 709"]
            #[doc = "(including utilizing negatives out of the 709 gamut triangle)"]
            #[doc = ""]
            async fn set_render_intent(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                render_intent: RenderIntent,
            ) -> crate::client::Result<()> {
                tracing::debug!(
                    "-> frog_color_managed_surface#{}.set_render_intent()",
                    sender_id
                );
                let (payload, fds) = crate::wire::PayloadBuilder::new()
                    .put_uint(render_intent as u32)
                    .build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 3u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = "Forwards HDR metadata from the client to the compositor."]
            #[doc = ""]
            #[doc = "HDR Metadata Infoframe as per CTA 861.G spec."]
            #[doc = ""]
            #[doc = "Usage of this HDR metadata is implementation specific and"]
            #[doc = "outside of the scope of this protocol."]
            #[doc = ""]
            async fn set_hdr_metadata(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                mastering_display_primary_red_x: u32,
                mastering_display_primary_red_y: u32,
                mastering_display_primary_green_x: u32,
                mastering_display_primary_green_y: u32,
                mastering_display_primary_blue_x: u32,
                mastering_display_primary_blue_y: u32,
                mastering_white_point_x: u32,
                mastering_white_point_y: u32,
                max_display_mastering_luminance: u32,
                min_display_mastering_luminance: u32,
                max_cll: u32,
                max_fall: u32,
            ) -> crate::client::Result<()> {
                tracing::debug!(
                    "-> frog_color_managed_surface#{}.set_hdr_metadata()",
                    sender_id
                );
                let (payload, fds) = crate::wire::PayloadBuilder::new()
                    .put_uint(mastering_display_primary_red_x)
                    .put_uint(mastering_display_primary_red_y)
                    .put_uint(mastering_display_primary_green_x)
                    .put_uint(mastering_display_primary_green_y)
                    .put_uint(mastering_display_primary_blue_x)
                    .put_uint(mastering_display_primary_blue_y)
                    .put_uint(mastering_white_point_x)
                    .put_uint(mastering_white_point_y)
                    .put_uint(max_display_mastering_luminance)
                    .put_uint(min_display_mastering_luminance)
                    .put_uint(max_cll)
                    .put_uint(max_fall)
                    .build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 4u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = "Current preferred metadata for a surface."]
            #[doc = "The application should use this information to tone-map its buffers"]
            #[doc = "to this target before committing."]
            #[doc = ""]
            #[doc = "This metadata does not necessarily correspond to any physical output, but"]
            #[doc = "rather what the compositor thinks would be best for a given surface."]
            #[doc = ""]
            async fn preferred_metadata(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                transfer_function: TransferFunction,
                output_display_primary_red_x: u32,
                output_display_primary_red_y: u32,
                output_display_primary_green_x: u32,
                output_display_primary_green_y: u32,
                output_display_primary_blue_x: u32,
                output_display_primary_blue_y: u32,
                output_white_point_x: u32,
                output_white_point_y: u32,
                max_luminance: u32,
                min_luminance: u32,
                max_full_frame_luminance: u32,
            ) -> crate::client::Result<()>;
        }
    }
}
#[allow(clippy::module_inception)]
pub mod frog_fifo_v1 {
    #[doc = ""]
    #[doc = "When a Wayland compositor considers applying a content update,"]
    #[doc = "it must ensure all the update's readiness constraints (fences, etc)"]
    #[doc = "are met."]
    #[doc = ""]
    #[doc = "This protocol provides a way to use the completion of a display refresh"]
    #[doc = "cycle as an additional readiness constraint."]
    #[doc = ""]
    #[doc = "Warning! The protocol described in this file is currently in the testing"]
    #[doc = "phase. Backward compatible changes may be added together with the"]
    #[doc = "corresponding interface version bump. Backward incompatible changes can"]
    #[doc = "only be done by creating a new major version of the extension."]
    #[doc = ""]
    #[allow(clippy::too_many_arguments)]
    pub mod frog_fifo_manager_v1 {
        use futures_util::SinkExt;
        #[allow(unused)]
        use std::os::fd::AsRawFd;
        #[doc = ""]
        #[doc = "These fatal protocol errors may be emitted in response to"]
        #[doc = "illegal requests."]
        #[doc = ""]
        #[repr(u32)]
        #[non_exhaustive]
        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
        pub enum Error {
            #[doc = "fifo extension already exists for surface"]
            FifoSurfaceAlreadyExists = 0u32,
        }
        impl TryFrom<u32> for Error {
            type Error = crate::wire::DecodeError;
            fn try_from(v: u32) -> Result<Self, Self::Error> {
                match v {
                    0u32 => Ok(Self::FifoSurfaceAlreadyExists),
                    _ => Err(crate::wire::DecodeError::MalformedPayload),
                }
            }
        }
        impl std::fmt::Display for Error {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                (*self as u32).fmt(f)
            }
        }
        #[doc = "Trait to implement the frog_fifo_manager_v1 interface. See the module level documentation for more info"]
        pub trait FrogFifoManagerV1 {
            const INTERFACE: &'static str = "frog_fifo_manager_v1";
            const VERSION: u32 = 1u32;
            async fn handle_event(
                &self,
                _client: &mut crate::server::Client,
                _sender_id: crate::wire::ObjectId,
                message: &mut crate::wire::Message,
            ) -> crate::client::Result<()> {
                #[allow(clippy::match_single_binding)]
                match message.opcode() {
                    _ => Err(crate::client::Error::UnknownOpcode),
                }
            }
            #[doc = ""]
            #[doc = "Informs the server that the client will no longer be using"]
            #[doc = "this protocol object. Existing objects created by this object"]
            #[doc = "are not affected."]
            #[doc = ""]
            async fn destroy(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!("-> frog_fifo_manager_v1#{}.destroy()", sender_id);
                let (payload, fds) = crate::wire::PayloadBuilder::new().build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 0u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = "Establish a fifo object for a surface that may be used to add"]
            #[doc = "display refresh constraints to content updates."]
            #[doc = ""]
            #[doc = "Only one such object may exist for a surface and attempting"]
            #[doc = "to create more than one will result in a fifo_manager_already_exists"]
            #[doc = "protocol error. If a surface is acted on by multiple software"]
            #[doc = "components, general best practice is that only the component"]
            #[doc = "performing wl_surface.attach operations should use this protocol."]
            #[doc = ""]
            async fn get_fifo(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
                id: crate::wire::ObjectId,
                surface: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!("-> frog_fifo_manager_v1#{}.get_fifo()", sender_id);
                let (payload, fds) = crate::wire::PayloadBuilder::new()
                    .put_object(Some(id))
                    .put_object(Some(surface))
                    .build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 1u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
        }
    }
    #[doc = ""]
    #[doc = "A fifo object for a surface that may be used to add"]
    #[doc = "display refresh constraints to content updates."]
    #[doc = ""]
    #[allow(clippy::too_many_arguments)]
    pub mod frog_fifo_surface_v1 {
        use futures_util::SinkExt;
        #[allow(unused)]
        use std::os::fd::AsRawFd;
        #[doc = ""]
        #[doc = "These fatal protocol errors may be emitted in response to"]
        #[doc = "illegal requests."]
        #[doc = ""]
        #[repr(u32)]
        #[non_exhaustive]
        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
        pub enum Error {
            #[doc = "the associated surface no longer exists"]
            SurfaceDestroyed = 0u32,
        }
        impl TryFrom<u32> for Error {
            type Error = crate::wire::DecodeError;
            fn try_from(v: u32) -> Result<Self, Self::Error> {
                match v {
                    0u32 => Ok(Self::SurfaceDestroyed),
                    _ => Err(crate::wire::DecodeError::MalformedPayload),
                }
            }
        }
        impl std::fmt::Display for Error {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                (*self as u32).fmt(f)
            }
        }
        #[doc = "Trait to implement the frog_fifo_surface_v1 interface. See the module level documentation for more info"]
        pub trait FrogFifoSurfaceV1 {
            const INTERFACE: &'static str = "frog_fifo_surface_v1";
            const VERSION: u32 = 1u32;
            async fn handle_event(
                &self,
                _client: &mut crate::server::Client,
                _sender_id: crate::wire::ObjectId,
                message: &mut crate::wire::Message,
            ) -> crate::client::Result<()> {
                #[allow(clippy::match_single_binding)]
                match message.opcode() {
                    _ => Err(crate::client::Error::UnknownOpcode),
                }
            }
            #[doc = ""]
            #[doc = "When the content update containing the \"set_barrier\" is applied,"]
            #[doc = "it sets a \"fifo_barrier\" condition on the surface associated with"]
            #[doc = "the fifo object. The condition is cleared immediately after the"]
            #[doc = "following latching deadline for non-tearing presentation."]
            #[doc = "The condition needs to be cleared soon enough so that forward"]
            #[doc = "progress for the application is guaranteed. The exact rate at which"]
            #[doc = "that happens is implementation defined."]
            #[doc = ""]
            #[doc = "To wait for this condition to clear, use the \"wait_barrier\" request."]
            #[doc = ""]
            #[doc = "\"set_barrier\" is double-buffered state, see wl_surface.commit."]
            #[doc = ""]
            #[doc = "Requesting set_barrier after the fifo object's surface is"]
            #[doc = "destroyed will generate a \"surface_destroyed\" error."]
            #[doc = ""]
            async fn set_barrier(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!("-> frog_fifo_surface_v1#{}.set_barrier()", sender_id);
                let (payload, fds) = crate::wire::PayloadBuilder::new().build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 0u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = "Indicate that this content update is not ready while a"]
            #[doc = "\"fifo_barrier\" condition is present on the surface."]
            #[doc = ""]
            #[doc = "This means that when the content update containing \"set_barrier\""]
            #[doc = "was made active at a latching deadline, it will be active for"]
            #[doc = "at least one refresh cycle. A content update which is allowed to"]
            #[doc = "tear might become active after a latching deadline if no content"]
            #[doc = "update became active at the deadline."]
            #[doc = ""]
            #[doc = "\"wait_barrier\" is double-buffered state, see wl_surface.commit."]
            #[doc = ""]
            #[doc = "Requesting \"wait_barrier\" after the fifo object's surface is"]
            #[doc = "destroyed will generate a \"surface_destroyed\" error."]
            #[doc = ""]
            async fn wait_barrier(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!("-> frog_fifo_surface_v1#{}.wait_barrier()", sender_id);
                let (payload, fds) = crate::wire::PayloadBuilder::new().build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 1u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
            #[doc = ""]
            #[doc = "Informs the server that the client will no longer be using"]
            #[doc = "this protocol object."]
            #[doc = ""]
            #[doc = "Surface state changes previously made by this protocol are"]
            #[doc = "unaffected by this object's destruction."]
            #[doc = ""]
            async fn destroy(
                &self,
                client: &mut crate::server::Client,
                sender_id: crate::wire::ObjectId,
            ) -> crate::client::Result<()> {
                tracing::debug!("-> frog_fifo_surface_v1#{}.destroy()", sender_id);
                let (payload, fds) = crate::wire::PayloadBuilder::new().build();
                client
                    .send_message(crate::wire::Message::new(sender_id, 2u16, payload, fds))
                    .await
                    .map_err(crate::client::Error::IoError)
            }
        }
    }
}