pub trait MediaFileExt:
IsA<MediaFile>
+ Sealed
+ 'static {
// Provided methods
fn clear(&self) { ... }
fn file(&self) -> Option<File> { ... }
fn input_stream(&self) -> Option<InputStream> { ... }
fn set_file(&self, file: Option<&impl IsA<File>>) { ... }
fn set_filename(&self, filename: Option<impl AsRef<Path>>) { ... }
fn set_input_stream(&self, stream: Option<&impl IsA<InputStream>>) { ... }
fn set_resource(&self, resource_path: Option<&str>) { ... }
fn connect_file_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_input_stream_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
Sourcefn input_stream(&self) -> Option<InputStream>
fn input_stream(&self) -> Option<InputStream>
Sourcefn set_filename(&self, filename: Option<impl AsRef<Path>>)
fn set_filename(&self, filename: Option<impl AsRef<Path>>)
Sets the `GtkMediaFile to play the given file.
This is a utility function that converts the given @filename
to a GFile
and calls set_file()
.
§filename
name of file to play
Sourcefn set_input_stream(&self, stream: Option<&impl IsA<InputStream>>)
fn set_input_stream(&self, stream: Option<&impl IsA<InputStream>>)
Sourcefn set_resource(&self, resource_path: Option<&str>)
fn set_resource(&self, resource_path: Option<&str>)
Sets the `GtkMediaFile to play the given resource.
This is a utility function that converts the given @resource_path
to a GFile
and calls set_file()
.
§resource_path
path to resource to play
fn connect_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_input_stream_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
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.