pub struct DesktopIcon {
pub name: String,
pub icon_data: Vec<u32>,
pub x: i32,
pub y: i32,
pub selected: bool,
pub desktop_file_path: String,
pub desktop_file: Option<DesktopFile>,
}Expand description
A single desktop icon.
Fields§
§name: StringDisplay name (rendered below the icon).
icon_data: Vec<u32>16x16 pixel data (ARGB8888, row-major).
x: i32X position on the desktop (pixels).
y: i32Y position on the desktop (pixels).
selected: boolWhether this icon is currently selected.
desktop_file_path: StringPath to the associated .desktop file.
desktop_file: Option<DesktopFile>Parsed desktop file data.
Implementations§
Source§impl DesktopIcon
impl DesktopIcon
Sourcepub fn set_icon_data(&mut self, data: &[u32])
pub fn set_icon_data(&mut self, data: &[u32])
Set custom icon pixel data (must be ICON_SIZE x ICON_SIZE).
Sourcepub fn total_height(&self) -> u32
pub fn total_height(&self) -> u32
Total bounding box height (icon + label gap + label line).
Trait Implementations§
Source§impl Clone for DesktopIcon
impl Clone for DesktopIcon
Source§fn clone(&self) -> DesktopIcon
fn clone(&self) -> DesktopIcon
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DesktopIcon
impl RefUnwindSafe for DesktopIcon
impl Send for DesktopIcon
impl Sync for DesktopIcon
impl Unpin for DesktopIcon
impl UnwindSafe for DesktopIcon
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)