objc2_accessibility/generated/
AXAudiograph.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_protocol!(
13    /// Chart or graph container elements may adopt this protocol to enable Audio Graph support.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axchart?language=objc)
16    pub unsafe trait AXChart: NSObjectProtocol {
17        #[unsafe(method(accessibilityChartDescriptor))]
18        #[unsafe(method_family = none)]
19        unsafe fn accessibilityChartDescriptor(&self) -> Option<Retained<AXChartDescriptor>>;
20
21        /// Setter for [`accessibilityChartDescriptor`][Self::accessibilityChartDescriptor].
22        #[unsafe(method(setAccessibilityChartDescriptor:))]
23        #[unsafe(method_family = none)]
24        unsafe fn setAccessibilityChartDescriptor(
25            &self,
26            accessibility_chart_descriptor: Option<&AXChartDescriptor>,
27        );
28    }
29);
30
31extern_protocol!(
32    /// Describes a data axis for the chart (e.g. X, Y, etc.)
33    /// Each AXChart requires at least two AXDataAxis objects
34    /// to describe, at minimum, and X and a Y axis.
35    ///
36    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axdataaxisdescriptor?language=objc)
37    pub unsafe trait AXDataAxisDescriptor: NSCopying {
38        /// The name or title of this axis.
39        #[unsafe(method(title))]
40        #[unsafe(method_family = none)]
41        unsafe fn title(&self) -> Retained<NSString>;
42
43        /// Setter for [`title`][Self::title].
44        ///
45        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
46        #[unsafe(method(setTitle:))]
47        #[unsafe(method_family = none)]
48        unsafe fn setTitle(&self, title: &NSString);
49
50        /// An attributed version of the title of this axis.
51        /// When set, this will be used instead of `title`.
52        #[unsafe(method(attributedTitle))]
53        #[unsafe(method_family = none)]
54        unsafe fn attributedTitle(&self) -> Retained<NSAttributedString>;
55
56        /// Setter for [`attributedTitle`][Self::attributedTitle].
57        ///
58        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
59        #[unsafe(method(setAttributedTitle:))]
60        #[unsafe(method_family = none)]
61        unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString);
62    }
63);
64
65/// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axnumericdataaxisdescriptorscale?language=objc)
66// NS_ENUM
67#[repr(transparent)]
68#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
69pub struct AXNumericDataAxisDescriptorScale(pub NSInteger);
70impl AXNumericDataAxisDescriptorScale {
71    #[doc(alias = "AXScaleTypeLinear")]
72    pub const ScaleTypeLinear: Self = Self(0);
73    #[doc(alias = "AXScaleTypeLog10")]
74    pub const ScaleTypeLog10: Self = Self(1);
75    #[doc(alias = "AXScaleTypeLn")]
76    pub const ScaleTypeLn: Self = Self(2);
77}
78
79unsafe impl Encode for AXNumericDataAxisDescriptorScale {
80    const ENCODING: Encoding = NSInteger::ENCODING;
81}
82
83unsafe impl RefEncode for AXNumericDataAxisDescriptorScale {
84    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
85}
86
87extern_class!(
88    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axnumericdataaxisdescriptor?language=objc)
89    #[unsafe(super(NSObject))]
90    #[derive(Debug, PartialEq, Eq, Hash)]
91    pub struct AXNumericDataAxisDescriptor;
92);
93
94extern_conformance!(
95    unsafe impl AXDataAxisDescriptor for AXNumericDataAxisDescriptor {}
96);
97
98extern_conformance!(
99    unsafe impl NSCopying for AXNumericDataAxisDescriptor {}
100);
101
102unsafe impl CopyingHelper for AXNumericDataAxisDescriptor {
103    type Result = Self;
104}
105
106extern_conformance!(
107    unsafe impl NSObjectProtocol for AXNumericDataAxisDescriptor {}
108);
109
110impl AXNumericDataAxisDescriptor {
111    extern_methods!(
112        /// The scale to use for this axis. This should match the visual representation in the chart.
113        /// If not set explicitly, this will default to `linear`.
114        #[unsafe(method(scaleType))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn scaleType(&self) -> AXNumericDataAxisDescriptorScale;
117
118        /// Setter for [`scaleType`][Self::scaleType].
119        #[unsafe(method(setScaleType:))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn setScaleType(&self, scale_type: AXNumericDataAxisDescriptorScale);
122
123        /// The minimum displayable value for the axis.
124        #[unsafe(method(lowerBound))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn lowerBound(&self) -> c_double;
127
128        /// Setter for [`lowerBound`][Self::lowerBound].
129        #[unsafe(method(setLowerBound:))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn setLowerBound(&self, lower_bound: c_double);
132
133        /// The maximum displayable value for the axis.
134        #[unsafe(method(upperBound))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn upperBound(&self) -> c_double;
137
138        /// Setter for [`upperBound`][Self::upperBound].
139        #[unsafe(method(setUpperBound:))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn setUpperBound(&self, upper_bound: c_double);
142
143        #[cfg(feature = "block2")]
144        /// Provides a value description to be spoken for a particular data value on this axis.
145        /// Use this to format data values to string representations that include units, dates, times, etc.
146        #[unsafe(method(valueDescriptionProvider))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn valueDescriptionProvider(
149            &self,
150        ) -> NonNull<block2::DynBlock<dyn Fn(c_double) -> NonNull<NSString>>>;
151
152        #[cfg(feature = "block2")]
153        /// Setter for [`valueDescriptionProvider`][Self::valueDescriptionProvider].
154        ///
155        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
156        ///
157        /// # Safety
158        ///
159        /// `value_description_provider` block's return must be a valid pointer.
160        #[unsafe(method(setValueDescriptionProvider:))]
161        #[unsafe(method_family = none)]
162        pub unsafe fn setValueDescriptionProvider(
163            &self,
164            value_description_provider: &block2::DynBlock<dyn Fn(c_double) -> NonNull<NSString>>,
165        );
166
167        /// The positions of any gridlines along this axis.
168        #[unsafe(method(gridlinePositions))]
169        #[unsafe(method_family = none)]
170        pub unsafe fn gridlinePositions(&self) -> Retained<NSArray<NSNumber>>;
171
172        /// Setter for [`gridlinePositions`][Self::gridlinePositions].
173        ///
174        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
175        #[unsafe(method(setGridlinePositions:))]
176        #[unsafe(method_family = none)]
177        pub unsafe fn setGridlinePositions(&self, gridline_positions: &NSArray<NSNumber>);
178
179        #[cfg(feature = "block2")]
180        /// # Safety
181        ///
182        /// `value_description_provider` block's return must be a valid pointer.
183        #[unsafe(method(initWithTitle:lowerBound:upperBound:gridlinePositions:valueDescriptionProvider:))]
184        #[unsafe(method_family = init)]
185        pub unsafe fn initWithTitle_lowerBound_upperBound_gridlinePositions_valueDescriptionProvider(
186            this: Allocated<Self>,
187            title: &NSString,
188            lowerbound: c_double,
189            upper_bound: c_double,
190            gridline_positions: Option<&NSArray<NSNumber>>,
191            value_description_provider: &block2::DynBlock<dyn Fn(c_double) -> NonNull<NSString>>,
192        ) -> Retained<Self>;
193
194        #[cfg(feature = "block2")]
195        /// # Safety
196        ///
197        /// `value_description_provider` block's return must be a valid pointer.
198        #[unsafe(method(initWithAttributedTitle:lowerBound:upperBound:gridlinePositions:valueDescriptionProvider:))]
199        #[unsafe(method_family = init)]
200        pub unsafe fn initWithAttributedTitle_lowerBound_upperBound_gridlinePositions_valueDescriptionProvider(
201            this: Allocated<Self>,
202            attributed_title: &NSAttributedString,
203            lowerbound: c_double,
204            upper_bound: c_double,
205            gridline_positions: Option<&NSArray<NSNumber>>,
206            value_description_provider: &block2::DynBlock<dyn Fn(c_double) -> NonNull<NSString>>,
207        ) -> Retained<Self>;
208
209        #[unsafe(method(init))]
210        #[unsafe(method_family = init)]
211        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
212
213        #[unsafe(method(new))]
214        #[unsafe(method_family = new)]
215        pub unsafe fn new() -> Retained<Self>;
216    );
217}
218
219extern_class!(
220    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axcategoricaldataaxisdescriptor?language=objc)
221    #[unsafe(super(NSObject))]
222    #[derive(Debug, PartialEq, Eq, Hash)]
223    pub struct AXCategoricalDataAxisDescriptor;
224);
225
226extern_conformance!(
227    unsafe impl AXDataAxisDescriptor for AXCategoricalDataAxisDescriptor {}
228);
229
230extern_conformance!(
231    unsafe impl NSCopying for AXCategoricalDataAxisDescriptor {}
232);
233
234unsafe impl CopyingHelper for AXCategoricalDataAxisDescriptor {
235    type Result = Self;
236}
237
238extern_conformance!(
239    unsafe impl NSObjectProtocol for AXCategoricalDataAxisDescriptor {}
240);
241
242impl AXCategoricalDataAxisDescriptor {
243    extern_methods!(
244        /// The order of the category values for this axis.
245        /// This list should contain every possible category value for this axis, in the order they are displayed visually in the graph or legend.
246        /// For example, if your categorical axis represented 'blood type', and the legend contained 'AB, A, B, O' in that order,
247        /// you would provide an array containing "AB", "A", "B" and "O" in the same order.
248        #[unsafe(method(categoryOrder))]
249        #[unsafe(method_family = none)]
250        pub unsafe fn categoryOrder(&self) -> Retained<NSArray<NSString>>;
251
252        /// Setter for [`categoryOrder`][Self::categoryOrder].
253        ///
254        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
255        #[unsafe(method(setCategoryOrder:))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn setCategoryOrder(&self, category_order: &NSArray<NSString>);
258
259        #[unsafe(method(initWithTitle:categoryOrder:))]
260        #[unsafe(method_family = init)]
261        pub unsafe fn initWithTitle_categoryOrder(
262            this: Allocated<Self>,
263            title: &NSString,
264            category_order: &NSArray<NSString>,
265        ) -> Retained<Self>;
266
267        #[unsafe(method(initWithAttributedTitle:categoryOrder:))]
268        #[unsafe(method_family = init)]
269        pub unsafe fn initWithAttributedTitle_categoryOrder(
270            this: Allocated<Self>,
271            attributed_title: &NSAttributedString,
272            category_order: &NSArray<NSString>,
273        ) -> Retained<Self>;
274
275        #[unsafe(method(init))]
276        #[unsafe(method_family = init)]
277        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
278
279        #[unsafe(method(new))]
280        #[unsafe(method_family = new)]
281        pub unsafe fn new() -> Retained<Self>;
282    );
283}
284
285extern_class!(
286    /// Describes a single data value, either numeric or categorical. Only the `number`
287    /// property will be used for data points in a numeric axis, and only the `category`
288    /// property will be used for data points in a categorical axis.
289    ///
290    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axdatapointvalue?language=objc)
291    #[unsafe(super(NSObject))]
292    #[derive(Debug, PartialEq, Eq, Hash)]
293    pub struct AXDataPointValue;
294);
295
296extern_conformance!(
297    unsafe impl NSCopying for AXDataPointValue {}
298);
299
300unsafe impl CopyingHelper for AXDataPointValue {
301    type Result = Self;
302}
303
304extern_conformance!(
305    unsafe impl NSObjectProtocol for AXDataPointValue {}
306);
307
308impl AXDataPointValue {
309    extern_methods!(
310        #[unsafe(method(number))]
311        #[unsafe(method_family = none)]
312        pub unsafe fn number(&self) -> c_double;
313
314        /// Setter for [`number`][Self::number].
315        #[unsafe(method(setNumber:))]
316        #[unsafe(method_family = none)]
317        pub unsafe fn setNumber(&self, number: c_double);
318
319        #[unsafe(method(category))]
320        #[unsafe(method_family = none)]
321        pub unsafe fn category(&self) -> Retained<NSString>;
322
323        /// Setter for [`category`][Self::category].
324        ///
325        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
326        #[unsafe(method(setCategory:))]
327        #[unsafe(method_family = none)]
328        pub unsafe fn setCategory(&self, category: &NSString);
329
330        #[unsafe(method(valueWithNumber:))]
331        #[unsafe(method_family = none)]
332        pub unsafe fn valueWithNumber(number: c_double) -> Retained<Self>;
333
334        #[unsafe(method(valueWithCategory:))]
335        #[unsafe(method_family = none)]
336        pub unsafe fn valueWithCategory(category: &NSString) -> Retained<Self>;
337
338        #[unsafe(method(init))]
339        #[unsafe(method_family = init)]
340        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
341
342        #[unsafe(method(new))]
343        #[unsafe(method_family = new)]
344        pub unsafe fn new() -> Retained<Self>;
345    );
346}
347
348extern_class!(
349    /// Provides axis values for a single data point within a series.
350    ///
351    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axdatapoint?language=objc)
352    #[unsafe(super(NSObject))]
353    #[derive(Debug, PartialEq, Eq, Hash)]
354    pub struct AXDataPoint;
355);
356
357extern_conformance!(
358    unsafe impl NSCopying for AXDataPoint {}
359);
360
361unsafe impl CopyingHelper for AXDataPoint {
362    type Result = Self;
363}
364
365extern_conformance!(
366    unsafe impl NSObjectProtocol for AXDataPoint {}
367);
368
369impl AXDataPoint {
370    extern_methods!(
371        /// The x-axis value for this data point.
372        /// Should be a Double for a numeric x-axis or a String for a categorical x-axis.
373        #[unsafe(method(xValue))]
374        #[unsafe(method_family = none)]
375        pub unsafe fn xValue(&self) -> Retained<AXDataPointValue>;
376
377        /// Setter for [`xValue`][Self::xValue].
378        ///
379        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
380        #[unsafe(method(setXValue:))]
381        #[unsafe(method_family = none)]
382        pub unsafe fn setXValue(&self, x_value: &AXDataPointValue);
383
384        /// The y-axis value for this data point.
385        #[unsafe(method(yValue))]
386        #[unsafe(method_family = none)]
387        pub unsafe fn yValue(&self) -> Option<Retained<AXDataPointValue>>;
388
389        /// Setter for [`yValue`][Self::yValue].
390        ///
391        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
392        #[unsafe(method(setYValue:))]
393        #[unsafe(method_family = none)]
394        pub unsafe fn setYValue(&self, y_value: Option<&AXDataPointValue>);
395
396        /// Any additional values for additional axes for this data point.
397        /// These should be provided in the same order as their corresponding
398        /// `AXDataAxisDescriptor` objects in `AXChartDescriptor.additionalAxes`.
399        #[unsafe(method(additionalValues))]
400        #[unsafe(method_family = none)]
401        pub unsafe fn additionalValues(&self) -> Retained<NSArray<AXDataPointValue>>;
402
403        /// Setter for [`additionalValues`][Self::additionalValues].
404        ///
405        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
406        #[unsafe(method(setAdditionalValues:))]
407        #[unsafe(method_family = none)]
408        pub unsafe fn setAdditionalValues(&self, additional_values: &NSArray<AXDataPointValue>);
409
410        /// A name or label for this data point.
411        #[unsafe(method(label))]
412        #[unsafe(method_family = none)]
413        pub unsafe fn label(&self) -> Option<Retained<NSString>>;
414
415        /// Setter for [`label`][Self::label].
416        ///
417        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
418        #[unsafe(method(setLabel:))]
419        #[unsafe(method_family = none)]
420        pub unsafe fn setLabel(&self, label: Option<&NSString>);
421
422        /// An attributed version of the name or label for this data point.
423        #[unsafe(method(attributedLabel))]
424        #[unsafe(method_family = none)]
425        pub unsafe fn attributedLabel(&self) -> Option<Retained<NSAttributedString>>;
426
427        /// Setter for [`attributedLabel`][Self::attributedLabel].
428        ///
429        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
430        #[unsafe(method(setAttributedLabel:))]
431        #[unsafe(method_family = none)]
432        pub unsafe fn setAttributedLabel(&self, attributed_label: Option<&NSAttributedString>);
433
434        #[unsafe(method(initWithX:y:))]
435        #[unsafe(method_family = init)]
436        pub unsafe fn initWithX_y(
437            this: Allocated<Self>,
438            x_value: &AXDataPointValue,
439            y_value: Option<&AXDataPointValue>,
440        ) -> Retained<Self>;
441
442        #[unsafe(method(initWithX:y:additionalValues:))]
443        #[unsafe(method_family = init)]
444        pub unsafe fn initWithX_y_additionalValues(
445            this: Allocated<Self>,
446            x_value: &AXDataPointValue,
447            y_value: Option<&AXDataPointValue>,
448            additional_values: Option<&NSArray<AXDataPointValue>>,
449        ) -> Retained<Self>;
450
451        #[unsafe(method(initWithX:y:additionalValues:label:))]
452        #[unsafe(method_family = init)]
453        pub unsafe fn initWithX_y_additionalValues_label(
454            this: Allocated<Self>,
455            x_value: &AXDataPointValue,
456            y_value: Option<&AXDataPointValue>,
457            additional_values: Option<&NSArray<AXDataPointValue>>,
458            label: Option<&NSString>,
459        ) -> Retained<Self>;
460
461        #[unsafe(method(init))]
462        #[unsafe(method_family = init)]
463        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
464
465        #[unsafe(method(new))]
466        #[unsafe(method_family = new)]
467        pub unsafe fn new() -> Retained<Self>;
468    );
469}
470
471extern_class!(
472    /// Provides information about a data series. A chart may have one or many data series.
473    ///
474    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axdataseriesdescriptor?language=objc)
475    #[unsafe(super(NSObject))]
476    #[derive(Debug, PartialEq, Eq, Hash)]
477    pub struct AXDataSeriesDescriptor;
478);
479
480extern_conformance!(
481    unsafe impl NSCopying for AXDataSeriesDescriptor {}
482);
483
484unsafe impl CopyingHelper for AXDataSeriesDescriptor {
485    type Result = Self;
486}
487
488extern_conformance!(
489    unsafe impl NSObjectProtocol for AXDataSeriesDescriptor {}
490);
491
492impl AXDataSeriesDescriptor {
493    extern_methods!(
494        /// The name or title of this data series.
495        #[unsafe(method(name))]
496        #[unsafe(method_family = none)]
497        pub unsafe fn name(&self) -> Option<Retained<NSString>>;
498
499        /// Setter for [`name`][Self::name].
500        ///
501        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
502        #[unsafe(method(setName:))]
503        #[unsafe(method_family = none)]
504        pub unsafe fn setName(&self, name: Option<&NSString>);
505
506        /// An attributed version of the name of this data series.
507        /// When set, this will be used instead of `name`.
508        #[unsafe(method(attributedName))]
509        #[unsafe(method_family = none)]
510        pub unsafe fn attributedName(&self) -> Retained<NSAttributedString>;
511
512        /// Setter for [`attributedName`][Self::attributedName].
513        ///
514        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
515        #[unsafe(method(setAttributedName:))]
516        #[unsafe(method_family = none)]
517        pub unsafe fn setAttributedName(&self, attributed_name: &NSAttributedString);
518
519        /// Whether or not this data series should be treated as continuous.
520        #[unsafe(method(isContinuous))]
521        #[unsafe(method_family = none)]
522        pub unsafe fn isContinuous(&self) -> bool;
523
524        /// Setter for [`isContinuous`][Self::isContinuous].
525        #[unsafe(method(setIsContinuous:))]
526        #[unsafe(method_family = none)]
527        pub unsafe fn setIsContinuous(&self, is_continuous: bool);
528
529        /// The data points that make up the series.
530        #[unsafe(method(dataPoints))]
531        #[unsafe(method_family = none)]
532        pub unsafe fn dataPoints(&self) -> Retained<NSArray<AXDataPoint>>;
533
534        /// Setter for [`dataPoints`][Self::dataPoints].
535        ///
536        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
537        #[unsafe(method(setDataPoints:))]
538        #[unsafe(method_family = none)]
539        pub unsafe fn setDataPoints(&self, data_points: &NSArray<AXDataPoint>);
540
541        #[unsafe(method(initWithName:isContinuous:dataPoints:))]
542        #[unsafe(method_family = init)]
543        pub unsafe fn initWithName_isContinuous_dataPoints(
544            this: Allocated<Self>,
545            name: &NSString,
546            is_continuous: bool,
547            data_points: &NSArray<AXDataPoint>,
548        ) -> Retained<Self>;
549
550        #[unsafe(method(initWithAttributedName:isContinuous:dataPoints:))]
551        #[unsafe(method_family = init)]
552        pub unsafe fn initWithAttributedName_isContinuous_dataPoints(
553            this: Allocated<Self>,
554            attributed_name: &NSAttributedString,
555            is_continuous: bool,
556            data_points: &NSArray<AXDataPoint>,
557        ) -> Retained<Self>;
558
559        #[unsafe(method(init))]
560        #[unsafe(method_family = init)]
561        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
562
563        #[unsafe(method(new))]
564        #[unsafe(method_family = new)]
565        pub unsafe fn new() -> Retained<Self>;
566    );
567}
568
569/// Describes the content direction of the chart (i.e. the direction in which the X axis is rendered).
570/// For example, a bar chart might be leftToRight, while a pie chart might be radialClockwise.
571///
572/// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axchartdescriptorcontentdirection?language=objc)
573// NS_ENUM
574#[repr(transparent)]
575#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
576pub struct AXChartDescriptorContentDirection(pub NSInteger);
577impl AXChartDescriptorContentDirection {
578    #[doc(alias = "AXChartContentDirectionLeftToRight")]
579    pub const ContentDirectionLeftToRight: Self = Self(0);
580    #[doc(alias = "AXChartContentDirectionRightToLeft")]
581    pub const ContentDirectionRightToLeft: Self = Self(1);
582    #[doc(alias = "AXChartContentDirectionTopToBottom")]
583    pub const ContentDirectionTopToBottom: Self = Self(2);
584    #[doc(alias = "AXChartContentDirectionBottomToTop")]
585    pub const ContentDirectionBottomToTop: Self = Self(3);
586    #[doc(alias = "AXChartContentDirectionRadialClockwise")]
587    pub const ContentDirectionRadialClockwise: Self = Self(4);
588    #[doc(alias = "AXChartContentDirectionRadialCounterClockwise")]
589    pub const ContentDirectionRadialCounterClockwise: Self = Self(5);
590}
591
592unsafe impl Encode for AXChartDescriptorContentDirection {
593    const ENCODING: Encoding = NSInteger::ENCODING;
594}
595
596unsafe impl RefEncode for AXChartDescriptorContentDirection {
597    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
598}
599
600extern_class!(
601    /// The top-level descriptor object for an accessible chart.
602    ///
603    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessibility/axchartdescriptor?language=objc)
604    #[unsafe(super(NSObject))]
605    #[derive(Debug, PartialEq, Eq, Hash)]
606    pub struct AXChartDescriptor;
607);
608
609extern_conformance!(
610    unsafe impl NSCopying for AXChartDescriptor {}
611);
612
613unsafe impl CopyingHelper for AXChartDescriptor {
614    type Result = Self;
615}
616
617extern_conformance!(
618    unsafe impl NSObjectProtocol for AXChartDescriptor {}
619);
620
621impl AXChartDescriptor {
622    extern_methods!(
623        /// The title of the chart.
624        #[unsafe(method(title))]
625        #[unsafe(method_family = none)]
626        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
627
628        /// Setter for [`title`][Self::title].
629        ///
630        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
631        #[unsafe(method(setTitle:))]
632        #[unsafe(method_family = none)]
633        pub unsafe fn setTitle(&self, title: Option<&NSString>);
634
635        /// An attributed version of the title of the chart.
636        /// When set, this will be used instead of `title`.
637        #[unsafe(method(attributedTitle))]
638        #[unsafe(method_family = none)]
639        pub unsafe fn attributedTitle(&self) -> Option<Retained<NSAttributedString>>;
640
641        /// Setter for [`attributedTitle`][Self::attributedTitle].
642        ///
643        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
644        #[unsafe(method(setAttributedTitle:))]
645        #[unsafe(method_family = none)]
646        pub unsafe fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>);
647
648        /// A natural language summary of the key message or features of the chart.
649        /// e.g. "The chart shows that fuel efficiency decreases as vehicle weight increases."
650        #[unsafe(method(summary))]
651        #[unsafe(method_family = none)]
652        pub unsafe fn summary(&self) -> Option<Retained<NSString>>;
653
654        /// Setter for [`summary`][Self::summary].
655        ///
656        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
657        #[unsafe(method(setSummary:))]
658        #[unsafe(method_family = none)]
659        pub unsafe fn setSummary(&self, summary: Option<&NSString>);
660
661        /// The direction of the chart's X axis.
662        #[unsafe(method(contentDirection))]
663        #[unsafe(method_family = none)]
664        pub unsafe fn contentDirection(&self) -> AXChartDescriptorContentDirection;
665
666        /// Setter for [`contentDirection`][Self::contentDirection].
667        #[unsafe(method(setContentDirection:))]
668        #[unsafe(method_family = none)]
669        pub unsafe fn setContentDirection(
670            &self,
671            content_direction: AXChartDescriptorContentDirection,
672        );
673
674        #[cfg(feature = "objc2-core-foundation")]
675        /// The bounds of the view area for visually rendering data values if applicable, provided in superview coordinates.
676        #[unsafe(method(contentFrame))]
677        #[unsafe(method_family = none)]
678        pub unsafe fn contentFrame(&self) -> CGRect;
679
680        #[cfg(feature = "objc2-core-foundation")]
681        /// Setter for [`contentFrame`][Self::contentFrame].
682        #[unsafe(method(setContentFrame:))]
683        #[unsafe(method_family = none)]
684        pub unsafe fn setContentFrame(&self, content_frame: CGRect);
685
686        /// A set of data series descriptors describing each series in the chart.
687        #[unsafe(method(series))]
688        #[unsafe(method_family = none)]
689        pub unsafe fn series(&self) -> Retained<NSArray<AXDataSeriesDescriptor>>;
690
691        /// Setter for [`series`][Self::series].
692        ///
693        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
694        #[unsafe(method(setSeries:))]
695        #[unsafe(method_family = none)]
696        pub unsafe fn setSeries(&self, series: &NSArray<AXDataSeriesDescriptor>);
697
698        /// The axis descriptor for the chart's X axis.
699        #[unsafe(method(xAxis))]
700        #[unsafe(method_family = none)]
701        pub unsafe fn xAxis(&self) -> Retained<ProtocolObject<dyn AXDataAxisDescriptor>>;
702
703        /// Setter for [`xAxis`][Self::xAxis].
704        #[unsafe(method(setXAxis:))]
705        #[unsafe(method_family = none)]
706        pub unsafe fn setXAxis(&self, x_axis: &ProtocolObject<dyn AXDataAxisDescriptor>);
707
708        /// The axis descriptor for the chart's Y axis.
709        #[unsafe(method(yAxis))]
710        #[unsafe(method_family = none)]
711        pub unsafe fn yAxis(&self) -> Option<Retained<AXNumericDataAxisDescriptor>>;
712
713        /// Setter for [`yAxis`][Self::yAxis].
714        #[unsafe(method(setYAxis:))]
715        #[unsafe(method_family = none)]
716        pub unsafe fn setYAxis(&self, y_axis: Option<&AXNumericDataAxisDescriptor>);
717
718        /// Descriptors for additional categorical or numerical axes beyond x and y.
719        /// For example, in a visual chart, these values might be represented by the size
720        /// or color of data points.
721        #[unsafe(method(additionalAxes))]
722        #[unsafe(method_family = none)]
723        pub unsafe fn additionalAxes(
724            &self,
725        ) -> Option<Retained<NSArray<ProtocolObject<dyn AXDataAxisDescriptor>>>>;
726
727        /// Setter for [`additionalAxes`][Self::additionalAxes].
728        ///
729        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
730        #[unsafe(method(setAdditionalAxes:))]
731        #[unsafe(method_family = none)]
732        pub unsafe fn setAdditionalAxes(
733            &self,
734            additional_axes: Option<&NSArray<ProtocolObject<dyn AXDataAxisDescriptor>>>,
735        );
736
737        #[unsafe(method(initWithTitle:summary:xAxisDescriptor:yAxisDescriptor:series:))]
738        #[unsafe(method_family = init)]
739        pub unsafe fn initWithTitle_summary_xAxisDescriptor_yAxisDescriptor_series(
740            this: Allocated<Self>,
741            title: Option<&NSString>,
742            summary: Option<&NSString>,
743            x_axis: &ProtocolObject<dyn AXDataAxisDescriptor>,
744            y_axis: Option<&AXNumericDataAxisDescriptor>,
745            series: &NSArray<AXDataSeriesDescriptor>,
746        ) -> Retained<Self>;
747
748        #[unsafe(method(initWithAttributedTitle:summary:xAxisDescriptor:yAxisDescriptor:series:))]
749        #[unsafe(method_family = init)]
750        pub unsafe fn initWithAttributedTitle_summary_xAxisDescriptor_yAxisDescriptor_series(
751            this: Allocated<Self>,
752            attributed_title: Option<&NSAttributedString>,
753            summary: Option<&NSString>,
754            x_axis: &ProtocolObject<dyn AXDataAxisDescriptor>,
755            y_axis: &AXNumericDataAxisDescriptor,
756            series: &NSArray<AXDataSeriesDescriptor>,
757        ) -> Retained<Self>;
758
759        #[unsafe(method(initWithTitle:summary:xAxisDescriptor:yAxisDescriptor:additionalAxes:series:))]
760        #[unsafe(method_family = init)]
761        pub unsafe fn initWithTitle_summary_xAxisDescriptor_yAxisDescriptor_additionalAxes_series(
762            this: Allocated<Self>,
763            title: Option<&NSString>,
764            summary: Option<&NSString>,
765            x_axis: &ProtocolObject<dyn AXDataAxisDescriptor>,
766            y_axis: Option<&AXNumericDataAxisDescriptor>,
767            additional_axes: Option<&NSArray<ProtocolObject<dyn AXDataAxisDescriptor>>>,
768            series: &NSArray<AXDataSeriesDescriptor>,
769        ) -> Retained<Self>;
770
771        #[unsafe(method(initWithAttributedTitle:summary:xAxisDescriptor:yAxisDescriptor:additionalAxes:series:))]
772        #[unsafe(method_family = init)]
773        pub unsafe fn initWithAttributedTitle_summary_xAxisDescriptor_yAxisDescriptor_additionalAxes_series(
774            this: Allocated<Self>,
775            attributed_title: Option<&NSAttributedString>,
776            summary: Option<&NSString>,
777            x_axis: &ProtocolObject<dyn AXDataAxisDescriptor>,
778            y_axis: Option<&AXNumericDataAxisDescriptor>,
779            additional_axes: Option<&NSArray<ProtocolObject<dyn AXDataAxisDescriptor>>>,
780            series: &NSArray<AXDataSeriesDescriptor>,
781        ) -> Retained<Self>;
782
783        #[unsafe(method(init))]
784        #[unsafe(method_family = init)]
785        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
786
787        #[unsafe(method(new))]
788        #[unsafe(method_family = new)]
789        pub unsafe fn new() -> Retained<Self>;
790    );
791}
792
793extern_class!(
794    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axliveaudiograph?language=objc)
795    #[unsafe(super(NSObject))]
796    #[derive(Debug, PartialEq, Eq, Hash)]
797    pub struct AXLiveAudioGraph;
798);
799
800extern_conformance!(
801    unsafe impl NSObjectProtocol for AXLiveAudioGraph {}
802);
803
804impl AXLiveAudioGraph {
805    extern_methods!(
806        /// Begins a live audio graph session.
807        #[unsafe(method(start))]
808        #[unsafe(method_family = none)]
809        pub unsafe fn start();
810
811        /// Sets the pitch of the audio graph's tone. This should be a normalized value in the range [0.0, 1.0], where 0 represents the minimum displayable y-axis value for your series
812        /// and 1 represents the maximum displayable y-axis value for your series.
813        #[unsafe(method(updateValue:))]
814        #[unsafe(method_family = none)]
815        pub unsafe fn updateValue(value: c_double);
816
817        /// Ends the live audio graph session.
818        #[unsafe(method(stop))]
819        #[unsafe(method_family = none)]
820        pub unsafe fn stop();
821    );
822}
823
824/// Methods declared on superclass `NSObject`.
825impl AXLiveAudioGraph {
826    extern_methods!(
827        #[unsafe(method(init))]
828        #[unsafe(method_family = init)]
829        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
830
831        #[unsafe(method(new))]
832        #[unsafe(method_family = new)]
833        pub unsafe fn new() -> Retained<Self>;
834    );
835}