cidre 0.11.7

Apple frameworks bindings for rust
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
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
use crate::{arc, cf, cg, cv};

pub type ImageBuf = cv::Buf;

impl ImageBuf {
    /// Returns the full encoded dimensions of a ['cv::ImageBuf'].  For example, for an NTSC DV frame this would be 720x480
    ///
    /// Example:
    /// ```
    /// use cidre::{cv, cg};
    ///
    /// let pixel_buf = cv::PixelBuf::new(200, 100, cv::PixelFormat::_32_BGRA, None).unwrap();
    ///
    /// let size = pixel_buf.encoded_size();
    /// assert_eq!(cg::Size { width: 200.0, height: 100.0 }, size);
    /// ```
    #[doc(alias = "CVImageBufferGetEncodedSize")]
    #[inline]
    pub fn encoded_size(&self) -> cg::Size {
        unsafe { CVImageBufferGetEncodedSize(self) }
    }

    /// Returns the nominal output display size, in square pixels, of a Core Video image buffer.
    /// ```
    /// use cidre::{cv, cg};
    ///
    /// let pixel_buf = cv::PixelBuf::new(200, 100, cv::PixelFormat::_32_BGRA, None).unwrap();
    ///
    /// let display_size = pixel_buf.display_size();
    /// assert_eq!(cg::Size { width: 200.0, height: 100.0}, display_size);
    /// ```
    #[doc(alias = "CVImageBufferGetDisplaySize")]
    #[inline]
    pub fn display_size(&self) -> cg::Size {
        unsafe { CVImageBufferGetDisplaySize(self) }
    }

    /// Returns the source rectangle of a Core Video image buffer that represents the clean aperture of the buffer in encoded pixels.
    ///
    /// ```
    /// use cidre::{cv, cg};
    ///
    /// let pixel_buf = cv::PixelBuf::new(200, 100, cv::PixelFormat::_32_BGRA, None).unwrap();
    ///
    /// let rect = pixel_buf.clean_rect();
    /// assert_eq!(cg::Rect { origin: cg::Point::zero(), size: cg::Size { width: 200.0, height: 100.0 }}, rect);
    /// ```
    #[doc(alias = "CVImageBufferGetCleanRect")]
    #[inline]
    pub fn clean_rect(&self) -> cg::Rect {
        unsafe { CVImageBufferGetCleanRect(self) }
    }

    /// Returns a Boolean value indicating whether the image is flipped vertically.
    ///
    /// ```
    /// use cidre::{cv, cg};
    ///
    /// let pixel_buf = cv::PixelBuf::new(200, 100, cv::PixelFormat::_32_BGRA, None).unwrap();
    ///
    /// assert_eq!(true, pixel_buf.is_flipped());
    /// ```
    #[doc(alias = "CVImageBufferIsFlipped")]
    #[inline]
    pub fn is_flipped(&self) -> bool {
        unsafe { CVImageBufferIsFlipped(self) }
    }

    /// ```
    /// use cidre::{cv, cg};
    ///
    /// let buf = cv::PixelBuf::new(200, 100, cv::PixelFormat::_32_BGRA, None).unwrap();
    /// assert!(buf.color_space().is_none());
    ///
    /// ```
    #[inline]
    pub fn color_space(&self) -> Option<&cg::ColorSpace> {
        unsafe { CVImageBufferGetColorSpace(self) }
    }

    #[inline]
    pub fn color_space_from_attaches(
        attachments: &cf::Dictionary,
    ) -> Option<arc::R<cg::ColorSpace>> {
        unsafe { CVImageBufferCreateColorSpaceFromAttachments(attachments) }
    }
}

unsafe extern "C-unwind" {
    fn CVImageBufferGetColorSpace(image_buffer: &ImageBuf) -> Option<&cg::ColorSpace>;
    fn CVImageBufferGetEncodedSize(image_buffer: &ImageBuf) -> cg::Size;
    fn CVImageBufferGetDisplaySize(image_buffer: &ImageBuf) -> cg::Size;
    fn CVImageBufferGetCleanRect(image_buffer: &ImageBuf) -> cg::Rect;
    fn CVImageBufferIsFlipped(image_buffer: &ImageBuf) -> bool;
    fn CVImageBufferCreateColorSpaceFromAttachments(
        attachments: &cf::Dictionary,
    ) -> Option<arc::R<cg::ColorSpace>>;
}

pub mod attachment {

    pub mod keys {
        use crate::{api, cf};

