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
qqnxscreentraits.h
Go to the documentation of this file.
1// Copyright (C) 2018 QNX Software Systems. 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// Qt-Security score:significant reason:default
4
5#ifndef QQNXSCREENTRAITS_H
6#define QQNXSCREENTRAITS_H
7
8#include <screen/screen.h>
9
11
12template <typename T>
13class screen_traits
14{
15};
16
17template <>
19{
20public:
23 static int destroy(screen_context_t context) { return screen_destroy_context(context); }
24};
25
26template <>
27class screen_traits<screen_device_t>
28{
29public:
30 typedef screen_device_t screen_type;
31 static const int propertyName = SCREEN_PROPERTY_DEVICE;
32 static int destroy(screen_device_t device) { return screen_destroy_device(device); }
33};
34
35template <>
36class screen_traits<screen_display_t>
37{
38public:
39 typedef screen_display_t screen_type;
40 static const int propertyName = SCREEN_PROPERTY_DISPLAY;
41};
42
43template <>
44class screen_traits<screen_group_t>
45{
46public:
47 typedef screen_group_t screen_type;
48 static const int propertyName = SCREEN_PROPERTY_GROUP;
49 static int destroy(screen_group_t group) { return screen_destroy_group(group); }
50};
51
52template <>
53class screen_traits<screen_pixmap_t>
54{
55public:
56 typedef screen_pixmap_t screen_type;
57 static const int propertyName = SCREEN_PROPERTY_PIXMAP;
58 static int destroy(screen_pixmap_t pixmap) { return screen_destroy_pixmap(pixmap); }
59};
60
61template <>
62class screen_traits<screen_session_t>
63{
64public:
65 typedef screen_session_t screen_type;
66 static const int propertyName = SCREEN_PROPERTY_SESSION;
67 static int destroy(screen_session_t session) { return screen_destroy_session(session); }
68};
69
71template <>
72class screen_traits<screen_stream_t>
73{
74public:
75 typedef screen_stream_t screen_type;
76 static const int propertyName = SCREEN_PROPERTY_STREAM;
77 static int destroy(screen_stream_t stream) { return screen_destroy_stream(stream); }
78};
79#endif
80
81template <>
82class screen_traits<screen_window_t>
83{
84public:
85 typedef screen_window_t screen_type;
86 static const int propertyName = SCREEN_PROPERTY_WINDOW;
87 static int destroy(screen_window_t window) { return screen_destroy_window(window); }
88};
89
90QT_END_NAMESPACE
91
92#endif // QQNXSCREENTRAITS_H
static QQnxIntegration * instance()
void removeDisplay(QQnxScreen *screen)
void removeScreenEventFilter(QQnxScreenEventFilter *filter)
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)
bool isPrimaryScreen() const
Definition qqnxscreen.h:60
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:32
void handlePostEvent()
void handleActivationEvent()
static int destroy(screen_context_t context)
Combined button and popup list for selecting options.
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
#define Q_SCREEN_CHECKERROR(x, message)
Definition qqnxglobal.h:17
QString keyStringForPrivateUseQnxKey(int key)
bool isKeypadKey(int key)
QT_BEGIN_NAMESPACE int qtKeyForPrivateUseQnxKey(int key)
const int SCREEN_PROPERTY_SYM
Definition qqnxscreen.h:29
#define _SCREEN_VERSION
Definition qqnxscreen.h:19
const int SCREEN_PROPERTY_SCAN
Definition qqnxscreen.h:28
const int SCREEN_PROPERTY_FOCUS
Definition qqnxscreen.h:26
const int SCREEN_PROPERTY_MODIFIERS
Definition qqnxscreen.h:27
#define _SCREEN_MAKE_VERSION(major, minor, patch)
Definition qqnxscreen.h:18
static int qtKey(int virtualKey, QChar::Category category)
static QString keyString(int sym, QChar::Category category)
static void finishCloseEvent(screen_event_t event)
static QString capKeyString(int cap, int modifiers, int key)
static void finishCloseEvent(screen_event_t event)