pub struct TrayIconClickEvent {
pub kind: TrayIconEvent,
pub position: Option<Point<Pixels>>,
}Expand description
A tray icon click event with optional screen position information.
Fields§
§kind: TrayIconEventThe kind of click that occurred.
position: Option<Point<Pixels>>The click position in GPUI logical screen coordinates, if the platform provides it.
Linux StatusNotifierItem provides a raw screen-coordinate hint; GPUI converts that hint through the active display scale before exposing it. On Wayland fractional scaling, the hint has no surface association, so conversion uses the integer output scale and may remain approximate.
Implementations§
Source§impl TrayIconClickEvent
impl TrayIconClickEvent
Sourcepub fn new(kind: TrayIconEvent) -> Self
pub fn new(kind: TrayIconEvent) -> Self
Create a tray click event without position information.
Sourcepub fn with_position(kind: TrayIconEvent, position: Point<Pixels>) -> Self
pub fn with_position(kind: TrayIconEvent, position: Point<Pixels>) -> Self
Create a tray click event with a logical screen-coordinate hint.
Trait Implementations§
Source§impl Clone for TrayIconClickEvent
impl Clone for TrayIconClickEvent
Source§impl Debug for TrayIconClickEvent
impl Debug for TrayIconClickEvent
Source§impl PartialEq for TrayIconClickEvent
impl PartialEq for TrayIconClickEvent
impl StructuralPartialEq for TrayIconClickEvent
Auto Trait Implementations§
impl Freeze for TrayIconClickEvent
impl RefUnwindSafe for TrayIconClickEvent
impl Send for TrayIconClickEvent
impl Sync for TrayIconClickEvent
impl Unpin for TrayIconClickEvent
impl UnsafeUnpin for TrayIconClickEvent
impl UnwindSafe for TrayIconClickEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more