Trait atk::prelude::AtkImageExt
source · [−]pub trait AtkImageExt: 'static {
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
Required Methods
sourcefn image_description(&self) -> Option<GString>
fn image_description(&self) -> Option<GString>
sourcefn image_locale(&self) -> Option<GString>
fn image_locale(&self) -> Option<GString>
sourcefn image_position(&self, coord_type: CoordType) -> (i32, i32)
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.
sourcefn image_size(&self) -> (i32, i32)
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.
sourcefn set_image_description(&self, description: &str) -> bool
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.