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
4#ifndef QQNXSCREENTRAITS_H
5#define QQNXSCREENTRAITS_H
6
7#include <screen/screen.h>
8
10
11template <typename T>
12class screen_traits
13{
14};
15
16template <>
18{
19public:
22 static int destroy(screen_context_t context) { return screen_destroy_context(context); }
23};
24
25template <>
26class screen_traits<screen_device_t>
27{
28public:
29 typedef screen_device_t screen_type;
30 static const int propertyName = SCREEN_PROPERTY_DEVICE;
31 static int destroy(screen_device_t device) { return screen_destroy_device(device); }
32};
33
34template <>
35class screen_traits<screen_display_t>
36{
37public:
38 typedef screen_display_t screen_type;
39 static const int propertyName = SCREEN_PROPERTY_DISPLAY;
40};
41
42template <>
43class screen_traits<screen_group_t>
44{
45public:
46 typedef screen_group_t screen_type;
47 static const int propertyName = SCREEN_PROPERTY_GROUP;
48 static int destroy(screen_group_t group) { return screen_destroy_group(group); }
49};
50
51template <>
52class screen_traits<screen_pixmap_t>
53{
54public:
55 typedef screen_pixmap_t screen_type;
56 static const int propertyName = SCREEN_PROPERTY_PIXMAP;
57 static int destroy(screen_pixmap_t pixmap) { return screen_destroy_pixmap(pixmap); }
58};
59
60template <>
61class screen_traits<screen_session_t>
62{
63public:
64 typedef screen_session_t screen_type;
65 static const int propertyName = SCREEN_PROPERTY_SESSION;
66 static int destroy(screen_session_t session) { return screen_destroy_session(session); }
67};
68
70template <>
71class screen_traits<screen_stream_t>
72{
73public:
74 typedef screen_stream_t screen_type;
75 static const int propertyName = SCREEN_PROPERTY_STREAM;
76 static int destroy(screen_stream_t stream) { return screen_destroy_stream(stream); }
77};
78#endif
79
80template <>
81class screen_traits<screen_window_t>
82{
83public:
84 typedef screen_window_t screen_type;
85 static const int propertyName = SCREEN_PROPERTY_WINDOW;
86 static int destroy(screen_window_t window) { return screen_destroy_window(window); }
87};
88
89QT_END_NAMESPACE
90
91#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:61
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:31
void handleActivationEvent()
static int destroy(screen_context_t context)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
#define Q_SCREEN_CHECKERROR(x, message)
Definition qqnxglobal.h:13
QString keyStringForPrivateUseQnxKey(int key)
bool isKeypadKey(int key)
QT_BEGIN_NAMESPACE int qtKeyForPrivateUseQnxKey(int key)
#define _SCREEN_VERSION
Definition qqnxscreen.h:18
const int SCREEN_PROPERTY_FOCUS
Definition qqnxscreen.h:25
#define _SCREEN_MAKE_VERSION(major, minor, patch)
Definition qqnxscreen.h:17
Q_DECLARE_LOGGING_CATEGORY(lcQpaScreenEvents)
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)