Struct ux::native::Image [−][src]
pub struct Image { /* fields omitted */ }
Implementations
impl Image
[src]
Trait Implementations
impl AsRef<Actor> for Image
[src]
impl AsRef<Image> for Image
[src]
impl AsRef<Widget> for Image
[src]
impl Clone for Image
[src]
impl Debug for Image
[src]
impl Default for Image
[src]
impl Display for Image
[src]
impl Is<Actor> for Image
[src]
impl Is<Image> for Image
[src]
impl Is<Widget> for Image
[src]
impl Object for Image
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Image
impl !Send for Image
impl !Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<O> ImageExt for O where
O: Is<Image>,
[src]
O: Is<Image>,
pub fn animate_scale_mode(
&self,
mode: u64,
duration: u32,
scale_mode: ImageScaleMode
)
[src]
&self,
mode: u64,
duration: u32,
scale_mode: ImageScaleMode
)
animate_scale_mode: @image: An #Image @mode: a #AnimationMode @duration: duration of the animation in milliseconds @scale_mode: The #ImageScaleMode to set
Sets the value of #Image:scale-mode to @scale_mode and animates the scale factor of the image between the previous value and the new value.
pub fn clear(&self)
[src]
clear: @image: A #Image
Clear the current image and set a blank, transparent image.
Returns: static void
pub fn get_allow_upscale(&self) -> bool
[src]
get_allow_upscale: @image: A #Image
Determines whether image up-scaling is allowed.
Returns: %true if upscaling is allowed, %false otherwise
pub fn get_image_rotation(&self) -> f32
[src]
get_image_rotation: @image: A #Image
Get the value of the Image:image-rotation property.
Returns: The value of the image-rotation property.
pub fn get_load_async(&self) -> bool
[src]
get_load_async: @image: A #Image
Determines whether asynchronous image loading is in use.
Returns: %true if images are set to load asynchronously, %false otherwise
pub fn get_scale_height_threshold(&self) -> u32
[src]
get_scale_height_threshold: @image: A #Image
Retrieves the height scaling threshold.
Returns: The height scaling threshold, in pixels
pub fn get_scale_mode(&self) -> ImageScaleMode
[src]
get_scale_mode: @image: An #Image
Get the current scale mode of @Image.
Returns: The current ImageScaleMode
pub fn get_scale_width_threshold(&self) -> u32
[src]
get_scale_width_threshold: @image: A #Image
Retrieves the width scaling threshold.
Returns: The width scaling threshold, in pixels
pub fn get_transition_duration(&self) -> u32
[src]
get_transition_duration: @image: A #Image
Get the value of the Image:transition-duration property.
Returns: The value of the transition-duration property.
pub fn set_allow_upscale(&self, allow: bool)
[src]
set_allow_upscale: @image: A #Image @allow: %true to allow upscaling, %false otherwise
Sets whether up-scaling of images is allowed. If set to %true and a size larger than the image is requested, the image will be up-scaled in software.
The advantage of this is that software up-scaling is potentially higher quality, but it comes at the expense of video memory.
pub fn set_from_buffer(&self, buffer: &[u8]) -> Result<(), Error>
[src]
set_from_buffer: @image: An #Image @buffer: (array length=buffer_size) (transfer full): A buffer pointing to encoded image data @buffer_size: The size of @buffer, in bytes @buffer_free_func: (allow-none): A function to free @buffer, or %None @error: Return location for a #GError, or #None
Set the image data from unencoded image data, stored in memory. In case of failure, #false is returned and @error is set. It is expected that @buffer will remain accessible for the duration of the load. Once it is finished with, @buffer_free_func will be called.
Returns: #true if the image was successfully updated
pub fn set_from_buffer_at_size(
&self,
buffer: &[u8],
width: i32,
height: i32
) -> Result<(), Error>
[src]
&self,
buffer: &[u8],
width: i32,
height: i32
) -> Result<(), Error>
set_from_buffer_at_size: @image: An #Image @buffer: (array length=buffer_size) (transfer full): A buffer pointing to encoded image data @buffer_size: The size of @buffer, in bytes @buffer_free_func: (allow-none): A function to free @buffer, or %None @width: Width to scale the image to, or -1 @height: Height to scale the image to, or -1 @error: Return location for a #GError, or #None
Set the image data from unencoded image data, stored in memory, and scales it while loading. In case of failure, #false is returned and @error is set. It is expected that @buffer will remain accessible for the duration of the load. Once it is finished with, @buffer_free_func will be called. The aspect ratio will always be maintained.
Returns: #true if the image was successfully updated
pub fn set_from_cogl_texture(&self, texture: Handle) -> bool
[src]
set_from_cogl_texture: @image: A #Image @texture: A #CoglHandle to a texture
Sets the contents of the image from the given Cogl texture.
Returns: %true on success, %false on failure
pub fn set_from_data(
&self,
data: &[u8],
pixel_format: PixelFormat,
width: i32,
height: i32,
rowstride: i32
) -> Result<(), Error>
[src]
&self,
data: &[u8],
pixel_format: PixelFormat,
width: i32,
height: i32,
rowstride: i32
) -> Result<(), Error>
set_from_data: @image: An #Image @data: (array): Image data @pixel_format: The #CoglPixelFormat of the buffer @width: Width in pixels of image data. @height: Height in pixels of image data @rowstride: Distance in bytes between row starts. @error: Return location for a #GError, or #None
Set the image data from a buffer. In case of failure, #false is returned and @error is set.
Returns: #true if the image was successfully updated
pub fn set_from_file(&self, filename: &str) -> Result<(), Error>
[src]
set_from_file: @image: An #Image @filename: Filename to read the file from @error: Return location for a #GError, or #None
Set the image data from an image file. In case of failure, #false is returned and @error is set.
Returns: #true if the image was successfully updated
pub fn set_from_file_at_size(
&self,
filename: &str,
width: i32,
height: i32
) -> Result<(), Error>
[src]
&self,
filename: &str,
width: i32,
height: i32
) -> Result<(), Error>
set_from_file_at_size: @image: An #Image @filename: Filename to read the file from @width: Width to scale the image to, or -1 @height: Height to scale the image to, or -1 @error: Return location for a #GError, or #None
Set the image data from an image file, and scale the image during loading. In case of failure, #false is returned and @error is set. The aspect ratio will always be maintained.
Returns: #true if the image was successfully updated
pub fn set_image_rotation(&self, rotation: f32)
[src]
set_image_rotation: @image: A #Image @rotation: Rotation angle in degrees
Set the Image:image-rotation property.
pub fn set_load_async(&self, load_async: bool)
[src]
set_load_async: @image: A #Image @load_async: %true to load images asynchronously
Sets whether to load images asynchronously. Asynchronous image loading requires thread support (see g_thread_init()).
When using asynchronous image loading, all image-loading functions will return immediately as successful. The #Image::image-loaded and #Image::image-load-error signals are used to signal success or failure of asynchronous image loading.
pub fn set_scale_height_threshold(&self, pixels: u32)
[src]
set_scale_height_threshold: @image: A #Image @pixels: Number of pixels
Sets the threshold used to determine whether to scale the height of the image. If a specific height is requested, the image height is allowed to differ by this amount before scaling is employed.
This can be useful to avoid excessive CPU usage when the image differs only slightly to the desired size.
pub fn set_scale_mode(&self, mode: ImageScaleMode)
[src]
set_scale_mode: @image: An #Image @mode: The #ImageScaleMode to set
Set the scale mode on @Image
pub fn set_scale_width_threshold(&self, pixels: u32)
[src]
set_scale_width_threshold: @image: A #Image @pixels: Number of pixels
Sets the threshold used to determine whether to scale the width of the image. If a specific width is requested, the image width is allowed to differ by this amount before scaling is employed.
This can be useful to avoid excessive CPU usage when the image differs only slightly to the desired size.
pub fn set_transition_duration(&self, duration: u32)
[src]
set_transition_duration: @image: A #Image @duration: Transition duration in milliseconds
Set the Image:transition-duration property.
pub fn set_property_filename(&self, filename: Option<&str>)
[src]
pub fn connect_image_load_error<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Error),
[src]
F: 'static + Fn(&O, &Error),
pub fn connect_image_loaded<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_allow_upscale_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_filename_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_image_rotation_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_load_async_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_scale_height_threshold_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
pub fn connect_property_scale_mode_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_scale_width_threshold_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
pub fn connect_property_transition_duration_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<O> WidgetExt for O where
O: Is<Widget>,
[src]
O: Is<Widget>,
pub fn apply_style<P>(&self, style: &P) where
P: Is<Style>,
[src]
P: Is<Style>,
widget_apply_style: @widget: A #Widget @style: A #Style
Used to implement how a new style instance should be applied in the widget. For instance, setting style instance on stylable internal children.
pub fn get_available_area(&self, allocation: &ActorBox, area: &mut ActorBox)
[src]
get_available_area: @widget: A #Widget @allocation: A #ActorBox @area: A #ActorBox
Copies @allocation into @area and accounts for the padding values. This gives the area that is available in which to allocate children with respect to padding.
pub fn get_background_color(&self) -> Option<Color>
[src]
get_background_color: @actor: A #Widget
Get the color used as the background. This is set using the “background-color” CSS property. This function should normally only be used by subclasses.
Returns: (transfer none): a #Color
pub fn get_background_texture(&self) -> Option<Handle>
[src]
pub fn get_disabled(&self) -> bool
[src]
get_disabled: @widget: an #Widget
Get the value of the “disabled” property.
pub fn get_padding(&self) -> Padding
[src]
get_padding: @widget: A #Widget @padding: (out): A pointer to an #Padding to fill
Gets the padding of the widget, set using the “padding” CSS property. This function should normally only be used by subclasses.
pub fn long_press_cancel(&self)
[src]
long_press_cancel: @widget: An Widget
Cancel a long-press timeout if one is running and emit the signal to notify that the long-press has been cancelled.
pub fn long_press_query(&self, event: &mut Event)
[src]
long_press_query: @widget: An Widget @event: the event used to determine whether to run a long-press
Emit the long-press query signal and start a long-press timeout if required.
pub fn set_disabled(&self, disabled: bool)
[src]
widget_set_disabled: @widget: an #Widget @disabled: value to set
Set the disabled property. Disabled widgets have a “disabled” pseudo-class until disabled is set to #false.
pub fn connect_property_disabled_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_menu_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_tooltip_delay_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_tooltip_text_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),