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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// Class used to define a user selectable playback speed in a playback UI.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avkit/avplaybackspeed?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVPlaybackSpeed;
);
extern_conformance!(
unsafe impl NSObjectProtocol for AVPlaybackSpeed {}
);
impl AVPlaybackSpeed {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
/// A list of playback speeds to be used by default across the system.
#[unsafe(method(systemDefaultSpeeds))]
#[unsafe(method_family = none)]
pub unsafe fn systemDefaultSpeeds() -> Retained<NSArray<AVPlaybackSpeed>>;
/// Parameter `rate`: The rate to be used when this playback speed is selected.
///
/// Parameter `localizedName`: A localized name to be displayed representing this playback speed in a UI.
///
/// Initializes an AVPlaybackSpeed.
#[unsafe(method(initWithRate:localizedName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRate_localizedName(
this: Allocated<Self>,
rate: c_float,
localized_name: &NSString,
) -> Retained<Self>;
/// The rate associated with this object. When this playback speed is selected this rate will be set in response to the play button being pressed.
#[unsafe(method(rate))]
#[unsafe(method_family = none)]
pub unsafe fn rate(&self) -> c_float;
/// A localized name for this playback speed.
///
/// This name will be used to represent this playback speed in playback UIs where more space is available.
#[unsafe(method(localizedName))]
#[unsafe(method_family = none)]
pub unsafe fn localizedName(&self) -> Retained<NSString>;
/// A localized name for this playback speed used when space is limited.
///
/// This name will be used to represent this playback speed in playback UIs where limited space is available.
#[unsafe(method(localizedNumericName))]
#[unsafe(method_family = none)]
pub unsafe fn localizedNumericName(&self) -> Retained<NSString>;
);
}