/****************************************************************************
**
-** This file is part of QtCompositor**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
-** Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-**
-** Contact: Nokia Corporation qt-info@nokia.com
+** This file is part of the Qt Compositor.
**
+** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
-** Redistribution and use in source and binary forms, with or without
+** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
-**
-** Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-**
-** Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in the
-** documentation and/or other materials provided with the distribution.
-**
-** Neither the name of Nokia Corporation and its Subsidiary(-ies) nor the
-** names of its contributors may be used to endorse or promote products
-** derived from this software without specific prior written permission.
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
**
****************************************************************************/
#include <wayland-server.h>
class WaylandCompositor;
+class WaylandInputDevice;
class GraphicsHardwareIntegration;
class WindowManagerServerIntegration;
class QMimeData;
class SurfaceExtensionGlobal;
class SubSurfaceExtensionGlobal;
class Shell;
+class TouchExtensionGlobal;
class Q_COMPOSITOR_EXPORT Compositor : public QObject
{
~Compositor();
void frameFinished(Surface *surface = 0);
- void setInputFocus(Surface *surface);
- void setKeyFocus(Surface *surface);
- Surface *keyFocus() const;
- void setPointerFocus(Surface *surface, const QPoint &point = QPoint());
- Surface *pointerFocus() const;
+ //these 3 functions will be removed if noone steps up soon.
Surface *getSurfaceFromWinId(uint winId) const;
struct wl_client *getClientFromWinId(uint winId) const;
QImage image(uint winId) const;
- InputDevice *inputDevice() { return m_input; }
- InputDevice *defaultInputDevice();
+ InputDevice *defaultInputDevice(); //we just have 1 default device for now (since QPA doesn't give us anything else)
- void createSurface(struct wl_client *client, int id);
+ void createSurface(struct wl_client *client, uint32_t id);
void surfaceDestroyed(Surface *surface);
void markSurfaceAsDirty(Surface *surface);
GraphicsHardwareIntegration *graphicsHWIntegration() const;
void initializeHardwareIntegration();
+ void initializeDefaultInputDevice();
void initializeWindowManagerProtocol();
void enableSubSurfaceExtension();
bool setDirectRenderSurface(Surface *surface);
QList<Surface*> surfacesForClient(wl_client* client);
- WaylandCompositor *qtCompositor() const { return m_qt_compositor; }
+ WaylandCompositor *waylandCompositor() const { return m_qt_compositor; }
struct wl_display *wl_display() const { return m_display->handle(); }
void setScreenOrientation(Qt::ScreenOrientation orientation);
Qt::ScreenOrientation screenOrientation() const;
void setOutputGeometry(const QRect &geometry);
+ QRect outputGeometry() const;
+
+ void enableTouchExtension();
+ TouchExtensionGlobal *touchExtension() { return m_touchExtension; }
+ void configureTouchExtension(int flags);
bool isDragging() const;
void sendDragMoveEvent(const QPoint &global, const QPoint &local, Surface *surface);
Display *m_display;
/* Input */
- InputDevice *m_input;
+ WaylandInputDevice *m_default_wayland_input_device;
+ InputDevice *m_default_input_device;
/* Output */
//make this a list of the available screens
OutputExtensionGlobal *m_outputExtension;
SurfaceExtensionGlobal *m_surfaceExtension;
SubSurfaceExtensionGlobal *m_subSurfaceExtension;
+ TouchExtensionGlobal *m_touchExtension;
static void bind_func(struct wl_client *client, void *data,
uint32_t version, uint32_t id);