Class
XdpPortal
Description [src]
final class Xdp.Portal : GObject.Object
{
/* 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.
Instance methods
xdp_portal_access_camera_finish
Finishes a camera acess request, and returns the result as a boolean.
xdp_portal_add_notification_finish
Finishes the notification request, and returns the result as a boolean.
xdp_portal_compose_email
Presents a window that lets the user compose an email, with some pre-filled information.
xdp_portal_create_remote_desktop_session_finish
Finishes the create-remote-desktop request, and returns an XdpSession
.
xdp_portal_create_screencast_session_finish
Finishes the create-screencast request, and returns an XdpSession
.
xdp_portal_get_user_information_finish
Finishes the get-user-information request, and returns
the result in the form of a GVariant
dictionary containing
the following fields:
xdp_portal_location_monitor_start_finish
Finishes a location-monitor request, and returns the result in the form of boolean.
xdp_portal_location_monitor_stop
Stops location monitoring that was started with
xdp_portal_location_monitor_start()
.
xdp_portal_open_directory
Opens the directory containing the file specified by the uri
. which
must be a file: uri pointing to a file that the application has access to.
xdp_portal_open_directory_finish
Finishes the open-directory request, and returns the result in the form of a boolean.
xdp_portal_open_file_finish
Finishes the open-file request, and returns
the result in the form of a GVariant
dictionary containing
the following fields:
xdp_portal_open_pipewire_remote_for_camera
Opens a file descriptor to the pipewire remote where the camera nodes are available. The file descriptor should be used to create a pw_remote object, by using pw_remote_connect_fd(). Only the camera nodes will be available from this pipewire node.
xdp_portal_open_uri_finish
Finishes the open-uri request, and returns the result in the form of a boolean.
xdp_portal_pick_color_finish
Finishes a pick-color request, and returns the result in the form of a GVariant of the form (ddd), containing red, green and blue components in the range [0,1].
xdp_portal_prepare_print
Presents a print dialog to the user and returns print settings and page setup.
xdp_portal_prepare_print_finish
Finishes the prepare-print request, and returns GVariant
dictionary
with the following information:
xdp_portal_save_file_finish
Finishes the save-file request, and returns
the result in the form of a GVariant
dictionary containing
the following fields:
xdp_portal_save_files
Asks for a folder as a location to save one or more files. The names of the files will be used as-is and appended to the selected folder’s path in the list of returned files. If the selected folder already contains a file with one of the given names, the portal may prompt or take some other action to construct a unique file name and return that instead.
xdp_portal_save_files_finish
Finishes the save-files request, and returns
the result in the form of a GVariant
dictionary containing
the following fields:
xdp_portal_session_inhibit_finish
Finishes the inhbit request, and returns the ID of the
inhibition as a positive integer. The ID can be passed to
xdp_portal_session_uninhibit()
to undo the inhibition.
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_start_finish
Finishes a session-monitor request, and returns the result in the form of boolean.
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_wallpaper_finish
Finishes the open-uri request, and returns the result in the form of a boolean.
xdp_portal_spawn
Creates a new copy of the applications sandbox, and runs a process in, with the given arguments.
xdp_portal_spawn_finish
Finishes the spawn request, and returns the pid of the newly spawned process.
xdp_portal_spawn_signal
Sends a Unix signal to a process that has been spawned
by xdp_portal_spawn()
.
xdp_portal_take_screenshot_finish
Finishes a screenshot request, and returns the result in the form of a URI pointing to an image file.
xdp_portal_trash_file_finish
Finishes the trash-file request, and returns the result in the form of a boolean.
xdp_portal_update_install
Installs an available software update. This should be
called in response to a XdpPortal::update-available
signal.
xdp_portal_update_install_finish
Finishes an update-installation request, and returns the result in the form of boolean.
xdp_portal_update_monitor_start_finish
Finishes an update-monitor request, and returns the result in the form of boolean.
xdp_portal_update_monitor_stop
Stops update monitoring that was started with
xdp_portal_update_monitor_start()
.
Signals
Xdp.Portal::location-updated
The ::location-updated signal is emitted when location monitoring is enabled and the location changes.
Xdp.Portal::notification-action-invoked
The ::notification-action-invoked signal is emitted when a non-exported action is activated on a notification.
Xdp.Portal::session-state-changed
This signal is emitted when session state monitoring is enabled and the state of the login session changes or the screensaver is activated or deactivated.
Xdp.Portal::spawn-exited
This signal is emitted when a process that was spawned
with xdp_portal_spawn()
exits.
Xdp.Portal::update-available
This signal is emitted when updates monitoring is enabled and a new update is available. It is only sent once with the same information, but it can be sent many times if new updates appear.
Xdp.Portal::update-progress
This signal gets emitted to indicate progress of an
update installation. It is undefined exactly how often it
is sent, but it will be emitted at least once at the end with
a non-zero status
. For each successful operation in the
update, we’re also guaranteed to send exactly one signal
with progress
100.
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.