1 /****************************************************************************
3 ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
6 ** This file is part of the test suite of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
40 ****************************************************************************/
42 #include "mockcompositor.h"
46 void shell_surface_pong(wl_client *client,
47 wl_resource *surface_resource,
51 Q_UNUSED(surface_resource);
55 void shell_surface_move(wl_client *client,
56 wl_resource *surface_resource,
57 wl_resource *input_device_resource,
61 Q_UNUSED(surface_resource);
62 Q_UNUSED(input_device_resource);
66 void shell_surface_resize(wl_client *client,
67 wl_resource *surface_resource,
68 wl_resource *input_device_resource,
73 Q_UNUSED(surface_resource);
74 Q_UNUSED(input_device_resource);
80 void shell_surface_set_toplevel(wl_client *client,
81 wl_resource *surface_resource)
84 Q_UNUSED(surface_resource);
87 void shell_surface_set_transient(wl_client *client,
88 wl_resource *surface_resource,
89 wl_resource *parent_surface_resource,
96 Q_UNUSED(surface_resource);
97 Q_UNUSED(parent_surface_resource);
103 void shell_surface_set_fullscreen(wl_client *client,
104 wl_resource *surface_resource,
110 Q_UNUSED(surface_resource);
116 void shell_surface_set_popup(wl_client *client, wl_resource *resource,
117 wl_resource *input_device, uint32_t time,
119 int32_t x, int32_t y,
124 Q_UNUSED(input_device);
132 void shell_surface_set_maximized(wl_client *client,
133 wl_resource *surface_resource,
137 Q_UNUSED(surface_resource);
141 void shell_surface_set_title(wl_client *client,
142 wl_resource *surface_resource,
146 Q_UNUSED(surface_resource);
150 void shell_surface_set_class(wl_client *client,
151 wl_resource *surface_resource,
155 Q_UNUSED(surface_resource);
159 static void get_shell_surface(wl_client *client, wl_resource *compositorResource, uint32_t id, wl_resource *surfaceResource)
161 static const struct wl_shell_surface_interface shellSurfaceInterface = {
164 shell_surface_resize,
165 shell_surface_set_toplevel,
166 shell_surface_set_transient,
167 shell_surface_set_fullscreen,
168 shell_surface_set_popup,
169 shell_surface_set_maximized,
170 shell_surface_set_title,
171 shell_surface_set_class
174 Q_UNUSED(compositorResource);
175 wl_client_add_object(client, &wl_shell_surface_interface, &shellSurfaceInterface, id, surfaceResource->data);
178 void Compositor::bindShell(wl_client *client, void *compositorData, uint32_t version, uint32_t id)
180 static const struct wl_shell_interface shellInterface = {
185 wl_client_add_object(client, &wl_shell_interface, &shellInterface, id, compositorData);