Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqnxscreeneventhandler.h
Go to the documentation of this file.
1// Copyright (C) 2013 BlackBerry Limited. All rights reserved.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQNXSCREENEVENTHANDLER_H
5#define QQNXSCREENEVENTHANDLER_H
6
7#include <qpa/qwindowsysteminterface.h>
8#include <QtCore/QLoggingCategory>
9
10#include <screen/screen.h>
11
13
14Q_DECLARE_LOGGING_CATEGORY(lcQpaScreenEvents);
15
16class QQnxIntegration;
19
21{
23public:
24 explicit QQnxScreenEventHandler(QQnxIntegration *integration);
25
28
29 bool handleEvent(screen_event_t event);
30 bool handleEvent(screen_event_t event, int qnxType);
31
32 static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap);
33
35
38 void windowClosed(void *window);
39
40protected:
41 void timerEvent(QTimerEvent *event) override;
42
43private Q_SLOTS:
44 void processEvents();
45
46private:
47 void handleKeyboardEvent(screen_event_t event);
48 void handlePointerEvent(screen_event_t event);
49 void handleTouchEvent(screen_event_t event, int qnxType);
50 void handleCloseEvent(screen_event_t event);
51 void handleCreateEvent(screen_event_t event);
52 void handleDisplayEvent(screen_event_t event);
53 void handlePropertyEvent(screen_event_t event);
54 void handleKeyboardFocusPropertyEvent(screen_window_t window);
55 void handleGeometryPropertyEvent(screen_window_t window);
56
57private:
58 enum {
59 MaximumTouchPoints = 10
60 };
61
62 QQnxIntegration *m_qnxIntegration;
63 QPoint m_lastGlobalMousePoint;
64 QPoint m_lastLocalMousePoint;
65 Qt::MouseButtons m_lastButtonState;
66 screen_window_t m_lastMouseWindow;
67 QPointingDevice *m_touchDevice;
68 QPointingDevice *m_mouseDevice;
69 QWindowSystemInterface::TouchPoint m_touchPoints[MaximumTouchPoints];
70 QList<QQnxScreenEventFilter*> m_eventFilters;
71 QQnxScreenEventThread *m_eventThread;
72 int m_focusLostTimer;
73};
74
76
77#endif // QQNXSCREENEVENTHANDLER_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:25
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
void removeScreenEventFilter(QQnxScreenEventFilter *filter)
void windowClosed(void *window)
void setScreenEventThread(QQnxScreenEventThread *eventThread)
void newWindowCreated(void *window)
QQnxScreenEventHandler(QQnxIntegration *integration)
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
bool handleEvent(screen_event_t event)
static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap)
void addScreenEventFilter(QQnxScreenEventFilter *filter)
\inmodule QtCore
Definition qcoreevent.h:366
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLbitfield flags
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
struct _cl_event * event
GLenum cap
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
aWidget window() -> setWindowTitle("New Window Title")
[2]