c15ca2c5de6e3f670ccd14d3aaec94967ce2a522
[staging/HomeScreen.git] / interfaces / windowmanager.xml
1 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
2 <!-- Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License. -->
15 <node>
16         <!--
17           org.agl.windowmanager:
18           @short_description: A Layout-based interface for the WindowManager.
19
20           A Layout defines a list of surfaces areas.
21         -->
22         <interface name="org.agl.windowmanager">
23                 <!--
24                   addLayout:
25                   @layoutId: A unique ID that represents this layout. If the ID is already in use WINDOWMANAGER_ERROR_ID_ALREADY_DEFINED will be returned.
26                   @layoutName: A user readable string for the layout. If the string is already in use WINDOWMANAGER_ERROR_NAME_ALREADY_DEFINED will be returned.
27                   @surfaceAreas: A list of surface areas.
28                   @error: WINDOWMANAGER_NO_ERROR or the first error that occurred.
29
30                   Add a layout definition to the WindowManayer layout database.
31                   The layout database is temoprary and not stored persistently. It has to be recreated by the client after
32                   a WindowManager restart.
33                 -->
34                 <method name="addLayout">
35                         <arg name="layoutId" type="i" direction="in"/>
36                         <arg name="layoutName" type="s" direction="in"/>
37                         <arg name="surfaceAreas" type="a(iiii)" direction="in"/>
38                         <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QList&lt;LayoutArea&gt;"/>
39                         <arg name="error" type="i" direction="out"/>
40                 </method>
41
42                 <!--
43                   setLayoutById:
44                   @layoutId: The ID of the layout to activate.
45                   @error: WINDOWMANAGER_NO_ERROR or the first error that occurred.
46
47                   Switch to the layout with the given ID.
48                 -->
49                 <method name="setLayoutById">
50                         <arg name="layoutId" type="i" direction="in"/>
51                         <arg name="error" type="i" direction="out"/>
52                 </method>
53                 <!--
54                   setLayoutByName:
55                   @layoutName: The name of the layout to activate.
56                   @error: WINDOWMANAGER_NO_ERROR or the first error that occurred.
57
58                   Switch to the layout with the given name.
59                 -->
60                 <method name="setLayoutByName">
61                         <arg name="layoutName" type="s" direction="in"/>
62                         <arg name="error" type="i" direction="out"/>
63                 </method>
64
65                 <!--
66                   getLayoutName:
67                   @layoutId: The ID of the requested layout name.
68                   @layoutName: The name of the layout with the given ID.
69
70                   Request the name of the layout with the given ID. This does not set or activate a layout.
71                   It is just returning the name of the given layout.
72                 -->
73                 <method name="getLayoutName">
74                         <arg name="layoutId" type="i" direction="in"/>
75                         <arg name="layoutName" type="s" direction="out"/>
76                 </method>
77
78                 <!--
79                   layout:
80                   The current active layout with all its information.
81                 -->
82                 <property>
83                         <arg name="layout" type="(isa(iiii))" access="read"/>
84                         <annotation name="org.qtproject.QtDBus.QtTypeName" value="Layout"/>
85                 </property>
86                 <!--
87                   layoutId:
88                   The current active layout id. This property is redundant, since its info is already available
89                   in the property layout. But this property is more lightweight.
90                 -->
91                 <property name="layoutId" type="i" access="read"/>
92                 <!--
93                   layoutName:
94                   The name of the current active layout. This property is redundant, since its info is already available
95                   in the property layout. But this property is more lightweight.
96                 -->
97                 <property name="layoutName" type="s" access="read"/>
98
99                 <!--
100                   getAllLayouts:
101                   @layouts: A list of all layouts.
102
103                   Returns a list of all layouts that were added to the WindowManager.
104                 -->
105                 <method name="getAllLayouts">
106                         <arg name="layoutIds" type="a(isa(iiii))" direction="out"/>
107                         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;Layout&gt;"/>
108                 </method>
109
110                 <!--
111                   getAvailableLayouts:
112                   @numberOfAppSurfaces: The ID of the requested layout name.
113                   @layoutIds: A list of layouts that offer the exact requested ammount of surface render areas.
114
115                   Returns a list of layouts that offer the exact requested ammount of surface render areas.
116                   If the list is empty, no layout fits the exact ammount.
117                 -->
118                 <method name="getAvailableLayouts">
119                         <arg name="numberOfAppSurfaces" type="i" direction="in"/>
120                         <arg name="layoutIds" type="ai" direction="out"/>
121                         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
122                 </method>
123
124                 <!--
125                   getAllSurfacesOfProcess:
126                   @pid: The PID of the process.
127                   @surfaceIds: A list of surfaces that were created by the process.
128
129                   The surface IDs can be used to assign them to a layout render area.
130                 -->
131                 <method name="getAllSurfacesOfProcess">
132                         <arg name="pid" type="i" direction="in"/>
133                         <arg name="layoutIds" type="ai" direction="out"/>
134                         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
135                 </method>
136
137                 <!--
138                   setSurfaceToLayoutArea:
139                   @surfaceId: The ID of the surface that shall be positioned.
140                   @layoutAreaId: The ID of the layout area where the surface shall be rendered.
141                   @error: WINDOWMANAGER_NO_ERROR or the first error that occurred.
142
143                   The surface will be scaled to the size of the layout area.
144                   The surface will be made visible with this call.
145                 -->
146                 <method name="setSurfaceToLayoutArea">
147                         <arg name="surfaceId" type="i" direction="in"/>
148                         <arg name="layoutAreaId" type="i" direction="in"/>
149                         <arg name="error" type="i" direction="out"/>
150                 </method>
151
152                 <!--
153                   getAvailableSurfaces:
154                   @surfaceIds: A list of all known surfaceIds except for the surfaces created by the Home Screen app.
155
156                   If no surfaces are available, the returned list is empty.
157                 -->
158                 <method name="getAvailableSurfaces">
159                         <arg name="surfaceIds" type="a(i)" direction="out"/>
160                         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/> 
161                 </method>
162         </interface>
163 </node>
164