Session
Object Hierarchy:
Description:
[
CCode ( type_id =
"xdp_session_get_type ()" ) ]
public class Session :
Object
A representation of long-lived screencast portal interactions.
The XdpSession object is used to represent portal interactions with the screencast or remote desktop portals that extend over multiple
portal calls.
To find out what kind of session an XdpSession object represents and whether it is still active, you can use [
method@Session.get_session_type] and [method@Session.get_session_state].
All sessions start in an initial state. They can be made active by calling [method@Session.start], and ended by calling [
method@Session.close].
Content:
Creation methods:
Methods:
- public void close ()
Closes the session.
- public int connect_to_eis () throws Error
Connect this XdpRemoteDesktopSession to an EIS implementation and
return the fd.
- public DeviceType get_devices ()
Obtains the devices that the user selected.
- public PersistMode get_persist_mode ()
Retrieves the effective persist mode of
this.
- public string? get_restore_token ()
Retrieves the restore token of this.
- public unowned string[] get_selection_mime_types ()
Get the currently advertised mime types of the current clipboard
selection owner.
- public SessionState get_session_state ()
Obtains information about the state of the session that is represented
by this.
- public SessionType get_session_type ()
Obtains information about the type of session that is represented by
this.
- public Variant get_streams ()
Obtains the streams that the user selected.
- public bool is_clipboard_enabled ()
Returns TRUE if the session has enabled clipboard integration.
- public bool is_selection_owned_by_session ()
Return TRUE if the most recently received clipboard selection owner is
the selection of this session.
- public void keyboard_key (bool keysym, int key, KeyState state)
Changes the state of the key to state.
- public int open_pipewire_remote ()
Opens a file descriptor to the pipewire remote where the screencast
streams are available.
- public void pointer_axis (bool finish, double dx, double dy)
The axis movement from a smooth scroll device, such as a touchpad.
- public void pointer_axis_discrete (DiscreteAxis axis, int steps)
The axis movement from a discrete scroll device.
- public void pointer_button (int button, ButtonState state)
Changes the state of the button to state.
- public void pointer_motion (double dx, double dy)
Moves the pointer from its current position.
- public void pointer_position (uint stream, double x, double y)
Moves the pointer to a new position in the given streams logical
coordinate space.
- public void request_clipboard ()
Requests clipboard integration on the session.
- public int selection_read (string mime_type)
Request to read the contents of the current clipboard selection in the
passed mime type format.
- public int selection_write (uint serial)
Retrieve a file descriptor to write the content of the clipboard
selection to.
- public void selection_write_done (uint serial, bool success)
Notify whether a clipboard selection write operation associated with
the passed serial was successful or not.
- public void set_selection (string mime_types)
Set the clipboard selection to advertise support for the passed list
of mime types.
- public async bool start (Parent? parent, Cancellable? cancellable) throws Error
Starts the session.
- public void touch_down (uint stream, uint slot, double x, double y)
Notify about a new touch down event.
- public void touch_position (uint stream, uint slot, double x, double y)
Notify about a new touch motion event.
- public void touch_up (uint slot)
Notify about a new touch up event.
Signals:
Inherited Members:
All known members inherited from class GLib.Object