pub struct SimulatorApi<P: CheckedPermissions>(/* private fields */);Implementations§
Source§impl<P: CheckedPermissions> SimulatorApi<P>
impl<P: CheckedPermissions> SimulatorApi<P>
Sourcepub fn connect() -> Self
pub fn connect() -> Self
Blocking connect: waits until gui-server has registered its name. gui-server is a mandatory system service, so callers wait for it instead of timing out and failing.
Sourcepub fn device_frame(&self) -> Result<Vec<u8>, GuiServerError>where
P: MessageAllowed<GetDeviceFrame>,
pub fn device_frame(&self) -> Result<Vec<u8>, GuiServerError>where
P: MessageAllowed<GetDeviceFrame>,
Captures the full device frame (including bezels) as raw ARGB8888.
For screen-only capture, use GuiApiLight::capture_screen() instead.
pub fn set_scale_factor(&self, scale_factor: f32) -> Result<(), GuiServerError>where
P: MessageAllowed<SetScaleFactor>,
pub fn simulate_scroll(
&self,
x: u32,
y: u32,
delta_x: f32,
delta_y: f32,
) -> Result<(), GuiServerError>where
P: MessageAllowed<SimulateScroll>,
pub fn simulate_key(
&self,
key: Key,
is_pressed: bool,
) -> Result<(), GuiServerError>where
P: MessageAllowed<SimulateKey>,
Trait Implementations§
Source§impl<P: Clone + CheckedPermissions> Clone for SimulatorApi<P>
impl<P: Clone + CheckedPermissions> Clone for SimulatorApi<P>
Source§fn clone(&self) -> SimulatorApi<P>
fn clone(&self) -> SimulatorApi<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Default + CheckedPermissions> Default for SimulatorApi<P>
impl<P: Default + CheckedPermissions> Default for SimulatorApi<P>
Source§fn default() -> SimulatorApi<P>
fn default() -> SimulatorApi<P>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<P> Freeze for SimulatorApi<P>
impl<P> RefUnwindSafe for SimulatorApi<P>
impl<P> Send for SimulatorApi<P>
impl<P> Sync for SimulatorApi<P>
impl<P> Unpin for SimulatorApi<P>
impl<P> UnwindSafe for SimulatorApi<P>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.