Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QtActivity.java
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// Copyright (c) 2016, BogDan Vatra <bogdan@kde.org>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
4
5package org.qtproject.qt.android.bindings;
6
7import android.app.Activity;
8import android.app.Dialog;
9import android.app.Fragment;
10import android.content.Context;
11import android.content.Intent;
12import android.content.res.Configuration;
13import android.content.res.Resources.Theme;
14import android.graphics.Bitmap;
15import android.graphics.Canvas;
16import android.net.Uri;
17import android.os.Build;
18import android.os.Bundle;
19import android.util.AttributeSet;
20import android.view.ActionMode;
21import android.view.ActionMode.Callback;
22import android.view.ContextMenu;
23import android.view.ContextMenu.ContextMenuInfo;
24import android.view.KeyEvent;
25import android.view.Menu;
26import android.view.MenuItem;
27import android.view.MotionEvent;
28import android.view.View;
29import android.view.WindowManager.LayoutParams;
30import android.view.accessibility.AccessibilityEvent;
31
33
34public class QtActivity extends Activity
35{
36 public static final String EXTRA_SOURCE_INFO = "org.qtproject.qt.android.sourceInfo";
37
38 public String APPLICATION_PARAMETERS = null; // use this variable to pass any parameters to your application,
39 // the parameters must not contain any white spaces
40 // and must be separated with "\t"
41 // e.g "-param1\t-param2=value2\t-param3\tvalue3"
42
43 public String ENVIRONMENT_VARIABLES = "QT_USE_ANDROID_NATIVE_DIALOGS=1";
44 // use this variable to add any environment variables to your application.
45 // the env vars must be separated with "\t"
46 // e.g. "ENV_VAR1=1\tENV_VAR2=2\t"
47 // Currently the following vars are used by the android plugin:
48 // * QT_USE_ANDROID_NATIVE_DIALOGS - 1 to use the android native dialogs.
49
50 public String[] QT_ANDROID_THEMES = null; // A list with all themes that your application want to use.
51 // The name of the theme must be the same with any theme from
52 // http://developer.android.com/reference/android/R.style.html
53 // The most used themes are:
54 // * "Theme" - (fallback) check http://developer.android.com/reference/android/R.style.html#Theme
55 // * "Theme_Black" - check http://developer.android.com/reference/android/R.style.html#Theme_Black
56 // * "Theme_Light" - (default for API <=10) check http://developer.android.com/reference/android/R.style.html#Theme_Light
57 // * "Theme_Holo" - check http://developer.android.com/reference/android/R.style.html#Theme_Holo
58 // * "Theme_Holo_Light" - (default for API 11-13) check http://developer.android.com/reference/android/R.style.html#Theme_Holo_Light
59 // * "Theme_DeviceDefault" - check http://developer.android.com/reference/android/R.style.html#Theme_DeviceDefault
60 // * "Theme_DeviceDefault_Light" - (default for API 14+) check http://developer.android.com/reference/android/R.style.html#Theme_DeviceDefault_Light
61
62 public String QT_ANDROID_DEFAULT_THEME = null; // sets the default theme.
63
64 private QtActivityLoader m_loader;
65 public QtActivity()
66 {
67 m_loader = new QtActivityLoader(this);
68
69 if (Build.VERSION.SDK_INT < 29) {
70 QT_ANDROID_THEMES = new String[] {"Theme_Holo_Light"};
71 QT_ANDROID_DEFAULT_THEME = "Theme_Holo_Light";
72 } else {
73 QT_ANDROID_THEMES = new String[] {"Theme_DeviceDefault_DayNight"};
74 QT_ANDROID_DEFAULT_THEME = "Theme_DeviceDefault_DayNight";
75 }
76 }
77
78
83
84 @Override
85 public boolean dispatchKeyEvent(KeyEvent event)
86 {
89 else
90 return super.dispatchKeyEvent(event);
91 }
92 public boolean super_dispatchKeyEvent(KeyEvent event)
93 {
94 return super.dispatchKeyEvent(event);
95 }
96 //---------------------------------------------------------------------------
97
98 @Override
99 public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event)
100 {
103 else
104 return super.dispatchPopulateAccessibilityEvent(event);
105 }
106 public boolean super_dispatchPopulateAccessibilityEvent(AccessibilityEvent event)
107 {
108 return super.dispatchPopulateAccessibilityEvent(event);
109 }
110 //---------------------------------------------------------------------------
111
112 @Override
113 public boolean dispatchTouchEvent(MotionEvent ev)
114 {
117 else
118 return super.dispatchTouchEvent(ev);
119 }
120 public boolean super_dispatchTouchEvent(MotionEvent event)
121 {
122 return super.dispatchTouchEvent(event);
123 }
124 //---------------------------------------------------------------------------
125
126 @Override
127 public boolean dispatchTrackballEvent(MotionEvent ev)
128 {
131 else
132 return super.dispatchTrackballEvent(ev);
133 }
134 public boolean super_dispatchTrackballEvent(MotionEvent event)
135 {
136 return super.dispatchTrackballEvent(event);
137 }
138 //---------------------------------------------------------------------------
139
140 @Override
141 protected void onActivityResult(int requestCode, int resultCode, Intent data)
142 {
143
146 return;
147 }
148 super.onActivityResult(requestCode, resultCode, data);
149 }
150 public void super_onActivityResult(int requestCode, int resultCode, Intent data)
151 {
152 super.onActivityResult(requestCode, resultCode, data);
153 }
154 //---------------------------------------------------------------------------
155
156 @Override
157 protected void onApplyThemeResource(Theme theme, int resid, boolean first)
158 {
159 if (!QtApplication.invokeDelegate(theme, resid, first).invoked)
160 super.onApplyThemeResource(theme, resid, first);
161 }
162 public void super_onApplyThemeResource(Theme theme, int resid, boolean first)
163 {
164 super.onApplyThemeResource(theme, resid, first);
165 }
166 //---------------------------------------------------------------------------
167
168
169 @Override
170 protected void onChildTitleChanged(Activity childActivity, CharSequence title)
171 {
172 if (!QtApplication.invokeDelegate(childActivity, title).invoked)
173 super.onChildTitleChanged(childActivity, title);
174 }
175 public void super_onChildTitleChanged(Activity childActivity, CharSequence title)
176 {
177 super.onChildTitleChanged(childActivity, title);
178 }
179 //---------------------------------------------------------------------------
180
181 @Override
182 public void onConfigurationChanged(Configuration newConfig)
183 {
184 if (!QtApplication.invokeDelegate(newConfig).invoked)
185 super.onConfigurationChanged(newConfig);
186 }
187 public void super_onConfigurationChanged(Configuration newConfig)
188 {
189 super.onConfigurationChanged(newConfig);
190 }
191 //---------------------------------------------------------------------------
192
193 @Override
194 public void onContentChanged()
195 {
197 super.onContentChanged();
198 }
200 {
201 super.onContentChanged();
202 }
203 //---------------------------------------------------------------------------
204
205 @Override
206 public boolean onContextItemSelected(MenuItem item)
207 {
208 QtApplication.InvokeResult res = QtApplication.invokeDelegate(item);
209 if (res.invoked)
210 return (Boolean)res.methodReturns;
211 else
212 return super.onContextItemSelected(item);
213 }
214 public boolean super_onContextItemSelected(MenuItem item)
215 {
216 return super.onContextItemSelected(item);
217 }
218 //---------------------------------------------------------------------------
219
220 @Override
221 public void onContextMenuClosed(Menu menu)
222 {
224 super.onContextMenuClosed(menu);
225 }
227 {
228 super.onContextMenuClosed(menu);
229 }
230 //---------------------------------------------------------------------------
231
232 protected void onCreateHook(Bundle savedInstanceState) {
233 m_loader.APPLICATION_PARAMETERS = APPLICATION_PARAMETERS;
234 m_loader.ENVIRONMENT_VARIABLES = ENVIRONMENT_VARIABLES;
235 m_loader.QT_ANDROID_THEMES = QT_ANDROID_THEMES;
236 m_loader.QT_ANDROID_DEFAULT_THEME = QT_ANDROID_DEFAULT_THEME;
237 m_loader.onCreate(savedInstanceState);
238 }
239
240 private void addReferrer(Intent intent)
241 {
242 if (intent.getExtras() != null && intent.getExtras().getString(EXTRA_SOURCE_INFO) != null)
243 return;
244
245 String sourceInformation = "";
246 Uri referrer = getReferrer();
247 if (referrer != null)
248 sourceInformation = referrer.toString().replaceFirst("android-app://", "");
249
250 intent.putExtra(EXTRA_SOURCE_INFO, sourceInformation);
251 }
252
253 @Override
254 public void onCreate(Bundle savedInstanceState)
255 {
256 super.onCreate(savedInstanceState);
257 onCreateHook(savedInstanceState);
258 addReferrer(getIntent());
259 }
260 //---------------------------------------------------------------------------
261
262 @Override
263 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
264 {
265 if (!QtApplication.invokeDelegate(menu, v, menuInfo).invoked)
266 super.onCreateContextMenu(menu, v, menuInfo);
267 }
268 public void super_onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
269 {
270 super.onCreateContextMenu(menu, v, menuInfo);
271 }
272 //---------------------------------------------------------------------------
273
274 @Override
275 public CharSequence onCreateDescription()
276 {
277 QtApplication.InvokeResult res = QtApplication.invokeDelegate();
278 if (res.invoked)
279 return (CharSequence)res.methodReturns;
280 else
281 return super.onCreateDescription();
282 }
283 public CharSequence super_onCreateDescription()
284 {
285 return super.onCreateDescription();
286 }
287 //---------------------------------------------------------------------------
288
289 @Override
290 protected Dialog onCreateDialog(int id)
291 {
292 QtApplication.InvokeResult res = QtApplication.invokeDelegate(id);
293 if (res.invoked)
294 return (Dialog)res.methodReturns;
295 else
296 return super.onCreateDialog(id);
297 }
298 public Dialog super_onCreateDialog(int id)
299 {
300 return super.onCreateDialog(id);
301 }
302 //---------------------------------------------------------------------------
303
304 @Override
305 public boolean onCreateOptionsMenu(Menu menu)
306 {
307 QtApplication.InvokeResult res = QtApplication.invokeDelegate(menu);
308 if (res.invoked)
309 return (Boolean)res.methodReturns;
310 else
311 return super.onCreateOptionsMenu(menu);
312 }
313 public boolean super_onCreateOptionsMenu(Menu menu)
314 {
315 return super.onCreateOptionsMenu(menu);
316 }
317 //---------------------------------------------------------------------------
318
319 @Override
320 public boolean onCreatePanelMenu(int featureId, Menu menu)
321 {
322 QtApplication.InvokeResult res = QtApplication.invokeDelegate(featureId, menu);
323 if (res.invoked)
324 return (Boolean)res.methodReturns;
325 else
326 return super.onCreatePanelMenu(featureId, menu);
327 }
328 public boolean super_onCreatePanelMenu(int featureId, Menu menu)
329 {
330 return super.onCreatePanelMenu(featureId, menu);
331 }
332 //---------------------------------------------------------------------------
333
334
335 @Override
336 public View onCreatePanelView(int featureId)
337 {
338 QtApplication.InvokeResult res = QtApplication.invokeDelegate(featureId);
339 if (res.invoked)
340 return (View)res.methodReturns;
341 else
342 return super.onCreatePanelView(featureId);
343 }
344 public View super_onCreatePanelView(int featureId)
345 {
346 return super.onCreatePanelView(featureId);
347 }
348 //---------------------------------------------------------------------------
349
350 @Override
351 public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas)
352 {
353 QtApplication.InvokeResult res = QtApplication.invokeDelegate(outBitmap, canvas);
354 if (res.invoked)
355 return (Boolean)res.methodReturns;
356 else
357 return super.onCreateThumbnail(outBitmap, canvas);
358 }
359 public boolean super_onCreateThumbnail(Bitmap outBitmap, Canvas canvas)
360 {
361 return super.onCreateThumbnail(outBitmap, canvas);
362 }
363 //---------------------------------------------------------------------------
364
365 @Override
366 public View onCreateView(String name, Context context, AttributeSet attrs)
367 {
368 QtApplication.InvokeResult res = QtApplication.invokeDelegate(name, context, attrs);
369 if (res.invoked)
370 return (View)res.methodReturns;
371 else
372 return super.onCreateView(name, context, attrs);
373 }
374 public View super_onCreateView(String name, Context context, AttributeSet attrs)
375 {
376 return super.onCreateView(name, context, attrs);
377 }
378 //---------------------------------------------------------------------------
379
380 @Override
381 protected void onDestroy()
382 {
383 super.onDestroy();
385 }
386 //---------------------------------------------------------------------------
387
388
389 @Override
390 public boolean onKeyDown(int keyCode, KeyEvent event)
391 {
394 else
395 return super.onKeyDown(keyCode, event);
396 }
397 public boolean super_onKeyDown(int keyCode, KeyEvent event)
398 {
399 return super.onKeyDown(keyCode, event);
400 }
401 //---------------------------------------------------------------------------
402
403
404 @Override
405 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event)
406 {
409 else
410 return super.onKeyMultiple(keyCode, repeatCount, event);
411 }
412 public boolean super_onKeyMultiple(int keyCode, int repeatCount, KeyEvent event)
413 {
414 return super.onKeyMultiple(keyCode, repeatCount, event);
415 }
416 //---------------------------------------------------------------------------
417
418 @Override
419 public boolean onKeyUp(int keyCode, KeyEvent event)
420 {
423 else
424 return super.onKeyUp(keyCode, event);
425 }
426 public boolean super_onKeyUp(int keyCode, KeyEvent event)
427 {
428 return super.onKeyUp(keyCode, event);
429 }
430 //---------------------------------------------------------------------------
431
432 @Override
433 public void onLowMemory()
434 {
436 super.onLowMemory();
437 }
438 //---------------------------------------------------------------------------
439
440 @Override
441 public boolean onMenuItemSelected(int featureId, MenuItem item)
442 {
443 QtApplication.InvokeResult res = QtApplication.invokeDelegate(featureId, item);
444 if (res.invoked)
445 return (Boolean)res.methodReturns;
446 else
447 return super.onMenuItemSelected(featureId, item);
448 }
449 public boolean super_onMenuItemSelected(int featureId, MenuItem item)
450 {
451 return super.onMenuItemSelected(featureId, item);
452 }
453 //---------------------------------------------------------------------------
454
455 @Override
456 public boolean onMenuOpened(int featureId, Menu menu)
457 {
458 QtApplication.InvokeResult res = QtApplication.invokeDelegate(featureId, menu);
459 if (res.invoked)
460 return (Boolean)res.methodReturns;
461 else
462 return super.onMenuOpened(featureId, menu);
463 }
464 public boolean super_onMenuOpened(int featureId, Menu menu)
465 {
466 return super.onMenuOpened(featureId, menu);
467 }
468 //---------------------------------------------------------------------------
469
470 @Override
471 protected void onNewIntent(Intent intent)
472 {
473 addReferrer(intent);
475 super.onNewIntent(intent);
476 }
477 public void super_onNewIntent(Intent intent)
478 {
479 super.onNewIntent(intent);
480 }
481 //---------------------------------------------------------------------------
482
483 @Override
484 public boolean onOptionsItemSelected(MenuItem item)
485 {
486 QtApplication.InvokeResult res = QtApplication.invokeDelegate(item);
487 if (res.invoked)
488 return (Boolean)res.methodReturns;
489 else
490 return super.onOptionsItemSelected(item);
491 }
492 public boolean super_onOptionsItemSelected(MenuItem item)
493 {
494 return super.onOptionsItemSelected(item);
495 }
496 //---------------------------------------------------------------------------
497
498 @Override
499 public void onOptionsMenuClosed(Menu menu)
500 {
502 super.onOptionsMenuClosed(menu);
503 }
505 {
506 super.onOptionsMenuClosed(menu);
507 }
508 //---------------------------------------------------------------------------
509
510 @Override
511 public void onPanelClosed(int featureId, Menu menu)
512 {
513 if (!QtApplication.invokeDelegate(featureId, menu).invoked)
514 super.onPanelClosed(featureId, menu);
515 }
516 public void super_onPanelClosed(int featureId, Menu menu)
517 {
518 super.onPanelClosed(featureId, menu);
519 }
520 //---------------------------------------------------------------------------
521
522 @Override
523 protected void onPause()
524 {
525 super.onPause();
527 }
528 //---------------------------------------------------------------------------
529
530 @Override
531 protected void onPostCreate(Bundle savedInstanceState)
532 {
533 super.onPostCreate(savedInstanceState);
534 QtApplication.invokeDelegate(savedInstanceState);
535 }
536 //---------------------------------------------------------------------------
537
538 @Override
539 protected void onPostResume()
540 {
541 super.onPostResume();
543 }
544 //---------------------------------------------------------------------------
545
546 @Override
547 protected void onPrepareDialog(int id, Dialog dialog)
548 {
550 super.onPrepareDialog(id, dialog);
551 }
552 public void super_onPrepareDialog(int id, Dialog dialog)
553 {
554 super.onPrepareDialog(id, dialog);
555 }
556 //---------------------------------------------------------------------------
557
558 @Override
559 public boolean onPrepareOptionsMenu(Menu menu)
560 {
561 QtApplication.InvokeResult res = QtApplication.invokeDelegate(menu);
562 if (res.invoked)
563 return (Boolean)res.methodReturns;
564 else
565 return super.onPrepareOptionsMenu(menu);
566 }
567 public boolean super_onPrepareOptionsMenu(Menu menu)
568 {
569 return super.onPrepareOptionsMenu(menu);
570 }
571 //---------------------------------------------------------------------------
572
573 @Override
574 public boolean onPreparePanel(int featureId, View view, Menu menu)
575 {
576 QtApplication.InvokeResult res = QtApplication.invokeDelegate(featureId, view, menu);
577 if (res.invoked)
578 return (Boolean)res.methodReturns;
579 else
580 return super.onPreparePanel(featureId, view, menu);
581 }
582 public boolean super_onPreparePanel(int featureId, View view, Menu menu)
583 {
584 return super.onPreparePanel(featureId, view, menu);
585 }
586 //---------------------------------------------------------------------------
587
588 @Override
589 protected void onRestart()
590 {
591 super.onRestart();
593 }
594 //---------------------------------------------------------------------------
595
596 @Override
597 protected void onRestoreInstanceState(Bundle savedInstanceState)
598 {
599 if (!QtApplication.invokeDelegate(savedInstanceState).invoked)
600 super.onRestoreInstanceState(savedInstanceState);
601 }
602 public void super_onRestoreInstanceState(Bundle savedInstanceState)
603 {
604 super.onRestoreInstanceState(savedInstanceState);
605 }
606 //---------------------------------------------------------------------------
607
608 @Override
609 protected void onResume()
610 {
611 super.onResume();
613 }
614 //---------------------------------------------------------------------------
615
616 @Override
618 {
619 QtApplication.InvokeResult res = QtApplication.invokeDelegate();
620 if (res.invoked)
621 return res.methodReturns;
622 else
623 return super.onRetainNonConfigurationInstance();
624 }
626 {
627 return super.onRetainNonConfigurationInstance();
628 }
629 //---------------------------------------------------------------------------
630
631 @Override
632 protected void onSaveInstanceState(Bundle outState)
633 {
634 if (!QtApplication.invokeDelegate(outState).invoked)
635 super.onSaveInstanceState(outState);
636 }
637 public void super_onSaveInstanceState(Bundle outState)
638 {
639 super.onSaveInstanceState(outState);
640
641 }
642 //---------------------------------------------------------------------------
643
644 @Override
645 public boolean onSearchRequested()
646 {
647 QtApplication.InvokeResult res = QtApplication.invokeDelegate();
648 if (res.invoked)
649 return (Boolean)res.methodReturns;
650 else
651 return super.onSearchRequested();
652 }
653 public boolean super_onSearchRequested()
654 {
655 return super.onSearchRequested();
656 }
657 //---------------------------------------------------------------------------
658
659 @Override
660 protected void onStart()
661 {
662 super.onStart();
664 }
665 //---------------------------------------------------------------------------
666
667 @Override
668 protected void onStop()
669 {
670 super.onStop();
672 }
673 //---------------------------------------------------------------------------
674
675 @Override
676 protected void onTitleChanged(CharSequence title, int color)
677 {
679 super.onTitleChanged(title, color);
680 }
681 public void super_onTitleChanged(CharSequence title, int color)
682 {
683 super.onTitleChanged(title, color);
684 }
685 //---------------------------------------------------------------------------
686
687 @Override
688 public boolean onTouchEvent(MotionEvent event)
689 {
692 else
693 return super.onTouchEvent(event);
694 }
695 public boolean super_onTouchEvent(MotionEvent event)
696 {
697 return super.onTouchEvent(event);
698 }
699 //---------------------------------------------------------------------------
700
701 @Override
702 public boolean onTrackballEvent(MotionEvent event)
703 {
706 else
707 return super.onTrackballEvent(event);
708 }
709 public boolean super_onTrackballEvent(MotionEvent event)
710 {
711 return super.onTrackballEvent(event);
712 }
713 //---------------------------------------------------------------------------
714
715 @Override
716 public void onUserInteraction()
717 {
719 super.onUserInteraction();
720 }
722 {
723 super.onUserInteraction();
724 }
725 //---------------------------------------------------------------------------
726
727 @Override
728 protected void onUserLeaveHint()
729 {
731 super.onUserLeaveHint();
732 }
734 {
735 super.onUserLeaveHint();
736 }
737 //---------------------------------------------------------------------------
738
739 @Override
740 public void onWindowAttributesChanged(LayoutParams params)
741 {
743 super.onWindowAttributesChanged(params);
744 }
745 public void super_onWindowAttributesChanged(LayoutParams params)
746 {
747 super.onWindowAttributesChanged(params);
748 }
749 //---------------------------------------------------------------------------
750
751 @Override
752 public void onWindowFocusChanged(boolean hasFocus)
753 {
754 if (!QtApplication.invokeDelegate(hasFocus).invoked)
755 super.onWindowFocusChanged(hasFocus);
756 }
757 public void super_onWindowFocusChanged(boolean hasFocus)
758 {
759 super.onWindowFocusChanged(hasFocus);
760 }
761 //---------------------------------------------------------------------------
762
764//@ANDROID-5
765 @Override
766 public void onAttachedToWindow()
767 {
769 super.onAttachedToWindow();
770 }
772 {
773 super.onAttachedToWindow();
774 }
775 //---------------------------------------------------------------------------
776
777 @Override
778 public void onBackPressed()
779 {
781 super.onBackPressed();
782 }
784 {
785 super.onBackPressed();
786 }
787 //---------------------------------------------------------------------------
788
789 @Override
791 {
793 super.onDetachedFromWindow();
794 }
796 {
797 super.onDetachedFromWindow();
798 }
799 //---------------------------------------------------------------------------
800
801 @Override
802 public boolean onKeyLongPress(int keyCode, KeyEvent event)
803 {
806 else
807 return super.onKeyLongPress(keyCode, event);
808 }
809 public boolean super_onKeyLongPress(int keyCode, KeyEvent event)
810 {
811 return super.onKeyLongPress(keyCode, event);
812 }
813 //---------------------------------------------------------------------------
814//@ANDROID-5
815
817//@ANDROID-8
818@Override
819 protected Dialog onCreateDialog(int id, Bundle args)
820 {
821 QtApplication.InvokeResult res = QtApplication.invokeDelegate(id, args);
822 if (res.invoked)
823 return (Dialog)res.methodReturns;
824 else
825 return super.onCreateDialog(id, args);
826 }
827 public Dialog super_onCreateDialog(int id, Bundle args)
828 {
829 return super.onCreateDialog(id, args);
830 }
831 //---------------------------------------------------------------------------
832
833 @Override
834 protected void onPrepareDialog(int id, Dialog dialog, Bundle args)
835 {
837 super.onPrepareDialog(id, dialog, args);
838 }
839 public void super_onPrepareDialog(int id, Dialog dialog, Bundle args)
840 {
841 super.onPrepareDialog(id, dialog, args);
842 }
843 //---------------------------------------------------------------------------
844//@ANDROID-8
846
847//@ANDROID-11
848 @Override
849 public boolean dispatchKeyShortcutEvent(KeyEvent event)
850 {
853 else
854 return super.dispatchKeyShortcutEvent(event);
855 }
856 public boolean super_dispatchKeyShortcutEvent(KeyEvent event)
857 {
858 return super.dispatchKeyShortcutEvent(event);
859 }
860 //---------------------------------------------------------------------------
861
862 @Override
863 public void onActionModeFinished(ActionMode mode)
864 {
866 super.onActionModeFinished(mode);
867 }
868 public void super_onActionModeFinished(ActionMode mode)
869 {
870 super.onActionModeFinished(mode);
871 }
872 //---------------------------------------------------------------------------
873
874 @Override
875 public void onActionModeStarted(ActionMode mode)
876 {
878 super.onActionModeStarted(mode);
879 }
880 public void super_onActionModeStarted(ActionMode mode)
881 {
882 super.onActionModeStarted(mode);
883 }
884 //---------------------------------------------------------------------------
885
886 @Override
887 public void onAttachFragment(Fragment fragment)
888 {
889 if (!QtApplication.invokeDelegate(fragment).invoked)
890 super.onAttachFragment(fragment);
891 }
892 public void super_onAttachFragment(Fragment fragment)
893 {
894 super.onAttachFragment(fragment);
895 }
896 //---------------------------------------------------------------------------
897
898 @Override
899 public View onCreateView(View parent, String name, Context context, AttributeSet attrs)
900 {
901 QtApplication.InvokeResult res = QtApplication.invokeDelegate(parent, name, context, attrs);
902 if (res.invoked)
903 return (View)res.methodReturns;
904 else
905 return super.onCreateView(parent, name, context, attrs);
906 }
907 public View super_onCreateView(View parent, String name, Context context,
908 AttributeSet attrs) {
909 return super.onCreateView(parent, name, context, attrs);
910 }
911 //---------------------------------------------------------------------------
912
913 @Override
914 public boolean onKeyShortcut(int keyCode, KeyEvent event)
915 {
918 else
919 return super.onKeyShortcut(keyCode, event);
920 }
921 public boolean super_onKeyShortcut(int keyCode, KeyEvent event)
922 {
923 return super.onKeyShortcut(keyCode, event);
924 }
925 //---------------------------------------------------------------------------
926
927 @Override
928 public ActionMode onWindowStartingActionMode(Callback callback)
929 {
930 QtApplication.InvokeResult res = QtApplication.invokeDelegate(callback);
931 if (res.invoked)
932 return (ActionMode)res.methodReturns;
933 else
934 return super.onWindowStartingActionMode(callback);
935 }
936 public ActionMode super_onWindowStartingActionMode(Callback callback)
937 {
938 return super.onWindowStartingActionMode(callback);
939 }
940 //---------------------------------------------------------------------------
941//@ANDROID-11
943
944//@ANDROID-12
945 @Override
946 public boolean dispatchGenericMotionEvent(MotionEvent ev)
947 {
950 else
951 return super.dispatchGenericMotionEvent(ev);
952 }
953 public boolean super_dispatchGenericMotionEvent(MotionEvent event)
954 {
955 return super.dispatchGenericMotionEvent(event);
956 }
957 //---------------------------------------------------------------------------
958
959 @Override
960 public boolean onGenericMotionEvent(MotionEvent event)
961 {
964 else
965 return super.onGenericMotionEvent(event);
966 }
967 public boolean super_onGenericMotionEvent(MotionEvent event)
968 {
969 return super.onGenericMotionEvent(event);
970 }
971 //---------------------------------------------------------------------------
972//@ANDROID-12
973
974 public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
975 {
977 QtApplication.invokeDelegateMethod(QtApplication.onRequestPermissionsResult, requestCode , permissions, grantResults);
978 return;
979 }
980 }
981
982 public void bringChildToBack(int id)
983 {
985 }
986
987 public void bringChildToFront(int id)
988 {
990 }
991
992 public void closeContextMenu()
993 {
995 }
996
997 public void createSurface(int id, boolean onTop, int x, int y, int w, int h, int imageDepth)
998 {
999 QtNative.activityDelegate().createSurface(id, onTop, x, y, w, h, imageDepth);
1000 }
1001
1002 public void destroySurface(int id)
1003 {
1005 }
1006
1007 public int getSurfaceCount()
1008 {
1010 }
1011
1013 {
1015 }
1016
1017 public void hideSplashScreen()
1018 {
1020 }
1021
1022 public void hideSplashScreen(final int duration)
1023 {
1025 }
1026
1028 {
1030 }
1031
1032 public void insertNativeView(int id, View view, int x, int y, int w, int h)
1033 {
1035 }
1036
1037 public boolean loadApplication(Activity activity, ClassLoader classLoader, Bundle loaderParams)
1038 {
1039 return QtNative.activityDelegate().loadApplication(activity, classLoader, loaderParams);
1040 }
1041
1042 public void onCreatePopupMenu(Menu menu)
1043 {
1045 }
1046
1047 public void onTerminate()
1048 {
1050 }
1051
1052 public void openContextMenu(final int x, final int y, final int w, final int h)
1053 {
1055 }
1056
1057 public void resetOptionsMenu()
1058 {
1060 }
1061
1063 {
1065 }
1066
1067 public boolean setKeyboardVisibility(boolean visibility, long timeStamp)
1068 {
1069 return QtNative.activityDelegate().setKeyboardVisibility(visibility, timeStamp);
1070 }
1071
1072 public void setSurfaceGeometry(int id, int x, int y, int w, int h)
1073 {
1075 }
1076
1077 public void setSystemUiVisibility(int systemUiVisibility)
1078 {
1079 QtNative.activityDelegate().setSystemUiVisibility(systemUiVisibility);
1080 }
1081
1082 public void showSoftwareKeyboard(final int x, final int y, final int width,
1083 final int height, final int inputHints,
1084 final int enterKeyType)
1085 {
1086 QtNative.activityDelegate().showSoftwareKeyboard(x, y, width, height, inputHints, enterKeyType);
1087 }
1088
1089 public boolean startApplication()
1090 {
1092 }
1093
1094 public void updateFullScreen()
1095 {
1097 }
1098
1099 public void updateHandles(int mode, int editX, int editY, int editButtons,
1100 int x1, int y1, int x2, int y2, boolean rtl)
1101 {
1102 QtNative.activityDelegate().updateHandles(mode, editX, editY, editButtons, x1, y1, x2, y2, rtl);
1103 }
1104
1105 public void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd)
1106 {
1107 QtNative.activityDelegate().updateSelection(selStart, selEnd, candidatesStart, candidatesEnd);
1108 }
1109
1111 {
1113 }
1114
1115 public void notifyObjectHide(int viewId, int parentId)
1116 {
1117 QtNative.activityDelegate().notifyObjectHide(viewId, parentId);
1118 }
1119
1120 public void notifyObjectFocus(int viewId)
1121 {
1123 }
1124
1125 public void notifyValueChanged(int viewId, String value)
1126 {
1128 }
1129
1130 public boolean isKeyboardVisible()
1131 {
1133 }
1134
1136 {
1138 }
1139}
Definition main.cpp:8
void insertNativeView(int id, View view, int x, int y, int w, int h)
void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd)
void notifyObjectHide(int viewId, int parentId)
void notifyValueChanged(int viewId, String value)
void showSoftwareKeyboard(final int x, final int y, final int width, final int height, final int inputHints, final int enterKeyType)
void createSurface(int id, boolean onTop, int x, int y, int w, int h, int imageDepth)
boolean setKeyboardVisibility(boolean visibility, long timeStamp)
boolean loadApplication(Activity activity, ClassLoader classLoader, Bundle loaderParams)
void setSurfaceGeometry(int id, int x, int y, int w, int h)
void openContextMenu(final int x, final int y, final int w, final int h)
void updateHandles(int mode, int editX, int editY, int editButtons, int x1, int y1, int x2, int y2, boolean rtl)
static QtActivityDelegate activityDelegate()
void onChildTitleChanged(Activity childActivity, CharSequence title)
void super_onApplyThemeResource(Theme theme, int resid, boolean first)
void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
Dialog super_onCreateDialog(int id, Bundle args)
void createSurface(int id, boolean onTop, int x, int y, int w, int h, int imageDepth)
void super_onPrepareDialog(int id, Dialog dialog, Bundle args)
ActionMode onWindowStartingActionMode(Callback callback)
boolean onKeyDown(int keyCode, KeyEvent event)
boolean onMenuItemSelected(int featureId, MenuItem item)
boolean super_onGenericMotionEvent(MotionEvent event)
boolean super_dispatchTouchEvent(MotionEvent event)
boolean onGenericMotionEvent(MotionEvent event)
boolean onKeyShortcut(int keyCode, KeyEvent event)
void super_onPrepareDialog(int id, Dialog dialog)
boolean loadApplication(Activity activity, ClassLoader classLoader, Bundle loaderParams)
boolean super_dispatchPopulateAccessibilityEvent(AccessibilityEvent event)
boolean super_onKeyDown(int keyCode, KeyEvent event)
void updateHandles(int mode, int editX, int editY, int editButtons, int x1, int y1, int x2, int y2, boolean rtl)
void onCreate(Bundle savedInstanceState)
void super_onConfigurationChanged(Configuration newConfig)
void setSurfaceGeometry(int id, int x, int y, int w, int h)
boolean super_dispatchKeyEvent(KeyEvent event)
boolean super_onMenuOpened(int featureId, Menu menu)
void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
boolean super_onPreparePanel(int featureId, View view, Menu menu)
void onConfigurationChanged(Configuration newConfig)
void super_onTitleChanged(CharSequence title, int color)
boolean super_dispatchKeyShortcutEvent(KeyEvent event)
boolean super_onKeyMultiple(int keyCode, int repeatCount, KeyEvent event)
boolean onPreparePanel(int featureId, View view, Menu menu)
boolean super_onMenuItemSelected(int featureId, MenuItem item)
Dialog onCreateDialog(int id, Bundle args)
void showSoftwareKeyboard(final int x, final int y, final int width, final int height, final int inputHints, final int enterKeyType)
boolean onKeyUp(int keyCode, KeyEvent event)
void onCreateHook(Bundle savedInstanceState)
void setSystemUiVisibility(int systemUiVisibility)
boolean super_onKeyShortcut(int keyCode, KeyEvent event)
void onTitleChanged(CharSequence title, int color)
void onRestoreInstanceState(Bundle savedInstanceState)
void openContextMenu(final int x, final int y, final int w, final int h)
void notifyValueChanged(int viewId, String value)
boolean onTrackballEvent(MotionEvent event)
ActionMode super_onWindowStartingActionMode(Callback callback)
void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd)
void super_onActivityResult(int requestCode, int resultCode, Intent data)
boolean dispatchGenericMotionEvent(MotionEvent ev)
void super_onRestoreInstanceState(Bundle savedInstanceState)
void super_onWindowAttributesChanged(LayoutParams params)
boolean onMenuOpened(int featureId, Menu menu)
boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event)
boolean super_onTrackballEvent(MotionEvent event)
void insertNativeView(int id, View view, int x, int y, int w, int h)
void onPanelClosed(int featureId, Menu menu)
void onApplyThemeResource(Theme theme, int resid, boolean first)
void onPostCreate(Bundle savedInstanceState)
boolean super_onOptionsItemSelected(MenuItem item)
boolean super_onKeyUp(int keyCode, KeyEvent event)
boolean dispatchKeyShortcutEvent(KeyEvent event)
void onActivityResult(int requestCode, int resultCode, Intent data)
View onCreateView(View parent, String name, Context context, AttributeSet attrs)
void onPrepareDialog(int id, Dialog dialog)
void super_onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event)
void notifyObjectHide(int viewId, int parentId)
View super_onCreateView(String name, Context context, AttributeSet attrs)
void super_onChildTitleChanged(Activity childActivity, CharSequence title)
boolean super_onTouchEvent(MotionEvent event)
boolean onKeyLongPress(int keyCode, KeyEvent event)
boolean super_dispatchTrackballEvent(MotionEvent event)
boolean super_onKeyLongPress(int keyCode, KeyEvent event)
View super_onCreateView(View parent, String name, Context context, AttributeSet attrs)
boolean setKeyboardVisibility(boolean visibility, long timeStamp)
View onCreateView(String name, Context context, AttributeSet attrs)
void onPrepareDialog(int id, Dialog dialog, Bundle args)
boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas)
boolean super_onContextItemSelected(MenuItem item)
void super_onWindowFocusChanged(boolean hasFocus)
boolean super_onCreatePanelMenu(int featureId, Menu menu)
boolean super_onCreateThumbnail(Bitmap outBitmap, Canvas canvas)
void onWindowAttributesChanged(LayoutParams params)
boolean onCreatePanelMenu(int featureId, Menu menu)
void super_onPanelClosed(int featureId, Menu menu)
boolean super_dispatchGenericMotionEvent(MotionEvent event)
static InvokeResult invokeDelegate(Object... args)
static Object invokeDelegateMethod(Method m, Object... args)
static void * context
static struct AttrInfo attrs[]
static Q_CONSTINIT QBasicAtomicInt running
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLenum mode
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLint GLsizei width
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint name
GLint first
GLint y
GLfloat GLfloat GLfloat GLfloat h
void ** params
struct _cl_event * event
GLuint res
GLfixed GLfixed GLfixed y2
GLfixed GLfixed x2
QString title
[35]
QFileDialog dialog(this)
[1]
QGraphicsItem * item
QMenu menu
[5]
QQuickView * view
[0]
QJSValueList args
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent