XDG portals support check

XDG portals support check — Get information about system's XDG portals support

Functions

Properties

gboolean is-available Read / Write / Construct Only
char * name Read / Write / Construct Only
gboolean is-available Read / Write / Construct Only
char * name Read / Write / Construct Only
guint version Read / Write / Construct Only

Types and Values

Object Hierarchy

    GFlags
    ╰── SrtXdgPortalIssues
    GObject
    ├── SrtXdgPortalBackend
    ╰── SrtXdgPortalInterface

Includes

#include <steam-runtime-tools/steam-runtime-tools.h>

Description

SrtXdgPortalBackend is an opaque object representing an XDG portal backend. This is a reference-counted object: use g_object_ref() and g_object_unref() to manage its lifecycle.

SrtXdgPortalInterface is an opaque object representing an XDG portal interface. This is a reference-counted object: use g_object_ref() and g_object_unref() to manage its lifecycle.

Functions

srt_xdg_portal_backend_get_name ()

const char *
srt_xdg_portal_backend_get_name (SrtXdgPortalBackend *self);

Return the name of the XDG portal backend, for example org.freedesktop.impl.portal.desktop.gtk for the GTK/GNOME implementation. The returned string remains valid as long as a reference to self is held.

Parameters

self

an XDG portal backend object

 

Returns

“name”.

[transfer none][not nullable]


srt_xdg_portal_backend_is_available ()

gboolean
srt_xdg_portal_backend_is_available (SrtXdgPortalBackend *self);

Return TRUE if the XDG portal backend is available.

Parameters

self

an XDG portal backend object

 

srt_xdg_portal_interface_get_name ()

const char *
srt_xdg_portal_interface_get_name (SrtXdgPortalInterface *self);

Return the name of the XDG portal interface, for example org.freedesktop.portal.Email. The returned string remains valid as long as a reference to self is held.

Parameters

self

an XDG portal interface object

 

Returns

“name”.

[transfer none][not nullable]


srt_xdg_portal_interface_is_available ()

gboolean
srt_xdg_portal_interface_is_available (SrtXdgPortalInterface *self);

Return TRUE if the XDG portal interface is available.

Parameters

self

an XDG portal interface object

 

srt_xdg_portal_interface_get_version ()

guint32
srt_xdg_portal_interface_get_version (SrtXdgPortalInterface *self);

Return the version property of the XDG portal interface, or 0 if unknown or unavailable.

Parameters

self

an XDG portal interface object

 

Returns

“version”

Types and Values

enum SrtXdgPortalIssues

Members

SRT_XDG_PORTAL_ISSUES_NONE

There are no problems

 

SRT_XDG_PORTAL_ISSUES_UNKNOWN

A generic internal error occurred while trying to check the XDG portals support, or, while reading a report, either an unknown issue flag was encountered or the xdg portal issues field was missing

 

SRT_XDG_PORTAL_ISSUES_TIMEOUT

The check for the XDG portals support took too long to run and was terminated. This is likely to indicate that there are issues that caused the process to hang.

 

SRT_XDG_PORTAL_ISSUES_MISSING_INTERFACE

A certain required XDG portal interface is missing.

 

SRT_XDG_PORTAL_ISSUES_NO_IMPLEMENTATION

There isn't a working XDG portal implementation.

 

Property Details

The “is-available” property

  “is-available”             gboolean

TRUE if this XDG portal is available.

Owner: SrtXdgPortalBackend

Flags: Read / Write / Construct Only

Default value: FALSE


The “name” property

  “name”                     char *

Name of this XDG portal backend, e.g. 'org.freedesktop.impl.portal.desktop.gtk'.

Owner: SrtXdgPortalBackend

Flags: Read / Write / Construct Only

Default value: NULL


The “is-available” property

  “is-available”             gboolean

TRUE if this XDG portal is available.

Owner: SrtXdgPortalInterface

Flags: Read / Write / Construct Only

Default value: FALSE


The “name” property

  “name”                     char *

Name of this XDG portal interface, e.g. 'org.freedesktop.portal.Email'.

Owner: SrtXdgPortalInterface

Flags: Read / Write / Construct Only

Default value: NULL


The “version” property

  “version”                  guint

The version property of this XDG portal interface.

Owner: SrtXdgPortalInterface

Flags: Read / Write / Construct Only

Default value: 0