Trait gtk4::prelude::MediaFileExt
source · 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
Object Safety§
This trait is not object safe.