Struct ashpd::desktop::remote_desktop::RemoteDesktopProxy [−][src]
pub struct RemoteDesktopProxy<'a>(_);
Expand description
The interface lets sandboxed applications create remote desktop sessions.
Implementations
Create a new instance of RemoteDesktopProxy
.
Create a remote desktop session. A remote desktop session is used to allow remote controlling a desktop session. It can also be used together with a screen cast session.
pub async fn select_devices(
&self,
session: &SessionProxy<'_>,
types: BitFlags<DeviceType>
) -> Result<(), Error>
pub async fn select_devices(
&self,
session: &SessionProxy<'_>,
types: BitFlags<DeviceType>
) -> Result<(), Error>
Select input devices to remote control.
Arguments
session
- ASessionProxy
.types
- The device types to request remote controlling of.
pub async fn start(
&self,
session: &SessionProxy<'_>,
identifier: WindowIdentifier
) -> Result<BitFlags<DeviceType>, Error>
pub async fn start(
&self,
session: &SessionProxy<'_>,
identifier: WindowIdentifier
) -> Result<BitFlags<DeviceType>, Error>
Start the remote desktop session.
This will typically result in the portal presenting a dialog letting the user select what to share, including devices and optionally screen content if screen cast sources was selected.
Arguments
session
- ASessionProxy
.identifier
- The application window identifier.
pub async fn notify_keyboard_keycode(
&self,
session: &SessionProxy<'_>,
keycode: i32,
state: KeyState
) -> Result<(), Error>
pub async fn notify_keyboard_keycode(
&self,
session: &SessionProxy<'_>,
keycode: i32,
state: KeyState
) -> Result<(), Error>
Notify keyboard code. May only be called if KEYBOARD access was provided after starting the session.
Arguments
session
- ASessionProxy
.keycode
- Keyboard code that was pressed or released.state
- The new state of the keyboard code.
pub async fn notify_keyboard_keysym(
&self,
session: &SessionProxy<'_>,
keysym: i32,
state: KeyState
) -> Result<(), Error>
pub async fn notify_keyboard_keysym(
&self,
session: &SessionProxy<'_>,
keysym: i32,
state: KeyState
) -> Result<(), Error>
Notify keyboard symbol. May only be called if KEYBOARD access was provided after starting the session.
Arguments
session
- ASessionProxy
.keysym
- Keyboard symbol that was pressed or released.state
- The new state of the keyboard code.
pub async fn notify_touch_up(
&self,
session: &SessionProxy<'_>,
slot: u32
) -> Result<(), Error>
pub async fn notify_touch_up(
&self,
session: &SessionProxy<'_>,
slot: u32
) -> Result<(), Error>
Notify about a new touch up event.
May only be called if TOUCHSCREEN access was provided after starting the session.
Arguments
session
- ASessionProxy
.slot
- Touch slot where touch point appeared.
pub async fn notify_touch_down(
&self,
session: &SessionProxy<'_>,
stream: u32,
slot: u32,
x: f64,
y: f64
) -> Result<(), Error>
pub async fn notify_touch_down(
&self,
session: &SessionProxy<'_>,
stream: u32,
slot: u32,
x: f64,
y: f64
) -> Result<(), Error>
Notify about a new touch down event. The (x, y) position represents the new touch point position in the streams logical coordinate space.
May only be called if TOUCHSCREEN access was provided after starting the session.
Arguments
session
- ASessionProxy
.stream
- The PipeWire stream node the coordinate is relative to.slot
- Touch slot where touch point appeared.x
- Touch down x coordinate.y
- Touch down y coordinate.
pub async fn notify_touch_motion(
&self,
session: &SessionProxy<'_>,
stream: u32,
slot: u32,
x: f64,
y: f64
) -> Result<(), Error>
pub async fn notify_touch_motion(
&self,
session: &SessionProxy<'_>,
stream: u32,
slot: u32,
x: f64,
y: f64
) -> Result<(), Error>
Notify about a new touch motion event. The (x, y) position represents where the touch point position in the streams logical coordinate space moved.
May only be called if TOUCHSCREEN access was provided after starting the session.
Arguments
session
- ASessionProxy
.stream
- The PipeWire stream node the coordinate is relative to.slot
- Touch slot where touch point appeared.x
- Touch motion x coordinate.y
- Touch motion y coordinate.
pub async fn notify_pointer_motion_absolute(
&self,
session: &SessionProxy<'_>,
stream: u32,
x: f64,
y: f64
) -> Result<(), Error>
pub async fn notify_pointer_motion_absolute(
&self,
session: &SessionProxy<'_>,
stream: u32,
x: f64,
y: f64
) -> Result<(), Error>
Notify about a new absolute pointer motion event. The (x, y) position represents the new pointer position in the streams logical coordinate space.
Arguments
session
- ASessionProxy
.stream
- The PipeWire stream node the coordinate is relative to.x
- Pointer motion x coordinate.y
- Pointer motion y coordinate.
pub async fn notify_pointer_motion(
&self,
session: &SessionProxy<'_>,
dx: f64,
dy: f64
) -> Result<(), Error>
pub async fn notify_pointer_motion(
&self,
session: &SessionProxy<'_>,
dx: f64,
dy: f64
) -> Result<(), Error>
Notify about a new relative pointer motion event. The (dx, dy) vector represents the new pointer position in the streams logical coordinate space.
Arguments
session
- ASessionProxy
.dx
- Relative movement on the x axis.dy
- Relative movement on the y axis.
Notify pointer button. The pointer button is encoded according to Linux Evdev button codes.
May only be called if POINTER access was provided after starting the session.
Arguments
session
- ASessionProxy
.button
- The pointer button was pressed or released.state
- The new state of the keyboard code.
pub async fn notify_pointer_axis_discrete(
&self,
session: &SessionProxy<'_>,
axis: Axis,
steps: i32
) -> Result<(), Error>
pub async fn notify_pointer_axis_discrete(
&self,
session: &SessionProxy<'_>,
axis: Axis,
steps: i32
) -> Result<(), Error>
Notify pointer axis discrete. May only be called if POINTER access was provided after starting the session.
Arguments
session
- ASessionProxy
.axis
- The axis that was scrolled.
pub async fn notify_pointer_axis(
&self,
session: &SessionProxy<'_>,
dx: f64,
dy: f64
) -> Result<(), Error>
pub async fn notify_pointer_axis(
&self,
session: &SessionProxy<'_>,
dx: f64,
dy: f64
) -> Result<(), Error>
Notify pointer axis. The axis movement from a “smooth scroll” device, such as a touchpad. When applicable, the size of the motion delta should be equivalent to the motion vector of a pointer motion done using the same advice.
May only be called if POINTER access was provided after starting the session.
Arguments
session
- ASessionProxy
.dx
- Relative axis movement on the x axis.dy
- Relative axis movement on the y axis.
Available source types.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for RemoteDesktopProxy<'a>
impl<'a> Send for RemoteDesktopProxy<'a>
impl<'a> Sync for RemoteDesktopProxy<'a>
impl<'a> Unpin for RemoteDesktopProxy<'a>
impl<'a> !UnwindSafe for RemoteDesktopProxy<'a>