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
androidjniinput.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
3// Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
4// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
5
6#include <QtGui/qtguiglobal.h>
7
8#include "androidjniinput.h"
9#include "androidjnimain.h"
11
12#include <qpa/qplatformwindow.h>
13#include <qpa/qwindowsysteminterface.h>
14#include <QTouchEvent>
15#include <QPointer>
16
17#include <QGuiApplication>
18#include <QtMath>
19
21
22Q_LOGGING_CATEGORY(lcQpaInputMethods, "qt.qpa.input.methods");
23
24using namespace QtAndroid;
25
26Q_DECLARE_JNI_CLASS(QtLayout, "org/qtproject/qt/android/QtLayout")
27
29{
30 static bool m_ignoreMouseEvents = false;
31 static Qt::MouseButtons m_buttons = Qt::NoButton;
32
34
35 static QList<QWindowSystemInterface::TouchPoint> m_touchPoints;
36
37 static QPointer<QWindow> m_mouseGrabber;
38
39 GenericMotionEventListener::~GenericMotionEventListener() {}
40 namespace {
41 struct GenericMotionEventListeners {
43 QList<QtAndroidInput::GenericMotionEventListener *> listeners;
44 };
45 }
46 Q_GLOBAL_STATIC(GenericMotionEventListeners, g_genericMotionEventListeners)
47
48 static jboolean dispatchGenericMotionEvent(JNIEnv *, jclass, jobject event)
49 {
50 jboolean ret = JNI_FALSE;
51 QMutexLocker locker(&g_genericMotionEventListeners()->mutex);
52 for (auto *listener : std::as_const(g_genericMotionEventListeners()->listeners))
53 ret |= listener->handleGenericMotionEvent(event);
54 return ret;
55 }
56
57 KeyEventListener::~KeyEventListener() {}
58 namespace {
59 struct KeyEventListeners {
61 QList<QtAndroidInput::KeyEventListener *> listeners;
62 };
63 }
64 Q_GLOBAL_STATIC(KeyEventListeners, g_keyEventListeners)
65
66 static jboolean dispatchKeyEvent(JNIEnv *, jclass, jobject event)
67 {
68 jboolean ret = JNI_FALSE;
69 QMutexLocker locker(&g_keyEventListeners()->mutex);
70 for (auto *listener : std::as_const(g_keyEventListeners()->listeners))
71 ret |= listener->handleKeyEvent(event);
72 return ret;
73 }
74
76 {
77 QMutexLocker locker(&g_genericMotionEventListeners()->mutex);
78 g_genericMotionEventListeners()->listeners.push_back(listener);
79 }
80
82 {
83 QMutexLocker locker(&g_genericMotionEventListeners()->mutex);
84 g_genericMotionEventListeners()->listeners.removeOne(listener);
85 }
86
88 {
89 QMutexLocker locker(&g_keyEventListeners()->mutex);
90 g_keyEventListeners()->listeners.push_back(listener);
91 }
92
94 {
95 QMutexLocker locker(&g_keyEventListeners()->mutex);
96 g_keyEventListeners()->listeners.removeOne(listener);
97 }
98
100 {
101 return qtActivityDelegate().callMethod<QtJniTypes::QtLayout>("getQtLayout");
102 }
103
104 void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd)
105 {
106 qCDebug(lcQpaInputMethods) << ">>> UPDATESELECTION" << selStart << selEnd << candidatesStart << candidatesEnd;
107 qtInputDelegate().callMethod<void>("updateSelection",
108 selStart,
109 selEnd,
110 candidatesStart,
111 candidatesEnd);
112 }
113
114 void showSoftwareKeyboard(int left, int top, int width, int height, int inputHints, int enterKeyType)
115 {
116 qtInputDelegate().callMethod<void>("showSoftwareKeyboard",
118 qtLayout().object<QtJniTypes::QtLayout>(),
119 left,
120 top,
121 width,
122 height,
123 inputHints,
124 enterKeyType);
125 qCDebug(lcQpaInputMethods) << "@@@ SHOWSOFTWAREKEYBOARD" << left << top << width << height << inputHints << enterKeyType;
126 }
127
129 {
130 qtInputDelegate().callMethod<void>("resetSoftwareKeyboard");
131 qCDebug(lcQpaInputMethods) << "@@@ RESETSOFTWAREKEYBOARD";
132 }
133
135 {
136 qtInputDelegate().callMethod<void>("hideSoftwareKeyboard");
137 qCDebug(lcQpaInputMethods) << "@@@ HIDESOFTWAREKEYBOARD";
138 }
139
141 {
142 return qtInputDelegate().callMethod<jboolean>("isSoftwareKeyboardVisible");
143 }
144
149
151 {
152 return qtInputDelegate().callMethod<jint>("getSelectHandleWidth");
153 }
154
155 void updateHandles(int mode, QPoint editMenuPos, uint32_t editButtons, QPoint cursor, QPoint anchor, bool rtl)
156 {
157 qtInputDelegate().callMethod<void>("updateHandles",
159 qtLayout().object<QtJniTypes::QtLayout>(),
160 mode, editMenuPos.x(), editMenuPos.y(), editButtons,
161 cursor.x(), cursor.y(),
162 anchor.x(), anchor.y(), rtl);
163 }
164
165 // from https://developer.android.com/reference/android/view/MotionEvent#getButtonState()
167 BUTTON_PRIMARY = 0x00000001,
168 BUTTON_SECONDARY = 0x00000002,
169 BUTTON_TERTIARY = 0x00000004,
170 BUTTON_BACK = 0x00000008,
171 BUTTON_FORWARD = 0x00000010,
174 };
175 Q_DECLARE_FLAGS(AndroidMouseButtons, AndroidMouseButton)
176
177 static Qt::MouseButtons toMouseButtons(jint j_buttons)
178 {
179 const auto buttons = static_cast<AndroidMouseButtons>(j_buttons);
180 Qt::MouseButtons mouseButtons;
181 if (buttons.testFlag(BUTTON_PRIMARY))
182 mouseButtons.setFlag(Qt::LeftButton);
183
184 if (buttons.testFlag(BUTTON_SECONDARY))
185 mouseButtons.setFlag(Qt::RightButton);
186
187 if (buttons.testFlag(BUTTON_TERTIARY))
188 mouseButtons.setFlag(Qt::MiddleButton);
189
190 if (buttons.testFlag(BUTTON_BACK))
191 mouseButtons.setFlag(Qt::BackButton);
192
193 if (buttons.testFlag(BUTTON_FORWARD))
194 mouseButtons.setFlag(Qt::ForwardButton);
195
196 if (buttons.testFlag(BUTTON_STYLUS_PRIMARY))
197 mouseButtons.setFlag(Qt::LeftButton);
198
199 if (buttons.testFlag(BUTTON_STYLUS_SECONDARY))
200 mouseButtons.setFlag(Qt::RightButton);
201
202 // Fall back to left button
203 if (Q_UNLIKELY(buttons != 0 && mouseButtons == Qt::NoButton)) {
204 qWarning() << "Unhandled button value:" << buttons << "Falling back to Qt::LeftButton";
205 mouseButtons = Qt::LeftButton;
206 }
207 return mouseButtons;
208 }
209
210 static void sendMouseButtonEvents(QWindow *topLevel, QPoint localPos, QPoint globalPos,
211 jint mouseButtonState, QEvent::Type type)
212 {
213 const Qt::MouseButtons mouseButtons = toMouseButtons(mouseButtonState);
214 const Qt::MouseButtons changedButtons = mouseButtons & ~m_buttons;
215
216 if (changedButtons == Qt::NoButton)
217 return;
218
219 static_assert (sizeof(changedButtons) <= sizeof(uint), "Qt::MouseButtons size changed. Adapt code.");
220
221 for (uint buttonInt = 0x1; static_cast<uint>(changedButtons) >= buttonInt; buttonInt <<= 1) {
222 const auto button = static_cast<Qt::MouseButton>(buttonInt);
223 if (changedButtons.testFlag(button)) {
224 QWindowSystemInterface::handleMouseEvent(topLevel, localPos, globalPos,
225 mouseButtons, button, type);
226 }
227 }
228 }
229
230 static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint winId, jint x, jint y, jint mouseButtonState)
231 {
233 return;
234
235 const QPoint globalPos(x,y);
236 QWindow *window = windowFromId(winId);
238 const QPoint localPos = window && window->handle() ?
239 window->handle()->mapFromGlobal(globalPos) : globalPos;
240 sendMouseButtonEvents(window, localPos, globalPos, mouseButtonState, QEvent::MouseButtonPress);
241 }
242
243 static void mouseUp(JNIEnv */*env*/, jobject /*thiz*/, jint winId, jint x, jint y, jint mouseButtonState)
244 {
245 const QPoint globalPos(x,y);
246 QWindow *window = m_mouseGrabber.data();
247 if (!window)
248 window = windowFromId(winId);
249
250 const QPoint localPos = window && window->handle() ?
251 window->handle()->mapFromGlobal(globalPos) : globalPos;
252
253 sendMouseButtonEvents(window, localPos, globalPos, mouseButtonState, QEvent::MouseButtonRelease);
254 m_ignoreMouseEvents = false;
255 m_mouseGrabber.clear();
256 }
257
258 static void mouseMove(JNIEnv */*env*/, jobject /*thiz*/, jint winId, jint x, jint y)
259 {
260
262 return;
263
264 const QPoint globalPos(x,y);
265 QWindow *window = m_mouseGrabber.data();
266 if (!window)
267 window = windowFromId(winId);
268 const QPoint localPos = window && window->handle() ?
269 window->handle()->mapFromGlobal(globalPos) : globalPos;
271 Qt::MouseButtons(m_mouseGrabber ? Qt::LeftButton : Qt::NoButton),
273 }
274
275 static void mouseWheel(JNIEnv */*env*/, jobject /*thiz*/, jint winId, jint x, jint y, jfloat hdelta, jfloat vdelta)
276 {
278 return;
279
280 const QPoint globalPos(x,y);
281 QWindow *window = m_mouseGrabber.data();
282 if (!window)
283 window = windowFromId(winId);
284 const QPoint localPos = window && window->handle() ?
285 window->handle()->mapFromGlobal(globalPos) : globalPos;
286 const QPoint angleDelta(hdelta * 120, vdelta * 120);
287
289 localPos,
290 globalPos,
291 QPoint(),
292 angleDelta);
293 }
294
295 static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint winId, jint x, jint y)
296 {
298 if (inputContext && qGuiApp)
299 QMetaObject::invokeMethod(inputContext, "longPress", Q_ARG(int, x), Q_ARG(int, y));
300
301 //### TODO: add proper API for Qt 5.2
302 static bool rightMouseFromLongPress = qEnvironmentVariableIntValue("QT_ANDROID_ENABLE_RIGHT_MOUSE_FROM_LONG_PRESS");
303 if (!rightMouseFromLongPress)
304 return;
305 m_ignoreMouseEvents = true;
306 const QPoint globalPos(x,y);
307 QWindow *window = windowFromId(winId);
308 const QPoint localPos = window && window->handle() ?
309 window->handle()->mapFromGlobal(globalPos) : globalPos;
310
311 // Click right button if no other button is already pressed.
312 if (!m_mouseGrabber) {
314 Qt::MouseButtons(Qt::RightButton), Qt::RightButton,
317 Qt::MouseButtons(Qt::NoButton), Qt::RightButton,
319 }
320 }
321
322 static void touchBegin(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/)
323 {
324 m_touchPoints.clear();
325 }
326
327 static void touchAdd(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint id, jint action, jboolean /*primary*/, jint x, jint y,
328 jfloat major, jfloat minor, jfloat rotation, jfloat pressure)
329 {
331 switch (action) {
332 case 0:
334 break;
335 case 1:
337 break;
338 case 2:
340 break;
341 case 3:
343 break;
344 }
345
346 const int dw = availableWidthPixels();
347 const int dh = availableHeightPixels();
349 touchPoint.id = id;
350 touchPoint.pressure = pressure;
351 touchPoint.rotation = qRadiansToDegrees(rotation);
352 touchPoint.normalPosition = QPointF(double(x / dw), double(y / dh));
353 touchPoint.state = state;
354 touchPoint.area = QRectF(x - double(minor * 0.5f),
355 y - double(major * 0.5f),
356 double(minor),
357 double(major));
358 m_touchPoints.push_back(touchPoint);
361 if (inputContext && qGuiApp)
362 QMetaObject::invokeMethod(inputContext, "touchDown", Q_ARG(int, x), Q_ARG(int, y));
363 }
364 }
365
367 {
369 if (!platformIntegration)
370 return nullptr;
371
372 QPointingDevice *touchDevice = platformIntegration->touchDevice();
373 if (!touchDevice) {
374 touchDevice = new QPointingDevice("Android touchscreen", 1,
381 10, 0);
383 platformIntegration->setTouchDevice(touchDevice);
384 }
385
386 return touchDevice;
387 }
388
389 static void touchEnd(JNIEnv * /*env*/, jobject /*thiz*/, jint winId, jint /*action*/)
390 {
391 if (m_touchPoints.isEmpty())
392 return;
393
395 const QPointingDevice *touchDevice = getTouchDevice();
396 if (!touchDevice)
397 return;
398
400 if (!window)
401 return;
403 }
404
405 static void touchCancel(JNIEnv * /*env*/, jobject /*thiz*/, jint winId)
406 {
407 if (m_touchPoints.isEmpty())
408 return;
409
411 const QPointingDevice *touchDevice = getTouchDevice();
412 if (!touchDevice)
413 return;
414
416 if (!window)
417 return;
419 }
420
421 static bool isTabletEventSupported(JNIEnv */*env*/, jobject /*thiz*/)
422 {
423#if QT_CONFIG(tabletevent)
424 return true;
425#else
426 return false;
427#endif // QT_CONFIG(tabletevent)
428 }
429
430 static void tabletEvent(JNIEnv */*env*/, jobject /*thiz*/, jint winId, jint deviceId, jlong time, jint action,
431 jint pointerType, jint buttonState, jfloat x, jfloat y, jfloat pressure)
432 {
433#if QT_CONFIG(tabletevent)
434 const QPointF globalPosF(x, y);
435 QWindow *window = windowFromId(winId);
436 const QPointF localPos = window && window->handle() ?
437 window->handle()->mapFromGlobalF(globalPosF) : globalPosF;
438
439 // Galaxy Note with plain Android:
440 // 0 1 0 stylus press
441 // 2 1 0 stylus drag
442 // 1 1 0 stylus release
443 // 0 1 2 stylus press with side-button held
444 // 2 1 2 stylus drag with side-button held
445 // 1 1 2 stylus release with side-button held
446 // Galaxy Note 4 with Samsung firmware:
447 // 0 1 0 stylus press
448 // 2 1 0 stylus drag
449 // 1 1 0 stylus release
450 // 211 1 2 stylus press with side-button held
451 // 213 1 2 stylus drag with side-button held
452 // 212 1 2 stylus release with side-button held
453 // when action == ACTION_UP (1) it's a release; otherwise we say which button is pressed
454 Qt::MouseButtons buttons = Qt::NoButton;
455 switch (action) {
456 case 1: // ACTION_UP
457 case 6: // ACTION_POINTER_UP, happens if stylus is not the primary pointer
458 case 212: // stylus release while side-button held on Galaxy Note 4
459 buttons = Qt::NoButton;
460 break;
461 default: // action is press or drag
462 if (buttonState == 0)
463 buttons = Qt::LeftButton;
464 else // 2 means RightButton
465 buttons = Qt::MouseButtons(buttonState);
466 break;
467 }
468
469 qCDebug(lcQpaInputMethods) << action << pointerType << buttonState << '@' << x << y << "pressure" << pressure << ": buttons" << buttons;
470
472 localPos, globalPosF, int(QInputDevice::DeviceType::Stylus), pointerType,
473 buttons, pressure, 0, 0, 0., 0., 0, deviceId, Qt::NoModifier);
474#endif // QT_CONFIG(tabletevent)
475 }
476
478 {
479 // 0--9 0x00000007 -- 0x00000010
480 if (key >= 0x00000007 && key <= 0x00000010)
481 return QKeyCombination::fromCombined(Qt::Key_0 + key - 0x00000007);
482
483 // A--Z 0x0000001d -- 0x00000036
484 if (key >= 0x0000001d && key <= 0x00000036)
485 return QKeyCombination::fromCombined(Qt::Key_A + key - 0x0000001d);
486
487 // F1--F12 0x00000083 -- 0x0000008e
488 if (key >= 0x00000083 && key <= 0x0000008e)
489 return QKeyCombination::fromCombined(Qt::Key_F1 + key - 0x00000083);
490
491 // NUMPAD_0--NUMPAD_9 0x00000090 -- 0x00000099
492 if (key >= 0x00000090 && key <= 0x00000099)
494
495 // BUTTON_1--KEYCODE_BUTTON_16 0x000000bc -- 0x000000cb
496
497 switch (key) {
498 case 0x00000000: // KEYCODE_UNKNOWN
499 return Qt::Key_unknown;
500
501 case 0x00000001: // KEYCODE_SOFT_LEFT
502 return Qt::Key_Left;
503
504 case 0x00000002: // KEYCODE_SOFT_RIGHT
505 return Qt::Key_Right;
506
507 // 0x00000003: // KEYCODE_HOME is never delivered to applications.
508
509 case 0x00000004: // KEYCODE_BACK
510 return Qt::Key_Back;
511
512 case 0x00000005: // KEYCODE_CALL
513 return Qt::Key_Call;
514
515 case 0x00000006: // KEYCODE_ENDCALL
516 return Qt::Key_Hangup;
517
518 // 0--9 0x00000007 -- 0x00000010
519
520 case 0x00000011: // KEYCODE_STAR
521 return Qt::Key_Asterisk;
522
523 case 0x00000012: // KEYCODE_POUND
524 return Qt::Key_NumberSign;
525
526 case 0x00000013: //KEYCODE_DPAD_UP
527 return Qt::Key_Up;
528
529 case 0x00000014: // KEYCODE_DPAD_DOWN
530 return Qt::Key_Down;
531
532 case 0x00000015: //KEYCODE_DPAD_LEFT
533 return Qt::Key_Left;
534
535 case 0x00000016: //KEYCODE_DPAD_RIGHT
536 return Qt::Key_Right;
537
538 case 0x00000017: // KEYCODE_DPAD_CENTER
539 return Qt::Key_Enter;
540
541 case 0x00000018: // KEYCODE_VOLUME_UP
542 return Qt::Key_VolumeUp;
543
544 case 0x00000019: // KEYCODE_VOLUME_DOWN
545 return Qt::Key_VolumeDown;
546
547 case 0x0000001a:
548 return Qt::Key_PowerOff;
549
550 case 0x0000001b: // KEYCODE_CAMERA
551 return Qt::Key_Camera;
552
553 case 0x0000001c: // KEYCODE_CLEAR
554 return Qt::Key_Clear;
555
556 // A--Z 0x0000001d -- 0x00000036
557
558 case 0x00000037: // KEYCODE_COMMA
559 return Qt::Key_Comma;
560
561 case 0x00000038: // KEYCODE_PERIOD
562 return Qt::Key_Period;
563
564 case 0x00000039: // KEYCODE_ALT_LEFT
565 case 0x0000003a: // KEYCODE_ALT_RIGHT
566 return Qt::Key_Alt;
567
568 case 0x0000003b: // KEYCODE_SHIFT_LEFT
569 case 0x0000003c: // KEYCODE_SHIFT_RIGHT
570 return Qt::Key_Shift;
571
572 case 0x0000003d: // KEYCODE_TAB
573 return Qt::Key_Tab;
574
575 case 0x0000003e: // KEYCODE_SPACE
576 return Qt::Key_Space;
577
578 case 0x0000003f: // KEYCODE_SYM
579 return Qt::Key_Meta;
580
581 case 0x00000040: // KEYCODE_EXPLORER
582 return Qt::Key_Explorer;
583
584 case 0x00000041: //KEYCODE_ENVELOPE
585 return Qt::Key_LaunchMail;
586
587 case 0x00000042: // KEYCODE_ENTER
588 return Qt::Key_Return;
589
590 case 0x00000043: // KEYCODE_DEL
591 return Qt::Key_Backspace;
592
593 case 0x00000044: // KEYCODE_GRAVE
594 return Qt::Key_QuoteLeft;
595
596 case 0x00000045: // KEYCODE_MINUS
597 return Qt::Key_Minus;
598
599 case 0x00000046: // KEYCODE_EQUALS
600 return Qt::Key_Equal;
601
602 case 0x00000047: // KEYCODE_LEFT_BRACKET
603 return Qt::Key_BracketLeft;
604
605 case 0x00000048: // KEYCODE_RIGHT_BRACKET
607
608 case 0x00000049: // KEYCODE_BACKSLASH
609 return Qt::Key_Backslash;
610
611 case 0x0000004a: // KEYCODE_SEMICOLON
612 return Qt::Key_Semicolon;
613
614 case 0x0000004b: // KEYCODE_APOSTROPHE
615 return Qt::Key_Apostrophe;
616
617 case 0x0000004c: // KEYCODE_SLASH
618 return Qt::Key_Slash;
619
620 case 0x0000004d: // KEYCODE_AT
621 return Qt::Key_At;
622
623 case 0x0000004e: // KEYCODE_NUM
624 return Qt::Key_Alt;
625
626 case 0x0000004f: // KEYCODE_HEADSETHOOK
628
629 case 0x00000050: // KEYCODE_FOCUS
630 return Qt::Key_CameraFocus;
631
632 case 0x00000051: // KEYCODE_PLUS
633 return Qt::Key_Plus;
634
635 case 0x00000052: // KEYCODE_MENU
636 return Qt::Key_Menu;
637
638 case 0x00000053: // KEYCODE_NOTIFICATION
640
641 case 0x00000054: // KEYCODE_SEARCH
642 return Qt::Key_Search;
643
644 case 0x00000055: // KEYCODE_MEDIA_PLAY_PAUSE
646
647 case 0x00000056: // KEYCODE_MEDIA_STOP
648 return Qt::Key_MediaStop;
649
650 case 0x00000057: // KEYCODE_MEDIA_NEXT
651 return Qt::Key_MediaNext;
652
653 case 0x00000058: // KEYCODE_MEDIA_PREVIOUS
655
656 case 0x00000059: // KEYCODE_MEDIA_REWIND
657 return Qt::Key_AudioRewind;
658
659 case 0x0000005a: // KEYCODE_MEDIA_FAST_FORWARD
661
662 case 0x0000005b: // KEYCODE_MUTE
663 return Qt::Key_MicMute;
664
665 case 0x0000005c: // KEYCODE_PAGE_UP
666 return Qt::Key_PageUp;
667
668 case 0x0000005d: // KEYCODE_PAGE_DOWN
669 return Qt::Key_PageDown;
670
671 case 0x0000005e: // KEYCODE_PICTSYMBOLS
673
674 case 0x00000060: // KEYCODE_BUTTON_A
675 case 0x00000061: // KEYCODE_BUTTON_B
676 case 0x00000062: // KEYCODE_BUTTON_B
677 case 0x00000063: // KEYCODE_BUTTON_X
678 case 0x00000064: // KEYCODE_BUTTON_Y
679 case 0x00000065: // KEYCODE_BUTTON_Z
680 case 0x00000066: // KEYCODE_BUTTON_L1
681 case 0x00000067: // KEYCODE_BUTTON_R1
682 case 0x00000068: // KEYCODE_BUTTON_L2
683 case 0x00000069: // KEYCODE_BUTTON_R2
684 case 0x0000006a: // KEYCODE_BUTTON_THUMBL
685 case 0x0000006b: // KEYCODE_BUTTON_THUMBR
686 case 0x0000006c: // KEYCODE_BUTTON_START
687 case 0x0000006d: // KEYCODE_BUTTON_SELECT
688 case 0x0000006e: // KEYCODE_BUTTON_MODE
690
691 case 0x0000006f: // KEYCODE_ESCAPE
692 return Qt::Key_Escape;
693
694 case 0x00000070: // KEYCODE_FORWARD_DEL
695 return Qt::Key_Delete;
696
697 case 0x00000071: // KEYCODE_CTRL_LEFT
698 case 0x00000072: // KEYCODE_CTRL_RIGHT
699 return Qt::Key_Control;
700
701 case 0x00000073: // KEYCODE_CAPS_LOCK
702 return Qt::Key_CapsLock;
703
704 case 0x00000074: // KEYCODE_SCROLL_LOCK
705 return Qt::Key_ScrollLock;
706
707 case 0x00000075: // KEYCODE_META_LEFT
708 case 0x00000076: // KEYCODE_META_RIGHT
709 return Qt::Key_Meta;
710
711 case 0x00000077: // KEYCODE_FUNCTION
713
714 case 0x00000078: // KEYCODE_SYSRQ
715 return Qt::Key_Print;
716
717 case 0x00000079: // KEYCODE_BREAK
718 return Qt::Key_Pause;
719
720 case 0x0000007a: // KEYCODE_MOVE_HOME
721 return Qt::Key_Home;
722
723 case 0x0000007b: // KEYCODE_MOVE_END
724 return Qt::Key_End;
725
726 case 0x0000007c: // KEYCODE_MOVE_INSERT
727 return Qt::Key_Insert;
728
729 case 0x0000007d: // KEYCODE_FORWARD
730 return Qt::Key_Forward;
731
732 case 0x0000007e: // KEYCODE_MEDIA_PLAY
733 return Qt::Key_MediaPlay;
734
735 case 0x0000007f: // KEYCODE_MEDIA_PAUSE
736 return Qt::Key_MediaPause;
737
738 case 0x00000080: // KEYCODE_MEDIA_CLOSE
739 case 0x00000081: // KEYCODE_MEDIA_EJECT
740 return Qt::Key_Eject;
741
742 case 0x00000082: // KEYCODE_MEDIA_RECORD
743 return Qt::Key_MediaRecord;
744
745 // F1--F12 0x00000083 -- 0x0000008e
746
747 case 0x0000008f: // KEYCODE_NUM_LOCK
748 return Qt::Key_NumLock;
749
750 // NUMPAD_0--NUMPAD_9 0x00000090 -- 0x00000099
751
752 case 0x0000009a: // KEYCODE_NUMPAD_DIVIDE
754
755 case 0x0000009b: // KEYCODE_NUMPAD_MULTIPLY
757
758 case 0x0000009c: // KEYCODE_NUMPAD_SUBTRACT
760
761 case 0x0000009d: // KEYCODE_NUMPAD_ADD
763
764 case 0x0000009e: // KEYCODE_NUMPAD_DOT
766
767 case 0x0000009f: // KEYCODE_NUMPAD_COMMA
769
770 case 0x000000a0: // KEYCODE_NUMPAD_ENTER
771 return Qt::Key_Enter;
772
773 case 0x000000a1: // KEYCODE_NUMPAD_EQUALS
775
776 case 0x000000a2: // KEYCODE_NUMPAD_LEFT_PAREN
777 return Qt::Key_ParenLeft;
778
779 case 0x000000a3: // KEYCODE_NUMPAD_RIGHT_PAREN
780 return Qt::Key_ParenRight;
781
782 case 0x000000a4: // KEYCODE_VOLUME_MUTE
783 return Qt::Key_VolumeMute;
784
785 case 0x000000a5: // KEYCODE_INFO
786 return Qt::Key_Info;
787
788 case 0x000000a6: // KEYCODE_CHANNEL_UP
789 return Qt::Key_ChannelUp;
790
791 case 0x000000a7: // KEYCODE_CHANNEL_DOWN
792 return Qt::Key_ChannelDown;
793
794 case 0x000000a8: // KEYCODE_ZOOM_IN
795 return Qt::Key_ZoomIn;
796
797 case 0x000000a9: // KEYCODE_ZOOM_OUT
798 return Qt::Key_ZoomOut;
799
800 case 0x000000aa: // KEYCODE_TV
801 case 0x000000ab: // KEYCODE_WINDOW
803
804 case 0x000000ac: // KEYCODE_GUIDE
805 return Qt::Key_Guide;
806
807 case 0x000000ad: // KEYCODE_DVR
809
810 case 0x000000ae: // KEYCODE_BOOKMARK
811 return Qt::Key_AddFavorite;
812
813 case 0x000000af: // KEYCODE_CAPTIONS
814 return Qt::Key_Subtitle;
815
816 case 0x000000b0: // KEYCODE_SETTINGS
817 return Qt::Key_Settings;
818
819 case 0x000000b1: // KEYCODE_TV_POWER
820 case 0x000000b2: // KEYCODE_TV_INPUT
821 case 0x000000b3: // KEYCODE_STB_POWER
822 case 0x000000b4: // KEYCODE_STB_INPUT
823 case 0x000000b5: // KEYCODE_AVR_POWER
824 case 0x000000b6: // KEYCODE_AVR_INPUT
826
827 case 0x000000b7: // KEYCODE_PROG_RED
828 return Qt::Key_Red;
829
830 case 0x000000b8: // KEYCODE_PROG_GREEN
831 return Qt::Key_Green;
832
833 case 0x000000b9: // KEYCODE_PROG_YELLOW
834 return Qt::Key_Yellow;
835
836 case 0x000000ba: // KEYCODE_PROG_BLUE
837 return Qt::Key_Blue;
838
839 // 0x000000bb: // KEYCODE_APP_SWITCH is not sent by the Android O.S.
840
841 // BUTTON_1--KEYCODE_BUTTON_16 0x000000bc -- 0x000000cb
842
843 case 0x000000cc: // KEYCODE_LANGUAGE_SWITCH
844 case 0x000000cd: // KEYCODE_MANNER_MODE do we need such a thing?
845 case 0x000000ce: // KEYCODE_3D_MODE
846 case 0x000000cf: // KEYCODE_CONTACTS
848
849 case 0x000000d0: // KEYCODE_CALENDAR
850 return Qt::Key_Calendar;
851
852 case 0x000000d1: // KEYCODE_MUSIC
853 return Qt::Key_Music;
854
855 case 0x000000d2: // KEYCODE_CALCULATOR
856 return Qt::Key_Calculator;
857
858 // 0x000000d3 -- 0x000000da some japanese specific keys, someone who understand what is about should check !
859
860 // 0x000000db: // KEYCODE_ASSIST not delivered to applications.
861
862 case 0x000000dc: // KEYCODE_BRIGHTNESS_DOWN
864
865 case 0x000000dd: // KEYCODE_BRIGHTNESS_UP
867
868 case 0x000000de: // KEYCODE_MEDIA_AUDIO_TRACK
870
871 default:
872 qWarning() << "Unhandled key code " << key << '!';
874 }
875 }
876
877 static Qt::KeyboardModifiers mapAndroidModifiers(jint modifiers)
878 {
879 Qt::KeyboardModifiers qmodifiers;
880
881 if (modifiers & 0x00000001) // META_SHIFT_ON
882 qmodifiers |= Qt::ShiftModifier;
883
884 if (modifiers & 0x00000002) // META_ALT_ON
885 qmodifiers |= Qt::AltModifier;
886
887 if (modifiers & 0x00000004) // META_SYM_ON
888 qmodifiers |= Qt::MetaModifier;
889
890 if (modifiers & 0x00001000) // META_CTRL_ON
891 qmodifiers |= Qt::ControlModifier;
892
893 return qmodifiers;
894 }
895
896 // maps 0 to the empty string, and anything else to a single-character string
897 static inline QString toString(jint unicode)
898 {
899 return unicode ? QString(QChar(unicode)) : QString();
900 }
901
902 static void keyDown(JNIEnv */*env*/, jobject /*thiz*/, jint key, jint unicode, jint modifier, jboolean autoRepeat)
903 {
906 mapAndroidKey(key).toCombined(),
907 mapAndroidModifiers(modifier),
908 toString(unicode),
909 autoRepeat);
910 }
911
912 static void keyUp(JNIEnv */*env*/, jobject /*thiz*/, jint key, jint unicode, jint modifier, jboolean autoRepeat)
913 {
916 mapAndroidKey(key).toCombined(),
917 mapAndroidModifiers(modifier),
918 toString(unicode),
919 autoRepeat);
920 }
921
922 static void keyboardVisibilityChanged(JNIEnv */*env*/, jobject /*thiz*/, jboolean visibility)
923 {
924 if (!visibility)
926
928 if (inputContext && qGuiApp) {
929 inputContext->emitInputPanelVisibleChanged();
930 if (!visibility) {
931 inputContext->emitKeyboardRectChanged();
932 QMetaObject::invokeMethod(inputContext, "hideSelectionHandles", Qt::QueuedConnection);
933 }
934 }
935 qCDebug(lcQpaInputMethods) << "@@@ KEYBOARDVISIBILITYCHANGED" << inputContext;
936 }
937
938 static void keyboardGeometryChanged(JNIEnv */*env*/, jobject /*thiz*/, jint x, jint y, jint w, jint h)
939 {
940 QRect r = QRect(x, y, w, h);
942 return;
945 if (inputContext && qGuiApp)
946 inputContext->emitKeyboardRectChanged();
947
948 qCDebug(lcQpaInputMethods) << "@@@ KEYBOARDRECTCHANGED" << m_softwareKeyboardRect;
949 }
950
951 static void handleLocationChanged(JNIEnv */*env*/, jobject /*thiz*/, int id, int x, int y)
952 {
953 qCDebug(lcQpaInputMethods) << "@@@ handleLocationChanged" << id << x << y;
955 if (inputContext && qGuiApp)
956 QMetaObject::invokeMethod(inputContext, "handleLocationChanged", Qt::BlockingQueuedConnection,
957 Q_ARG(int, id), Q_ARG(int, x), Q_ARG(int, y));
958
959 }
960
961
962 static const JNINativeMethod methods[] = {
963 {"touchBegin","(I)V",(void*)touchBegin},
964 {"touchAdd","(IIIZIIFFFF)V",(void*)touchAdd},
965 {"touchEnd","(II)V",(void*)touchEnd},
966 {"touchCancel", "(I)V", (void *)touchCancel},
967 {"mouseDown", "(IIII)V", (void *)mouseDown},
968 {"mouseUp", "(IIII)V", (void *)mouseUp},
969 {"mouseMove", "(III)V", (void *)mouseMove},
970 {"mouseWheel", "(IIIFF)V", (void *)mouseWheel},
971 {"longPress", "(III)V", (void *)longPress},
972 {"isTabletEventSupported", "()Z", (void *)isTabletEventSupported},
973 {"tabletEvent", "(IIJIIIFFF)V", (void *)tabletEvent},
974 {"keyDown", "(IIIZ)V", (void *)keyDown},
975 {"keyUp", "(IIIZ)V", (void *)keyUp},
976 {"keyboardVisibilityChanged", "(Z)V", (void *)keyboardVisibilityChanged},
977 {"keyboardGeometryChanged", "(IIII)V", (void *)keyboardGeometryChanged},
978 {"handleLocationChanged", "(III)V", (void *)handleLocationChanged},
979 {"dispatchGenericMotionEvent", "(Landroid/view/MotionEvent;)Z", reinterpret_cast<void *>(dispatchGenericMotionEvent)},
980 {"dispatchKeyEvent", "(Landroid/view/KeyEvent;)Z", reinterpret_cast<void *>(dispatchKeyEvent)},
981 };
982
984 {
985 if (!env.registerNativeMethods(QtJniTypes::Traits<QtJniTypes::QtInputDelegate>::className(),
986 methods, sizeof(methods) / sizeof(methods[0]))) {
987 __android_log_print(ANDROID_LOG_FATAL,"Qt", "RegisterNatives failed");
988 return false;
989 }
990
991 return true;
992 }
993}
994
QList< QtAndroidInput::GenericMotionEventListener * > listeners
QMutex mutex
static JNINativeMethod methods[]
static QAndroidInputContext * androidInputContext()
void setTouchDevice(QPointingDevice *touchDevice)
\inmodule QtCore
State
Specifies the state of this event point.
Definition qeventpoint.h:48
Type
This enum type defines the valid event types in Qt.
Definition qcoreevent.h:51
@ KeyRelease
Definition qcoreevent.h:65
@ MouseMove
Definition qcoreevent.h:63
@ KeyPress
Definition qcoreevent.h:64
@ MouseButtonPress
Definition qcoreevent.h:60
@ MouseButtonRelease
Definition qcoreevent.h:61
\inmodule QtCore
\inmodule QtCore
static constexpr QKeyCombination fromCombined(int combined)
\inmodule QtCore
Definition qmutex.h:313
\inmodule QtCore
Definition qmutex.h:281
void emitInputPanelVisibleChanged()
Active QPlatformInputContext is responsible for providing visible property to QInputMethod.
void emitKeyboardRectChanged()
Active QPlatformInputContext is responsible for providing keyboardRectangle property to QInputMethod.
\inmodule QtCore\reentrant
Definition qpoint.h:217
\inmodule QtCore\reentrant
Definition qpoint.h:25
constexpr int x() const noexcept
Returns the x coordinate of this point.
Definition qpoint.h:130
constexpr int y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:135
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static bool handleTouchEvent(QWindow *window, const QPointingDevice *device, const QList< struct TouchPoint > &points, Qt::KeyboardModifiers mods=Qt::NoModifier)
static bool handleTabletEvent(QWindow *window, ulong timestamp, const QPointingDevice *device, const QPointF &local, const QPointF &global, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
static bool handleTouchCancelEvent(QWindow *window, const QPointingDevice *device, Qt::KeyboardModifiers mods=Qt::NoModifier)
static bool handleMouseEvent(QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
static void registerInputDevice(const QInputDevice *device)
static bool handleKeyEvent(QWindow *window, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
static bool handleWheelEvent(QWindow *window, const QPointF &local, const QPointF &global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::ScrollPhase phase=Qt::NoScrollPhase, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
\inmodule QtGui
Definition qwindow.h:63
EGLImageKHR int int EGLuint64KHR * modifiers
QPushButton * button
[2]
QCursor cursor
else opt state
[0]
static bool registerNatives()
Combined button and popup list for selecting options.
QJniObject qtLayout()
static void touchCancel(JNIEnv *, jobject, jint winId)
static void mouseWheel(JNIEnv *, jobject, jint winId, jint x, jint y, jfloat hdelta, jfloat vdelta)
void unregisterGenericMotionEventListener(QtAndroidInput::GenericMotionEventListener *listener)
static bool isTabletEventSupported(JNIEnv *, jobject)
void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd)
static void touchBegin(JNIEnv *, jobject, jint)
static void sendMouseButtonEvents(QWindow *topLevel, QPoint localPos, QPoint globalPos, jint mouseButtonState, QEvent::Type type)
static bool m_ignoreMouseEvents
static QKeyCombination mapAndroidKey(int key)
static QRect m_softwareKeyboardRect
void registerKeyEventListener(QtAndroidInput::KeyEventListener *listener)
static void mouseDown(JNIEnv *, jobject, jint winId, jint x, jint y, jint mouseButtonState)
static void mouseMove(JNIEnv *, jobject, jint winId, jint x, jint y)
static void keyUp(JNIEnv *, jobject, jint key, jint unicode, jint modifier, jboolean autoRepeat)
static jboolean dispatchKeyEvent(JNIEnv *, jclass, jobject event)
void showSoftwareKeyboard(int left, int top, int width, int height, int inputHints, int enterKeyType)
static QPointingDevice * getTouchDevice()
static Qt::KeyboardModifiers mapAndroidModifiers(jint modifiers)
void unregisterKeyEventListener(QtAndroidInput::KeyEventListener *listener)
bool isSoftwareKeyboardVisible()
static void touchAdd(JNIEnv *, jobject, jint, jint id, jint action, jboolean, jint x, jint y, jfloat major, jfloat minor, jfloat rotation, jfloat pressure)
static QList< QWindowSystemInterface::TouchPoint > m_touchPoints
static QPointer< QWindow > m_mouseGrabber
static void keyboardGeometryChanged(JNIEnv *, jobject, jint x, jint y, jint w, jint h)
static void keyboardVisibilityChanged(JNIEnv *, jobject, jboolean visibility)
static void tabletEvent(JNIEnv *, jobject, jint winId, jint deviceId, jlong time, jint action, jint pointerType, jint buttonState, jfloat x, jfloat y, jfloat pressure)
static void keyDown(JNIEnv *, jobject, jint key, jint unicode, jint modifier, jboolean autoRepeat)
void updateHandles(int mode, QPoint editMenuPos, uint32_t editButtons, QPoint cursor, QPoint anchor, bool rtl)
static void handleLocationChanged(JNIEnv *, jobject, int id, int x, int y)
void registerGenericMotionEventListener(QtAndroidInput::GenericMotionEventListener *listener)
static void longPress(JNIEnv *, jobject, jint winId, jint x, jint y)
static Qt::MouseButtons toMouseButtons(jint j_buttons)
static void mouseUp(JNIEnv *, jobject, jint winId, jint x, jint y, jint mouseButtonState)
static jboolean dispatchGenericMotionEvent(JNIEnv *, jclass, jobject event)
static void touchEnd(JNIEnv *, jobject, jint winId, jint)
Q_CORE_EXPORT QtJniTypes::Activity activity()
QBasicMutex * platformInterfaceMutex()
QtJniTypes::QtActivityDelegateBase qtActivityDelegate()
QAndroidPlatformIntegration * androidPlatformIntegration()
QtJniTypes::QtInputDelegate qtInputDelegate()
int availableWidthPixels()
QWindow * windowFromId(int windowId)
int availableHeightPixels()
Definition qcompare.h:63
MouseButton
Definition qnamespace.h:56
@ LeftButton
Definition qnamespace.h:58
@ BackButton
Definition qnamespace.h:61
@ RightButton
Definition qnamespace.h:59
@ MiddleButton
Definition qnamespace.h:60
@ ForwardButton
Definition qnamespace.h:64
@ NoButton
Definition qnamespace.h:57
@ Key_Escape
Definition qnamespace.h:663
@ Key_MediaPrevious
Definition qnamespace.h:860
@ Key_Tab
Definition qnamespace.h:664
@ Key_ZoomIn
Definition qnamespace.h:956
@ Key_LaunchMail
Definition qnamespace.h:870
@ Key_ZoomOut
Definition qnamespace.h:957
@ Key_ParenRight
Definition qnamespace.h:523
@ Key_Yellow
Definition qnamespace.h:993
@ Key_Plus
Definition qnamespace.h:525
@ Key_Shift
Definition qnamespace.h:683
@ Key_Return
Definition qnamespace.h:667
@ Key_KeyboardBrightnessUp
Definition qnamespace.h:891
@ Key_QuoteLeft
Definition qnamespace.h:578
@ Key_Right
Definition qnamespace.h:679
@ Key_Enter
Definition qnamespace.h:668
@ Key_PageUp
Definition qnamespace.h:681
@ Key_Space
Definition qnamespace.h:513
@ Key_ChannelDown
Definition qnamespace.h:997
@ Key_MediaTogglePlayPause
Definition qnamespace.h:864
@ Key_Hangup
@ Key_Music
Definition qnamespace.h:963
@ Key_At
Definition qnamespace.h:546
@ Key_PowerOff
Definition qnamespace.h:893
@ Key_Backspace
Definition qnamespace.h:666
@ Key_VolumeUp
Definition qnamespace.h:852
@ Key_VolumeDown
Definition qnamespace.h:850
@ Key_Insert
Definition qnamespace.h:669
@ Key_BracketRight
Definition qnamespace.h:575
@ Key_Guide
Definition qnamespace.h:999
@ Key_Subtitle
Definition qnamespace.h:971
@ Key_Left
Definition qnamespace.h:677
@ Key_BracketLeft
Definition qnamespace.h:573
@ Key_A
Definition qnamespace.h:547
@ Key_NumberSign
Definition qnamespace.h:517
@ Key_0
Definition qnamespace.h:530
@ Key_Control
Definition qnamespace.h:684
@ Key_AddFavorite
Definition qnamespace.h:902
@ Key_AudioRewind
Definition qnamespace.h:907
@ Key_Alt
Definition qnamespace.h:686
@ Key_VolumeMute
Definition qnamespace.h:851
@ Key_Equal
Definition qnamespace.h:543
@ Key_ChannelUp
Definition qnamespace.h:996
@ Key_Print
Definition qnamespace.h:672
@ Key_Pause
Definition qnamespace.h:671
@ Key_AudioCycleTrack
Definition qnamespace.h:972
@ Key_Calendar
Definition qnamespace.h:938
@ Key_Up
Definition qnamespace.h:678
@ Key_Minus
Definition qnamespace.h:527
@ Key_Info
@ Key_CameraFocus
@ Key_Down
Definition qnamespace.h:680
@ Key_ParenLeft
Definition qnamespace.h:522
@ Key_Red
Definition qnamespace.h:991
@ Key_MediaPause
Definition qnamespace.h:863
@ Key_Delete
Definition qnamespace.h:670
@ Key_NumLock
Definition qnamespace.h:688
@ Key_Meta
Definition qnamespace.h:685
@ Key_Backslash
Definition qnamespace.h:574
@ Key_Forward
Definition qnamespace.h:847
@ Key_Settings
@ Key_ScrollLock
Definition qnamespace.h:689
@ Key_Eject
Definition qnamespace.h:895
@ Key_MediaRecord
Definition qnamespace.h:862
@ Key_F1
Definition qnamespace.h:690
@ Key_Semicolon
Definition qnamespace.h:541
@ Key_Green
Definition qnamespace.h:992
@ Key_Calculator
Definition qnamespace.h:913
@ Key_Slash
Definition qnamespace.h:529
@ Key_Period
Definition qnamespace.h:528
@ Key_Menu
Definition qnamespace.h:727
@ Key_PageDown
Definition qnamespace.h:682
@ Key_Back
Definition qnamespace.h:846
@ Key_Home
Definition qnamespace.h:675
@ Key_KeyboardBrightnessDown
Definition qnamespace.h:892
@ Key_Camera
@ Key_Clear
Definition qnamespace.h:674
@ Key_Comma
Definition qnamespace.h:526
@ Key_MediaStop
Definition qnamespace.h:859
@ Key_Call
@ Key_CapsLock
Definition qnamespace.h:687
@ Key_MicMute
Definition qnamespace.h:989
@ Key_MediaPlay
Definition qnamespace.h:858
@ Key_Search
Definition qnamespace.h:867
@ Key_Asterisk
Definition qnamespace.h:524
@ Key_Blue
Definition qnamespace.h:994
@ Key_Apostrophe
Definition qnamespace.h:521
@ Key_unknown
@ Key_Explorer
Definition qnamespace.h:923
@ Key_AudioForward
Definition qnamespace.h:968
@ Key_MediaNext
Definition qnamespace.h:861
@ Key_End
Definition qnamespace.h:676
@ ShiftModifier
@ ControlModifier
@ MetaModifier
@ KeypadModifier
@ NoModifier
@ AltModifier
@ BlockingQueuedConnection
@ QueuedConnection
#define Q_UNLIKELY(x)
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
#define qGuiApp
#define qWarning
Definition qlogging.h:166
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
return ret
constexpr float qRadiansToDegrees(float radians)
Definition qmath.h:281
Qt::MouseButtons m_buttons
Definition qnsview.mm:102
#define Q_ARG(Type, data)
Definition qobjectdefs.h:63
GLint GLint GLint GLint GLint x
[0]
GLenum mode
GLuint64 key
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean r
[2]
GLenum GLuint id
[7]
GLdouble GLdouble GLdouble GLdouble top
GLint GLsizei width
GLint left
GLenum type
GLint y
GLfloat GLfloat GLfloat GLfloat h
struct _cl_event * event
QT_BEGIN_NAMESPACE Q_DECLARE_JNI_CLASS(Environment, "android/os/Environment")
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
unsigned long ulong
Definition qtypes.h:35
unsigned int uint
Definition qtypes.h:34
static QPointingDevice::PointerType pointerType(unsigned currentCursor)
QMutex mutex
[2]
QReadWriteLock lock
[0]
aWidget window() -> setWindowTitle("New Window Title")
[2]
char * toString(const MyType &t)
[31]
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
\threadsafe This is an overloaded member function, provided for convenience. It differs from the abov...