summaryrefslogtreecommitdiff
path: root/src/compositor/wayland_wrapper/qwlcompositor_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/wayland_wrapper/qwlcompositor_p.h')
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor_p.h218
1 files changed, 0 insertions, 218 deletions
diff --git a/src/compositor/wayland_wrapper/qwlcompositor_p.h b/src/compositor/wayland_wrapper/qwlcompositor_p.h
deleted file mode 100644
index 4881adda..00000000
--- a/src/compositor/wayland_wrapper/qwlcompositor_p.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef WL_COMPOSITOR_H
-#define WL_COMPOSITOR_H
-
-#include <QtCompositor/qwaylandexport.h>
-#include <QtCompositor/qwaylandcompositor.h>
-
-#include <QtCompositor/private/qwayland-server-wayland.h>
-
-#include <QtCore/QElapsedTimer>
-#include <QtCore/QSet>
-
-#include <private/qwldisplay_p.h>
-
-#include <wayland-server.h>
-
-QT_BEGIN_NAMESPACE
-
-class QWaylandClient;
-class QWaylandClientPrivate;
-class QInputEvent;
-
-class QWaylandCompositor;
-class QWaylandInputDevice;
-class WindowManagerServerIntegration;
-class QMimeData;
-class QPlatformScreenBuffer;
-class QWaylandSurface;
-class QWindowSystemEventHandler;
-
-namespace QtWayland {
-
-class Surface;
-class SurfaceBuffer;
-class InputDevice;
-class DataDeviceManager;
-class SurfaceExtensionGlobal;
-class TouchExtensionGlobal;
-class QtKeyExtensionGlobal;
-class TextInputManager;
-class InputPanel;
-class HardwareIntegration;
-class ClientBufferIntegration;
-class ServerBufferIntegration;
-
-class Q_COMPOSITOR_EXPORT Compositor : public QObject, public QtWaylandServer::wl_compositor
-{
- Q_OBJECT
-
-public:
- Compositor(QWaylandCompositor *qt_compositor);
- ~Compositor();
-
- void init();
-
- QWaylandInputDevice *defaultInputDevice();
-
- void registerInputDevice(QWaylandInputDevice *device);
- QList<QWaylandInputDevice *> inputDevices() const { return m_inputDevices; }
- QWaylandInputDevice *inputDeviceFor(QInputEvent *inputEvent);
- void removeInputDevice(QWaylandInputDevice *device);
-
- void destroySurface(QWaylandSurface *surface);
-
- void destroyClient(QWaylandClient *client);
-
- uint currentTimeMsecs() const;
-
- QWaylandOutput *output(QWindow *window) const;
-
- QWaylandOutput *primaryOutput() const;
- QWaylandOutputSpace *primaryOutputSpace() const;
- void setPrimaryOutputSpace(QWaylandOutputSpace *outputSpace);
- void addOutputSpace(QWaylandOutputSpace *outputSpace);
- void removeOutputSpace(QWaylandOutputSpace *outputSpace);
-
- ClientBufferIntegration *clientBufferIntegration() const;
- ServerBufferIntegration *serverBufferIntegration() const;
- void initializeHardwareIntegration();
- void initializeExtensions();
- void initializeDefaultInputDevice();
- void initializeWindowManagerProtocol();
-
- QWaylandCompositor *waylandCompositor() const { return m_qt_compositor; }
-
- struct wl_display *wl_display() const { return m_display->handle(); }
- Display *display() const { return m_display; }
-
- QList<QWaylandClient *> clients() const;
-
- QWaylandCompositor::ExtensionFlags extensions() const;
-
- InputPanel *inputPanel() const;
-
- DataDeviceManager *dataDeviceManager() const;
-
- bool isDragging() const;
- void sendDragMoveEvent(const QPoint &global, const QPoint &local, QWaylandSurface *surface);
- void sendDragEndEvent();
-
- void setRetainedSelectionEnabled(bool enabled);
- bool retainedSelectionEnabled() const;
- void overrideSelection(const QMimeData *data);
- void feedRetainedSelectionData(QMimeData *data);
-
- void unregisterSurface(QWaylandSurface *surface);
-
- QWaylandPointer *callCreatePointerDevice(QWaylandInputDevice *inputDevice)
- { return m_qt_compositor->createPointerDevice(inputDevice); }
- QWaylandKeyboard *callCreateKeyboardDevice(QWaylandInputDevice *inputDevice)
- { return m_qt_compositor->createKeyboardDevice(inputDevice); }
- QWaylandTouch *callCreateTouchDevice(QWaylandInputDevice *inputDevice)
- { return m_qt_compositor->createTouchDevice(inputDevice); }
-
-public Q_SLOTS:
- void cleanupGraphicsResources();
-
-protected:
- void compositor_create_surface(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
- void compositor_create_region(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
-
-private Q_SLOTS:
- void processWaylandEvents();
-
-protected:
- void loadClientBufferIntegration();
- void loadServerBufferIntegration();
-
- QWaylandCompositor::ExtensionFlags m_extensions;
-
- Display *m_display;
- QByteArray m_socket_name;
-
- /* Input */
- QWaylandInputDevice *m_default_wayland_input_device;
-
- QList<QWaylandInputDevice *> m_inputDevices;
-
- /* Output */
- QList<QWaylandOutputSpace *> m_outputSpaces;
-
- QList<QWaylandSurface *> m_all_surfaces;
-
- DataDeviceManager *m_data_device_manager;
-
- QElapsedTimer m_timer;
- QSet<QWaylandSurface *> m_destroyed_surfaces;
-
- /* Render state */
- uint32_t m_current_frame;
- int m_last_queued_buf;
-
- wl_event_loop *m_loop;
-
- QWaylandCompositor *m_qt_compositor;
- Qt::ScreenOrientation m_orientation;
- QList<QWaylandClient *> m_clients;
-
-#ifdef QT_COMPOSITOR_WAYLAND_GL
- QScopedPointer<HardwareIntegration> m_hw_integration;
- QScopedPointer<ClientBufferIntegration> m_client_buffer_integration;
- QScopedPointer<ServerBufferIntegration> m_server_buffer_integration;
-#endif
-
- QScopedPointer<QWindowSystemEventHandler> m_eventHandler;
-
- static void bind_func(struct wl_client *client, void *data,
- uint32_t version, uint32_t id);
-
- bool m_retainSelection;
- bool m_initialized;
-
- friend class QT_PREPEND_NAMESPACE(QWaylandCompositor);
- friend class QT_PREPEND_NAMESPACE(QWaylandClient);
- friend class QT_PREPEND_NAMESPACE(QWaylandClientPrivate);
-};
-
-}
-
-QT_END_NAMESPACE
-
-#endif //WL_COMPOSITOR_H