Skip to main content

AtkImageExt

Trait AtkImageExt 

Source
pub trait AtkImageExt:
    IsA<Image>
    + Sealed
    + 'static {
    // Provided methods
    fn image_description(&self) -> Option<GString> { ... }
    fn image_locale(&self) -> Option<GString> { ... }
    fn image_position(&self, coord_type: CoordType) -> (i32, i32) { ... }
    fn image_size(&self) -> (i32, i32) { ... }
    fn set_image_description(&self, description: &str) -> bool { ... }
}
Expand description

Trait containing all Image methods.

§Implementors

Image, NoOpObject

Provided Methods§

Source

fn image_description(&self) -> Option<GString>

Get a textual description of this image.

§Returns

a string representing the image description

Source

fn image_locale(&self) -> Option<GString>

Retrieves the locale identifier associated to the Image.

§Returns

a string corresponding to the POSIX LC_MESSAGES locale used by the image description, or None if the image does not specify a locale.

Source

fn image_position(&self, coord_type: CoordType) -> (i32, i32)

Gets the position of the image in the form of a point specifying the images top-left corner.

If the position can not be obtained (e.g. missing support), x and y are set to -1.

§coord_type

specifies whether the coordinates are relative to the screen or to the components top level window

§Returns
§x

address of gint to put x coordinate position; otherwise, -1 if value cannot be obtained.

§y

address of gint to put y coordinate position; otherwise, -1 if value cannot be obtained.

Source

fn image_size(&self) -> (i32, i32)

Get the width and height in pixels for the specified image. The values of width and height are returned as -1 if the values cannot be obtained (for instance, if the object is not onscreen).

If the size can not be obtained (e.g. missing support), x and y are set to -1.

§Returns
§width

filled with the image width, or -1 if the value cannot be obtained.

§height

filled with the image height, or -1 if the value cannot be obtained.

Source

fn set_image_description(&self, description: &str) -> bool

Sets the textual description for this image.

§description

a string description to set for self

§Returns

boolean TRUE, or FALSE if operation could not be completed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<O: IsA<Image>> AtkImageExt for O