Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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/QBasicTimer>
9#include <QtCore/QLoggingCategory>
10
11#include <screen/screen.h>
12
14
15Q_DECLARE_LOGGING_CATEGORY(lcQpaScreenEvents);
16
17class QQnxIntegration;
20
22{
24public:
26
29
30 bool handleEvent(screen_event_t event);
31 bool handleEvent(screen_event_t event, int qnxType);
32
33 static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap);
34
36
39 void windowClosed(void *window);
40
41protected:
42 void timerEvent(QTimerEvent *event) override;
43
44private Q_SLOTS:
45 void processEvents();
46
47private:
48 void handleKeyboardEvent(screen_event_t event);
49 void handlePointerEvent(screen_event_t event);
50 void handleTouchEvent(screen_event_t event, int qnxType);
51 void handleCloseEvent(screen_event_t event);
52 void handleCreateEvent(screen_event_t event);
53 void handleDisplayEvent(screen_event_t event);
54 void handlePropertyEvent(screen_event_t event);
55 void handleKeyboardFocusPropertyEvent(screen_window_t window);
56 void handleGeometryPropertyEvent(screen_window_t window);
57 void handleManagerEvent(screen_event_t event);
58
59private:
60 enum {
61 MaximumTouchPoints = 10
62 };
63
64 QQnxIntegration *m_qnxIntegration;
65 QPoint m_lastGlobalMousePoint;
66 QPoint m_lastLocalMousePoint;
67 Qt::MouseButtons m_lastButtonState;
68 screen_window_t m_lastMouseWindow;
69 QPointingDevice *m_touchDevice;
70 QPointingDevice *m_mouseDevice;
71 QWindowSystemInterface::TouchPoint m_touchPoints[MaximumTouchPoints];
72 QList<QQnxScreenEventFilter*> m_eventFilters;
73 QQnxScreenEventThread *m_eventThread;
74 QBasicTimer m_focusLostTimer;
75};
76
77QT_END_NAMESPACE
78
79#endif // QQNXSCREENEVENTHANDLER_H
spannable_string_t * text
input_session_t * session
spannable_string_t * result
QQnxImfRequest(input_session_t *_session, ImfEventType _type)
bool handleKeyboardEvent(int flags, int sym, int mod, int scan, int cap, int sequenceId) override
void update(Qt::InputMethodQueries) override
Notification on editor updates.
bool isInputPanelVisible() const override
Returns input panel visibility status.
void reset() override
Method to be called when input method needs to be reset.
void hideInputPanel() override
Request to hide input panel.
static bool checkSpelling(const QString &text, void *context, void(*spellCheckDone)(void *context, const QString &text, const QList< int > &indices))
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
QLocale locale() const override
bool isValid() const override
Returns input context validity.
bool filterEvent(const QEvent *event) override
This function can be reimplemented to filter input events.
QRectF keyboardRect() const override
This function can be reimplemented to return virtual keyboard rectangle in currently active window co...
void showInputPanel() override
Request to show input panel.
static void setHighlightColor(int index, const QColor &color)
QQnxScreen * primaryDisplay() const
void removeScreenEventFilter(QQnxScreenEventFilter *filter)
void windowClosed(void *window)
void setScreenEventThread(QQnxScreenEventThread *eventThread)
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)
bool handleEvent(screen_event_t event, int qnxType)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_GLOBAL_STATIC(QReadWriteLock, g_updateMutex)
static void(* p_imf_client_disconnect)()
static const input_session_t * sInputSession
static QQnxInputContext * sInputContextInstance
static bool imfAvailable()
static bool isSessionOkay(input_session_t *ic)
static spannable_string_t * toSpannableString(const QString &text)
static int adjustIndex(const QChar *text, int utf32Index, int utf16StartIndex, int *highSurrogateCount)
static bool s_imfInitFailed
static void initEvent(event_t *pEvent, const input_session_t *pSession, EventType eventType, int eventId, int eventSize)
static const input_session_t * sSpellCheckSession
static const input_session_t *(* p_ictrl_open_session)(connection_interface_t *)
static QColor sSelectedColor(0, 0xb8, 0, 85)
static void executeIMFRequest(QQnxImfRequest *event)
@ ImfSetComposingRegion
@ ImfFinishComposingText
@ ImfIsTextSelected
@ ImfGetTextAfterCursor
@ ImfGetTextBeforeCursor
@ ImfIsAllTextSelected
@ ImfSetComposingText
@ ImfGetCursorPosition
@ ImfDeleteSurroundingText
static void(* p_ictrl_close_session)(input_session_t *)
void(* spellCheckDone)(void *, const QString &, const QList< int > &)
SpellCheckInfo(void *_context, void(*_spellCheckDone)(void *, const QString &, const QList< int > &))