Class
XdpPortal
Description [src]
final class Xdp.Portal : GObject.Object
implements Gio.Initable {
/* No available fields */
}
Context for portal calls.
The XdpPortal object provides the main context object for the portal operations of libportal.
Typically, an application will create a single XdpPortal
object with xdp_portal_new()
and use it throughout its lifetime.
Constructors
xdp_portal_new
Creates a new XdpPortal
object. If D-Bus is unavailable this API will abort.
We recommend using xdp_portal_initable_new()
to safely handle this failure.
Functions
xdp_portal_running_under_sandbox
This function tries to determine if the current process is running under a sandbox that requires the use of portals.
Instance methods
xdp_portal_compose_email
Presents a window that lets the user compose an email, with some pre-filled information.
xdp_portal_create_input_capture_session_finish
Finishes the InputCapture CreateSession request, and returns a
XdpInputCaptureSession
. To get to the XdpSession
within use xdp_input_capture_session_get_session().
xdp_portal_create_remote_desktop_session_finish
Finishes the create-remote-desktop request, and returns a XdpSession
.
xdp_portal_create_screencast_session_finish
Finishes the create-screencast request, and returns a XdpSession
.
xdp_portal_dynamic_launcher_get_desktop_entry
This function gets the contents of a .desktop file that was previously installed by the dynamic launcher portal.
xdp_portal_dynamic_launcher_get_icon
This function gets the icon associated with a .desktop file that was previously installed by the dynamic launcher portal.
xdp_portal_dynamic_launcher_install
This function completes installation of a launcher so that the icon and name given in previous method calls will show up in the desktop environment’s menu.
xdp_portal_dynamic_launcher_prepare_install
Presents a dialog to the user so they can confirm they want to install a launcher to their desktop.
xdp_portal_dynamic_launcher_prepare_install_finish
Finishes the prepare-install-launcher request, and returns
GVariant
dictionary with the following information:.
xdp_portal_dynamic_launcher_request_install_token
Requests a token which can be passed to xdp_portal_dynamic_launcher_install()
to complete installation of the launcher without user interaction.
xdp_portal_dynamic_launcher_uninstall
This function uninstalls a launcher that was previously installed using the dynamic launcher portal, resulting in the .desktop file and icon being deleted.
xdp_portal_get_settings
This function returns an object to access settings exposed through the portal.
xdp_portal_location_monitor_stop
Stops location monitoring that was started with
xdp_portal_location_monitor_start()
.
xdp_portal_open_pipewire_remote_for_camera
Opens a file descriptor to the pipewire remote where the camera nodes are available.
xdp_portal_prepare_print
Presents a print dialog to the user and returns print settings and page setup.
xdp_portal_session_monitor_query_end_response
This method should be called within one second of
receiving a XdpPortal::session-state-changed
signal
with the ‘Query End’ state, to acknowledge that they
have handled the state change.
xdp_portal_session_monitor_stop
Stops session state monitoring that was started with
xdp_portal_session_monitor_start()
.
xdp_portal_session_uninhibit
Removes an inhibitor that was created by a call
to xdp_portal_session_inhibit()
.
xdp_portal_set_background_status
Sets the status information of the application, for when it’s running in background.
xdp_portal_spawn
Creates a new copy of the applications sandbox, and runs a process in, with the given arguments.
xdp_portal_spawn_signal
Sends a Unix signal to a process that has been spawned
by xdp_portal_spawn()
.
xdp_portal_update_monitor_stop
Stops update monitoring that was started with
xdp_portal_update_monitor_start()
.
Methods inherited from GInitable (1)
g_initable_init
Initializes the object implementing the interface.
Signals
Xdp.Portal::notification-action-invoked
Emitted when a non-exported action is activated on a notification.
Xdp.Portal::session-state-changed
Emitted when session state monitoring is enabled and the state of the login session changes or the screensaver is activated or deactivated.
Xdp.Portal::update-available
Emitted when updates monitoring is enabled and a new update is available.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.