Trait gtk4::prelude::MediaFileExt [−][src]
pub trait MediaFileExt: 'static {
fn clear(&self);
fn file(&self) -> Option<File>;
fn input_stream(&self) -> Option<InputStream>;
fn set_file<P: IsA<File>>(&self, file: Option<&P>);
fn set_filename<P: AsRef<Path>>(&self, filename: P);
fn set_input_stream<P: IsA<InputStream>>(&self, stream: Option<&P>);
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;
}
Expand description
Required methods
fn input_stream(&self) -> Option<InputStream>
fn input_stream(&self) -> Option<InputStream>
fn set_filename<P: AsRef<Path>>(&self, filename: P)
fn set_filename<P: AsRef<Path>>(&self, filename: P)
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
fn set_input_stream<P: IsA<InputStream>>(&self, stream: Option<&P>)
fn set_input_stream<P: IsA<InputStream>>(&self, stream: Option<&P>)
fn 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