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