Top | ![]() |
![]() |
![]() |
![]() |
These functions let applications open URIs in external handlers. A typical example is to open a pdf file in a document viewer.
The underlying portal is org.freedesktop.portal.OpenURI.
void xdp_portal_open_uri (XdpPortal *portal
,XdpParent *parent
,const char *uri
,gboolean ask
,gboolean writable
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer data
);
Opens uri
with an external hamdler.
portal |
||
parent |
parent window information |
|
uri |
the URI to open |
|
ask |
request to show an application chooser |
|
writable |
whether to make the file writable |
|
cancellable |
optional GCancellable. |
[nullable] |
callback |
a callback to call when the request is done. |
[scope async] |
data |
data to pass to |
[closure] |
gboolean xdp_portal_open_uri_finish (XdpPortal *portal
,GAsyncResult *result
,GError **error
);
Finishes the open-uri request, and returns the result in the form of a boolean.
void xdp_portal_open_directory (XdpPortal *portal
,XdpParent *parent
,const char *uri
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer data
);
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.
portal |
||
parent |
parent window information |
|
uri |
the URI to open |
|
writable |
whether to make the file writable |
|
cancellable |
optional GCancellable. |
[nullable] |
callback |
a callback to call when the request is done. |
[scope async] |
data |
data to pass to |
[closure] |
gboolean xdp_portal_open_directory_finish (XdpPortal *portal
,GAsyncResult *result
,GError **error
);
Finishes the open-directory request, and returns the result in the form of a boolean.