pub trait NSSound: Sized {
Show 20 methods
// Required methods
unsafe fn initWithContentsOfFile_withReference_(
self,
filepath: id,
byRef: BOOL,
) -> id;
unsafe fn initWithContentsOfURL_withReference_(
self,
fileUrl: id,
byRef: BOOL,
) -> id;
unsafe fn initWithData_(self, audioData: id) -> id;
unsafe fn initWithPasteboard_(self, pasteboard: id) -> id;
unsafe fn name(self) -> id;
unsafe fn volume(self) -> f32;
unsafe fn currentTime(self) -> NSTimeInterval;
unsafe fn loops(self) -> BOOL;
unsafe fn playbackDeviceIdentifier(self) -> id;
unsafe fn delegate(self) -> id;
unsafe fn duration(self) -> NSTimeInterval;
unsafe fn playing(self) -> BOOL;
unsafe fn pause(self) -> BOOL;
unsafe fn play(self) -> BOOL;
unsafe fn resume(self) -> BOOL;
unsafe fn stop(self) -> BOOL;
unsafe fn writeToPasteboard_(self, pasteboard: id);
// Provided methods
unsafe fn canInitWithPasteboard_(_: Self, pasteboard: id) -> BOOL { ... }
unsafe fn soundUnfilteredTypes(_: Self) -> id { ... }
unsafe fn soundNamed_(_: Self, soundName: id) -> id { ... }
}๐Deprecated: use the objc2-app-kit crate instead
Required Methodsยง
unsafe fn initWithContentsOfFile_withReference_( self, filepath: id, byRef: BOOL, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn initWithContentsOfURL_withReference_( self, fileUrl: id, byRef: BOOL, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn initWithData_(self, audioData: id) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn initWithPasteboard_(self, pasteboard: id) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn name(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn volume(self) -> f32
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn currentTime(self) -> NSTimeInterval
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn loops(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn playbackDeviceIdentifier(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn delegate(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn duration(self) -> NSTimeInterval
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn playing(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn pause(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn play(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn resume(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn stop(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn writeToPasteboard_(self, pasteboard: id)
๐Deprecated: use the objc2-app-kit crate instead
Provided Methodsยง
unsafe fn canInitWithPasteboard_(_: Self, pasteboard: id) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn soundUnfilteredTypes(_: Self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn soundNamed_(_: Self, soundName: id) -> id
๐Deprecated: use the objc2-app-kit crate instead
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.