New HomeScreen API calls getSurfaceStatus and getAllSurfacesOfProcess.
[staging/HomeScreen.git] / interfaces / homescreen.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.homescreen:
18   @short_description: A generic interface for the HomeScreen app.
19
20   This interface is a collection of methods from different functional areas to control the HomeScreen app.
21 -->
22         <interface name="org.agl.homescreen">
23                 <!--
24                 hardKeyPressed:
25                 @key: The key that was pressed using the inputevent.hpp InputEvent::HardKey type.
26
27                 This is used to inject hard keys into the HomeScreen app.
28                 -->
29                 <method name="hardKeyPressed">
30                         <arg name="key" type="i" direction="in"/>
31                 </method>
32                 <!--
33                 getSurfaceStatus:
34                 @surfaceId: The given surface.
35                 @status: The status can be unknown (-1), visible (0), invisible (1)
36
37                 A surface can have three states. It can be visible, then it is shown on the screen.
38                 It can be invisible, then it is not shown on the screen. Or the state is unknown.
39                 -->
40                 <method name="getSurfaceStatus">
41                         <arg name="surfaceId" type="i" direction="in"/>
42                         <arg name="status" type="i" direction="out"/>
43                 </method>
44                 <!--
45                 requestSurfaceIdToFullScreen:
46                 @surfaceId: The surface that request to be shown fullscreen.
47
48                 This allows an application to set a surface to full screen.
49                 -->
50                 <method name="requestSurfaceIdToFullScreen">
51                         <arg name="surfaceId" type="i" direction="in"/>
52                 </method>
53                 <!--
54                   getAllSurfacesOfProcess:
55                   @pid: The PID of the process.
56                   @surfaceIds: A list of surfaces that were created by the process.
57
58                   The surface IDs can for example be used to assign them to a layout render area.
59                 -->
60                 <method name="getAllSurfacesOfProcess">
61                         <arg name="pid" type="i" direction="in"/>
62                         <arg name="surfaceIds" type="ai" direction="out"/>
63                         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
64                 </method>
65                 <!--
66                 getLayoutRenderAreaForSurfaceId:
67                 @surfaceId: The surface that is requested.
68                 @renderArea: The layout render area in which the given surface is located.
69
70                 Before an application uses renderSurfaceToArea to render a surface into an area inside a layout area,
71                 this method should be used to get the dimension of the layout area, in which the surface
72                 currently is positioned.
73                 -->
74                 <method name="getLayoutRenderAreaForSurfaceId">
75                         <arg name="surfaceId" type="i" direction="in"/>
76                         <arg name="renderArea" type="(iiii)" direction="out"/>
77                         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QRect"/>
78                 </method>
79                 <!--
80                 renderSurfaceToArea:
81                 @surfaceId: The surface that is requested.
82                 @renderArea: The render area inside the current layout area.
83
84                 This is a special case. In the normal use case, one layout area is always filled completely
85                 with one surface. By using this function, an app can request to position a surface in the
86                 layout area.
87                 Example:
88                 If the layout area is 500x500 pixel in size, the normal use case qould be, that a surface
89                 is positioned at x=0, y=0 with a width and a size of 500. With this function, an application can position surfaces
90                 free in this area.
91                 E.g.: Position surface 101 at x=10, y=30, width=300, height=100 and 
92                 surface 104 at x=100, y=130, width=30, height=10
93                 -->
94                 <method name="renderSurfaceToArea">
95                         <arg name="surfaceId" type="i" direction="in"/>
96                         <arg name="renderArea" type="(iiii)" direction="in"/>
97                         <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QRect"/>
98                 </method>
99         </interface>
100 </node>
101