Debian Codegraph @

data/org.freedesktop.impl.portal.Inhibit.xml

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2016 Red Hat, Inc.
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19
20 Author: Matthias Clasen <[email protected]>
21 -->
22
23 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
24 <!--
25 org.freedesktop.impl.portal.Inhibit:
26 @short_description: Inhibit portal backend interface
27
28 The inhibit portal lets sandboxed applications inhibit the user
29 session from ending, suspending, idling or getting switched away.
30 -->
31 <interface name="org.freedesktop.impl.portal.Inhibit">
32 <!--
33 Inhibit:
34 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
35 @app_id: Application id
36 @window: Identifier for the window
37 @flags: Flags identifying what is inhibited
38 @options: Vardict with optional further information
39
40 Inhibits session status changes. As a side-effect of this call,
41 a :ref:`org.freedesktop.impl.portal.Request` object is exported on the
42 object path @handle. To end the inhibition, call
43 :ref:`org.freedesktop.impl.portal.Request.Close` on that object.
44
45 The flags determine what changes are inhibited:
46
47 - ``1``: Logout
48 - ``2``: User Switch
49 - ``4``: Suspend
50 - ``8``: Idle
51
52 Supported keys in the @options vardict include:
53
54 * ``reason`` (``s``)
55
56 User-visible reason for the inhibition.
57 -->
58 <method name="Inhibit">
59 <arg type="o" name="handle" direction="in"/>
60 <arg type="s" name="app_id" direction="in"/>
61 <arg type="s" name="window" direction="in"/>
62 <arg type="u" name="flags" direction="in"/>
63 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
64 <arg type="a{sv}" name="options" direction="in"/>
65 </method>
66
67 <!--
68 CreateMonitor:
69 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
70 @session_handle: Object path for the created :ref:`org.freedesktop.impl.portal.Session` object
71 @app_id: App id of the application
72 @window: the parent window
73 @response: the result of the operation (0 == success)
74
75 Creates a monitoring session. While this session is
76 active, the caller will receive StateChanged signals
77 with updates on the session state.
78 -->
79 <method name="CreateMonitor">
80 <arg type="o" name="handle" direction="in"/>
81 <arg type="o" name="session_handle" direction="in"/>
82 <arg type="s" name="app_id" direction="in"/>
83 <arg type="s" name="window" direction="in"/>
84 <arg type="u" name="response" direction="out"/>
85 </method>
86
87 <!--
88 StateChanged:
89 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
90 @state: Vardict with information about the session state
91
92 The StateChanged signal is sent to active monitoring sessions when
93 the session state changes.
94
95 When the session state changes to 'Query End', clients with active monitoring
96 sessions are expected to respond by calling
97 org.freedesktop.impl.portal.Inhibit.QueryEndResponse() within a second
98 of receiving the StateChanged signal.
99
100 The following information may get returned in the @state vardict:
101
102 * ``screensaver-active`` (``b``)
103
104 Whether the screensaver is active.
105
106 * ``session-state`` (``u``)
107
108 The state of the session.
109
110 - ``1``: Running
111 - ``2``: Query End
112 - ``3``: Ending
113 -->
114 <signal name="StateChanged">
115 <arg type="o" name="session_handle" direction="out"/>
116 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
117 <arg type="a{sv}" name="state" direction="out"/>
118 </signal>
119
120 <!--
121 QueryEndResponse:
122 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object
123
124 Acknowledges that the caller received the :ref:`org.freedesktop.impl.portal.Inhibit::StateChanged`
125 signal. This method should be called within one second or receiving a StateChanged
126 signal with the 'Query End' state.
127 -->
128 <method name="QueryEndResponse">
129 <arg type="o" name="session_handle" direction="in"/>
130 </method>
131
132 </interface>
133 </node>