        #[doc(alias = "kCVImageBufferCGColorSpaceKey")]
        #[inline]
        pub fn color_space() -> &'static cf::String {
            unsafe { kCVImageBufferCGColorSpaceKey }
        }

        #[doc(alias = "kCVImageBufferCleanApertureKey")]
        #[inline]
        pub fn clean_aperture() -> &'static cf::String {
            unsafe { kCVImageBufferCleanApertureKey }
        }

        #[doc(alias = "kCVImageBufferPreferredCleanApertureKey")]
        #[inline]
        pub fn preferred_clean_aperture() -> &'static cf::String {
            unsafe { kCVImageBufferPreferredCleanApertureKey }
        }

        #[doc(alias = "kCVImageBufferFieldCountKey")]
        #[inline]
        pub fn field_count() -> &'static cf::String {
            unsafe { kCVImageBufferFieldCountKey }
        }

        #[doc(alias = "kCVImageBufferFieldDetailKey")]
        #[inline]
        pub fn field_detail() -> &'static cf::String {
            unsafe { kCVImageBufferFieldDetailKey }
        }

        #[doc(alias = "kCVImageBufferPixelAspectRatioKey")]
        #[inline]
        pub fn aspect_ratio() -> &'static cf::String {
            unsafe { kCVImageBufferPixelAspectRatioKey }
        }

        #[doc(alias = "kCVImageBufferDisplayDimensionsKey")]
        #[inline]
        pub fn display_dimensions() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayDimensionsKey }
        }

        #[doc(alias = "kCVImageBufferGammaLevelKey")]
        #[inline]
        pub fn gamma_level() -> &'static cf::String {
            unsafe { kCVImageBufferGammaLevelKey }
        }

        #[doc(alias = "kCVImageBufferICCProfileKey")]
        #[inline]
        pub fn iic_profile() -> &'static cf::String {
            unsafe { kCVImageBufferICCProfileKey }
        }

        #[doc(alias = "kCVImageBufferYCbCrMatrixKey")]
        #[inline]
        pub fn ycbcr_matrix() -> &'static cf::String {
            unsafe { kCVImageBufferYCbCrMatrixKey }
        }

        #[doc(alias = "kCVImageBufferColorPrimariesKey")]
        #[inline]
        pub fn color_primaries() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimariesKey }
        }

        #[doc(alias = "kCVImageBufferTransferFunctionKey")]
        #[inline]
        pub fn transfer_fn() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunctionKey }
        }

        #[doc(alias = "kCVImageBufferLogTransferFunctionKey")]
        #[inline]
        #[api::available(macos = 14.2, ios = 17.2, tvos = 17.2, watchos = 10.2, visionos = 1.1)]
        pub fn log_transfer_fn() -> &'static cf::String {
            unsafe { kCVImageBufferLogTransferFunctionKey }
        }

        #[doc(alias = "kCVImageBufferDisplayMaskRectangleKey")]
        #[inline]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn display_mask_rect() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangleKey }
        }

        #[doc(alias = "kCVImageBufferDisplayMaskRectangleStereoLeftKey")]
        #[inline]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn display_mask_rect_stereo_left() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangleStereoLeftKey }
        }

        #[doc(alias = "kCVImageBufferDisplayMaskRectangleStereoRightKey")]
        #[inline]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn display_mask_rect_stereo_right() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangleStereoRightKey }
        }

        #[api::weak]
        unsafe extern "C" {
            static kCVImageBufferCGColorSpaceKey: &'static cf::String;
            static kCVImageBufferCleanApertureKey: &'static cf::String;

            static kCVImageBufferPreferredCleanApertureKey: &'static cf::String;
            static kCVImageBufferFieldCountKey: &'static cf::String;
            static kCVImageBufferFieldDetailKey: &'static cf::String;
            static kCVImageBufferPixelAspectRatioKey: &'static cf::String;
            static kCVImageBufferDisplayDimensionsKey: &'static cf::String;
            static kCVImageBufferGammaLevelKey: &'static cf::String;
            static kCVImageBufferICCProfileKey: &'static cf::String;
            static kCVImageBufferYCbCrMatrixKey: &'static cf::String;
            static kCVImageBufferColorPrimariesKey: &'static cf::String;
            static kCVImageBufferTransferFunctionKey: &'static cf::String;

            #[api::available(macos = 14.2, ios = 17.2, tvos = 17.2, watchos = 10.2, visionos = 1.1)]
            static kCVImageBufferLogTransferFunctionKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangleKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangleStereoLeftKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangleStereoRightKey: &'static cf::String;

        }
    }

    pub mod clean_aperture_keys {
        use crate::cf;

        #[doc(alias = "kCVImageBufferCleanApertureWidthKey")]
        #[inline]
        pub fn width() -> &'static cf::String {
            unsafe { kCVImageBufferCleanApertureWidthKey }
        }

        #[doc(alias = "kCVImageBufferCleanApertureHeightKey")]
        #[inline]
        pub fn height() -> &'static cf::String {
            unsafe { kCVImageBufferCleanApertureHeightKey }
        }

        #[doc(alias = "kCVImageBufferCleanApertureHorizontalOffsetKey")]
        #[inline]
        pub fn horizontal_offset() -> &'static cf::String {
            unsafe { kCVImageBufferCleanApertureHorizontalOffsetKey }
        }

        #[doc(alias = "kCVImageBufferCleanApertureVerticalOffsetKey")]
        #[inline]
        pub fn vertical_offset() -> &'static cf::String {
            unsafe { kCVImageBufferCleanApertureVerticalOffsetKey }
        }

        unsafe extern "C" {
            static kCVImageBufferCleanApertureWidthKey: &'static cf::String;
            static kCVImageBufferCleanApertureHeightKey: &'static cf::String;
            static kCVImageBufferCleanApertureHorizontalOffsetKey: &'static cf::String;
            static kCVImageBufferCleanApertureVerticalOffsetKey: &'static cf::String;
        }
    }

    pub mod field_detail {
        use crate::cf;

        #[doc(alias = "kCVImageBufferFieldDetailTemporalTopFirst")]
        #[inline]
        pub fn termporal_top_first() -> &'static cf::String {
            unsafe { kCVImageBufferFieldDetailTemporalTopFirst }
        }

        #[doc(alias = "kCVImageBufferFieldDetailTemporalBottomFirst")]
        #[inline]
        pub fn termporal_bottom_first() -> &'static cf::String {
            unsafe { kCVImageBufferFieldDetailTemporalBottomFirst }
        }

        #[doc(alias = "kCVImageBufferFieldDetailSpatialFirstLineEarly")]
        #[inline]
        pub fn spatial_first_line_early() -> &'static cf::String {
            unsafe { kCVImageBufferFieldDetailSpatialFirstLineEarly }
        }

        #[doc(alias = "kCVImageBufferFieldDetailSpatialFirstLineLate")]
        #[inline]
        pub fn spatial_first_line_late() -> &'static cf::String {
            unsafe { kCVImageBufferFieldDetailSpatialFirstLineLate }
        }

        unsafe extern "C" {
            static kCVImageBufferFieldDetailTemporalTopFirst: &'static cf::String;
            static kCVImageBufferFieldDetailTemporalBottomFirst: &'static cf::String;
            static kCVImageBufferFieldDetailSpatialFirstLineEarly: &'static cf::String;
            static kCVImageBufferFieldDetailSpatialFirstLineLate: &'static cf::String;
        }
    }

    pub mod aspect_ratio_keys {
        use crate::cf;

        #[doc(alias = "kCVImageBufferPixelAspectRatioHorizontalSpacingKey")]
        #[inline]
        pub fn horizontal_spacing() -> &'static cf::String {
            unsafe { kCVImageBufferPixelAspectRatioHorizontalSpacingKey }
        }

        #[doc(alias = "kCVImageBufferPixelAspectRatioVerticalSpacingKey")]
        #[inline]
        pub fn vertical_spacing() -> &'static cf::String {
            unsafe { kCVImageBufferPixelAspectRatioVerticalSpacingKey }
        }

        unsafe extern "C" {
            static kCVImageBufferPixelAspectRatioHorizontalSpacingKey: &'static cf::String;
            static kCVImageBufferPixelAspectRatioVerticalSpacingKey: &'static cf::String;
        }
    }

    pub mod display_keys {
        use crate::cf;

        #[doc(alias = "kCVImageBufferDisplayWidthKey")]
        #[inline]
        pub fn width() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayWidthKey }
        }

        #[doc(alias = "kCVImageBufferDisplayHeightKey")]
        #[inline]
        pub fn height() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayHeightKey }
        }

        unsafe extern "C" {
            static kCVImageBufferDisplayWidthKey: &'static cf::String;
            static kCVImageBufferDisplayHeightKey: &'static cf::String;
        }
    }

    pub mod ycbcr_matrix {
        use crate::cf;

        #[doc(alias = "kCVImageBufferYCbCrMatrix_ITU_R_709_2")]
        #[inline]
        pub fn itu_r_709_2() -> &'static cf::String {
            unsafe { kCVImageBufferYCbCrMatrix_ITU_R_709_2 }
        }

        #[doc(alias = "kCVImageBufferYCbCrMatrix_ITU_R_601_4")]
        #[inline]
        pub fn itu_r_601_4() -> &'static cf::String {
            unsafe { kCVImageBufferYCbCrMatrix_ITU_R_601_4 }
        }

        #[doc(alias = "kCVImageBufferYCbCrMatrix_SMPTE_240M_1995")]
        #[inline]
        pub fn smpte_240m_1995() -> &'static cf::String {
            unsafe { kCVImageBufferYCbCrMatrix_SMPTE_240M_1995 }
        }

        #[doc(alias = "kCVImageBufferYCbCrMatrix_ITU_R_2020")]
        #[inline]
        pub fn itu_r_2020() -> &'static cf::String {
            unsafe { kCVImageBufferYCbCrMatrix_ITU_R_2020 }
        }

        unsafe extern "C" {
            static kCVImageBufferYCbCrMatrix_ITU_R_709_2: &'static cf::String;
            static kCVImageBufferYCbCrMatrix_ITU_R_601_4: &'static cf::String;
            static kCVImageBufferYCbCrMatrix_SMPTE_240M_1995: &'static cf::String;
            static kCVImageBufferYCbCrMatrix_ITU_R_2020: &'static cf::String;
        }
    }

    pub mod color_primaries {
        use crate::cf;

        #[doc(alias = "kCVImageBufferColorPrimaries_ITU_R_709_2")]
        #[inline]
        pub fn itu_r_709_2() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_ITU_R_709_2 }
        }

        #[doc(alias = "kCVImageBufferColorPrimaries_EBU_3213")]
        #[inline]
        pub fn ebu_3213() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_EBU_3213 }
        }

        #[doc(alias = "kCVImageBufferColorPrimaries_SMPTE_C")]
        #[inline]
        pub fn smpte_c() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_SMPTE_C }
        }

        #[doc(alias = "kCVImageBufferColorPrimaries_P22")]
        #[inline]
        pub fn p22() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_P22 }
        }

        #[doc(alias = "kCVImageBufferColorPrimaries_DCI_P3")]
        #[inline]
        pub fn dci_p3() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_DCI_P3 }
        }

        #[doc(alias = "kCVImageBufferColorPrimaries_P3_D65")]
        #[inline]
        pub fn p3_d65() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_P3_D65 }
        }

        #[doc(alias = "kCVImageBufferColorPrimaries_ITU_R_2020")]
        #[inline]
        pub fn itu_r_2020() -> &'static cf::String {
            unsafe { kCVImageBufferColorPrimaries_ITU_R_2020 }
        }

        unsafe extern "C" {
            static kCVImageBufferColorPrimaries_ITU_R_709_2: &'static cf::String;
            static kCVImageBufferColorPrimaries_EBU_3213: &'static cf::String;
            static kCVImageBufferColorPrimaries_SMPTE_C: &'static cf::String;
            static kCVImageBufferColorPrimaries_P22: &'static cf::String;
            static kCVImageBufferColorPrimaries_DCI_P3: &'static cf::String;
            static kCVImageBufferColorPrimaries_P3_D65: &'static cf::String;
            static kCVImageBufferColorPrimaries_ITU_R_2020: &'static cf::String;
        }
    }

    pub mod transfer_fn {
        use crate::cf;

        #[doc(alias = "kCVImageBufferTransferFunction_ITU_R_709_2")]
        #[inline]
        pub fn itu_r_709_2() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_ITU_R_709_2 }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_SMPTE_240M_1995")]
        #[inline]
        pub fn smpte_240m_1995() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_SMPTE_240M_1995 }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_UseGamma")]
        #[inline]
        pub fn use_gamma() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_UseGamma }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_sRGB")]
        #[inline]
        pub fn srgb() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_sRGB }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_ITU_R_2020")]
        #[inline]
        pub fn itu_r_2020() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_ITU_R_2020 }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_SMPTE_ST_428_1")]
        #[inline]
        pub fn smpte_st_428_1() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_SMPTE_ST_428_1 }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ")]
        #[inline]
        pub fn smpte_st_2084_pq() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_ITU_R_2100_HLG")]
        #[inline]
        pub fn itu_r_2100_hlg() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_ITU_R_2100_HLG }
        }

        #[doc(alias = "kCVImageBufferTransferFunction_Linear")]
        pub fn linear() -> &'static cf::String {
            unsafe { kCVImageBufferTransferFunction_Linear }
        }

        unsafe extern "C" {
            static kCVImageBufferTransferFunction_ITU_R_709_2: &'static cf::String;
            static kCVImageBufferTransferFunction_SMPTE_240M_1995: &'static cf::String;
            static kCVImageBufferTransferFunction_UseGamma: &'static cf::String;
            static kCVImageBufferTransferFunction_sRGB: &'static cf::String;
            static kCVImageBufferTransferFunction_ITU_R_2020: &'static cf::String;
            static kCVImageBufferTransferFunction_SMPTE_ST_428_1: &'static cf::String;
            static kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ: &'static cf::String;
            static kCVImageBufferTransferFunction_ITU_R_2100_HLG: &'static cf::String;
            static kCVImageBufferTransferFunction_Linear: &'static cf::String;
        }
    }

    pub mod log_transfer_fn {
        use crate::{api, cf};

        #[api::available(macos = 14.2, ios = 17.2, tvos = 17.2, watchos = 10.2, visionos = 1.1)]
        #[doc(alias = "kCVImageBufferLogTransferFunction_AppleLog")]
        pub fn apple_log() -> &'static cf::String {
            unsafe { kCVImageBufferLogTransferFunction_AppleLog }
        }

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        #[doc(alias = "kCVImageBufferLogTransferFunction_AppleLog2")]
        pub fn apple_log2() -> &'static cf::String {
            unsafe { kCVImageBufferLogTransferFunction_AppleLog2 }
        }

        #[api::weak]
        unsafe extern "C" {
            #[api::available(macos = 14.2, ios = 17.2, tvos = 17.2, watchos = 10.2, visionos = 1.1)]
            static kCVImageBufferLogTransferFunction_AppleLog: &'static cf::String;
            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferLogTransferFunction_AppleLog2: &'static cf::String;
        }
    }

    pub mod display_mask_rect {
        use crate::{api, cf};

        /// Specifies the width in pixels of the 2D coordinate system to define the rectangle. 0,0 origin is the top-left.
        /// The raster width value is a cf::Number of unsigned 16-bit integer.
        /// Usually matches the width of the video or the output device.
        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_ReferenceRasterWidthKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn reference_raster_width() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_ReferenceRasterWidthKey }
        }

        /// Specifies the height in pixels of the 2D coordinate system to define the rectangle. 0,0 origin is the top-left.
        /// The raster height value is a cf::Number of unsigned 16-bit integer. Usually matches the height of
        /// the video or the output device.
        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_ReferenceRasterHeightKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn reference_raster_height() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_ReferenceRasterHeightKey }
        }

        /// Specifies the horizontal pixel offset of the rectangle from the left of the bounding raster.
        /// The left offset value is a cf::Number of unsigned 16-bit integer that is less than the reference raster width value.
        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_RectangleLeftKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn rect_left() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_RectangleLeftKey }
        }

        /// Specifies the width of the rectangle starting at rectangle's left offset toward the rectangle's right edge.
        /// The width value is a cf::Number of unsigned 16-bit integer.
        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_RectangleWidthKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn rect_width() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_RectangleWidthKey }
        }

        /// Specifies the vertical pixel offset of the rectangle from the top of the bounding raster.
        /// The top offset value is a cf::Number of unsigned 16-bit integer that is less than the reference raster height value.
        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_RectangleTopKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn rect_top() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_RectangleTopKey }
        }

        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_LeftEdgePointsKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn left_edge_points() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_LeftEdgePointsKey }
        }

        #[doc(alias = "kCVImageBufferDisplayMaskRectangle_RightEdgePointsKey")]
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        pub fn right_edge_points() -> &'static cf::String {
            unsafe { kCVImageBufferDisplayMaskRectangle_RightEdgePointsKey }
        }

        #[api::weak]
        unsafe extern "C" {
            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_ReferenceRasterWidthKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_ReferenceRasterHeightKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_RectangleLeftKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_RectangleWidthKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_RectangleTopKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_LeftEdgePointsKey: &'static cf::String;

            #[api::available(
                macos = 26.0,
                ios = 26.0,
                tvos = 26.0,
                watchos = 26.0,
                visionos = 26.0
            )]
            static kCVImageBufferDisplayMaskRectangle_RightEdgePointsKey: &'static cf::String;
        }
    }
}