pub trait ScreenshotExt:
IsA<Screenshot>
+ Sealed
+ 'static {
Show 18 methods
// Provided methods
fn add_image(&self, image: &impl IsA<Image>) { ... }
fn add_video(&self, video: &impl IsA<Video>) { ... }
fn clear_images(&self) { ... }
fn caption(&self) -> Option<GString> { ... }
fn context(&self) -> Option<Context> { ... }
fn environment(&self) -> Option<GString> { ... }
fn image(&self, width: u32, height: u32, scale: u32) -> Option<Image> { ... }
fn images(&self) -> Vec<Image> { ... }
fn images_all(&self) -> Vec<Image> { ... }
fn kind(&self) -> ScreenshotKind { ... }
fn media_kind(&self) -> ScreenshotMediaKind { ... }
fn videos(&self) -> Vec<Video> { ... }
fn videos_all(&self) -> Vec<Video> { ... }
fn is_valid(&self) -> bool { ... }
fn set_caption(&self, caption: &str, locale: &str) { ... }
fn set_context(&self, context: &impl IsA<Context>) { ... }
fn set_environment(&self, env_id: Option<&str>) { ... }
fn set_kind(&self, kind: ScreenshotKind) { ... }
}
Expand description
Provided Methods§
sourcefn clear_images(&self)
fn clear_images(&self)
Remove all images associated with this screenshot.
sourcefn environment(&self) -> Option<GString>
fn environment(&self) -> Option<GString>
sourcefn image(&self, width: u32, height: u32, scale: u32) -> Option<Image>
fn image(&self, width: u32, height: u32, scale: u32) -> Option<Image>
Gets the AsImage closest to the target size. The Image
may not actually
be the requested size, and the application may have to pad / rescale the
image to make it fit.
Only images for the current active locale (or fallback, if images are not localized)
are considered.
§width
target width
§height
target height
§scale
the target scaling factor.
§Returns
sourcefn images(&self) -> Vec<Image>
fn images(&self) -> Vec<Image>
Gets the images for this screenshots. Only images valid for the current language are returned. We return all sizes.
§Returns
an array
sourcefn images_all(&self) -> Vec<Image>
fn images_all(&self) -> Vec<Image>
sourcefn kind(&self) -> ScreenshotKind
fn kind(&self) -> ScreenshotKind
sourcefn media_kind(&self) -> ScreenshotMediaKind
fn media_kind(&self) -> ScreenshotMediaKind
sourcefn videos(&self) -> Vec<Video>
fn videos(&self) -> Vec<Video>
Gets the videos for this screenshots. Only videos valid for the current language selection are returned. We return all sizes.
§Returns
an array
sourcefn videos_all(&self) -> Vec<Video>
fn videos_all(&self) -> Vec<Video>
Returns an array of all screencast videos we have, regardless of their size and locale.
§Returns
an array
sourcefn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Performs a quick validation on this screenshot
§Returns
TRUE if the screenshot is a complete Screenshot
sourcefn set_caption(&self, caption: &str, locale: &str)
fn set_caption(&self, caption: &str, locale: &str)
sourcefn set_context(&self, context: &impl IsA<Context>)
fn set_context(&self, context: &impl IsA<Context>)
sourcefn set_environment(&self, env_id: Option<&str>)
fn set_environment(&self, env_id: Option<&str>)
Sets the GUI environment ID of this screenshot.
§env_id
the GUI environment ID, e.g. “plasma-mobile” or “gnome:dark”