use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPRemoteCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPRemoteCommandEvent {}
);
impl MPRemoteCommandEvent {
extern_methods!(
#[cfg(feature = "MPRemoteCommand")]
#[unsafe(method(command))]
#[unsafe(method_family = none)]
pub unsafe fn command(&self) -> Retained<MPRemoteCommand>;
#[unsafe(method(timestamp))]
#[unsafe(method_family = none)]
pub unsafe fn timestamp(&self) -> NSTimeInterval;
);
}
impl MPRemoteCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSkipIntervalCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSkipIntervalCommandEvent {}
);
impl MPSkipIntervalCommandEvent {
extern_methods!(
#[unsafe(method(interval))]
#[unsafe(method_family = none)]
pub unsafe fn interval(&self) -> NSTimeInterval;
);
}
impl MPSkipIntervalCommandEvent {
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>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MPSeekCommandEventType(pub NSUInteger);
impl MPSeekCommandEventType {
#[doc(alias = "MPSeekCommandEventTypeBeginSeeking")]
pub const BeginSeeking: Self = Self(0);
#[doc(alias = "MPSeekCommandEventTypeEndSeeking")]
pub const EndSeeking: Self = Self(1);
}
unsafe impl Encode for MPSeekCommandEventType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MPSeekCommandEventType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSeekCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSeekCommandEvent {}
);
impl MPSeekCommandEvent {
extern_methods!(
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub unsafe fn r#type(&self) -> MPSeekCommandEventType;
);
}
impl MPSeekCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPRatingCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPRatingCommandEvent {}
);
impl MPRatingCommandEvent {
extern_methods!(
#[unsafe(method(rating))]
#[unsafe(method_family = none)]
pub unsafe fn rating(&self) -> c_float;
);
}
impl MPRatingCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPChangePlaybackRateCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPChangePlaybackRateCommandEvent {}
);
impl MPChangePlaybackRateCommandEvent {
extern_methods!(
#[unsafe(method(playbackRate))]
#[unsafe(method_family = none)]
pub unsafe fn playbackRate(&self) -> c_float;
);
}
impl MPChangePlaybackRateCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPFeedbackCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPFeedbackCommandEvent {}
);
impl MPFeedbackCommandEvent {
extern_methods!(
#[unsafe(method(isNegative))]
#[unsafe(method_family = none)]
pub unsafe fn isNegative(&self) -> bool;
);
}
impl MPFeedbackCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPChangeLanguageOptionCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPChangeLanguageOptionCommandEvent {}
);
impl MPChangeLanguageOptionCommandEvent {
extern_methods!(
#[cfg(feature = "MPNowPlayingInfoLanguageOption")]
#[unsafe(method(languageOption))]
#[unsafe(method_family = none)]
pub unsafe fn languageOption(&self) -> Retained<MPNowPlayingInfoLanguageOption>;
#[cfg(feature = "MPRemoteControlTypes")]
#[unsafe(method(setting))]
#[unsafe(method_family = none)]
pub unsafe fn setting(&self) -> MPChangeLanguageOptionSetting;
);
}
impl MPChangeLanguageOptionCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPChangePlaybackPositionCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPChangePlaybackPositionCommandEvent {}
);
impl MPChangePlaybackPositionCommandEvent {
extern_methods!(
#[unsafe(method(positionTime))]
#[unsafe(method_family = none)]
pub unsafe fn positionTime(&self) -> NSTimeInterval;
);
}
impl MPChangePlaybackPositionCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPChangeShuffleModeCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPChangeShuffleModeCommandEvent {}
);
impl MPChangeShuffleModeCommandEvent {
extern_methods!(
#[cfg(feature = "MPRemoteControlTypes")]
#[unsafe(method(shuffleType))]
#[unsafe(method_family = none)]
pub unsafe fn shuffleType(&self) -> MPShuffleType;
#[unsafe(method(preservesShuffleMode))]
#[unsafe(method_family = none)]
pub unsafe fn preservesShuffleMode(&self) -> bool;
);
}
impl MPChangeShuffleModeCommandEvent {
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>;
);
}
extern_class!(
#[unsafe(super(MPRemoteCommandEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPChangeRepeatModeCommandEvent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPChangeRepeatModeCommandEvent {}
);
impl MPChangeRepeatModeCommandEvent {
extern_methods!(
#[cfg(feature = "MPRemoteControlTypes")]
#[unsafe(method(repeatType))]
#[unsafe(method_family = none)]
pub unsafe fn repeatType(&self) -> MPRepeatType;
#[unsafe(method(preservesRepeatMode))]
#[unsafe(method_family = none)]
pub unsafe fn preservesRepeatMode(&self) -> bool;
);
}
impl MPChangeRepeatModeCommandEvent {
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>;
);
}