Methods
CreateSession (IN a{sv} options,
OUT o handle);
SelectDevices (IN o session_handle,
IN a{sv} options,
OUT o handle);
Start (IN o session_handle,
IN s parent_window,
IN a{sv} options,
OUT o handle);
NotifyPointerMotion (IN o session_handle,
IN a{sv} options,
IN d dx,
IN d dy);
NotifyPointerMotionAbsolute (IN o session_handle,
IN a{sv} options,
IN u stream,
IN d x,
IN d y);
NotifyPointerButton (IN o session_handle,
IN a{sv} options,
IN i button,
IN u state);
NotifyPointerAxis (IN o session_handle,
IN a{sv} options,
IN d dx,
IN d dy);
NotifyPointerAxisDiscrete (IN o session_handle,
IN a{sv} options,
IN u axis,
IN i steps);
NotifyKeyboardKeycode (IN o session_handle,
IN a{sv} options,
IN i keycode,
IN u state);
NotifyKeyboardKeysym (IN o session_handle,
IN a{sv} options,
IN i keysym,
IN u state);
NotifyTouchDown (IN o session_handle,
IN a{sv} options,
IN u stream,
IN u slot,
IN d x,
IN d y);
NotifyTouchMotion (IN o session_handle,
IN a{sv} options,
IN u stream,
IN u slot,
IN d x,
IN d y);
NotifyTouchUp (IN o session_handle,
IN a{sv} options,
IN u slot);
Method Details
The CreateSession() method
CreateSession (IN a{sv} options,
OUT o handle);
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 (see
org.freedesktop.portal.ScreenCast), but may only be started and stopped
with this interface.
To also get a screen content, call the
#org.freedesktop.ScreenCast.SelectSources with the
#org.freedesktop.Session object created with this method.
Supported keys in the options
vardict include:
- handle_token s
A string that will be used as the last element of the handle
. Must be a valid
object path element. See the org.freedesktop.portal.Request documentation for
more information about the handle
.
- session_handle_token s
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the org.freedesktop.portal.Session documentation for
more information about the session handle.
The following results get returned via the "Response" signal:
IN a{sv} options
:Vardict with optional further information
OUT o handle
:Object path for the org.freedesktop.portal.Request object representing this call
The SelectDevices() method
SelectDevices (IN o session_handle,
IN a{sv} options,
OUT o handle);
Select input devices to remote control.
Supported keys in the options
vardict include:
- handle_token s
A string that will be used as the last element of the handle
. Must be a valid
object path element. See the org.freedesktop.portal.Request documentation for
more information about the handle
.
- types u
Bitmask of what device types to request remote controlling of.
Default is all.
For available source types, see the AvailableDeviceTypes property.
The Start() method
Start (IN o session_handle,
IN s parent_window,
IN a{sv} options,
OUT o handle);
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.
Supported keys in the options
vardict include:
- handle_token s
A string that will be used as the last element of the handle
. Must be a valid
object path element. See the org.freedesktop.portal.Request documentation for
more information about the handle
.
The following results get returned via the
"Response" signal:
- devices u
A bitmask of the devices selected by the user.
If a screen cast source was selected, the results of the
org.freedesktop.portal.ScreenCast.Start response signal may be
included.
The NotifyPointerMotion() method
NotifyPointerMotion (IN o session_handle,
IN a{sv} options,
IN d dx,
IN d dy);
Notify about a new relative pointer motion event. The (dx, dy) vector
represents the new pointer position in the streams logical coordinate
space.
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN d dx
:Relative movement on the x axis
IN d dy
:Relative movement on the y axis
The NotifyPointerMotionAbsolute() method
NotifyPointerMotionAbsolute (IN o session_handle,
IN a{sv} options,
IN u stream,
IN d x,
IN d y);
Notify about a new absolute pointer motion event. The (x, y) position
represents the new pointer position in the streams logical coordinate
space (see the logical_size stream property in
org.freedesktop.portal.ScreenCast).
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN u stream
:The PipeWire stream node the coordinate is relative to
IN d x
:Pointer motion x coordinate
IN d y
:Pointer motion y coordinate
The NotifyPointerButton() method
NotifyPointerButton (IN o session_handle,
IN a{sv} options,
IN i button,
IN u state);
The pointer button is encoded according to Linux Evdev button codes.
May only be called if POINTER access was provided after starting the
session.
Available button states:
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN i button
:The pointer button was pressed or released
IN u state
:The new state of the button
The NotifyPointerAxis() method
NotifyPointerAxis (IN o session_handle,
IN a{sv} options,
IN d dx,
IN d dy);
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.
Supported keys in the options
vardict include:
- finish b
If set to true, this is the last axis event in a series, for
example as a result of the fingers being lifted from a touchpad
after a two-finger scroll. Default is false.
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN d dx
:Relative axis movement on the x axis
IN d dy
:Relative axis movement on the y axis
The NotifyPointerAxisDiscrete() method
NotifyPointerAxisDiscrete (IN o session_handle,
IN a{sv} options,
IN u axis,
IN i steps);
May only be called if POINTER access was provided after starting the
session.
Available axes:
0: Vertical scroll |
1: Horizontal scroll |
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN u axis
:The axis that was scrolled
IN i steps
:The number of steps scrolled
The NotifyKeyboardKeycode() method
NotifyKeyboardKeycode (IN o session_handle,
IN a{sv} options,
IN i keycode,
IN u state);
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN i keycode
:Keyboard code that was pressed or released
IN u state
:New state of keyboard keysym
The NotifyKeyboardKeysym() method
NotifyKeyboardKeysym (IN o session_handle,
IN a{sv} options,
IN i keysym,
IN u state);
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN i keysym
:Keyboard symbol that was pressed or released
IN u state
:New state of keyboard keysym
The NotifyTouchDown() method
NotifyTouchDown (IN o session_handle,
IN a{sv} options,
IN u stream,
IN u slot,
IN d x,
IN d y);
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch down event. The (x, y) position
represents the new touch point position in the streams logical
coordinate space (see the logical_size stream property in
org.freedesktop.portal.ScreenCast).
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN u stream
:The PipeWire stream node the coordinate is relative to
IN u slot
:Touch slot where touch point appeared
IN d x
:Touch down x coordinate
IN d y
:Touch down y coordinate
The NotifyTouchMotion() method
NotifyTouchMotion (IN o session_handle,
IN a{sv} options,
IN u stream,
IN u slot,
IN d x,
IN d y);
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch motion event. The (x, y) position
represents where the touch point position in the streams logical
coordinate space moved (see the logical_size stream property in
org.freedesktop.portal.ScreenCast).
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN u stream
:The PipeWire stream node the coordinate is relative to
IN u slot
:Touch slot where touch point appeared
IN d x
:Touch motion x coordinate
IN d y
:Touch motion y coordinate
The NotifyTouchUp() method
NotifyTouchUp (IN o session_handle,
IN a{sv} options,
IN u slot);
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch up event.
IN o session_handle
:Object path for the org.freedesktop.portal.Session object
IN a{sv} options
:Vardict with optional further information
IN u slot
:Touch slot where touch point appeared